/* =========================================================
   Annuaire Algérie — Feuille de style
   Parti pris éditorial : papier & encre, serif de titrage,
   filets d'1 px, chiffres en mono. Pas de dégradé, pas d'ombre
   portée, pas d'angle arrondi au-delà de 2 px.
   ========================================================= */

/* ---------- Police auto-hébergée ----------
   Inter (SIL Open Font License 1.1) sert au texte courant ;
   le titrage s'appuie sur le serif du système (New York, Iowan,
   Palatino, Georgia) : rien à télécharger, rendu net partout. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokens ---------- */
:root {
  --paper: #fbf9f5;
  --paper-2: #f2eee6;
  --paper-3: #e9e4d9;
  --card: #ffffff;

  --ink: #15171a;
  --ink-2: #545a61;
  --ink-3: #8b929a;

  --rule: #e0dacd;
  --rule-2: #c8c0ae;

  --accent: #0f5a46;
  --accent-2: #0b4436;
  --accent-soft: #e9f0ec;
  --terre: #a2542d;

  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container: 1240px;
  --gutter: 28px;
  --head-h: 66px;
  --r: 2px;
  --t: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] {
  --paper: #131417;
  --paper-2: #191b1f;
  --paper-3: #202329;
  --card: #191b1f;

  --ink: #ece9e3;
  --ink-2: #a4aab1;
  --ink-3: #6d747c;

  --rule: #2b2e34;
  --rule-2: #3d424a;

  --accent: #63b295;
  --accent-2: #7cc3a8;
  --accent-soft: #16221e;
  --terre: #c8815a;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--head-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.011em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, select { font: inherit; color: inherit; }
::selection { background: var(--accent); color: var(--paper); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- Micro-typographie ---------- */
.kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0;
}
.kicker--accent { color: var(--accent); }

.num {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--ink-3);
}

.lead {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink-2);
}

.dot { color: var(--rule-2); padding-inline: 0.5em; }

/* ---------- Bandeau de tête ---------- */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  font-size: 0.75rem;
  color: var(--ink-3);
}
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; height: 38px;
}
.topbar-links { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; }
.topbar-links::-webkit-scrollbar { display: none; }
.topbar-links a { white-space: nowrap; transition: color var(--t); }
.topbar-links a:hover { color: var(--accent); }
.topbar-meta { display: flex; align-items: center; gap: 14px; white-space: nowrap; }

.theme-toggle {
  display: grid; place-items: center;
  width: 26px; height: 26px;
  color: var(--ink-3);
  border: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.theme-toggle:hover { color: var(--ink); border-color: var(--rule); }
.theme-toggle .i-moon { display: none; }
html[data-theme="dark"] .theme-toggle .i-sun { display: none; }
html[data-theme="dark"] .theme-toggle .i-moon { display: block; }

/* ---------- Entête ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: box-shadow var(--t);
}
.masthead.is-stuck { box-shadow: 0 1px 12px rgba(20, 22, 26, 0.06); }
html[data-theme="dark"] .masthead.is-stuck { box-shadow: 0 1px 12px rgba(0, 0, 0, 0.4); }

.masthead-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: var(--head-h);
}

.wordmark { display: inline-flex; align-items: center; gap: 11px; }
.wordmark-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1;
  letter-spacing: 0.02em;
}
.wordmark-text {
  font-family: var(--serif);
  font-size: 1.1875rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.wordmark-text em { font-style: normal; color: var(--accent); }
.wordmark-sub {
  display: block;
  font-family: var(--sans);
  font-size: 0.5625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 1px;
}

.nav { display: flex; align-items: center; gap: 2px; }
.nav a {
  position: relative;
  padding: 8px 13px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color var(--t);
}
.nav a::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px;
  height: 1px; background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--t);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--ink); }

.head-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 38px; height: 38px;
  place-items: center;
  border: 1px solid var(--rule);
}

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--r);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); }
.btn--ghost { border-color: var(--rule-2); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.btn--sm { padding: 7px 13px; font-size: 0.75rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.8125rem; font-weight: 600;
  color: var(--accent);
  transition: gap var(--t);
}
.link-arrow svg { transition: transform var(--t); }
.link-arrow:hover svg { transform: translateX(3px); }

.link-u {
  background-image: linear-gradient(var(--rule-2), var(--rule-2));
  background-size: 100% 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: background-size var(--t), color var(--t);
}
.link-u:hover { color: var(--accent); background-image: linear-gradient(var(--accent), var(--accent)); }

/* ---------- Titres de section ---------- */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 34px;
}
.section-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  margin-top: 8px;
}
.section-head .lead { max-width: 46ch; margin-top: 10px; font-size: 0.9375rem; }

