/* ============================================================
   TRADEREP — « Repères » · feuille de style
   Palette : papier chaud / encre / sanguine / bleu Payne / brume
   Typo : Vollkorn (titres) · Atkinson Hyperlegible (texte) · Overpass Mono (cotes)
   Layout : rail de navigation vertical à gauche (desktop), barre haute (mobile)
   ============================================================ */
:root {
  --papier: #F7F3EC;
  --papier-2: #EFE9DF;
  --encre: #1B1A18;
  --encre-2: #4A4642;
  --encre-3: #86807A;
  --sanguine: #A8402A;
  --sanguine-2: #C8674F;
  --payne: #3A5566;
  --payne-2: #5F7A8B;
  --brume: #DDE4E8;
  --brume-2: #EEF2F4;
  --trait: #D9D1C4;
  --rail: 248px;
  --serif: 'Vollkorn', Georgia, serif;
  --sans: 'Atkinson Hyperlegible', system-ui, sans-serif;
  --mono: 'Overpass Mono', ui-monospace, monospace;
  --rayon: 3px;
  --duree: .5s;
  --courbe: cubic-bezier(.22,.8,.3,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 1px 1px, rgba(27,26,24,.07) 1px, transparent 0);
  background-size: 28px 28px;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--sanguine-2); text-underline-offset: 3px; }
a:hover { color: var(--sanguine); }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
.chapo { font-size: 1.2rem; color: var(--encre-2); max-width: 60ch; }
em { font-style: italic; }
.evitement { position: absolute; left: -200vw; top: 8px; background: var(--encre); color: #fff; padding: 8px 14px; z-index: 100; }
.evitement:focus { left: 8px; }

/* ---- Cotes (étiquettes mono) ---- */
.cote { font-family: var(--mono); font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--payne); display: inline-flex; gap: .5em; align-items: center; }
.cote b { font-weight: 600; color: var(--sanguine); }
.cote i { font-style: normal; color: var(--encre-3); }

