/* Accueil et démonstrations seulement. */

/* Haut de l'accueil : texte lisible sans 3D, image fixe si la scène ne se charge pas. */
.heros { --p: 0; position: relative; background: var(--encre); }
.heros__scene { position: relative; overflow: clip; }
.heros__repli { position: absolute; top: 0; right: -8%; width: 112vw; max-width: none; mask-image: linear-gradient(180deg, transparent, #000 12%); }
.heros__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.heros__scene::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 30%, var(--encre) 62%); }
.heros__texte { position: relative; z-index: 1; padding-top: 68vw; padding-bottom: 20px; }
.heros h1 { max-width: 13ch; font-size: clamp(2.5rem, 6vw, 5.75rem); font-weight: 300; line-height: 1.04; letter-spacing: -.02em; transform-origin: left bottom; }
.heros h1 em { color: var(--ambre-clair); font-style: normal; }
.heros .chapo { max-width: 34rem; }
.heros__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.5em 0 0; }
.heros__note { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0; padding: 0 var(--gouttiere) 20px; color: #a9b6c9; font-size: .95rem; }
.heros__couper { min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid rgb(148 163 184 / 40%); border-radius: var(--rayon-petit); color: #d7dee9; font: 400 .95rem var(--titres); cursor: pointer; }
.heros__couper:hover { border-color: var(--ambre-clair); color: var(--ambre-clair); }
@media (min-width: 900px) {
	.heros__scene { display: flex; flex-direction: column; justify-content: flex-end; min-height: calc(100svh - 68px); }
	.heros__repli { top: 4%; right: -4%; width: min(68vw, 1040px); }
	.heros__scene::after { background: linear-gradient(90deg, var(--encre) 26%, rgb(15 23 42 / 78%) 46%, transparent 70%), linear-gradient(0deg, var(--encre), transparent 22%); }
	.heros__texte { padding-top: 56px; }
	.heros.avec-3d { height: 200svh; }
	.heros.avec-3d .heros__scene { position: sticky; top: 68px; height: calc(100svh - 68px); }
	.heros.avec-3d .heros__repli { visibility: hidden; }
	.heros.avec-3d h1 { transform: scale(calc(1 + var(--p) * .35)); opacity: calc(1 - max(0, var(--p) - .55) * 2.2); }
	.heros.avec-3d .surtitre, .heros.avec-3d .chapo { opacity: calc(1 - var(--p) * 2.5); }
}

/* Passage : l'ancien site cède la place au nouveau, sans three.js. Sans animation, la frontière reste au milieu. */
.passage { --p: .5; --x: calc(100% - var(--p) * 118%); background: var(--encre); }
.passage__scene { position: relative; display: grid; }
.passage__decor { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.passage .maquette--apres { clip-path: polygon(calc(var(--x) + 12%) 0, 100% 0, 100% 100%, var(--x) 100%); }
.passage .maquette__corps { padding-bottom: 3%; }
.passage .maquette__une { background: linear-gradient(#fff, #fff) 6% 34% / 38% 9% no-repeat, linear-gradient(rgb(255 255 255 / 55%), rgb(255 255 255 / 55%)) 6% 54% / 26% 5% no-repeat, linear-gradient(var(--ambre-clair), var(--ambre-clair)) 6% 76% / 14% 12% no-repeat, linear-gradient(120deg, var(--bleu), #3b5bb5); }
.passage .maquette--apres .maquette__liste b { background: linear-gradient(#cbd5e1, #cbd5e1) 12% 24% / 64% 9% no-repeat, linear-gradient(#e2e8f0, #e2e8f0) 12% 48% / 76% 6% no-repeat, linear-gradient(#e2e8f0, #e2e8f0) 12% 64% / 52% 6% no-repeat, #fff; }
.passage__trait { position: absolute; inset: 0; background: var(--ambre-clair); clip-path: polygon(calc(var(--x) + 12%) 0, calc(var(--x) + 12% + 5px) 0, calc(var(--x) + 5px) 100%, var(--x) 100%); }
.passage__carte { padding: 32px var(--gouttiere); }
.passage__carte h2 { font-size: clamp(2rem, 4.6vw, 4rem); font-weight: 300; }
.passage__carte .migration { margin-top: 14px; }
.passage__note { margin: 14px 0 0; color: #a9b6c9; font-size: .95rem; }
.migration {
	display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 6px 14px;
	padding: 18px 20px; background: rgb(30 41 59 / 75%); border: 1px solid rgb(148 163 184 / 25%); border-radius: var(--rayon);
	color: var(--fond); font: 500 1.08rem var(--titres); text-decoration: none;
	transition: border-color var(--duree), background-color var(--duree);
}
.theme-sombre a.migration { color: var(--fond); }
.theme-sombre a.migration:hover { border-color: var(--ambre-clair); background: var(--encre-2); color: var(--fond); }
.migration svg { color: var(--ambre-clair); }
.migration__ligne { grid-column: 1 / -1; color: #c6d0de; font: 400 1.02rem/1.4 var(--corps); }
@media (min-width: 900px) {
	.passage__scene { min-height: calc(100svh - 68px); align-items: center; justify-items: end; padding: 32px var(--gouttiere); }
	.passage__decor { position: absolute; inset: 0; aspect-ratio: auto; }
	.passage__carte { position: relative; width: min(100%, 480px); border-radius: var(--rayon); box-shadow: var(--ombre); }
	.passage--anime { height: 220svh; }
	.passage--anime .passage__scene { position: sticky; top: 68px; height: calc(100svh - 68px); min-height: 0; }
}

/* Compteurs à rouleaux : uniquement des chiffres vrais. */
.compteurs { padding-block: clamp(40px, 6vw, 80px) 0; }
.compteurs__grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(16px, 3vw, 40px); margin-block: 0; list-style: none; }
.compteurs__grille > li > span { display: block; margin-top: 12px; line-height: 1.3; }
.compteur { display: block; height: 1.6em; padding-top: .2em; background: linear-gradient(#020617, #1e293b 48%, #020617 49%, #1e293b); border: 1px solid rgb(148 163 184 / 25%); border-radius: 10px; color: var(--ambre-clair); font: 300 clamp(3.25rem, 8vw, 7rem)/1.2 var(--titres); text-align: center; }
.compteur__texte { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.compteur__fenetre { display: flex; justify-content: center; height: 1.2em; overflow: hidden; }
.compteur__rouleau { display: block; transition: transform 1.8s cubic-bezier(.2, .8, .2, 1); }
.compteur__rouleau span { display: block; height: 1.2em; }
@media (min-width: 720px) { .compteurs__grille { grid-template-columns: repeat(4, 1fr); } }

/* Titres et offres de l'accueil */
.home h2 { font-weight: 300; font-size: clamp(2rem, 4.6vw, 4rem); line-height: 1.08; letter-spacing: -.02em; }
.offres-accueil { background: var(--encre); }
.offres-accueil .grille-offres { gap: 1px; background: rgb(148 163 184 / 25%); border: 1px solid rgb(148 163 184 / 25%); }
.offres-accueil .offre { background: var(--encre); border: 0; border-radius: 0; }
.offres-accueil .offre:hover { background: var(--encre-2); box-shadow: none; }
.offres-accueil .offre h3 a { color: var(--fond); }
.offres-accueil .offre p { color: #c6d0de; }
.offres-accueil .offre--large { background: var(--bleu); }
.offres-accueil .offre--large h3 { font-size: clamp(1.75rem, 3vw, 2.75rem); font-weight: 300; }
.offres-accueil .offre--large p { font-size: 1.2rem; }
.offre__points { display: grid; gap: 10px; margin: 24px 0 0; padding: 20px 0 0; list-style: none; border-top: 1px solid rgb(255 255 255 / 30%); color: var(--fond); }
.offre__points li { padding-left: 22px; background: linear-gradient(var(--ambre-clair), var(--ambre-clair)) 0 .62em / 12px 3px no-repeat; }
.offres-accueil .offre--large:hover { background: var(--bleu); box-shadow: inset 0 0 0 2px var(--ambre-clair); }
@media (min-width: 1040px) {
	.offres-accueil .grille-offres { grid-template-columns: repeat(4, 1fr); }
	.offres-accueil .offre--large { grid-column: span 2; grid-row: span 2; }
	.offres-accueil .offre:last-child { grid-column: span 2; }
}

/* Appel final de l'accueil */
.home .appel { background: var(--ambre-clair); color: var(--encre); }
.home .appel h2 { color: var(--encre); }
.home .appel .bouton--accent { background: var(--encre); color: var(--fond); }
.home .appel .bouton--accent:hover { background: var(--encre-2); color: var(--fond); }

/* Méthode : sans 3D, une image puis la liste ; avec 3D, l'image reste collée pendant la lecture. */
.scene { padding-block: clamp(40px, 6vw, 80px); border-top: 1px solid rgb(255 255 255 / 8%); }
.scene__intro { max-width: 42rem; }
.scene__corps { display: grid; gap: 28px; }
.scene__cadre { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #0b1220; border: 1px solid rgb(148 163 184 / 18%); border-radius: var(--rayon); }
.scene__repli, .scene__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene__repli { object-fit: cover; }
.avec-3d .scene__repli { visibility: hidden; }
.scene__couper { display: inline-flex; align-items: center; min-height: 44px; margin-top: 10px; padding: 0 14px; background: transparent; border: 1px solid rgb(148 163 184 / 40%); border-radius: var(--rayon-petit); color: #d7dee9; font: 400 .95rem var(--titres); cursor: pointer; }
.scene__couper:hover { border-color: var(--ambre-clair); color: var(--ambre-clair); }
.scene__etapes { margin: 0; padding: 0; list-style: none; }
.scene__etape { position: relative; padding: 16px 0 16px 56px; border-left: 0; }
.scene__etape h3 { margin-bottom: .25em; }
.scene__etape p { margin: 0; color: #c6d0de; }
.scene__num { position: absolute; left: 0; top: 14px; display: grid; place-items: center; width: 38px; height: 38px; border: 1.5px solid rgb(148 163 184 / 45%); border-radius: 50%; color: #d7dee9; font: 500 .95rem var(--titres); transition: background-color var(--duree), border-color var(--duree), color var(--duree); }
.scene__suite { margin: 24px auto 0; }

@media (min-width: 900px) {
	.scene__corps { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
	.scene__visuel { position: sticky; top: 92px; }
	.avec-3d .scene__etape { display: flex; flex-direction: column; justify-content: center; min-height: 62vh; opacity: .42; transition: opacity 240ms; }
	.avec-3d .scene__etape.est-active { opacity: 1; }
	.avec-3d .scene__etape.est-active .scene__num { background: var(--ambre-clair); border-color: var(--ambre-clair); color: var(--encre); }
	.avec-3d .scene__num { top: calc(50% - 44px); }
}

/* Sections de l'accueil */
.section { padding-block: clamp(44px, 6vw, 80px); }
.section--fond { background: var(--fond-2); border-block: 1px solid var(--trait); }
.grille-offres { display: grid; gap: 16px; margin: 1.4em 0 0; padding: 0; list-style: none; }
.offre { position: relative; padding: 22px; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--rayon); transition: border-color var(--duree), box-shadow var(--duree); }
.offre:hover { border-color: var(--bleu); box-shadow: var(--ombre); }
.offre h3 { margin-bottom: .4em; }
.offre h3 a { color: var(--encre); text-decoration: none; }
.offre h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--rayon); }
.offre h3 a:focus-visible { outline: 0; }
.offre h3 a:focus-visible::after { outline: 3px solid var(--ambre-clair); outline-offset: 2px; }
.offre p { margin: 0; color: var(--texte-doux); font-size: 1.05rem; }
.offre--large { background: var(--encre); border-color: var(--encre); }
.offre--large h3 a { color: var(--fond); }
.offre--large p { color: #c6d0de; }
@media (min-width: 720px) { .grille-offres { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .grille-offres { grid-template-columns: repeat(3, 1fr); } .offre--large { grid-column: span 2; } }

.bandeau-partenaires { padding-block: clamp(28px, 4vw, 48px); background: var(--fond); }
.bandeau-partenaires h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.6rem); }
.bandeau-partenaires__note { margin: 0; }
.logos-real a { display: flex; align-items: center; gap: 12px; min-height: 44px; color: inherit; text-decoration: none; }
.logos-real { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 44px; margin: 1.4em 0; padding: 0; list-style: none; }
.logos-real li { display: flex; align-items: center; gap: 12px; color: var(--encre); font: 500 1.05rem var(--titres); }
.logos-real img { width: auto; height: 46px; }
.logos-real li:first-child span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.engagements { display: grid; gap: 14px; margin-top: 1.2em; }
.engagements .engagement { margin: 0; }
@media (min-width: 860px) { .engagements { grid-template-columns: repeat(2, 1fr); } }

/* Maquettes du passage */
.maquette { position: absolute; inset: 0; display: flex; flex-direction: column; font-family: var(--titres); }
.maquette__barre { padding: 10px 16px; font-size: clamp(.8rem, 2vw, 1rem); font-weight: 500; }
.maquette__corps { flex: 1; display: flex; gap: 3%; padding: 3% 3% 62px; min-height: 0; }
.maquette--avant { background: #e7e5e1; color: #3f3f46; }
.maquette--avant .maquette__barre { background: #52525b; color: #fff; }
.maquette__menu { flex: 0 0 22%; display: flex; flex-direction: column; gap: 8%; }
.maquette__menu i { display: block; height: 9%; background: #a8a29e; }
.maquette--avant .maquette__liste { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; }
.maquette--avant .maquette__liste b { background: #fff; border: 1px solid #a8a29e; }
.maquette--apres { background: #f8fafc; color: var(--encre); clip-path: inset(0 0 0 var(--position)); }
.maquette--apres .maquette__barre { background: var(--encre); color: #fff; text-align: right; }
.maquette--apres .maquette__corps { flex-direction: column; }
.maquette__une { flex: 1.1; background: linear-gradient(120deg, var(--bleu), #3b5bb5); border-radius: 8px; }
.maquette--apres .maquette__liste { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3%; }
.maquette--apres .maquette__liste b { background: #fff; border-radius: 8px; box-shadow: var(--ombre); }
