/* ====================================================================
   IVANN CALM LAYER #39 — Atténuation pour un rendu fintech/épuré
   Surcharge ciblée des couches gaming pour calmer le bruit visuel.
   ==================================================================== */

/* ============================================================
   1. FOND : 1 seul gradient subtle, plus de grille ni de noise
   ============================================================ */

html body.izi-game {
  background-color: #0a0e1a !important;
  background-image: radial-gradient(ellipse 1200px 800px at 50% 0%, rgba(79, 124, 255, 0.08), transparent 60%) !important;
  background-attachment: fixed !important;
}

/* Retire la grille de pixels en fond */
html body.izi-game::before {
  display: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Retire le noise texture overlay */
html body.izi-game::after {
  display: none !important;
  background-image: none !important;
  opacity: 0 !important;
}

/* Retire le scanline en haut (light beam) si encore actif */
html body.izi-game-dedicated::before,
html body.izi-game-home::before {
  display: none !important;
}

/* Retire le noise sur cards/modals */
html body.izi-game .profil-modal::before,
html body.izi-game .arena-stage::before,
html body.izi-game .ivann-course-page::before,
html body.izi-game .node--view-mode-full::before {
  display: none !important;
}

/* ============================================================
   2. GLOWS : retire tous les text-shadow parasites du body
   Garde les glows uniquement sur :
   - boutons hover/focus
   - badges grades Diamant/Légende (mérités)
   - badges XP HUD selon grade
   ============================================================ */

/* Reset text-shadow par défaut sur tout le body cours */
html body.izi-game-course p,
html body.izi-game-course li,
html body.izi-game-course span,
html body.izi-game-course strong,
html body.izi-game-course em,
html body.izi-game-course h1,
html body.izi-game-course h2,
html body.izi-game-course h3,
html body.izi-game-course h4 {
  text-shadow: none !important;
}

/* Mais garde un GLOW SUBTLE sur les h1 page-title gradient (signature visuelle) */
html body.izi-game h1.page-title,
html body.izi-game .page-title,
html body.izi-game .profil-page h1,
html body.izi-game .arenes-page h1,
html body.izi-game .classement-page h1 {
  filter: drop-shadow(0 1px 4px rgba(79, 124, 255, 0.2)) !important;
}

/* Stat numbers : pas de glow, juste la couleur */
html body.izi-game .profil-stat-big,
html body.izi-game .profil-modal__stat-num,
html body.izi-game .profil-level-num {
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)) !important;
}

/* Code blocks : pas de inner glow */
html body[class] .field--name-body pre,
html body[class] .block-field-blocknodecoursbody pre,
html body[class] .field--name-field-ivann-contenu-du-cours pre {
  box-shadow:
    0 8px 24px -8px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset !important;
}

/* Tokens : pas de text-shadow */
html body[class] pre [class*="token"] {
  text-shadow: none !important;
}

/* Cards : shadows simples au lieu de stacks complexes */
html body.izi-game .profil-card,
html body.izi-game .arena-card,
html body.izi-game .jouer-card,
html body.izi-game .arena-stage,
html body.izi-game .classement-list {
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4) !important;
}
html body.izi-game .profil-card:hover,
html body.izi-game .arena-card:hover,
html body.izi-game .jouer-card:hover {
  box-shadow:
    0 8px 24px -6px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(0, 225, 255, 0.2) !important;
}

/* Pas de halo gradient autour des cards au hover (les ::before/::after de #20) */
html body.izi-game .profil-card::before,
html body.izi-game .arena-card::before,
html body.izi-game .jouer-card::before,
html body.izi-game .ivann-cours-card::before,
html body.izi-game .miniprojet-card::before,
html body.izi-game .langage-card::before {
  display: none !important;
  opacity: 0 !important;
}

html body.izi-game .profil-card::after,
html body.izi-game .arena-card::after,
html body.izi-game .jouer-card::after {
  display: none !important;
}

/* Reflet supérieur des cards (#20) — retire */
html body.izi-game .ivann-cours-card::after,
html body.izi-game .miniprojet-card::after {
  display: none !important;
}

/* ============================================================
   3. TYPO : calme les uppercase et letter-spacing
   ============================================================ */

/* Body : weight 400 par défaut */
html body.izi-game-course p,
html body.izi-game-course li,
html body.izi-game-course .field--name-body,
html body.izi-game-course .block-field-blocknodecoursbody,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours {
  font-weight: 400 !important;
  letter-spacing: 0 !important;
}

/* Titres dans body cours : letter-spacing minimal, pas d'uppercase forcé */
html body.izi-game-course .field--name-body h3,
html body.izi-game-course .block-field-blocknodecoursbody h3,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours h3 {
  letter-spacing: 0.005em !important;
  text-transform: none !important;
}