/* ---- Boutons ---- */
.bouton {
  display: inline-flex; align-items: center; gap: .55em; padding: .8em 1.35em;
  font: 700 .92rem var(--sans); letter-spacing: .01em; text-decoration: none; border-radius: var(--rayon);
  border: 1.5px solid transparent; cursor: pointer; transition: transform .25s var(--courbe), background .25s, color .25s, border-color .25s;
}
.bouton .picto { width: 18px; height: 18px; transition: transform .3s var(--courbe); }
.bouton:hover .picto { transform: translateX(4px); }
.bouton-sanguine { background: var(--sanguine); color: #fff; }
.bouton-sanguine:hover { background: var(--encre); color: #fff; }
.bouton-ligne { background: transparent; color: var(--encre); border-color: var(--encre); }
.bouton-ligne:hover { background: var(--encre); color: #fff; }
.bouton-payne { background: var(--payne); color: #fff; }
.bouton-payne:hover { background: var(--encre); }
.bouton-ghost { background: transparent; color: var(--sanguine); padding-left: 0; padding-right: 0; }

/* ---- Rail de navigation ---- */
.rail {
  position: fixed; inset: 0 auto 0 0; width: var(--rail); z-index: 50;
  background: var(--papier); border-right: 1px solid var(--trait);
  display: flex; flex-direction: column; padding: 28px 26px 24px;
}
.marque { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; text-decoration: none; color: var(--encre); }
.marque-signe { width: 40px; height: 40px; grid-row: 1 / span 2; color: var(--sanguine); animation: tourne 40s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
.marque-nom { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; letter-spacing: .04em; line-height: 1; }
.marque-sous { font-family: var(--mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--encre-3); margin-top: 4px; }
.nav { display: flex; flex-direction: column; justify-content: space-between; flex: 1; margin-top: 56px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.nav li a { display: flex; flex-direction: column; padding: 12px 12px 12px 14px; text-decoration: none; font-weight: 700; font-size: 1rem; border-left: 2px solid transparent; transition: border-color .25s, color .25s, background .25s; border-radius: 0 var(--rayon) var(--rayon) 0; }
.nav li a small { font-family: var(--mono); font-size: .64rem; letter-spacing: .1em; color: var(--encre-3); font-weight: 400; margin-bottom: 2px; }
.nav li a:hover { background: var(--papier-2); color: var(--encre); border-left-color: var(--trait); }
.nav li a.actif { border-left-color: var(--sanguine); color: var(--sanguine); }
.nav li a.actif small { color: var(--sanguine-2); }
.nav-rdv { margin-top: 18px; }
.nav-rdv a.bouton { flex-direction: row; border-left: 0; justify-content: center; }
.nav-rdv a.bouton:hover { border-left: 0; }
.nav-rdv a.bouton.actif { background: var(--encre); color: #fff; border-left: 0; }
.rail-pied { display: flex; flex-direction: column; gap: 6px; padding-top: 20px; border-top: 1px solid var(--trait); }
.rail-lieu { font-size: .82rem; color: var(--encre-3); margin-top: 4px; }
.burger { display: none; }

.page { margin-left: var(--rail); min-height: 100vh; }
.colonne { width: min(1120px, 100% - 2 * clamp(20px, 5vw, 72px)); margin-inline: auto; }
.bloc { padding: clamp(64px, 8vw, 120px) 0; position: relative; }
.bloc-serre { padding-top: clamp(32px, 4vw, 56px); }
.bloc-brume { background: var(--brume-2); border-block: 1px solid var(--brume); }
.bloc-encre { background: var(--encre); color: var(--papier); }
.bloc-encre .cote { color: var(--brume); }
.bloc-encre .cote b { color: var(--sanguine-2); }
.bloc-encre h2, .bloc-encre h3 { color: #fff; }
.bloc-encre .chapo { color: rgba(247,243,236,.75); }

.bloc-entete { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: end; margin-bottom: clamp(36px, 5vw, 64px); }
.bloc-entete h2 { margin-top: .4em; }
.bloc-entete p { margin-bottom: 0; }
@media (max-width: 900px) { .bloc-entete { grid-template-columns: 1fr; gap: 12px; align-items: start; } }

/* ---- Courbes de niveau décoratives ---- */
.courbes { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.courbes path { fill: none; stroke: var(--sanguine); stroke-width: 1.1; opacity: .55; stroke-dasharray: 3200; stroke-dashoffset: 3200; animation: trace 4.2s var(--courbe) forwards; animation-delay: calc(var(--i) * .22s); }
.courbes-b path { stroke: var(--payne-2); }
.courbes.est-visible path, .visible .courbes path { animation-play-state: running; }
@keyframes trace { to { stroke-dashoffset: 0; } }

/* ---- Héros ---- */
.heros { position: relative; min-height: calc(100vh - 0px); display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); overflow: hidden; }
.heros-texte { padding: clamp(72px, 10vh, 140px) clamp(24px, 5vw, 72px) clamp(56px, 7vw, 96px); display: flex; flex-direction: column; justify-content: center; position: relative; z-index: 2; }
.heros h1 { margin: .55em 0 .5em; max-width: 14ch; }
.heros h1 em { color: var(--sanguine); font-style: italic; }
.heros .chapo { max-width: 46ch; }
.heros-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.heros-releves { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--trait); }
.heros-releves div { display: flex; flex-direction: column; gap: 2px; }
.heros-releves strong { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; line-height: 1; }
.heros-releves span { font-size: .8rem; color: var(--encre-3); }
.heros-media { position: relative; min-height: 420px; }
.heros-media video, .heros-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.heros-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--papier) 0, transparent 18%); }
.heros-cadre { position: absolute; left: 24px; bottom: 24px; z-index: 3; background: rgba(247,243,236,.92); backdrop-filter: blur(6px); padding: 12px 16px; border-radius: var(--rayon); display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--trait); }
.heros-cadre span:last-child { font-size: .82rem; color: var(--encre-2); }
.heros .courbes { z-index: 1; opacity: .9; }
@media (max-width: 1000px) {
  .heros { grid-template-columns: 1fr; min-height: 0; }
  .heros-media { min-height: 52vw; order: -1; }
  .heros-media::after { background: linear-gradient(0deg, var(--papier) 0, transparent 22%); }
  .heros-texte { padding-top: 12px; }
}

/* ---- Entête de page intérieure ---- */
.entete-page { position: relative; padding: clamp(64px, 9vw, 120px) 0 clamp(36px, 5vw, 64px); overflow: hidden; }
.entete-page h1 { margin: .4em 0 .4em; max-width: 16ch; }
.entete-page .courbes { opacity: .6; }
.entete-page .colonne { position: relative; z-index: 2; }
.entete-cadre { padding-bottom: 12px; }

/* ---- Grille de cartes « repères » ---- */
.reperes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--trait); border: 1px solid var(--trait); }
.repere { background: var(--papier); padding: 34px 32px 30px; display: flex; flex-direction: column; gap: 14px; position: relative; transition: background .35s; }
.repere:hover { background: #fff; }
.repere .cote { margin-bottom: 4px; }
.repere h3 { margin: 0; font-size: 1.55rem; }
.repere p { color: var(--encre-2); margin: 0; flex: 1; }
.repere .picto { width: 30px; height: 30px; color: var(--sanguine); position: absolute; right: 30px; top: 30px; }
.repere-lien { font-weight: 700; text-decoration: none; display: inline-flex; gap: .4em; align-items: center; margin-top: 6px; color: var(--payne); }
.repere-lien .picto { position: static; width: 16px; height: 16px; color: inherit; }
.repere-lien:hover { color: var(--sanguine); }
@media (max-width: 760px) { .reperes { grid-template-columns: 1fr; } }

/* ---- Bandes image + texte ---- */
.bande { display: grid; grid-template-columns: repeat(12, 1fr); gap: 28px; align-items: center; }
.bande-media { grid-column: 1 / 7; position: relative; }
.bande-texte { grid-column: 8 / 13; }
.bande-inverse .bande-media { grid-column: 7 / 13; order: 2; }
.bande-inverse .bande-texte { grid-column: 1 / 6; }
.bande-media img { border-radius: var(--rayon); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.bande-media.portrait img { aspect-ratio: 4 / 5; }
.bande-media .etiquette { position: absolute; left: 18px; bottom: 18px; background: var(--papier); padding: 8px 12px; border-radius: var(--rayon); border: 1px solid var(--trait); }
.bande-texte h2 { margin-top: .4em; }
@media (max-width: 900px) { .bande-media, .bande-texte, .bande-inverse .bande-media, .bande-inverse .bande-texte { grid-column: 1 / -1; order: 0; } }

/* ---- Liste cotée (étapes) ---- */
.etapes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--trait); }
.etape { padding: 28px 24px 8px 0; border-right: 1px dashed var(--trait); margin-right: 24px; position: relative; }
.etape:last-child { border-right: 0; margin-right: 0; }
.etape::before { content: ""; position: absolute; top: -1px; left: 0; width: 42px; height: 2px; background: var(--sanguine); }
.etape b { font-family: var(--mono); font-size: 2.2rem; font-weight: 400; color: var(--payne-2); display: block; line-height: 1; margin-bottom: 14px; }
.etape h3 { font-size: 1.3rem; }
.etape p { color: var(--encre-2); font-size: .97rem; }
.etape small { font-family: var(--mono); color: var(--sanguine); letter-spacing: .06em; text-transform: uppercase; font-size: .7rem; }
@media (max-width: 900px) { .etapes { grid-template-columns: 1fr 1fr; } .etape:nth-child(2) { border-right: 0; } }
@media (max-width: 560px) { .etapes { grid-template-columns: 1fr; } .etape { border-right: 0; margin-right: 0; } }

/* ---- Profil altimétrique (bloc chiffres) ---- */
.profil { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.profil div { padding: 22px 0 0; border-top: 2px solid var(--payne); }
.profil strong { font-family: var(--serif); font-size: clamp(2rem, 3.4vw, 3rem); font-weight: 500; line-height: 1; display: block; }
.profil span { color: var(--encre-2); font-size: .92rem; }
.bloc-encre .profil div { border-top-color: var(--sanguine-2); }
.bloc-encre .profil span { color: rgba(247,243,236,.7); }
@media (max-width: 760px) { .profil { grid-template-columns: 1fr 1fr; } }

/* ---- Citation / conviction ---- */
.conviction { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.3rem); line-height: 1.3; font-weight: 400; max-width: 28ch; margin: 0; }
.conviction em { color: var(--sanguine); }
.convictions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.convictions article { border-top: 1px solid var(--trait); padding-top: 20px; }
.convictions h3 { font-size: 1.25rem; margin-top: 10px; }
.convictions p { color: var(--encre-2); font-size: .97rem; }
@media (max-width: 800px) { .convictions { grid-template-columns: 1fr; gap: 20px; } }

/* ---- Terrains (accordéon) ---- */
.terrains { border-top: 1px solid var(--trait); }
.terrain { border-bottom: 1px solid var(--trait); }
.terrain summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 90px 1fr auto; gap: 20px; align-items: center; padding: 22px 0; font-family: var(--serif); font-size: 1.45rem; }
.terrain summary::-webkit-details-marker { display: none; }
.terrain summary .cote { font-size: .7rem; }
.terrain summary .plus { width: 30px; height: 30px; border: 1px solid var(--encre); border-radius: 50%; display: grid; place-items: center; transition: transform .35s var(--courbe), background .3s; }
.terrain summary .plus::before, .terrain summary .plus::after { content: ""; width: 12px; height: 1.4px; background: currentColor; grid-area: 1 / 1; }
.terrain summary .plus::after { transform: rotate(90deg); }
.terrain[open] summary .plus { transform: rotate(45deg); background: var(--sanguine); border-color: var(--sanguine); color: #fff; }
.terrain-corps { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 0 0 28px 110px; }
.terrain-corps img { border-radius: var(--rayon); aspect-ratio: 16 / 10; object-fit: cover; width: 100%; }
.terrain-corps ul { color: var(--encre-2); }
@media (max-width: 800px) { .terrain summary { grid-template-columns: 1fr auto; font-size: 1.2rem; } .terrain summary .cote { display: none; } .terrain-corps { grid-template-columns: 1fr; padding-left: 0; } }

/* ---- Tableau d’honoraires ---- */
.tarifs { width: 100%; border-collapse: collapse; font-size: .97rem; }
.tarifs th, .tarifs td { text-align: left; padding: 16px 12px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.tarifs th { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--payne); font-weight: 600; }
.tarifs td:first-child { font-family: var(--serif); font-size: 1.15rem; }
.tarifs td.prix { font-family: var(--mono); white-space: nowrap; color: var(--sanguine); font-weight: 600; }
.tarifs-defile { overflow-x: auto; }

/* ---- Fiche (tableau 2 colonnes) ---- */
.fiche { display: grid; grid-template-columns: 180px 1fr; gap: 10px 24px; font-size: .95rem; margin: 0; }
.fiche dt { font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--payne); padding-top: 4px; }
.fiche dd { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--trait); }
@media (max-width: 560px) { .fiche { grid-template-columns: 1fr; gap: 2px; } .fiche dt { padding-top: 12px; } }

