/* ====================================================================
   IVANN REFINED LAYER #40 — Fintech/gaming équilibré
   Ajoute le gaming-feel là où ça manquait après le calm layer #39.
   ==================================================================== */

/* ============================================================
   1. CARDS : accent latéral subtle (style Linear/Vercel)
   ============================================================ */

html body.izi-game .profil-card,
html body.izi-game .arena-card,
html body.izi-game .jouer-card,
html body.izi-game .ivann-cours-card {
  position: relative !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.01)) !important;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease !important;
}

/* Trait latéral gauche cyan : invisible par défaut, visible au hover */
html body.izi-game .profil-card::before,
html body.izi-game .arena-card::before,
html body.izi-game .jouer-card::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  left: 0; top: 16px; bottom: 16px;
  width: 2px !important;
  background: linear-gradient(180deg, transparent, var(--g-cyan, #00e1ff) 50%, transparent) !important;
  opacity: 0 !important;
  transition: opacity 0.3s ease !important;
  pointer-events: none;
  border-radius: 0 !important;
  filter: none !important;
  box-shadow: none !important;
  background-image: linear-gradient(180deg, transparent, var(--g-cyan, #00e1ff) 50%, transparent) !important;
  background-color: transparent !important;
}

html body.izi-game .profil-card:hover::before,
html body.izi-game .arena-card:hover::before,
html body.izi-game .jouer-card:hover::before {
  opacity: 1 !important;
}

html body.izi-game .profil-card:hover,
html body.izi-game .arena-card:hover,
html body.izi-game .jouer-card:hover {
  border-color: rgba(0, 225, 255, 0.2) !important;
  background: linear-gradient(180deg, rgba(0,225,255,0.04), rgba(255,255,255,0.01)) !important;
}

/* ============================================================
   2. STAT NUMBERS : gradient text premium (au lieu de couleur solide)
   ============================================================ */

html body.izi-game .profil-stat-big,
html body.izi-game .profil-modal__stat-num {
  background: linear-gradient(180deg, #ffffff 0%, #7dd3fc 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  font-weight: 700 !important;
  filter: none !important;
}

html body.izi-game .profil-level-num {
  background: linear-gradient(135deg, #00e1ff 0%, #4f7cff 50%, #a855f7 100%) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
  filter: drop-shadow(0 2px 8px rgba(79, 124, 255, 0.25)) !important;
}

/* ============================================================
   3. SLIDESHOW INDICATOR : redesign en pills + dot progression
   ============================================================ */

html body.izi-game .ivann-slideshow__indicator {
  background: rgba(10, 14, 26, 0.85) !important;
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  padding: 12px 20px !important;
  border-radius: 999px !important;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5) !important;
}

/* Le numéro de quête : gradient cyan→bleu */
html body.izi-game .ivann-slideshow__step-num {
  background: linear-gradient(90deg, #00e1ff, #4f7cff) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

/* Le label "QUÊTE" — plus discret */
html body.izi-game .ivann-slideshow__step-label {
  color: rgba(255, 255, 255, 0.5) !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.18em !important;
}

/* Progress fill : ajout d'un éclat à l'extrémité */
html body.izi-game .ivann-slideshow__progress {
  height: 3px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

html body.izi-game .ivann-slideshow__progress-fill {
  background: linear-gradient(90deg, #00e1ff, #4f7cff, #a855f7) !important;
  box-shadow: 0 0 8px rgba(0, 225, 255, 0.4) !important;
  position: relative;
}

html body.izi-game .ivann-slideshow__progress-fill::after {
  content: '';
  position: absolute;
  right: 0; top: -2px; bottom: -2px;
  width: 6px;
  background: var(--g-cyan, #00e1ff);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 225, 255, 0.8), 0 0 16px rgba(0, 225, 255, 0.4);
  opacity: 0.9;
}

/* ============================================================
   4. MINI-EXERCISE CARD : accent supérieur violet (signature défi)
   ============================================================ */

html body.izi-game .ivann-mini-exercise {
  position: relative !important;
  border: 1px solid rgba(168, 85, 247, 0.18) !important;
  background: linear-gradient(180deg, rgba(168, 85, 247, 0.04), rgba(79, 124, 255, 0.02)) !important;
  overflow: hidden !important;
}

html body.izi-game .ivann-mini-exercise::before {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  top: 0; left: 0; right: 0;
  height: 2px !important;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.6) 30%, rgba(79, 124, 255, 0.5) 70%, transparent) !important;
  opacity: 1 !important;
  pointer-events: none;
  border-radius: 0 !important;
}

/* Header de la mini-exercise card */
html body.izi-game .ivann-mini-exercise__header {
  background: rgba(168, 85, 247, 0.06) !important;
  border-bottom: 1px solid rgba(168, 85, 247, 0.1) !important;
}

/* Options buttons (réponses A/B/C/D) : refine */
html body.izi-game .ivann-mini-exercise__option {
  background: rgba(255, 255, 255, 0.025) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  transition: all 0.15s ease !important;
}

html body.izi-game .ivann-mini-exercise__option:hover:not(:disabled) {
  background: rgba(0, 225, 255, 0.05) !important;
  border-color: rgba(0, 225, 255, 0.3) !important;
  transform: translateX(2px) !important;
}

/* Letter A/B/C/D : badge plus distinct */
html body.izi-game .ivann-mini-exercise__option-letter {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  font-family: 'Rajdhani', sans-serif !important;
  font-weight: 700;
}

html body.izi-game .ivann-mini-exercise__option:hover:not(:disabled) .ivann-mini-exercise__option-letter {
  background: rgba(0, 225, 255, 0.12) !important;
  border-color: rgba(0, 225, 255, 0.3) !important;
  color: var(--g-cyan, #00e1ff) !important;
}

/* ============================================================
   5. QUÊTE BADGE : retire le chip "QUÊTE" dupliqué (le numéro suffit)
   ============================================================ */

html body.izi-game-course .field--name-body h2::after,
html body.izi-game-course .block-field-blocknodecoursbody h2::after,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours h2::after {
  display: none !important;
  content: none !important;
}

/* Le badge numéroté reste, mais on le rend plus pur (sans label "QUÊTE" séparé) */
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 {
  background: linear-gradient(135deg, rgba(0, 225, 255, 0.15), rgba(79, 124, 255, 0.1)) !important;
  border: 1px solid rgba(0, 225, 255, 0.35) !important;
  font-size: 1.4rem !important;
  width: 56px !important;
  height: 56px !important;
}

/* ============================================================
   6. BOUTONS PRIMARY : inner highlight + glow line au hover
   ============================================================ */

html body.izi-game .btn-save:not(:disabled),
html body.izi-game .arena-card__btn:not(.arena-card__btn--ghost),
html body.izi-game .classement-action:not(.classement-action--ghost),
html body.izi-game .profil-modal__btn--message,
html body.izi-game .speed-run__btn:not(.speed-run__btn--ghost),
html body.izi-game .ivann-exo-btn:not(.ivann-exo-btn--prev) {
  background: linear-gradient(135deg, #4f7cff 0%, #6366f1 60%, #8b5cf6 100%) !important;
  box-shadow:
    0 2px 6px -2px rgba(79, 124, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
  position: relative !important;
  overflow: hidden !important;
}

/* Ligne lumineuse au hover (sliding shine) */
html body.izi-game .btn-save::after,
html body.izi-game .arena-card__btn:not(.arena-card__btn--ghost)::after,
html body.izi-game .classement-action:not(.classement-action--ghost)::after,
html body.izi-game .ivann-exo-btn:not(.ivann-exo-btn--prev)::after {
  content: '' !important;
  display: block !important;
  position: absolute !important;
  top: 0; left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent) !important;
  pointer-events: none;
  transition: left 0.6s ease;
}

html body.izi-game .btn-save:hover::after,
html body.izi-game .arena-card__btn:not(.arena-card__btn--ghost):hover::after,
html body.izi-game .classement-action:not(.classement-action--ghost):hover::after,
html body.izi-game .ivann-exo-btn:not(.ivann-exo-btn--prev):hover::after {
  left: 150%;
}

html body.izi-game .btn-save:hover:not(:disabled),
html body.izi-game .arena-card__btn:not(.arena-card__btn--ghost):hover {
  box-shadow:
    0 4px 16px -4px rgba(79, 124, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px) !important;
}

/* ============================================================
   7. CODE COPY BUTTON : pill compact refiné
   ============================================================ */

html body[class] .ivann-code-copy {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 10px !important;
  letter-spacing: 0.12em !important;
  color: rgba(255, 255, 255, 0.6) !important;
  transition: all 0.15s ease !important;
  top: 10px !important;
  left: 14px !important;
}

html body[class] .ivann-code-copy:hover {
  background: rgba(0, 225, 255, 0.1) !important;
  border-color: rgba(0, 225, 255, 0.3) !important;
  color: var(--g-cyan, #00e1ff) !important;
  transform: translateY(-1px);
}

/* ============================================================
   8. LISTES : bring back ◆ subtle (touche gaming sans glow)
   ============================================================ */

html body.izi-game-course .field--name-body ul > li::before,
html body.izi-game-course .block-field-blocknodecoursbody ul > li::before,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours ul > li::before {
  content: '◆' !important;
  width: auto !important;
  height: auto !important;
  background: transparent !important;
  border-radius: 0 !important;
  color: rgba(0, 225, 255, 0.5) !important;
  font-size: 0.6em !important;
  top: 0.55em !important;
  left: 4px !important;
  text-shadow: none !important;
}

/* ============================================================
   9. EMPTY STATES : un peu plus de personnalité
   ============================================================ */

html body.izi-game .izi-empty-state {
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent) !important;
  border-radius: 12px !important;
  padding: 32px 16px !important;
}

html body.izi-game .izi-empty-state [data-lucide] {
  color: rgba(0, 225, 255, 0.4) !important;
  filter: drop-shadow(0 0 8px rgba(0, 225, 255, 0.2)) !important;
}

/* ============================================================
   10. PSEUDO-ÉLÉMENTS GENERAUX : protection
   Au cas où des layers anciens recréent des décors gratuits,
   on bloque sauf pour ce qui est explicitement autorisé.
   ============================================================ */

/* Safe-list : ces ::before/::after restent (signature) */
html body.izi-game .ivann-quest-progress__fill,
html body.izi-game .grade-chip,
html body.izi-game .ivann-xp-badge {
  /* OK */
}

/* Anti-fuite : sur les paragraphes, headings, pas de pseudo-déco */
html body.izi-game-course .field--name-body p::before,
html body.izi-game-course .field--name-body p::after,
html body.izi-game-course .block-field-blocknodecoursbody p::before,
html body.izi-game-course .block-field-blocknodecoursbody p::after {
  display: none !important;
}

/* ============================================================
   11. LIENS dans body cours : refined hover
   ============================================================ */

html body.izi-game-course .field--name-body a,
html body.izi-game-course .block-field-blocknodecoursbody a,
html body.izi-game-course .field--name-field-ivann-contenu-du-cours a {
  color: var(--g-cyan, #00e1ff) !important;
  text-decoration: none !important;
  border-bottom: 1px solid rgba(0, 225, 255, 0.25) !important;
  transition: border-color 0.15s ease, color 0.15s ease;
}

html body.izi-game-course .field--name-body a:hover,
html body.izi-game-course .block-field-blocknodecoursbody a:hover {
  border-bottom-color: var(--g-cyan, #00e1ff) !important;
  color: #ffffff !important;
}

/* ============================================================
   12. BREADCRUMB : refined
   ============================================================ */

html body.izi-game .breadcrumb,
html body.izi-game nav.breadcrumb {
  font-size: 0.75rem !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4) !important;
}

html body.izi-game .breadcrumb a {
  color: rgba(255, 255, 255, 0.55) !important;
  border: none !important;
}

html body.izi-game .breadcrumb a:hover {
  color: var(--g-cyan, #00e1ff) !important;
}
