/* ECIA Ingénieurs Conseils — feuille de style
   Principe : une planche d'ingénieur. Papier, encre, le bleu du logo (#003FFF),
   des cotes, des cartouches, des coupes. Aucun effet gratuit. */

:root {
  --papier: #F4F1EA;
  --papier-clair: #FBF9F5;
  --papier-fonce: #E9E4D8;
  --encre: #121316;
  --encre-2: #33363D;
  --gris: #6B675E;
  --gris-2: #8F897D;
  --trait: #D6CFBF;
  --trait-fort: #B3AB99;
  --bleu: #003FFF;
  --bleu-fonce: #0030C2;
  --bleu-pale: #DDE5FF;
  --nuit: #0B1430;
  --nuit-2: #121E44;
  --nuit-trait: #2B3866;
  --nuit-texte: #C9CFE3;
  --laterite: #B4532A;
  --sable: #EADFC8;

  --f-sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --marge: clamp(16px, 4vw, 48px);
  --max: 1320px;
  --entete: 68px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--entete) + 12px); }
body {
  margin: 0;
  background: var(--papier);
  color: var(--encre);
  font: 400 1.0625rem/1.62 var(--f-sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
a, button, summary, [role="button"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
ul, ol { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }
::selection { background: var(--bleu); color: #fff; }
:focus-visible { outline: 2px solid var(--bleu); outline-offset: 3px; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.evitement { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--encre); color: var(--papier); padding: 10px 14px; text-decoration: none; }
.evitement:focus { top: 12px; }

.conteneur { width: 100%; max-width: calc(var(--max) + 2 * var(--marge)); margin: 0 auto; padding: 0 var(--marge); }
.grille { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); }

/* ---------- Typographie ---------- */
.mono { font-family: var(--f-mono); font-size: .75rem; line-height: 1.45; letter-spacing: .06em; text-transform: uppercase; font-weight: 400; }
.titre-xl { font-weight: 800; font-stretch: 70%; font-size: clamp(3rem, 1.1rem + 7.6vw, 8.4rem); line-height: .86; letter-spacing: -.012em; }
.titre-l { font-weight: 780; font-stretch: 72%; font-size: clamp(2.2rem, 1.25rem + 3.6vw, 4.4rem); line-height: .93; letter-spacing: -.008em; }
.titre-m { font-weight: 720; font-stretch: 78%; font-size: clamp(1.55rem, 1.15rem + 1.25vw, 2.3rem); line-height: 1.02; letter-spacing: -.004em; }
.titre-s { font-weight: 680; font-stretch: 84%; font-size: 1.3rem; line-height: 1.12; }
.chapo { font-size: clamp(1.12rem, 1rem + .5vw, 1.38rem); line-height: 1.5; color: var(--encre-2); }
.bleu { color: var(--bleu); }
.gris { color: var(--gris); }
.texte p { max-width: 64ch; color: var(--encre-2); }

/* ---------- Boutons et liens ---------- */
.bouton {
  display: inline-flex; align-items: center; gap: .6em;
  min-height: 48px; padding: 0 1.25em;
  border: 1px solid var(--encre); background: var(--encre); color: var(--papier);
  font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.bouton:hover { background: var(--bleu); border-color: var(--bleu); color: #fff; }
.bouton--clair { background: transparent; color: var(--encre); }
.bouton--clair:hover { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.bouton .fleche { transition: transform .25s var(--ease); }
.bouton:hover .fleche { transform: translateX(4px); }
.lien {
  display: inline-flex; align-items: center; gap: .45em; padding: 0; border: 0; background: none; cursor: pointer;
  font-weight: 600; color: var(--encre); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .28em;
}
.lien:hover { color: var(--bleu); }

/* ---------- En-tête ---------- */
.entete { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--trait); }
/* le flou est porté par un pseudo-élément : sur l'en-tête lui-même, il enfermerait le menu mobile (position fixe) */
.entete::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--papier) 90%, transparent); -webkit-backdrop-filter: saturate(140%) blur(10px); backdrop-filter: saturate(140%) blur(10px); }
.menu-ouvert { overflow: hidden; }
.menu-ouvert .entete::before { background: var(--papier); }
.entete-in { display: flex; align-items: center; gap: 10px; height: var(--entete); }
@media (min-width: 980px) { .entete-in { gap: 24px; } }
.entete-logo { display: block; flex: none; }
.entete-logo img { height: 46px; width: auto; }
.nav { display: none; margin-left: auto; }
.nav ul { display: flex; gap: clamp(14px, 2vw, 30px); }
.nav a { position: relative; text-decoration: none; font-weight: 550; font-size: .96rem; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.entete-tel { display: none; text-decoration: none; white-space: nowrap; }
.entete-tel:hover { color: var(--bleu); }
.entete .bouton { display: none; min-height: 40px; }
.entete-appel { margin-left: auto; width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--encre); background: var(--encre); color: var(--papier); }
.entete-appel svg { width: 18px; height: 18px; }
.burger { margin-left: 0; width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--encre); background: transparent; cursor: pointer; }
.burger span, .burger span::before, .burger span::after { display: block; width: 18px; height: 1.5px; background: var(--encre); position: relative; transition: transform .3s var(--ease), background .2s; }
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; } .burger span::after { top: 6px; }
.menu-ouvert .burger span { background: transparent; }
.menu-ouvert .burger span::before { transform: translateY(6px) rotate(45deg); }
.menu-ouvert .burger span::after { transform: translateY(-6px) rotate(-45deg); }
.menu-mobile { display: none; }
.menu-ouvert .menu-mobile {
  display: flex; flex-direction: column; position: fixed; inset: var(--entete) 0 0 0; z-index: 49;
  background: var(--papier); padding: 28px var(--marge) 40px; overflow-y: auto; border-top: 1px solid var(--trait);
}
.menu-mobile a.grand { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--trait); text-decoration: none; font-weight: 750; font-stretch: 75%; font-size: 2.1rem; line-height: 1.05; }
.menu-mobile a.grand .mono { color: var(--gris); }
.menu-mobile .menu-contact { margin-top: auto; padding-top: 28px; display: grid; gap: 6px; }
.menu-mobile .menu-contact a { text-decoration: none; font-size: 1.1rem; }

