/* ═══════════════════════════════════════
   Grand Défi Quiz — Styles publics
   Scopés sous .gdq-root pour éviter tout
   conflit avec le thème WordPress
═══════════════════════════════════════ */

.gdq-root {
  --gdq-dark:    #080d18;
  --gdq-border:  rgba(255,255,255,.08);
  --gdq-primary: #06b6d4;
  --gdq-accent:  #f59e0b;
  --gdq-green:   #10b981;
  --gdq-red:     #ef4444;
  --gdq-purple:  #8b5cf6;
  --gdq-text:    #e8f0fe;
  --gdq-muted:   #94a3b8;
  --gdq-dim:     #64748b;

  background: var(--gdq-dark);
  color: var(--gdq-text);
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  /* taille injectée via JS */
}

/* ── Pages ── */
.gdq-page { display: none; flex-direction: column; min-height: 480px; }
.gdq-page.gdq-on { display: flex; }

/* ── Barre de progression ── */
.gdq-bar {
  display: none;
  background: rgba(8,13,24,.95);
  border-bottom: 1px solid var(--gdq-border);
  padding: .55rem 1rem;
  position: sticky;
  top: 0;
  z-index: 10;
}
.gdq-bar.gdq-bar-on { display: block; }
.gdq-bar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .38rem;
  gap: .5rem;
}
.gdq-bar-num {
  font-weight: 700;
  font-size: .8em;
  color: var(--gdq-muted);
  white-space: nowrap;
}
.gdq-bar-score {
  padding: .2rem .65rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: .76em;
  white-space: nowrap;
  transition: all .3s;
}
.gdq-bar-score.g { background: rgba(16,185,129,.14); color: var(--gdq-green);  border: 1px solid rgba(16,185,129,.25); }
.gdq-bar-score.m { background: rgba(245,158,11,.12); color: var(--gdq-accent); border: 1px solid rgba(245,158,11,.2); }
.gdq-bar-score.r { background: rgba(239,68,68,.12);  color: var(--gdq-red);    border: 1px solid rgba(239,68,68,.2); }
.gdq-bar-track { height: 5px; background: rgba(255,255,255,.07); border-radius: 3px; overflow: hidden; }
.gdq-bar-fill  {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gdq-primary), var(--gdq-purple));
  transition: width .5s ease;
}

