@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}
@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 700;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --accent: #6E5536;
  --encre: #FFFFFF;
  --fond: #F4F3F0;
  --surface: #FFFFFF;
  --surface-2: #EAE8E3;
  --texte: #161616;
  --texte-2: #555452;
  --bordure: #D6D3CC;
  --bordure-forte: #7E7C78;
  --lien: #161616;
  --ok: #1B6B3A;
  --alerte-fond: #F3ECE0;
  --alerte-bord: #6E5536;
  --police: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --police-titre: "Oswald", "Arial Narrow", "Helvetica Neue Condensed", sans-serif;
  --police-marque: "Instrument Serif", "Didot", "Bodoni 72", Georgia, serif;
  --rayon: 2px;
  --cible: 44px;
  --nav-basse: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="systeme"] { --accent: #D8C3A0; --encre: #1A1A1A; --fond: #222222; --surface: #2A2A2A; --surface-2: #333333; --texte: #F5F5F3; --texte-2: #ABABAB; --bordure: #3E3E3E; --bordure-forte: #8C8C8C; --lien: #F5F5F3; --ok: #7BD3A0; --alerte-fond: #302B24; --alerte-bord: #D8C3A0; color-scheme: dark; }
}
:root[data-theme="sombre"] { --accent: #D8C3A0; --encre: #1A1A1A; --fond: #222222; --surface: #2A2A2A; --surface-2: #333333; --texte: #F5F5F3; --texte-2: #ABABAB; --bordure: #3E3E3E; --bordure-forte: #8C8C8C; --lien: #F5F5F3; --ok: #7BD3A0; --alerte-fond: #302B24; --alerte-bord: #D8C3A0; color-scheme: dark; }

html { font-size: 100%; -webkit-text-size-adjust: 100%; }
html[data-taille="0"] { font-size: 93.75%; }
html[data-taille="2"] { font-size: 112.5%; }
html[data-taille="3"] { font-size: 125%; }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-family: var(--police); font-size: 1rem; line-height: 1.55; color: var(--texte); background: var(--fond); overflow-wrap: break-word; }
img, svg, video { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-family: var(--police-marque); font-size: 2.25rem; font-weight: 400; line-height: 1.08; letter-spacing: 0; }
h2 { font-family: var(--police-titre); font-size: 1.15rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-top: 2.25rem; }
h3 { font-size: 1.05rem; font-weight: 650; letter-spacing: -.005em; }
p { margin: 0 0 .8rem; }
a { color: var(--lien); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 3px; }
ul, ol { padding-left: 1.3rem; margin: 0 0 .8rem; }
small, .petit { font-size: .875rem; color: var(--texte-2); }
.sr-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
h1:focus { outline: none; }

.lien-evitement { position: absolute; left: .5rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--encre); padding: .6rem 1rem; border: 0; border-radius: var(--rayon); font: inherit; font-weight: 650; min-height: var(--cible); }
.lien-evitement:focus { top: .5rem; }

/* Disposition */
.app { min-height: 100vh; }
.colonne { padding-bottom: calc(var(--nav-basse) + env(safe-area-inset-bottom) + 1rem); }
main { padding: 1rem 1rem 2rem; max-width: 52rem; margin: 0 auto; }
.pied { text-align: center; color: var(--texte-2); font-size: .8125rem; padding: 0 1rem 1rem; }

.nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--bordure); padding-bottom: env(safe-area-inset-bottom); }
.nav .marque { display: none; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-around; }
.nav li { flex: 1; min-width: 0; }
.nav li.secondaire { display: none; }
.nav a, .nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--nav-basse); width: 100%; padding: .25rem; font: inherit; font-family: var(--police-titre); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--texte-2); background: none; border: 0; border-top: 3px solid transparent; text-decoration: none; cursor: pointer; }
.nav a[aria-current="page"] { color: var(--texte); border-top-color: var(--accent); }
.nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 900px) {
  .colonne { margin-left: 15rem; padding-bottom: 1rem; }
  main { padding: 2rem 2.5rem 3rem; }
  .nav { top: 0; right: auto; bottom: 0; width: 15rem; border-top: 0; border-right: 1px solid var(--bordure); padding: 1.25rem .75rem; overflow-y: auto; }
  .nav .marque { display: block; padding: .5rem .75rem 1.5rem; }
  .nav .marque-nom { display: block; font-family: var(--police-marque); font-size: 1.85rem; line-height: .95; text-transform: uppercase; color: var(--texte); }
  .nav .marque-par { display: block; margin-top: .45rem; font-family: var(--police-titre); font-size: .75rem; font-weight: 400; text-transform: uppercase; letter-spacing: .12em; color: var(--texte-2); }
  .nav ul { flex-direction: column; justify-content: flex-start; gap: .125rem; }
  .nav li.secondaire { display: block; }
  .nav li.plus { display: none; }
  .nav a, .nav button { flex-direction: row; justify-content: flex-start; gap: .75rem; min-height: var(--cible); font-size: .95rem; padding: .5rem .75rem; border-top: 0; border-left: 3px solid transparent; border-radius: 0 var(--rayon) var(--rayon) 0; }
  .nav a[aria-current="page"] { border-left-color: var(--accent); background: var(--surface-2); }
  .nav a:hover { background: var(--surface-2); }
}
@media (min-width: 1200px) { main { max-width: 56rem; } h1 { font-size: 2.75rem; } }