/* ---------- Hero d'accueil ---------- */
.hero { padding: clamp(44px, 6vw, 76px) 0 clamp(40px, 5vw, 60px); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.hero h1 {
  font-size: clamp(2.4rem, 5.6vw, 4.1rem);
  line-height: 1.03;
  letter-spacing: -0.025em;
  margin: 20px 0 0;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .lead { margin-top: 22px; max-width: 52ch; font-size: 1.125rem; }

.hero-rule {
  display: flex; align-items: center; gap: 16px;
  margin-top: 34px; padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 0.8125rem; color: var(--ink-3);
  flex-wrap: wrap;
}

/* Champ de recherche */
.search {
  display: flex; align-items: stretch;
  margin-top: 30px;
  border: 1px solid var(--ink);
  background: var(--card);
  transition: box-shadow var(--t);
}
.search:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.search-icon { display: grid; place-items: center; padding-left: 16px; color: var(--ink-3); }
.search input {
  flex: 1; min-width: 0;
  padding: 15px 14px;
  border: none; background: none;
  font-size: 0.9375rem;
}
.search input::placeholder { color: var(--ink-3); }
.search input:focus { outline: none; }
.search button {
  padding: 0 22px;
  background: var(--ink); color: var(--paper);
  font-size: 0.8125rem; font-weight: 600;
  transition: background var(--t);
}
.search button:hover { background: var(--accent); }

.quick-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.quick-tags span { font-size: 0.75rem; color: var(--ink-3); align-self: center; margin-right: 4px; }
.quick-tags a {
  padding: 5px 11px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-size: 0.75rem;
  color: var(--ink-2);
  transition: border-color var(--t), color var(--t), background var(--t);
}
.quick-tags a:hover { border-color: var(--ink); color: var(--ink); background: var(--card); }

/* Sommaire (colonne droite du hero) */
.sommaire {
  border: 1px solid var(--ink);
  background: var(--card);
}
.sommaire-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-2);
}
.sommaire-head strong {
  font-family: var(--serif); font-size: 1rem; font-weight: 600;
}
.sommaire ol { margin: 0; padding: 0; list-style: none; }
.sommaire li + li { border-top: 1px solid var(--rule); }
.sommaire a {
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 10px 18px;
  transition: background var(--t);
}
.sommaire a:hover { background: var(--paper-2); }
.sommaire a:hover .s-name { color: var(--accent); }
.s-name { font-size: 0.875rem; font-weight: 500; transition: color var(--t); }
.s-count { font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- Grille des rubriques ---------- */
.rub-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--rule);
  border-bottom: none;
  background: var(--card);
}
.rub-cell {
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  transition: background var(--t);
}
.rub-grid > .rub-cell:nth-child(4n) { border-right: none; }
.rub-cell:hover { background: var(--paper-2); }
.rub-cell:hover .rub-name { color: var(--accent); }
.rub-cell:hover .rub-go { opacity: 1; transform: translateX(0); }
.rub-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.rub-top .num { color: var(--rule-2); font-size: 0.8125rem; }
.rub-icon { color: var(--accent); }
.rub-name {
  font-family: var(--serif); font-size: 1.125rem; font-weight: 600;
  transition: color var(--t);
}
.rub-desc { font-size: 0.8125rem; color: var(--ink-2); margin-top: 7px; line-height: 1.55; }
/* margin-top:auto — les pieds de cellule s'alignent sur une même
   ligne quel que soit le nombre de lignes du descriptif. */
.rub-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 14px;
  border-top: 1px solid var(--rule);
}
.rub-desc { margin-bottom: 18px; }
.rub-foot .num { font-size: 0.6875rem; }
.rub-go { color: var(--accent); opacity: 0; transform: translateX(-4px); transition: opacity var(--t), transform var(--t); }