@media (min-width: 980px) {
  .nav { display: block; }
  .burger, .entete-appel { display: none; }
  .entete-tel { display: inline-block; }
}
@media (min-width: 1180px) { .entete .bouton { display: inline-flex; } }

/* ---------- Cote (ligne de dimension) ---------- */
.cote { position: relative; display: flex; align-items: center; justify-content: center; height: 30px; color: var(--encre); }
.cote::before, .cote::after { content: ""; position: absolute; top: 3px; bottom: 3px; width: 1px; background: currentColor; }
.cote::before { left: 0; } .cote::after { right: 0; }
.cote-trait { position: absolute; left: 1px; right: 1px; top: 50%; height: 1px; background: currentColor; transform-origin: center; }
.cote-trait::before, .cote-trait::after { content: ""; position: absolute; top: -3.5px; border-style: solid; }
.cote-trait::before { left: 0; border-width: 4px 9px 4px 0; border-color: transparent currentColor transparent transparent; }
.cote-trait::after { right: 0; border-width: 4px 0 4px 9px; border-color: transparent transparent transparent currentColor; }
.cote-texte { position: relative; padding: 0 12px; background: var(--papier); white-space: nowrap; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
.anime .cote-trait { transform: scaleX(0); transition: transform 1.1s var(--ease) .15s; }
.anime .cote-texte { opacity: 0; transition: opacity .6s .7s; }
.anime.vu .cote-trait { transform: scaleX(1); }
.anime.vu .cote-texte { opacity: 1; }

/* ---------- Cartouche (bloc-titre de plan) ---------- */
.cartouche { background: var(--papier-clair); border: 1px solid var(--encre); color: var(--encre); }
.cartouche dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--trait-fort); }
.cartouche dl > div { padding: 9px 12px 10px; background: var(--papier-clair); min-width: 0; }
.cartouche dl > div.large { grid-column: 1 / -1; }
.cartouche dt { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); margin-bottom: 2px; }
.cartouche dd { font-size: .92rem; line-height: 1.3; font-weight: 550; }

/* ---------- Héros ---------- */
.hero { padding: clamp(28px, 5vw, 64px) 0 0; }
.hero-sur { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--gris); margin-bottom: clamp(18px, 3vw, 34px); }
.hero-sur span + span::before { content: "/"; margin-right: 18px; color: var(--trait-fort); }
.hero h1 { max-width: 13ch; }
.hero h1 .ligne { display: block; }
.hero-bas { margin-top: clamp(22px, 3.6vw, 44px); row-gap: 22px; align-items: end; }
.hero-chapo { grid-column: 1 / -1; margin: 0; }
.hero-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; }
@media (min-width: 900px) {
  .hero-chapo { grid-column: 1 / span 7; }
  .hero-actions { grid-column: 9 / span 4; justify-content: flex-end; }
}
.hero-figure { position: relative; margin: clamp(34px, 5vw, 60px) 0 0; }
.hero-figure .cote { margin-bottom: 10px; }
.hero-photo { position: relative; overflow: hidden; background: var(--papier-fonce); aspect-ratio: 4 / 3; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 78%; }
@media (min-width: 700px) { .hero-photo { aspect-ratio: 16 / 8; } }
@media (min-width: 1100px) { .hero-photo { aspect-ratio: 21 / 9; } }
.hero-figure .cartouche { margin-top: -1px; }
@media (min-width: 900px) {
  .hero-figure .cartouche { position: absolute; right: 0; bottom: 0; width: min(460px, 46%); margin: 0; border-right: 0; border-bottom: 0; }
}

/* ---------- Règle graduée (chiffres) ---------- */
.regle { margin-top: clamp(40px, 6vw, 72px); border-top: 1px solid var(--encre); }
.regle-grille { display: grid; grid-template-columns: 1fr 1fr; }
.regle-item { padding: 22px 16px 18px 0; border-bottom: 1px solid var(--trait); }
.regle-item:nth-child(2n) { padding-left: 16px; border-left: 1px solid var(--trait); }
.regle-val { display: block; font-weight: 800; font-stretch: 70%; font-size: clamp(2.6rem, 1.6rem + 4vw, 5.6rem); line-height: .88; letter-spacing: -.01em; }
.regle-val small { font-size: .42em; font-stretch: 85%; font-weight: 700; margin-left: .12em; letter-spacing: 0; }
.regle-leg { display: block; margin-top: 10px; color: var(--gris); max-width: 30ch; }
.regle-graduations { height: 18px; background:
  repeating-linear-gradient(to right, var(--encre) 0 1px, transparent 1px 100px) left bottom / 100% 18px no-repeat,
  repeating-linear-gradient(to right, var(--encre) 0 1px, transparent 1px 50px) left bottom / 100% 11px no-repeat,
  repeating-linear-gradient(to right, var(--trait-fort) 0 1px, transparent 1px 10px) left bottom / 100% 6px no-repeat; border-bottom: 1px solid var(--encre); }
@media (min-width: 900px) {
  .regle-grille { grid-template-columns: repeat(4, 1fr); }
  .regle-item { border-bottom: 0; padding: 28px 20px 22px 0; }
  .regle-item + .regle-item { padding-left: 20px; border-left: 1px solid var(--trait); }
}

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) 0 0; }
.section-tete { border-top: 1px solid var(--encre); padding-top: 14px; margin-bottom: clamp(28px, 4vw, 56px); }
.section-tete .reperes { display: flex; gap: 18px; color: var(--gris); margin-bottom: clamp(18px, 2.6vw, 30px); }
.section-tete .reperes b { color: var(--encre); font-weight: 500; }
.section-tete h2 { max-width: 19ch; }
.section-tete .chapo { margin-top: 20px; max-width: 56ch; }
.section-tete--double { display: grid; row-gap: 18px; }
@media (min-width: 980px) {
  .section-tete--double { grid-template-columns: 7fr 5fr; column-gap: 28px; align-items: end; }
  .section-tete--double .chapo { margin: 0; }
}

/* ---------- 01 L'entreprise ---------- */
.entreprise { row-gap: 36px; }
.entreprise-texte { grid-column: 1 / -1; }
.entreprise-texte .grand { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.85rem); line-height: 1.38; font-weight: 450; color: var(--encre); max-width: 34ch; margin-bottom: 1.1em; text-wrap: pretty; }
.entreprise-texte .grand::first-letter { color: var(--bleu); }
.entreprise-signal { grid-column: 1 / -1; align-self: start; }
.entreprise-signal .mono.titre { display: block; margin-bottom: 10px; color: var(--gris); }
@media (min-width: 980px) {
  .entreprise-texte { grid-column: 1 / span 7; }
  .entreprise-signal { grid-column: 9 / span 4; position: sticky; top: calc(var(--entete) + 24px); }
}

