/* KICKOFF · commentil.css : jeu « Comment il s'appelle ? » (joueur mystere du jour).
   Autonome : ne depend que des tokens (tokens.css). Motion en transform/opacity.
   Prefixe cil- : aucun conflit avec app.css / games.css / quisuisje.css. */

@keyframes cilIn      { from { opacity: 0; transform: translateY(16px); } }
@keyframes cilClueIn  { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes cilHalo    { 0%,100% { opacity:.55; transform:scale(1); } 50% { opacity:.9; transform:scale(1.06); } }
@keyframes cilLoad    { 0%,100% { opacity:.85; } 50% { opacity:.5; } }
@keyframes cilCoteDrop{ 0% { transform:translateY(-4px); color:var(--red-glow); } 100% { transform:translateY(0); } }
@keyframes cilShake   { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-7px)} 40%{transform:translateX(6px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(3px)} }

.cil-wrap { display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 26px; }
.cil-hidden { display: none !important; }

.cil-back {
  align-self: flex-start; background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--disp); font-style: italic; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; font-size: 12.5px; padding: 4px 2px;
  -webkit-tap-highlight-color: transparent;
}
.cil-back:active { transform: scale(.96); }

.cil-loading, .cil-qloading {
  text-align: center; color: var(--muted); font-family: var(--disp); font-style: italic;
  text-transform: uppercase; letter-spacing: .1em; font-size: 13px; padding: 40px 0;
  animation: cilLoad 1.4s ease-in-out infinite;
}
.cil-loading { padding: 60px 0; }

/* ---------- hero d'intro ---------- */
.cil-hero { text-align: center; padding: 10px 0 2px; animation: cilIn .5s cubic-bezier(.16,1,.3,1) both; }
.cil-hero-badge { position: relative; width: 92px; height: 92px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.cil-hero-halo {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.42), transparent 68%);
  animation: cilHalo 2.6s ease-in-out infinite;
}
.cil-hero-jersey {
  position: relative; width: 84px; height: 84px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid rgba(244,244,246,.16); border-radius: 22px; color: var(--txt);
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  box-shadow: inset 0 0 24px rgba(37,99,235,.14);
}
.cil-hero-jersey svg { width: 42px; height: 42px; }
.cil-hero-title { font-size: 27px; margin-top: 2px; line-height: 1.05; }
.cil-slash { color: var(--red); text-shadow: 0 0 12px rgba(37,99,235,.8); padding: 0 .02em; }
.cil-hero-sub { font-size: 13px; margin-top: 3px; }

/* ---------- regles ---------- */
.cil-rules { animation: cilIn .5s cubic-bezier(.16,1,.3,1) .06s both; }
.cil-rules ul { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.cil-rules li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: rgba(244,244,246,.9); }
.cil-rule-b {
  flex: none; width: 24px; height: 24px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--red), var(--red-deep)); box-shadow: var(--glow-red);
}

/* ---------- barre haute ---------- */
.cil-top { display: flex; align-items: center; gap: 10px; }
.cil-era {
  font-family: var(--disp); font-style: italic; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; font-size: 11.5px; color: var(--red-glow);
  border: 1px solid rgba(37,99,235,.4); background: rgba(37,99,235,.12);
  padding: 4px 10px; border-radius: 999px;
}
.cil-cote { margin-left: auto; display: inline-flex; align-items: baseline; gap: 5px; }
.cil-cote b { font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 22px; color: var(--gold); }
.cil-cote span { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.cil-cote-drop { animation: cilCoteDrop .45s ease-out; }

/* ---------- la fiche ---------- */
.cil-file { animation: cilIn .5s cubic-bezier(.16,1,.3,1) both; }
.cil-file-head { display: flex; align-items: center; gap: 13px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.cil-jersey {
  flex: none; width: 52px; height: 52px; border-radius: 14px; color: rgba(244,244,246,.34);
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 6px, transparent 6px 12px), var(--ink);
  border: 1px solid var(--line);
}
.cil-jersey svg { width: 30px; height: 30px; }
.cil-file-id { flex: 1; }
.cil-file-name { font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 22px; letter-spacing: .22em; color: rgba(244,244,246,.5); }
.cil-malus {
  flex: none; font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 15px;
  color: var(--red-glow); background: rgba(37,99,235,.12); border: 1px solid rgba(37,99,235,.4);
  padding: 3px 9px; border-radius: 999px;
}

.cil-progress { display: flex; gap: 5px; margin: 12px 0 4px; }
.cil-pip { flex: 1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.08); transition: background .3s ease; }
.cil-pip.on { background: linear-gradient(90deg, var(--red), var(--red-glow)); }