/* ---------- Cartes de fiches ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.card {
  display: flex; flex-direction: column;
  background: var(--card);
  transition: background var(--t);
}
.card:hover { background: var(--paper-2); }
.card:hover .card-title { color: var(--accent); }

.plate {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.plate::before {
  content: ""; position: absolute; inset: 0;
  opacity: 0.55;
}
.plate-icon {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  color: var(--accent);
  opacity: 0.85;
}
.plate-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 3px 8px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 0.625rem;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.plate-num {
  position: absolute; bottom: 8px; right: 12px;
  font-family: var(--mono); font-size: 0.6875rem;
  color: var(--ink-3);
}

/* Trames — une par famille de rubriques, pour distinguer sans image */
.p-diag::before { background-image: repeating-linear-gradient(45deg, var(--rule-2) 0 1px, transparent 1px 9px); }
.p-vert::before { background-image: repeating-linear-gradient(90deg, var(--rule-2) 0 1px, transparent 1px 11px); }
.p-horiz::before { background-image: repeating-linear-gradient(0deg, var(--rule-2) 0 1px, transparent 1px 8px); }
.p-grid::before { background-image: linear-gradient(var(--rule-2) 1px, transparent 1px), linear-gradient(90deg, var(--rule-2) 1px, transparent 1px); background-size: 14px 14px; }
.p-dots::before { background-image: radial-gradient(var(--rule-2) 1.1px, transparent 1.2px); background-size: 12px 12px; }
.p-arcs::before { background-image: repeating-radial-gradient(circle at 50% 120%, transparent 0 12px, var(--rule-2) 12px 13px); }
.p-wave::before { background-image: repeating-linear-gradient(-45deg, var(--rule-2) 0 1px, transparent 1px 10px); }

/* Photo de fiche : recouvre la trame quand une image est fournie.
   Si l'image manque (onerror retire .has-photo), la trame réapparaît. */
.plate-photo {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  background: var(--paper-2);
  transition: transform 0.5s var(--e, ease);
}
.plate.has-photo::before { opacity: 0; }          /* trame masquée sous la photo */
.plate.has-photo .plate-icon { display: none; }   /* pas d'icône géante sur la photo */
.plate.has-photo .plate-num {
  z-index: 2; color: #fff; opacity: 0.92;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.plate .plate-badge { z-index: 2; }                /* badge au-dessus de la photo */
.card:hover .plate-photo { transform: scale(1.045); }

/* Crédit photo sous l'image de la fiche */
.photo-credit {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--ink-3);
  text-align: right;
}
.photo-credit a { color: var(--ink-3); text-decoration: underline; text-underline-offset: 2px; }
.photo-credit a:hover { color: var(--accent); }

.card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.card-type {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3);
}
.card-title {
  font-family: var(--serif); font-size: 1.1875rem; font-weight: 600;
  margin-top: 7px; line-height: 1.2;
  transition: color var(--t);
}
.card-place {
  display: flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: 0.8125rem; color: var(--ink-2);
}
.card-place svg { color: var(--ink-3); flex: none; }
.card-resume {
  margin-top: 12px; font-size: 0.875rem; line-height: 1.6; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: auto; padding-top: 16px;
}
.card-meta { display: flex; align-items: center; gap: 10px; font-size: 0.75rem; color: var(--ink-3); }

/* ---------- Étiquettes ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  font-size: 0.6875rem;
  color: var(--ink-2);
  white-space: nowrap;
}
.tag--accent { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tag--ink { border-color: var(--ink); background: var(--ink); color: var(--paper); }

.budget { font-family: var(--mono); font-size: 0.6875rem; letter-spacing: 0.04em; }
.budget b { color: var(--ink); font-weight: 600; }

/* ---------- Une (sélection éditoriale) ---------- */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border: 1px solid var(--ink);
  background: var(--card);
}
/* La trame occupe toute la hauteur de la colonne : on neutralise le
   ratio et le filet hérités de .plate. */
.feature-plate {
  position: relative;
  aspect-ratio: auto;
  height: 100%;
  min-height: 320px;
  border-right: 1px solid var(--ink);
  border-bottom: none;
}
.feature-body { padding: clamp(26px, 3.4vw, 44px); display: flex; flex-direction: column; }
.feature-body h3 {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  margin-top: 14px;
}
.feature-body .lead { margin-top: 16px; }
.feature-list {
  margin: 26px 0 0; padding: 0; list-style: none;
  border-top: 1px solid var(--rule);
}
.feature-list li {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
}
.feature-list dt, .feature-list .k { color: var(--ink-3); }
.feature-body .btn { align-self: flex-start; margin-top: 26px; }

