/* Visite 3D intérieure d'un réacteur de 900 MW (gabarit visite-reacteur.html) : CSS de la maquette validée
   docs/projets-tempo/maquettes-reacteurs/7-visite-interieure/, tout sous .vr. */
:root { --ombre: 0 1px 2px rgba(14, 26, 38, .05), 0 8px 24px -12px rgba(14, 26, 38, .18); --ombre-haute: 0 2px 4px rgba(14, 26, 38, .06), 0 22px 44px -18px rgba(14, 26, 38, .28); --r1: #1b4fd6; --r2: #3a6cf0; --r4: #7fa0f7; --r6: #b9cbfb; --sc-ciel-a: #b9d3f1; --sc-ciel-b: #eef4fa; --chaud: #e8693f; --vapeur: #8a9bb0; --alim: #3f86d6; --mer: #1f9b8f; --elec: #c58a00; --ok: #157a45; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6); --ombre-haute: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -18px rgba(0, 0, 0, .75); --r1: #2f63e6; --r2: #4f7dff; --r4: #86a6ff; --r6: #bccfff; --sc-ciel-a: #08142a; --sc-ciel-b: #1a2d4d; --chaud: #ff9a6b; --vapeur: #c9d4e2; --alim: #8fc0ff; --mer: #4fd6c4; --elec: #ffd166; --ok: #6fd39b; }
}
:root[data-theme="dark"] { --ombre: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -14px rgba(0, 0, 0, .6); --ombre-haute: 0 2px 4px rgba(0, 0, 0, .3), 0 24px 48px -18px rgba(0, 0, 0, .75); --r1: #2f63e6; --r2: #4f7dff; --r4: #86a6ff; --r6: #bccfff; --sc-ciel-a: #08142a; --sc-ciel-b: #1a2d4d; --chaud: #ff9a6b; --vapeur: #c9d4e2; --alim: #8fc0ff; --mer: #4fd6c4; --elec: #ffd166; --ok: #6fd39b; }/* ---------- Sélecteur de réacteur ---------- */
.vr .choix { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin: 0 0 12px; }
.vr .choix .etiq { margin-right: 2px; }
.vr .choix-liste { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.vr .choix button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 5px 13px 5px 6px; border-radius: 999px; border: 1px solid var(--trait);
  background: var(--carte); color: var(--texte); font: 600 14px var(--sans); cursor: pointer; transition: box-shadow .2s, transform .2s; }
.vr .choix button:hover { transform: translateY(-1px); box-shadow: var(--ombre); }
.vr .choix button .n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--bleu); color: #fff; font-size: 13px; }
.vr .choix button.off .n { background: transparent; color: var(--pale); box-shadow: inset 0 0 0 1.5px var(--blanc-bord); }
.vr .choix button.off .v { font-style: italic; color: var(--pale); }
.vr .choix button[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--lien); border-color: transparent; }

/* ---------- Scène de la visite ---------- */
.vr .visite { position: relative; border-radius: 26px; overflow: hidden; isolation: isolate; aspect-ratio: 16 / 9; min-height: 520px;
  background: linear-gradient(180deg, var(--sc-ciel-a), var(--sc-ciel-b) 75%); border: 1px solid var(--trait); box-shadow: var(--ombre); }
.vr .visite canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; touch-action: none; }
.vr .visite:fullscreen, .vr .visite.plein { aspect-ratio: auto; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; border: 0; min-height: 0; }
.vr .visite.plein { position: fixed; inset: 0; z-index: 1000; }
/* Affiche avant ouverture */
.vr .affiche { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; z-index: 6; }
.vr .affiche svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.vr .affiche-in { max-width: 520px; background: color-mix(in srgb, var(--carte) 88%, transparent); backdrop-filter: blur(6px); border-radius: 26px; padding: 22px 26px 20px; box-shadow: var(--ombre-haute); }
.vr .affiche h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.05; margin: 6px 0 8px; }
.vr .affiche p { margin: 0 0 14px; color: var(--pale); font-size: 15px; }
.vr .btn-entrer { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 24px; border-radius: 999px; border: 0; background: var(--bleu); color: #fff;
  font: 700 17px var(--sans); cursor: pointer; box-shadow: 0 10px 24px -10px rgba(27, 79, 214, .7); transition: transform .2s; }
