/* Images de haut de page, style 1 (tableaux de bord, profondeur), retenu par Antoine le 02/11/2026.
   Toutes les classes portent le préfixe i3d- : le site a déjà .plan, .fen, .etapes et .pile (mesuré le 02/11).
   Taille : la scène est dessinée en 600 × 480 et mise à l'échelle par --k. */
@font-face { font-family: Clash; src: url(/fonts/ClashGrotesk-Semibold.woff2) format('woff2'); font-weight: 600; }
@font-face { font-family: Switzer; src: url(/fonts/Switzer-Variable.woff2) format('woff2'); font-weight: 100 900; }
.i3d {
  --nuit: #0E1714; --palier: #22312B; --fond2: #1A2521; --trait: #34473F; --texte: #EDE8DD; --gris: #B9C4BE;
  --ocre: #D88C22; --ocre-c: #E9A54B; --bleu: #D3E2EF; --sauge: #D9E5D2; --ocrep: #F4E1BE; --brique: #F1D6CB;
  --clair: #F6F7F4; --encre: #0E1714; --gris-c: #46534D; --vert: #6FA06A;
}
.i3d, .i3d * { box-sizing: border-box; }
.i3d-case { position: relative; width: 600px; height: 480px; background: var(--nuit); overflow: hidden; border-radius: 4px; }