/* Composants */
button, .bouton { font: inherit; }
.bouton, button.bouton { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: var(--cible); padding: .5rem 1rem; border-radius: var(--rayon); border: 1.5px solid var(--bordure-forte); background: var(--surface); color: var(--texte); font-family: var(--police-titre); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; font-size: .9rem; cursor: pointer; text-decoration: none; }
.bouton:hover { border-color: var(--texte); }
.bouton[aria-pressed="true"] { background: var(--surface-2); border-color: var(--texte); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: var(--encre); }
.bouton.principal:hover { filter: brightness(.95); }
.bouton.danger { border-color: #B3261E; color: #B3261E; }
:root[data-theme="sombre"] .bouton.danger { color: #FF8A80; border-color: #FF8A80; }
@media (prefers-color-scheme: dark) { :root[data-theme="systeme"] .bouton.danger { color: #FF8A80; border-color: #FF8A80; } }
.bouton[disabled], .bouton[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }

input[type="search"], input[type="text"], select, textarea { font: inherit; color: var(--texte); background: var(--surface); border: 1.5px solid var(--bordure-forte); border-radius: var(--rayon); padding: .5rem .75rem; min-height: var(--cible); width: 100%; }
textarea { min-height: 8rem; line-height: 1.5; resize: vertical; }
label { font-weight: 600; font-size: .9375rem; }
.champ { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .75rem; }

.recherche-form { display: flex; gap: .5rem; }
.recherche-form input { flex: 1; }

.badges { display: flex; flex-wrap: wrap; gap: .375rem; margin: .25rem 0 .75rem; padding: 0; list-style: none; }
.badge { display: inline-flex; align-items: center; min-height: 1.6rem; padding: 0 .6rem; border-radius: var(--rayon); background: var(--surface-2); color: var(--texte); font-size: .8125rem; font-weight: 600; border: 1px solid var(--bordure); }
.badge.accent { background: var(--accent); border-color: var(--accent); color: var(--encre); }
.badge.attention { background: var(--alerte-fond); border-color: var(--alerte-bord); }

.cartes { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .75rem; }
.carte { position: relative; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .9rem 1rem; }
.carte h3 { margin-bottom: .25rem; }
.carte a.etire { text-decoration: none; }
.carte a.etire::after { content: ""; position: absolute; inset: 0; }
.carte:hover { border-color: var(--texte); }
.carte p { margin: 0 0 .4rem; color: var(--texte-2); font-size: .9375rem; }
.carte .badges { margin-bottom: 0; }
.carte.indisponible { opacity: .75; border-style: dashed; }
@media (min-width: 700px) { .cartes.grille { grid-template-columns: 1fr 1fr; } }

.vide { background: var(--surface-2); border-radius: var(--rayon); padding: 1rem; color: var(--texte-2); }
.encart { background: var(--alerte-fond); border-left: 4px solid var(--accent); border-radius: 0 var(--rayon) var(--rayon) 0; padding: .75rem 1rem; margin: 0 0 1rem; }
.encart > :last-child { margin-bottom: 0; }

#bandeaux .bandeau { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: var(--accent); color: var(--encre); font-weight: 600; }
#bandeaux .bandeau.info { background: var(--surface-2); color: var(--texte); font-weight: 500; border-bottom: 1px solid var(--bordure); }
#bandeaux .bandeau button { background: var(--texte); color: var(--fond); border: 0; border-radius: var(--rayon); min-height: var(--cible); padding: 0 1rem; font-weight: 700; cursor: pointer; }
#bandeaux .bandeau.info button { background: none; color: var(--texte); border: 1.5px solid var(--bordure-forte); }

.fil { font-size: .875rem; margin-bottom: .5rem; }
.fil a { color: var(--texte-2); }

/* Fiche */
.fiche h1 { margin-bottom: .5rem; }
.fiche .resume { font-size: 1.125rem; color: var(--texte); }
.sommaire { display: flex; flex-wrap: wrap; gap: .375rem; margin: 1rem 0; padding: 0; list-style: none; }
.sommaire button { min-height: var(--cible); padding: 0 .9rem; border-radius: var(--rayon); border: 1px solid var(--bordure-forte); background: var(--surface); color: var(--texte); font: inherit; font-size: .9rem; cursor: pointer; }
.bloc { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .9rem 1rem; margin: 0 0 1rem; }
.bloc h3 { margin-top: 0; }
.bloc > :last-child { margin-bottom: 0; }
.etapes { list-style: none; padding: 0; counter-reset: etape; }
.etape { counter-increment: etape; background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); padding: .9rem 1rem 1rem 3.4rem; margin-bottom: .75rem; position: relative; }
.etape::before { content: counter(etape); position: absolute; left: .85rem; top: .85rem; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--accent); color: var(--encre); font-family: var(--police-titre); font-weight: 600; display: grid; place-items: center; }
.etape h3 { margin-bottom: .35rem; }
.menu { display: inline-block; font-weight: 600; background: var(--surface-2); border-radius: var(--rayon); padding: .1rem .5rem; margin-bottom: .5rem; }
.pourquoi { color: var(--texte-2); font-size: .9375rem; }
.pourquoi strong { color: var(--texte); }
.attention { background: var(--alerte-fond); border-left: 3px solid var(--accent); padding: .5rem .75rem; border-radius: 0 var(--rayon) var(--rayon) 0; font-size: .9375rem; margin: .5rem 0 0; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; background: var(--surface-2); border-radius: var(--rayon); padding: .05rem .35rem; }
kbd { display: inline-block; font-family: inherit; font-size: .85em; font-weight: 650; background: var(--surface-2); border: 1px solid var(--bordure-forte); border-bottom-width: 2px; border-radius: var(--rayon); padding: 0 .4rem; margin: 0 .1rem; }
.tableau-defile { overflow-x: auto; margin: .5rem 0 1rem; }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--bordure); vertical-align: top; }
th { font-weight: 700; color: var(--texte-2); font-size: .8125rem; text-transform: none; }
dl.erreurs dt { font-weight: 700; margin-top: .75rem; }
dl.erreurs dd { margin: .15rem 0 0; }
.verification { border-top: 2px solid var(--bordure); margin-top: 2rem; padding-top: 1rem; }
.verification ul { margin-bottom: .5rem; }
details.a-venir { margin: 1rem 0; color: var(--texte-2); font-size: .9rem; }
details.a-venir summary { cursor: pointer; min-height: var(--cible); display: flex; align-items: center; }
.note textarea { min-height: 7rem; }
.statut-note { min-height: 1.4rem; font-size: .875rem; color: var(--texte-2); }

