.foster-guide-overlay-root { position: fixed; inset: 0; z-index: 1000000075; pointer-events: none; opacity: 0; transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1); }
.foster-guide-overlay-root.is-active { opacity: 1; pointer-events: auto; }
.foster-guide-overlay-root:not(.is-active) { pointer-events: none !important; }
.foster-guide-overlay-backdrop { position: absolute; inset: 0; background: transparent; pointer-events: none; transition: background 1s ease; }
/* --- PHASE INTRO CINÉMATIQUE : Fond sombre pur ultra-léger --- */
.foster-guide-overlay-backdrop.foster-guide-intro-phase { background: rgba(5, 7, 14, 0.75); pointer-events: auto; transition: background 1s ease; }
/* --- BLOCAGE CLIQUES PENDANT TOUTE LA CINÉMATIQUE --- */
body.foster-guide-blocking-clicks { pointer-events: none; }
body.foster-guide-blocking-clicks .foster-guide-overlay-root { pointer-events: auto; }
/* Exception : les modales passent au-dessus de Foster */
body.foster-guide-blocking-clicks .modal-overlay, body.foster-guide-blocking-clicks .changelog-modal-container, body.foster-guide-blocking-clicks [class*="modal"][style*="z-index"], body.foster-guide-blocking-clicks #modal-overlay-backdrop { pointer-events: auto !important; z-index: 100200 !important; }
body.foster-guide-cockpit-prelock .widget-cockpit:not(.guide-active) .cockpit-vote-button, body.foster-guide-cockpit-prelock .widget-cockpit:not(.guide-active) #validate-choice-button, body.foster-guide-cockpit-prelock .widget-cockpit:not(.guide-active) #skip-clip-button { pointer-events: none !important; cursor: not-allowed !important; }
body.foster-guide-cockpit-prelock .widget-cockpit:not(.guide-active) .cockpit-vote-button { filter: grayscale(0.35) brightness(0.8); }
/* Phase finale : Foster visible mais clics permis sur la page */
.foster-guide-overlay-root.foster-guide-clicks-enabled { pointer-events: none !important; }
.foster-guide-overlay-root.foster-guide-clicks-enabled .foster-guide-overlay-backdrop { pointer-events: none !important; }
.foster-guide-overlay-root.foster-guide-clicks-enabled .foster-guide-widget-wrapper { pointer-events: auto; }
/* Wrapper global - masqué par défaut, animation contrôlée par JS */
.foster-guide-widget-wrapper { position: absolute; right: 2rem; bottom: 2rem; display: flex; align-items: flex-end; gap: 0px; pointer-events: none; transform: translate3d(0, 30px, 0); opacity: 0; isolation: isolate; }
/* Dégradé oblique derrière Foster - apparaît pendant la cinématique */
.foster-guide-widget-wrapper::before { content: ""; position: absolute; bottom: -100px; right: -100px; width: 830px; height: 650px; background: linear-gradient(160deg, transparent 60.5%, rgba(10, 3, 22, 0.61) 63.03%, rgba(0, 0, 0, 0.85)); pointer-events: none; z-index: -1; opacity: 0; transition: opacity 0.8s ease; }
.foster-guide-widget-wrapper.foster-has-backdrop::before { opacity: 1; }
/* Le personnage Foster (Grand format) */
.foster-guide-character { width: 260px; flex-shrink: 0; position: relative; z-index: 2; margin-right: -40px; }
.foster-guide-particles-canvas { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 250%; height: 250%; pointer-events: none; z-index: 1; }
.foster-guide-character img { width: 100%; height: auto; filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.5)); opacity: 0; will-change: transform, filter, opacity; }
.foster-guide-overlay-root.is-active .foster-guide-character img { /* L'animation est supprimée ici pour être déplacée sur .is-visible */ }
.foster-guide-widget-wrapper.is-visible .foster-guide-character img { animation: hologram-appear-glitch 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
               jgtr-foster-levitate 4s ease-in-out 0.6s infinite; }