/* ═══ STYLE 1 : tableaux de bord dans un plan incliné ═══════════════════════ */
.i3d-s1 { perspective: 1500px; }
.i3d-plan { position: absolute; inset: 0; transform-style: preserve-3d; transform-origin: 50% 50%;
  transform: translate(-4px, 12px) scale(.82) rotateX(calc(16deg + var(--rx, 0deg))) rotateY(calc(-24deg + var(--ry, 0deg))) rotateZ(2deg);
  transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.i3d-sol { position: absolute; inset: -40px; transform: translateZ(-40px);
  background-image: radial-gradient(circle, #2A3B34 1.2px, transparent 1.4px); background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 55%, #000 30%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 55%, #000 30%, transparent 72%); }
.i3d-pn { transform: translateZ(var(--z)); position: absolute; background: var(--palier); border: 1px solid var(--trait); border-radius: 10px; color: var(--texte);
  padding: 16px 18px; overflow: hidden;
  box-shadow: 0 2px 0 rgba(255,255,255,.04) inset, 18px 26px 0 -6px rgba(0,0,0,.28), 30px 50px 60px rgba(0,0,0,.5); }
.i3d-pn--clair { background: var(--clair); color: var(--encre); border-color: #D2DAD4; }
.i3d-pn--ocre { background: var(--ocrep); color: var(--encre); border-color: #E6CB98; }
.i3d-pn--sauge { background: var(--sauge); color: var(--encre); border-color: #BCCDB3; }
.i3d-pn--bleu { background: var(--bleu); color: var(--encre); border-color: #B3C9DD; }
.i3d-pn--brique { background: var(--brique); color: var(--encre); border-color: #DDB9AA; }
.i3d-pn--centre { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.i3d-pn--carte { display: flex; gap: 14px; align-items: center; padding: 12px; }
.i3d-pn--tel { border-radius: 18px; padding: 10px; }
.i3d-pn--tel-img { padding: 6px; border-radius: 18px; background: #111; }
.i3d-tel-img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 13px; display: block; }
.i3d-pn__t { font: 600 17px Clash; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.i3d-pn__t span { font: 400 11px Switzer; opacity: .7; }
.i3d-pn__t--g { font-size: 15px; line-height: 1.2; }
.i3d-pn__s { margin: 0; font-size: 12px; opacity: .75; }
.i3d-pn__mini { margin: 4px 0; font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.i3d-pn__note { font-size: 11px; color: var(--gris-c); margin: 8px 0 0; }
.i3d-kpi__lib { margin: 0; font-size: 11.5px; opacity: .78; }
.i3d-kpi__val { margin: 2px 0 0; font: 600 30px/1.05 Clash; }
.i3d-kpi__sous { margin: 3px 0 0; font-size: 11.5px; opacity: .75; }
.i3d-pn--clair .i3d-kpi__lib, .i3d-pn--ocre .i3d-kpi__lib, .i3d-pn--sauge .i3d-kpi__lib, .i3d-pn--bleu .i3d-kpi__lib, .i3d-pn--brique .i3d-kpi__lib { color: var(--gris-c); opacity: 1; }

.i3d-l { display: block; height: 7px; border-radius: 3px; background: #CCD5CF; margin: 7px 0; }
.i3d-l--t { height: 11px; background: #8FA197; }
.i3d-pn:not(.i3d-pn--clair) .i3d-l { background: #3A4D45; }
.i3d-bt { display: inline-block; margin-top: 8px; background: var(--ocre); color: var(--nuit); font: 600 11px Switzer; padding: 6px 10px; border-radius: 4px; }
.i3d-bt--p { font-size: 9px; padding: 4px 6px; }
.i3d-fen { margin: -16px -18px; height: calc(100% + 32px); display: flex; flex-direction: column; }
.i3d-fen__barre { display: flex; gap: 5px; align-items: center; padding: 8px 10px; background: #E3E9E5; border-bottom: 1px solid #D2DAD4; font-size: 10.5px; color: var(--gris-c); }
.i3d-pn:not(.i3d-pn--clair) .i3d-fen__barre { background: #1A2521; border-color: var(--trait); color: var(--gris); }
.i3d-fen__barre b { width: 7px; height: 7px; border-radius: 50%; background: #B9C4BE; }
.i3d-fen__barre span { margin-left: 8px; }
.i3d-fen__corps { padding: 12px 16px; flex: 1; overflow: hidden; }
.i3d-fen--img .i3d-fen__corps { padding: 0; }
.i3d-fen--img img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.i3d-wf-nav { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 10px; }
.i3d-wf-nav i { width: 34px; height: 6px; border-radius: 3px; background: #CCD5CF; }
.i3d-wf-blocs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.i3d-wf-blocs i { height: 54px; border-radius: 5px; background: #E3E9E5; border: 1px solid #D2DAD4; }
.i3d-wf-blocs--v { grid-template-columns: 1fr; gap: 6px; }
.i3d-wf-blocs--v i { height: 40px; }
.i3d-tel { height: 100%; padding: 6px 4px; }

.i3d-carte-mini { width: 110px; height: 100%; min-height: 100px; border-radius: 6px; flex: none; display: grid; place-items: center;
  background: #DCE6DF; background-image: linear-gradient(#C9D5CD 1px, transparent 1px), linear-gradient(90deg, #C9D5CD 1px, transparent 1px); background-size: 18px 18px; }
.i3d-pn--carte .i3d-carte-mini { background-color: #1A2521; background-image: linear-gradient(#2A3B34 1px, transparent 1px), linear-gradient(90deg, #2A3B34 1px, transparent 1px); }
.i3d-carte-mini--g { width: auto; height: 130px; margin: -16px -18px 12px; border-radius: 0; }
.i3d-carte-mini--p { float: right; width: 70px; min-height: 70px; height: 70px; margin-left: 10px; }
.i3d-fiche-c .i3d-bts { display: flex; gap: 6px; margin-top: 10px; }
.i3d-fiche-c s { text-decoration: none; font-size: 11px; padding: 4px 8px; border: 1px solid #B9C4BE; border-radius: 4px; }
.i3d-fiche-c s:first-child { background: var(--ocre); border-color: var(--ocre); color: var(--nuit); font-weight: 600; }

.i3d-statuts { list-style: none; margin: 0; padding: 0; }
.i3d-statuts li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; padding: 7px 0; border-bottom: 1px dashed var(--trait); font-size: 12.5px; }
.i3d-statuts li b { font-weight: 600; }
.i3d-statuts li em { font-style: normal; opacity: .72; font-size: 11.5px; }
.i3d-statuts--g li { padding: 9px 0; font-size: 13px; }
.i3d-pt { width: 10px; height: 10px; border-radius: 50%; background: var(--ocre); flex: none; box-shadow: 0 0 0 3px rgba(216,140,34,.18); }
.i3d-pt--ok { background: var(--vert); box-shadow: 0 0 0 3px rgba(111,160,106,.22); }

.i3d-jauge { position: relative; display: grid; place-items: center; }
.i3d-jauge p { position: absolute; margin: 0; text-align: center; display: flex; flex-direction: column; align-items: center; }
.i3d-jauge b { font: 600 28px/1 Clash; }
.i3d-jauge b.i3d-b-s { font-size: 19px; }
.i3d-jauge span { font-size: 11px; opacity: .8; margin-top: 3px; max-width: 70px; line-height: 1.2; }
.i3d-legende-d { font-size: 11px; margin: 10px 0 0; display: flex; flex-direction: column; gap: 4px; }
.i3d-legende-d span { display: flex; align-items: center; gap: 6px; }
.i3d-legende-d i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.i3d-prix { list-style: none; margin: 4px 0 0; padding: 0; }
.i3d-prix--s li { padding: 7px 0; font-size: 13px; }
.i3d-prix--s em { font-size: 15px; }
.i3d-prix li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid #E0E6E2; font-size: 14px; }
.i3d-prix em { font-style: normal; font: 600 17px Clash; color: #8C520A; }
.i3d-prog { height: 8px; background: var(--trait); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.i3d-prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--ocre) 0 24%, transparent 24% 25%, var(--ocre) 25% 49%, transparent 49% 50%, var(--ocre) 50% 74%, transparent 74% 75%, var(--ocre) 75%); }
.i3d-bulle { background: #1A2521; border: 1px solid var(--trait); border-radius: 10px 10px 10px 2px; padding: 8px 12px; width: 70%; margin-bottom: 12px; }
.i3d-bulle--moi { margin-left: auto; background: var(--ocrep); border-color: #E6CB98; border-radius: 10px 10px 2px 10px; }
.i3d-bulle--moi .i3d-l { background: #D9C394 !important; }
.i3d-recherche { border: 1px solid #C9D3CD; border-radius: 6px; padding: 7px 12px; font-size: 12px; margin-bottom: 12px; background: #fff; }
.i3d-res { padding: 6px 0 8px; border-bottom: 1px solid #E0E6E2; }
.i3d-res small { font-size: 10px; font-weight: 700; color: var(--gris-c); }
.i3d-res b { display: block; font-size: 13px; color: #1F4E8C; margin: 2px 0; }
.i3d-res span { font-size: 10.5px; color: #3D6B3A; }
.i3d-res--pub, .i3d-res--moi { background: #FFF6E6; margin: 0 -10px; padding: 8px 10px; border-radius: 6px; border: 1px solid #EBD3A6; }
.i3d-pile { display: flex; gap: 4px; margin-top: 10px; }
.i3d-pile i { font-style: normal; font-size: 11.5px; padding: 18px 8px; border-radius: 5px; background: var(--ocrep); color: var(--encre); text-align: center; }
.i3d-pile i.i3d-pile--g { background: transparent; border: 1px dashed var(--gris); color: var(--texte); }
.i3d-tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.i3d-tuiles div { border: 1px solid #D2DAD4; border-radius: 7px; padding: 12px 8px; font-size: 12px; font-weight: 600; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.i3d-tuiles i { font-style: normal; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 6px; background: var(--bleu); color: #1F4E8C; font-size: 14px; }
.i3d-points { display: flex; gap: 6px; margin-top: 10px; }
.i3d-points i { width: 14px; height: 14px; border-radius: 3px; background: #7FA3C4; }
.i3d-cal6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 6px; }
.i3d-cal6 div { border: 1px solid var(--trait); border-radius: 6px; padding: 8px 6px 10px; display: flex; flex-direction: column; gap: 6px; align-items: center; background: #1A2521; }
.i3d-cal6 span { font-size: 11px; opacity: .75; }
.i3d-cal6 i { width: 100%; height: 22px; border-radius: 4px; background: #7FA3C4; }
.i3d-etapes { margin: 6px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12.5px; }
.i3d-etapes b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; background: var(--ocre); color: var(--nuit); font: 600 12px Clash; margin-right: 7px; }
.i3d-balise { display: inline-block; font: 600 12px Clash; background: var(--ocrep); padding: 2px 7px; border-radius: 4px; margin: 4px 0 0; }


/* ═══ ANIMATION ═════════════════════════════════════════════════════════════
   Seuls transform, translate et opacity bougent : le navigateur les confie à la carte
   graphique, sans recalculer la page. Les ombres ne s'animent jamais. */
@keyframes pose { from { opacity: 0; transform: translate3d(0, -18px, calc(var(--z) + 90px)); } }
@keyframes flotte { 50% { translate: 0 -5px; } }
@keyframes allume { from { opacity: 0; } }
@keyframes remplit { from { transform: scaleX(0); } }

/* 1. Assemblage, joué une fois : les panneaux se posent l'un après l'autre, puis les jauges se remplissent. */
.a-assemblage .i3d-pn { animation: pose .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 110ms) both; }
.a-assemblage .i3d-seg { animation: allume .3s ease-out calc(.6s + var(--j) * 70ms) both; }
.a-assemblage .i3d-arc { animation: allume .5s ease-out calc(.6s + var(--j) * 250ms) both; }
.a-assemblage .i3d-points i, .a-assemblage .i3d-cal6 div { animation: allume .3s ease-out calc(.6s + var(--j) * 60ms) both; }
.i3d-prog i { transform-origin: 0 50%; }
.a-assemblage .i3d-prog i { animation: remplit 1s cubic-bezier(.3, .7, .2, 1) .7s both; }

/* 2. Flottement lent, seulement quand l'image est à l'écran (.i3d-vu posé par animation.js). */
.a-flotte .i3d-vu .i3d-pn { animation: flotte calc(5s + var(--i) * .7s) ease-in-out calc(var(--i) * -1.3s) infinite; }
.a-assemblage.a-flotte .i3d-vu .i3d-pn { animation: pose .8s cubic-bezier(.2, .8, .2, 1) calc(var(--i) * 110ms) both,
  flotte calc(5s + var(--i) * .7s) ease-in-out calc(1.2s + var(--i) * .3s) infinite; }

/* 3. L'inclinaison à la souris passe par --rx et --ry (animation.js), lissée par la transition de .i3d-plan. */

@media (prefers-reduced-motion: reduce) {
  .i3d-pn, .i3d-seg, .i3d-arc, .i3d-points i, .i3d-cal6 div, .i3d-prog i { animation: none !important; }
  .i3d-plan { transition: none; }
}

/* ═══ MISE À L'ÉCHELLE DANS LE HAUT DE PAGE ═══════════════════════════════
   02/11 : agrandi à la demande d'Antoine (+20 %). L'image dépasse sa colonne : elle mord un peu
   sur l'espace du texte (--ml) et surtout sur la marge droite. Les +20 % ne tiennent qu'au-delà de
   1 380 px : en dessous, la marge droite et l'espace du texte manquent (mesuré, verifier-pages.js).
   Sur téléphone, plafonnée à la largeur de l'écran moins 2 × 16 px. */
.i3d { --k: 1; --ml: 0px; position: relative; width: calc(600px * var(--k)); height: calc(480px * var(--k)); margin: 0; }
.i3d > .i3d-case { position: absolute; left: 0; top: 0; transform: scale(var(--k)); transform-origin: 0 0; }
.i3d.fig-hero, .hero:not(.hero--page) .i3d { max-width: none; justify-self: start; margin-left: var(--ml); }
.i3d.fig-hero { --k: .92; --ml: -16px; }                                        /* 552 px pour une colonne de 460 : +20 % */
.hero:not(.hero--page) .i3d { --k: .94; --ml: -16px; grid-column: 2; grid-row: 1 / 3; align-self: center; }   /* 564 px, colonne de 470 */
@media (max-width: 1380px) { .i3d.fig-hero { --k: .84; --ml: -12px; } .hero:not(.hero--page) .i3d { --k: .86; --ml: -12px; } }  /* 504 et 516 px : +9 % */
@media (max-width: 1180px) { .i3d.fig-hero, .hero:not(.hero--page) .i3d { --k: .72; --ml: -8px; } }                              /* 432 px, colonne de 400 : +8 % */
@media (max-width: 1000px) { .i3d.fig-hero { --ml: -14px; } }   /* à 900 px, la marge droite manquait de 2 px (mesuré le 02/11) */
@media (max-width: 860px) {
  .i3d.fig-hero, .hero:not(.hero--page) .i3d { --k: .72; --ml: 0px; }                                                            /* 432 px */
  .hero:not(.hero--page) .i3d { grid-column: 1; grid-row: 3; margin-top: 36px; margin-bottom: 10px; }
}
@media (max-width: 470px) { .i3d.fig-hero, .hero:not(.hero--page) .i3d { --k: .595; } }           /* 357 px : 390 − 2 × 16 */
@media (max-width: 380px) { .i3d.fig-hero, .hero:not(.hero--page) .i3d { --k: .545; } }           /* 327 px : 360 − 2 × 16 */
@media (max-width: 350px) { .i3d.fig-hero, .hero:not(.hero--page) .i3d { --k: .475; } }           /* 285 px : 320 − 2 × 16 */
