/* =========================================================
   DAR AL LOUGHAH — 05-buttons.css
   ---------------------------------------------------------
   Module 5/6 : Boutons (gold/outline/ghost), icon-btn,
   nav bar, answers (quiz/rapid), chat, inputs, toasts,
   filter chips, auth buttons, modals
   
   ⚠️ À charger APRÈS 04-modules.css.
   Toutes les classes existantes (.btn-gold, .btn-outline,
   .btn-ghost, .icon-btn, .answer, .nav-bar, .chat-*, .input,
   .textarea, .toast, .filter-chip, .auth-btn, .modal) sont
   upgradées en versions baroque premium.
   ========================================================= */

/* =========================================================
   5.1 — BTN (base — compat .btn)
   ========================================================= */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 20px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: transform .15s ease, box-shadow .25s ease, filter .2s ease, background .2s ease;
  user-select: none;
  position: relative;
  overflow: hidden;
}
.btn:disabled{
  opacity: .5;
  cursor: not-allowed;
}
.btn:disabled:hover{
  transform: none;
  filter: none;
}

/* =========================================================
   5.2 — BTN GOLD (compat .btn-gold — bouton principal doré)
   Boutoin "carved gold" avec shimmer
   ========================================================= */
.btn-gold{
  color: #2a1d00;
  background:
    linear-gradient(180deg,
      #FCE89A 0%,
      #F4D77A 20%,
      #D4AF37 55%,
      #A07A1C 100%);
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -2px 6px rgba(0,0,0,.25);
  border: 1px solid rgba(255,230,150,.55);
  position: relative;
}

/* Highlight gradient en haut du bouton */
.btn-gold::before{
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.4) 0%, transparent 45%);
  pointer-events: none;
}

/* Shimmer qui balaie le bouton en boucle */
.btn-gold::after{
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 50%;
  height: 100%;
  background: linear-gradient(110deg,
    transparent 30%,
    rgba(255,255,255,.45) 50%,
    transparent 70%);
  transform: skewX(-20deg);
  animation: btnShimmer 4s ease-in-out infinite;
  animation-delay: 1s;
  pointer-events: none;
}
@keyframes btnShimmer{
  0%, 90% { left: -60%; opacity: 0; }
  40%     { opacity: 1; }
  80%     { opacity: 1; }
  90%     { left: 130%; opacity: 0; }
  100%    { left: 130%; opacity: 0; }
}

.btn-gold:hover{
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 0 30px rgba(212,175,55,.5),
    0 0 70px rgba(212,175,55,.2),
    inset 0 1px 0 rgba(255,255,255,.6),
    inset 0 -2px 6px rgba(0,0,0,.25);
}
.btn-gold:hover::after{
  animation-duration: 1.5s;
}
.btn-gold:active{
  transform: translateY(0);
  filter: brightness(.95);
}

.btn-gold span{
  position: relative;
  z-index: 1;
}

/* =========================================================
   5.3 — BTN OUTLINE (compat .btn-outline)
   ========================================================= */
.btn-outline{
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-gold);
  box-shadow: inset 0 0 14px rgba(212,175,55,.08);
}
.btn-outline:hover{
  background: rgba(212,175,55,.1);
  border-color: var(--gold);
  box-shadow:
    inset 0 0 18px rgba(212,175,55,.15),
    0 0 16px rgba(212,175,55,.2);
}

/* =========================================================
   5.4 — BTN GHOST (compat .btn-ghost — discret)
   ========================================================= */
.btn-ghost{
  background: transparent;
  color: var(--ink-muted);
  border: 1px solid rgba(169,176,199,.22);
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 13px;
}
.btn-ghost:hover{
  border-color: rgba(212,175,55,.4);
  color: var(--gold-light);
  background: rgba(212,175,55,.05);
}

/* =========================================================
   5.5 — ICON BTN (compat .icon-btn — bouton rond)
   Retour, profil, écouter, etc.
   ========================================================= */