.vr .btn-entrer:hover { transform: translateY(-2px); }
.vr .btn-entrer[disabled] { opacity: .7; cursor: progress; }
.vr .affiche small { display: block; margin-top: 10px; font-size: 12.5px; color: var(--pale); }
.vr .visite.ouverte .affiche { display: none; }
.vr .voile { position: absolute; inset: 0; z-index: 7; background: var(--sc-ciel-b); pointer-events: none; opacity: 0; transition: opacity .9s ease; }
.vr .voile.vu { opacity: 1; transition: none; }
/* Carte d'étape */
.vr .etape-carte { position: absolute; left: 16px; top: 16px; bottom: 76px; width: 370px; z-index: 4; display: flex; flex-direction: column; overflow: auto;
  background: color-mix(in srgb, var(--carte) 94%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--trait); border-radius: 24px; box-shadow: var(--ombre-haute);
  padding: 18px 20px 14px; transition: opacity .35s, transform .35s; }
.vr .visite:not(.ouverte) .etape-carte, .vr .visite.libre .etape-carte { opacity: 0; transform: translateX(-12px); pointer-events: none; }
.vr .etape-carte .num { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--pale); margin: 0; }
.vr .etape-carte .num b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--bleu); color: #fff; font-size: 12.5px; letter-spacing: 0; }
.vr .etape-carte h2 { font-size: 32px; line-height: 1.05; margin: 8px 0 8px; }
.vr .etape-carte p.txt { margin: 0 0 12px; font-size: 15.5px; line-height: 1.5; }
.vr .etape-carte .arret-msg { margin: 0 0 12px; padding: 9px 12px; border-radius: 14px; background: var(--doux); font-size: 14px; font-weight: 600; }
.vr .etape-carte .arret-msg[hidden] { display: none; }
.vr .chiffres { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.vr .chiffres > div { background: var(--fond); border-radius: 16px; padding: 10px 12px 9px; min-width: 0; }
.vr .chiffres dt { font-size: 12.5px; color: var(--pale); font-weight: 600; line-height: 1.25; }
.vr .chiffres dd { margin: 3px 0 0; font: 400 27px/1.05 var(--serif); letter-spacing: -.01em; }
.vr .chiffres dd small { font: 600 12.5px var(--sans); color: var(--pale); margin-left: 3px; letter-spacing: 0; }
.vr .chiffres .src { display: block; font: 500 11.5px/1.3 var(--sans); color: var(--pale); margin-top: 3px; }
.vr .chiffres .src a { color: inherit; }
.vr .chiffres .direct dd { color: var(--bleu); }
:root[data-theme="dark"] .vr .chiffres .direct dd { color: var(--lien); }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .vr .chiffres .direct dd { color: var(--lien); } 
}
.vr .chiffres .direct dt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #1fa463; margin-right: 6px; vertical-align: 1px; }
.vr .chiffres .large { grid-column: 1 / -1; }
.vr .methode { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--pale); }
.vr .methode[hidden] { display: none; }
/* Navigation */
.vr .nav { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 5; display: flex; align-items: center; gap: 8px; padding: 6px;
  background: color-mix(in srgb, var(--carte) 92%, transparent); backdrop-filter: blur(10px); border: 1px solid var(--trait); border-radius: 999px; box-shadow: var(--ombre-haute); }
