/* LudoSoir - Quizz "Quel joueur etes-vous ?"
 * S'appuie sur les variables definies dans guides.css : --surface, --border,
 * --ink, --ink2, --muted, --r. Ne redefinit que l'accent du quiz.
 * Mobile-first. Pas de :nth-child (rendu instable sur Safari iOS).
 */

:root {
  --q-accent: var(--accent, #e8500a);
  --q-accent-soft: rgba(232, 80, 10, .14);
  --q-accent-soft: color-mix(in srgb, var(--accent, #e8500a) 14%, transparent);
  --q-accent-line: rgba(232, 80, 10, .5);
  --q-accent-line: color-mix(in srgb, var(--accent, #e8500a) 45%, transparent);
}

/* Hero et footer : repris du style inline de la section Guides (absents de guides.css) */
.gs-hero {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--ink);
  padding: 32px 20px 28px;
  margin: 16px 16px 0;
}
.gs-hero h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 28px;
  margin-bottom: 8px;
}
.gs-hero p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 640px;
}
.gs-footer {
  text-align: center;
  padding: 28px 16px 36px;
}
.gs-footer a {
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.gs-footer a:hover { color: var(--ink); text-decoration: underline; }

.q-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: 8px 16px 40px;
}

.q-hidden { display: none !important; }

/* ── Intro / mini-guide ── */
.q-shared {
  background: var(--q-accent-soft);
  border: 1px solid var(--q-accent-line);
  border-radius: var(--r);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 16px;
  line-height: 1.5;
}

.q-guide {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 18px 6px;
  margin-bottom: 18px;
}
.q-guide-title {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 12px;
}
.q-guide-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.q-guide-ico {
  font-size: 22px;
  line-height: 1.2;
  flex: 0 0 auto;
}
.q-guide-txt {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.q-guide-txt strong { color: var(--ink); font-weight: 700; }

.q-promo {
  background: var(--surface);
  border: 1px solid var(--q-accent);
  border-radius: var(--r);
  padding: 14px 18px;
  margin-bottom: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}
.q-promo strong { color: var(--q-accent); }
.q-promo a {
  display: inline-block;
  margin-top: 4px;
  color: var(--q-accent);
  font-weight: 700;
  text-decoration: none;
}
.q-promo a:hover { text-decoration: underline; }

.q-start-wrap { text-align: center; margin: 8px 0 0; }

/* ── Boutons ── */
.q-btn {
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  padding: 14px 22px;
  border-radius: var(--r);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s, background .12s;
}
.q-btn:hover { box-shadow: 0 4px 18px rgba(0,0,0,.1); transform: translateY(-1px); }
.q-btn:active { transform: translateY(0); }

.q-btn-primary {
  background: var(--q-accent);
  border-color: var(--q-accent);
  color: #fff;
}
.q-btn-lg { font-size: 16px; padding: 16px 30px; }

/* ── Questions ── */
.q-progress {
  height: 8px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}
.q-progress-bar {
  height: 100%;
  background: var(--q-accent);
  border-radius: 999px;
  transition: width .25s ease;
}
.q-step {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  margin-bottom: 8px;
}
.q-question {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 20px;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 18px;
}
.q-answers { display: flex; flex-direction: column; gap: 10px; }
.q-answer {
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  line-height: 1.4;
  padding: 14px 16px;
  border-radius: var(--r);
  cursor: pointer;
  transition: border-color .12s, background .12s, transform .1s;
}
@media (hover: hover) and (pointer: fine) {
  .q-answer:hover {
    border-color: var(--q-accent);
    background: var(--q-accent-soft);
  }
}
.q-answer:active {
  transform: scale(.99);
  border-color: var(--q-accent);
  background: var(--q-accent-soft);
}

/* ── Resultat ── */
.q-result-head { text-align: center; margin-bottom: 10px; }
.q-result-emoji { font-size: 58px; line-height: 1; margin-bottom: 6px; }
.q-result-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--muted);
}
.q-result-name {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 26px;
  color: var(--ink);
  margin: 4px 0 6px;
}
.q-result-tagline {
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--q-accent);
  margin: 10px 0 6px;
}

.q-radar {
  max-width: 360px;
  margin: 10px auto 6px;
}
.q-radar svg { width: 100%; height: auto; display: block; }

.radar-grid { fill: none; stroke: var(--border); stroke-width: 1; }
.radar-spoke { stroke: var(--border); stroke-width: 1; }
.radar-area {
  fill: var(--q-accent-soft);
  stroke: var(--q-accent);
  stroke-width: 2;
}
.radar-dot { fill: var(--q-accent); }
.radar-label {
  fill: var(--ink);
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 12px;
}

.q-result-doms {
  text-align: center;
  font-size: 14px;
  color: var(--ink);
  margin: 6px 0 14px;
}
.q-result-doms strong { color: var(--q-accent); }
.q-result-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 20px;
}

.q-share-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 10px 0 4px;
}

.q-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 10px;
}
.q-actions .q-btn { flex: 1 1 200px; }

.q-note {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin: 18px 0 6px;
}
.q-cta { text-align: center; margin: 4px 0 0; }
.q-cta a {
  color: var(--q-accent);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
}
.q-cta a:hover { text-decoration: underline; }

/* ── Toast (fallback partage) ── */
.q-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: var(--surface);
  padding: 12px 18px;
  border-radius: var(--r);
  font-size: 13px;
  max-width: 90vw;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  z-index: 9999;
}
.q-toast-on { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 560px) {
  .q-question { font-size: 22px; }
  .q-result-name { font-size: 30px; }
}

/* Illustration de l'archétype sur l'écran résultat et la vue lien partagé */
.q-result-img-wrap {
  max-width: 480px;
  margin: 0 auto 6px;
}
.q-result-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r);
  border: 1px solid var(--border);
}