.icon-btn{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background:
    linear-gradient(180deg, rgba(20,34,82,.85), rgba(10,18,48,.95));
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s, transform .15s, border-color .2s, box-shadow .2s;
  flex-shrink: 0;
  position: relative;
}
.icon-btn::before{
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1px solid rgba(212,175,55,.15);
  pointer-events: none;
}
.icon-btn:hover{
  background: rgba(212,175,55,.12);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,175,55,.25);
}
.icon-btn:active{
  transform: scale(.94);
}
.icon-btn svg{
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 0 4px var(--gold-glow));
  position: relative;
  z-index: 1;
}
.icon-btn .lang-badge{
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--gold-light);
  position: relative;
  z-index: 1;
}

/* =========================================================
   5.6 — ANSWERS (compat .answer — boutons de quiz/rapid)
   Boutons-réponses du QCM
   ========================================================= */
.answer{
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  padding: 14px 18px;
  margin: 8px 0;
  background: linear-gradient(180deg, rgba(20,34,82,.85), rgba(10,18,48,.92));
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
  transition: transform .15s, border-color .2s, box-shadow .25s, background .2s;
  box-shadow:
    inset 0 1px 0 rgba(244,215,122,.12),
    0 2px 6px rgba(0,0,0,.25);
  min-height: 54px;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: anywhere;
  line-height: 1.4;
  position: relative;
}
.answer:hover{
  border-color: var(--gold);
  box-shadow:
    0 0 18px rgba(212,175,55,.22),
    inset 0 1px 0 rgba(244,215,122,.18);
  transform: translateY(-1px);
}
.answer.selected{
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(28,46,108,.95), rgba(12,22,58,.95));
  box-shadow:
    0 0 16px rgba(212,175,55,.32),
    inset 0 1px 0 rgba(244,215,122,.25);
}
.answer.correct{
  background: linear-gradient(180deg, #1b6e44, #0f4a2e);
  border-color: var(--correct);
  color: #d7ffe6;
  box-shadow: 0 0 20px rgba(79,214,154,.4);
  animation: answerCorrect .5s ease-out;
}
.answer.wrong{
  background: linear-gradient(180deg, #7a242b, #3f1015);
  border-color: var(--wrong);
  color: #ffd7dc;
  box-shadow: 0 0 20px rgba(255,107,120,.35);
  animation: answerWrong .5s ease-out;
}
@keyframes answerCorrect{
  0% { transform: scale(1); }
  50%{ transform: scale(1.03); }
  100%{ transform: scale(1); }
}
@keyframes answerWrong{
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* Réponses contenant de l'arabe → meilleure police + taille */
#quizAnswers .answer,
#rapidAnswers .answer,
.answer[dir="rtl"]{
  font-family: var(--font-arabic), var(--font-body), serif;
  font-size: 20px;
}

/* Variantes spéciales (compat) */
.answer.letter-answer{
  font-family: var(--font-arabic);
  font-weight: 700;
  font-size: 28px;
  direction: rtl;
}
.answer.translit-answer{
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* =========================================================
   5.7 — BOTTOM NAV BAR (compat .nav-bar, .nav-item)
   La barre de navigation flottante en bas
   ========================================================= */
.nav-bar{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 12px;
  z-index: 50;
  width: min(calc(100% - 24px), 420px);
  background:
    linear-gradient(180deg, rgba(17,31,74,.95), rgba(6,12,34,.98));
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  padding: 10px 8px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  box-shadow:
    var(--shadow-soft),
    0 0 28px rgba(212,175,55,.18),
    inset 0 1px 0 rgba(244,215,122,.15);
}
.nav-item{
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--ink-muted);
  padding: 8px 4px;
  border-radius: 999px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-family: var(--font-ui);
  font-size: 9px;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color .2s, background .2s;
}
.nav-item svg{
  width: 24px;
  height: 24px;
  transition: filter .2s;
}
.nav-item.active{
  color: var(--gold-light);
  background: radial-gradient(circle at center,
    rgba(212,175,55,.25),
    rgba(212,175,55,.05) 60%,
    transparent 80%);
}
.nav-item.active svg{
  filter: drop-shadow(0 0 8px var(--gold-glow));
}
.nav-item:hover{
  color: var(--gold-light);
}

/* Cacher la nav-bar sur login/register */
body:has(#screen-login.active) .nav-bar,
body:has(#screen-register.active) .nav-bar{
  display: none;
}

/* =========================================================
   5.8 — INPUTS / TEXTAREAS (compat .input, .textarea, select.input)
   ========================================================= */
.input{
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: rgba(6,12,34,.75);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  margin-top: 10px;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input:focus{
  outline: none;
  border-color: var(--gold);
  background: rgba(6,12,34,.9);
  box-shadow:
    0 0 14px rgba(212,175,55,.25),
    inset 0 1px 0 rgba(244,215,122,.15);
}
.input::placeholder{
  color: var(--ink-dim);
}
.input[dir="rtl"]{
  font-family: var(--font-arabic);
  font-size: 20px;
  text-align: right;
}

select.input{
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23D4AF37' stroke-width='2'><path d='M6 9 L12 15 L18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 42px;
}

.textarea{
  display: block;
  width: 100%;
  padding: 14px 18px;
  background: rgba(6,12,34,.75);
  border: 1px solid var(--border-gold);
  border-radius: 14px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  min-height: 130px;
  resize: vertical;
  margin-top: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.textarea:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(212,175,55,.25);
}

/* =========================================================
   5.9 — CHECKBOX / TOGGLE (compat .checkbox-row, .toggle-row)
   ========================================================= */
.checkbox-row,
.toggle-row{
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  font-style: italic;
  line-height: 1.4;
}
.checkbox-row input,
.toggle-row input{
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 1.5px solid var(--border-gold);
  border-radius: 6px;
  background: rgba(6,12,34,.75);
  cursor: pointer;
  position: relative;
  margin-top: 1px;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
.checkbox-row input:hover,
.toggle-row input:hover{
  border-color: var(--gold);
}
.checkbox-row input:checked,
.toggle-row input:checked{
  background: linear-gradient(180deg, var(--gold-5), var(--gold-dark));
  border-color: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.checkbox-row input:checked::after,
.toggle-row input:checked::after{
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2a1d00;
  font-weight: 700;
  font-size: 14px;
  line-height: 1;
}

/* =========================================================
   5.10 — AUTH BUTTONS (compat .auth-btn, .google, .apple)
   ========================================================= */
.auth-btn{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  margin-top: 10px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  border: 1px solid var(--border-gold);
  background: linear-gradient(180deg, rgba(20,34,82,.85), rgba(10,18,48,.95));
  color: var(--ink);
}
.auth-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 0 18px rgba(212,175,55,.18);
  filter: brightness(1.05);
}
.auth-btn svg{
  width: 22px;
  height: 22px;
}
.auth-btn.google{
  background: #fff;
  color: #1a1a1a;
  border-color: #fff;
}
.auth-btn.apple{
  background: #000;
  color: #fff;
  border-color: #333;
}

.auth-divider{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 4px 8px;
  color: var(--ink-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 2px;
}
.auth-divider::before,
.auth-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,.4), transparent);
}

/* =========================================================
   5.11 — FILTER CHIPS (compat .filter-chip)
   Onglets/filtres (badges, dico, admin, leaderboard)
   ========================================================= */
.filter-chip{
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(10,18,48,.65);
  border: 1px solid var(--border-gold);
  color: var(--ink-muted);
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: .5px;
  cursor: pointer;
  transition: all .2s ease;
  font-weight: 500;
}
.filter-chip:hover{
  color: var(--gold-light);
  border-color: var(--gold);
  background: rgba(212,175,55,.08);
}
.filter-chip.active{
  background: linear-gradient(180deg, rgba(212,175,55,.25), rgba(212,175,55,.08));
  color: var(--gold-light);
  border-color: var(--gold);
  box-shadow: 0 0 10px rgba(212,175,55,.2);
}

/* =========================================================
   5.12 — CHAT (compat .chat-wrap, .chat-msgs, .msg, .chat-mic,
   .chat-send, .chat-input, .chat-input-row, .chat-tools,
   .voice-indicator, .quota-bar)
   ========================================================= */
.chat-wrap{
  height: calc(100vh - 320px);
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.chat-msgs{
  flex: 1;
  overflow-y: auto;
  padding: 8px 4px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.msg{
  max-width: 78%;
  padding: 12px 16px;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 16px;
  position: relative;
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
  animation: msgIn .35s ease both;
  word-wrap: break-word;
  line-height: 1.5;
}
@keyframes msgIn{
  from{ opacity: 0; transform: translateY(6px); }
  to  { opacity: 1; transform: translateY(0); }
}
.msg.bot{
  align-self: flex-start;
  background: linear-gradient(180deg, rgba(17,31,74,.96), rgba(8,16,44,.98));
  border: 1px solid var(--border-gold);
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.msg.user{
  align-self: flex-end;
  background: linear-gradient(180deg, var(--gold-5), var(--gold));
  color: #2a1d00;
  border: 1px solid var(--gold-dark);
  border-bottom-right-radius: 6px;
  font-weight: 500;
  box-shadow:
    0 4px 12px rgba(0,0,0,.35),
    0 0 16px rgba(212,175,55,.2);
}
.msg .msg-icon{
  position: absolute;
  top: -4px;
  width: 28px;
  height: 28px;
  background: var(--bg-night);
  border-radius: 50%;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.msg.bot .msg-icon{ left: -10px; }
.msg.user .msg-icon{
  right: -10px;
  color: var(--bg-night);
  background: var(--gold-light);
  border-color: var(--gold-dark);
}

.chat-input-row{
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(212,175,55,.22);
  margin-top: 10px;
}
.chat-mic,
.chat-send{
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, box-shadow .2s, filter .2s;
  border: none;
}
.chat-mic{
  background: linear-gradient(180deg, rgba(20,34,82,.85), rgba(10,18,48,.95));
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
}
.chat-mic:hover{
  background: rgba(212,175,55,.12);
  box-shadow: 0 0 12px rgba(212,175,55,.2);
}
.chat-mic.recording{
  background: linear-gradient(180deg, #ff5f6d, #d43c5c);
  border-color: #ff8a95;
  color: #fff;
  animation: pulseMic 1s ease-in-out infinite;
}
@keyframes pulseMic{
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,95,109,.7); }
  50%      { box-shadow: 0 0 0 12px rgba(255,95,109,0); }
}
.chat-mic svg{ width: 22px; height: 22px; }

.chat-input{
  flex: 1;
  padding: 13px 18px;
  background: rgba(6,12,34,.75);
  border: 1px solid var(--border-gold);
  border-radius: 999px;
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
}
.chat-input:focus{
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212,175,55,.22);
}

.chat-send{
  background: linear-gradient(180deg, var(--gold-5), var(--gold));
  border: 1px solid var(--gold-dark);
  color: #2a1d00;
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255,255,255,.4);
}
.chat-send:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.chat-send:disabled{
  filter: grayscale(.6);
  cursor: not-allowed;
}
.chat-send svg{ width: 20px; height: 20px; }

.chat-tools{
  padding: 10px 4px 0;
}

.voice-indicator{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 14px;
  margin: 8px 0;
  background: rgba(212,175,55,.1);
  border: 1px solid rgba(212,175,55,.32);
  border-radius: 18px;
  box-shadow: inset 0 0 12px rgba(212,175,55,.08);
}
.voice-wave{
  display: flex;
  align-items: center;
  gap: 3px;
  height: 26px;
}
.voice-wave span{
  display: inline-block;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-5), var(--gold));
  border-radius: 2px;
  animation: voiceWave 1.2s ease-in-out infinite;
  box-shadow: 0 0 4px var(--gold-glow);
}
.voice-wave span:nth-child(1){ animation-delay: 0s; }
.voice-wave span:nth-child(2){ animation-delay: .15s; }
.voice-wave span:nth-child(3){ animation-delay: .3s; }
.voice-wave span:nth-child(4){ animation-delay: .45s; }
.voice-wave span:nth-child(5){ animation-delay: .6s; }
@keyframes voiceWave{
  0%, 100% { height: 6px; }
  50%      { height: 24px; }
}
.voice-label{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--gold-light);
  font-size: 14px;
}

.quota-bar{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  margin-top: 12px;
  background: rgba(212,175,55,.1);
  border: 1px solid rgba(212,175,55,.32);
  border-radius: 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 1px;
}
.quota-bar b{
  color: var(--gold-light);
  font-size: 14px;
  text-shadow: 0 0 6px var(--gold-glow);
}

/* =========================================================
   5.13 — TOAST (compat .toast)
   Notification flottante dorée
   ========================================================= */
.toast{
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: linear-gradient(180deg, var(--gold-5), var(--gold));
  color: #2a1d00;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  box-shadow:
    var(--shadow-gold),
    inset 0 1px 0 rgba(255,255,255,.4);
  border: 1px solid var(--gold-dark);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  white-space: nowrap;
  max-width: 90vw;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* =========================================================
   5.14 — MODALS (compat .modal, .modal-backdrop, .modal-card,
   .modal-actions, .unlock-badge, .unlock-name, .unlock-desc,
   .level-up-num, .level-up-title)
   ========================================================= */
.modal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden]{ display: none !important; }

.modal-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(5,10,31,.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.modal-card{
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  background: linear-gradient(180deg, rgba(17,31,74,.96), rgba(6,12,34,.98));
  border: 1px solid var(--gold-light);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  text-align: center;
  box-shadow:
    0 24px 70px rgba(0,0,0,.75),
    0 0 32px rgba(212,175,55,.3),
    inset 0 1px 0 rgba(244,215,122,.2);
  animation: modalIn .45s cubic-bezier(.34, 1.56, .64, 1) both;
}
.modal-card::before{
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(212,175,55,.25);
  border-radius: calc(var(--radius-lg) - 5px);
  pointer-events: none;
}
@keyframes modalIn{
  from{ opacity: 0; transform: scale(.85) translateY(20px); }
  to  { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
  position: relative;
  z-index: 2;
}

.modal-card p{
  font-family: var(--font-body);
  color: var(--ink);
  margin-top: 12px;
  font-size: 16px;
  line-height: 1.5;
  position: relative;
  z-index: 2;
}

/* Unlock badge (popup nouveau badge) */
.unlock-badge{
  width: 130px;
  height: 130px;
  margin: 14px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: unlockSpin 1.1s ease-out both;
  position: relative;
  z-index: 2;
}
.unlock-badge svg{
  width: 100%;
  height: 100%;
  filter:
    drop-shadow(0 0 20px var(--gold-glow))
    drop-shadow(0 0 40px rgba(212,175,55,.3));
}
@keyframes unlockSpin{
  from{ opacity: 0; transform: rotate(-180deg) scale(.3); }
  to  { opacity: 1; transform: rotate(0) scale(1); }
}

.unlock-name{
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold-light);
  text-transform: uppercase;
  text-shadow: 0 0 14px var(--gold-glow);
  position: relative;
  z-index: 2;
}
.unlock-desc{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--ink);
  font-size: 14px;
  margin-top: 6px;
  position: relative;
  z-index: 2;
}

/* Level up */
.level-up-num{
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 700;
  background: linear-gradient(180deg, var(--gold-5), var(--gold-dark));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 14px 0;
  text-shadow: 0 0 36px var(--gold-glow);
  animation: levelPop .55s ease-out both;
  position: relative;
  z-index: 2;
}
@keyframes levelPop{
  0%   { transform: scale(.2); opacity: 0; }
  60%  { transform: scale(1.18); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.level-up-title{
  font-family: var(--font-body);
  font-style: italic;
  color: var(--gold-light);
  font-size: 18px;
  position: relative;
  z-index: 2;
}

/* =========================================================
   5.15 — DECK CONTROLS (compat .deck-controls)
   Boutons "À revoir / Connu ✓" en grille 2 colonnes
   ========================================================= */
.deck-controls{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

/* =========================================================
   5.16 — PREMIUM SHINE BUTTON (compat .premium-btn)
   ========================================================= */
.premium-btn{
  position: relative;
  overflow: hidden;
}
.premium-btn::before{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(-100%);
  animation: premiumShine 2.6s ease-in-out infinite;
}
@keyframes premiumShine{
  0%, 100% { transform: translateX(-100%); }
  50%      { transform: translateX(100%); }
}

/* =========================================================
   5.17 — RESPONSIVE (petits écrans)
   ========================================================= */
@media (max-width: 380px){
  .answer{
    font-size: 17px;
    padding: 12px 14px;
  }
  #quizAnswers .answer,
  #rapidAnswers .answer,
  .answer[dir="rtl"]{
    font-size: 18px;
  }
  .nav-item{ font-size: 8px; }
  .nav-item svg{ width: 22px; height: 22px; }
  .letters-grid{ grid-template-columns: repeat(6, 1fr); }
  .badges-grid-full{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 340px){
  .answer{
    font-size: 16px;
    padding: 11px 12px;
  }
  .brand-title{ font-size: 42px; }
}
@media (min-width: 768px){
  .app{ padding-bottom: 110px; }
}
