/* ===== Grise Mine (histoire définitive depuis le 2026-10-11, Grey's Anatomy) : carte, écrans, cinématiques =====
   Fichier dédié, chargé après style.css. Préfixe ga-*. Pluie de Seattle, tour à soucoupe générique,
   hôpital vitré, blouses bleues et bordeaux, bloc opératoire vert d'eau, moniteur cardiaque (SVG intégré).
   Décors 100 % CSS/emojis, aucun visuel officiel. Le style de base décrit l'état final. */

/* --- Carte du hub : ciel pluvieux, tour, hôpital éclairé, croix rouge et tracé cardiaque --- */
.saga-grey { background: linear-gradient(180deg, #5a6f8a 0%, #2a3448 50%, #121a2a 100%); color: var(--texte); }
.saga-grey .saga-nom { color: #9fd6ff; text-shadow: 0 0 8px #3d8bff88, 0 2px 6px #000; }
.ga-carte, .ga-carte > span { position: absolute; display: block; }
.ga-carte { inset: 0; overflow: hidden; }
.ga-carte-ciel { inset: 0 0 auto 0; height: 104px; background: repeating-linear-gradient(105deg, transparent 0 9px, #cfe3ff22 9px 10px); animation: ga-pluie-carte 0.8s linear infinite; }
@keyframes ga-pluie-carte { from { background-position: 0 0; } to { background-position: -10px 40px; } }
.ga-carte-tour { left: 10%; top: 12px; width: 26px; height: 82px; background: linear-gradient(90deg, transparent 44%, #1a2232 44% 56%, transparent 56%); }
.ga-carte-tour::before { content: ""; position: absolute; left: -4px; right: -4px; top: 14px; height: 8px; border-radius: 50%; background: #1a2232; }
.ga-carte-tour::after { content: ""; position: absolute; left: 12px; top: 0; width: 2px; height: 14px; background: #1a2232; }
.ga-carte > .ga-carte-hopital { right: 6%; top: 34px; width: 50%; height: 62px; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; box-sizing: border-box; background: linear-gradient(180deg, #d8dde4, #a9b2be); }
.ga-carte-hopital i { flex: 1 0 26%; background: linear-gradient(180deg, #ffe7a8, #9fc3e8); }
.ga-carte-croix { right: 10%; top: 18px; width: 14px; height: 14px; background: linear-gradient(#e33 0 0) center / 100% 34% no-repeat, linear-gradient(#e33 0 0) center / 34% 100% no-repeat; filter: drop-shadow(0 0 4px #ff5d5d); }
.ga-carte-pouls { left: 0; right: 0; top: 84px; height: 16px; }
.ga-carte-pouls svg, .ga-moniteur svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ga-carte-pouls polyline, .ga-moniteur polyline { fill: none; stroke: #3dff8a; stroke-width: 1.6; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 2px #3dff8a); }
.ga-carte-pouls polyline, .ga-moniteur .normale polyline { stroke-dasharray: 260; animation: ga-trace 1.8s linear infinite; }
@keyframes ga-trace { from { stroke-dashoffset: 260; } to { stroke-dashoffset: 0; } }

/* --- Écrans de départ et de jeu : couloir d'hôpital la nuit, lueur bleue --- */
.hp-scene[data-theme="grey"], .hi-scene[data-theme="grey"] { border-color: #6fa8dc; background: radial-gradient(ellipse at 50% 0%, #3d8bff33, transparent 60%), linear-gradient(180deg, #24324a 0%, #1a2436 55%, #0f1622 100%); }
[data-theme="grey"] .hp-ciel { display: none; }
[data-theme="grey"] .hp-parchemin { background: linear-gradient(180deg, #f6f9fc, #e2e9f1); border-top: 4px solid #3a8a7a; }
[data-theme="grey"] .hp-barre > span { background: linear-gradient(90deg, #3a8a7a, #9fd6ff); }
[data-theme="grey"] .rayon { display: none; }
[data-theme="grey"] .hi-chapitres li { background: #101828d9; }
[data-theme="grey"] .hi-niveau, [data-theme="grey"] .hi-sur-titre { color: #9fd6ff; }
[data-theme="grey"] .hi-titre { font-family: Georgia, "Times New Roman", serif; }
[data-theme="grey"] .hi-infos, [data-theme="grey"] .hi-retour, [data-theme="grey"] .hp-sauver { color: var(--texte); }

/* --- Éléments communs des cinématiques --- */
.ga-soignant { position: absolute; width: 6%; height: 32%; }
.ga-soignant .tete { position: absolute; left: 24%; top: 0; width: 52%; aspect-ratio: 1; border-radius: 50%; background: #eac4a0; box-shadow: inset 0 5px 0 #4a2e1a; }
.ga-soignant .corps { position: absolute; left: 6%; right: 6%; top: 28%; bottom: 0; border-radius: 40% 40% 10% 10%; background: var(--c); }
.ga-soignant .corps::after { content: ""; position: absolute; left: 44%; top: 0; width: 12%; height: 30%; background: #ffffff55; }
.ga-pluie { inset: 0; overflow: hidden; pointer-events: none; }
.ga-pluie i { position: absolute; left: calc(var(--i) * 5.5% + 1%); top: 40%; width: 1px; height: 14%; background: linear-gradient(transparent, #cfe3ffbb); transform: rotate(10deg); animation: ga-pluie calc(0.55s + var(--i) * 0.03s) linear calc(var(--i) * -0.17s) infinite; }
@keyframes ga-pluie { from { top: -20%; } to { top: 110%; } }
.ga-moniteur { position: absolute; padding: 3%; box-sizing: border-box; border-radius: 8px; background: linear-gradient(180deg, #4a5262, #2a3040); box-shadow: 0 6px 18px #0008; }
.ga-moniteur .ecran { position: relative; display: block; width: 100%; height: 100%; border-radius: 4px; background: #04120a; overflow: hidden; }
.ga-moniteur .trace { position: absolute; left: 4%; right: 4%; top: 20%; width: 92%; height: 60%; }
.ga-moniteur .plate { opacity: 0; }
.ga-moniteur .plate polyline { stroke: #ff5d5d; filter: drop-shadow(0 0 2px #ff5d5d); }
.ga-moniteur .coeur { position: absolute; right: 6%; top: 4%; color: #ff5d5d; font-size: clamp(0.7rem, 2vw, 1.2rem); animation: ga-battement 0.9s ease-in-out infinite; }
@keyframes ga-battement { 0%, 100% { scale: 1; } 20% { scale: 1.3; } }

/* 1. Arrivée sous la pluie de Seattle : tour à soucoupe, hôpital Sainte-Grâce, bipeur qui sonne. */
.ga-ciel { inset: 0; background: linear-gradient(180deg, #3a4558 0%, #5a6a80 60%, #7a8798 100%); }
.ga-ciel.orage { background: radial-gradient(ellipse at 30% 20%, #4a4a66, transparent 50%), linear-gradient(180deg, #1a1c2c 0%, #2a2e44 70%, #3a3e52 100%); }
.ga-tour { left: 10%; bottom: 26%; width: 8%; height: 62%; background: linear-gradient(90deg, transparent 42%, #2a3242 42% 58%, transparent 58%); }
.ga-tour::before { content: ""; position: absolute; left: -30%; right: -30%; top: 16%; height: 7%; border-radius: 50%; background: #2a3242; }
.ga-tour::after { content: ""; position: absolute; left: 47%; top: 0; width: 6%; height: 17%; background: #2a3242; }
.ga-ville { left: 0; right: 0; bottom: 22%; height: 26%; background: #3a4456; clip-path: polygon(0 100%, 0 40%, 8% 40%, 8% 20%, 16% 20%, 16% 50%, 24% 50%, 24% 10%, 30% 10%, 30% 45%, 40% 45%, 40% 30%, 48% 30%, 48% 100%); }
.ga-hopital { right: 5%; bottom: 20%; width: 46%; height: 56%; background: linear-gradient(180deg, #e2e6ec, #b6bec9); box-shadow: inset -12px 0 0 #9aa4b2; }
.ga-hopital .enseigne { position: absolute; left: 6%; right: 6%; top: 4%; text-align: center; color: #1a3a5a; font: 800 clamp(0.6rem, 2.2vw, 1.2rem) Georgia, serif; }
.ga-hopital .enseigne::before { content: "✚ "; color: #e33; }
.ga-hopital .fenetres { position: absolute; left: 6%; right: 8%; top: 20%; bottom: 30%; background: repeating-linear-gradient(90deg, #e2e6ec 0 6px, transparent 6px 34px), repeating-linear-gradient(180deg, #e2e6ec 0 6px, transparent 6px 24px), linear-gradient(180deg, #ffe7a8, #9fc3e8); }
.ga-hopital .entree { position: absolute; left: 34%; width: 30%; bottom: 0; height: 26%; background: linear-gradient(90deg, #cfe8ff 0 49%, #8aa8c8 49% 51%, #cfe8ff 51%); box-shadow: 0 0 20px #cfe8ff88; }
.ga-trottoir { left: 0; right: 0; bottom: 0; height: 20%; background: linear-gradient(180deg, #4a505c, #2a2e36); }
.ga-soignant.interne { left: 66%; bottom: 14%; animation: ga-marche 3s ease-out 0.4s both; }
@keyframes ga-marche { from { transform: translateX(-900%); } 15% { transform: translateX(-780%) translateY(-3%); } 30% { transform: translateX(-620%); } 45% { transform: translateX(-470%) translateY(-3%); } 60% { transform: translateX(-320%); } 75% { transform: translateX(-170%) translateY(-3%); } to { transform: none; } }
.ga-bipeur { left: 70%; bottom: 46%; font-size: clamp(1rem, 3.4vw, 2rem); animation: ga-pop 0.4s ease-out 3.6s both, ga-vibre 0.08s linear 4s 30 alternate; }
@keyframes ga-pop { from { opacity: 0; scale: 0.2; } 70% { scale: 1.2; } to { opacity: 1; scale: 1; } }
@keyframes ga-vibre { from { rotate: -10deg; } to { rotate: 10deg; } }

/* 2. L'ascenseur : les portes s'ouvrent, deux regards se croisent, les cœurs s'envolent. */
.ga-couloir { inset: 0; background: linear-gradient(180deg, #e8eadf 0 76%, #b8c2b0 76%); }
.ga-couloir.clair { background: linear-gradient(180deg, #f2f4ee 0 72%, #c9d2c2 72%); }
.ga-cabine { left: 32%; right: 32%; top: 14%; bottom: 10%; overflow: hidden; background: linear-gradient(90deg, #9aa2ac, #d8dde4 50%, #9aa2ac); box-shadow: inset 0 18px 30px #fff8; }
.ga-cabine .ga-soignant { width: 22%; height: 62%; bottom: 0; }
.ga-cabine .c1 { left: 16%; } .ga-cabine .c2 { right: 16%; }
.ga-coeurs { left: 30%; right: 30%; top: 8%; height: 40%; position: absolute; }
.ga-coeurs i { position: absolute; bottom: 0; font-style: normal; font-size: clamp(0.9rem, 2.8vw, 1.6rem); opacity: 0; animation: ga-coeur 1.8s ease-out calc(3.6s + var(--n) * 0.4s) 2 both; }
.ga-coeurs i:nth-child(1) { left: 0; --n: 0; } .ga-coeurs i:nth-child(2) { left: 40%; --n: 1; } .ga-coeurs i:nth-child(3) { left: 75%; --n: 2; }
@keyframes ga-coeur { from { opacity: 0; transform: none; } 30% { opacity: 1; } to { opacity: 0; transform: translateY(-140%) scale(1.3); } }
.ga-porte { top: 14%; bottom: 10%; width: 18%; background: linear-gradient(90deg, #b8c0ca, #e6eaef 50%, #b8c0ca); box-shadow: inset 0 0 0 2px #8a929c; }
.ga-porte.g { left: 32%; transform: translateX(-100%); animation: ga-ouvre-g 1.4s ease-in-out 0.8s both; }
.ga-porte.d { right: 32%; transform: translateX(100%); animation: ga-ouvre-d 1.4s ease-in-out 0.8s both; }
@keyframes ga-ouvre-g { from { transform: none; } to { transform: translateX(-100%); } }
@keyframes ga-ouvre-d { from { transform: none; } to { transform: translateX(100%); } }
.ga-etage { left: 50%; top: 3%; transform: translateX(-50%); padding: 0.1em 0.6em; border-radius: 4px; background: #111; color: #ff7a5a; font: 700 clamp(0.7rem, 2vw, 1.1rem) "Courier New", monospace; text-shadow: 0 0 6px #ff5d3a; }
.ga-etage::before { content: "▲ "; }

/* 3. Code bleu au bloc : le tracé devient plat, alerte, choc… et le cœur repart. */
.ga-salle-bloc { inset: 0; background: linear-gradient(180deg, #4f8f86 0 70%, #c9d6d2 70%); }
.ga-salle-bloc.sombre { filter: brightness(0.45) saturate(0.6); }
.ga-scialytique { left: 30%; right: 30%; top: 0; height: 20%; display: flex; justify-content: center; gap: 4%; }
.ga-scialytique i { width: 20%; aspect-ratio: 1; align-self: flex-end; border-radius: 50%; background: radial-gradient(circle, #fff 0 40%, #e8f4ff 46%, #8a98a8 50%); box-shadow: 0 10px 40px 10px #fff8; }
.ga-table { left: 26%; right: 30%; bottom: 18%; height: 11%; border-radius: 6px; background: linear-gradient(180deg, #4a9a7a 0 60%, #8a929c 60%); }
.ga-soignant.chirurgien { bottom: 22%; height: 42%; width: 7%; }
.ga-soignant.chirurgien .tete { box-shadow: inset 0 8px 0 #3a8a7a, inset 0 -6px 0 #cfe8e0; }
.ga-soignant.s1 { left: 22%; } .ga-soignant.s2 { left: 58%; }
.ga-moniteur.bloc { right: 5%; top: 12%; width: 24%; height: 32%; }
.ga-moniteur.bloc .normale { animation: ga-coupe 3.8s linear both; }
.ga-moniteur.bloc .normale polyline { animation: ga-trace 1.8s linear infinite; }
.ga-moniteur.bloc .plate { animation: ga-arret 3.8s linear both; }
@keyframes ga-coupe { 0%, 36% { opacity: 1; } 37%, 99% { opacity: 0; } 100% { opacity: 1; } }
@keyframes ga-arret { 0%, 36% { opacity: 0; } 37%, 99% { opacity: 1; } 100% { opacity: 0; } }
.ga-alerte { left: 6%; top: 8%; padding: 0.2em 0.6em; border-radius: 6px; background: #c0392b; color: #fff; font: 900 clamp(0.8rem, 2.6vw, 1.5rem) Georgia, serif; letter-spacing: 0.08em; opacity: 0; animation: ga-alerte 3.8s linear both; }
@keyframes ga-alerte { 0%, 36% { opacity: 0; } 40%, 60%, 80% { opacity: 1; } 50%, 70% { opacity: 0.3; } 99% { opacity: 1; } 100% { opacity: 0; } }
.ga-choc { left: 50%; top: 34%; transform: translateX(-50%); color: #ffe066; font: 900 clamp(1.2rem, 4.4vw, 2.6rem) Georgia, serif; text-shadow: 0 0 18px #fff, 0 0 30px #ffd23f; opacity: 0; animation: ga-choc 3.8s linear both; }
@keyframes ga-choc { 0%, 74% { opacity: 0; scale: 0.5; } 78% { opacity: 1; scale: 1.25; } 96% { opacity: 1; scale: 1; } 100% { opacity: 0; } }

/* 4. Tempête sur le toit : éclairs, hélicoptère qui se pose, l'équipe attend sous la pluie. */
.ga-eclair { inset: 0; background: radial-gradient(ellipse at 70% 0%, #ffffffcc, transparent 50%); opacity: 0; animation: ga-eclair 2.8s linear 0.8s infinite; }
@keyframes ga-eclair { 0%, 100% { opacity: 0; } 3% { opacity: 0.9; } 6% { opacity: 0; } 9% { opacity: 0.6; } 12% { opacity: 0; } }
.ga-toiture { left: 0; right: 0; bottom: 0; height: 30%; background: linear-gradient(180deg, #5a606c, #3a3e48); }
.ga-toiture .cercle { position: absolute; left: 50%; top: 18%; width: 22%; aspect-ratio: 3 / 1; transform: translateX(-50%); display: grid; place-items: center; border: 3px solid #ffd23f; border-radius: 50%; color: #ffd23f; font: 900 clamp(0.8rem, 2.4vw, 1.4rem) Georgia, serif; }
.ga-helico { left: 38%; bottom: 26%; width: 24%; height: 20%; animation: ga-atterrit 3.4s ease-out 0.6s both; }
@keyframes ga-atterrit { from { transform: translate(70%, -280%) rotate(-8deg); } 70% { transform: translate(0, -20%) rotate(2deg); } to { transform: none; } }
.ga-helico .cabine { position: absolute; left: 0; bottom: 0; width: 60%; height: 70%; border-radius: 50% 40% 30% 50%; background: linear-gradient(180deg, #cfe8ff 0 32%, #e8ecf0 32% 60%, #c0392b 60%); }
.ga-helico .queue { position: absolute; left: 55%; bottom: 40%; width: 45%; height: 12%; background: #e8ecf0; border-radius: 0 6px 6px 0; }
.ga-helico .pale { position: absolute; left: -16%; top: 0; width: 92%; height: 5%; border-radius: 4px; background: #222; animation: ga-rotor 0.12s linear infinite alternate; }
@keyframes ga-rotor { from { transform: scaleX(1); } to { transform: scaleX(0.15); } }
.ga-brancard { left: 18%; bottom: 20%; width: 14%; height: 8%; border-radius: 4px; background: linear-gradient(180deg, #f4f6f8 0 60%, #8a929c 60%); }
.ga-soignant.attente { bottom: 18%; height: 30%; }
.ga-soignant.a1 { left: 8%; } .ga-soignant.a2 { right: 8%; }

/* 5. Victoire : casiers, post-it « Chef de la chirurgie », l'équipe applaudit sous les confettis. */
.ga-casiers { left: 6%; right: 6%; top: 12%; bottom: 30%; display: flex; gap: 1.2%; }
.ga-casiers i { flex: 1; border-radius: 3px; background: repeating-linear-gradient(180deg, transparent 0 4px, #0002 4px 6px) 50% 8% / 60% 12% no-repeat, linear-gradient(180deg, #7a9ab8, #5a7a98); box-shadow: inset -3px 0 0 #4a6a88; }
.ga-postit { left: 53%; top: 26%; width: 16%; aspect-ratio: 1; padding: 1%; box-sizing: border-box; display: grid; place-items: center; text-align: center; background: linear-gradient(180deg, #fff59a, #ffe25a); color: #333; font: 700 clamp(0.45rem, 1.5vw, 0.9rem) "Segoe Print", "Comic Sans MS", cursive; box-shadow: 0 6px 12px #0005; transform: rotate(-5deg); overflow: hidden; word-break: break-word; animation: ga-colle 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) 3.9s both; }
@keyframes ga-colle { from { opacity: 0; transform: rotate(-30deg) scale(2); } to { opacity: 1; transform: rotate(-5deg); } }
.ga-equipe { inset: 0; }
.ga-soignant.fan { bottom: 4%; width: 7%; height: 34%; animation: ga-applaudit 0.35s ease-in-out infinite alternate; }
.ga-soignant.f0 { left: 8%; } .ga-soignant.f1 { left: 26%; animation-delay: 0.1s; } .ga-soignant.f2 { left: 46%; animation-delay: 0.2s; } .ga-soignant.f3 { left: 66%; animation-delay: 0.05s; } .ga-soignant.f4 { left: 84%; animation-delay: 0.15s; }
@keyframes ga-applaudit { from { transform: translateY(0); } to { transform: translateY(-6%); } }
.ga-confettis { inset: 0; pointer-events: none; }
.ga-confettis i { position: absolute; left: calc(var(--i) * 6% + 2%); top: 104%; width: 1.2%; height: 2.4%; background: hsl(calc(var(--i) * 40deg) 80% 60%); animation: ga-confetti 2.6s linear calc(4.2s + var(--i) * 0.08s) 2 both; }
@keyframes ga-confetti { from { top: -6%; rotate: 0deg; } to { top: 104%; rotate: 540deg; } }
.ga-banniere { left: 50%; top: 2%; max-width: 88%; transform: translateX(-50%); padding: 0.3em 0.8em; border: 2px solid #9fd6ff; border-radius: 10px; background: #1a2a44e6; color: #fff; font: 900 clamp(0.85rem, 3vw, 1.6rem) Georgia, serif; text-shadow: 0 0 10px #3d8bff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: ga-banniere 0.9s ease-out 4.8s both; }
@keyframes ga-banniere { from { opacity: 0; transform: translate(-50%, -40%) scale(0.8); } to { opacity: 1; transform: translateX(-50%); } }

/* 6. Défaite : le tracé s'aplatit, la pluie tombe sur la vitre, le café a refroidi. */
.ga-fenetre-nuit { right: 6%; top: 10%; width: 24%; height: 40%; background: linear-gradient(180deg, #0b1230, #1c2550); box-shadow: 0 0 0 6px #6a7280; }
.scene-ga-moniteur .ga-pluie { inset: auto; right: 6%; top: 10%; width: 24%; height: 40%; }
.ga-moniteur.plat { left: 26%; top: 16%; width: 36%; height: 42%; }
.ga-moniteur.plat .normale { opacity: 0; animation: ga-sarrete 1.6s steps(1) both; }
.ga-moniteur.plat .plate { opacity: 1; animation: ga-sallume 1.6s steps(1) both; }
.ga-moniteur.plat .coeur { color: #6a7280; animation: none; }
@keyframes ga-sarrete { from { opacity: 1; } to { opacity: 0; } }
@keyframes ga-sallume { from { opacity: 0; } to { opacity: 1; } }
.ga-cafe-froid { left: 30%; bottom: 8%; width: 5%; height: 9%; border-radius: 0 0 30% 30%; background: #f6f6f0; box-shadow: 6px 2px 0 -3px #f6f6f0; }
.ga-bipeur.seul { left: 40%; bottom: 7%; font-size: clamp(0.9rem, 2.6vw, 1.5rem); opacity: 0.7; }

@media (prefers-reduced-motion: reduce) {
  .ga-carte *, .cine-scene [class^="ga-"], .cine-scene [class^="ga-"] * { animation: none !important; }
  .ga-pluie i { top: 30%; }
}