/* ---------- 02 Domaines ---------- */
.domaines { border-top: 1px solid var(--encre); counter-reset: dom; }
.domaine { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 14px; padding: 26px 0 28px; border-bottom: 1px solid var(--trait); position: relative; transition: background .25s; }
.domaine-num { color: var(--gris); padding-top: .45em; }
.domaine-texte h3 { margin-bottom: 10px; }
.domaine-texte p { color: var(--encre-2); max-width: 54ch; margin-bottom: 10px; }
.domaine-ex { color: var(--gris); text-transform: none; letter-spacing: .01em; font-size: .78rem; }
.domaine-dessin { grid-column: 2; width: 100%; max-width: 300px; height: auto; color: var(--encre); }
.domaine-dessin .a { color: var(--bleu); }
.domaine-dessin text[fill="#003FFF"] { fill: var(--bleu); }
.domaine-compte { grid-column: 2; display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; justify-self: start; }
.domaine-compte .n { font-weight: 800; font-stretch: 70%; font-size: 2.6rem; line-height: 1; }
.domaine-compte .mono { color: var(--encre); border-bottom: 1px solid currentColor; }
.domaine-compte:hover .mono, .domaine-compte:hover .n { color: var(--bleu); }
@media (min-width: 900px) {
  .domaine { grid-template-columns: 64px minmax(0, 1fr) 260px 150px; column-gap: 28px; align-items: center; padding: 34px 0; }
  .domaine-dessin { grid-column: 3; grid-row: 1; }
  .domaine-compte { grid-column: 4; grid-row: 1; flex-direction: column; gap: 4px; justify-self: end; align-items: flex-end; }
  .domaine-compte .n { font-size: 3.4rem; }
  .domaine:hover { background: var(--papier-clair); }
  .domaine:hover .domaine-dessin { color: var(--encre); }
}
.domaine-dessin path, .domaine-dessin line, .domaine-dessin rect, .domaine-dessin circle, .domaine-dessin polyline, .domaine-dessin polygon { vector-effect: non-scaling-stroke; }
.anime .domaine-dessin .trace { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease) .2s; }
.anime.vu .domaine-dessin .trace { stroke-dashoffset: 0; }

/* ---------- 03 Phases ---------- */
.phases { display: grid; gap: 0; position: relative; }
.phase { position: relative; padding: 0 0 28px 34px; }
.phase::before { content: ""; position: absolute; left: 7px; top: 8px; bottom: -8px; width: 1px; background: var(--encre); }
.phase:last-child::before { display: none; }
.phase::after { content: ""; position: absolute; left: 0; top: 2px; width: 15px; height: 15px; border: 1px solid var(--encre); background: var(--papier); border-radius: 50%; }
.phase.forte::after { background: var(--bleu); border-color: var(--bleu); }
.phase .pk { display: block; color: var(--gris); margin-bottom: 6px; }
.phase h3 { font-weight: 720; font-stretch: 80%; font-size: 1.45rem; line-height: 1.05; margin-bottom: 8px; }
.phase p { color: var(--encre-2); font-size: .96rem; margin: 0; max-width: 40ch; }
@media (min-width: 980px) {
  .phases { grid-template-columns: repeat(6, 1fr); column-gap: 22px; padding-top: 0; }
  .phase { padding: 36px 0 0; }
  .phase::before { left: 0; right: -22px; top: 7px; bottom: auto; width: auto; height: 1px; }
  .phase:last-child::before { display: block; right: 0; }
  .phase::after { top: 0; }
}
.phases-bilan { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px 28px; padding-top: 16px; border-top: 1px solid var(--trait); color: var(--encre-2); }
.phases-bilan b { font-weight: 800; font-stretch: 72%; font-size: 1.6rem; color: var(--encre); margin-right: 6px; font-family: var(--f-sans); letter-spacing: 0; }

/* ---------- 04 Projets ---------- */
.projet { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 28px); row-gap: 24px; padding: clamp(40px, 6vw, 80px) 0; border-top: 1px solid var(--trait); }
.projet:first-of-type { border-top: 0; padding-top: 0; }
.projet-media { grid-column: 1 / -1; display: grid; gap: 12px; }
.projet-texte { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .projet-media { grid-column: 1 / span 7; }
  .projet-texte { grid-column: 9 / span 4; align-self: center; }
  .projet:nth-of-type(2n) .projet-media { grid-column: 6 / span 7; grid-row: 1; }
  .projet:nth-of-type(2n) .projet-texte { grid-column: 1 / span 4; grid-row: 1; }
}
.photo { margin: 0; position: relative; }
.photo .cadre { position: relative; overflow: hidden; background: var(--papier-fonce); }
.photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.photo button.cadre { display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in; }
.photo button.cadre:hover img { transform: scale(1.025); }
.photo figcaption { margin-top: 8px; color: var(--gris); text-transform: none; letter-spacing: .01em; font-size: .74rem; }
.photo .cadre.r-43 { aspect-ratio: 4 / 3; } .photo .cadre.r-169 { aspect-ratio: 16 / 9; } .photo .cadre.r-32 { aspect-ratio: 3 / 2; } .photo .cadre.r-21 { aspect-ratio: 2 / 1; }
.vignettes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vignettes--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 599px) { .vignettes--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vignettes--3 > :nth-child(3) { display: none; } }
.projet-sur { color: var(--gris); margin-bottom: 14px; }
.projet-texte h3 { margin-bottom: 16px; }
.projet-texte .cote { margin: 4px 0 20px; max-width: 100%; }
.projet-texte p { color: var(--encre-2); }
.projet-texte .cartouche { margin: 22px 0 20px; }
.etiquettes { display: flex; flex-wrap: wrap; gap: 6px; }
.etiquette { display: inline-block; padding: 4px 8px 3px; border: 1px solid var(--trait-fort); font-family: var(--f-mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--encre-2); background: transparent; }
.etiquette--bleue { border-color: var(--bleu); color: var(--bleu); }