/* ---------- Destinations ---------- */
.regions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}
.region { background: var(--card); padding: 24px; }
.region h3 {
  font-size: 1.0625rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink);
}
.region ul { margin: 14px 0 0; padding: 0; list-style: none; }
.region li + li { margin-top: 2px; }
.region a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 5px 0;
  font-size: 0.875rem;
  color: var(--ink-2);
  transition: color var(--t);
}
.region a:hover { color: var(--accent); }
.region a em { font-style: normal; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); }

/* ---------- Chiffres ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.stat { padding: 26px 24px; border-right: 1px solid var(--rule); }
.stats > .stat:last-child { border-right: none; }
.stat b {
  display: block;
  font-family: var(--serif); font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 600; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat span { display: block; margin-top: 9px; font-size: 0.8125rem; color: var(--ink-2); }

/* ---------- Bandeau ---------- */
.band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  padding: 30px 32px;
  border: 1px solid var(--ink);
  background: var(--paper-2);
}
.band h3 { font-size: 1.375rem; }
.band p { margin-top: 8px; font-size: 0.9375rem; color: var(--ink-2); max-width: 58ch; }

/* ---------- Fil d'Ariane ---------- */
.crumb {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  padding: 18px 0;
  font-size: 0.75rem; color: var(--ink-3);
}
.crumb a { transition: color var(--t); }
.crumb a:hover { color: var(--accent); }
.crumb span[aria-current] { color: var(--ink-2); }

/* ---------- Page annuaire : filtres + résultats ---------- */
.browse {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
  padding-bottom: 80px;
}

.filters {
  position: sticky; top: calc(var(--head-h) + 24px);
  border-top: 1px solid var(--ink);
}
.filter-group { border-bottom: 1px solid var(--rule); padding: 18px 0; }
.filter-group > .kicker { margin-bottom: 12px; }
.filter-list { display: flex; flex-direction: column; gap: 1px; max-height: 262px; overflow-y: auto; }
.filter-list::-webkit-scrollbar { width: 3px; }
.filter-list::-webkit-scrollbar-thumb { background: var(--rule-2); }

.f-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%;
  padding: 6px 8px 6px 0;
  font-size: 0.8125rem;
  color: var(--ink-2);
  text-align: left;
  transition: color var(--t), background var(--t), padding var(--t);
}
.f-item:hover { color: var(--ink); background: var(--paper-2); padding-left: 8px; }
.f-item em { font-style: normal; font-family: var(--mono); font-size: 0.6875rem; color: var(--ink-3); }
.f-item.is-on { color: var(--accent); font-weight: 600; background: var(--accent-soft); padding-left: 8px; }
.f-item.is-on em { color: var(--accent); }

/* Sur mobile seulement, le panneau se replie derrière un bouton
   (voir la requête média « max-width: 720px »). */
.filters-mobile-toggle { display: none; }

.filter-reset {
  width: 100%; padding: 12px 0;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-3);
  transition: color var(--t);
}
.filter-reset:hover { color: var(--terre); }

.results-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  margin-bottom: 26px;
}
.results-count { font-size: 0.875rem; color: var(--ink-2); }
.results-count b { font-family: var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; }
.results-tools { display: flex; align-items: center; gap: 14px; }
.select {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: 7px 11px;
  font-size: 0.75rem; color: var(--ink-2);
}
.select select { border: none; background: none; font-size: 0.75rem; font-weight: 600; color: var(--ink); }
.select select:focus { outline: none; }

.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 8px 5px 11px;
  border: 1px solid var(--ink); border-radius: var(--r);
  font-size: 0.75rem;
}
.chip button { display: grid; place-items: center; color: var(--ink-3); transition: color var(--t); }
.chip button:hover { color: var(--terre); }

.empty {
  padding: 70px 30px;
  border: 1px dashed var(--rule-2);
  text-align: center;
}
.empty h3 { font-size: 1.25rem; }
.empty p { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-2); }
.empty .btn { margin-top: 22px; }

.search--inline { margin-top: 0; }
.browse-head { padding: 26px 0 34px; border-bottom: 1px solid var(--rule); margin-bottom: 34px; }
.browse-head h1 { font-size: clamp(2rem, 4.2vw, 3rem); }
.browse-head .lead { margin-top: 14px; max-width: 62ch; }