.cil-clues { list-style: none; display: flex; flex-direction: column; gap: 9px; margin: 12px 0 0; }
.cil-clue {
  display: flex; gap: 12px; align-items: center;
  background: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 11px 12px;
}
.cil-clue-fresh { animation: cilClueIn .42s cubic-bezier(.16,1,.3,1) both; }
.cil-clue-no {
  flex: none; width: 22px; height: 22px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 12px;
  color: var(--gold); background: rgba(244,195,59,.12); border: 1px solid rgba(244,195,59,.3);
}
.cil-clue-body { display: flex; flex-direction: column; gap: 1px; }
.cil-clue-label { font-family: var(--disp); text-transform: uppercase; letter-spacing: .14em; font-size: 9.5px; color: var(--muted); font-weight: 700; }
.cil-clue-val { font-size: 16px; font-weight: 700; color: var(--txt); font-family: var(--disp); font-style: italic; letter-spacing: .01em; }

/* ---------- zone d'action ---------- */
.cil-action { display: flex; flex-direction: column; gap: 12px; }

/* devinette */
.cil-guess-lead { text-align: center; }
.cil-guess { display: flex; gap: 8px; animation: cilClueIn .35s ease both; }
.cil-guess.cil-shake { animation: cilShake .4s ease; }
.cil-guess-input { flex: 1; }
.cil-guess-btn { width: auto; flex: none; padding: 13px 18px; }

/* bouton "debloquer un indice" */
.cil-reveal {
  width: 100%; cursor: pointer; display: flex; align-items: center; gap: 12px;
  background: transparent; border: 1px dashed var(--line-2); border-radius: 12px;
  color: rgba(244,244,246,.9); padding: 12px 14px; text-align: left;
  transition: border-color .2s ease, transform .12s ease; -webkit-tap-highlight-color: transparent;
}
.cil-reveal:hover { border-color: rgba(37,99,235,.5); }
.cil-reveal:active { transform: scale(.98); }
.cil-reveal-ic { flex: none; width: 22px; height: 22px; color: var(--gold); }
.cil-reveal-ic svg { width: 22px; height: 22px; }
.cil-reveal-txt { display: flex; flex-direction: column; gap: 1px; font-family: var(--disp); font-style: italic; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-size: 12.5px; }
.cil-reveal-cost { font-size: 10px; letter-spacing: .08em; color: var(--muted); font-style: normal; text-transform: none; font-family: var(--body); font-weight: 600; }
.cil-giveup { justify-content: center; color: var(--muted); }
.cil-giveup .cil-reveal-txt { align-items: center; }

/* question de culture */
.cil-qcard { animation: cilClueIn .38s cubic-bezier(.16,1,.3,1) both; }
.cil-qhead { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.cil-qbadge { flex: none; width: 26px; height: 26px; color: var(--gold); }
.cil-qbadge svg { width: 26px; height: 26px; }
.cil-q { font-size: 16px; font-weight: 600; line-height: 1.4; margin-bottom: 12px; color: rgba(244,244,246,.96); }
.cil-choices { display: flex; flex-direction: column; gap: 9px; }
.cil-choice {
  display: flex; align-items: center; gap: 12px; width: 100%; cursor: pointer; text-align: left;
  background: linear-gradient(180deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; color: var(--txt);
  transition: transform .12s ease, border-color .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cil-choice:active { transform: scale(.985); }
.cil-choice:disabled { cursor: default; }
.cil-choice-k {
  flex: none; width: 26px; height: 26px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--disp); font-style: italic; font-weight: 700; font-size: 13px;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line);
}
.cil-choice-t { font-size: 14px; font-weight: 600; }
.cil-choice.good { border-color: rgba(34,197,94,.6); background: linear-gradient(135deg, rgba(34,197,94,.18), var(--ink-3)); }
.cil-choice.good .cil-choice-k { color: var(--green); border-color: rgba(34,197,94,.5); background: rgba(34,197,94,.14); }
.cil-choice.bad { border-color: rgba(37,99,235,.6); background: linear-gradient(135deg, rgba(37,99,235,.16), var(--ink-3)); }
.cil-choice.bad .cil-choice-k { color: var(--red-glow); border-color: rgba(37,99,235,.5); background: rgba(37,99,235,.14); }
.cil-choice-wait { opacity: .8; }

/* ---------- resultat ---------- */
.cil-result { text-align: center; animation: cilIn .45s cubic-bezier(.16,1,.3,1) both; }
.cil-reveal-name { font-size: 26px; margin: 8px 0 4px; letter-spacing: .01em; }
.cil-result-pts { font-size: 38px; margin: 4px 0 6px; }
.cil-result-sub { font-size: 13px; }
.cil-record { margin: 2px 0 6px; }
.cil-record .pill { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- upsell / verrous ---------- */
.cil-upsell { text-align: left; }
.cil-upsell p { font-size: 13px; color: rgba(244,244,246,.86); margin-top: 4px; }
.cil-locked { text-align: center; padding: 26px 16px; }
.cil-lock-ico { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--muted); }
.cil-lock-ico svg { width: 46px; height: 46px; }

@media (prefers-reduced-motion: reduce) {
  .cil-hero, .cil-rules, .cil-file, .cil-clue-fresh, .cil-result, .cil-qcard,
  .cil-guess, .cil-hero-halo, .cil-cote-drop, .cil-guess.cil-shake { animation: none !important; }
}
