/* Style v2 (retenu par Olivier le 5 déc.) : typographie éditoriale, profondeur de couleur, défilement raconté, photos qui se dévoilent.
   Chargé par toutes les pages, par-dessus style.css. */

/* ---------- Profondeur de couleur : blanc cassé chaud + bandes vert forêt */
body.v2 { --chaud: #f7f4ec; --foret: #0f3f1f; --foret-doux: #c7d8c1; background: var(--chaud); }
body.v2 .entete { background: transparent; }
body.v2 .bande-pale { background: #efebe0; }
body.v2 .logo-case { background: var(--chaud); }
body.v2 .logo-case img { mix-blend-mode: multiply; }
body.v2 .sans-photo { background-color: #e6e1d3; }
.v2-sombre { background: var(--foret); color: #fff; }
.v2-sombre .chiffres { border: 0; }
.v2-sombre .chiffres b { color: var(--lime); }
.v2-sombre .chiffres span { color: var(--foret-doux); }

/* ---------- Typographie éditoriale : titres plus grands et plus serrés, plus d'air */
body.v2 h1 { font-size: clamp(3rem, 6.4vw, 6.1rem); line-height: .96; letter-spacing: -0.045em; }
body.v2 h2 { font-size: clamp(2.1rem, 4.2vw, 3.9rem); line-height: 1.02; letter-spacing: -0.035em; }
body.v2 .section { padding-top: clamp(80px, 11vw, 160px); padding-bottom: clamp(80px, 11vw, 160px); }
body.v2 .haut-texte .chapeau { font-size: 1.35rem; max-width: 30ch; }
body.v2 .deux:not(:has(form)) { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 6vw, 96px); align-items: end; }
body.v2 .deux .d .chapeau, body.v2 .deux .d .doux { font-size: 1.08rem; line-height: 1.7; }
body.v2 .faq summary { font-size: 1.2rem; }

/* ---------- Défilement raconté (cycle) */
.raconte { background: var(--foret); color: #fff; }
.raconte-grille { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 80px); align-items: center; padding-top: 96px; padding-bottom: 96px; }
.raconte h2 { color: #fff; margin-bottom: 40px; }
.raconte-texte { position: relative; padding-left: 32px; }
.raconte-piste { position: absolute; left: 4px; top: calc(clamp(2.1rem, 4.2vw, 3.9rem) * 1.02 + 52px); bottom: 56px; width: 1px; background: rgba(255,255,255,.18); }
.raconte-rempli { position: absolute; left: 0; top: 0; width: 1px; height: 0; background: var(--lime); }
.raconte-etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.raconte-etapes li { position: relative; }
.raconte-etapes li::before { content: ""; position: absolute; left: -32px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--foret); border: 1.5px solid rgba(255,255,255,.4); }
.raconte-etapes b { display: block; font-weight: 500; font-size: 1.5rem; letter-spacing: -0.02em; color: #fff; }
.raconte-etapes span { display: block; margin-top: 6px; color: var(--foret-doux); max-width: 34ch; }
.raconte-retour { margin: 32px 0 0; font-size: .9rem; color: var(--foret-doux); }
.raconte-retour::before { content: "↺"; margin-right: 8px; color: var(--lime); }
.raconte-photos { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #154a27; }
.raconte-photos img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.raconte-photos img:not(:first-child) { display: none; }
.raconte-mobile { display: none; }

/* Mode raconté : seulement avec le script, sur grand écran, sans « réduire les animations » */
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  html.js .raconte { height: 360vh; }
  html.js .raconte-collant { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
  html.js .raconte-grille { width: 100%; }
  html.js .raconte-etapes li { opacity: .32; transition: opacity .5s ease; }
  html.js .raconte-etapes li.actif { opacity: 1; }
  html.js .raconte-etapes li.actif::before { background: var(--lime); border-color: var(--lime); }
  html.js .raconte-photos img:not(:first-child) { display: block; }
  html.js .raconte-photos img { opacity: 0; transform: scale(1.06); transition: opacity .8s ease, transform 1.4s cubic-bezier(.2,.7,.2,1); }
  html.js .raconte-photos img.actif { opacity: 1; transform: none; }
}
/* Téléphone, tablette en portrait, mouvement réduit ou sans script : les quatre étapes à la suite, chacune avec sa photo */
@media (max-width: 900px) {
  .raconte-grille { grid-template-columns: 1fr; padding-top: 72px; padding-bottom: 72px; }
  .raconte-photos { display: none; }
  .raconte-mobile { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; margin-top: 16px; }
  .raconte-piste { display: none; }
  .raconte-etapes { gap: 40px; }
}

/* ---------- Photos qui se dévoilent */
.v2-plein { margin: 0; position: relative; }
.v2-plein img { display: block; width: 100%; height: min(82vh, 760px); object-fit: cover; }
.v2-plein figcaption { padding-top: 12px; padding-bottom: 12px; font-size: .85rem; color: var(--doux); }
@media (prefers-reduced-motion: no-preference) {
  html.js .devoile { clip-path: inset(9% 7% 9% 7%); transition: clip-path 1.4s cubic-bezier(.65,0,.25,1); }
  html.js .devoile img { transform: scale(1.12); transition: transform 1.8s cubic-bezier(.2,.7,.2,1); }
  html.js .devoile.vu { clip-path: inset(0); }
  html.js .devoile.vu img { transform: none; }
  /* Mosaïques : les cases montent l'une après l'autre */
  html.js body.v2 .mosaique .tuile { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
  html.js body.v2 .mosaique.vu .tuile { opacity: 1; transform: none; }
  html.js body.v2 .mosaique.vu .tuile:nth-child(2) { transition-delay: .08s; }
  html.js body.v2 .mosaique.vu .tuile:nth-child(3) { transition-delay: .16s; }
  html.js body.v2 .mosaique.vu .tuile:nth-child(4) { transition-delay: .24s; }
  html.js body.v2 .mosaique.vu .tuile:nth-child(5) { transition-delay: .32s; }
}

@media (max-width: 900px) {
  body.v2 .deux:not(:has(form)) { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 600px) {
  body.v2 h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  body.v2 .haut-texte .chapeau { font-size: 1.05rem; }
  .v2-plein img { height: 56vh; }
}

/* ---------- Pages intérieures */
body.v2 .tete-page h1 { font-size: clamp(2.6rem, 5.4vw, 4.9rem); max-width: 18ch; }
body.v2 .tete-page { padding-top: clamp(56px, 8vw, 120px); padding-bottom: clamp(48px, 6vw, 88px); }
body.v2 .tete-page .chapeau { font-size: 1.25rem; max-width: 46ch; }
body.v2 .espace-corps h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
body.v2 .bande-image { background: #e6e1d3; }
body.v2 .formulaire input, body.v2 .formulaire select, body.v2 .formulaire textarea { background: #fff; }
body.v2 .acces col.col-blanc { background: #fff; }
body.v2 .bandeau-demo, body.v2 .note-projet { background: #efebe0; }
body.v2 .espaces-liste a { background: #efebe0; }
@media (hover: hover) { body.v2 .espaces-liste a:hover { background: #e6e1d3; } }
/* Les intertitres du pied de page gardent leur taille (le grand h2 éditorial ne vaut que pour les sections) */
body.v2 .pied-col h2 { font-size: .95rem; line-height: 1.4; letter-spacing: 0; }
@media (max-width: 600px) {
  body.v2 .tete-page h1 { font-size: clamp(2.1rem, 9vw, 2.8rem); }
  body.v2 .tete-page .chapeau { font-size: 1.05rem; }
}

/* ---------- Resserrement (demande d'Olivier du 5 déc. : trop d'espace libre, moins de crans de molette) */
body.v2 .section { padding-top: clamp(44px, 5vw, 76px); padding-bottom: clamp(44px, 5vw, 76px); }
body.v2 .tete-page { padding-top: clamp(36px, 4.5vw, 64px); padding-bottom: clamp(28px, 3.5vw, 48px); }
body.v2 .tete-page .chapeau { margin-top: 16px; }
body.v2 .haut-plante { min-height: min(calc(100vh - 92px), 660px); padding-bottom: 24px; }
body.v2 .haut-texte .chapeau { margin: 24px 0 28px; }
body.v2 .bande-image { height: clamp(170px, 24vw, 360px); }
.v2-plein img { height: min(54vh, 500px); }
.raconte-grille { padding-top: 64px; padding-bottom: 64px; }
.raconte h2 { margin-bottom: 28px; }
.raconte-etapes { gap: 20px; }
body.v2 .chiffres ul { padding-top: 22px; padding-bottom: 22px; }
body.v2 .mosaique { margin-top: 36px; }
body.v2 .m5 .cadre-img { aspect-ratio: 1 / 1; }
body.v2 .m3 .cadre-img { aspect-ratio: 16 / 10; }
body.v2 .vitrine { margin-top: 32px; }
body.v2 .ecran img { max-height: 460px; object-fit: cover; object-position: left top; }
body.v2 .equipe-bande { margin-top: 32px; }
body.v2 .lignes > li { padding: 20px 0; }
body.v2 .outil.large { padding: 28px 0; }
body.v2 .groupe { padding-top: 36px; }
body.v2 .grille-gens { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 20px; }
body.v2 .publications li { padding: 14px 0; }
body.v2 .espace { padding-bottom: 64px; }
body.v2 .espace-corps section { padding-top: 32px; margin-top: 32px; }
body.v2 .bandeau-demo { margin-bottom: 28px; }
body.v2 .pied { padding-top: 48px; padding-bottom: 28px; }
body.v2 .pied-bas { margin-top: 36px; }
body.v2 .fermeture-in { padding-top: 56px; padding-bottom: 56px; }
body.v2 .deux:not(:has(form)) { gap: clamp(24px, 4vw, 64px); }
body.v2 .espaces-accueil .deux + div { margin-top: 32px !important; }
@media (max-width: 900px) { body.v2 .grille-gens { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  body.v2 .grille-gens { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  body.v2 .section { padding-top: 40px; padding-bottom: 40px; }
  .v2-plein img { height: 40vh; }
  .raconte-mobile { aspect-ratio: 16 / 9; }
  .raconte-etapes { gap: 28px; }
}
@media (min-width: 901px) and (prefers-reduced-motion: no-preference) { html.js .raconte { height: 200vh; } }
.v2-plein img { height: min(46vh, 440px); }
body.v2 .faq summary { padding: 15px 0; }
body.v2 .espaces-liste a { padding: 22px 20px; }
body.v2 .tete-page h1 { font-size: clamp(2.4rem, 4.6vw, 4.2rem); }
body.v2 .m5 .cadre-img { aspect-ratio: 4 / 3; }
body.v2 .m3 .cadre-img { aspect-ratio: 2 / 1; }
body.v2 .ecran img { max-height: 400px; }
@media (max-width: 600px) { body.v2 .m5 .cadre-img { aspect-ratio: 4 / 5; } body.v2 .m3 .cadre-img { aspect-ratio: 4 / 3; } }
/* Administration (démo) */
.admin-bloc { margin-top: 36px; }
.admin-bloc h2 { font-size: 1.5rem !important; margin-bottom: 16px; }
.table-admin { width: 100%; border-collapse: collapse; background: #fff; font-size: .95rem; }
.table-admin th, .table-admin td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--filet); vertical-align: middle; }
.table-admin th { font-weight: 500; color: var(--doux); font-size: .88rem; background: #efebe0; }
.table-admin .act { font: inherit; font-size: .88rem; color: var(--vert); background: none; border: 0; padding: 0; cursor: default; }
.st { font-size: .85rem; }
.st-attente { color: #8a5a00; }
.table-admin td:last-child { white-space: nowrap; }
body.v2 .espace > h1 { font-size: clamp(2.2rem, 4vw, 3.4rem); }
