/* ============================================================
   MYTHÉO — Kailash · écran DÉFIS : le HUB DE JEUX + les 5 mini-jeux.
   Le HUB vit dans le cadre `grid` (chrome global VISIBLE) : titre fixe +
   corps défilant de cartes-jeux. Une partie passe en `.kailash-defis--
   playing` : la scène plein-cadre (.kailash-defis-stage) se superpose et
   le chrome global est masqué (K.setFocus(true)) ; sortie par le × local.
   Toutes les classes sont préfixées .kailash-defis-* ; tokens d'ambiance
   base.css uniquement.
   ============================================================ */

/* ---- Fond immersif : nuit chaude + lueurs dorées (calibré sur accueil/histoires) ---- */
.kailash-defis .kailash-screen-bg {
  background:
    radial-gradient(120% 62% at 50% -10%, rgba(var(--lueur,231,197,110),.14), transparent 55%),
    radial-gradient(90% 55% at 50% 116%, rgba(var(--lueur,231,197,110),.07), transparent 60%),
    radial-gradient(135% 100% at 50% -6%, #17110a, #0d0c12 60%, #08090f 100%);
}
/* illustration d'ambiance (figure du monde) : profondeur, fond de scène */
.kailash-defis-amb {
  position: absolute; left: 0; right: 0; bottom: 0; height: 62%; z-index: 1;
  background-size: cover; background-position: center 22%; background-repeat: no-repeat;
  opacity: .15; filter: blur(2px) saturate(1.05);
  -webkit-mask-image: linear-gradient(transparent, #000 55%, #000); mask-image: linear-gradient(transparent, #000 55%, #000);
}
.kailash-defis-amb-glow {
  position: absolute; left: 50%; top: -6%; width: 120%; height: 46%; z-index: 1; transform: translateX(-50%); pointer-events: none;
  background: radial-gradient(60% 100% at 50% 0%, rgba(var(--lueur,231,197,110),.16), transparent 70%);
}
.kailash-defis .kailash-screen-stars {
  z-index: 2;
  background-image:
    radial-gradient(1.5px 1.5px at 10% 6%, rgba(var(--lueur,231,197,110),.8), transparent),
    radial-gradient(1.2px 1.2px at 72% 8%, #fff, transparent),
    radial-gradient(1.4px 1.4px at 40% 11%, rgba(var(--lueur,231,197,110),.7), transparent),
    radial-gradient(1.1px 1.1px at 87% 14%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 22% 18%, rgba(var(--lueur,231,197,110),.6), transparent),
    radial-gradient(1.1px 1.1px at 58% 22%, #fff, transparent),
    radial-gradient(1.3px 1.3px at 15% 28%, rgba(var(--lueur,231,197,110),.55), transparent),
    radial-gradient(1px 1px at 82% 30%, #fff, transparent);
  opacity: .85; animation: kailash-defis-twinkle 7s ease-in-out infinite;
}
@keyframes kailash-defis-twinkle { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

.kailash-defis-empty { margin: 40px auto; text-align: center; color: var(--texte-doux); font-style: italic; }

/* ---- Entête : kicker doré + grand titre confiant ---- */
.kailash-defis-kick { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-style: italic; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--or-clair); text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.kailash-defis-kick svg { width: 15px; height: 15px; color: var(--or); }
.kailash-defis .kailash-screen-title h1 { font-size: 40px; text-shadow: 0 3px 26px rgba(var(--lueur,231,197,110),.4), 0 2px 10px rgba(0,0,0,.6); }

/* ============================================================
   HUB — arcade de jeux illustrée
   ============================================================ */
.kailash-defis-hub { width: 100%; max-width: 1040px; margin: 0 auto; }

.kailash-defis-intro { text-align: center; margin: 2px auto 20px; }
.kailash-defis-intro .lead { font-family: var(--corps); font-size: 15px; line-height: 1.55; color: var(--texte); max-width: 520px; margin: 0 auto; }
.kailash-defis-stats { margin-top: 14px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }
.kailash-defis-stats .stat {
  display: inline-flex; align-items: center; gap: 7px; padding: 8px 16px; border-radius: 22px;
  font-family: var(--disp); font-weight: 600; font-size: 12.5px; color: #fbefc9;
  background: rgba(var(--lueur,231,197,110),.1); border: 1px solid rgba(var(--lueur,231,197,110),.3);
  box-shadow: inset 0 1px 0 rgba(var(--lueur,231,197,110),.12);
}
.kailash-defis-stats .stat svg { width: 16px; height: 16px; color: var(--or); }
.kailash-defis-stats .stat b { color: var(--or-clair); }

.kailash-defis-cards { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 560px) { .kailash-defis-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 940px) { .kailash-defis-cards { grid-template-columns: 1fr 1fr 1fr; } }

/* carte = cabine d'arcade illustrée (langage .kailash-histoires-card) */
.kailash-defis-card {
  position: relative; display: block; width: 100%; text-align: left; cursor: pointer;
  min-height: 194px; padding: 0; border-radius: 22px; overflow: hidden; color: var(--texte); background: #14110a; border: none;
  box-shadow: 0 14px 30px rgba(0,0,0,.5), inset 0 0 0 1px rgba(var(--lueur,231,197,110),.32), 0 0 26px rgba(var(--lueur,231,197,110),.06);
  transition: transform .28s cubic-bezier(.34,1.3,.5,1), box-shadow .28s;
}
.kailash-defis-card .art { position: absolute; inset: 0; background-size: cover; background-position: center 24%; filter: saturate(1.05); transition: transform .5s ease; }
.kailash-defis-card .scrim { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(8,7,4,.32) 0%, rgba(8,7,4,.18) 28%, rgba(8,7,4,.62) 64%, rgba(6,5,3,.93) 100%); }
.kailash-defis-card:hover:not(:disabled) { transform: translateY(-5px); box-shadow: 0 22px 44px rgba(0,0,0,.58), inset 0 0 0 1px rgba(var(--lueur,231,197,110),.6), 0 0 34px rgba(var(--lueur,231,197,110),.28); }
.kailash-defis-card:hover:not(:disabled) .art { transform: scale(1.06); }
.kailash-defis-card:active:not(:disabled) { transform: translateY(-2px) scale(.995); }
.kailash-defis-card.is-locked { cursor: default; }
.kailash-defis-card.is-locked .art { filter: grayscale(.7) brightness(.5); }

.kailash-defis-card .ic {
  position: absolute; top: 14px; left: 14px; z-index: 2; width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center;
  color: var(--or-clair); background: rgba(12,10,6,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border: 1px solid rgba(var(--lueur,231,197,110),.55); box-shadow: 0 6px 16px rgba(0,0,0,.5), inset 0 0 12px rgba(var(--lueur,231,197,110),.14);
}
.kailash-defis-card .ic svg { width: 25px; height: 25px; }
.kailash-defis-card .body { position: absolute; left: 16px; right: 16px; bottom: 52px; z-index: 2; }
.kailash-defis-card .body .nm { display: block; font-family: var(--disp); font-weight: 700; font-size: 22px; line-height: 1.05; color: #fdf3d3; text-shadow: 0 2px 10px rgba(0,0,0,.85); }
.kailash-defis-card .body .tl { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.35; color: rgba(247,238,214,.82); text-shadow: 0 1px 6px rgba(0,0,0,.9); max-width: 30ch; }
.kailash-defis-card .foot { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kailash-defis-card .best { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-weight: 700; font-size: 12px; color: #fdf3d3; }
.kailash-defis-card .best .bs { color: var(--or-clair); }
.kailash-defis-card .best .bs.new { display: inline-flex; align-items: center; gap: 5px; color: var(--texte-doux); font-style: italic; font-weight: 600; }
.kailash-defis-card .best .bs.new svg { width: 13px; height: 13px; color: var(--or); }
.kailash-defis-card .cta { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-weight: 600; font-size: 12.5px; letter-spacing: .04em; color: #241a08; background: linear-gradient(180deg, #F6E4A9, #E7C56E 55%, #caa451); border: none; padding: 8px 14px; border-radius: 20px; box-shadow: 0 0 16px rgba(var(--lueur,231,197,110),.4); }
.kailash-defis-card .cta svg { width: 14px; height: 14px; margin-left: 1px; }
.kailash-defis-card .cta.lk { color: var(--texte-doux); background: rgba(240,224,178,.12); box-shadow: none; }
.kailash-defis-card .cta.lk svg { color: var(--texte-doux); }

/* médaille (hub + résultat) */
.kailash-defis-medal { display: inline-grid; place-items: center; width: 20px; height: 20px; vertical-align: -4px; }
.kailash-defis-medal svg { width: 100%; height: 100%; }
.kailash-defis-medal.is-or { color: #f6d873; filter: drop-shadow(0 0 5px rgba(246,216,115,.6)); }
.kailash-defis-medal.is-argent { color: #d7dde3; }
.kailash-defis-medal.is-bronze { color: #d29a6a; }

/* ============================================================
   SCÈNE DE JEU (mode focus) — masquée sur le hub, plein-cadre en partie
   ============================================================ */
.kailash-defis-stage { display: none; }
.kailash-defis--playing .kailash-screen-title,
.kailash-defis--playing .kailash-screen-body { display: none; }
.kailash-defis--playing .kailash-defis-stage { position: absolute; inset: 0; z-index: 40; display: block; }

.kailash-defis-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center 8%; background-repeat: no-repeat;
  filter: brightness(.32) saturate(.85);
}
.kailash-defis-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(70% 40% at 50% 30%, rgba(11,15,22,0), rgba(11,15,22,.4) 78%),
    linear-gradient(rgba(6,8,13,.55), rgba(6,8,13,.2) 26%, rgba(6,8,13,.55) 62%, rgba(6,8,13,.92) 100%);
}
/* bouton × = bouton de chrome partagé (.kailash-chrome-btn) ; positionné sur la
   SEULE mesure de chrome du thème (fin de l'offset magique) */
.kailash-defis-close { position: absolute; top: calc(var(--safe-t) + 14px); left: 16px; z-index: 70; }   /* retour = coin haut-gauche, comme le chrome global */

.kailash-defis-play {
  position: absolute; inset: 0; z-index: 5; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column;
  padding: var(--kailash-chrome-top) 20px calc(var(--safe-b) + 20px);
}
.kailash-defis-play > * { width: 100%; max-width: 720px; margin-left: auto; margin-right: auto; flex: 0 0 auto; }

/* ---- en-tête de jeu ---- */
.kailash-defis-hd { text-align: center; }
.kailash-defis-hd .k { font-family: var(--disp); font-style: italic; font-size: 11.5px; letter-spacing: .24em; text-transform: uppercase; color: var(--or-clair); text-shadow: 0 2px 10px rgba(0,0,0,.7); }
.kailash-defis-hd h1 { font-family: var(--disp); font-weight: 700; font-size: 36px; line-height: .98; margin-top: 1px; color: #fbefc9; text-shadow: 0 3px 22px rgba(var(--lueur,231,197,110),.4), 0 2px 10px rgba(0,0,0,.6); }

/* ---- bandeau HUD (score · vies · progression) ---- */
.kailash-defis-hud { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; padding: 12px 15px 13px; border-radius: 18px; background: rgba(13,18,26,.6); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); border: 1px solid rgba(var(--lueur,231,197,110),.28); box-shadow: 0 8px 24px rgba(0,0,0,.4), inset 0 1px 0 rgba(var(--lueur,231,197,110),.12); }
.kailash-defis-hud.slim { gap: 8px; }
.kailash-defis-hud .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kailash-defis-lvl { display: flex; align-items: center; gap: 8px; }
.kailash-defis-lvl .badge { width: 32px; height: 32px; flex: 0 0 auto; color: var(--or); }
.kailash-defis-lvl .badge svg { width: 100%; height: 100%; }
.kailash-defis-lvl b { display: block; font-family: var(--disp); font-weight: 700; font-size: 15px; color: #fbefc9; line-height: 1; }
.kailash-defis-lvl span { display: block; font-size: 10.5px; font-style: italic; color: var(--texte-doux); letter-spacing: .02em; }
.kailash-defis-rgt { display: flex; align-items: center; gap: 14px; }
.kailash-defis-stat { display: flex; align-items: center; gap: 6px; }
.kailash-defis-stat svg { width: 19px; height: 19px; color: var(--or); }
.kailash-defis-stat b { font-family: var(--disp); font-weight: 700; font-size: 16px; color: #fbefc9; }
.kailash-defis-hearts { display: flex; gap: 4px; }
.kailash-defis-hearts svg { width: 19px; height: 19px; color: var(--or); }
.kailash-defis-hearts svg.gone { color: rgba(201,189,160,.32); }
.kailash-defis-qline { display: flex; align-items: center; justify-content: space-between; }
.kailash-defis-qline .q { font-family: var(--disp); font-weight: 600; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--or-clair); }
.kailash-defis-qline .n { font-family: var(--disp); font-weight: 700; font-size: 11.5px; color: var(--texte-doux); }
.kailash-defis-pbar { height: 7px; border-radius: 7px; background: rgba(240,224,178,.16); overflow: hidden; }
.kailash-defis-pbar .fill { height: 100%; width: 30%; border-radius: 7px; background: linear-gradient(90deg, #caa451, var(--or-clair, #f6e4a9)); box-shadow: 0 0 10px rgba(var(--lueur,231,197,110),.75); transition: width .35s ease; }

/* ---- zone question ---- */
.kailash-defis-qzone { flex: 1 1 auto !important; display: flex; flex-direction: column; justify-content: center; min-height: 0; }
.kailash-defis-ask { text-align: center; font-family: var(--disp); font-style: italic; font-weight: 600; font-size: 16px; color: var(--or-clair); margin: 14px auto 2px; text-shadow: 0 2px 8px rgba(0,0,0,.7); }
.kailash-defis-ask b { color: #fbefc9; font-style: normal; }

/* médaillon-portrait (Portrait / Vrai-Faux) = bouton LECTURE partagé
   (.kailash-playbtn : anneau or + nuit + halo pulsé). Ici : la seule TAILLE
   (posée par la classe spécifique, comme fiche/conte) + curseur neutre
   (décoratif, non cliquable). */
.kailash-defis-god { width: 168px; height: 168px; margin: 12px auto 4px; cursor: default; }
.kailash-defis-god.sm { width: 116px; height: 116px; margin: 8px auto 2px; }

/* carte-indice (Énigme) */
.kailash-defis-riddle { margin: 14px auto 2px; max-width: 460px; text-align: center; padding: 20px 22px; border-radius: 18px; background: rgba(13,18,26,.66); border: 1px solid rgba(var(--lueur,231,197,110),.3); box-shadow: 0 10px 26px rgba(0,0,0,.4), inset 0 1px 0 rgba(var(--lueur,231,197,110),.1); }
.kailash-defis-riddle .rk { font-family: var(--disp); font-style: italic; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--or-clair); }
.kailash-defis-riddle p { margin: 8px 0 4px; font-family: var(--disp); font-weight: 700; font-size: 22px; line-height: 1.2; color: #fbefc9; }
.kailash-defis-riddle .rt { font-size: 14px; font-weight: 500; font-style: italic; color: #cabd9c; }

/* affirmation (Vrai/Faux) */
.kailash-defis-claim { margin: 10px auto 2px; max-width: 460px; text-align: center; padding: 16px 20px; border-radius: 16px; background: rgba(13,18,26,.6); border: 1px solid rgba(var(--lueur,231,197,110),.26); font-family: var(--disp); font-weight: 600; font-size: 19px; line-height: 1.28; color: var(--texte); }
.kailash-defis-claim b { color: #fbefc9; font-weight: 700; }

/* ---- réponses (grille / texte / vrai-faux) ---- */
.kailash-defis-answers { margin-top: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.kailash-defis-answers.is-text { grid-template-columns: 1fr 1fr; }
@media (max-width: 460px) { .kailash-defis-answers.is-text { grid-template-columns: 1fr; } }
.kailash-defis-answers.is-tf { grid-template-columns: 1fr 1fr; max-width: 460px; margin-left: auto; margin-right: auto; }
.kailash-defis-ans {
  position: relative; display: flex; align-items: center; gap: 11px; padding: 11px 13px; border-radius: 15px; cursor: pointer; text-align: left;
  background: rgba(15,20,28,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1.5px solid rgba(234,220,190,.2); color: var(--texte);
  transition: transform .18s cubic-bezier(.34,1.4,.5,1), border-color .2s, background .2s, box-shadow .2s;
}
.kailash-defis-ans .nm { font-family: var(--disp); font-weight: 700; font-size: 16px; color: #fbefc9; line-height: 1.05; }
.kailash-defis-answers.is-text .kailash-defis-ans { justify-content: center; text-align: center; padding: 15px 13px; }
.kailash-defis-ans:hover { transform: translateY(-2px); border-color: rgba(var(--lueur,231,197,110),.55); box-shadow: 0 8px 20px rgba(0,0,0,.4); }
.kailash-defis-ans .mark { position: absolute; top: -9px; right: -9px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; opacity: 0; transform: scale(.4); transition: opacity .25s, transform .3s cubic-bezier(.34,1.6,.5,1); }
.kailash-defis-ans .mark svg { width: 15px; height: 15px; stroke-width: 3; }
/* vrai/faux : gros boutons */
.kailash-defis-answers.is-tf .kailash-defis-ans { flex-direction: column; gap: 7px; padding: 18px 12px; justify-content: center; }
.kailash-defis-ans .tf { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; }
.kailash-defis-ans .tf svg { width: 22px; height: 22px; stroke-width: 2.6; }
.kailash-defis-ans .tf-true { color: #8fd39a; background: rgba(90,170,110,.16); border: 1.5px solid rgba(120,200,140,.4); }
.kailash-defis-ans .tf-false { color: #e0897d; background: rgba(180,80,70,.16); border: 1.5px solid rgba(200,110,100,.4); }
/* états résolus */
.kailash-defis-answers.done .kailash-defis-ans { cursor: default; }
.kailash-defis-ans.good { border-color: var(--or-clair); background: rgba(var(--lueur,231,197,110),.18); box-shadow: 0 0 0 1.5px var(--or-clair), 0 0 26px rgba(var(--lueur,231,197,110),.4), 0 10px 24px rgba(0,0,0,.45); }
.kailash-defis-ans.good .mark { opacity: 1; transform: scale(1); background: var(--or-clair); color: #1a1206; }
.kailash-defis-ans.bad { border-color: rgba(206,102,90,.7); background: rgba(60,26,22,.5); }
.kailash-defis-ans.bad .mark { opacity: 1; transform: scale(1); background: #b64a3e; color: #fff; }
.kailash-defis-answers.done .kailash-defis-ans.dim { opacity: .42; }

/* ============================================================
   JEU · PORTRAIT (taquin puis nom texte)
   ============================================================ */
/* sélecteur de difficulté en jeu (segmenté) */
.kailash-defis-seg { display: inline-flex; align-self: center; margin: 8px auto 2px; padding: 4px; gap: 3px; border-radius: 24px; background: rgba(13,18,26,.62); border: 1px solid rgba(var(--lueur,231,197,110),.32); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-shadow: inset 0 1px 0 rgba(var(--lueur,231,197,110),.12); }
.kailash-defis-seg button { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; font-family: var(--disp); font-weight: 700; font-size: 13px; line-height: 1; color: var(--texte); background: transparent; border: none; padding: 8px 17px; border-radius: 20px; cursor: pointer; transition: background .2s, color .2s; }
.kailash-defis-seg button .gs { font-size: 9.5px; font-weight: 600; letter-spacing: .04em; color: var(--texte-doux); }
.kailash-defis-seg button:hover:not(.on) { background: rgba(var(--lueur,231,197,110),.1); }
.kailash-defis-seg button.on { color: #241a08; background: linear-gradient(180deg, #F6E4A9, #E7C56E 55%, #caa451); box-shadow: 0 0 14px rgba(var(--lueur,231,197,110),.35); }
.kailash-defis-seg button.on .gs { color: rgba(26,18,6,.72); }

/* le plateau : matelas CLAIR, tuiles lumineuses, séparations nettes */
.kailash-defis-taquin {
  --n: 3; align-self: center;
  width: min(340px, 82vw); aspect-ratio: 1 / 1; margin: 10px auto 8px; padding: 5px;
  display: grid; grid-template-columns: repeat(var(--n), 1fr); grid-auto-rows: 1fr; gap: 0;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #f7efd6, #ecdcb4);
  box-shadow: 0 0 0 3px var(--or-clair), 0 0 0 6px rgba(10,14,20,.7), 0 0 30px rgba(var(--lueur,231,197,110),.4), 0 16px 34px rgba(0,0,0,.45);
  transition: box-shadow .3s;
}
.kailash-defis-tile {
  /* vraie <button> (accessible clavier) : on neutralise les défauts UA */
  border: 0; padding: 0; -webkit-appearance: none; appearance: none; font: inherit; width: 100%; height: 100%;
  background-size: calc(var(--n) * 100%) calc(var(--n) * 100%); background-repeat: no-repeat; background-color: #efe6cd;
  border-radius: 4px; filter: brightness(1.1) saturate(1.05); cursor: default; -webkit-tap-highlight-color: transparent;
  box-shadow: inset 0 0 0 1.5px rgba(255,250,235,.7), inset 0 0 0 3px rgba(120,96,40,.22);
  transition: filter .15s, box-shadow .15s, transform .1s;
}
.kailash-defis-tile.movable { cursor: pointer; }
.kailash-defis-tile.movable:hover { box-shadow: inset 0 0 0 2.5px var(--or), inset 0 0 0 4.5px rgba(255,250,235,.8); filter: brightness(1.22) saturate(1.1); z-index: 1; }
.kailash-defis-tile.movable:active { transform: scale(.97); filter: brightness(1.05); }
.kailash-defis-tile.is-blank { background: rgba(120,96,40,.14); box-shadow: inset 0 2px 9px rgba(80,60,24,.32), inset 0 0 0 1px rgba(120,96,40,.2); filter: none; cursor: default; }
.kailash-defis-taquin.is-solved { box-shadow: 0 0 0 3px var(--or-clair), 0 0 0 6px rgba(10,14,20,.7), 0 0 40px rgba(var(--lueur,231,197,110),.6), 0 16px 34px rgba(0,0,0,.5); }
.kailash-defis-taquin.is-solved .kailash-defis-tile { box-shadow: none; border-radius: 0; filter: brightness(1.08) saturate(1.06); animation: kailash-defis-fade .4s ease both; }

.kailash-defis-taquin-bar { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.kailash-defis-taquin-bar .mv { display: inline-flex; align-items: center; gap: 6px; font-family: var(--disp); font-weight: 700; font-size: 13px; color: var(--texte); }
.kailash-defis-taquin-bar .mv svg { width: 16px; height: 16px; color: var(--or); }
.kailash-defis-taquin-bar .mv b { color: var(--or-clair); font-size: 16px; }
.kailash-defis-taquin-bar .mv.done, .kailash-defis-taquin-bar .mv.done svg { color: var(--or-clair); }
/* Annuler = bouton verre partagé (.kailash-btn-glass) ; Recommencer = bouton
   or partagé (.kailash-btn-gold). Ici : seulement les deltas (taille svg, état). */
.kailash-defis-taquin-bar .undo svg { width: 14px; height: 14px; }
.kailash-defis-taquin-bar .undo[disabled] { opacity: .4; cursor: default; }
.kailash-defis-taquin-bar .reset svg { width: 15px; height: 15px; }

/* ============================================================
   JEU · LES PAIRES
   ============================================================ */
.kailash-defis-pairs { flex: 1 1 auto !important; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; align-content: start; }
.kailash-defis-pairs .col { display: flex; flex-direction: column; gap: 10px; }
.kailash-defis-chip {
  display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer; padding: 10px 12px; border-radius: 14px; min-height: 56px;
  background: rgba(15,20,28,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1.5px solid rgba(234,220,190,.2); color: var(--texte);
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s, opacity .3s;
}
/* .pic = médaillon PARTAGÉ (.kailash-medallion) ; taille via --k-med inline. */
.kailash-defis-chip .lb { font-family: var(--disp); font-weight: 700; font-size: 14.5px; color: #fbefc9; line-height: 1.15; }
.kailash-defis-chip.is-sub .lb { font-weight: 600; font-style: italic; font-size: 13.5px; color: var(--texte); }
.kailash-defis-chip:hover:not(.ok) { border-color: rgba(var(--lueur,231,197,110),.5); transform: translateY(-1px); }
.kailash-defis-chip.sel { border-color: var(--or-clair); background: rgba(var(--lueur,231,197,110),.16); box-shadow: 0 0 0 1.5px var(--or-clair), 0 0 18px rgba(var(--lueur,231,197,110),.3); }
.kailash-defis-chip.ok { border-color: rgba(120,200,140,.55); background: rgba(70,140,90,.16); opacity: .55; cursor: default; }
.kailash-defis-chip.bad { border-color: rgba(206,102,90,.75); background: rgba(60,26,22,.5); animation: kailash-defis-shake .32s ease; }
@keyframes kailash-defis-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

/* ============================================================
   JEU · CHRONOLOGIE
   ============================================================ */
.kailash-defis-chrono { flex: 1 1 auto !important; display: flex; flex-direction: column; gap: 10px; margin-top: 16px; max-width: 480px; margin-left: auto; margin-right: auto; align-content: start; }
.kailash-defis-chrono-it {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; padding: 10px 14px 10px 10px; border-radius: 14px;
  background: rgba(15,20,28,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1.5px solid rgba(234,220,190,.2); color: var(--texte);
  transition: transform .15s, border-color .2s, background .2s, box-shadow .2s;
}
.kailash-defis-chrono-it:hover { border-color: rgba(var(--lueur,231,197,110),.5); transform: translateY(-1px); }
.kailash-defis-chrono-it .rk { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: var(--disp); font-weight: 700; font-size: 15px; color: var(--texte-doux); border: 1.5px solid rgba(234,220,190,.28); }
.kailash-defis-chrono-it.picked .rk { color: #1a1206; background: linear-gradient(90deg, #caa451, var(--or-clair, #f6e4a9)); border-color: transparent; }
.kailash-defis-chrono-it .tx { display: flex; flex-direction: column; min-width: 0; }
.kailash-defis-chrono-it .tx .nm { font-family: var(--disp); font-weight: 700; font-size: 16px; color: #fbefc9; line-height: 1.1; }
.kailash-defis-chrono-it .tx .sb { font-size: 12px; font-style: italic; color: var(--texte-doux); line-height: 1.2; margin-top: 1px; }
.kailash-defis-chrono-it.good { border-color: var(--or-clair); background: rgba(var(--lueur,231,197,110),.16); box-shadow: 0 0 0 1.5px var(--or-clair); }
.kailash-defis-chrono-it.good .rk { color: #1a1206; background: var(--or-clair); border-color: transparent; }
.kailash-defis-chrono-it.bad { border-color: rgba(206,102,90,.7); background: rgba(60,26,22,.5); }
.kailash-defis-chrono-it.bad .rk { color: #fff; background: #b64a3e; border-color: transparent; }

/* ---- pied de jeu (tip + boutons) ---- */
.kailash-defis-foot { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; min-height: 26px; }
.kailash-defis-foot .tip { font-style: italic; font-weight: 500; font-size: 13.5px; color: #cabd9c; text-shadow: 0 1px 4px #000; }
/* « go » = CTA or partagé (.kailash-btn-gold) ; « reset » (chrono) = bouton
   verre partagé (.kailash-btn-glass). Ici : visibilité conditionnelle + tailles. */
.kailash-defis-foot .go svg { width: 16px; height: 16px; margin-left: 3px; }
.kailash-defis-foot .go[disabled] { opacity: .4; cursor: default; filter: grayscale(.4); }
.kailash-defis-foot .reset svg { width: 15px; height: 15px; }
/* QCM : le « go » n'apparaît qu'après réponse ; chrono/paires : géré en JS */
.kailash-defis-play:not(.solved) .kailash-defis-qzone ~ .kailash-defis-foot .go { display: none; }
.kailash-defis-play.solved .kailash-defis-foot .tip { display: none; }
.kailash-defis-play.solved .kailash-defis-foot .go { display: inline-block; animation: kailash-defis-rise .35s ease both; }
/* chrono : le « go » (Vérifier) est toujours visible */
.kailash-defis-chrono ~ .kailash-defis-foot .go { display: inline-block; }
@keyframes kailash-defis-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ============================================================
   OVERLAY « Bravo ! »
   ============================================================ */
.kailash-defis-win { position: absolute; inset: 0; z-index: 80; display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 30px; background: radial-gradient(70% 50% at 50% 40%, rgba(20,15,7,.95), rgba(6,8,13,.99)); -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); overflow-y: auto; }
.kailash-defis-win.on { display: flex; animation: kailash-defis-fade .4s ease both; }
@keyframes kailash-defis-fade { from { opacity: 0; } to { opacity: 1; } }
.kailash-defis-win .sun { position: absolute; top: 50%; left: 50%; width: 340px; height: 340px; transform: translate(-50%,-58%); border-radius: 50%; background: radial-gradient(circle, rgba(var(--lueur,231,197,110),.28), rgba(var(--lueur,231,197,110),0) 62%); animation: kailash-defis-pulse 3.4s ease-in-out infinite; pointer-events: none; }
@keyframes kailash-defis-pulse { 0%,100% { transform: translate(-50%,-58%) scale(.94); opacity: .7; } 50% { transform: translate(-50%,-58%) scale(1.06); opacity: 1; } }
.kailash-defis-win .chest { position: relative; width: 128px; height: 128px; border-radius: 50%; background: url("../../../../img/fiches/sec-tresors.png") center/cover; box-shadow: 0 0 0 3px rgba(var(--lueur,231,197,110),.85), 0 0 0 6px rgba(10,14,20,.85), 0 0 46px rgba(var(--lueur,231,197,110),.5), 0 16px 34px rgba(0,0,0,.6); animation: kailash-defis-rise2 .6s cubic-bezier(.34,1.5,.5,1) both; }
@keyframes kailash-defis-rise2 { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
.kailash-defis-win .spk { position: absolute; top: 0; left: 0; width: 100%; height: 100%; pointer-events: none; }
.kailash-defis-win .spk i { position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; margin: -5.5px; background: var(--or-clair); filter: drop-shadow(0 0 4px rgba(var(--lueur,231,197,110),.9)); clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%); transform: rotate(var(--a)) translateX(84px); animation: kailash-defis-twk 2.2s ease-in-out infinite; }
.kailash-defis-win .spk i:nth-child(1) { --a: 20deg; animation-delay: 0s; } .kailash-defis-win .spk i:nth-child(2) { --a: 95deg; animation-delay: .5s; }
.kailash-defis-win .spk i:nth-child(3) { --a: 165deg; animation-delay: 1s; } .kailash-defis-win .spk i:nth-child(4) { --a: 255deg; animation-delay: .3s; } .kailash-defis-win .spk i:nth-child(5) { --a: 310deg; animation-delay: .8s; }
@keyframes kailash-defis-twk { 0%,100% { opacity: .35; transform: rotate(var(--a)) translateX(84px) scale(.7); } 50% { opacity: 1; transform: rotate(var(--a)) translateX(90px) scale(1.1); } }
.kailash-defis-win .k { margin-top: 24px; font-family: var(--disp); font-style: italic; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--or-clair); }
.kailash-defis-win h2 { font-family: var(--disp); font-weight: 700; font-size: 40px; color: #fbefc9; line-height: 1; margin-top: 3px; text-shadow: 0 3px 24px rgba(var(--lueur,231,197,110),.5); }
.kailash-defis-scoreline { margin-top: 12px; font-family: var(--disp); font-weight: 700; font-size: 26px; color: #fbefc9; display: inline-flex; align-items: center; gap: 8px; justify-content: center; }
.kailash-defis-scoreline b { color: var(--or-clair); font-size: 32px; }
.kailash-defis-scoreline .kailash-defis-medal { width: 28px; height: 28px; }
.kailash-defis-win .streak { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 22px; background: rgba(var(--lueur,231,197,110),.14); border: 1px solid rgba(var(--lueur,231,197,110),.4); font-family: var(--disp); font-weight: 700; font-size: 13.5px; color: #fbefc9; }
.kailash-defis-win .streak svg { width: 17px; height: 17px; color: var(--or); }

.kailash-defis-review { margin-top: 18px; max-width: 460px; }
.kailash-defis-review:empty { display: none; }
.kailash-defis-review .rk { display: block; font-family: var(--disp); font-style: italic; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--or-clair); margin-bottom: 8px; }
.kailash-defis-review .chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.kailash-defis-review .chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 6px; border-radius: 20px; cursor: pointer; font-family: var(--disp); font-weight: 600; font-size: 13px; color: #fbefc9; background: rgba(20,26,36,.7); border: 1px solid rgba(234,220,190,.24); }
.kailash-defis-review .chip:hover { border-color: rgba(var(--lueur,231,197,110),.55); }

/* « Rejouer » = CTA or partagé (.kailash-btn-gold) ; « Retour » = bouton verre
   partagé (.kailash-btn-glass). Ici : seulement la disposition + taille svg. */
.kailash-defis-winbtns { margin-top: 24px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.kailash-defis-win .replay svg { width: 16px; height: 16px; }

/* ---- accessibilité mouvement ---- */
@media (prefers-reduced-motion: reduce) {
  .kailash-defis-win .sun, .kailash-defis-win .chest, .kailash-defis-win .spk i,
  .kailash-defis-taquin.is-solved .kailash-defis-tile, .kailash-defis .kailash-screen-stars { animation: none; }
  .kailash-defis-pbar .fill, .kailash-defis-ans, .kailash-defis-card, .kailash-defis-card .art, .kailash-defis-chip, .kailash-defis-chrono-it, .kailash-defis-taquin, .kailash-defis-seg button { transition: none; }
}