/* ---------- 05 Carnets (défilement horizontal) ---------- */
.carnet { margin-top: clamp(56px, 7vw, 96px); }
.carnet-tete { display: flex; align-items: end; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--encre); margin-bottom: 18px; }
.carnet-tete h3 { font-weight: 720; font-stretch: 78%; font-size: clamp(1.5rem, 1.2rem + 1vw, 2.1rem); line-height: 1; }
.carnet-tete p { margin: 6px 0 0; color: var(--gris); max-width: 52ch; font-size: .95rem; }
.carnet-nav { display: none; gap: 8px; flex: none; }
.carnet-nav button { width: 44px; height: 44px; border: 1px solid var(--encre); background: transparent; cursor: pointer; display: grid; place-items: center; }
.carnet-nav button:hover { background: var(--encre); color: var(--papier); }
.carnet-nav button:disabled { opacity: .3; cursor: default; background: transparent; color: var(--encre); }
@media (min-width: 760px) { .carnet-nav { display: flex; } }
.defile { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 72vw); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--marge) 14px; margin: 0 calc(-1 * var(--marge)); scrollbar-width: thin; scrollbar-color: var(--trait-fort) transparent; overscroll-behavior-x: contain; }
.defile > * { scroll-snap-align: start; scroll-margin-left: var(--marge); }
@media (min-width: 760px) { .defile { grid-auto-columns: minmax(280px, 30%); } }
@media (min-width: 1200px) { .defile { grid-auto-columns: minmax(280px, 23.5%); } }
.defile .photo .cadre { aspect-ratio: 4 / 3; }
.defile .photo.plan .cadre { background: #fff; }
.defile .photo.plan img { object-fit: contain; padding: 10px; mix-blend-mode: multiply; }
.defile .photo figcaption { color: var(--encre-2); }
.defile .photo figcaption b { display: block; font-family: var(--f-sans); text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 600; color: var(--encre); margin-bottom: 2px; }

/* ---------- 06 À l'échelle (section sombre) ---------- */
.sombre { background: var(--nuit); color: var(--papier); margin-top: clamp(72px, 10vw, 140px); padding: clamp(64px, 9vw, 120px) 0; }
.sombre .section-tete { border-top-color: var(--papier); }
.sombre .section-tete .reperes, .sombre .gris, .sombre .chapo { color: var(--nuit-texte); }
.sombre .section-tete .reperes b { color: var(--papier); }
.echelle { border-top: 1px solid var(--nuit-trait); }
.echelle-ligne { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--nuit-trait); outline: none; }
.echelle-nom { font-size: .92rem; line-height: 1.25; }
.echelle-nom .mono { display: block; color: var(--nuit-texte); font-size: .66rem; margin-top: 2px; }
.echelle-piste { position: relative; display: flex; align-items: center; gap: 10px; min-height: 26px; }
.echelle-pont { position: relative; height: 22px; flex: none; min-width: 3px; width: 0; transition: width 1.3s var(--ease); }
.echelle-pont .tablier { position: absolute; left: 0; right: 0; top: 4px; height: 3px; background: var(--papier); }
.echelle-pont .appui { position: absolute; top: 4px; width: 1px; height: 16px; background: var(--papier); opacity: .85; }
.echelle-pont .appui.culee { width: 3px; height: 12px; background: var(--papier); }
.echelle-l { font-family: var(--f-mono); font-size: .78rem; white-space: nowrap; color: var(--papier); }
.echelle-ligne:hover .tablier, .echelle-ligne:focus-visible .tablier, .echelle-ligne.actif .tablier { background: #7F9BFF; }
.echelle-ligne:hover .appui, .echelle-ligne:focus-visible .appui, .echelle-ligne.actif .appui { background: #7F9BFF; }
.echelle-ligne:hover .echelle-nom, .echelle-ligne:focus-visible .echelle-nom { color: #fff; }
.echelle-ligne { cursor: pointer; }
@media (min-width: 900px) {
  .echelle-ligne { grid-template-columns: 300px 1fr; gap: 24px; align-items: center; padding: 9px 0; }
}
.echelle-pied { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; margin-top: 22px; color: var(--nuit-texte); }
.echelle-barre { display: flex; align-items: center; gap: 10px; }
.echelle-barre i { display: block; height: 7px; border: 1px solid var(--nuit-texte); border-top: 0; }

/* ---------- 07 Carte ---------- */
.carte-bloc { display: grid; gap: 28px; }
.carte-bloc > * { min-width: 0; }
@media (min-width: 1040px) { .carte-bloc { grid-template-columns: minmax(0, 8.4fr) minmax(0, 3.6fr); gap: 36px; align-items: start; } }
.carte-cadre { position: relative; border: 1px solid var(--encre); background: #E9E6DE; overflow: hidden; }
.carte-defile { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.carte-cadre svg { width: 100%; height: auto; min-width: 760px; }
@media (min-width: 700px) { .carte-cadre svg { min-width: 0; } }
@media (max-width: 699px) { .carte-cadre .carte-legende { display: none; } }
.carte-cadre .mer { fill: #E3E1DA; }
.carte-cadre .terre { fill: var(--papier-clair); stroke: none; }
.carte-cadre .terre.active { fill: var(--sable); }
.carte-cadre .terre.survol { fill: #E2CFA6; }
.carte-cadre .frontieres { fill: none; stroke: var(--trait-fort); stroke-width: .8; stroke-linejoin: round; }
.carte-cadre .cotes { fill: none; stroke: #8E887B; stroke-width: .9; }
.carte-cadre .riviere { fill: none; stroke: #6F8CFF; stroke-width: 1.1; stroke-linecap: round; opacity: .75; }
.carte-cadre .nom-pays { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; fill: var(--gris-2); pointer-events: none; paint-order: stroke; stroke: var(--papier-clair); stroke-width: 3px; stroke-linejoin: round; }
.carte-cadre .nom-pays.actif { fill: var(--encre); font-weight: 500; }
.carte-cadre .nom-riv { font-family: var(--f-sans); font-style: italic; font-size: 11px; fill: #4A67E0; pointer-events: none; }
.carte-cadre .graticule { fill: none; stroke: #D3CFC4; stroke-width: .6; }
.carte-cadre .grat-txt { font-family: var(--f-mono); font-size: 9px; fill: var(--gris-2); }
.carte-cadre .pt { cursor: pointer; }
.carte-cadre .pt circle.m { fill: var(--bleu); stroke: var(--papier-clair); stroke-width: 2; transition: r .2s; }
.carte-cadre .pt circle.h { fill: transparent; }
.carte-cadre .pt text { font-family: var(--f-mono); font-size: 10px; font-weight: 500; fill: #fff; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.carte-cadre .pt:hover circle.m, .carte-cadre .pt:focus-visible circle.m, .carte-cadre .pt.actif circle.m { fill: var(--encre); }
.carte-cadre .pt.eteint { opacity: .18; }
.carte-cadre .pt:focus { outline: none; }
.carte-cadre .encart-fond { fill: var(--papier-clair); stroke: var(--encre); stroke-width: 1; }
.carte-cadre .encart-terre { fill: var(--papier-fonce); }
.carte-cadre .encart-terre.active { fill: var(--sable); }
.carte-legende { position: absolute; right: 12px; top: 12px; display: flex; align-items: center; gap: 14px; background: color-mix(in srgb, var(--papier-clair) 92%, transparent); padding: 8px 10px; border: 1px solid var(--trait-fort); }
.carte-legende span { display: inline-flex; align-items: center; gap: 6px; }
.carte-legende i { display: inline-block; border-radius: 50%; background: var(--bleu); border: 2px solid var(--papier-clair); box-shadow: 0 0 0 1px var(--trait-fort); }
.bulle { position: absolute; z-index: 5; pointer-events: none; min-width: 180px; max-width: 280px; background: var(--encre); color: var(--papier); padding: 9px 11px 10px; font-size: .86rem; line-height: 1.3; transform: translate(-50%, calc(-100% - 14px)); opacity: 0; transition: opacity .15s; }
.bulle.visible { opacity: 1; }
.bulle .mono { display: block; color: #AEB4C6; font-size: .64rem; margin-bottom: 3px; }
.bulle::after { content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px; border: 6px solid transparent; border-bottom: 0; border-top-color: var(--encre); }
.pays-liste { border-top: 1px solid var(--encre); }
.pays-liste li { border-bottom: 1px solid var(--trait); }
.pays-liste button { width: 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 14px; padding: 12px 0; border: 0; background: none; cursor: pointer; text-align: left; }
.pays-liste .nom { font-weight: 650; font-stretch: 85%; font-size: 1.18rem; }
.pays-liste .n { font-family: var(--f-mono); font-size: .85rem; }
.pays-liste .jauge { grid-column: 1 / -1; height: 3px; background: var(--trait); position: relative; }
.pays-liste .jauge i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--encre); }
.pays-liste button:hover .nom, .pays-liste button[aria-pressed="true"] .nom { color: var(--bleu); }
.pays-liste button:hover .jauge i, .pays-liste button[aria-pressed="true"] .jauge i { background: var(--bleu); }
.pays-liste .detail { display: block; grid-column: 1 / -1; color: var(--gris); text-transform: none; letter-spacing: .01em; font-size: .74rem; }
.carte-aide { display: none; margin: 0 0 8px; color: var(--gris); text-align: center; }
.carte-note { color: var(--gris); margin-top: 14px; text-transform: none; letter-spacing: .01em; font-size: .74rem; }

/* ---------- 08 Registre (aperçu) ---------- */
.registre { border-top: 1px solid var(--encre); }
.reg-ligne { display: grid; grid-template-columns: 1fr; gap: 6px 20px; width: 100%; padding: 16px 0; border: 0; border-bottom: 1px solid var(--trait); background: none; text-align: left; cursor: pointer; }
.reg-ligne:hover { background: var(--papier-clair); }
.reg-ligne:hover .reg-titre { color: var(--bleu); }
.reg-an { font-family: var(--f-mono); font-size: .8rem; color: var(--encre); }
.reg-pays { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); }
.reg-titre { font-weight: 650; font-stretch: 88%; font-size: 1.14rem; line-height: 1.22; }
.reg-titre small { display: block; font-weight: 400; font-stretch: 100%; font-size: .88rem; color: var(--gris); margin-top: 4px; line-height: 1.4; }
.reg-type { display: flex; flex-wrap: wrap; gap: 6px; align-content: start; }
@media (min-width: 900px) {
  .reg-ligne { grid-template-columns: 150px 140px minmax(0, 1fr) 230px; align-items: start; padding: 18px 0; }
  .reg-ligne > * { padding-top: 2px; }
  .reg-type { justify-content: flex-end; }
}
.registre-pied { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 26px; }

/* ---------- 09 Partenaires ---------- */
.partenaires { display: grid; gap: 40px; }
@media (min-width: 980px) { .partenaires { grid-template-columns: 1fr 1fr; gap: 56px; } }
.partenaires h3 { font-family: var(--f-mono); font-weight: 400; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gris); padding-bottom: 12px; border-bottom: 1px solid var(--encre); }
.noms li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--trait); }
.noms .nom { font-weight: 640; font-stretch: 86%; font-size: 1.16rem; line-height: 1.2; }
.noms .nom small { display: block; font-weight: 400; font-stretch: 100%; font-size: .82rem; color: var(--gris); }
.noms .n { font-family: var(--f-mono); font-size: .78rem; color: var(--gris); white-space: nowrap; }
.groupements { margin-top: 36px; padding-top: 16px; border-top: 1px solid var(--trait); color: var(--encre-2); }
.groupements .mono { display: block; color: var(--gris); margin-bottom: 8px; }

/* ---------- 10 Moyens ---------- */
.moyens { row-gap: 36px; }
.moyens-fig { grid-column: 1 / -1; }
.moyens-fig .cadre { background: #fff; }
.moyens-liste { grid-column: 1 / -1; display: grid; gap: 30px; }
@media (min-width: 760px) { .moyens-liste { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) {
  .moyens-fig { grid-column: 1 / span 7; }
  .moyens-liste { grid-column: 8 / span 5; grid-template-columns: 1fr; gap: 28px; }
}
.moyens-liste h3 { font-weight: 720; font-stretch: 80%; font-size: 1.35rem; margin-bottom: 10px; padding-top: 12px; border-top: 1px solid var(--encre); }
.moyens-liste li { padding: 6px 0; border-bottom: 1px solid var(--trait); color: var(--encre-2); font-size: .97rem; }

/* ---------- 11 Contact ---------- */
.contact { row-gap: 40px; }
.contact-infos { grid-column: 1 / -1; }
.contact-form { grid-column: 1 / -1; }
@media (min-width: 980px) { .contact-infos { grid-column: 1 / span 5; } .contact-form { grid-column: 7 / span 6; } }
.contact-infos .cartouche { margin-top: 26px; }
.contact-infos .cartouche dd a { text-decoration: none; }
.contact-infos .cartouche dd a:hover { color: var(--bleu); }
.contact-gros { display: block; font-weight: 780; font-stretch: 72%; font-size: clamp(1.8rem, 1.2rem + 2.3vw, 3rem); line-height: 1; text-decoration: none; margin: 4px 0; }
.contact-gros:hover { color: var(--bleu); }
.champ { display: grid; gap: 6px; margin-bottom: 18px; }
.champ label { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); }
.champ input, .champ select, .champ textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--encre); background: var(--papier-clair);
  border: 1px solid var(--trait-fort); border-radius: 0; padding: 12px 13px; min-height: 48px; appearance: none;
}
.champ textarea { min-height: 150px; resize: vertical; line-height: 1.5; }
.champ select { background-image: linear-gradient(45deg, transparent 50%, var(--encre) 50%), linear-gradient(135deg, var(--encre) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 1px var(--bleu); }
.champs-2 { display: grid; gap: 0 18px; }
@media (min-width: 640px) { .champs-2 { grid-template-columns: 1fr 1fr; } }
.contact-form .note { color: var(--gris); text-transform: none; letter-spacing: .01em; font-size: .74rem; margin-top: 12px; }

/* ---------- Pied de page : cartouche ---------- */
.pied { margin-top: clamp(80px, 11vw, 150px); background: var(--nuit); color: var(--papier); padding: 56px 0 28px; }
.pied a { text-decoration: none; }
.pied a:hover { color: #9DB2FF; }
.pied-haut { display: grid; gap: 34px; padding-bottom: 40px; }
@media (min-width: 900px) { .pied-haut { grid-template-columns: 5fr 7fr; align-items: end; } }
.pied-logo { width: 210px; }
.pied-devise { margin-top: 18px; color: var(--nuit-texte); max-width: 40ch; }
.pied-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
@media (min-width: 640px) { .pied-nav { grid-template-columns: repeat(3, 1fr); } }
.pied-nav a { font-weight: 600; font-stretch: 86%; font-size: 1.2rem; padding: 6px 0; }
.pied-cartouche { border: 1px solid var(--nuit-trait); display: grid; grid-template-columns: 1fr 1fr; }
.pied-cartouche > div { padding: 12px 14px; border-right: 1px solid var(--nuit-trait); border-bottom: 1px solid var(--nuit-trait); min-width: 0; }
.pied-cartouche dt { font-family: var(--f-mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: #8A93B3; margin-bottom: 3px; }
.pied-cartouche dd { font-size: .9rem; line-height: 1.35; color: var(--papier); overflow-wrap: anywhere; }
@media (max-width: 639px) { .pied-cartouche > div:nth-child(2n) { border-right: 0; } }
@media (min-width: 640px) { .pied-cartouche { grid-template-columns: repeat(3, 1fr); } .pied-cartouche > div:nth-child(3n) { border-right: 0; } }
@media (min-width: 1040px) { .pied-cartouche { grid-template-columns: 2fr 1.4fr 1.4fr 1.2fr 1fr 0.7fr; } .pied-cartouche > div { border-bottom: 0; } .pied-cartouche > div:nth-child(3n) { border-right: 1px solid var(--nuit-trait); } .pied-cartouche > div:last-child { border-right: 0; } }
.pied-bas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; margin-top: 22px; color: #8A93B3; }

/* ---------- Tiroir (fiche de référence) ---------- */
.voile { position: fixed; inset: 0; z-index: 80; background: rgba(11, 20, 48, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s; }
.tiroir { position: fixed; top: 0; right: 0; bottom: 0; z-index: 81; width: min(600px, 100%); background: var(--papier); border-left: 1px solid var(--encre); transform: translateX(102%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.tiroir-ouvert .voile { opacity: 1; visibility: visible; }
.tiroir-ouvert .tiroir { transform: none; }
.tiroir-ouvert { overflow: hidden; }
.tiroir-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 20px; height: 60px; border-bottom: 1px solid var(--trait); flex: none; }
.tiroir-barre .mono { color: var(--gris); }
.fermer { width: 44px; height: 44px; border: 1px solid var(--encre); background: transparent; cursor: pointer; display: grid; place-items: center; }
.fermer:hover { background: var(--encre); color: var(--papier); }
.tiroir-corps { overflow-y: auto; padding: 26px 22px 48px; overscroll-behavior: contain; }
.fiche-sur { color: var(--gris); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 4px 10px; }
.fiche-sur span + span::before { content: "·"; margin-right: 10px; color: var(--trait-fort); }
.fiche h2 { font-weight: 760; font-stretch: 76%; font-size: clamp(1.8rem, 1.4rem + 1.6vw, 2.5rem); line-height: .98; margin-bottom: 14px; }
.fiche .titre-long { color: var(--encre-2); margin-bottom: 18px; }
.fiche .etiquettes { margin-bottom: 22px; }
.fiche-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 22px; }
.fiche-photos .photo:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.fiche-photos .cadre { aspect-ratio: 4 / 3; }
.fiche-photos .photo:first-child:nth-last-child(odd) .cadre { aspect-ratio: 16 / 9; }
.fiche-photos .photo.plan .cadre { background: #fff; }
.fiche-photos .photo.plan img { object-fit: contain; mix-blend-mode: multiply; padding: 8px; }
.fiche dl.donnees > div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 11px 0; border-top: 1px solid var(--trait); }
@media (min-width: 520px) { .fiche dl.donnees > div { grid-template-columns: 150px 1fr; gap: 16px; } }
.fiche dl.donnees dt { font-family: var(--f-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--gris); padding-top: 3px; }
.fiche dl.donnees dd { font-size: .98rem; }
.fiche-ponts { margin: 6px 0 0; }
.fiche-ponts li { display: flex; justify-content: space-between; gap: 12px; }
.fiche-liste li + li { border-top: 1px solid var(--trait); }
.fiche-liste button { display: grid; grid-template-columns: 112px 1fr; gap: 12px; width: 100%; text-align: left; padding: 12px 0; border: 0; background: none; cursor: pointer; }
.fiche-liste button:hover .t { color: var(--bleu); }
.fiche-liste .a { font-family: var(--f-mono); font-size: .78rem; color: var(--gris); padding-top: 2px; }
.fiche-liste .t { font-weight: 600; line-height: 1.3; }

/* ---------- Visionneuse ---------- */
.visionneuse { position: fixed; inset: 0; z-index: 90; background: #090C16; display: none; color: var(--papier); }
.visionneuse.ouverte { display: grid; grid-template-rows: 60px 1fr auto; }
.visionneuse .barre { display: flex; justify-content: space-between; align-items: center; padding: 0 16px; }
.visionneuse .barre .mono { color: #AEB4C6; }
.visionneuse .fermer { border-color: var(--papier); color: var(--papier); }
.visionneuse .fermer:hover { background: var(--papier); color: var(--encre); }
.visionneuse .scene { position: relative; display: grid; place-items: center; padding: 0 56px; min-height: 0; }
.visionneuse .scene img { max-width: 100%; max-height: calc(100vh - 170px); width: auto; height: auto; object-fit: contain; background: #111; }
@supports (height: 100dvh) { .visionneuse .scene img { max-height: calc(100dvh - 170px); } }
.visionneuse .scene img.plan { background: #fff; }
.visionneuse .prec, .visionneuse .suiv { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.3); color: #fff; cursor: pointer; display: grid; place-items: center; }
.visionneuse .prec { left: 6px; } .visionneuse .suiv { right: 6px; }
.visionneuse .prec:hover, .visionneuse .suiv:hover { background: var(--papier); color: var(--encre); }
.visionneuse .legende { padding: 14px 16px 22px; text-align: center; font-size: .95rem; color: var(--papier); }

/* ---------- Page Références ---------- */
.page-tete { padding: clamp(32px, 6vw, 80px) 0 clamp(26px, 4vw, 44px); }
.page-tete .reperes { color: var(--gris); margin-bottom: 18px; display: flex; gap: 16px; }
.page-tete .reperes a { text-decoration: none; }
.page-tete .reperes a:hover { color: var(--bleu); }
.page-tete h1 { max-width: 14ch; }
.page-tete .chapo { margin-top: 22px; max-width: 60ch; }
.frise { margin-top: 30px; }
.frise-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 10px; color: var(--gris); }
.frise-barres { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); align-items: end; gap: 2px; height: 140px; border-bottom: 1px solid var(--encre); }
.frise-barres button { position: relative; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; display: flex; align-items: flex-end; justify-content: center; }
.frise-barres button i { display: block; width: 100%; max-width: 30px; background: var(--bleu); border-radius: 4px 4px 0 0; transition: background .15s, opacity .15s; }
.frise-barres button:hover i, .frise-barres button:focus-visible i { background: var(--encre); }
.frise-barres button[aria-pressed="true"] i { background: var(--encre); }
.frise-barres.filtre button:not([aria-pressed="true"]) i { opacity: .3; }
.frise-barres button .v { position: absolute; left: 50%; transform: translateX(-50%); font-family: var(--f-mono); font-size: .7rem; color: var(--encre); }
.frise-axe { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 6px; }
.frise-axe span { font-family: var(--f-mono); font-size: .66rem; color: var(--gris); text-align: center; min-width: 0; white-space: nowrap; display: flex; justify-content: center; }
@media (max-width: 640px) { .frise-axe span:not(:nth-child(4n+1)) { visibility: hidden; } }

.filtres { position: static; top: var(--entete); z-index: 20; background: color-mix(in srgb, var(--papier) 94%, transparent); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--encre); border-bottom: 1px solid var(--trait); padding: 14px 0; }
.filtres-in { display: grid; gap: 12px; }
.filtres-in > * { min-width: 0; }
@media (min-width: 900px) { .filtres { position: sticky; } }
.filtres-ligne { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filtres-ligne .mono.lab { color: var(--gris); margin-right: 4px; min-width: 70px; }
.puces { display: flex; flex-wrap: wrap; gap: 8px; }
.puce { min-height: 36px; padding: 0 12px; border: 1px solid var(--trait-fort); background: var(--papier-clair); cursor: pointer; font-size: .88rem; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.puce .n { font-family: var(--f-mono); font-size: .72rem; color: var(--gris); }
.puce:hover { border-color: var(--encre); }
.puce[aria-pressed="true"] { background: var(--encre); border-color: var(--encre); color: var(--papier); }
.puce[aria-pressed="true"] .n { color: #AEB4C6; }
.recherche { position: relative; flex: 1 1 260px; max-width: 420px; }
.recherche input { width: 100%; min-height: 40px; border: 1px solid var(--trait-fort); background: var(--papier-clair); padding: 0 12px 0 36px; font: inherit; font-size: .95rem; border-radius: 0; }
.recherche input:focus { outline: none; border-color: var(--bleu); box-shadow: 0 0 0 1px var(--bleu); }
.recherche svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--gris); }
.filtres select { min-height: 36px; border: 1px solid var(--trait-fort); background: var(--papier-clair); font: inherit; font-size: .88rem; padding: 0 30px 0 10px; border-radius: 0; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--encre) 50%), linear-gradient(135deg, var(--encre) 50%, transparent 50%); background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%; background-size: 5px 5px; background-repeat: no-repeat; cursor: pointer; }
.compte-ligne { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0 10px; color: var(--gris); }
.compte-ligne b { color: var(--encre); font-weight: 500; }
.liste-refs details { border-bottom: 1px solid var(--trait); }
.liste-refs details:first-child { border-top: 1px solid var(--encre); }
.liste-refs summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr; gap: 6px 20px; padding: 16px 34px 16px 0; position: relative; }
.liste-refs summary::-webkit-details-marker { display: none; }
.liste-refs summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-family: var(--f-mono); font-size: 1.2rem; color: var(--gris); transition: transform .25s; }
.liste-refs details[open] summary::after { transform: rotate(45deg); color: var(--encre); }
.liste-refs summary:hover .reg-titre { color: var(--bleu); }
@media (min-width: 900px) { .liste-refs summary { grid-template-columns: 150px 140px minmax(0, 1fr) 230px; align-items: start; padding-right: 44px; } .liste-refs summary .reg-type { justify-content: flex-end; } }
.liste-refs .corps { padding: 4px 0 28px; }
@media (min-width: 900px) { .liste-refs .corps { padding-left: 310px; padding-right: 44px; } }
.liste-refs .corps .fiche h2 { display: none; }
.vide { padding: 40px 0; color: var(--gris); }
.vers-filtres { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; display: none; align-items: center; gap: 8px; min-height: 48px; padding: 0 18px; background: var(--encre); color: var(--papier); border: 0; font-weight: 600; font-size: .95rem; box-shadow: 0 6px 20px rgba(11, 20, 48, .25); cursor: pointer; transform: translateY(140%); transition: transform .35s var(--ease); }
.vers-filtres.visible { transform: none; }
.vers-filtres .n { font-family: var(--f-mono); font-size: .78rem; color: #AEB4C6; }
.mark { background: var(--bleu-pale); color: inherit; }

/* ---------- Mentions ---------- */
.page-texte { max-width: 760px; }
.page-texte h2 { font-weight: 720; font-stretch: 80%; font-size: 1.6rem; margin: 40px 0 12px; padding-top: 12px; border-top: 1px solid var(--encre); }
.page-texte p, .page-texte li { color: var(--encre-2); }

/* ---------- Téléphone : confort au doigt et lisibilité ---------- */
@media (max-width: 699px) {
  :root { --entete: 60px; }
  .entete-logo img { height: 40px; }
  .burger { width: 44px; height: 44px; }
  .mono { font-size: .78rem; }
  .cartouche dt, .pied-cartouche dt, .echelle-nom .mono, .etiquette, .fiche dl.donnees dt, .champ label, .bulle .mono { font-size: .72rem; }
  .photo figcaption, .domaine-ex, .carte-note, .pays-liste .detail { font-size: .8rem; }
  .lien { padding: 8px 0; }
  .etiquettes .lien { margin-right: 14px; }
  .puce { min-height: 42px; }
  .recherche input, .filtres select { font-size: 16px; min-height: 46px; } /* 16 px : évite le zoom automatique de l'iPhone */
  .filtres-ligne#f-domaines, .filtres-ligne#f-types { display: block; }
  .filtres-ligne .mono.lab { display: block; margin-bottom: 8px; }
  .puces { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--marge)); padding: 0 var(--marge) 2px; scrollbar-width: none; scroll-padding-left: var(--marge); }
  .puces::-webkit-scrollbar { display: none; }
  .puce { flex: none; }
  .page-tete { padding-bottom: 22px; }
  .carte-aide { display: block; }
  .vers-filtres { display: inline-flex; }
  .section-tete .reperes { margin-bottom: 14px; }
  .hero-actions .bouton { flex: 1 1 auto; justify-content: center; }
  .regle-leg { font-size: .72rem; }
  .reg-ligne, .liste-refs summary { padding-top: 18px; padding-bottom: 18px; }
  .defile .photo figcaption b { font-size: 1rem; }
  /* visionneuse : image pleine largeur, flèches sous l'image, à portée de pouce */
  .visionneuse .scene { padding: 0 0 64px; }
  .visionneuse .prec, .visionneuse .suiv { top: auto; bottom: 6px; transform: none; width: 52px; height: 52px; }
  .visionneuse .prec { left: calc(50% - 62px); } .visionneuse .suiv { right: calc(50% - 62px); }
  .tiroir-corps { padding: 22px 16px 40px; }
  /* héros */
  .hero-sur { gap: 4px 14px; }
  .hero-sur span:first-child { flex-basis: 100%; }
  .hero-sur span + span::before { content: none; }
  .hero-sur span + span + span::before { content: "·"; margin-right: 14px; color: var(--trait-fort); }
  .hero h1.titre-xl { font-size: min(15.5vw, 4.1rem); line-height: .88; }
  .hero-chapo { font-size: 1.04rem; }
  /* domaines : numéro au-dessus, texte pleine largeur, dessin et compteur côte à côte */
  .domaine { grid-template-columns: minmax(0, 1fr) auto; row-gap: 10px; }
  .domaine-num { grid-column: 1 / -1; padding-top: 0; }
  .domaine-texte { grid-column: 1 / -1; }
  .domaine-dessin { grid-column: 1; max-width: 210px; }
  .domaine-compte { grid-column: 2; align-self: end; flex-direction: column; align-items: flex-end; gap: 2px; }
  /* registre : année et pays sur la même ligne */
  .reg-ligne, .liste-refs summary { grid-template-columns: auto minmax(0, 1fr); gap: 6px 14px; }
  .reg-ligne .reg-titre, .reg-ligne .reg-type, .liste-refs summary .reg-titre, .liste-refs summary .reg-type { grid-column: 1 / -1; }
  .reg-an { font-size: .78rem; }
  /* ponts à l'échelle : lignes plus compactes */
  .echelle-ligne { padding: 10px 0; gap: 4px; }
  .echelle-nom { font-size: .95rem; }
  /* listes repliées */
  .replie > .en-trop { display: none; }
  .bouton.replier { display: flex; width: 100%; justify-content: center; margin-top: 18px; }
}
.replier { display: none; }
.sombre .replier { border-color: var(--papier); color: var(--papier); }
.sombre .replier:hover { background: var(--papier); color: var(--encre); }

/* ---------- Apparitions ---------- */
.apparait { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.apparait.vu { opacity: 1; transform: none; }
.js-inactif .apparait { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .apparait { opacity: 1; transform: none; }
  .anime .cote-trait { transform: none; } .anime .cote-texte { opacity: 1; }
  .anime .domaine-dessin .trace { stroke-dashoffset: 0; }
}

/* ---------- Impression ---------- */
@media print {
  :root { --papier: #fff; --papier-clair: #fff; }
  .entete, .pied, .filtres, .frise, .menu-mobile, .voile, .tiroir, .visionneuse, .bouton, .carnet-nav { display: none !important; }
  body { font-size: 10.5pt; }
  .liste-refs summary { grid-template-columns: 90px 90px 1fr !important; padding: 6px 0 !important; break-inside: avoid; }
  .liste-refs summary .reg-type, .liste-refs summary::after { display: none; }
  .liste-refs details { break-inside: avoid; }
  a { text-decoration: none; }
}