html body.izi-game-course .field--name-body h4,
html body.izi-game-course .block-field-blocknodecoursbody h4,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours h4 {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* Strong : pas de glow, juste plus gras */
html body.izi-game-course strong,
html body.izi-game-course .field--name-body strong,
html body.izi-game-course .block-field-blocknodecoursbody strong {
  text-shadow: none !important;
  font-weight: 600 !important;
  color: var(--g-text-bright, #ffffff) !important;
}

/* H2 quêtes : garde uppercase mais letter-spacing réduit */
html body.izi-game-course .field--name-body h2,
html body.izi-game-course .block-field-blocknodecoursbody h2,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours h2 {
  letter-spacing: 0.02em !important;
  text-shadow: none !important;
}

/* ============================================================
   4. RADIUS STANDARDS : 8 / 12 / 16
   ============================================================ */

/* Pills (chips, badges, small buttons) : 8px */
html body.izi-game .grade-chip,
html body.izi-game .ivann-quest-reading-time,
html body.izi-game .arena-card__btn,
html body.izi-game .classement-action,
html body.izi-game .btn-save,
html body.izi-game .ivann-exo-btn,
html body.izi-game .ivann-exo-nav__back,
html body.izi-game [class*="-badge"] {
  border-radius: 8px !important;
}

/* Cards (small) : 12px */
html body.izi-game .profil-card,
html body.izi-game .arena-card,
html body.izi-game .arena-stage,
html body.izi-game .jouer-card,
html body.izi-game .ivann-cours-card,
html body.izi-game .miniprojet-card,
html body.izi-game .langage-card,
html body.izi-game .cosmetic-item,
html body.izi-game .inbox-msg,
html body.izi-game .ivann-mini-exercise {
  border-radius: 12px !important;
}

/* Cards larges (containers, modals, course pages) : 16px */
html body.izi-game .ivann-course-page,
html body.izi-game .node--view-mode-full,
html body.izi-game .profil-modal,
html body.izi-game .classement-list,
html body.izi-game .profil-card--main {
  border-radius: 16px !important;
}

/* Inputs : 8px */
html body.izi-game input[type="text"],
html body.izi-game input[type="email"],
html body.izi-game input[type="password"],
html body.izi-game input[type="search"],
html body.izi-game textarea,
html body.izi-game select {
  border-radius: 8px !important;
}

/* ============================================================
   5. ANIMATIONS : retire les hover trop agressifs
   ============================================================ */

/* Cards : translation au hover réduite (-2px au lieu de -4px) */
html body.izi-game .profil-card:hover,
html body.izi-game .arena-card:hover,
html body.izi-game .jouer-card:hover {
  transform: translateY(-2px) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

/* Boutons : juste lift subtil */
html body.izi-game button:hover:not(:disabled),
html body.izi-game .btn-save:hover,
html body.izi-game .arena-card__btn:hover,
html body.izi-game .classement-action:hover {
  transform: translateY(-1px) !important;
}

/* ============================================================
   6. SLIDESHOW INDICATOR : moins glowing
   ============================================================ */

html body.izi-game .ivann-slideshow__indicator {
  text-shadow: none !important;
  border-color: rgba(255, 255, 255, 0.06) !important;
  background: rgba(10, 14, 26, 0.7) !important;
}

html body.izi-game .ivann-slideshow__step-num {
  text-shadow: none !important;
}

/* Progress bar : moins de glow */
html body.izi-game .ivann-slideshow__progress-fill {
  box-shadow: none !important;
}
html body.izi-game .profil-xp-fill {
  box-shadow: 0 0 6px rgba(0, 225, 255, 0.3) !important;
}

/* ============================================================
   7. QUÊTE BADGE : garde le numéroté mais calme
   ============================================================ */

html body.izi-game-course .field--name-body h2::before,
html body.izi-game-course .block-field-blocknodecoursbody h2::before,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours h2::before {
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  text-shadow: 0 0 4px rgba(0, 225, 255, 0.4) !important;
}

/* ============================================================
   8. MINI-EXERCISE CARD : moins d'effets, plus posée
   ============================================================ */

html body.izi-game .ivann-mini-exercise {
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.3) !important;
}

/* Retire l'animation pulse sur le badge XP de l'exo result */
html body.izi-game .arena-result__xp {
  animation: none !important;
}

/* ============================================================
   9. SCROLL & SELECTION
   ============================================================ */

html body.izi-game ::selection {
  background: rgba(79, 124, 255, 0.25) !important;
  color: #ffffff !important;
}

/* Scrollbar plus discrète */
html body.izi-game::-webkit-scrollbar {
  width: 10px !important;
}
html body.izi-game::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.08) !important;
}
html body.izi-game::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 225, 255, 0.25) !important;
}

/* ============================================================
   10. PRESERVE : ce qui reste avec glow (signature gaming)
   ============================================================ */

/* Pseudo grades Diamant et Légende — c'est mérité */
html body.izi-game .player-pseudo[data-grade="diamant"] {
  filter: drop-shadow(0 0 6px rgba(0, 225, 255, 0.5));
}
html body.izi-game .player-pseudo[data-grade="legende"] {
  filter: drop-shadow(0 0 8px rgba(217, 70, 239, 0.5));
}

/* Badge XP HUD selon grade — visible signal de progression */
html body.izi-game .ivann-xp-badge[data-grade="diamant"] {
  box-shadow: 0 0 0 1px var(--g-cyan), 0 0 16px -4px rgba(0, 225, 255, 0.5) !important;
}
html body.izi-game .ivann-xp-badge[data-grade="legende"] {
  box-shadow: 0 0 0 1px var(--g-magenta), 0 0 18px -4px rgba(217, 70, 239, 0.5) !important;
  animation: none !important;
}

/* Boutons "Faire l'exercice" / final → glow visible (call to action important) */
html body.izi-game .ivann-slide__btn--finish,
html body.izi-game .ivann-exo-btn--final {
  animation: none !important;
}
html body.izi-game .ivann-slide__btn--finish:hover,
html body.izi-game .ivann-exo-btn--final:hover {
  box-shadow: 0 8px 20px -6px rgba(251, 191, 36, 0.5) !important;
}