/* ---------- Fiche détaillée ---------- */
.fiche { padding-bottom: 84px; }
.fiche-head { padding: 10px 0 34px; border-bottom: 1px solid var(--ink); }
.fiche-head h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin-top: 12px; }
.fiche-head .lead { margin-top: 18px; max-width: 62ch; font-size: 1.125rem; }
.fiche-metaline {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 22px; font-size: 0.8125rem; color: var(--ink-2);
}

.fiche-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 328px;
  gap: 56px;
  align-items: start;
  padding-top: 44px;
}

.fiche-plate {
  position: relative;
  aspect-ratio: 21 / 9;
  border: 1px solid var(--rule);
  margin-bottom: 36px;
}

.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--ink-2); }
.prose > * + * { margin-top: 20px; }
.prose h2 {
  font-size: 1.5rem; color: var(--ink);
  margin-top: 40px; padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}
.prose h3 { font-size: 1.1875rem; color: var(--ink); margin-top: 32px; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 8px; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

.pull {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 22px;
  margin: 32px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.45;
  color: var(--ink);
}

.tip {
  border: 1px solid var(--rule);
  background: var(--paper-2);
  padding: 22px 24px;
  margin-top: 32px;
}
.tip .kicker { color: var(--terre); }
.tip p { margin-top: 10px; font-size: 0.9375rem; line-height: 1.65; }

/* Encadré latéral */
.aside-box { border: 1px solid var(--ink); background: var(--card); }
.aside-box + .aside-box { margin-top: 22px; }
.aside-head {
  padding: 13px 18px;
  border-bottom: 1px solid var(--ink);
  background: var(--paper-2);
}
.aside-body { padding: 6px 18px 16px; }
.info-row {
  display: grid; grid-template-columns: 92px 1fr; gap: 14px;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
}
.aside-body .info-row:last-child { border-bottom: none; }
.info-row dt, .info-row .k { color: var(--ink-3); }
.info-row dd, .info-row .v { margin: 0; color: var(--ink); }
.aside-box .btn { width: 100%; margin-top: 14px; }
.aside-note { padding: 14px 18px; font-size: 0.75rem; color: var(--ink-3); line-height: 1.55; border-top: 1px solid var(--rule); }

.aside-sticky { position: sticky; top: calc(var(--head-h) + 24px); }

/* ---------- Magazine ---------- */
.article { max-width: 720px; margin-inline: auto; padding-bottom: 80px; }
.article-head { padding: 24px 0 32px; border-bottom: 1px solid var(--ink); }
.article-head h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); margin-top: 14px; }
.article-head .lead { margin-top: 20px; font-size: 1.1875rem; }
.article-meta {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 22px; font-size: 0.75rem; color: var(--ink-3);
}
.article .prose { margin-top: 38px; }

.toc { border: 1px solid var(--rule); background: var(--paper-2); padding: 20px 24px; margin-top: 34px; }
.toc ol { margin: 12px 0 0; padding-left: 20px; font-size: 0.875rem; }
.toc li + li { margin-top: 6px; }
.toc a { color: var(--ink-2); transition: color var(--t); }
.toc a:hover { color: var(--accent); }

.mag-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.mag-item { background: var(--card); padding: 26px 24px 24px; display: flex; flex-direction: column; transition: background var(--t); }
.mag-item:hover { background: var(--paper-2); }
.mag-item:hover h3 { color: var(--accent); }
.mag-item h3 { font-size: 1.25rem; margin-top: 12px; transition: color var(--t); }
.mag-item p { margin-top: 12px; font-size: 0.875rem; color: var(--ink-2); line-height: 1.6; }
.mag-item .card-foot { padding-top: 20px; }

/* ---------- Formulaire ---------- */
.form { display: grid; gap: 20px; max-width: 620px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.field input, .field select, .field textarea {
  padding: 12px 14px;
  border: 1px solid var(--rule-2); border-radius: var(--r);
  background: var(--card);
  font-size: 0.9375rem;
  font-family: inherit;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.field-hint { font-size: 0.75rem; color: var(--ink-3); }
.form-note { font-size: 0.8125rem; color: var(--ink-3); line-height: 1.6; }

/* ---------- Contenu simple ---------- */
.page-head { padding: 34px 0 30px; border-bottom: 1px solid var(--ink); }
.page-head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin-top: 12px; }
.page-head .lead { margin-top: 16px; max-width: 62ch; }
.page-body { padding: 44px 0 80px; }
.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; align-items: start; }

