/* ===================== TRY TO BEAT KIMCHI! (cf. kimchi.js) =====================
   L'enfer : fond rouge sombre, flammes et braises (canvas), titre en feu,
   boss qui respire. Pendant un combat contre KIMCHI, l'ecran de match se
   teinte et des braises montent derriere les courbes. */

:root {
  --k-red: #ff3b2f;
  --k-ember: #ff7a1a;
  --k-gold: #ffd166;
  --k-deep: #1a0306;
  --k-fire: linear-gradient(180deg, #fff3c4 0%, #ffd166 22%, #ff8a1f 48%, #ff3b2f 72%, #8f0d14 100%);
}

/* ----------------------------------------------------------------- onglet */
.nav-kimchi { display: inline-flex; align-items: center; gap: 7px; color: #ff8a5c; }
.nav-kimchi .nav-icon { color: var(--k-ember); filter: drop-shadow(0 0 6px rgba(255,90,30,0.7)); animation: kFlicker 2.4s infinite; }
.nav-kimchi > span:not(.kimchi-pill) { font-weight: 800; letter-spacing: 0.6px; background: var(--k-fire); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-kimchi.active { box-shadow: inset 0 0 0 1px rgba(255,90,40,0.5); background: rgba(255,59,47,0.1) !important; }
.kimchi-pill {
  padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; color: #2a0503;
  background: linear-gradient(90deg, #ffd166, #ff7a1a); box-shadow: 0 0 12px rgba(255,110,40,0.5);
}
@media (min-width: 901px) and (max-width: 1400px) { .main-nav .kimchi-pill { display: none; } }
html.mobile .nav-kimchi .kimchi-pill { position: absolute; top: 2px; left: 50%; margin-left: 3px; padding: 1px 4px; font-size: 8px; }
/* Telephone : l'onglet KIMCHI est toujours la (6 onglets, 7 pendant un Defi). */
html.mobile .main-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
html.mobile body.defi-on .main-nav { grid-template-columns: repeat(7, minmax(0, 1fr)); }
/* Onglet quand KIMCHI dort : pas de flamme qui vacille, pastille « zzz ». */
.nav-kimchi.sleeping .nav-icon { animation: none; opacity: 0.75; filter: none; }
.nav-kimchi.sleeping .kimchi-pill { background: rgba(255,255,255,0.08); color: #c99a8f; box-shadow: none; font-style: italic; letter-spacing: 1px; }
html.mobile .main-nav > * > span.kimchi-pill { max-width: none; }
@keyframes kFlicker { 0%, 100% { opacity: 1; } 40% { opacity: 0.82; } 44% { opacity: 1; } 70% { opacity: 0.9; } }

/* La page en a besoin de toute la largeur. */
main#app:has(#kimchi.active) { max-width: none; padding: 0; }
body.kimchi-view .topbar { border-bottom-color: rgba(255,59,47,0.35); box-shadow: 0 1px 24px -6px rgba(255,59,47,0.35); }

/* ----------------------------------------------------------------- page */
#kimchi.view.active { position: relative; overflow: hidden; isolation: isolate; }
#kimchi {
  background:
    radial-gradient(ellipse 70% 55% at 50% 118%, rgba(255,70,20,0.45), transparent 70%),
    radial-gradient(ellipse 60% 50% at 15% 0%, rgba(120,8,14,0.55), transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% 10%, rgba(90,5,10,0.5), transparent 70%),
    linear-gradient(180deg, #0c0204 0%, #160307 55%, #2a0508 100%);
}
.kimchi-fire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.kimchi-haze {
  position: absolute; inset: -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(circle at 30% 70%, rgba(255,80,20,0.12), transparent 40%),
    radial-gradient(circle at 75% 60%, rgba(255,40,20,0.1), transparent 45%);
  animation: kHaze 9s ease-in-out infinite alternate;
  mix-blend-mode: screen;
}
#kimchi::after {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(ellipse 85% 75% at 50% 45%, transparent 55%, rgba(0,0,0,0.75) 100%);
}
@keyframes kHaze { from { transform: translate3d(-2%, 1%, 0) scale(1); } to { transform: translate3d(2%, -2%, 0) scale(1.08); } }
.kimchi-scroll { position: absolute; inset: 0; z-index: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,80,40,0.35) transparent; }
.kimchi-wrap { max-width: 1180px; margin: 0 auto; padding: 34px 28px 60px; }

/* ----------------------------------------------------------------- hero */
.kimchi-hero { margin-bottom: 22px; }
.kimchi-hero-inner { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: center; }
.kimchi-hero-text { min-width: 0; }

.kimchi-boss { position: relative; width: 300px; height: 300px; display: grid; place-items: center; animation: kFloat 5s ease-in-out infinite; }
.kimchi-boss img { position: relative; z-index: 2; width: 78%; height: 78%; border-radius: 50%; filter: drop-shadow(0 0 22px rgba(255,60,30,0.75)) drop-shadow(0 18px 40px rgba(0,0,0,0.8)); animation: kBreath 3.2s ease-in-out infinite; }
.kimchi-aura {
  position: absolute; inset: 0; z-index: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,110,30,0.55) 0%, rgba(255,40,20,0.25) 38%, transparent 68%);
  animation: kAura 2.6s ease-in-out infinite; filter: blur(6px);
}
.kimchi-ring {
  position: absolute; inset: 4%; z-index: 1; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 8%, rgba(255,209,102,0.95) 12%, transparent 22% 40%, rgba(255,90,30,0.9) 48%, transparent 58% 74%, rgba(255,59,47,0.95) 82%, transparent 92%);
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  mask: radial-gradient(circle, transparent 62%, #000 63%, #000 66%, transparent 67%);
  animation: kSpin 7s linear infinite; filter: drop-shadow(0 0 8px rgba(255,120,40,0.9));
}
/* Les yeux s'allument (positions des yeux du dessin). */
.kimchi-eyes { position: absolute; inset: 11%; z-index: 3; pointer-events: none; }
.kimchi-eyes i {
  position: absolute; top: 57%; width: 16%; height: 9%; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,250,210,0.95), rgba(255,170,40,0.6) 45%, transparent 72%);
  mix-blend-mode: screen; animation: kEyes 3.2s ease-in-out infinite;
}
.kimchi-eyes i:first-child { left: 31%; }
.kimchi-eyes i:last-child { right: 31%; }
@keyframes kFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes kBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes kAura { 0%, 100% { opacity: 0.75; transform: scale(0.96); } 50% { opacity: 1; transform: scale(1.06); } }
@keyframes kSpin { to { transform: rotate(360deg); } }
@keyframes kEyes { 0%, 100% { opacity: 0.55; transform: scale(0.9); } 45% { opacity: 1; transform: scale(1.25); } 52% { opacity: 0.25; } 58% { opacity: 1; } }

