/* Gabarit « page locale » : la route. Repose sur site-panorama.css (barre du haut, polices, couleurs), site-applis.css
   (boutons, liens, intitulés) et site-faq.css (accordéon des questions, pied de page). */
.page-route { --blanc: #ecebe8; --encre: #16181d; --rouge: #c8161d; --marge: max(clamp(28px, 5vw, 90px), (100vw - 1560px) / 2); background: var(--blanc); color: var(--encre); }
.page-route :is(h1, h2) em { font-family: "Iowan Old Style", Baskerville, Georgia, serif; font-weight: 400; }
/* la barre du haut passe en sombre quand la page devient claire */
.page-route .topbar { transition: background 400ms ease, box-shadow 400ms ease; }

/* --- l'entrée : la photo, le panneau, et la plongée dans le panneau au défilement --- */
.entree { position: relative; height: 260vh; }
.entree .stage { position: sticky; top: 0; height: 100vh; min-height: 560px; overflow: hidden; isolation: isolate; color: var(--cream); background: #1a1d22; }
.decor { position: absolute; z-index: -3; will-change: transform; }
.decor .fond { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
/* le nom de la commune, écrit sur le panneau comme sur un vrai : capitales noires, serrées */
.panneau-nom { position: absolute; display: grid; place-items: center; margin: 0; container-type: size; }
.panneau-nom span { font: 700 min(calc(100cqh * var(--a)), calc(100cqw * var(--b)))/1.02 Bricolage, DM, sans-serif; font-stretch: 80%; letter-spacing: 0.01em; text-align: center; color: #15161a; }
.entree .stage::before { content: ""; position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, rgba(14, 18, 24, 0.66), rgba(14, 18, 24, 0.34) 36%, rgba(14, 18, 24, 0) 56%), linear-gradient(180deg, rgba(14, 18, 24, 0.5), rgba(14, 18, 24, 0) 24%); pointer-events: none; opacity: var(--voile, 1); }
.e-texte { position: absolute; left: var(--marge); top: 50%; translate: 0 -46%; display: grid; gap: clamp(16px, 2.8vh, 30px); width: calc(var(--texte, 46vw) - var(--marge)); }
.e-texte > * { margin: 0; }
.e-texte .sur { color: #fff; }
.stage.la .sur::before { transform: scaleX(1); transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) 80ms; }
.entree h1 { font: 600 clamp(40px, 5.2vw, 100px)/0.96 Bricolage, DM, sans-serif; letter-spacing: -0.04em; text-wrap: balance; text-shadow: 0 2px 28px rgba(8, 10, 16, 0.55); }
.entree h1 em { color: #ffd9b0; }
.stage.la .mot > span { transform: none; transition: transform 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i) * 80ms + 160ms); }
.e-texte .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; opacity: 0; translate: 0 16px; transition: opacity 800ms ease 620ms, translate 1000ms cubic-bezier(0.16, 1, 0.3, 1) 620ms; }
.stage.la .e-texte .actions { opacity: 1; translate: 0 0; }
.defiler { position: absolute; left: 50%; bottom: clamp(18px, 3.4vh, 36px); translate: -50% 0; display: grid; justify-items: center; gap: 8px; margin: 0; font: 700 12px/1 DM, sans-serif; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 12px rgba(8, 10, 16, 0.7); }
.defiler i { width: 1.5px; height: 34px; background: linear-gradient(#fff, transparent); animation: defiler 1.8s ease-in-out infinite; transform-origin: 50% 0; }
@keyframes defiler { 0% { scale: 1 0; } 55% { scale: 1 1; } 100% { scale: 1 1; opacity: 0; } }
.blanc { position: absolute; z-index: -1; inset: 0; background: var(--blanc); opacity: 0; pointer-events: none; }
.topbar.sur-clair { background: rgba(22, 24, 29, 0.92); }

/* --- l'arrivée : on est passé à travers le panneau, la page est blanche --- */
.arrivee { position: relative; display: grid; gap: clamp(22px, 4vh, 44px); margin-top: -46vh; padding: 0 var(--marge) clamp(50px, 9vh, 110px); }
.arrivee > * { margin: 0; }
.a-lieu { display: flex; align-items: center; gap: 12px; font: 700 clamp(12px, 0.9vw, 15px)/1 DM, sans-serif; letter-spacing: 0.18em; text-transform: uppercase; color: var(--rouge); }
.a-lieu::before { content: ""; width: 12px; height: 12px; border: 3px solid var(--rouge); border-radius: 50%; }
.a-lead { max-width: 30em; font: 500 clamp(24px, 2.7vw, 50px)/1.18 Bricolage, DM, sans-serif; letter-spacing: -0.025em; text-wrap: pretty; }
.a-reperes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 2vw, 36px); padding-top: clamp(18px, 3vh, 30px); border-top: 2px solid var(--encre); }
.a-reperes dt { font: 600 clamp(38px, 4.4vw, 84px)/1 Bricolage, DM, sans-serif; letter-spacing: -0.04em; }
.a-reperes dd { margin: 8px 0 0; max-width: 26ch; font-size: clamp(14.5px, 1.05vw, 18px); line-height: 1.4; color: #4a4f58; }

.vu { opacity: 0; translate: 0 28px; transition: opacity 800ms ease calc(var(--i, 0) * 100ms), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i, 0) * 100ms); }
.vu.la { opacity: 1; translate: 0 0; }