/* ---- Galerie mosaïque ---- */
.mosaique { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 220px; gap: 14px; }
.mosaique figure { margin: 0; position: relative; overflow: hidden; border-radius: var(--rayon); }
.mosaique img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--courbe); }
.mosaique figure:hover img { transform: scale(1.04); }
.mosaique figcaption { position: absolute; left: 12px; bottom: 12px; }
.mosaique .large { grid-column: span 2; }
.mosaique .haut { grid-row: span 2; }
@media (max-width: 760px) { .mosaique { grid-template-columns: 1fr 1fr; grid-auto-rows: 160px; } .mosaique .large { grid-column: span 2; } }

/* ---- Appel final ---- */
.appel { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.appel h2 { margin: .3em 0 .3em; }
.appel p { margin: 0; }
@media (max-width: 760px) { .appel { grid-template-columns: 1fr; } }

/* ---- Formulaire ---- */
.rdv-grille { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 56px; align-items: start; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.formulaire .plein { grid-column: 1 / -1; }
.champ { display: flex; flex-direction: column; gap: 6px; }
.champ label { font-weight: 700; font-size: .9rem; }
.champ label small { font-weight: 400; color: var(--encre-3); }
.champ input, .champ select, .champ textarea {
  font: inherit; font-size: 1rem; padding: 12px 14px; border: 1px solid var(--trait); border-radius: var(--rayon); background: #fff; color: var(--encre); width: 100%;
  transition: border-color .25s, box-shadow .25s;
}
.champ input:focus, .champ select:focus, .champ textarea:focus { outline: none; border-color: var(--payne); box-shadow: 0 0 0 3px var(--brume); }
.champ.erreur input, .champ.erreur textarea, .champ.erreur select { border-color: var(--sanguine); }
.champ .aide { font-size: .82rem; color: var(--sanguine); }
.cases { display: flex; flex-wrap: wrap; gap: 10px; }
.cases label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--trait); border-radius: 999px; cursor: pointer; font-size: .9rem; background: #fff; transition: border-color .2s, background .2s; }
.cases label:has(input:checked) { border-color: var(--payne); background: var(--brume-2); }
.cases input { accent-color: var(--sanguine); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--encre-2); }
.consent input { margin-top: 5px; accent-color: var(--sanguine); }
.pot { position: absolute; left: -200vw; width: 1px; height: 1px; overflow: hidden; }
.message { padding: 16px 18px; border-radius: var(--rayon); border: 1px solid; margin-bottom: 20px; }
.message-ok { background: #EEF4EF; border-color: #9DBBA3; color: #244A2E; }
.message-ko { background: #F8ECE8; border-color: var(--sanguine-2); color: var(--sanguine); }
.rdv-aside { display: flex; flex-direction: column; gap: 22px; }
.rdv-carte { border: 1px solid var(--trait); border-radius: var(--rayon); padding: 24px; background: #fff; }
.rdv-carte h3 { font-size: 1.2rem; }
.rdv-carte ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rdv-carte li { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; color: var(--encre-2); }
.rdv-carte li .picto { width: 18px; height: 18px; color: var(--sanguine); flex: none; margin-top: 3px; }
@media (max-width: 900px) { .rdv-grille { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .formulaire { grid-template-columns: 1fr; } }

/* ---- Cadre légal ---- */
.cadre-grille { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.cadre-nav { display: flex; flex-direction: column; gap: 2px; position: sticky; top: 24px; }
.cadre-nav a { padding: 10px 12px; text-decoration: none; border-left: 2px solid var(--trait); font-size: .95rem; }
.cadre-nav a.actif { border-left-color: var(--sanguine); color: var(--sanguine); font-weight: 700; }
.cadre-texte { max-width: 72ch; }
.cadre-texte h2 { font-size: 1.5rem; margin-top: 2em; }
.cadre-texte h2:first-of-type { margin-top: 1.2em; }
.cadre-texte table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.cadre-texte td, .cadre-texte th { padding: 8px 10px; border-bottom: 1px solid var(--trait); text-align: left; vertical-align: top; }
.cadre-texte th { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--payne); }
.cadre-texte .defile { overflow-x: auto; }
@media (max-width: 800px) { .cadre-grille { grid-template-columns: 1fr; gap: 20px; } .cadre-nav { position: static; flex-direction: row; flex-wrap: wrap; } .cadre-nav a { border-left: 0; border-bottom: 2px solid var(--trait); } }

/* ---- Pied de page ---- */
.pied { margin-left: var(--rail); background: var(--papier-2); border-top: 1px solid var(--trait); padding: 56px 0 24px; }
.pied-grille { width: min(1120px, 100% - 2 * clamp(20px, 5vw, 72px)); margin-inline: auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.pied-marque p { color: var(--encre-2); font-size: .95rem; max-width: 36ch; margin: 10px 0 14px; }
.pied h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--payne); margin-bottom: 14px; }
.pied ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .95rem; }
.pied a { text-decoration: none; }
.pied a:hover { text-decoration: underline; }
.pied address { font-style: normal; font-size: .95rem; line-height: 1.7; }
.pied-horaires { color: var(--encre-3); font-size: .88rem; }
.pied-bas { width: min(1120px, 100% - 2 * clamp(20px, 5vw, 72px)); margin: 40px auto 0; padding-top: 18px; border-top: 1px solid var(--trait); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; color: var(--encre-3); }
@media (max-width: 900px) { .pied-grille { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .pied-grille { grid-template-columns: 1fr; } }

/* ---- Bandeau traceurs ---- */
.traceurs { position: fixed; right: 20px; bottom: 20px; z-index: 60; max-width: 420px; background: #fff; border: 1px solid var(--trait); border-left: 3px solid var(--sanguine); border-radius: var(--rayon); padding: 18px 20px; box-shadow: 0 18px 40px rgba(27,26,24,.12); font-size: .9rem; }
.traceurs[hidden] { display: none; }
.traceurs p { margin: 0 0 12px; color: var(--encre-2); }
.traceurs-actions { display: flex; gap: 10px; justify-content: flex-end; }
.traceurs .bouton { padding: .55em 1em; font-size: .85rem; }
@media (max-width: 560px) { .traceurs { left: 12px; right: 12px; bottom: 12px; } }

/* ---- Apparition au défilement ---- */
.js .apparait { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--courbe), transform .9s var(--courbe); }
.js .apparait.visible { opacity: 1; transform: none; }
.apparait-tard { transition-delay: .18s; }
@media (prefers-reduced-motion: reduce) {
  .apparait { opacity: 1; transform: none; transition: none; }
  .courbes path { animation: none; stroke-dashoffset: 0; }
  .marque-signe { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---- Mobile : le rail devient une barre haute ---- */
@media (max-width: 1000px) {
  :root { --rail: 0px; }
  .rail { position: sticky; top: 0; inset: auto; width: 100%; flex-direction: row; align-items: center; justify-content: space-between; padding: 14px 20px; border-right: 0; border-bottom: 1px solid var(--trait); }
  .marque-sous { display: none; }
  .marque { grid-template-columns: 34px 1fr; }
  .marque-signe { width: 34px; height: 34px; grid-row: 1; }
  .burger { display: inline-flex; flex-direction: column; gap: 5px; background: none; border: 0; padding: 8px; cursor: pointer; }
  .burger span { display: block; width: 24px; height: 1.6px; background: var(--encre); transition: transform .3s var(--courbe), opacity .3s; }
  .burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
  .burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }
  .nav { position: fixed; inset: 63px 0 0 0; background: var(--papier); margin: 0; padding: 20px; transform: translateX(100%); transition: transform .4s var(--courbe); z-index: 49; overflow: auto; }
  .nav.ouvert { transform: none; }
  .nav li a { font-size: 1.3rem; padding: 14px 12px; }
  .rail-pied { margin-top: 24px; }
  .page, .pied { margin-left: 0; }
  body.menu-ouvert { overflow: hidden; }
}
