/* ============================================================================
   QUIZ'EM ALL — v2.5.0 — QUOTA QUOTIDIEN / VIP
   ----------------------------------------------------------------------------
   Styles ADDITIFS uniquement. Aucune règle existante n'est modifiée : on
   réutilise les jetons du thème métal (--bronze-hi, --gold-1..5, --bg-panel…)
   déjà définis dans styles.css. Le rendu du reste de l'application est intact.
   ========================================================================== */

/* ------------------------- Interrupteur du header ------------------------ */
#qeVipSwitchSlot { display: inline-flex; align-items: center; }

.qedq-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px 3px 9px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1a1a1e 0%, #0d0d0f 100%);
  border: 1px solid var(--steel-hi, #3b3b42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.qedq-switch-label {
  font-family: var(--font-display, inherit);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim, #8a8a92);
  white-space: nowrap;
}

.qedq-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.qedq-switch-btn:focus-visible { outline: 2px solid var(--bronze-hi, #d4af37); outline-offset: 3px; border-radius: 999px; }

.qedq-switch-track {
  position: relative;
  display: block;
  width: 38px;
  height: 19px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a2a2f, #17171a);
  border: 1px solid #44444c;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.75);
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}

.qedq-switch-thumb {
  position: absolute;
  top: 50%;
  left: 2px;
  width: 13px;
  height: 13px;
  margin-top: -6.5px;
  border-radius: 50%;
  background: linear-gradient(180deg, #c2c6cc, #7d8189);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), background .25s ease;
}

.qedq-switch-btn[aria-checked="true"] .qedq-switch-track {
  background: linear-gradient(180deg, var(--gold-3, #d4af37), var(--gold-5, #6e5630));
  border-color: var(--gold-2, #e7c87a);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35), 0 0 12px rgba(212, 175, 55, 0.45);
}
.qedq-switch-btn[aria-checked="true"] .qedq-switch-thumb {
  transform: translateX(19px);
  background: linear-gradient(180deg, #fff8dc, var(--gold-2, #e7c87a));
}

.qedq-switch-state {
  font-family: var(--font-display, inherit);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--text-dim, #8a8a92);
  min-width: 52px;
  text-align: left;
  transition: color .2s ease;
}
.qedq-switch-btn[aria-checked="true"] .qedq-switch-state {
  color: var(--gold-2, #e7c87a);
  text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.qedq-switch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #d8dae0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.qedq-switch-badge.is-vip {
  color: #2a1f06;
  background: linear-gradient(180deg, var(--gold-1, #fbefc0), var(--gold-3, #d4af37));
  border-color: var(--gold-2, #e7c87a);
}

/* ------------------------------- Paywall --------------------------------- */
.qedq-overlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: radial-gradient(circle at 50% 35%, rgba(60, 40, 0, 0.55), rgba(0, 0, 0, 0.9) 70%);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: qedqFade .22s ease-out both;
}
.qedq-overlay.hidden { display: none !important; }
body.qedq-lock { overflow: hidden; }

@keyframes qedqFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qedqRise {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes qedqSheen {
  0%   { transform: translateX(-130%) skewX(-20deg); }
  55%  { transform: translateX(330%) skewX(-20deg); }
  100% { transform: translateX(330%) skewX(-20deg); }
}
@keyframes qedqGlow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.55), 0 0 26px rgba(212, 175, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
  50%      { box-shadow: 0 0 0 1px rgba(231, 200, 122, 0.85), 0 0 40px rgba(212, 175, 55, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
}

.qedq-modal {
  position: relative;
  width: min(430px, 100%);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 30px 24px 20px;
  text-align: center;
  border-radius: 18px;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(212, 175, 55, 0.16), transparent 62%),
    linear-gradient(168deg, #23232a 0%, #141417 45%, #0b0b0d 100%);
  border: 1px solid transparent;
  background-clip: padding-box;
  animation: qedqRise .3s cubic-bezier(.2, .9, .3, 1) both, qedqGlow 3.4s ease-in-out .4s infinite;
  font-family: var(--font-body, inherit);
  color: var(--text, #e8e9ec);
}
.qedq-modal::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 19px;
  padding: 1px;
  background: linear-gradient(180deg, var(--gold-1, #fbefc0), var(--gold-3, #d4af37) 34%, #4a3a15 70%, var(--gold-2, #e7c87a));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
/* Reflet métallique qui balaie le cadre */
.qedq-modal::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: 0;
  width: 28%;
  border-radius: 18px;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  transform: translateX(-130%) skewX(-20deg);
  animation: qedqSheen 5s ease-in-out 1.1s infinite;
  pointer-events: none;
}

.qedq-crown {
  font-size: 2.6rem;
  line-height: 1;
  margin-bottom: 6px;
  filter: drop-shadow(0 0 14px rgba(212, 175, 55, 0.75));
}

.qedq-kicker {
  margin: 0 0 8px;
  font-family: var(--font-display, inherit);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-4, #a08456);
}

.qedq-title {
  margin: 0 0 10px;
  font-family: var(--font-display, inherit);
  font-size: 1.5rem;
  line-height: 1.15;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .01em;
  background: linear-gradient(180deg, var(--gold-1, #fbefc0) 0%, var(--gold-2, #e7c87a) 42%, var(--gold-4, #a08456) 62%, var(--gold-2, #e7c87a) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.qedq-sub {
  margin: 0 0 18px;
  font-size: .9rem;
  line-height: 1.5;
  color: var(--text-dim, #a6a6ae);
}
.qedq-sub strong { color: #f0e2b8; }

.qedq-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin: 0 0 18px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(212, 175, 55, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.qedq-timer-label {
  font-size: .64rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim, #96969e);
}
.qedq-timer-value {
  font-family: var(--font-display, ui-monospace, monospace);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: .06em;
  font-variant-numeric: tabular-nums;
  color: var(--gold-2, #e7c87a);
  text-shadow: 0 0 18px rgba(212, 175, 55, 0.55);
}
.qedq-timer-hint { font-size: .6rem; color: #77777f; letter-spacing: .06em; }

.qedq-perks {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 7px;
}
.qedq-perks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .82rem;
  color: #cfd1d6;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.qedq-perks li span { font-size: .95rem; }

.qedq-cta {
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-family: var(--font-display, inherit);
  font-size: .92rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #241a02;
  background: linear-gradient(180deg, var(--gold-1, #fbefc0) 0%, var(--gold-2, #e7c87a) 40%, var(--gold-3, #d4af37) 62%, var(--gold-2, #e7c87a) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 6px 18px rgba(212, 175, 55, 0.28);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.qedq-cta:hover { filter: brightness(1.07); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 8px 24px rgba(212, 175, 55, 0.45); }
.qedq-cta:active { transform: scale(.98); }
.qedq-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.qedq-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-top: 8px;
}
.qedq-link {
  padding: 7px 6px;
  background: none;
  border: 0;
  cursor: pointer;
  font-size: .74rem;
  color: #8a8a92;
  text-decoration: underline;
  text-decoration-color: rgba(138, 138, 146, 0.4);
  text-underline-offset: 3px;
  transition: color .16s ease;
}
.qedq-link:hover { color: var(--gold-2, #e7c87a); }
.qedq-link:focus-visible { outline: 2px solid var(--gold-3, #d4af37); outline-offset: 2px; border-radius: 6px; }

/* -------------------------------- Toast ---------------------------------- */
.qedq-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 20px);
  z-index: 10060;
  max-width: min(420px, 92vw);
  padding: 11px 16px;
  border-radius: 10px;
  font-size: .84rem;
  text-align: center;
  color: #f2f3f5;
  background: linear-gradient(180deg, #24242b, #131316);
  border: 1px solid var(--bronze, #a08456);
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}
.qedq-toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* ------------------------------- Mobile ---------------------------------- */
@media (max-width: 900px) {
  .qedq-switch-label { display: none; }
  .qedq-switch-state { min-width: 46px; font-size: .64rem; }
}
@media (max-width: 520px) {
  .qedq-switch { padding: 3px 6px; gap: 5px; }
  .qedq-switch-track { width: 34px; height: 18px; }
  .qedq-switch-thumb { width: 12px; height: 12px; margin-top: -6px; }
  .qedq-switch-btn[aria-checked="true"] .qedq-switch-thumb { transform: translateX(16px); }
  .qedq-switch-state { display: none; }
  .qedq-modal { padding: 24px 16px 16px; border-radius: 15px; }
  .qedq-title { font-size: 1.24rem; }
  .qedq-timer-value { font-size: 1.6rem; }
  .qedq-crown { font-size: 2.1rem; }
}

/* Accessibilité : respect du réglage système */
@media (prefers-reduced-motion: reduce) {
  .qedq-overlay, .qedq-modal, .qedq-modal::after { animation: none !important; }
}

/* v2.6.4 — Bouton secondaire « Créer un compte gratuit » (invités) */
.qedq-cta--ghost {
  margin-top: 10px;
  color: var(--gold-2, #e7c87a);
  background: var(--metal-gradient, linear-gradient(160deg, #1c1c20, #121215));
  border: 1px solid var(--gold-4, #a08456);
  box-shadow: none;
}
.qedq-cta--ghost:hover { color: var(--gold-1, #fbefc0); border-color: var(--gold-3, #d4af37); box-shadow: 0 6px 20px rgba(212, 175, 55, .18); }
.qedq-cta--ghost.hidden { display: none; }

/* v2.6.4 — Petit écran : la fenêtre de limite tient sans défiler (VIP + inscription + « Plus tard » visibles) */
@media (max-height: 720px) {
  .qedq-overlay { padding: 10px; }
  .qedq-modal { max-height: calc(100dvh - 20px); padding: 16px 16px 12px; }
  .qedq-crown { font-size: 1.9rem; line-height: 1; }
  .qedq-kicker { margin: 4px 0 6px; font-size: .62rem; }
  .qedq-title { font-size: 1.15rem; margin: 0 0 6px; }
  .qedq-sub { font-size: .86rem; line-height: 1.4; margin: 0 0 10px; }
  .qedq-timer { padding: 8px 10px; margin: 0 0 10px; }
  .qedq-timer-value { font-size: 1.5rem; }
  .qedq-timer-hint { display: none; }
  .qedq-perks { display: none; }
  .qedq-cta { padding: 12px 14px; }
  .qedq-cta--ghost { margin-top: 8px; }
  .qedq-actions { margin-top: 6px; }
}