/* --- les blocs sur fond clair --- */
.bloc { padding: clamp(50px, 9vh, 110px) var(--marge); }
.bloc h2, .bande-sombre h2, .sortie-ville h2 { margin: 0; font: 600 clamp(34px, 4vw, 76px)/0.98 Bricolage, DM, sans-serif; letter-spacing: -0.04em; text-wrap: balance; }
.manifeste { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 96px); align-items: start; border-top: 1px solid #cfcdc7; }
.m-texte { display: grid; gap: 1em; font-size: clamp(17px, 1.3vw, 22px); line-height: 1.55; color: #33373f; }
.m-texte p { margin: 0; }
.m-texte em { font-family: "Iowan Old Style", Baskerville, Georgia, serif; color: var(--rouge); }
.captures { display: flex; align-items: flex-end; justify-content: center; gap: clamp(16px, 3vw, 56px); padding-top: 0; }
.captures figure { margin: 0; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 30px 70px rgba(20, 22, 28, 0.2), 0 0 0 1px rgba(20, 22, 28, 0.08); }
.captures .large { flex: 0 1 62%; } .captures .poche { flex: 0 1 17%; border-radius: 22px; }
.captures img { display: block; width: 100%; height: auto; }
.captures figure:nth-child(even) { translate: 0 -24px; } .captures figure.vu:nth-child(even):not(.la) { translate: 0 6px; }
.reponses { display: grid; gap: clamp(22px, 4vh, 44px); }
.b-chapeau { max-width: 76ch; margin: 0; font-size: clamp(17px, 1.3vw, 22px); line-height: 1.55; color: #33373f; }
.reponses dl { display: grid; grid-template-columns: repeat(min(var(--n), 4), minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 30px); margin: 0; }
.reponses dl > div { padding: clamp(18px, 1.8vw, 30px); border-radius: 14px; background: #fff; box-shadow: 0 1px 0 rgba(20, 22, 28, 0.08), 0 14px 40px rgba(20, 22, 28, 0.06); border-top: 4px solid var(--rouge); }
.reponses dt { font: 600 clamp(20px, 1.7vw, 30px)/1.1 Bricolage, DM, sans-serif; letter-spacing: -0.025em; }
.reponses dd { margin: 10px 0 0; font-size: clamp(15px, 1.08vw, 18px); line-height: 1.55; color: #3d424b; }
.page-route :is(.reponses, .m-texte, .rep, .b-chapeau) a:not(.bouton) { color: #a3121a; font-weight: 600; text-underline-offset: 4px; }
/* trois promesses : en très grand */
.reponses.trois dl > div { border: 0; border-left: 2px solid var(--encre); border-radius: 0; background: none; box-shadow: none; padding: 4px 0 4px clamp(16px, 1.6vw, 28px); }
.reponses.trois dt { font-size: clamp(34px, 3.6vw, 68px); letter-spacing: -0.04em; }

/* --- les secteurs : bande sombre --- */
.bande-sombre { display: grid; gap: clamp(24px, 4.4vh, 50px); padding: clamp(56px, 10vh, 120px) var(--marge); background: #16181d; color: var(--cream); }
.secteurs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: rgba(247, 241, 227, 0.18); border: 1px solid rgba(247, 241, 227, 0.18); }
.secteur { display: grid; gap: 10px; align-content: start; padding: clamp(20px, 2.2vw, 38px); background: #16181d; transition: opacity 800ms ease calc(var(--i, 0) * 100ms), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i, 0) * 100ms), background 300ms ease; }
.secteur:hover { background: #20242b; }
.secteur > * { margin: 0; }
.secteur .ic { width: 34px; height: 34px; color: var(--copper-clair); } .secteur .ic svg { width: 100%; height: 100%; }
.secteur h3 { font: 600 clamp(20px, 1.7vw, 30px)/1.1 Bricolage, DM, sans-serif; letter-spacing: -0.025em; }
.secteur p { font-size: clamp(15px, 1.08vw, 18px); line-height: 1.5; color: rgba(247, 241, 227, 0.84); }

/* --- la méthode : une route, des bornes --- */
.route { display: grid; gap: clamp(26px, 5vh, 56px); }
.route ol { position: relative; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: clamp(14px, 2vw, 36px); margin: 0; padding: 0; list-style: none; }
/* la chaussée, sous les bornes, avec sa ligne discontinue qui défile */
.route ol::before { content: ""; position: absolute; left: calc(var(--marge) * -1); right: calc(var(--marge) * -1); top: 58px; height: 64px; background: repeating-linear-gradient(90deg, #f4f3ef 0 44px, transparent 44px 96px) 0 50% / 96px 5px repeat-x, linear-gradient(#f4f3ef, #f4f3ef) 0 5px / 100% 2px no-repeat, linear-gradient(#f4f3ef, #f4f3ef) 0 calc(100% - 5px) / 100% 2px no-repeat, #2b2e35; animation: chaussee 1.6s linear infinite; }
@keyframes chaussee { to { background-position: -96px 50%, 0 5px, 0 calc(100% - 5px), 0 0; } }
.route li { position: relative; display: grid; gap: 8px; align-content: start; padding-top: 142px; }
/* la borne kilométrique : blanche, coiffée de rouge */
.borne { position: absolute; left: 0; top: 0; display: grid; align-content: start; width: 62px; height: 84px; border-radius: 31px 31px 6px 6px; background: #f7f6f2; box-shadow: 0 10px 20px rgba(20, 22, 28, 0.3), inset 0 0 0 1px rgba(20, 22, 28, 0.12); overflow: hidden; }
.borne i { display: grid; place-items: center; height: 44px; padding-top: 6px; background: var(--rouge); color: #fff; font: 700 19px/1 Bricolage, DM, sans-serif; font-style: normal; }
.route li b { font: 600 clamp(20px, 1.7vw, 30px)/1.1 Bricolage, DM, sans-serif; letter-spacing: -0.025em; }
.route li p { margin: 0; font-size: clamp(15px, 1.08vw, 18px); line-height: 1.5; color: #3d424b; }

/* --- les questions --- */
.q-locales { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 96px); align-items: start; border-top: 1px solid #cfcdc7; }
.q-liste details { border-top: 1px solid #c4c2bb; } .q-liste details:last-child { border-bottom: 1px solid #c4c2bb; }
.q-liste summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: clamp(14px, 2.2vh, 22px) 0; list-style: none; cursor: pointer; }
.q-liste summary::-webkit-details-marker { display: none; }
.q-liste summary h3 { margin: 0; font: 600 clamp(18px, 1.5vw, 26px)/1.2 Bricolage, DM, sans-serif; letter-spacing: -0.02em; }
.q-liste summary i { position: relative; width: 32px; height: 32px; border: 1.5px solid var(--encre); border-radius: 50%; transition: background 240ms ease, rotate 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.q-liste summary i::before, .q-liste summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -0.75px 0 0 -6px; background: var(--encre); transition: rotate 420ms cubic-bezier(0.16, 1, 0.3, 1), background 240ms ease; }
.q-liste summary i::after { rotate: 90deg; }
.q-liste details[open] summary i { background: var(--rouge); border-color: var(--rouge); rotate: 180deg; }
.q-liste details[open] summary i::before, .q-liste details[open] summary i::after { background: #fff; } .q-liste details[open] summary i::after { rotate: 0deg; }
.q-liste .rep { padding: 0 50px clamp(16px, 2.4vh, 24px) 0; }
.q-liste .rep p { margin: 0; max-width: 66ch; font-size: clamp(16px, 1.14vw, 19px); line-height: 1.6; color: #33373f; }
.q-liste details[open] .rep { animation: rep-arrive 520ms cubic-bezier(0.16, 1, 0.3, 1); }

/* --- le contact : la sortie de la commune, de nuit --- */
.sortie-ville { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr); gap: clamp(28px, 5vw, 96px); align-items: center; padding: clamp(60px, 11vh, 130px) var(--marge); background: linear-gradient(90deg, rgba(16, 18, 22, 0.9), rgba(16, 18, 22, 0.8)), var(--decor) 0% 62% / 230% auto #16181d; color: var(--cream); overflow: hidden; }
.d-texte { display: grid; gap: clamp(14px, 2.4vh, 24px); justify-items: start; }
.d-texte > * { margin: 0; }
.d-texte .sur { color: var(--copper-clair); } .vu.la .sur::before { transform: scaleX(1); transition: transform 900ms cubic-bezier(0.16, 1, 0.3, 1) 200ms; }
.d-chapeau { max-width: 50ch; font-size: clamp(16px, 1.22vw, 21px); line-height: 1.5; color: rgba(247, 241, 227, 0.9); }
.d-voies { display: flex; flex-wrap: wrap; gap: 10px 26px; }
.d-voies a { color: #fff; font: 600 clamp(16px, 1.2vw, 20px)/1.2 DM, sans-serif; text-underline-offset: 5px; } .d-voies a:hover { color: var(--copper-clair); }
.d-form { display: grid; gap: 14px; padding: clamp(22px, 2.4vw, 40px); border: 1px solid rgba(247, 241, 227, 0.2); border-radius: 18px; background: rgba(255, 255, 255, 0.05); }
.d-form .duo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.d-form .champ { display: grid; gap: 7px; }
.d-form .champ span { font: 600 12.5px/1 DM, sans-serif; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(247, 241, 227, 0.78); }
.d-form :is(input, select, textarea) { width: 100%; padding: 14px 15px; border: 1px solid rgba(247, 241, 227, 0.32); border-radius: 8px; background: rgba(255, 255, 255, 0.07); color: #fff; font: 500 clamp(16px, 1.1vw, 18px)/1.3 DM, sans-serif; resize: vertical; }
.d-form select option { color: #16181d; }
.d-form :is(input, select, textarea):focus { outline: 0; border-color: var(--copper-clair); background: rgba(255, 255, 255, 0.12); }
.d-form ::placeholder { color: rgba(247, 241, 227, 0.5); }
.d-form .bouton { justify-content: center; border: 0; cursor: pointer; }
.d-note { min-height: 1.3em; margin: 0; font-size: 14px; color: #ffd9b0; text-align: center; }

/* --- les pages voisines : des panneaux de direction --- */
.directions { display: grid; gap: clamp(24px, 4.4vh, 48px); }
.directions ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 26px); margin: 0; padding: 0; list-style: none; }
.directions li { padding: 3px; background: var(--encre); clip-path: polygon(0 0, calc(100% - 36px) 0, 100% 50%, calc(100% - 36px) 100%, 0 100%); transition: opacity 800ms ease calc(var(--i, 0) * 100ms), translate 1000ms cubic-bezier(0.16, 1, 0.3, 1) calc(var(--i, 0) * 100ms); }
.directions li a { display: grid; gap: 4px; align-content: center; height: 100%; padding: clamp(14px, 1.4vw, 22px) clamp(46px, 4vw, 70px) clamp(14px, 1.4vw, 22px) clamp(18px, 1.6vw, 28px); background: #fff; color: var(--encre); text-decoration: none; clip-path: polygon(0 0, calc(100% - 35px) 0, calc(100% - 1.5px) 50%, calc(100% - 35px) 100%, 0 100%); transition: background 240ms ease, color 240ms ease, padding 420ms cubic-bezier(0.16, 1, 0.3, 1); }
.directions li a b { font: 700 clamp(17px, 1.4vw, 24px)/1.12 Bricolage, DM, sans-serif; letter-spacing: -0.015em; text-transform: uppercase; }
.directions li a small { font: italic 400 clamp(14.5px, 1.05vw, 18px)/1.3 "Iowan Old Style", Baskerville, Georgia, serif; color: #5a5f69; }
.directions li a:hover { background: var(--encre); color: #fff; padding-left: clamp(28px, 2.4vw, 42px); } .directions li a:hover small { color: rgba(255, 255, 255, 0.75); }
.directions li a:focus-visible { outline: 3px solid var(--rouge); outline-offset: 3px; }
.communes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding-top: clamp(18px, 3vh, 28px); border-top: 1px solid #cfcdc7; }
.communes span { margin-right: 10px; font: 700 12px/1 DM, sans-serif; letter-spacing: 0.16em; text-transform: uppercase; color: var(--rouge); }
.communes a { padding: 8px 14px; border: 1.5px solid var(--encre); border-radius: 99px; color: var(--encre); font: 600 clamp(14px, 1vw, 16px)/1 DM, sans-serif; text-decoration: none; transition: background 200ms ease, color 200ms ease; }
.communes a:hover { background: var(--encre); color: #fff; }

@media (max-width: 1080px) { .secteurs { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reponses dl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .directions ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) { .manifeste, .q-locales, .sortie-ville { grid-template-columns: 1fr; } .a-reperes { grid-template-columns: 1fr 1fr; } }
@media (prefers-reduced-motion: reduce) {
  .entree { height: auto; } .entree .stage { position: relative; }
  .entree .mot > span { transform: none; } .arrivee { margin-top: 0; padding-top: clamp(50px, 9vh, 110px); }
  .vu, .e-texte .actions { opacity: 1 !important; translate: 0 0 !important; transition: none !important; }
  .route ol::before, .defiler i { animation: none; }
}

/* --- Téléphone (sous 760 px) : la photo est en hauteur, le titre se range dans le ciel au-dessus du panneau, les boutons dessous --- */
@media (max-width: 760px) {
  .page-route { --marge: 20px; --ecran: 100vh; }
  @supports (height: 100svh) { .page-route { --ecran: 100svh; } }
  .entree .stage { height: var(--ecran); min-height: 0; }
  .entree .stage::before { background: linear-gradient(180deg, rgba(14, 18, 24, 0.72), rgba(14, 18, 24, 0.42) 26%, rgba(14, 18, 24, 0) 46%), linear-gradient(0deg, rgba(14, 18, 24, 0.78), rgba(14, 18, 24, 0) 34%); }
  .e-texte { inset: 78px var(--marge) 74px; width: auto; translate: none; display: flex; flex-direction: column; gap: 12px; }
  .entree h1 { font-size: min(8.6vw, calc((var(--haut-panneau, 40vh) - 128px) / 4.1)); line-height: 1; }
  .e-texte .actions { margin-top: auto; flex-direction: column; align-items: stretch; gap: 12px; text-align: center; }
  .e-texte .actions .bouton { justify-content: center; }
  .e-texte .actions .lien { justify-self: center; align-self: center; color: #fff; }
  .defiler { bottom: 14px; } .defiler i { height: 22px; }
  .arrivee { margin-top: -38vh; }
  .a-lead { font-size: 23px; }
  .a-reperes { gap: 20px 16px; } .a-reperes dt { font-size: 40px; }
  .bloc { padding: 48px var(--marge); }
  .bloc h2, .bande-sombre h2, .sortie-ville h2 { font-size: clamp(30px, 8.6vw, 40px); }
  .captures { flex-wrap: wrap; gap: 16px; } .captures .large { flex: 1 1 100%; } .captures .poche { flex: 0 1 30%; }
  .captures figure:nth-child(even) { translate: 0 0; }
  .secteurs, .reponses dl, .directions ul { grid-template-columns: 1fr; }
  /* la route des étapes descend : la chaussée à gauche, une borne par étape */
  .route ol { grid-template-columns: 1fr; gap: 30px; }
  .route ol::before { left: 15px; right: auto; top: -14px; bottom: -14px; width: 32px; height: auto; background: repeating-linear-gradient(180deg, #f4f3ef 0 22px, transparent 22px 48px) 50% 0 / 3px 100% no-repeat, #2b2e35; animation: none; }
  .route li { min-height: 84px; padding: 4px 0 0 84px; }
}

/* Android peut grossir tout le texte (réglage du téléphone ou de Chrome) : sur ces pages le texte est calé sur des images (panneau, écran, barre du cockpit),
   grossi il déborde. On fige la taille prévue ; le zoom à deux doigts reste possible. */
@media (max-width: 760px) { html:has(.page-route) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; } }

/* la carte de rendez-vous à la place du formulaire : un appel, puis la maquette */
.contact-rdv, .mc-rdv, .d-rdv { display: grid; grid-template-columns: 1fr; gap: 18px; justify-items: start; align-content: center; }
.rdv-titre { margin: 0; font: 600 clamp(20px, 1.6vw, 26px)/1.2 Bricolage, DM, sans-serif; letter-spacing: -0.02em; }