.vr .visite:not(.ouverte) .nav, .vr .visite:not(.ouverte) .outils { display: none; }
.vr .nav button { border: 0; background: transparent; color: var(--texte); font: 700 14px var(--sans); cursor: pointer; border-radius: 999px; min-height: 40px; padding: 6px 14px; }
.vr .nav button:hover { background: var(--fond); }
.vr .nav button[disabled] { opacity: .35; cursor: default; background: transparent; }
.vr .nav .suiv { background: var(--bleu); color: #fff; }
.vr .nav .suiv:hover { background: var(--bleu); filter: brightness(1.08); }
.vr .nav .suiv[disabled] { background: var(--doux); color: var(--pale); filter: none; }
.vr .points { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0 4px; }
.vr .points button { width: 34px; min-height: 34px; padding: 0; display: grid; place-items: center; }
.vr .points button::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--doux); box-shadow: inset 0 0 0 1.5px var(--blanc-bord); transition: transform .25s, background .25s; }
.vr .points button.fait::before { background: color-mix(in srgb, var(--bleu) 45%, var(--doux)); box-shadow: none; }
.vr .points button[aria-current="step"]::before { background: var(--bleu); box-shadow: none; transform: scale(1.35); }
/* Outils */
.vr .outils { position: absolute; right: 14px; top: 14px; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.vr .o-btn { border: 1px solid var(--trait); font: 700 13px var(--sans); color: var(--texte); background: color-mix(in srgb, var(--carte) 88%, transparent); backdrop-filter: blur(8px);
  border-radius: 999px; min-height: 38px; padding: 6px 13px; cursor: pointer; box-shadow: var(--ombre); }
.vr .o-btn[aria-pressed="true"] { background: var(--bleu); color: #fff; border-color: transparent; }
.vr .credit { position: absolute; right: 14px; bottom: 16px; z-index: 3; margin: 0; max-width: 300px; text-align: right; font-size: 11.5px; line-height: 1.35; color: var(--pale);
  background: color-mix(in srgb, var(--carte) 75%, transparent); border-radius: 12px; padding: 4px 9px; }
.vr .visite:not(.ouverte) .credit { display: none; }
/* Étiquettes 3D */
.vr .etq { position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.vr .e3 { position: absolute; left: 0; top: 0; pointer-events: auto; border: 0; cursor: pointer; display: flex; align-items: center; gap: 6px; white-space: nowrap;
  font: 700 12.5px/1.1 var(--sans); color: var(--texte); background: var(--carte); border-radius: 999px; padding: 4px 10px 4px 4px;
  box-shadow: 0 1px 2px rgba(14, 26, 38, .12), 0 6px 16px -6px rgba(14, 26, 38, .35); transition: opacity .3s; }
.vr .e3 i { width: 16px; height: 16px; border-radius: 50%; background: var(--bleu); box-shadow: 0 0 0 3px color-mix(in srgb, var(--bleu) 25%, transparent); flex: none; }
.vr .e3.cache { opacity: 0; pointer-events: none; }
.vr .e3.mini span { display: none; }
.vr .e3.mini { padding: 4px; }
.vr .e3.gros { font: 400 26px/1 var(--serif); padding: 7px 14px 7px 8px; }
.vr .e3.gros i { background: #1fa463; box-shadow: 0 0 0 3px rgba(31, 164, 99, .25); }
.vr .e3.gros small { font: 600 12px var(--sans); color: var(--pale); margin-left: 4px; }
.vr .bulle3 { position: absolute; z-index: 6; max-width: 280px; padding: 10px 12px; border-radius: 14px; background: var(--encre); color: #fff; font-size: 13.5px; line-height: 1.45;
  box-shadow: var(--ombre-haute); pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
:root[data-theme="dark"] .vr .bulle3 { background: #f1f4f8; color: #0e1a26; }
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .vr .bulle3 { background: #f1f4f8; color: #0e1a26; } 
}
.vr .bulle3.vu { opacity: 1; transform: none; }
.vr .bulle3 b { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 3px; opacity: .8; }
/* Repli sans WebGL */
.vr .repli { position: absolute; inset: 0; z-index: 2; display: none; overflow: auto; padding: 16px; background: #0a2a5e; color: #eef5ff; }
.vr .visite.sans3d { aspect-ratio: auto; min-height: 0; }
.vr .visite.sans3d .repli { display: block; position: static; }
.vr .visite.sans3d canvas, .vr .visite.sans3d .nav, .vr .visite.sans3d .outils, .vr .visite.sans3d .etape-carte, .vr .visite.sans3d .affiche, .vr .visite.sans3d .credit { display: none; }
.vr .repli p { margin: 0 0 10px; font-size: 14.5px; }
.vr .visite.sans3d .scene-zone { position: relative !important; inset: auto; height: auto !important; min-height: 0; max-height: none; }
.vr .visite.sans3d .etq, .vr .visite.sans3d .bulle3, .vr .visite.sans3d .voile { display: none; }

/* ---------- Visite en texte, sources, paliers ---------- */
.vr .section { margin-top: 52px; }
.vr .section-tete { display: flex; align-items: end; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-bottom: 14px; }
.vr .section-tete h2 { font-size: clamp(30px, 4vw, 42px); line-height: 1.04; margin: 0; }
.vr .section-tete p { margin: 0; color: var(--pale); font-size: 15px; max-width: 52ch; }
.vr .etapes { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) {
.vr .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); } 
}
@media (min-width: 1100px) {
.vr .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); } 
}
.vr .etape { padding: 20px 22px 18px; }
.vr .etape h3 { margin: 6px 0 6px; font: 400 26px/1.1 var(--serif); }
.vr .etape .txt { margin: 0 0 12px; font-size: 15.5px; line-height: 1.5; }
.vr .sources ol { margin: 0; padding: 18px 22px 18px 44px; font-size: 14px; line-height: 1.5; color: var(--pale); display: grid; gap: 6px; }
.vr .sources li strong { color: var(--texte); font-weight: 600; }
.vr .paliers { padding: 6px 4px; overflow-x: auto; }
.vr .paliers table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 640px; }
.vr .paliers th, .vr .paliers td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--trait); vertical-align: top; }
.vr .paliers thead th { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pale); }
.vr .paliers tbody tr:last-child td, .vr .paliers tbody tr:last-child th { border-bottom: 0; }
.vr .aver { font-size: 12px; font-weight: 700; color: var(--rouge); white-space: nowrap; }