/* ── Intro ── */
[id$="-intro"] {
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.gdq-intro-card { max-width: 420px; width: 100%; margin: 0 auto; }
.gdq-title {
  font-weight: 800;
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  line-height: 1.1;
  margin-bottom: .4rem;
  text-align: center;
}
.gdq-sub {
  color: var(--gdq-muted);
  font-size: .95em;
  margin-bottom: 2rem;
  line-height: 1.5;
  text-align: center;
}
.gdq-choose-lbl {
  font-weight: 700;
  font-size: .7em;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--gdq-dim);
  margin-bottom: .75rem;
  text-align: center;
}
.gdq-qty-row  { display: flex; gap: .65rem; justify-content: center; margin-bottom: 1.6rem; }
.gdq-qty-btn  {
  flex: 1;
  max-width: 110px;
  padding: 1rem .5rem;
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 2px solid var(--gdq-border);
  color: var(--gdq-text);
  font-weight: 700;
  font-size: 1.4em;
  cursor: pointer;
  transition: all .18s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  font-family: inherit;
}
.gdq-qty-btn small { font-weight: 400; font-size: .55em; color: var(--gdq-muted); }
.gdq-qty-btn.gdq-sel {
  border-color: var(--gdq-primary);
  background: rgba(6,182,212,.12);
  color: var(--gdq-primary);
}
.gdq-qty-btn.gdq-sel small { color: var(--gdq-primary); }
.gdq-go-btn {
  width: 100%;
  padding: .9rem;
  background: var(--gdq-primary);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: .95em;
  cursor: pointer;
  transition: all .15s;
  opacity: .35;
  pointer-events: none;
  min-height: 48px;
}
.gdq-go-btn.gdq-on { opacity: 1; pointer-events: all; }
.gdq-go-btn.gdq-on:hover { background: #08d0f0; }

/* ── Question ── */
.gdq-page[id$="-question"] {
  align-items: center;
  padding-bottom: 1.5rem;
}
.gdq-q-wrap {
  width: 100%;
  max-width: min(820px, 92%);
  padding: 1.2rem 1.2rem 0;
  display: flex;
  flex-direction: column;
}
.gdq-q-meta { display: flex; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.gdq-tag {
  padding: .22rem .6rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: .68em;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: rgba(6,182,212,.12);
  color: var(--gdq-primary);
  border: 1px solid rgba(6,182,212,.2);
}
.gdq-q-of  { color: var(--gdq-dim); font-size: .8em; }
.gdq-q-text {
  font-weight: 700;
  font-size: clamp(1em, 2.2vw, 1.35em);
  line-height: 1.45;
  margin-bottom: 1rem;
}

/* ── Panels ── */
.gdq-panel { display: flex; flex-direction: column; }
.gdq-panel.gdq-off { display: none; }

/* ── Options ── */
.gdq-opts {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  margin-bottom: .75rem;
}
.gdq-opt {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .8rem 1rem;
  border-radius: 12px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: clamp(.82em, 1.4vw, 1em);
  font-weight: 500;
  line-height: 1.4;
  transition: transform .1s, border-color .12s;
  min-height: 50px;
}
.gdq-opt:hover   { transform: translateY(-1px); }
.gdq-opt.gdq-sel { border-color: rgba(255,255,255,.75); box-shadow: 0 0 14px rgba(255,255,255,.07); }
.gdq-opt.gdq-correct { border-color: var(--gdq-green) !important; background: rgba(16,185,129,.2) !important; }
.gdq-opt.gdq-wrong   { border-color: var(--gdq-red) !important;   background: rgba(239,68,68,.12) !important; opacity: .72; }
.gdq-opt.gdq-off     { pointer-events: none; }
.gdq-opt-ltr {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .8em;
  flex-shrink: 0;
}

/* ── Valider ── */
.gdq-foot { flex-shrink: 0; padding-top: .6rem; }
.gdq-val-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem;
  background: var(--gdq-green);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: .95em;
  cursor: pointer;
  min-height: 48px;
  transition: all .15s;
}
.gdq-val-btn.gdq-on  { display: flex; }
.gdq-val-btn:hover   { background: #0ed47e; }

/* ── Révélation ── */
.gdq-reveal {
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--gdq-border);
  animation: gdqFadeUp .28s ease both;
}
@keyframes gdqFadeUp {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0);   }
}
.gdq-rev-top {
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem 1rem;
  font-weight: 700;
  font-size: .88em;
}
.gdq-rev-top.ok { background: rgba(16,185,129,.15); color: var(--gdq-green); }
.gdq-rev-top.ko { background: rgba(239,68,68,.1);   color: var(--gdq-red);   }
.gdq-rev-body {
  padding: .85rem 1rem;
  background: rgba(255,255,255,.022);
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.gdq-rev-wrong {
  font-weight: 600;
  font-size: .85em;
  padding: .5rem .8rem;
  background: rgba(239,68,68,.1);
  border-left: 3px solid var(--gdq-red);
  border-radius: 5px;
  line-height: 1.45;
  color: var(--gdq-text);
}
.gdq-rev-wrong:empty { display: none; }
.gdq-rev-correct {
  font-weight: 600;
  font-size: .85em;
  padding: .5rem .8rem;
  background: rgba(16,185,129,.1);
  border-left: 3px solid var(--gdq-green);
  border-radius: 5px;
  line-height: 1.45;
  color: var(--gdq-text);
}
.gdq-rev-why { font-size: .82em; color: var(--gdq-muted); line-height: 1.65; }
.gdq-rev-key {
  font-size: .8em;
  font-weight: 600;
  color: var(--gdq-accent);
  padding: .45rem .7rem;
  background: rgba(245,158,11,.07);
  border-radius: 6px;
  line-height: 1.4;
}
.gdq-rev-next {
  padding: .7rem 1rem;
  border-top: 1px solid rgba(255,255,255,.05);
  background: rgba(255,255,255,.015);
}
.gdq-rev-next button {
  width: 100%;
  padding: .85rem;
  background: var(--gdq-accent);
  color: #09101f;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: .9em;
  cursor: pointer;
  min-height: 48px;
  transition: all .12s;
}
.gdq-rev-next button:hover { background: #fbbf24; }

/* ── Final ── */
.gdq-page[id$="-final"] {
  align-items: center;
  justify-content: center;
  padding: 2rem 1.2rem;
  min-height: 500px;
}
.gdq-final-card { max-width: 460px; width: 100%; text-align: center; }
.gdq-trophy { font-size: 3rem; line-height: 1; margin-bottom: .1rem; }
.gdq-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1rem auto;
  position: relative;
  background: conic-gradient(var(--rc,var(--gdq-green)) 0% var(--p,0%), rgba(255,255,255,.06) 0%);
}
.gdq-ring::before { content: ''; position: absolute; inset: 9px; background: var(--gdq-dark); border-radius: 50%; }
.gdq-ring-in { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.gdq-ring-pct { font-weight: 800; font-size: 1.75em; line-height: 1; }
.gdq-ring-sub { font-size: .65em; color: var(--gdq-muted); }
.gdq-f-title { font-weight: 800; font-size: 1.5em; margin-bottom: .3rem; }
.gdq-f-sub   { color: var(--gdq-muted); font-size: .88em; line-height: 1.55; margin-bottom: 1.3rem; }
.gdq-stats   { display: grid; grid-template-columns: repeat(3,1fr); gap: .6rem; margin-bottom: 1.2rem; }
.gdq-s-card  {
  padding: .8rem .4rem;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--gdq-border);
  text-align: center;
}
.gdq-s-val { font-weight: 800; font-size: 1.5em; line-height: 1; margin-bottom: .25rem; }
.gdq-s-lbl { font-size: .68em; color: var(--gdq-muted); line-height: 1.3; }
.gdq-lvl   {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.4rem;
  font-weight: 700;
  font-size: .8em;
}
.gdq-f-btns { display: flex; gap: .6rem; flex-direction: column; }
@media(min-width:400px){ .gdq-f-btns { flex-direction: row; justify-content: center; } }
.gdq-btn-rp, .gdq-btn-ch {
  flex: 1;
  max-width: 220px;
  padding: .85rem 1.2rem;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 700;
  font-size: .88em;
  cursor: pointer;
  min-height: 48px;
  transition: all .15s;
}
.gdq-btn-rp { background: var(--gdq-primary); color: #fff; border: none; }
.gdq-btn-rp:hover { background: #08d0f0; }
.gdq-btn-ch { background: transparent; color: var(--gdq-muted); border: 1px solid var(--gdq-border); }
.gdq-btn-ch:hover { color: var(--gdq-text); border-color: var(--gdq-muted); }

/* ── Erreur shortcode ── */
.gdq-error { color: #b32d2e; background: #fbeaea; padding: .75rem 1rem; border-radius: 6px; font-size: .9em; }
