/* Scènes 3D (Three.js) : même langage que le site, trait + 3 nuances, ombres douces. */
[data-3d] { position: relative; }
[data-3d] canvas { display: block; width: 100%; height: 100%; }
.h3d { height: clamp(300px, 40vw, 540px); max-width: 1240px; margin: 28px auto 0; }
/* Héros : le décor remplit le cadre (cadrage dans scene3d.js) ; cadre plus bas et plus près des boutons,
   pour que la scène soit en vue dès l'arrivée ; un halo de la couleur du métier derrière le plateau */
.hero-illu.h3d { margin-top: 18px; height: min(clamp(300px, 40vw, 540px), max(300px, 100svh - 330px)); }
.h3d::before { content: ""; position: absolute; inset: 8% 4% 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--h3d-acc, #1D9E75) 14%, transparent), transparent); }
.h3d[data-scene="accueil"] { --h3d-acc: #1D9E75; }
.h3d[data-scene="accueil"]::before { display: none; }   /* style aoutive : pas de halo coloré */
.h3d[data-scene="chantier"] { --h3d-acc: #F2A900; }
.h3d[data-scene="vitrine"], .h3d:not([data-scene]) { --h3d-acc: #E2583E; }
.h3d[data-scene="immeuble"] { --h3d-acc: #3E7CB1; }
.h3d[data-scene="domaine"] { --h3d-acc: #E0A93B; }
.h3d[data-scene="formation"] { --h3d-acc: #D98A2B; }
.h3d[data-scene="garage"] { --h3d-acc: #2F6FE0; }
.h3d canvas { position: relative; pointer-events: none; }
/* le héros 3D apparaît en fondu quand il est prêt (construit après le chargement de la page) */
.h3d > canvas, .h3d > .h3d-tags { opacity: 0; transition: opacity .5s ease; }
.h3d.pret > canvas, .h3d.pret > .h3d-tags { opacity: 1; }
.no3d .h3d > canvas { display: none; }
.card-illu[data-3d] { height: 190px; margin: 0 -6px 16px; }
.ind-illu[data-3d] { width: auto; height: 128px; margin: -6px -8px 12px; overflow: hidden; }
.method-illu[data-3d] { min-height: 420px; }
.method-illu[data-3d] canvas { position: relative; max-width: 620px; height: 420px; margin: 0 auto; }
.cta-illu[data-3d] { height: 320px; }
.flow-illu[data-3d] { height: auto; }
.integ-illu[data-3d] { height: 280px; max-width: 900px; margin: 8px auto 28px; }
.stats-illu[data-3d] { height: 240px; max-width: 760px; margin: 24px auto -8px; }
@media (max-width: 960px) { .flow-illu[data-3d] { height: 340px; } .flow-illu[data-3d] canvas { position: relative; } }
@media (max-width: 700px) { .integ-illu[data-3d] { height: 170px; margin-bottom: 16px; } .stats-illu[data-3d] { height: 200px; } }
@media (max-width: 900px) { .cta-illu[data-3d] { height: 260px; } .method-illu[data-3d], .method-illu[data-3d] canvas { min-height: 300px; height: 300px; } }

/* Étiquettes de la scène d'accueil, dans le style des cartes du site */
.h3d-tags { position: absolute; inset: 0; pointer-events: none; }
.h3d-tag { position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 9px 13px 9px 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 12px 28px -12px rgba(0,0,0,.18);
  font: 500 13px/1.25 var(--font-b, Inter, sans-serif); color: var(--ink); white-space: nowrap; text-align: left;
  max-width: calc(100% - 16px);
  opacity: 0; transform: translate(-50%, -100%) translateY(8px) scale(.96);
  transition: opacity .45s cubic-bezier(.2,.7,.2,1), transform .6s cubic-bezier(.34,1.4,.64,1); will-change: transform; }
.h3d-tag.on { opacity: 1; transform: translate(-50%, -100%) translateY(0) scale(1); }
.h3d-tag small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.h3d-tag .ic { flex: none; width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--line-2); background: var(--surface-2); }
.h3d-tag .ic svg { width: 14px; height: 14px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.h3d-tag .ic { box-shadow: inset 0 -2px 0 var(--h3d-acc, transparent); }
.h3d-tag.ok .ic { background: #1D9E75; border-color: #1D9E75; box-shadow: none; }
.h3d-tag.ok .ic svg { stroke: #fff; }
.h3d-tag .num { font-family: var(--font-n, Geist, sans-serif); font-variant-numeric: tabular-nums; }
.h3d-tag.hot .ic { background: #1a1a1a; border-color: #1a1a1a; box-shadow: none; }
.h3d-tag.hot .ic svg { stroke: #fff; }
/* signal « chaud » : couleur du métier (trait sombre sur les jaunes) */
.h3d[data-scene] .h3d-tag.hot .ic { background: var(--h3d-acc); border-color: var(--h3d-acc); }
.h3d[data-scene="chantier"] .h3d-tag.hot .ic svg, .h3d[data-scene="domaine"] .h3d-tag.hot .ic svg { stroke: #1a1a1a; }
@media (max-width: 700px) { .h3d-tag { font-size: 11.5px; padding: 7px 10px 7px 8px; gap: 8px; white-space: normal; width: max-content; max-width: calc(100% - 16px); } .h3d-tag small { font-size: 10.5px; } .h3d-tag .ic { width: 22px; height: 22px; } .h3d-tag.opt { display: none; } }
.no3d [data-3d] canvas { display: none; }
.hero h1 .dim { color: var(--dim, #9b9b9b); }
@media (max-width: 700px) { .h3d, .hero-illu.h3d { height: 360px; margin-top: 28px; } }
/* Téléphone : la caméra suit l'étape en cours ; l'étiquette devient une légende sous la scène, avec le numéro d'étape */
.h3d-mob .h3d-tag { width: calc(100% - 16px); max-width: 420px; padding: 9px 12px 9px 10px; font-size: 13px; }
.h3d-mob .h3d-tag small { font-size: 11.5px; }
.h3d-mob .h3d-tag::after { content: attr(data-n); margin-left: auto; align-self: flex-start; font: 500 11px/1 var(--font-n, Geist, sans-serif); color: var(--muted); }
.h3d-mob::before { inset: 0 0 60px; }
@media (prefers-reduced-motion: reduce) { .h3d-tag { transition: none; } }

/* Syndics : étiquette « urgent » (pastille rouge), seul rouge du site */
.h3d-tag.urg .ic { background: #D64545; border-color: #D64545; }
.h3d-tag.urg .ic svg { stroke: #fff; stroke-width: 2.4; }

/* Organismes de formation (/formation) : scènes « veille », « contrôle OPCO », « audit » */
.of-illu[data-3d] { height: 380px; }
@media (max-width: 700px) { .of-illu[data-3d] { height: 260px; } }

/* Téléphone (≤ 768 px) avec mouvement réduit : aucune scène 3D, rien à la place (mise en page préservée) */
.no3d-fixe .hero-illu, .no3d-fixe .card-illu, .no3d-fixe .flow-illu, .no3d-fixe .method-illu, .no3d-fixe .cta-illu, .no3d-fixe .integ-illu, .no3d-fixe .stats-illu, .no3d-fixe .ind-illu { display: none; }
.no3d-fixe .flow { grid-template-columns: 1fr; }
.no3d-fixe .method { grid-template-columns: 1fr; }