/* Comparateur */
.cmp { margin: 1rem 0 1.5rem; }
.cmp-viewport { position: relative; border-radius: var(--rayon); overflow: hidden; border: 1px solid var(--bordure); background: var(--surface-2); }
.cmp.zoom .cmp-viewport { overflow: auto; max-height: 75vh; overscroll-behavior: contain; }
.cmp-scene { position: relative; width: 100%; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; line-height: 0; }
.cmp.zoom .cmp-scene { width: 200%; }
.cmp-scene img { display: block; width: 100%; height: auto; max-width: none; pointer-events: none; -webkit-user-drag: none; }
.cmp-scene img.apres { position: absolute; inset: 0; height: 100%; }
.cmp-etiquette { position: absolute; top: .5rem; padding: .15rem .6rem; border-radius: var(--rayon); font-family: var(--police-titre); font-size: .8125rem; font-weight: 500; text-transform: uppercase; letter-spacing: .05em; line-height: 1.5; background: rgba(18,18,19,.82); color: #fff; pointer-events: none; }
.cmp-etiquette.g { left: .5rem; }
.cmp-etiquette.d { right: .5rem; }
.cmp-poignee { position: absolute; top: 0; bottom: 0; width: var(--cible); transform: translateX(-50%); cursor: ew-resize; touch-action: none; display: flex; justify-content: center; }
.cmp-poignee::before { content: ""; width: 3px; height: 100%; background: #fff; box-shadow: 0 0 0 1px rgba(18,18,19,.55); }
.cmp-poignee::after { content: "⇆"; position: absolute; top: 50%; left: 50%; width: 2.75rem; height: 2.75rem; transform: translate(-50%, -50%); border-radius: 50%; background: var(--accent); color: var(--encre); display: grid; place-items: center; font-size: 1.25rem; line-height: 1; font-weight: 800; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.4); }
.cmp-poignee:focus-visible { outline: none; }
.cmp-poignee:focus-visible::after { box-shadow: 0 0 0 3px #fff, 0 0 0 7px #161616; }
.cmp-poignee:focus-visible::before { box-shadow: 0 0 0 2px #161616; }
.cmp-outils { display: flex; flex-wrap: wrap; gap: .5rem; margin: .6rem 0; }
.cmp figcaption { font-size: .9375rem; }
.cmp .modifs { margin: .4rem 0 0; }
.cmp .credit { font-size: .8125rem; color: var(--texte-2); }

/* Vidéo */
.video { background: var(--surface); border: 1px solid var(--bordure); border-radius: var(--rayon); overflow: hidden; margin: 0 0 1rem; }
.video-zone { position: relative; aspect-ratio: 16 / 9; background: #1C1C1F; display: grid; place-items: center; }
.video-zone iframe, .video-zone video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.video-zone .bouton { position: relative; }
.video-zone .vignette { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-infos { padding: .75rem 1rem; }
.video-infos h3 { margin: 0 0 .25rem; }
.video-infos dl { display: grid; grid-template-columns: auto 1fr; gap: .1rem .75rem; margin: .5rem 0; font-size: .9rem; }
.video-infos dt { color: var(--texte-2); }
.video-infos dd { margin: 0; }
.video-message { margin: .5rem 0 0; }

/* Dialogue */
dialog { border: 1px solid var(--bordure-forte); border-radius: var(--rayon); background: var(--surface); color: var(--texte); padding: 1.25rem; max-width: min(34rem, calc(100vw - 2rem)); width: 100%; }
dialog::backdrop { background: rgba(18,18,19,.6); }
dialog h2 { margin-top: 0; font-size: 1.1rem; }
dialog .actions { justify-content: flex-end; }
dialog ul.liens { list-style: none; padding: 0; }
dialog ul.liens a { display: flex; align-items: center; min-height: var(--cible); }

.choix { border: 0; padding: 0; margin: 0 0 1rem; }
.choix legend { font-family: var(--police-titre); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; padding: 0; margin-bottom: .4rem; }
.choix .options { display: flex; flex-wrap: wrap; gap: .5rem; }
.choix label { display: inline-flex; align-items: center; gap: .5rem; min-height: var(--cible); padding: 0 .9rem; border: 1.5px solid var(--bordure-forte); border-radius: var(--rayon); background: var(--surface); font-weight: 600; cursor: pointer; }
.choix input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.choix label:has(input:checked) { border-color: var(--texte); background: var(--surface-2); }
.choix label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
dl.etat { display: grid; grid-template-columns: 1fr; gap: .1rem; margin: 0; }
dl.etat dt { font-weight: 700; margin-top: .6rem; }
dl.etat dd { margin: 0; color: var(--texte-2); }
@media (min-width: 600px) { dl.etat { grid-template-columns: 14rem 1fr; gap: .5rem 1rem; } dl.etat dt { margin-top: 0; } }

.filtres summary { cursor: pointer; min-height: var(--cible); display: flex; align-items: center; font-weight: 650; }
.filtres .grille-filtres { display: grid; gap: .5rem .75rem; grid-template-columns: 1fr; padding-bottom: .5rem; }
@media (min-width: 600px) { .filtres .grille-filtres { grid-template-columns: 1fr 1fr 1fr; } }
.resume-recherche { margin: .75rem 0 .5rem; color: var(--texte-2); }
.trouve-dans { font-size: .8125rem; color: var(--texte-2); }

.progression { height: .5rem; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .4rem 0; border: 1px solid var(--bordure); }
.progression > span { display: block; height: 100%; background: var(--accent); }
.liste-etapes { list-style: none; padding: 0; margin: 0 0 1rem; }
.liste-etapes li { display: flex; gap: .5rem; align-items: center; min-height: var(--cible); border-bottom: 1px solid var(--bordure); }
.liste-etapes .a-venir { color: var(--texte-2); }
.table-roadmap td:first-child { width: 100%; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .nav, #bandeaux, .actions, .pied { display: none !important; } .colonne { margin: 0; } }
[hidden] { display: none !important; }

summary { cursor: pointer; min-height: var(--cible); display: flex; align-items: center; }
