:root {
  --bg: #fff8e6;
  --bg-soft: #ffe6a9;
  --surface: #ffffff;
  --surface-alt: #fff2cf;
  --ink: #171717;
  --ink-soft: #3f3f46;
  --accent: #e6502e;
  --accent-2: #1261a0;
  --line: #1f1f1f;
  --shadow: 6px 6px 0 #1f1f1f;
  --radius: 14px;
  --max: 900px;
  --quiz-tile-height: 20rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Bricolage Grotesque", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 15%, #ffd261 0%, transparent 35%),
    radial-gradient(circle at 85% 10%, #ffc15a 0%, transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, #ffe8b7 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #000;
  color: #fff;
  padding: 0.5rem 0.75rem;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  z-index: 99;
}

.hero {
  max-width: var(--max);
  margin: 2rem auto 1rem;
  padding: 1rem;
}

.hero-kicker {
  margin: 0;
  font-weight: 800;
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h1,
h2,
summary {
  font-family: "Archivo Black", "Segoe UI", sans-serif;
  line-height: 1.1;
}

h1 {
  font-size: clamp(2rem, 4vw, 3.3rem);
  margin: 0.4rem 0;
  max-width: 20ch;
}

.hero-subtitle {
  color: var(--ink-soft);
  margin: 0;
  max-width: 60ch;
}

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem 2rem;
}

.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem;
  margin-bottom: 1rem;
  animation: cardIn 300ms ease both;
}

@keyframes cardIn {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 1rem 0;
}

.choices.choices-start {
  grid-template-columns: 1fr;
}

.choice-btn,
.btn-secondary {
  width: 100%;
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 0.95rem;
  /* //taille bouton */
  font-size: 1.5rem;
  white-space: pre-line;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.choice-btn {
  background:
    linear-gradient(145deg, #fff6e5 0%, #ffe0aa 56%, #ffd390 100%);
  font-weight: 700;
  color: #1a1a1a;
  box-shadow: 4px 4px 0 var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  min-height: var(--quiz-tile-height);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  letter-spacing: 0.01em;
}

.choice-btn-start {
  background:
    linear-gradient(145deg, #fff4e2 0%, #ffd8a0 54%, #ffc67d 100%);
  border-color: #1f1f1f;
  box-shadow: 5px 5px 0 #1f1f1f, inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.choice-btn-start:hover,
.choice-btn-start:focus-visible {
  background:
    linear-gradient(145deg, #fff1da 0%, #ffd09a 52%, #ffbf73 100%);
}

.choice-btn-start:active {
  background:
    linear-gradient(145deg, #ffe9c9 0%, #f7c07d 52%, #e7a959 100%);
}

.choice-btn:hover,
.choice-btn:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 7px 7px 0 var(--line), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(145deg, #fff8ea 0%, #ffe5b5 56%, #ffd89e 100%);
}

.choice-btn:active {
  transform: translate(1px, 1px) scale(0.99);
  box-shadow: 1px 1px 0 var(--line);
  background:
    linear-gradient(145deg, #ffeccd 0%, #f8cb8e 55%, #ebba71 100%);
}

.choice-btn:disabled,
.choice-btn:disabled:hover,
.choice-btn:disabled:focus-visible,
.choice-btn:disabled:active {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: 1px 1px 0 var(--line);
  background: #e4e4e7;
}

.choice-btn.choice-btn-selected:disabled,
.choice-btn.choice-btn-selected:disabled:hover,
.choice-btn.choice-btn-selected:disabled:focus-visible,
.choice-btn.choice-btn-selected:disabled:active {
  opacity: 0.85;
  background: #bfc3cc;
  box-shadow: 1px 1px 0 var(--line);
}

.choice-btn:focus-visible,
.btn-secondary:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}

.actions {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.btn-secondary {
  background: #fff;
  font-size: 1rem;
  box-shadow: 2px 2px 0 var(--line);
  min-height: 3.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary:hover {
  background: #f6f6f6;
}

.btn-secondary:active {
  transform: translate(1px, 1px) scale(0.99);
  box-shadow: 1px 1px 0 var(--line);
  background: #e8e8e8;
}

.btn-secondary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: 1px 1px 0 var(--line);
}

.result-description {
  margin-top: 0;
  color: var(--ink-soft);
}

.capsules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin: 1rem 0;
}

.capsule {
  display: flex;
  flex-direction: column;
  flex: 0 0 260px;
  width: min(260px, 100%);
  height: var(--quiz-tile-height);
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 3px 3px 0 var(--line);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.capsule:hover,
.capsule:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}

.capsule img {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  background: #f3f4f6;
  display: block;
}

.capsule-body {
  padding: 0.7rem;
}

.capsule-note {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--quiz-tile-height);
  height: var(--quiz-tile-height);
  background: #fff8e6;
}

.capsule-note .capsule-body {
  text-align: center;
}

.capsule h3 {
  margin: 0;
  font-size: 1.05rem;
}

.capsule p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.editorial p,
.faq p {
  max-width: 72ch;
}

details {
  border-top: 1px solid #d4d4d8;
  padding-top: 0.6rem;
  margin-top: 0.6rem;
}

summary {
  cursor: pointer;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem 2rem;
  color: #27272a;
}

.site-footer nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.site-footer a {
  color: #0f172a;
  font-weight: 700;
}

.noscript-card {
  max-width: var(--max);
  margin: 0 auto 2rem;
}

@media (max-width: 620px) {
  :root {
    --quiz-tile-height: 18rem;
  }

  .hero {
    margin: 0 auto 0.75rem;
    padding-top: 0.3rem;
  }

  h1 {
    margin: 0.25rem 0;
  }

  .card {
    padding: 0.9rem;
  }

  .choice-btn {
    font-size: 1.47rem;
  }

  .capsules {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.35rem;
  }

  .capsule {
    flex: 0 0 260px;
  }

  .capsules.capsules-single {
    justify-content: center;
    overflow-x: hidden;
  }

  .capsules.capsules-single .capsule {
    flex: 0 1 260px;
  }
}