@keyframes hologram-appear-glitch {
  0% { opacity: 0; transform: scale(0.9) translateY(10px); filter: brightness(3) contrast(3) blur(2px); }
  20% { opacity: 0.7; transform: scale(1.05) translate(2px, 5px) skew(-3deg); filter: brightness(2) contrast(2) blur(1px); }
  40% { opacity: 0.5; transform: scale(0.98) translate(-2px, 0px) skew(3deg); filter: brightness(1.5) contrast(1.5) blur(0.5px); }
  60% { opacity: 1; transform: scale(1.02) translate(0, 0) skew(0); filter: brightness(1.2) contrast(1.2) blur(0.2px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) rotate(-0.01deg); filter: brightness(1) contrast(1) blur(0); }
}
/* La Bulle de texte (Style Game Coach) */
.foster-guide-bubble-wrapper { position: relative; z-index: 1; }
.foster-guide-bubble { width: 320px; padding: 18px 20px; border-radius: 20px; border: 2px solid rgba(108, 99, 255, 0.95); background: rgba(19, 20, 31, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 0 20px rgba(108, 99, 255, 0.8); position: relative; }
/* La flèche de la bulle (Tail) */
.foster-guide-bubble::after { content: ""; position: absolute; bottom: 40px; left: -10px; width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-right: 10px solid rgba(108, 99, 255, 0.95); }
.foster-guide-bubble-header { margin-bottom: 10px; border-bottom: 1px solid rgba(108, 99, 255, 0.3); padding-bottom: 8px; }
.foster-guide-name { font-family: "Kanit", sans-serif; font-weight: 800; letter-spacing: 0.12em; font-size: 15px; color: #fff; text-shadow: 0 0 10px rgba(108, 99, 255, 0.6); text-transform: uppercase; }
.foster-guide-sub { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; color: #c4b5fd; font-weight: 600; }
.foster-guide-message { color: #e5e7eb; font-size: 14px; line-height: 1.55; margin-bottom: 15px; min-height: 50px; }
.foster-guide-message strong { color: #c4b5fd; font-weight: 800; }
/* Style spécial pour l'intuition de Foster */
.foster-intuition { color: rgba(247, 225, 255, 1) !important; text-shadow: 0 0 10px rgba(100, 50, 120, 0.8); font-weight: 800; font-style: italic; }
.foster-symbol { color: rgba(247, 225, 255, 1) !important; text-shadow: 0 0 0px rgba(0, 0, 0, 0); font-weight: 800; font-style: normal; animation: foster-symbol-pulse 8s ease-in-out infinite; display: inline-block; will-change: text-shadow; }
@keyframes foster-symbol-pulse {
  0% { text-shadow: 0 0 0px rgba(0, 0, 0, 0); }
  2% { /* FLASH : L'intuition frappe ! */ text-shadow: 0 0 25px rgba(224, 170, 246, 0.9), 0 0 12px rgba(233, 9, 204, 1); }
  25% { /* MAINTIEN : L'œil est dilaté */ text-shadow: 0 0 20px rgba(224, 170, 246, 0.8), 0 0 10px rgba(233, 9, 204, 0.96); }
  60% { /* ÉXTINCTION LENTE : La vision s'efface */ text-shadow: 0 0 0px rgba(0, 0, 0, 0); }
  100% { /* REPOS TOTAL : Longue pause */ text-shadow: 0 0 0px rgba(0, 0, 0, 0); }
}
.foster-guide-actions { display: flex; gap: 10px; justify-content: flex-end; }
.foster-guide-btn { border: none; border-radius: 12px; padding: 10px 16px; font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.foster-guide-btn:hover { transform: translate3d(0, -2px, 0); filter: brightness(1.2); }
.foster-guide-btn-skip { background: rgba(255, 255, 255, 0.1); color: #9ca3af; border: 1px solid rgba(255, 255, 255, 0.05); }
.foster-guide-btn-next { background: linear-gradient(135deg, #6366f1, #8b5cf6); color: white; box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
/* Didacticiel - Halo des zones ciblées en séquence */
.jgtr-guide-dot-anchor { position: relative !important; }
.jgtr-guide-dot { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #d61f45; pointer-events: none; animation: jgtr-pulse-glow-red 2s infinite; z-index: 3; opacity: 0; transition: opacity 0.35s ease; box-shadow: 0 0 4px rgba(214, 31, 69, 0.75); overflow: visible; }
.jgtr-guide-dot::after { content: ""; position: absolute; inset: -8px; border-radius: inherit; background: radial-gradient(circle, rgba(214, 31, 69, 0.54) 0%, rgba(214, 31, 69, 0.28) 45%, rgba(214, 31, 69, 0) 72%); filter: blur(0.6px); opacity: 0; animation: jgtr-guide-dot-radar 2.4s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; pointer-events: none; }
.jgtr-guide-dot.is-visible { opacity: 1; }
/* Halo intense pour séquence cinématique */
.jgtr-guide-focus-target { position: relative !important; z-index: 100100 !important; outline: 3px solid rgba(108, 99, 255, 0.95); border-radius: 12px; box-shadow: 0 0 0 8px rgba(108, 99, 255, 0.3),
        0 0 0 16px rgba(108, 99, 255, 0.15),
        0 0 60px rgba(108, 99, 255, 0.8),
        0 0 100px rgba(108, 99, 255, 0.4); animation: jgtr-focus-pulse 3s ease-in-out infinite; transform: scale(1.02); transition: all 1.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
/* Padding spécifique pour le tab guesseur */
#tab-guesseur.jgtr-guide-focus-target { padding: 12px 16px; }
/* Zone 1: Bouton JOUER - Surbrillance CIRCULAIRE élargie */
#header-desktop-play-action-button.jgtr-guide-focus-target { border-radius: 50% !important; padding: 20px !important; box-shadow: 0 0 0 15px rgba(108, 99, 255, 0.4),
        0 0 0 30px rgba(108, 99, 255, 0.2),
        0 0 100px rgba(108, 99, 255, 1),
        0 0 200px rgba(108, 99, 255, 0.6) !important; }
/* Zone 3: TV Sublayer - Background coloré pour accentuer */
.tv-sublayer.jgtr-guide-focus-target { backdrop-filter: brightness(1.2) !important; }
@keyframes jgtr-focus-pulse {
  0%, 100% { box-shadow: 0 0 0 8px rgba(108, 99, 255, 0.3),
            0 0 0 16px rgba(108, 99, 255, 0.15),
            0 0 60px rgba(108, 99, 255, 0.8),
            0 0 100px rgba(108, 99, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(108, 99, 255, 0.4),
            0 0 0 24px rgba(108, 99, 255, 0.2),
            0 0 80px rgba(108, 99, 255, 1),
            0 0 120px rgba(108, 99, 255, 0.6); }
}
@keyframes jgtr-pulse-glow-red {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #d61f45; }
  50% { opacity: 0.5; box-shadow: 0 0 10px #ff3b5c; }
}
@keyframes jgtr-guide-dot-radar {
  0% { opacity: 1; transform: scale(0.55); }
  18% { opacity: 0.72; }
  42% { opacity: 0.4; }
  66% { opacity: 0.14; }
  100% { opacity: 0; transform: scale(2.35); }
}
@keyframes jgtr-foster-levitate {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -12px, 0); }
}
@media (min-width: 1280px) {
  body.page-game_play .foster-guide-widget-wrapper { right: clamp(12px, calc(22px * var(--smart-inverse-scale, 1)), 34px); bottom: clamp(14px, calc(26px * var(--smart-inverse-scale, 1)), 44px); max-width: calc(100vw - 24px); transform-origin: bottom right; }
  body.page-game_play .foster-guide-character { width: clamp(220px, calc(260px * var(--smart-scale, 1)), 292px); }
  body.page-game_play .foster-guide-bubble { width: clamp(286px, calc(320px * var(--smart-scale, 1)), 340px); max-height: min(64vh, 520px); overflow: auto; }
  body.page-game_play.gp-interlude-visible .foster-guide-overlay-root.is-active { z-index: 1000000075; }
  body.page-game_play.gp-interlude-visible .foster-guide-widget-wrapper { right: clamp(48px, 5vw, 96px); bottom: clamp(18px, 4vh, 44px); }
}
/* Mobile : Foster est la star, on l'affiche avec fierté ! */
@media (max-width: 1279.98px) {
  .foster-guide-widget-wrapper { right: 1rem; bottom: 1rem; scale: 0.9; transform-origin: bottom right; }
  .foster-guide-character { width: 220px; margin-right: -30px; }
  .foster-guide-bubble { width: 260px; padding: 15px; }
  .foster-guide-message { font-size: 13px; }
}
/* --- CURSEUR TYPEWRITER TERMINAL VINTAGE --- */
.foster-typewriter-cursor { display: inline-block; background-color: #a78bfa; width: 8px; height: 1em; animation: terminalBlink 1s step-end infinite; vertical-align: middle; margin-left: 2px; box-shadow: 0 0 6px rgba(167, 139, 250, 0.8), 0 0 10px rgba(139, 92, 246, 0.6); }
@keyframes terminalBlink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
/* === FOSTER GUIDE - BLOCAGE COCKPIT === */
/* Transition de base sur tous les boutons pour adoucir le changement d'état */
.cockpit-vote-button { transition: all 1.2s ease-in-out; }
/* Bouton désactivé (tous sauf le bon) - avec transition douce */
.cockpit-vote-button.guide-disabled { opacity: 0.25 !important; cursor: not-allowed !important; pointer-events: none !important; --cockpit-vote-guide-scale: 0.95; filter: grayscale(0.9) brightness(0.6) !important; transition: all 1.2s ease-in-out !important; }
/* Bouton forcé (le rang correct) - avec transition douce */
.cockpit-vote-button.guide-forced { outline: 3px solid rgba(108, 99, 255, 0.95) !important; outline-offset: 4px !important; box-shadow: 0 0 0 8px rgba(108, 99, 255, 0.3),
        0 0 0 16px rgba(108, 99, 255, 0.15),
        0 0 60px rgba(108, 99, 255, 0.8),
        0 0 100px rgba(108, 99, 255, 0.4) !important; animation: guide-pulse-forced 3s ease-in-out infinite !important; --cockpit-vote-guide-scale: 1.05; z-index: 100 !important; position: relative !important; transition: all 1.2s ease-in-out !important; }
/* Animation pulse pour le bouton forcé - MÊME STYLE QUE jgtr-focus-pulse */
@keyframes guide-pulse-forced {
  0%, 100% { box-shadow: 0 0 0 8px rgba(108, 99, 255, 0.3),
            0 0 0 16px rgba(108, 99, 255, 0.15),
            0 0 60px rgba(108, 99, 255, 0.8),
            0 0 100px rgba(108, 99, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(108, 99, 255, 0.4),
            0 0 0 24px rgba(108, 99, 255, 0.2),
            0 0 80px rgba(108, 99, 255, 1),
            0 0 120px rgba(108, 99, 255, 0.6); }
}
/* Wrapper pendant le guide */
.cockpit-button-wrapper.guide-active { pointer-events: none; }
.cockpit-button-wrapper.guide-active .cockpit-vote-button.guide-forced { pointer-events: auto !important; }
/* Style du rang affiché dans le message Foster */
.guide-forced-rank { color: rgba(108, 99, 255, 0.95); text-shadow: 0 0 10px rgba(108, 99, 255, 0.5); font-weight: 800; }
/* Bouton Passer désactivé en mode guide */
.widget-cockpit.guide-active #skip-clip-button { opacity: 0.3 !important; pointer-events: none !important; filter: grayscale(1) !important; cursor: not-allowed !important; }
/* === FIN FOSTER GUIDE === */
