/* ═══════════════════════════════════════════════════════════════════
   MEDALS.CSS — TopPopote Grade Medal System
   Extrait de grades_preview.html — ne pas modifier le preview
═══════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   MEDAL BASE — SVG sprite
═══════════════════════════════════════ */
.medal {
  transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  flex-shrink: 0;
  display: inline-block;
  overflow: visible;
}

/* Tailles — ratio viewBox 80:90 (légèrement plus haut que large) */
.medal.xs { width: 28px;  height: 31px; }
.medal.sm { width: 48px;  height: 54px; }
.medal.md { width: 90px;  height: 101px; }
.medal.lg { width: 160px; height: 180px; }
.medal.xl { width: 200px; height: 225px; }

/* ── Ribbon ── */
.medal-ribbon {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: 2px;
}
.medal.md .medal-ribbon { top: -14px; }
.medal.lg .medal-ribbon { top: -22px; }
.medal.xl .medal-ribbon { top: -28px; }

.medal-ribbon-left,
.medal-ribbon-right {
  width: 10px;
  height: 20px;
  border-radius: 0 0 6px 6px;
}
.medal.lg .medal-ribbon-left,
.medal.lg .medal-ribbon-right { width: 16px; height: 30px; border-radius: 0 0 9px 9px; }
.medal.xl .medal-ribbon-left,
.medal.xl .medal-ribbon-right { width: 20px; height: 38px; border-radius: 0 0 12px 12px; }

/* ── Circle body ── */
.medal-body {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ── Inner ring ── */
.medal-inner-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid;
  opacity: 0.35;
  pointer-events: none;
}
.medal.sm .medal-inner-ring  { inset: 5px; }
.medal.md .medal-inner-ring  { inset: 7px; }
.medal.lg .medal-inner-ring  { inset: 12px; }
.medal.xl .medal-inner-ring  { inset: 14px; }

/* ── Shine ── */
.medal-shine {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  filter: blur(4px);
  pointer-events: none;
}
.medal.sm .medal-shine  { width: 12px; height: 12px; top: 6px;  left: 8px; }
.medal.md .medal-shine  { width: 22px; height: 22px; top: 10px; left: 14px; }
.medal.lg .medal-shine  { width: 40px; height: 40px; top: 18px; left: 24px; }
.medal.xl .medal-shine  { width: 50px; height: 50px; top: 22px; left: 30px; }

/* ── Emoji ── */
.medal-emoji {
  position: relative;
  z-index: 1;
  line-height: 1;
  user-select: none;
}
.medal.xs .medal-emoji  { font-size: 13px; }
.medal.sm .medal-emoji  { font-size: 22px; }
.medal.md .medal-emoji  { font-size: 34px; }
.medal.lg .medal-emoji  { font-size: 62px; }
.medal.xl .medal-emoji  { font-size: 78px; }

/* ── Stars ── */
.medal-stars {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  z-index: 3;
  filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.6));
}
.medal.md .medal-stars  { bottom: -7px; }
.medal.lg .medal-stars  { bottom: -12px; gap: 3px; }
.medal.xl .medal-stars  { bottom: -14px; gap: 4px; }

.medal-star { line-height: 1; }
.medal.md .medal-star  { font-size: 10px; }
.medal.lg .medal-star  { font-size: 16px; }
.medal.xl .medal-star  { font-size: 20px; }

/* ═══════════════════════════════════════
   GRADE THEMES — Medal colors
═══════════════════════════════════════ */