.kimchi-title { display: flex; flex-direction: column; line-height: 0.9; filter: drop-shadow(0 0 26px rgba(255,70,20,0.55)); }
.kimchi-kicker { font: 800 22px 'Space Grotesk', sans-serif; letter-spacing: 9px; color: #ffb08a; text-shadow: 0 0 18px rgba(255,80,40,0.8); }
.kimchi-name { display: flex; font: 800 clamp(64px, 9vw, 132px)/0.95 'Space Grotesk', sans-serif; letter-spacing: -3px; margin-top: 4px; }
.kimchi-name i {
  font-style: normal; display: inline-block;
  background: var(--k-fire); background-size: 100% 220%;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: kLetter 2.8s ease-in-out infinite, kBurn 3.6s linear infinite;
  animation-delay: calc(var(--i) * -0.37s), calc(var(--i) * -0.5s);
}
.kimchi-name i.bang { transform: rotate(8deg); margin-left: 4px; }
@keyframes kLetter { 0%, 100% { transform: translateY(0) skewX(0); } 30% { transform: translateY(-3px) skewX(-2deg); } 60% { transform: translateY(1px) skewX(1deg); } }
@keyframes kBurn { 0% { background-position: 50% 0%; } 50% { background-position: 50% 100%; } 100% { background-position: 50% 0%; } }

.kimchi-tagline { margin: 18px 0 18px; max-width: 620px; font-size: 17px; line-height: 1.5; color: #f3d6cf; }

.kimchi-prize { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.kimchi-prize-amount {
  font: 800 46px/1 'Space Grotesk', sans-serif; letter-spacing: -1px; padding: 10px 20px; border-radius: 18px;
  color: #2a0503; background: linear-gradient(135deg, #fff1b8, #ffd166 35%, #ff8a1f);
  box-shadow: 0 0 0 2px rgba(255,209,102,0.4), 0 0 40px rgba(255,150,40,0.55), inset 0 -4px 0 rgba(140,40,0,0.35);
  animation: kPrize 2.4s ease-in-out infinite;
}
.kimchi-prize-text { max-width: 240px; font-size: 14px; font-weight: 600; line-height: 1.4; color: #ffc9a8; }
@keyframes kPrize { 0%, 100% { box-shadow: 0 0 0 2px rgba(255,209,102,0.4), 0 0 30px rgba(255,150,40,0.45), inset 0 -4px 0 rgba(140,40,0,0.35); } 50% { box-shadow: 0 0 0 2px rgba(255,209,102,0.7), 0 0 60px rgba(255,150,40,0.75), inset 0 -4px 0 rgba(140,40,0,0.35); } }

.kimchi-clock { display: flex; gap: 10px; margin-bottom: 22px; }
.kimchi-clock-cell {
  min-width: 78px; padding: 10px 10px 8px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, rgba(40,4,8,0.85), rgba(14,2,4,0.9));
  border: 1px solid rgba(255,70,40,0.35); box-shadow: inset 0 1px 0 rgba(255,140,90,0.15), 0 10px 26px -12px rgba(255,40,20,0.6);
}
.kimchi-clock-cell b { display: block; font: 700 34px/1 var(--font-mono); color: #fff; text-shadow: 0 0 14px rgba(255,90,40,0.8); font-variant-numeric: tabular-nums; }
.kimchi-clock-cell b.tickflip { animation: kTick 0.35s ease; }
.kimchi-clock-cell span { display: block; margin-top: 6px; font-size: 10.5px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #c78b7d; }
@keyframes kTick { from { transform: translateY(-6px); opacity: 0.3; } to { transform: none; opacity: 1; } }

.kimchi-ending { display: inline-flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 20px; border-radius: 14px; font-weight: 700; color: #ffd9c6; background: rgba(40,4,8,0.75); border: 1px solid rgba(255,70,40,0.4); }
.kimchi-spinner { width: 20px; height: 20px; border-radius: 50%; border: 3px solid rgba(255,120,60,0.25); border-top-color: var(--k-gold); border-right-color: var(--k-ember); animation: kSpin 0.8s linear infinite; flex-shrink: 0; }

/* Le bouton : une braise qui brule. */
.kimchi-cta-box { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.kimchi-cta {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden;
  min-height: 62px; padding: 0 38px; border: 0; border-radius: 18px; cursor: pointer;
  font: 800 20px 'Space Grotesk', sans-serif; letter-spacing: 2px; color: #fff;
  background: linear-gradient(90deg, #8f0d14, #e0281e 30%, #ff7a1a 55%, #e0281e 80%, #8f0d14); background-size: 220% 100%;
  box-shadow: 0 0 0 2px rgba(255,140,60,0.55), 0 14px 40px -10px rgba(255,50,20,0.85), inset 0 1px 0 rgba(255,220,180,0.4);
  text-shadow: 0 2px 10px rgba(80,0,0,0.6);
  animation: kCta 3s linear infinite;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kimchi-cta span { position: relative; z-index: 1; }
.kimchi-cta::before {
  content: ''; position: absolute; inset: -40% -10%; z-index: 0;
  background: radial-gradient(circle at 20% 120%, rgba(255,230,140,0.55), transparent 40%), radial-gradient(circle at 80% 120%, rgba(255,200,90,0.45), transparent 40%);
  animation: kCtaFlames 1.6s ease-in-out infinite alternate;
}
.kimchi-cta.hot:hover:not(:disabled) { transform: translateY(-2px) scale(1.02); animation: kCta 1.2s linear infinite, kShake 0.4s linear infinite; box-shadow: 0 0 0 2px rgba(255,200,90,0.9), 0 18px 50px -8px rgba(255,70,20,1), inset 0 1px 0 rgba(255,220,180,0.5); }
.kimchi-cta:active:not(:disabled) { transform: scale(0.97); }
.kimchi-cta:disabled { cursor: not-allowed; filter: grayscale(0.85) brightness(0.65); animation: none; }
.kimchi-cta.small { min-height: 50px; padding: 0 26px; font-size: 16px; }
.kimchi-cta-sub { font-size: 13px; color: #c99a8f; }
.kimchi-cta-note { max-width: 520px; padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.45; color: #ffd9c6; background: rgba(40,4,8,0.75); border: 1px solid rgba(255,70,40,0.4); }
@keyframes kCta { from { background-position: 0% 0; } to { background-position: 220% 0; } }
@keyframes kCtaFlames { from { transform: translateY(6%); opacity: 0.7; } to { transform: translateY(-6%); opacity: 1; } }
@keyframes kShake { 0%, 100% { translate: 0 0; } 25% { translate: -1px 1px; } 50% { translate: 1px -1px; } 75% { translate: 1px 1px; } }

/* Fin : le gagnant (ou KIMCHI invaincu). */
.kimchi-winner {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "label label" "av name" "av margin" "av detail" "prize prize";
  column-gap: 18px; row-gap: 4px; align-items: center; max-width: 560px; margin-top: 18px; padding: 20px 22px; border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,209,102,0.16), rgba(40,4,8,0.85)); border: 1px solid rgba(255,209,102,0.55);
  box-shadow: 0 0 50px -12px rgba(255,170,60,0.6);
}
.kimchi-winner-label { grid-area: label; font: 800 13px 'Space Grotesk', sans-serif; letter-spacing: 4px; color: var(--k-gold); }
.kimchi-winner-av { grid-area: av; width: 84px; height: 84px; border-radius: 50%; object-fit: cover; border: 3px solid var(--k-gold); box-shadow: 0 0 26px rgba(255,209,102,0.6); cursor: pointer; }
.kimchi-winner-name { grid-area: name; font-size: 26px; cursor: pointer; }
.kimchi-winner-margin { grid-area: margin; font: 700 30px var(--font-mono); color: var(--k-gold); }
.kimchi-winner-detail { grid-area: detail; font-size: 13px; color: #d7b9ae; }
.kimchi-winner-prize { grid-area: prize; margin-top: 10px; font-size: 14px; font-weight: 700; color: #ffe4a8; }
.kimchi-winner.none { display: flex; flex-direction: column; gap: 8px; border-color: rgba(255,59,47,0.55); background: linear-gradient(135deg, rgba(255,59,47,0.18), rgba(30,3,6,0.9)); box-shadow: 0 0 50px -12px rgba(255,59,47,0.6); }
.kimchi-winner.none b { font: 800 24px 'Space Grotesk', sans-serif; letter-spacing: 1px; color: #ff8a73; }
.kimchi-winner.none span { color: #e4c0b6; }
/* KIMCHI dort : il respire lentement, des zzz montent, le reste de la page est cache. */
#kimchi.is-sleeping #kimchiMe, #kimchi.is-sleeping #kimchiStats, #kimchi.is-sleeping .kimchi-grid { display: none; }
#kimchi.is-sleeping .kimchi-hero { margin: 7vh 0 0; }
.kimchi-hero-inner.sleep .kimchi-boss { animation: kFloat 8s ease-in-out infinite; }
.kimchi-hero-inner.sleep .kimchi-boss img { filter: drop-shadow(0 0 18px rgba(255,60,30,0.35)) drop-shadow(0 18px 40px rgba(0,0,0,0.8)); animation: kSnore 4.5s ease-in-out infinite; }
.kimchi-hero-inner.sleep .kimchi-aura { opacity: 0.45; animation: kSnoreAura 4.5s ease-in-out infinite; }
.kimchi-hero-inner.sleep .kimchi-name i { animation: none; filter: saturate(0.7) brightness(0.8); }
.kimchi-zzz { position: absolute; right: 6%; top: 8%; z-index: 4; width: 1px; height: 1px; pointer-events: none; }
.kimchi-zzz i { position: absolute; left: 0; top: 0; font: 800 26px 'Space Grotesk', sans-serif; font-style: normal; color: #ffd9c6; text-shadow: 0 0 12px rgba(255,140,80,0.7); opacity: 0; animation: kZzz 4.5s ease-out infinite; }
.kimchi-zzz i:nth-child(2) { font-size: 32px; animation-delay: 1.5s; }
.kimchi-zzz i:nth-child(3) { font-size: 40px; animation-delay: 3s; }
.kimchi-sleep-badge { display: inline-flex; margin: 14px 0 2px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: 3px; color: #ffd9c6; background: rgba(40,4,8,0.75); border: 1px solid rgba(255,70,40,0.4); }
.kimchi-sleep-sub { max-width: 560px; margin: 0; font-size: 15px; line-height: 1.5; color: #c99a8f; }
@keyframes kSnore { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes kSnoreAura { 0%, 100% { opacity: 0.3; transform: scale(0.94); } 50% { opacity: 0.55; transform: scale(1.04); } }
@keyframes kZzz { 0% { opacity: 0; transform: translate(0, 10px) rotate(-10deg) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(44px, -84px) rotate(12deg) scale(1.2); } }
html.mobile .kimchi-zzz i { font-size: 18px; }
html.mobile .kimchi-zzz i:nth-child(2) { font-size: 22px; }
html.mobile .kimchi-zzz i:nth-child(3) { font-size: 27px; }

/* ----------------------------------------------------------------- mes chiffres, compteurs */
.kimchi-me { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.kimchi-me > div, .kimchi-stat {
  padding: 12px 14px; border-radius: 16px; background: rgba(20,3,6,0.72); border: 1px solid rgba(255,70,40,0.22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.kimchi-me > div { border-color: rgba(23,184,209,0.35); background: rgba(6,18,22,0.72); }
.kimchi-me-label, .kimchi-stat span { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; color: #b98f86; }
.kimchi-me > div .kimchi-me-label { color: #7fb7c1; }
.kimchi-me b, .kimchi-stat b { display: block; margin-top: 4px; font: 700 22px var(--font-mono); color: #fff; }
.kimchi-me b.beat { color: var(--k-gold); text-shadow: 0 0 14px rgba(255,209,102,0.6); }
.kimchi-me b.lost { color: #ff8a73; }
.kimchi-me.empty { display: block; padding: 14px 16px; border-radius: 16px; color: #a9d5dc; background: rgba(6,18,22,0.72); border: 1px dashed rgba(23,184,209,0.4); font-size: 14px; }
.kimchi-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 22px; }
.kimchi-stat.hot b { color: var(--k-gold); text-shadow: 0 0 14px rgba(255,209,102,0.55); }

/* ----------------------------------------------------------------- panneaux */
.kimchi-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.kimchi-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.kimchi-panel {
  position: relative; padding: 18px; border-radius: 22px; min-width: 0;
  background: linear-gradient(180deg, rgba(26,4,8,0.86), rgba(12,2,4,0.9));
  border: 1px solid rgba(255,70,40,0.28); box-shadow: 0 20px 50px -24px rgba(255,30,20,0.55), inset 0 1px 0 rgba(255,140,90,0.08);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.kimchi-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.kimchi-panel h3 { margin: 0; display: flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: #ffb08a; }
.kimchi-panel .hint { color: #a2786f; }
.kimchi-side-empty { margin: 0; font-size: 13.5px; color: #a2786f; }

/* Podium */
.kimchi-podium { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 10px; align-items: end; margin-bottom: 14px; }
.kimchi-pod {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0;
  padding: 16px 10px 0; border-radius: 18px 18px 0 0; background: linear-gradient(180deg, rgba(60,8,12,0.55), rgba(20,3,6,0.2));
  border: 1px solid rgba(255,90,50,0.25); border-bottom: 0; animation: kRise 0.7s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}
.kimchi-pod.r1 { animation-delay: 0.15s; padding-top: 22px; border-color: rgba(255,209,102,0.45); background: linear-gradient(180deg, rgba(255,170,60,0.22), rgba(40,6,8,0.25)); }
.kimchi-pod.r2 { animation-delay: 0.05s; }
.kimchi-pod.r3 { animation-delay: 0.25s; }
.kimchi-pod.me { box-shadow: 0 0 0 2px rgba(23,184,209,0.6); }
.kimchi-pod-rank { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font: 800 15px 'Space Grotesk', sans-serif; color: #2a0503; background: linear-gradient(135deg, #e9e2d6, #9aa0a6); box-shadow: 0 4px 14px rgba(0,0,0,0.5); }
.kimchi-pod.r1 .kimchi-pod-rank { width: 36px; height: 36px; top: -18px; font-size: 18px; background: linear-gradient(135deg, #fff1b8, #ffd166 45%, #ff8a1f); box-shadow: 0 0 22px rgba(255,190,70,0.8); }
.kimchi-pod.r3 .kimchi-pod-rank { background: linear-gradient(135deg, #f0b48a, #a0582c); }
.kimchi-pod-av { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,140,90,0.6); cursor: pointer; }
.kimchi-pod.r1 .kimchi-pod-av { width: 74px; height: 74px; border-color: var(--k-gold); box-shadow: 0 0 24px rgba(255,190,70,0.6); }
.kimchi-pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; cursor: pointer; }
.kimchi-pod-margin { font: 700 21px var(--font-mono); color: #ff8a73; }
.kimchi-pod.beat .kimchi-pod-margin { color: var(--k-gold); text-shadow: 0 0 14px rgba(255,209,102,0.55); }
.kimchi-pod-detail { font-size: 11.5px; color: #b98f86; }
.kimchi-pod-step { display: block; width: calc(100% + 20px); height: 26px; margin-top: 10px; background: linear-gradient(180deg, rgba(255,90,40,0.35), rgba(255,40,20,0.05)); }
.kimchi-pod.r1 .kimchi-pod-step { height: 44px; background: linear-gradient(180deg, rgba(255,190,70,0.45), rgba(255,90,20,0.05)); }
.kimchi-pod.r3 .kimchi-pod-step { height: 16px; }
@keyframes kRise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

.kimchi-rows { display: flex; flex-direction: column; gap: 6px; }
.kimchi-row {
  display: grid; grid-template-columns: 34px minmax(0, 1.3fr) auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 9px 12px; border-radius: 12px; background: rgba(255,255,255,0.025); border: 1px solid transparent;
}
.kimchi-row.beat { background: rgba(255,209,102,0.06); border-color: rgba(255,209,102,0.22); }
.kimchi-row.me { border-color: rgba(23,184,209,0.55); background: rgba(23,184,209,0.08); }
.kimchi-row-rank { font: 700 14px var(--font-mono); color: #b98f86; text-align: center; }
.kimchi-row-player { display: flex; align-items: center; gap: 9px; min-width: 0; }
.kimchi-row-player img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex-shrink: 0; cursor: pointer; }
.kimchi-row-player b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; cursor: pointer; }
.kimchi-row-margin { font: 700 15px var(--font-mono); color: #ff8a73; text-align: right; }
.kimchi-row.beat .kimchi-row-margin { color: var(--k-gold); }
.kimchi-row-detail { font-size: 12px; color: #a2786f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kimchi-row-tries { font-size: 12px; color: #a2786f; white-space: nowrap; }
.kimchi-board-note { margin: 14px 2px 0; font-size: 12px; line-height: 1.5; color: #8f6a62; }
.kimchi-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 34px 10px; text-align: center; }
.kimchi-empty b { font-size: 18px; color: #ffb08a; }
.kimchi-empty span { font-size: 13.5px; color: #a2786f; }

/* Combats en direct */
.kimchi-live {
  display: grid; width: 100%; gap: 8px; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; cursor: pointer; text-align: left;
  color: var(--text); font: inherit; background: rgba(255,59,47,0.07); border: 1px solid rgba(255,70,40,0.3);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}
.kimchi-live:last-child { margin-bottom: 0; }
.kimchi-live:hover { border-color: rgba(255,140,60,0.8); background: rgba(255,59,47,0.12); transform: translateY(-1px); }
.kimchi-live-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.kimchi-live-who img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.kimchi-live-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kimchi-live-score { display: flex; align-items: baseline; gap: 10px; font: 700 18px var(--font-mono); }
.kimchi-live-score span { color: #dfe7e9; }
.kimchi-live-score span.up { color: var(--k-gold); }
.kimchi-live-score span.boss { color: #ff6b57; }
.kimchi-live-score i { font: 700 11px 'Space Grotesk', sans-serif; font-style: normal; color: #a2786f; }
.kimchi-live-foot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #b98f86; }
.kimchi-live-go { margin-left: auto; font-weight: 800; color: #ffb08a; }

/* Dernieres tentatives */
.kimchi-recent { display: flex; align-items: center; gap: 9px; padding: 7px 0; border-bottom: 1px solid rgba(255,90,50,0.1); font-size: 13px; }
.kimchi-recent:last-child { border-bottom: 0; }
.kimchi-recent img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; cursor: pointer; }
.kimchi-recent-text { min-width: 0; flex: 1; color: #d7b9ae; }
.kimchi-recent-text b { color: #fff; cursor: pointer; }
.kimchi-recent.beat .kimchi-recent-text { color: var(--k-gold); font-weight: 700; }
.kimchi-recent.void { opacity: 0.6; }
.kimchi-recent-ago { flex-shrink: 0; font-size: 11px; color: #8f6a62; }

.kimchi-rules ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 9px; font-size: 13.5px; line-height: 1.5; color: #e4c7bf; }
.kimchi-rules li::marker { color: var(--k-ember); font-weight: 800; }

/* ----------------------------------------------------------------- encarts « TRY TO BEAT KIMCHI! » */
.kimchi-promo {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; border-radius: 16px; cursor: pointer; text-align: left;
  font: inherit; color: #fff; background: linear-gradient(100deg, rgba(143,13,20,0.85), rgba(40,4,8,0.9) 55%, rgba(255,110,30,0.35));
  border: 1px solid rgba(255,100,50,0.55); box-shadow: 0 10px 30px -14px rgba(255,50,20,0.8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.kimchi-promo:hover { transform: translateY(-1px); box-shadow: 0 14px 36px -12px rgba(255,70,20,0.95); }
.kimchi-promo-av { width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0; filter: drop-shadow(0 0 8px rgba(255,80,30,0.8)); animation: kBreath 3s ease-in-out infinite; }
.kimchi-promo-text { display: flex; flex-direction: column; min-width: 0; }
.kimchi-promo-text b { font-weight: 800; letter-spacing: 1px; background: var(--k-fire); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.kimchi-promo-text span { font-size: 13px; color: #f3d6cf; }
.kimchi-promo-go { margin-left: auto; flex-shrink: 0; padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; color: #2a0503; background: linear-gradient(90deg, #ffd166, #ff7a1a); }
.kimchi-promo-lobby { margin: -12px 0 18px; }
.kimchi-promo-bar { margin-bottom: 16px; }
.kimchi-promo-gate { max-width: 340px; margin: 6px auto 0; }

/* ----------------------------------------------------------------- en direct, tags */
.live-tag.kimchi { color: #ffd0b8; border-color: rgba(255,100,50,0.6); background: rgba(255,59,47,0.14); }
.live-card.kimchi { border-color: rgba(255,90,50,0.45); background: linear-gradient(160deg, rgba(60,6,10,0.55), var(--bg-panel) 60%); }
.live-card.kimchi:hover, .live-card.kimchi:focus-visible { border-color: #ff7a1a; }
.bot-tag.boss { color: #2a0503; background: linear-gradient(90deg, #ffd166, #ff5a2a); border-color: transparent; }

/* ----------------------------------------------------------------- match contre KIMCHI */
.kimchi-match-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; display: none; }
body.kimchi-match .kimchi-match-fx { display: block; }
body.kimchi-match .duel { background: radial-gradient(ellipse 60% 60% at 85% 110%, rgba(255,60,20,0.25), transparent 70%), linear-gradient(90deg, #040506 0%, #090304 55%, #1a0306 100%); }
body.kimchi-match .duel-head.side-b .duel-name-text { background: var(--k-fire); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 800; letter-spacing: 1px; }
body.kimchi-match .duel-head.side-b .duel-name-text .bot-tag { -webkit-text-fill-color: #2a0503; }
body.kimchi-match .duel-head.side-b .duel-avatar { box-shadow: 0 0 0 2px #ff7a1a, 0 0 18px rgba(255,80,30,0.8); animation: kBreath 3s ease-in-out infinite; }
body.kimchi-match .duel-vs { color: rgba(255,80,40,0.07); }
body.kimchi-match #matchModeLabel { color: #ffd0b8; border-color: rgba(255,100,50,0.5); background: rgba(40,4,8,0.85); }

/* ----------------------------------------------------------------- reveil de KIMCHI */
.kimchi-summon {
  position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(ellipse at 50% 60%, rgba(120,10,14,0.92), rgba(10,1,3,0.97) 70%);
  animation: kFadeIn 0.35s ease both;
}
.kimchi-summon.hidden { display: none; }
.kimchi-summon.phase-out { animation: kFadeOut 0.45s ease both; }
.ks-box { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 20px; }
.ks-boss { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.ks-boss img { position: relative; z-index: 2; width: 80%; height: 80%; filter: drop-shadow(0 0 30px rgba(255,60,30,0.85)); }
.ks-boss .kimchi-eyes { inset: 10%; }
.ks-title { display: none; flex-direction: column; align-items: center; line-height: 0.9; filter: drop-shadow(0 0 30px rgba(255,70,20,0.7)); }
.ks-name { font: 800 clamp(56px, 11vw, 140px)/0.95 'Space Grotesk', sans-serif; letter-spacing: -3px; background: var(--k-fire); background-size: 100% 220%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: kBurn 2s linear infinite; }
.ks-text { margin: 6px 0 0; font: 800 22px 'Space Grotesk', sans-serif; letter-spacing: 3px; color: #ffd9c6; text-transform: uppercase; }
.ks-sub { margin: 0; font-size: 14px; color: #d7a99c; }
.ks-spin { width: 26px; height: 26px; margin-top: 6px; }
.ks-flash { position: absolute; inset: 0; background: radial-gradient(circle, rgba(255,230,160,0.9), rgba(255,90,30,0.4) 40%, transparent 70%); opacity: 0; pointer-events: none; }

.kimchi-summon.phase-wake .ks-boss img { animation: kWake 1.6s cubic-bezier(0.2, 0.9, 0.3, 1) both; }
.kimchi-summon.phase-wake .ks-boss .kimchi-aura { animation: kAura 1.2s ease-in-out infinite; }
.kimchi-summon.phase-wake .kimchi-eyes i { animation: kEyesWake 1.6s ease both, kEyes 2.4s 1.6s ease-in-out infinite; }

.kimchi-summon.phase-intro .ks-title { display: flex; animation: kSlam 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.kimchi-summon.phase-intro .ks-boss { width: 150px; height: 150px; animation: kShakeBig 0.5s 0.1s linear 2; }
.kimchi-summon.phase-intro .ks-flash { animation: kFlash 0.7s ease-out both; }
.kimchi-summon.phase-intro .ks-spin { display: none; }
.kimchi-summon.phase-intro .ks-text { animation: kFadeUp 0.5s 0.35s ease both; }
.kimchi-summon.phase-intro .ks-sub { animation: kFadeUp 0.5s 0.5s ease both; }
.kimchi-summon.phase-intro.spectator .ks-boss { width: 120px; height: 120px; }

@keyframes kFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes kFadeOut { from { opacity: 1; } to { opacity: 0; visibility: hidden; } }
@keyframes kWake { 0% { transform: scale(0.5); filter: brightness(0) drop-shadow(0 0 0 transparent); opacity: 0; } 50% { opacity: 1; filter: brightness(0.35) drop-shadow(0 0 10px rgba(255,60,30,0.4)); } 100% { transform: scale(1); filter: brightness(1) drop-shadow(0 0 30px rgba(255,60,30,0.85)); } }
@keyframes kEyesWake { 0%, 55% { opacity: 0; transform: scale(0.4); } 70% { opacity: 1; transform: scale(1.6); } 100% { opacity: 0.9; transform: scale(1); } }
@keyframes kSlam { 0% { opacity: 0; transform: scale(2.4); } 70% { opacity: 1; transform: scale(0.94); } 100% { transform: scale(1); } }
@keyframes kFlash { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
@keyframes kShakeBig { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-6px, 3px); } 40% { transform: translate(5px, -4px); } 60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 4px); } }
@keyframes kFadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- verdict */
.kimchi-verdict {
  position: fixed; inset: 0; z-index: 8900; display: grid; place-items: center; padding: 20px;
  background: rgba(4,1,2,0.82); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: kFadeIn 0.3s ease both;
}
.kimchi-verdict.hidden { display: none; }
.kimchi-verdict.closing { animation: kFadeOut 0.3s ease both; }
.kv-box {
  position: relative; overflow: hidden; width: min(560px, 100%); padding: 30px 28px 24px; border-radius: 28px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: linear-gradient(180deg, rgba(40,5,9,0.97), rgba(12,2,4,0.98)); border: 1px solid rgba(255,70,40,0.45);
  box-shadow: 0 30px 90px -20px rgba(255,40,20,0.7);
  animation: kVerdictIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
.kv-box > * { position: relative; z-index: 1; }
.kv-rays, .kv-cracks { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; opacity: 0; }
.kv-boss { width: 92px; height: 92px; filter: drop-shadow(0 0 18px rgba(255,60,30,0.85)); }
.kv-title { margin: 6px 0 2px; font: 800 clamp(26px, 6vw, 40px)/1.05 'Space Grotesk', sans-serif; letter-spacing: 0.5px; }
.kv-margin { font: 700 clamp(44px, 10vw, 64px)/1 var(--font-mono); letter-spacing: -2px; }
.kv-margin-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: #b98f86; }
.kv-vs { display: flex; align-items: center; gap: 14px; margin: 10px 0 4px; font: 700 16px var(--font-mono); }
.kv-vs span { display: flex; flex-direction: column; gap: 2px; padding: 8px 14px; border-radius: 12px; background: rgba(255,255,255,0.04); }
.kv-vs span b { font: 700 11px 'Space Grotesk', sans-serif; letter-spacing: 1.5px; text-transform: uppercase; color: #a2786f; }
.kv-vs span.boss { color: #ff6b57; }
.kv-vs i { font: 800 12px 'Space Grotesk', sans-serif; font-style: normal; color: #8f6a62; }
.kv-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 6px; }
.kv-badge { padding: 5px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: #ffd9c6; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,140,90,0.3); }
.kv-badge.gold { color: #2a0503; background: linear-gradient(90deg, #ffd166, #ff9a3c); border-color: transparent; }
.kv-badge.warn { color: #ffcf9a; border-color: rgba(255,180,90,0.5); }
.kv-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }

/* Victoire : or, rayons qui tournent. */
.kimchi-verdict.win .kv-box { border-color: rgba(255,209,102,0.7); box-shadow: 0 0 0 1px rgba(255,209,102,0.3), 0 30px 100px -10px rgba(255,170,60,0.8); }
.kimchi-verdict.win .kv-rays { opacity: 1; inset: -60%; background: repeating-conic-gradient(from 0deg, rgba(255,209,102,0.16) 0 8deg, transparent 8deg 22deg); animation: kSpin 14s linear infinite; }
.kimchi-verdict.win .kv-title { background: linear-gradient(180deg, #fff6cf, #ffd166 45%, #ff9a3c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 18px rgba(255,190,70,0.7)); }
.kimchi-verdict.win .kv-margin { color: var(--k-gold); text-shadow: 0 0 30px rgba(255,190,70,0.8); }
.kimchi-verdict.win .kv-boss { filter: grayscale(0.7) brightness(0.6); transform: rotate(-12deg) scale(0.9); }
/* Defaite : rouge, fissures, l'ecran tremble. */
.kimchi-verdict.loss .kv-box { animation: kVerdictIn 0.6s cubic-bezier(0.2, 1.4, 0.4, 1) both, kShakeBig 0.45s 0.25s linear 1; }
.kimchi-verdict.loss .kv-cracks {
  opacity: 0.6;
  background:
    linear-gradient(115deg, transparent 48.6%, rgba(255,80,40,0.55) 49.2%, transparent 50%) 0 0 / 100% 100%,
    linear-gradient(62deg, transparent 49.2%, rgba(255,80,40,0.4) 49.7%, transparent 50.4%) 0 0 / 100% 100%,
    linear-gradient(160deg, transparent 49.4%, rgba(255,80,40,0.35) 49.8%, transparent 50.3%) 0 0 / 100% 100%,
    radial-gradient(ellipse at 50% 120%, rgba(255,60,20,0.35), transparent 60%);
}
.kimchi-verdict.loss .kv-title { background: var(--k-fire); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; filter: drop-shadow(0 0 16px rgba(255,60,30,0.7)); }
.kimchi-verdict.loss .kv-margin { color: #ff6b57; text-shadow: 0 0 24px rgba(255,60,30,0.6); }
.kimchi-verdict.loss .kv-boss { animation: kBreath 1.6s ease-in-out infinite; width: 110px; height: 110px; }
.kimchi-verdict.void .kv-title { color: #e4c7bf; }
.kimchi-verdict.void .kv-margin { color: #b98f86; }
@keyframes kVerdictIn { from { opacity: 0; transform: scale(0.7) translateY(30px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- ecrans moyens */
@media (max-width: 980px) {
  .kimchi-hero-inner { grid-template-columns: 220px minmax(0, 1fr); gap: 26px; }
  .kimchi-boss { width: 220px; height: 220px; }
  .kimchi-grid { grid-template-columns: minmax(0, 1fr); }
  .kimchi-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ----------------------------------------------------------------- telephone */
html.mobile main#app:has(#kimchi.active) { padding: 0; overflow: hidden; }
html.mobile #kimchi.view.active { flex: 1 1 auto; min-height: 0; overflow: hidden; }
html.mobile .kimchi-wrap { padding: 18px 14px 40px; }
html.mobile .kimchi-hero-inner { grid-template-columns: minmax(0, 1fr); gap: 4px; justify-items: center; text-align: center; }
html.mobile .kimchi-hero-text { display: flex; flex-direction: column; align-items: center; }
html.mobile .kimchi-boss { width: 170px; height: 170px; }
html.mobile .kimchi-kicker { font-size: 15px; letter-spacing: 6px; }
html.mobile .kimchi-name { font-size: 64px; letter-spacing: -2px; justify-content: center; }
html.mobile .kimchi-tagline { font-size: 14.5px; margin: 12px 0 14px; }
html.mobile .kimchi-prize { flex-direction: column; gap: 8px; }
html.mobile .kimchi-prize-amount { font-size: 36px; padding: 8px 16px; }
html.mobile .kimchi-prize-text { max-width: 280px; text-align: center; font-size: 13px; }
html.mobile .kimchi-clock { gap: 6px; justify-content: center; }
html.mobile .kimchi-clock-cell { min-width: 64px; padding: 8px 6px 6px; }
html.mobile .kimchi-clock-cell b { font-size: 24px; }
html.mobile .kimchi-cta-box { align-items: center; }
html.mobile .kimchi-cta-note { text-align: center; font-size: 13.5px; }
html.mobile .kimchi-winner { grid-template-columns: auto 1fr; text-align: left; }
html.mobile .kimchi-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
html.mobile .kimchi-stat:last-child { grid-column: span 2; }
html.mobile .kimchi-stat b { font-size: 19px; }
html.mobile .kimchi-panel { padding: 14px; border-radius: 18px; }
html.mobile .kimchi-podium { gap: 6px; }
html.mobile .kimchi-pod { padding: 14px 4px 0; }
html.mobile .kimchi-pod-av { width: 42px; height: 42px; }
html.mobile .kimchi-pod.r1 .kimchi-pod-av { width: 54px; height: 54px; }
html.mobile .kimchi-pod-name { font-size: 12.5px; }
html.mobile .kimchi-pod-margin { font-size: 15px; }
html.mobile .kimchi-pod-detail { display: none; }
html.mobile .kimchi-row { grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; padding: 8px 10px; }
html.mobile .kimchi-row-detail { grid-column: 2 / span 2; margin-top: -4px; font-size: 11px; }
html.mobile .kimchi-row-tries { display: none; }
html.mobile .kimchi-promo-lobby { display: none; }
html.mobile .ks-text { font-size: 17px; }
html.mobile .kv-box { padding: 24px 18px 18px; border-radius: 22px; }
html.mobile .kv-vs { font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .kimchi-boss, .kimchi-boss img, .kimchi-aura, .kimchi-ring, .kimchi-eyes i, .kimchi-name i, .kimchi-prize-amount, .kimchi-cta, .kimchi-cta::before,
  .kimchi-haze, .nav-kimchi .nav-icon, .kv-rays, .kimchi-promo-av { animation: none !important; }
  .kimchi-zzz i { animation: none !important; opacity: 0.8; }
  .kimchi-zzz i:nth-child(2) { transform: translate(20px, -34px); }
  .kimchi-zzz i:nth-child(3) { transform: translate(40px, -72px); }
}
