@font-face {
  font-family: "Sen";
  src: url("fonts/Sen-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Sen";
  src: url("fonts/Sen-ExtraBold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
/* ── Variables dark / light ───────────────────────── */
:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --border: #e0e0dc;
  --text-primary: #1a1a18;
  --text-secondary: #6b6b67;
  --text-muted: #a0a09c;
  --accent: #333333;
  --line: #d0d0cc;
  --dot: #333333;
  --radius: 12px;
  --transition: 0.3s ease;
}

[data-theme="dark"] {
  --bg: #141412;
  --surface: #1e1e1c;
  --border: #2e2e2c;
  --text-primary: #f0f0ee;
  --text-secondary: #a0a09c;
  --text-muted: #606060;
  --accent: #5b8ff0;
  --line: #3a3a38;
  --dot: #5b8ff0;
}

/* ── Reset de base ────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Sen", -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}

/* ── Navigation ───────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

nav .nav-links { display: flex; gap: 2rem; list-style: none; }

nav .nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 14px;
  transition: color var(--transition);
}

nav .nav-links a:hover,
nav .nav-links a.active { color: var(--text-primary); }

.mobile-break { display: none; }

/* ── Toggle dark/light ────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 4px;
  cursor: pointer;
  gap: 0;
  position: relative;
}

.theme-toggle-option {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
  z-index: 1;
  user-select: none;
}

.theme-toggle-option.active {
  color: var(--bg);
}

.theme-toggle-pill {
  position: absolute;
  top: 4px;
  height: calc(100% - 8px);
  border-radius: 24px;
  background: var(--text-primary);
  transition: left var(--transition), width var(--transition);
  z-index: 0;
}

/* ── Menu hamburger (mobile) ──────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 26px;
  height: 26px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  position: relative;
  z-index: 201;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 4px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

.hamburger span:first-child { width: 65%; }

.hamburger.open span:first-child { width: 75%; transform: translateY(4.5px) rotate(45deg); }
.hamburger.open span:last-child  { width: 75%; transform: translateY(-4.5px) rotate(-45deg); }

/* ── Layout général ───────────────────────────────── */
main { max-width: 900px; margin: 0 auto; padding: 4rem 2rem; }

/* ── Timeline ─────────────────────────────────────── */
.timeline { position: relative; }

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  background: var(--line);
  transform: translateX(-50%);
  height: 100%;
}

.timeline-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--accent);
  height: 0%;
  transition: height 0.1s linear;
}

.tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  filter: blur(6px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out, filter 0.6s ease-out;
}

.tl-item.visible { opacity: 1; transform: translateY(0); filter: blur(0); }

.tl-item.left  { flex-direction: row; }
.tl-item.right { flex-direction: row-reverse; }

.tl-card {
  width: 44%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  transition: background var(--transition), border-color var(--transition);
}

.tl-item.left  .tl-card { margin-right: calc(6% + 16px); }
.tl-item.right .tl-card { margin-left:  calc(6% + 16px); }

.tl-dot {
  position: absolute;
  left: 50%;
  top: 1.25rem;
  transform: translateX(-50%) scale(0);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--dot);
  border: 2px solid var(--bg);
  z-index: 1;
  transition: transform 0.3s ease-out 0.2s, background var(--transition);
}

.tl-item.visible .tl-dot { transform: translateX(-50%) scale(1); }

.tl-date {
    font-size: 19px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.03em;
}

.tl-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Responsive mobile ────────────────────────────── */
@media (max-width: 600px) {
  .timeline-line { left: 16px; }

  .tl-item.left,
  .tl-item.right { flex-direction: row; }

  .tl-card { width: calc(100% - 48px); margin-left: 48px !important; margin-right: 0 !important; }

  .tl-dot { left: 16px; }

  .toggle-label { display: none; }

  nav { justify-content: space-between; }

  .hamburger { display: flex; order: -1; }

  nav .nav-links {
    position: fixed;
    inset: 0;
    z-index: 200;
    overflow: hidden;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: var(--bg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
  }

  nav .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  nav .nav-links::before {
    content: "ISLAMO\APHOBIE";
    position: absolute;
    inset: 0;
    z-index: -1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 2rem;
    text-align: center;
    white-space: pre;
    font-size: 25vw;
    font-weight: 800;
    line-height: 0.85;
    color: var(--text-primary);
    opacity: 0.04;
    pointer-events: none;
    user-select: none;
  }

  nav .nav-links a { display: inline-block; font-size: 40px; font-weight: 800; line-height: 1.15; text-transform: none; text-align: center; }

  .mobile-break { display: inline; }

  main { padding-top: 1.5rem; }
}
/* ── Lieu ─────────────────────────────────────────── */
.tl-place {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  letter-spacing: 0.03em;
}

/* ── Sources ──────────────────────────────────────── */
.tl-sources {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 4px;
  padding-top: 1px;
}

.tl-source {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

.tl-source:hover { color: var(--text-primary); }

/* ── Tags ─────────────────────────────────────────── */
.tl-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.tl-tag {
  font-size: 11px;
  font-family: inherit;
  color: var(--accent);
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  cursor: pointer;
  transition: all var(--transition);
}

.tl-tag:hover,
.tl-tag.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ── Filtre tag actif ─────────────────────────────── */
.tag-filter-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px 7px 14px;
  border: 1px solid var(--accent);
  border-radius: 20px;
  background: var(--surface);
  color: var(--accent);
  font-size: 13px;
}

.tag-filter-chip button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

/* ── Année en filigrane ───────────────────────────── */
.year-watermark {
  position: fixed;
  bottom: -0.15em;
  right: 0.1em;
  font-size: clamp(120px, 20vw, 220px);
  font-weight: 800;
  color: var(--text-primary);
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
  line-height: 1;
  user-select: none;
  transition: opacity 0.4s ease;
}

/* ── Filtres ──────────────────────────────────────── */
.filters {
  max-width: 900px;
  margin: 2rem auto 0;
  padding: 0 2rem;
  display: flex;
  gap: 12px;
}

.filters select {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.filters select:hover { border-color: var(--text-muted); }
.filters select:focus { outline: none; border-color: var(--accent); }

/* ── Mois sur la frise ────────────────────────────── */
/* ── Séparateur mois ──────────────────────────────── */
.tl-month-separator {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: lowercase;
  margin: 1.5rem 0;
  position: relative;
  z-index: 2;
}

.tl-month-separator::before {
  content: '';
  display: inline-block;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--bg);
  width: 80px;
  height: 100%;
  padding: 4px 0;
  z-index: -1;
}

/* ── Header ──────────────────────────────────────── */
.page-header {
  max-width: 900px;
  margin: 3rem auto 0;
  padding: 0 2rem;
}

@media (max-width: 600px) {
  .page-header { margin-top: 1.5rem; }
}

.page-header h1 {
  font-size: min(10vw, 6.75rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 0.2rem;
  white-space: nowrap;
}

.page-header p {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Footer ──────────────────────────────────────── */
.site-footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer a {
  text-decoration: none;
  color: var(--text-muted);
  transition: color var(--transition);
}

.site-footer a:hover { color: var(--text-primary); }