/* ── 0. NOVICE — pierre grise ── */
.medal-novice .medal-body {
  background: radial-gradient(135deg at 30% 25%, #d6d3d1, #a8a29e, #57534e);
  border: 2.5px solid rgba(168, 162, 158, 0.35);
  box-shadow:
    0 0 0 1px rgba(120, 113, 108, 0.2),
    0 4px 20px rgba(87, 83, 78, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.medal-novice .medal-inner-ring { border-color: #e7e5e4; }
.medal-novice .medal-ribbon-left  { background: #78716c; }
.medal-novice .medal-ribbon-right { background: #57534e; }

/* ── 1. PLONGEUR — bleu ardoise ── */
.medal-plongeur .medal-body {
  background: radial-gradient(135deg at 30% 25%, #94a3b8, #64748b, #334155);
  border: 2.5px solid rgba(148, 163, 184, 0.4);
  box-shadow:
    0 0 0 1px rgba(100, 116, 139, 0.2),
    0 6px 28px rgba(51, 65, 85, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.medal-plongeur .medal-inner-ring { border-color: #cbd5e1; }
.medal-plongeur .medal-ribbon-left  { background: #64748b; }
.medal-plongeur .medal-ribbon-right { background: #475569; }

/* ── 1b. ÉPLUCHEUR — cuivre bronze ── */
.medal-eplucheur .medal-body {
  background: radial-gradient(135deg at 30% 25%, #f0b060, #cd7f32, #7a3e22);
  border: 2.5px solid rgba(240, 160, 82, 0.4);
  box-shadow:
    0 0 0 1px rgba(205, 127, 50, 0.2),
    0 6px 24px rgba(122, 62, 34, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.medal-eplucheur .medal-inner-ring { border-color: #ffd27f; }
.medal-eplucheur .medal-ribbon-left  { background: #cd7f32; }
.medal-eplucheur .medal-ribbon-right { background: #8b4513; }

/* ── 2. APPRENTI — violet ── */
.medal-apprenti .medal-body {
  background: radial-gradient(135deg at 30% 25%, #a5b4fc, #6366f1, #3730a3);
  border: 2.5px solid rgba(165, 180, 252, 0.45);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.25),
    0 6px 28px rgba(79, 70, 229, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-apprenti .medal-inner-ring { border-color: #c7d2fe; }
.medal-apprenti .medal-ribbon-left  { background: #6366f1; }
.medal-apprenti .medal-ribbon-right { background: #4f46e5; }

/* ── 2b. COMMIS — vert émeraude clair ── */
/* (anciennement "Commis de Cuisine", maintenant "Commis") */

/* ── 3. COMMIS — vert clair ── */
.medal-commis .medal-body {
  background: radial-gradient(135deg at 30% 25%, #6ee7b7, #34d399, #059669);
  border: 2.5px solid rgba(110, 231, 183, 0.45);
  box-shadow:
    0 0 0 1px rgba(52, 211, 153, 0.25),
    0 6px 28px rgba(16, 185, 129, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-commis .medal-inner-ring { border-color: #a7f3d0; }
.medal-commis .medal-ribbon-left  { background: #10b981; }
.medal-commis .medal-ribbon-right { background: #059669; }

/* ── 3b. PREMIER COMMIS — vert plus intense ── */
.medal-premiercommis .medal-body {
  background: radial-gradient(135deg at 30% 25%, #86efac, #22c55e, #14532d);
  border: 2.5px solid rgba(134, 239, 172, 0.45);
  box-shadow:
    0 0 0 1px rgba(34, 197, 94, 0.25),
    0 6px 26px rgba(21, 128, 61, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-premiercommis .medal-inner-ring { border-color: #bbf7d0; }
.medal-premiercommis .medal-ribbon-left  { background: #16a34a; }
.medal-premiercommis .medal-ribbon-right { background: #15803d; }

/* ── 3c. DEMI-CHEF DE PARTIE — bronze doré ── */
.medal-demichef .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fde68a, #d97706, #78350f);
  border: 2.5px solid rgba(251, 191, 36, 0.45);
  box-shadow:
    0 0 0 1px rgba(217, 119, 6, 0.25),
    0 6px 28px rgba(120, 53, 15, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-demichef .medal-inner-ring { border-color: #fef3c7; }
.medal-demichef .medal-ribbon-left  { background: #b45309; }
.medal-demichef .medal-ribbon-right { background: #92400e; }

/* ── 4. CHEF DE PARTIE — émeraude + or ── */
.medal-partie .medal-body {
  background: radial-gradient(135deg at 30% 25%, #34d399, #059669, #064e3b);
  border: 2.5px solid rgba(52, 211, 153, 0.5);
  box-shadow:
    0 0 0 1px rgba(5, 150, 105, 0.3),
    0 8px 32px rgba(5, 150, 105, 0.6),
    0 0 60px rgba(52, 211, 153, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-partie .medal-inner-ring { border-color: #6ee7b7; border-width: 2px; }
.medal-partie .medal-ribbon-left  { background: #f59e0b; }
.medal-partie .medal-ribbon-right { background: #d97706; }

/* ── 4b. CHEF TOURNANT — bleu sarcelle ── */
.medal-tournant .medal-body {
  background: radial-gradient(135deg at 30% 25%, #99f6e4, #14b8a6, #134e4a);
  border: 2.5px solid rgba(45, 212, 191, 0.45);
  box-shadow:
    0 0 0 1px rgba(20, 184, 166, 0.25),
    0 7px 28px rgba(19, 78, 74, 0.5),
    0 0 50px rgba(20, 184, 166, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-tournant .medal-inner-ring { border-color: #ccfbf1; border-width: 2px; }
.medal-tournant .medal-ribbon-left  { background: #0d9488; }
.medal-tournant .medal-ribbon-right { background: #0f766e; }

/* ── 4c. CHEF SAUCIER — orange ambré ── */
.medal-saucier .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fdba74, #ea580c, #7c2d12);
  border: 2.5px solid rgba(251, 146, 60, 0.45);
  box-shadow:
    0 0 0 1px rgba(234, 88, 12, 0.28),
    0 7px 30px rgba(124, 45, 18, 0.55),
    0 0 55px rgba(249, 115, 22, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-saucier .medal-inner-ring { border-color: #ffedd5; border-width: 2px; }
.medal-saucier .medal-ribbon-left  { background: #ea580c; }
.medal-saucier .medal-ribbon-right { background: #c2410c; }

/* ── 4d. SECOND DE CUISINE — argent ── */
.medal-second .medal-body {
  background: radial-gradient(135deg at 30% 25%, #f1f5f9, #94a3b8, #334155);
  border: 2.5px solid rgba(203, 213, 225, 0.55);
  box-shadow:
    0 0 0 1px rgba(148, 163, 184, 0.3),
    0 8px 32px rgba(51, 65, 85, 0.5),
    0 0 60px rgba(148, 163, 184, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.medal-second .medal-inner-ring { border-color: #e2e8f0; border-width: 2px; }
.medal-second .medal-ribbon-left  { background: #64748b; }
.medal-second .medal-ribbon-right { background: #475569; }

/* ── 5. SOUS-CHEF — or ── */
.medal-souschef .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fde68a, #f59e0b, #92400e);
  border: 2.5px solid rgba(252, 211, 77, 0.5);
  box-shadow:
    0 0 0 1px rgba(245, 158, 11, 0.35),
    0 8px 32px rgba(217, 119, 6, 0.55),
    0 0 60px rgba(245, 158, 11, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.medal-souschef .medal-inner-ring { border-color: #fef3c7; border-width: 2px; }
.medal-souschef .medal-ribbon-left  { background: #f59e0b; }
.medal-souschef .medal-ribbon-right { background: #d97706; }

/* ── 5b. CHEF DE CUISINE — or impérial ── */
.medal-chefdecuisine .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fef08a, #eab308, #713f12);
  border: 2.5px solid rgba(234, 179, 8, 0.55);
  box-shadow:
    0 0 0 1px rgba(202, 138, 4, 0.35),
    0 8px 34px rgba(113, 63, 18, 0.6),
    0 0 65px rgba(234, 179, 8, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.medal-chefdecuisine .medal-inner-ring { border-color: #fefce8; border-width: 2px; }
.medal-chefdecuisine .medal-ribbon-left  { background: #ca8a04; }
.medal-chefdecuisine .medal-ribbon-right { background: #a16207; }

/* ── 6. CHEF EXÉCUTIF — orange intense ── */
.medal-executif .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fdba74, #f97316, #7c2d12);
  border: 2.5px solid rgba(251, 146, 60, 0.5);
  box-shadow:
    0 0 0 1px rgba(249, 115, 22, 0.35),
    0 8px 36px rgba(234, 88, 12, 0.6),
    0 0 70px rgba(249, 115, 22, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-executif .medal-inner-ring { border-color: #fed7aa; border-width: 2px; }
.medal-executif .medal-ribbon-left  { background: #f97316; }
.medal-executif .medal-ribbon-right { background: #ea580c; }

/* ── 6b. MAÎTRE RESTAURATEUR — platine bleuté ── */
.medal-maitre .medal-body {
  background: radial-gradient(135deg at 30% 25%, #e0f2fe, #0ea5e9, #0c4a6e);
  border: 2.5px solid rgba(186, 230, 253, 0.55);
  box-shadow:
    0 0 0 1px rgba(14, 165, 233, 0.3),
    0 8px 34px rgba(12, 74, 110, 0.55),
    0 0 70px rgba(14, 165, 233, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.medal-maitre .medal-inner-ring { border-color: #bae6fd; border-width: 2px; }
.medal-maitre .medal-ribbon-left  { background: #0284c7; }
.medal-maitre .medal-ribbon-right { background: #0369a1; }

/* ── 6c. VISIONNAIRE CULINAIRE — améthyste ── */
.medal-visionnaire .medal-body {
  background: radial-gradient(135deg at 30% 25%, #e879f9, #8b5cf6, #3b0764);
  border: 2.5px solid rgba(192, 132, 252, 0.5);
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.35),
    0 8px 36px rgba(59, 7, 100, 0.6),
    0 0 80px rgba(139, 92, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}
.medal-visionnaire .medal-inner-ring { border-color: #f0abfc; border-width: 2px; }
.medal-visionnaire .medal-ribbon-left  { background: #7c3aed; }
.medal-visionnaire .medal-ribbon-right { background: #6d28d9; }

/* ── 7. CHEF ÉTOILÉ — rose/fuchsia ── */
.medal-etoile .medal-body {
  background: radial-gradient(135deg at 30% 25%, #f9a8d4, #ec4899, #831843);
  border: 2.5px solid rgba(244, 114, 182, 0.5);
  box-shadow:
    0 0 0 1px rgba(236, 72, 153, 0.35),
    0 8px 36px rgba(219, 39, 119, 0.6),
    0 0 80px rgba(236, 72, 153, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-etoile .medal-inner-ring { border-color: #fbcfe8; border-width: 2px; }
.medal-etoile .medal-ribbon-left  { background: #fbbf24; }
.medal-etoile .medal-ribbon-right { background: #f59e0b; }

/* ── 7b. CHEF DOUBLEMENT ÉTOILÉ — rose profond ── */
.medal-etoile2 .medal-body {
  background: radial-gradient(135deg at 30% 25%, #f472b6, #db2777, #831843);
  border: 2.5px solid rgba(244, 114, 182, 0.55);
  box-shadow:
    0 0 0 1px rgba(219, 39, 119, 0.4),
    0 8px 38px rgba(131, 24, 67, 0.65),
    0 0 85px rgba(236, 72, 153, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-etoile2 .medal-inner-ring { border-color: #fce7f3; border-width: 2px; }
.medal-etoile2 .medal-ribbon-left  { background: #be185d; }
.medal-etoile2 .medal-ribbon-right { background: #9d174d; }

/* ── 7c. CHEF TRIPLEMENT ÉTOILÉ — rouge cramoisie ── */
.medal-etoile3 .medal-body {
  background: radial-gradient(135deg at 30% 25%, #fca5a5, #dc2626, #7f1d1d);
  border: 2.5px solid rgba(252, 165, 165, 0.5);
  box-shadow:
    0 0 0 1px rgba(220, 38, 38, 0.4),
    0 8px 38px rgba(127, 29, 29, 0.7),
    0 0 90px rgba(220, 38, 38, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.medal-etoile3 .medal-inner-ring { border-color: #fee2e2; border-width: 2px; }
.medal-etoile3 .medal-ribbon-left  { background: #b91c1c; }
.medal-etoile3 .medal-ribbon-right { background: #991b1b; }

/* ── 8. LÉGENDE — or impérial, pulse ── */
.medal-legende .medal-body {
  background: radial-gradient(135deg at 25% 20%, #fef9c3, #fde68a, #f59e0b, #b45309, #78350f);
  border: 3px solid rgba(252, 211, 77, 0.65);
  box-shadow:
    0 0 0 2px rgba(245, 158, 11, 0.4),
    0 0 0 5px rgba(245, 158, 11, 0.1),
    0 8px 40px rgba(180, 83, 9, 0.65),
    0 0 90px rgba(245, 158, 11, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.35);
  animation: legendePulse 2.5s ease-in-out infinite;
}
@keyframes legendePulse {
  0%, 100% {
    box-shadow:
      0 0 0 2px rgba(245, 158, 11, 0.4),
      0 0 0 5px rgba(245, 158, 11, 0.1),
      0 8px 40px rgba(180, 83, 9, 0.65),
      0 0 90px rgba(245, 158, 11, 0.22),
      inset 0 2px 0 rgba(255, 255, 255, 0.35);
  }
  50% {
    box-shadow:
      0 0 0 2px rgba(245, 158, 11, 0.7),
      0 0 0 9px rgba(245, 158, 11, 0.08),
      0 8px 40px rgba(180, 83, 9, 0.85),
      0 0 140px rgba(245, 158, 11, 0.38),
      inset 0 2px 0 rgba(255, 255, 255, 0.35);
  }
}
.medal-legende .medal-inner-ring { border-color: #fef3c7; border-width: 2px; opacity: 0.55; }
.medal-legende .medal-ribbon-left  { background: #b45309; }
.medal-legende .medal-ribbon-right { background: #92400e; }

/* ═══════════════════════════════════════
   CINEMATIC ANIMATION
═══════════════════════════════════════ */
#grade-cinematic {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#grade-cinematic.active { display: flex; }

.gc-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, #071a0e 0%, #010804 100%);
  opacity: 0;
  animation: gcBdIn 0.45s ease forwards;
}
@keyframes gcBdIn { to { opacity: 1; } }

.gc-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  animation: gcFlash 0.35s 0.85s ease forwards;
}
@keyframes gcFlash {
  0%   { opacity: 0; }
  25%  { opacity: 0.4; }
  100% { opacity: 0; }
}

canvas#gc-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.gc-rings {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 2;
}
.gc-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid;
  opacity: 0;
  transform: scale(0.4);
}
.gc-ring:nth-child(1) { width: 240px;  height: 240px;  animation: gcRing 0.9s 0.55s cubic-bezier(0.2, 0, 0, 1) forwards; }
.gc-ring:nth-child(2) { width: 360px;  height: 360px;  animation: gcRing 0.9s 0.70s cubic-bezier(0.2, 0, 0, 1) forwards; }
.gc-ring:nth-child(3) { width: 500px;  height: 500px;  animation: gcRing 0.9s 0.85s cubic-bezier(0.2, 0, 0, 1) forwards; }
.gc-ring:nth-child(4) { width: 680px;  height: 680px;  animation: gcRing 0.9s 1.00s cubic-bezier(0.2, 0, 0, 1) forwards; }
.gc-ring:nth-child(5) { width: 900px;  height: 900px;  animation: gcRing 0.9s 1.15s cubic-bezier(0.2, 0, 0, 1) forwards; }
@keyframes gcRing { to { opacity: 0.2; transform: scale(1); } }

.gc-glow {
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  animation: gcGlowIn 0.7s 0.3s ease forwards;
}
@keyframes gcGlowIn { to { opacity: 1; } }

.gc-content {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gc-eyebrow {
  font-family: 'Poppins', sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  transform: translateY(8px);
  animation: gcUp 0.5s 0.65s ease forwards;
  margin-bottom: 28px;
}
@keyframes gcUp { to { opacity: 1; transform: translateY(0); } }

.gc-medal-wrap {
  position: relative;
  opacity: 0;
  transform: scale(0.2) rotate(-20deg);
  animation: gcMedalIn 0.8s 0.88s cubic-bezier(0.34, 1.5, 0.64, 1) forwards;
  margin-bottom: 40px;
}
@keyframes gcMedalIn { to { opacity: 1; transform: scale(1) rotate(0deg); } }

/* Rays */
.gc-rays {
  position: absolute;
  inset: -80px;
  opacity: 0;
  animation: gcRaysIn 0.4s 0.9s ease forwards;
  pointer-events: none;
}
@keyframes gcRaysIn { to { opacity: 1; } }
.gc-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  height: 2px;
  border-radius: 999px;
  transform-origin: left center;
  opacity: 0.35;
}

.gc-grade-name {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(40px, 8vw, 72px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1;
  opacity: 0;
  transform: translateY(22px);
  animation: gcNameIn 0.65s 1.25s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
  margin-bottom: 14px;
  text-shadow: 0 0 80px currentColor;
}
@keyframes gcNameIn { to { opacity: 1; transform: translateY(0); } }

.gc-sub {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
  opacity: 0;
  animation: gcUp 0.5s 1.55s ease forwards;
  margin-bottom: 14px;
}

.gc-xp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  opacity: 0;
  animation: gcUp 0.5s 1.7s ease forwards;
  margin-bottom: 48px;
}

.gc-close-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Poppins', sans-serif;
  font-size: 12px;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.5px;
  opacity: 0;
  animation: gcUp 0.5s 1.9s ease forwards;
  transition: all 0.2s;
}
.gc-close-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* Exit */
#grade-cinematic.exiting > * {
  animation: gcOut 0.4s ease forwards !important;
}
@keyframes gcOut { to { opacity: 0; } }

/* ═══════════════════════════════════════
   LIGHT THEME OVERRIDES
═══════════════════════════════════════ */

/* Medals — adoucir les ombres en mode clair (les couleurs de grade restent identiques) */
[data-theme="light"] .medal-novice .medal-body {
  box-shadow: 0 0 0 1px rgba(120,113,108,0.15), 0 4px 14px rgba(87,83,78,0.15), inset 0 1px 0 rgba(255,255,255,0.35);
}
[data-theme="light"] .medal-eplucheur .medal-body {
  box-shadow: 0 0 0 1px rgba(205,127,50,0.2), 0 4px 16px rgba(122,62,34,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-premiercommis .medal-body {
  box-shadow: 0 0 0 1px rgba(34,197,94,0.2), 0 4px 16px rgba(21,128,61,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-demichef .medal-body {
  box-shadow: 0 0 0 1px rgba(217,119,6,0.2), 0 4px 16px rgba(120,53,15,0.18), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-tournant .medal-body {
  box-shadow: 0 0 0 1px rgba(20,184,166,0.2), 0 5px 18px rgba(19,78,74,0.18), 0 0 25px rgba(20,184,166,0.06), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-saucier .medal-body {
  box-shadow: 0 0 0 1px rgba(234,88,12,0.25), 0 5px 18px rgba(124,45,18,0.2), 0 0 28px rgba(249,115,22,0.08), inset 0 1px 0 rgba(255,255,255,0.28);
}
[data-theme="light"] .medal-second .medal-body {
  box-shadow: 0 0 0 1px rgba(148,163,184,0.25), 0 5px 20px rgba(51,65,85,0.18), inset 0 1px 0 rgba(255,255,255,0.45);
}
[data-theme="light"] .medal-chefdecuisine .medal-body {
  box-shadow: 0 0 0 1px rgba(202,138,4,0.3), 0 6px 20px rgba(113,63,18,0.22), 0 0 32px rgba(234,179,8,0.1), inset 0 1px 0 rgba(255,255,255,0.35);
}
[data-theme="light"] .medal-maitre .medal-body {
  box-shadow: 0 0 0 1px rgba(14,165,233,0.25), 0 6px 20px rgba(12,74,110,0.2), 0 0 35px rgba(14,165,233,0.08), inset 0 1px 0 rgba(255,255,255,0.35);
}
[data-theme="light"] .medal-visionnaire .medal-body {
  box-shadow: 0 0 0 1px rgba(139,92,246,0.3), 0 6px 22px rgba(59,7,100,0.22), 0 0 40px rgba(139,92,246,0.1), inset 0 1px 0 rgba(255,255,255,0.28);
}
[data-theme="light"] .medal-etoile2 .medal-body {
  box-shadow: 0 0 0 1px rgba(219,39,119,0.3), 0 6px 22px rgba(131,24,67,0.22), 0 0 42px rgba(236,72,153,0.1), inset 0 1px 0 rgba(255,255,255,0.25);
}
[data-theme="light"] .medal-etoile3 .medal-body {
  box-shadow: 0 0 0 1px rgba(220,38,38,0.3), 0 6px 22px rgba(127,29,29,0.22), 0 0 45px rgba(220,38,38,0.1), inset 0 1px 0 rgba(255,255,255,0.25);
}
[data-theme="light"] .medal-plongeur .medal-body {
  box-shadow: 0 0 0 1px rgba(100,116,139,0.2), 0 4px 16px rgba(51,65,85,0.18), inset 0 1px 0 rgba(255,255,255,0.4);
}
[data-theme="light"] .medal-apprenti .medal-body {
  box-shadow: 0 0 0 1px rgba(99,102,241,0.25), 0 4px 16px rgba(79,70,229,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-commis .medal-body {
  box-shadow: 0 0 0 1px rgba(52,211,153,0.2), 0 4px 16px rgba(16,185,129,0.2), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-partie .medal-body {
  box-shadow: 0 0 0 1px rgba(5,150,105,0.25), 0 6px 20px rgba(5,150,105,0.2), 0 0 30px rgba(52,211,153,0.08), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-souschef .medal-body {
  box-shadow: 0 0 0 1px rgba(245,158,11,0.3), 0 6px 20px rgba(217,119,6,0.2), 0 0 30px rgba(245,158,11,0.1), inset 0 1px 0 rgba(255,255,255,0.3);
}
[data-theme="light"] .medal-executif .medal-body {
  box-shadow: 0 0 0 1px rgba(249,115,22,0.3), 0 6px 22px rgba(234,88,12,0.22), 0 0 35px rgba(249,115,22,0.1), inset 0 1px 0 rgba(255,255,255,0.25);
}
[data-theme="light"] .medal-etoile .medal-body {
  box-shadow: 0 0 0 1px rgba(236,72,153,0.3), 0 6px 22px rgba(219,39,119,0.22), 0 0 40px rgba(236,72,153,0.1), inset 0 1px 0 rgba(255,255,255,0.25);
}
[data-theme="light"] .medal-legende .medal-body {
  box-shadow: 0 0 0 2px rgba(245,158,11,0.35), 0 0 0 5px rgba(245,158,11,0.08), 0 6px 28px rgba(180,83,9,0.3), 0 0 50px rgba(245,158,11,0.12), inset 0 2px 0 rgba(255,255,255,0.4);
}
[data-theme="light"] .medal-legende .medal-body {
  animation: legendePulseLight 2.5s ease-in-out infinite;
}
@keyframes legendePulseLight {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(245,158,11,0.35), 0 0 0 5px rgba(245,158,11,0.08), 0 6px 28px rgba(180,83,9,0.3), 0 0 50px rgba(245,158,11,0.12), inset 0 2px 0 rgba(255,255,255,0.4);
  }
  50% {
    box-shadow: 0 0 0 2px rgba(245,158,11,0.6), 0 0 0 8px rgba(245,158,11,0.06), 0 6px 28px rgba(180,83,9,0.45), 0 0 80px rgba(245,158,11,0.2), inset 0 2px 0 rgba(255,255,255,0.4);
  }
}

/* Cinematic animation — fond clair en mode light */
[data-theme="light"] .gc-backdrop {
  background: radial-gradient(ellipse at center, #e8f5f0 0%, #f0f9f4 100%);
}
[data-theme="light"] .gc-eyebrow {
  color: rgba(0, 0, 0, 0.4);
}
[data-theme="light"] .gc-sub {
  color: rgba(0, 0, 0, 0.45);
}
[data-theme="light"] .gc-xp-badge {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.45);
}
[data-theme="light"] .gc-close-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.12);
  color: rgba(0, 0, 0, 0.6);
}
[data-theme="light"] .gc-close-btn:hover {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.85);
}