/* ---------- Mobile ---------- */
@media (max-width: 759px) {
.vr .visite { aspect-ratio: auto; height: auto; min-height: 0; display: flex; flex-direction: column; border-radius: 22px; }
.vr .scene-zone { position: relative; height: 62vh; min-height: 340px; max-height: 560px; }
.vr .visite.plein .scene-zone, .vr .visite:fullscreen .scene-zone { flex: 1; height: auto; max-height: none; }
.vr .etape-carte { position: relative; left: auto; top: auto; bottom: auto; width: auto; border-radius: 0; border: 0; border-top: 1px solid var(--trait); box-shadow: none; padding: 16px 16px 14px; backdrop-filter: none; background: var(--carte); overflow: visible; }
.vr .visite:not(.ouverte) .etape-carte { display: none; }
.vr .visite.libre .etape-carte { display: none; }
.vr .visite.plein .etape-carte, .vr .visite:fullscreen .etape-carte { max-height: 42vh; overflow: auto; }
.vr .etape-carte h2 { font-size: 28px; }
.vr .chiffres dd { font-size: 24px; }
.vr .nav { bottom: 10px; gap: 2px; padding: 4px; }
.vr .nav button { padding: 6px 10px; font-size: 13.5px; }
.vr .nav .lib { display: none; }
.vr .points button { width: 26px; }
.vr .outils { right: 10px; top: 10px; }
.vr .o-btn { min-height: 36px; padding: 5px 11px; font-size: 12.5px; }
.vr .credit { display: none; }
.vr .e3 { font-size: 11.5px; }
.vr .e3.gros { font-size: 20px; }
.vr .affiche-in { padding: 18px 18px 16px; }

}
@media (min-width: 760px) {
.vr .scene-zone { position: absolute; inset: 0; } 
}
@media (prefers-reduced-motion: reduce) {
.vr *, .vr *::before, .vr *::after { animation: none !important; transition: none !important; } 
}

.vr .carte { background: var(--carte); border: 1px solid var(--trait); border-radius: 28px; box-shadow: var(--ombre); }
.vr .etiq { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--pale); }
.vr .illustration { margin: 10px 0 0; font-size: 14px; color: var(--pale); max-width: 80ch; }
.vr .illustration:empty { display: none; }
.vr .choix-centrale { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 12px; font-size: 14px; }
.vr .choix-centrale select { font: 600 15px var(--sans); color: var(--texte); background: var(--carte); border: 1px solid var(--trait); border-radius: 999px; min-height: 40px; padding: 6px 14px; }
.vr .points { flex-wrap: nowrap; padding: 0; margin: 0; list-style: none; }