/* ---------- Pied de page ---------- */
.footer { border-top: 1px solid var(--ink); background: var(--paper-2); }
.footer-top {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  padding: 52px 0 44px;
}
.footer-brand .wordmark { margin-bottom: 16px; }
.footer-brand p { font-size: 0.8125rem; color: var(--ink-2); max-width: 34ch; line-height: 1.65; }
.footer h4 {
  font-family: var(--sans); font-size: 0.6875rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: 12px; border-bottom: 1px solid var(--rule);
}
.footer ul { margin: 14px 0 0; padding: 0; list-style: none; }
.footer li + li { margin-top: 7px; }
.footer li a { font-size: 0.8125rem; color: var(--ink-2); transition: color var(--t); }
.footer li a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 20px 0 30px;
  border-top: 1px solid var(--rule);
  font-size: 0.75rem; color: var(--ink-3);
}
.footer-bottom nav { display: flex; gap: 18px; }
.footer-bottom a:hover { color: var(--accent); }

/* ---------- Retour en haut ---------- */
.to-top {
  position: fixed; right: 26px; bottom: 26px; z-index: 30;
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  transition: background var(--t), color var(--t);
}
.to-top:hover { background: var(--ink); color: var(--paper); }

/* ---------- Apparitions ---------- */
.reveal { opacity: 0; transform: translateY(10px); transition: opacity 520ms ease, transform 520ms ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Adaptatif ---------- */
@media (max-width: 1080px) {
  .rub-grid { grid-template-columns: repeat(3, 1fr); }
  .rub-grid > .rub-cell:nth-child(4n) { border-right: 1px solid var(--rule); }
  .rub-grid > .rub-cell:nth-child(3n) { border-right: none; }
  .fiche-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 40px; }
  .browse { grid-template-columns: 210px minmax(0, 1fr); gap: 30px; }
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .feature { grid-template-columns: 1fr; }
  .feature-plate { border-right: none; border-bottom: 1px solid var(--ink); min-height: 200px; aspect-ratio: 16 / 9; }
  .regions, .mag-list { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--rule); }
  .fiche-grid, .two-col { grid-template-columns: 1fr; gap: 40px; }
  .aside-sticky { position: static; }

  /* Ancrée sous l'entête plutôt qu'à une distance fixe du haut :
     le bandeau supérieur décale l'entête tant qu'on n'a pas défilé. */
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 39;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--ink);
    padding: 6px 0 14px;
    transform: translateY(-8px);
    opacity: 0; pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: 13px var(--gutter); border-bottom: 1px solid var(--rule); font-size: 0.9375rem; }
  .nav a::after { display: none; }
  .nav a.is-active { color: var(--accent); }
  .nav-toggle { display: grid; }
  .head-actions .btn--solid { display: none; }
}

@media (max-width: 720px) {
  .rub-grid { grid-template-columns: repeat(2, 1fr); }
  .rub-grid > .rub-cell:nth-child(3n) { border-right: 1px solid var(--rule); }
  .rub-grid > .rub-cell:nth-child(2n) { border-right: none; }
  .browse { grid-template-columns: 1fr; }
  .filters { position: static; border-top: none; }
  .filters-panel { display: none; }
  .filters-panel.is-open { display: block; }
  .filters-mobile-toggle { display: flex; }
  .cards { grid-template-columns: 1fr; }
  .cards--3 { grid-template-columns: 1fr; }
  .topbar-meta .topbar-edition { display: none; }
  .band { padding: 24px 22px; }
}

@media (max-width: 560px) {
  .regions, .mag-list, .footer-top { grid-template-columns: 1fr; }
  .rub-grid { grid-template-columns: 1fr; }
  .rub-grid > .rub-cell { border-right: none !important; }
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stats > .stat:last-child { border-bottom: none; }
  .search input { padding: 13px 12px; }
  .search button { padding: 0 16px; }
}

/* ---------- Impression ---------- */
@media print {
  .topbar, .masthead, .footer, .to-top, .filters, .band { display: none !important; }
  body { background: #fff; color: #000; }
  .fiche-grid { grid-template-columns: 1fr; }
}
