/* style.css */

:root {
  --z-overlay: 20;
  --z-modal: 30;
  --gradient-histoire: linear-gradient(90deg, #ff9a3c 0%, #e53935 100%);
  --gradient-geographie: linear-gradient(90deg, #26c6da 0%, #1976d2 100%);
  --gradient-politique: linear-gradient(90deg, #ffb74d 0%, #8d4e26 100%);
  --gradient-litterature: linear-gradient(90deg, #43a047 0%, #1e7e34 100%);
  --gradient-tourisme: linear-gradient(90deg, #4dd0e1 0%, #0097a7 100%);
  --gradient-droit: linear-gradient(90deg, #607d8b 0%, #263238 100%);
  --gradient-aleatoire: linear-gradient(90deg, #bdbdbd 0%, #424242 100%);
}

body {
  margin: 0;
  font-family: 'Product Sans', 'Segoe UI', sans-serif;
  background: linear-gradient(180deg, #fef6e7 0%, #f2f7ff 100%);
  color: #333;
}

.container {
  max-width: 480px;
  margin: auto;
  padding: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #fdf8ef 100%);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  border-radius: 24px;
}

h1, h2 {
  text-align: center;
}

.ad {
  background-color: #e0e0e0;
  text-align: center;
  padding: 10px;
  margin: 10px 0;
  font-weight: bold;
}

button {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 15px;
  font-size: 16px;
  background-color: #1e8e3e;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

button:hover {
  background-color: #156e2a;
}

.timer {
  text-align: center;
  font-weight: bold;
  margin-top: 10px;
}

@media screen and (max-width: 480px) {
  .container {
    padding: 10px;
  }

  button {
    font-size: 14px;
    padding: 12px;
  }
}

.quiz-image {
  width: 480px;
  height: auto;
  display: block;
  margin: 10px auto;
  border-radius: 8px;
}

.quiz-button {
  display: block;
  width: 100%;
  max-width: 320px;
  padding: 12px 16px;
  font-size: 16px;
  border-radius: 6px;
  margin: 10px auto;
  text-align: center;
  box-sizing: border-box;
}

.rejouer {
  background-color: #2e8b57; /* vert */
  color: white;
  border: none;
}

.partager {
  background-color: #1877f2; /* bleu Facebook */
  color: white;
  border: none;
}

.quiz-option-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  width: min(100%, 760px);
  min-height: 62px;
  margin: 0 0 14px;
  padding: 10px 20px 10px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f4f6 100%);
  color: #1f2937;
  font-size: 18px;
  font-weight: 500;
  text-align: left;
  box-sizing: border-box;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.quiz-option-btn:hover {
  background: linear-gradient(180deg, #fbfbfb 0%, #f0f2f5 100%);
}

.quiz-option-btn:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.quiz-option-index {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f7d05c 0%, #f0be38 100%);
  border: 1px solid rgba(188, 142, 35, 0.45);
  color: #1f2937;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.quiz-option-text {
  flex: 1;
  text-align: left;
  color: inherit;
}

.quiz-option-btn.is-correct {
  background: linear-gradient(180deg, #14a84d 0%, #0e8d3f 100%);
  border-color: rgba(18, 108, 49, 0.7);
  color: #ffffff;
}

.quiz-option-btn.is-wrong {
  background: linear-gradient(180deg, #cc4e4d 0%, #a73939 100%);
  border-color: rgba(120, 38, 38, 0.7);
  color: #ffffff;
}

.quiz-option-btn.is-correct .quiz-option-index,
.quiz-option-btn.is-wrong .quiz-option-index {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}

.quiz-option-mark {
  margin-left: auto;
  padding-left: 10px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

@media screen and (max-width: 480px) {
  .quiz-option-btn {
    width: 100%;
    font-size: 15px;
    min-height: 46px;
    padding: 8px 14px 8px 10px;
  }

  .quiz-option-index {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 13px;
  }
}

/* ---------------------------------------------------------------- */
/* Landing immersive (V2)                                            */
/* ---------------------------------------------------------------- */

.hero-body {
  margin: 0;
  background: #000;
}

.hero {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.hero-video-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.35) 40%, rgba(0, 0, 0, 0.6) 100%);
}

.hero-nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px;
}

.hero-nav nav {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.hero-nav nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-nav nav a:hover,
.hero-nav nav a:focus-visible {
  text-decoration: underline;
}

.hero-nav-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.hero-nav-facebook {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  border: 0;
  background: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.hero-auth:hover,
.hero-auth:focus-visible {
  /* neutralise le fond vert de la règle globale button:hover */
  background-color: transparent;
  color: #ffffff;
  text-decoration: underline;
  text-decoration-color: #ffffff;
}

.hero-auth-avatar {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.hero-main {
  position: absolute;
  top: 50%;
  left: 32px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  transform: translateY(-50%);
}

.hero-logo {
  width: min(420px, 60vw);
  height: auto;
  mix-blend-mode: screen;
}

.cta-group {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.cta-btn {
  --cta-width: 170px;
  --cta-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--cta-width);
  min-width: var(--cta-width);
  height: var(--cta-height);
  min-height: var(--cta-height);
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  padding: 0 20px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.7);
  transition: background-color 0.18s ease-in-out, color 0.18s ease-in-out, border-color 0.18s ease-in-out, transform 0.15s ease-in-out;
}

.cta-btn.is-active {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #ffffff;
}

.cta-group:hover .cta-btn:not(:hover) {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.7);
}

.cta-btn:hover {
  background: #ffffff;
  color: #1a1a1a;
  border-color: #ffffff;
  transform: translateY(-1px);
}

.cta-btn:active {
  transform: translateY(0);
}

.cta-btn:focus-visible {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6);
}

.mobile-nav {
  display: none;
}

@media screen and (max-width: 749px) {
  .hero {
    height: 100dvh;
    min-height: 100dvh;
    overflow: hidden;
  }

  .hero-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    transform: scale(1.22);
    transform-origin: center center;
  }

  .hero-video-wrapper,
  .hero-overlay {
    inset: 0;
  }

  .hero-nav {
    position: absolute;
    inset: 0 0 auto 0;
    padding: 14px 16px 0;
    z-index: 3;
  }

  .hero-nav nav {
    display: none;
  }

  .hero-nav-actions {
    position: absolute;
    top: 14px;
    right: 16px;
    z-index: 4;
    gap: 12px;
  }

  .hero-nav-facebook {
    width: 30px;
    height: 30px;
  }

  .hero-auth {
    font-size: 13px;
    padding: 4px 0;
  }

  .hero-main {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 18px;
    padding: 108vh 30px 120px 8vw;
    margin-top: 0;
    max-width: none;
  }

  .hero-logo {
    width: clamp(220px, 58vw, 330px);
    display: block;
    margin: 0;
  }

  .cta-group {
    width: auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .cta-btn {
    --cta-width: clamp(180px, 46vw, 240px);
    --cta-height: 38px;
    width: var(--cta-width);
    min-width: var(--cta-width);
    height: var(--cta-height);
    min-height: var(--cta-height);
    font-size: 16px;
    border-radius: 12px;
    letter-spacing: 0.01em;
  }

  .mobile-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 8px calc(18px + env(safe-area-inset-bottom));
    margin: 0;
    border-top: 0;
    box-shadow: none;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.06) 38%, rgba(0, 0, 0, 0.28) 100%);
  }

  .mobile-nav::before,
  .mobile-nav::after {
    content: none;
  }

  .mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 72px;
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
  }

  .mobile-nav img {
    display: block;
    width: 26px;
    height: 26px;
    filter: brightness(0) invert(1);
  }
}

/* ---------------------------------------------------------------- */
/* Authentification de la landing                                   */
/* ---------------------------------------------------------------- */

.login-modal-open {
  overflow: hidden;
}

.login-modal-overlay[hidden] {
  display: none;
}

.login-modal-overlay {
  position: fixed;
  z-index: 10;
}

.login-modal-backdrop,
.login-modal {
  position: fixed;
  z-index: 10;
}

.login-modal-backdrop {
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
}

.login-modal {
  top: 50%;
  left: 50%;
  width: min(636px, calc(100vw - 40px));
  padding: 42px 40px 30px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.login-modal h2 {
  margin: 0 0 12px;
  font-size: 30px;
  line-height: 1.2;
  text-align: left;
}

.login-modal > p {
  margin: 0;
  line-height: 1.5;
  text-align: left;
}

.login-modal-actions {
  display: grid;
  gap: 12px;
  margin: 26px 0 22px;
}

.login-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 58px;
  margin: 0;
  padding: 10px 16px;
  border: 1px solid #dedede;
  border-radius: 17px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.login-provider-facebook {
  border-color: #0758bd;
  background: #0758bd;
  color: #ffffff;
}

.login-provider:hover,
.login-provider:focus-visible {
  background: #f5f5f5;
}

.login-provider-facebook:hover,
.login-provider-facebook:focus-visible {
  background: #064da6;
}

.login-provider:disabled {
  cursor: wait;
  opacity: 0.6;
}

.login-modal-skip {
  display: block;
  margin: 0 0 18px;
  color: #606060;
  font-size: 14px;
  text-align: center;
}

.login-modal-skip:hover,
.login-modal-skip:focus-visible {
  color: #333333;
}

.login-modal-privacy {
  color: #606060;
  font-size: 13px;
  line-height: 1.45 !important;
}

.login-modal-privacy a {
  color: #1e6bd6;
  font-weight: 700;
}

.login-modal-status {
  min-height: 20px;
  margin-top: 10px !important;
  color: #a33a2b;
  font-size: 13px;
}

.login-modal-close {
  position: absolute;
  top: -16px;
  right: -18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  color: #333333;
  font-size: 36px;
  line-height: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.login-modal-close:hover {
  background: #333333;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 9px 22px rgba(0, 0, 0, 0.24);
}

.login-modal-close:focus,
.login-modal-close:focus-visible,
.login-modal-close:active {
  border: 0;
  outline: none;
}

.login-modal-close:active {
  background: #333333;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.multi-soon-modal-open {
  overflow: hidden;
}

.multi-soon-modal-overlay[hidden] {
  display: none;
}

.multi-soon-modal-backdrop,
.multi-soon-modal {
  position: fixed;
  z-index: 12;
}

.multi-soon-modal-backdrop {
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.multi-soon-modal {
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 1130px;
  max-width: calc(100vw - 80px);
  height: 600px;
  padding: 44px 64px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 32px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.multi-soon-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.multi-soon-icon img {
  width: 180px;
  height: auto;
  max-width: 40%;
}

.multi-soon-header {
  margin-bottom: 18px;
}

.multi-soon-kicker {
  margin: 0;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multi-soon-header h2 {
  margin: 4px 0 10px;
  background: linear-gradient(180deg, #f6c94a 0%, #e8a325 60%, #d9901a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.multi-soon-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.multi-soon-tagline::before,
.multi-soon-tagline::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: rgba(232, 163, 37, 0.5);
}

.multi-soon-description {
  margin: 0 0 24px;
  color: #4a4a4a;
  font-size: 16px;
  line-height: 1.5;
}

.multi-soon-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 645px;
  max-width: 100%;
  height: 95px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 28px;
  background: #fdf2df;
  text-align: left;
  box-sizing: border-box;
}

.multi-soon-notice-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.multi-soon-notice-text strong {
  display: block;
  margin-bottom: 2px;
  color: #1a1a1a;
  font-size: 15px;
}

.multi-soon-notice-text span {
  color: #555b60;
  font-size: 14px;
  line-height: 1.4;
}

.room-soon-modal-open {
  overflow: hidden;
}

.room-soon-modal-overlay[hidden] {
  display: none;
}

.room-soon-modal-backdrop,
.room-soon-modal {
  position: fixed;
  z-index: 12;
}

.room-soon-modal-backdrop {
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.room-soon-modal {
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 1130px;
  max-width: calc(100vw - 80px);
  height: 600px;
  padding: 44px 64px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 32px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.room-soon-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

.room-soon-icon img {
  width: 180px;
  height: auto;
  max-width: 40%;
}

.room-soon-header {
  margin-bottom: 18px;
}

.room-soon-kicker {
  margin: 0;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-soon-header h2 {
  margin: 4px 0 10px;
  background: linear-gradient(90deg, #f7941d 0%, #ee3f5d 55%, #b5182f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.room-soon-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.room-soon-tagline::before,
.room-soon-tagline::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: rgba(230, 57, 70, 0.5);
}

.room-soon-description {
  margin: 0 0 24px;
  color: #4a4a4a;
  font-size: 16px;
  line-height: 1.5;
}

.room-soon-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 645px;
  max-width: 100%;
  height: 95px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 28px;
  background: #fdf2df;
  text-align: left;
  box-sizing: border-box;
}

.room-soon-notice-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.room-soon-notice-text strong {
  display: block;
  margin-bottom: 2px;
  color: #1a1a1a;
  font-size: 15px;
}

.room-soon-notice-text span {
  color: #555b60;
  font-size: 14px;
  line-height: 1.4;
}

.network-soon-modal-open {
  overflow: hidden;
}

.network-soon-modal-overlay[hidden] {
  display: none;
}

.network-soon-modal-backdrop,
.network-soon-modal {
  position: fixed;
  z-index: 12;
}

.network-soon-modal-backdrop {
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.network-soon-modal {
  top: 50%;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 1130px;
  max-width: calc(100vw - 80px);
  height: 600px;
  padding: 44px 64px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 32px;
  background: #ffffff;
  text-align: center;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
}

.network-soon-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.network-soon-icon {
  width: 120px;
  height: auto;
  max-width: 30%;
}

.network-soon-icon--multi {
  position: relative;
  z-index: 1;
  margin-right: -32px;
}

.network-soon-icon--room {
  position: relative;
  z-index: 2;
  margin-left: -32px;
}

.network-soon-header {
  margin-bottom: 18px;
}

.network-soon-kicker {
  margin: 0;
  color: #1a1a1a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.network-soon-header h2 {
  margin: 4px 0 10px;
  background: linear-gradient(90deg, #187a2f 0%, #7fa72a 22%, #f2b72b 48%, #f47a32 72%, #d92532 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.network-soon-tagline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0;
  color: #1a1a1a;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.network-soon-tagline::before {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, #74b96b 0%, #f2b72b 100%);
}

.network-soon-tagline::after {
  content: '';
  flex: 1;
  max-width: 60px;
  height: 1px;
  background: linear-gradient(90deg, #f2b72b 0%, #d92532 100%);
}

.network-soon-description {
  margin: 0 0 24px;
  color: #4a4a4a;
  font-size: 16px;
  line-height: 1.5;
}

.network-soon-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 645px;
  max-width: 100%;
  height: 95px;
  margin: 0 auto;
  padding: 16px 18px;
  border-radius: 28px;
  background: #fdf2df;
  text-align: left;
  box-sizing: border-box;
}

.network-soon-notice-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.network-soon-notice-text strong {
  display: block;
  margin-bottom: 2px;
  color: #1a1a1a;
  font-size: 15px;
}

.network-soon-notice-text span {
  color: #555b60;
  font-size: 14px;
  line-height: 1.4;
}

.mode-modal-open {
  overflow: hidden;
}

.mode-modal-overlay[hidden] {
  display: none;
}

.mode-modal-backdrop,
.mode-modal {
  position: fixed;
  z-index: 11;
}

.mode-modal-backdrop {
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.mode-modal {
  top: 50%;
  left: 50%;
  width: min(1148px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px);
  padding: 28px 72px 60px;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  box-sizing: border-box;
  overflow: visible;
}

.mode-modal-header {
  text-align: center;
  margin-bottom: 38px;
}

.mode-modal-header h2 {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #0e2b3b;
  font-weight: 900;
  text-transform: uppercase;
}

.mode-modal-title-line {
  font-size: clamp(1.9rem, 2.45vw, 2.65rem);
  letter-spacing: 0.02em;
}

.mode-modal-title-main {
  display: block;
  color: #168f43;
  font-size: clamp(3.25rem, 5.4vw, 4.85rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 0 rgba(9, 111, 48, 0.22);
}

.mode-modal-header p {
  margin: 18px auto 0;
  max-width: 900px;
  color: #555b60;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

.mode-modal-subtitle-mobile,
.mode-card-description-mobile {
  display: none;
}

.mode-modal .mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px;
  align-items: stretch;
}

.mode-modal .mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 400px;
  min-height: 0;
  box-sizing: border-box;
  padding: 22px 18px 14px;
  border-radius: 20px;
  background: #ffffff;
  border: 2px solid #dfe7db;
  box-shadow: 0 7px 16px rgba(15, 35, 51, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.mode-modal .mode-card:hover,
.mode-modal .mode-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 35, 51, 0.15);
}

.mode-modal .mode-card--solo {
  border-color: rgba(44, 169, 88, 0.7);
  background: #f1fff5;
}

.mode-modal .mode-card--multi {
  border-color: rgba(251, 175, 34, 0.8);
  background: #fffaf0;
}

.mode-modal .mode-card--room {
  border-color: rgba(232, 86, 76, 0.8);
  background: #fff4f3;
}

.mode-modal .mode-card-illustration {
  display: block;
  width: min(118px, 55%);
  height: auto;
  margin: 0 auto 5px;
}

.mode-modal .mode-card-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 0;
  text-align: center;
}

.mode-modal .mode-card-title {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(2 * 1.2 * clamp(1.15rem, 1.7vw, 1.55rem));
  text-align: center;
}

.mode-modal .mode-card h3 {
  margin: 0;
  font-size: clamp(1.15rem, 1.7vw, 1.55rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.mode-modal .mode-card--solo h3 {
  color: #1e9d48;
}

.mode-modal .mode-card--multi h3 {
  color: #e39b00;
}

.mode-modal .mode-card--room h3 {
  color: #d64545;
}

.mode-modal .mode-card-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 10px;
  margin: 0 auto 10px;
  color: rgba(92, 122, 141, 0.6);
}

.mode-modal .mode-card-divider span {
  flex: 1;
  height: 2px;
  background: currentColor;
}

.mode-modal .mode-card-divider i,
.mode-modal .mode-card-divider b {
  display: block;
  width: 7px;
  height: 7px;
  margin: 0 8px;
  transform: rotate(45deg);
  background: currentColor;
}

.mode-modal .mode-card-divider b {
  width: 10px;
  height: 10px;
  margin: 0 9px;
}

.mode-modal .mode-card--solo .mode-card-divider { color: rgba(30, 157, 72, 0.6); }
.mode-modal .mode-card--multi .mode-card-divider { color: rgba(227, 155, 0, 0.7); }
.mode-modal .mode-card--room .mode-card-divider { color: rgba(214, 69, 69, 0.7); }

.mode-modal .mode-card-description {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(3 * 13px * 1.35);
  max-width: 240px;
  text-align: center;
}

.mode-modal .mode-card p {
  margin: 0 0 10px;
  color: #35434c;
  font-size: 13px;
  line-height: 1.35;
}

.mode-modal .mode-card-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  margin-top: auto;
}

@media screen and (min-width: 750px) {
  .mode-modal .mode-card-footer {
    position: absolute;
    right: 18px;
    bottom: 14px;
    left: 18px;
    width: auto;
  }
}

.mode-modal .mode-card-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  min-height: 32px;
  margin: 0 auto 10px;
  padding: 1px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1;
}

.mode-modal .mode-card-badge img {
  display: block;
  width: 18px;
  height: 18px;
}

.mode-modal .mode-card-badge--solo {
  color: #1e9d48;
  background: rgba(46, 193, 96, 0.14);
}

.mode-modal .mode-card-badge--multi {
  color: #a16900;
  background: rgba(240, 166, 0, 0.18);
}

.mode-modal .mode-card-badge--room {
  color: #c83f3f;
  background: rgba(235, 75, 75, 0.12);
}

.mode-modal .mode-card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(178px, 100%);
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, box-shadow 0.18s ease;
}

.mode-modal .mode-card-button:hover,
.mode-modal .mode-card-button:focus-visible {
  transform: translateY(-1px);
  filter: brightness(0.98);
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.12);
}

.mode-modal .mode-card-button:active {
  transform: translateY(0);
}

.mode-modal .mode-card-button img {
  display: block;
  width: 18px;
  height: 18px;
}

.mode-modal .mode-card-button--solo {
  background: linear-gradient(180deg, #2ec15e 0%, #18a34e 100%);
}

.mode-modal .mode-card-button--multi {
  background: linear-gradient(180deg, #f7c843 0%, #f3a500 100%);
}

.mode-modal .mode-card-button--room {
  background: linear-gradient(180deg, #ff5d5d 0%, #e33f3f 100%);
}

@media screen and (max-width: 1024px) {
  .mode-modal {
    padding-inline: 42px;
  }

  .mode-modal .mode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 42px;
  }

  .multi-soon-modal {
    height: auto;
    max-height: calc(100dvh - 48px);
    padding: 40px 48px;
    overflow-y: auto;
  }

  .multi-soon-notice {
    width: 100%;
  }

  .room-soon-modal {
    height: auto;
    max-height: calc(100dvh - 48px);
    padding: 40px 48px;
    overflow-y: auto;
  }

  .room-soon-notice {
    width: 100%;
  }

  .network-soon-modal {
    height: auto;
    max-height: calc(100dvh - 48px);
    padding: 40px 48px;
    overflow-y: auto;
  }

  .network-soon-notice {
    width: 100%;
  }
}

@media screen and (max-width: 749px) {
  .login-modal-overlay {
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
  }

  .login-modal-overlay .login-modal-backdrop {
    position: absolute;
    inset: 0;
  }

  .login-modal {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100vw - 32px);
    height: auto;
    min-height: 0;
    max-height: calc(100dvh - 32px);
    padding: 38px 22px 28px;
    overflow-y: auto;
    transform: none;
  }

  .mode-modal-overlay {
    position: fixed;
    z-index: 11;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
  }

  .mode-modal-backdrop {
    z-index: -1;
  }

  .mode-modal {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    max-width: 560px;
    max-height: calc(100dvh - 32px);
    padding: 18px 16px 20px;
    transform: none;
    border-radius: 20px;
    overflow-y: auto;
  }

  .mode-modal-header {
    margin-bottom: 16px;
  }

  .mode-modal .mode-modal-title-line {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
  }

  .mode-modal .mode-modal-title-main {
    font-size: 34px;
    line-height: 1;
    font-weight: 800;
  }

  .mode-modal-header h2 {
    gap: 3px;
  }

  .mode-modal .mode-modal-header p {
    max-width: 330px;
    margin-top: 10px;
    font-size: 15px;
    letter-spacing: 0;
    line-height: 1.35;
    text-transform: none;
  }

  .mode-modal-subtitle-desktop,
  .mode-card-description-desktop {
    display: none;
  }

  .mode-modal-subtitle-mobile,
  .mode-card-description-mobile {
    display: inline;
  }

  .mode-modal .mode-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .mode-modal .mode-card {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    height: auto;
    min-height: 180px;
    padding: 20px;
    border-radius: 20px;
    cursor: pointer;
  }

  .mode-modal .mode-card::after {
    align-self: center;
    color: currentColor;
    content: ">";
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
  }

  .mode-modal .mode-card--solo::after { color: #1e9d48; }
  .mode-modal .mode-card--multi::after { color: #e39b00; }
  .mode-modal .mode-card--room::after { color: #d64545; }

  .mode-modal .mode-card-illustration {
    width: 105px;
    max-width: 100%;
    margin: 0;
  }

  .mode-modal .mode-card-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    width: auto;
    min-height: 0;
    min-width: 0;
    text-align: left;
  }

  .mode-modal .mode-card-title {
    display: block;
    height: auto;
    text-align: left;
  }

  .mode-modal .mode-card h3 {
    font-family: 'Product Sans', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0;
    text-align: left;
  }

  .mode-modal .mode-card-divider,
  .mode-modal .mode-card-button {
    display: none;
  }

  .mode-modal .mode-card-description {
    display: block;
    width: auto;
    height: auto;
    max-width: none;
    margin-top: 8px;
    text-align: left;
  }

  .mode-modal .mode-card p {
    margin: 0;
    font-family: 'Product Sans', 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.35;
    text-align: left;
  }

  .mode-modal .mode-card-footer {
    display: block;
    width: auto;
    margin-top: 12px;
  }

  .mode-modal .mode-card-badge {
    min-height: 28px;
    margin: 0;
    padding: 1px 9px;
    font-size: 14px;
    font-weight: 600;
  }

  .mode-modal .mode-card-badge img {
    width: 16px;
    height: 16px;
  }

  .login-modal h2 {
    font-size: 26px;
  }

  .login-modal-actions {
    margin: 22px 0 18px;
  }

  .login-provider {
    min-height: 50px;
    font-size: 14px;
  }

  .login-modal-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    font-size: 28px;
  }

  .login-modal-privacy {
    font-size: 12px;
  }

  .multi-soon-modal {
    width: min(420px, calc(100vw - 32px));
    max-width: min(420px, calc(100vw - 32px));
    height: auto;
    padding: 34px 24px 26px;
    border-radius: 22px;
  }

  .multi-soon-icon img {
    width: 130px;
  }

  .multi-soon-header h2 {
    font-size: 32px;
  }

  .multi-soon-description {
    font-size: 15px;
  }

  .multi-soon-notice {
    width: 100%;
    height: auto;
    padding: 14px 16px;
  }

  .room-soon-modal {
    width: min(420px, calc(100vw - 32px));
    max-width: min(420px, calc(100vw - 32px));
    height: auto;
    padding: 34px 24px 26px;
    border-radius: 22px;
  }

  .room-soon-icon img {
    width: 130px;
  }

  .room-soon-header h2 {
    font-size: 32px;
  }

  .room-soon-description {
    font-size: 15px;
  }

  .room-soon-notice {
    width: 100%;
    height: auto;
    padding: 14px 16px;
  }

  .network-soon-modal {
    width: min(420px, calc(100vw - 32px));
    max-width: min(420px, calc(100vw - 32px));
    height: auto;
    padding: 34px 24px 26px;
    border-radius: 22px;
  }

  .network-soon-icon {
    width: 90px;
  }

  .network-soon-header h2 {
    font-size: 32px;
  }

  .network-soon-description {
    font-size: 15px;
  }

  .network-soon-notice {
    width: 100%;
    height: auto;
    padding: 14px 16px;
  }
}

/* ---------------------------------------------------------------- */
/* Pages secondaires (categorie, mode, classement, contributions)    */
/* ---------------------------------------------------------------- */

.back-link {
  max-width: 480px;
  margin: 0 auto;
}

.back-link a {
  color: #1e8e3e;
  font-weight: 500;
  text-decoration: none;
}

.category-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  box-sizing: border-box;
  background: rgba(17, 24, 39, 0.6);
}

.category-page-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: #f5f5f3;
}

.category-modal-open {
  overflow: hidden;
}

.category-modal-overlay[hidden] {
  display: none;
}

.category-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.60);
  padding: 32px;
}

.category-modal {
  position: relative;
  z-index: var(--z-modal);
  width: min(100%, 1200px);
  max-width: 1200px;
  padding: 40px 48px;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(17, 24, 39, 0.18);
}

.category-page-title {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.quiz-stage {
  width: min(100%, 1080px);
  margin: 0 auto;
}

.quiz-stage--active {
  padding-top: 34px;
}

.quiz-progress {
  width: min(100%, 420px);
  margin: 0 auto 28px;
}

.quiz-progress__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #111827;
  font-size: 24px;
}

.quiz-score {
  color: #9a6a36;
  font-size: 18px;
  font-weight: 700;
}

.quiz-progress__track {
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.quiz-progress__track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2f9452;
  transition: width 200ms ease-out;
}

.quiz-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  padding: 9px 18px;
  border: 1px solid #f4d58b;
  border-radius: 999px;
  background: #fffdf7;
  font-size: 18px;
  font-weight: 700;
}

.quiz-category-badge span:last-child {
  display: inline-block;
  background: var(--category-gradient, linear-gradient(90deg, #ff9a3c, #e53935));
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.quiz-category-badge[data-category='Histoire'] { --category-gradient: var(--gradient-histoire); }
.quiz-category-badge[data-category='Géographie'] { --category-gradient: var(--gradient-geographie); }
.quiz-category-badge[data-category='Politique'] { --category-gradient: var(--gradient-politique); }
.quiz-category-badge[data-category='Littérature'] { --category-gradient: var(--gradient-litterature); }
.quiz-category-badge[data-category='Tourisme'] { --category-gradient: var(--gradient-tourisme); }
.quiz-category-badge[data-category='Droit & société'] { --category-gradient: var(--gradient-droit); }
.quiz-category-badge[data-category='Aléatoire'] { --category-gradient: var(--gradient-aleatoire); }

.quiz-question {
  max-width: 760px;
  margin: 0 auto 30px;
  color: #080808;
  font-size: 36px;
  line-height: 1.12;
  text-align: center;
}

.quiz-answers {
  display: flex;
  width: min(100%, 760px);
  flex-direction: column;
  gap: 14px;
  margin: 0 auto;
}

.quiz-answers .quiz-option-btn {
  width: 100%;
  margin: 0;
}

.quiz-stage--active .timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  margin: 0 0 28px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eeeeee;
  color: #111827;
  font-size: 16px;
}

.quiz-stage--active .timer::before {
  content: '⏱';
  font-size: 20px;
}

body.quiz-mode {
  display: block;
  min-height: 100vh;
  padding: 0;
  background: #ffffff;
}

.quiz-mode .category-page-background {
  background: #ffffff;
}

.quiz-mode .category-modal {
  width: min(100% - 64px, 1056px);
  max-width: 1056px;
  min-height: 100vh;
  padding: 32px 0 42px;
  background: #ffffff;
  border-radius: 0;
  box-shadow: none;
}

.quiz-mode .category-modal .login-modal-close {
  display: none;
}

.quiz-mode .category-modal .back-link {
  top: 31px;
  left: 0;
}

.quiz-mode #menu,
.quiz-mode #categoryTitle {
  display: none;
}

.quiz-mode #quiz {
  margin-top: 48px;
  padding: 28px 52px 34px;
  border: 1px solid #dedede;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.quiz-mode .quiz-stage--active {
  padding-top: 0;
}

.quiz-mode .quiz-progress {
  width: 100%;
  margin: 0 0 58px;
}

.quiz-mode .quiz-progress__topline {
  position: relative;
  justify-content: center;
}

.quiz-mode .quiz-progress__topline strong {
  font-size: 30px;
}

.quiz-mode .quiz-score {
  position: absolute;
  right: 0;
  color: #9a6a36;
  font-size: 18px;
}

.quiz-mode .quiz-progress__track {
  width: 220px;
  margin: 8px auto 0;
}

.quiz-mode .quiz-category-badge {
  margin-bottom: 24px;
}

.quiz-mode .quiz-question {
  max-width: 680px;
  margin-bottom: 22px;
  font-size: 38px;
}

.quiz-mode .quiz-stage--active .timer {
  margin: 0 0 28px;
}

.quiz-mode .quiz-answers {
  width: min(100%, 540px);
  margin-left: 0;
}

.quiz-stage-title {
  text-align: center;
  color: #111827;
}

/* Solo quiz board */
.category-modal.is-quiz-active {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.category-modal.is-quiz-active [data-category-stage] {
  display: none;
}

.quiz-stage {
  display: flex;
  width: 100%;
  min-height: 100dvh;
  max-width: 1440px;
  margin: 0 auto;
  padding: 26px 6.5vw 84px;
  box-sizing: border-box;
  flex-direction: column;
  overflow-y: auto;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #111827;
}

.quiz-stage[hidden] {
  display: none;
}

.solo-quiz-header {
  display: grid;
  grid-template-columns: 1fr minmax(180px, 250px) 1fr;
  align-items: start;
  gap: 24px;
  width: 100%;
  min-height: 54px;
}

.solo-quiz-back,
.solo-quiz-score {
  width: fit-content;
  min-height: 46px;
  margin: 0;
  padding: 0 20px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #111827;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}

.solo-quiz-back:hover,
.solo-quiz-back:focus-visible {
  background: #f8fafc;
  color: #111827;
}

.solo-quiz-score {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: end;
  border-color: #f3c86b;
  color: #a16207;
}

.solo-quiz-progress {
  text-align: center;
  color: #ffffff;
}

.solo-quiz-progress .quiz-stage-title {
  margin: 0 0 8px;
  font-size: 27px;
  line-height: 1;
  color: #ffffff;
}

.solo-quiz-progress-track {
  width: 205px;
  height: 7px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 99px;
  background: #e5e7eb;
}

.solo-quiz-progress-track span {
  display: block;
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: #2f9958;
  transition: width 220ms ease;
}

.solo-quiz-card {
  display: flex;
  width: 100%;
  min-height: 575px;
  margin: 26px auto 0;
  padding: 26px 3.4vw 22px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid #dfe3e8;
  border-radius: 25px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.solo-quiz-category {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 17px;
  border: 1px solid #f0c15e;
  border-radius: 999px;
  background: #ffffff;
  font-size: 22px;
  font-weight: 700;
  color: #16a9d6;
}

.solo-quiz-category.category-history { border-color: #e8863b; }
.solo-quiz-category.category-geography { border-color: #54a9d8; }
.solo-quiz-category.category-food { border-color: #f3b93d; }
.solo-quiz-category.category-politics { border-color: #d66b65; }
.solo-quiz-category.category-literature { border-color: #75b84d; }
.solo-quiz-category.category-tourism { border-color: #7d9fe0; }
.solo-quiz-category.category-law { border-color: #a47d5b; }
.solo-quiz-category.category-random { border-color: #9a77d4; }

.solo-quiz-category.category-history,
.solo-quiz-category.category-geography,
.solo-quiz-category.category-food,
.solo-quiz-category.category-politics,
.solo-quiz-category.category-literature,
.solo-quiz-category.category-tourism,
.solo-quiz-category.category-law,
.solo-quiz-category.category-random { background: #ffffff; }

.solo-quiz-category.category-history .solo-quiz-category-name > span { background: linear-gradient(90deg, #ff9a3c, #d62828); }
.solo-quiz-category.category-geography .solo-quiz-category-name > span { background: linear-gradient(90deg, #34d399, #2563eb); }
.solo-quiz-category.category-food .solo-quiz-category-name > span { background: linear-gradient(90deg, #fdcb3c, #f97316); }
.solo-quiz-category.category-politics .solo-quiz-category-name > span { background: linear-gradient(90deg, #ef4444, #991b1b); }
.solo-quiz-category.category-literature .solo-quiz-category-name > span { background: linear-gradient(90deg, #10b981, #84cc16); }
.solo-quiz-category.category-tourism .solo-quiz-category-name > span { background: linear-gradient(90deg, #38bdf8, #8b5cf6); }
.solo-quiz-category.category-law .solo-quiz-category-name > span { background: linear-gradient(90deg, #475569, #b45309); }
.solo-quiz-category.category-random .solo-quiz-category-name > span { background: linear-gradient(90deg, #8b5cf6, #6d28d9); }

.solo-quiz-category-name > span {
  display: inline-block;
  color: transparent;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}


.solo-quiz-question {
  align-self: center;
  width: min(72%, 820px);
  max-width: none;
  margin: 5px auto 17px;
  color: #050505;
  font-size: clamp(27px, 2.7vw, 36px);
  font-weight: 800;
  line-height: 1.05;
  text-align: center;
}

.solo-quiz-card .quiz-image {
  display: none;
}

.solo-quiz-card .timer {
  align-self: flex-start;
  width: fit-content;
  margin: 0 0 25px 1%;
  padding: 10px 16px;
  border-radius: 999px;
  background: #eef0f2;
  color: #111827;
  font-size: 14px;
}

.solo-quiz-answers {
  display: flex;
  width: min(55%, 610px);
  margin-left: 1%;
  flex-direction: column;
  gap: 16px;
}

.solo-quiz-card .quiz-option-btn {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 5px 18px 5px 5px;
  border: 1px solid #d9dee5;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 9px 14px rgba(15, 23, 42, 0.08);
}

.solo-quiz-card .quiz-option-btn:hover {
  background: #f8fafc;
  color: #172033;
}

.solo-quiz-card .quiz-option-btn.is-correct {
  border-color: #15803d;
  background: #16833d;
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(21, 128, 61, 0.2);
}

.solo-quiz-card .quiz-option-btn.is-wrong {
  border-color: #dc2626;
  background: #dc2626;
  color: #ffffff;
}

.solo-quiz-next-placeholder {
  flex: 1;
  min-height: 35px;
}

.solo-quiz-next {
  align-self: flex-end;
  width: auto;
  margin: 0;
  padding: 12px 17px;
  border-radius: 8px;
  background: #2f9958;
  font-size: 13px;
  font-weight: 700;
}

.solo-quiz-next:hover,
.solo-result-primary:hover { background: #217b43; }

.solo-result-title {
  max-width: 680px;
  margin: 34px auto 15px;
  color: #111827;
  font-size: clamp(25px, 3vw, 37px);
  line-height: 1.12;
  text-align: center;
}

.quiz-result-mode .category-modal { position: relative; }
.quiz-mode.quiz-result-mode .category-modal .login-modal-close {
  display: flex;
  position: absolute;
  top: -16px;
  right: -16px;
  z-index: 3;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
  color: #111827;
  font-size: 31px;
}
.quiz-result-mode #quiz { margin-top: 20px; padding: 32px 52px 28px; border-radius: 28px; }
.quiz-result-mode .quiz-stage { min-height: auto; padding: 0; overflow: visible; }
.solo-result-category { align-self: flex-start; margin: 0 0 16px; }
.solo-result-heading { display: flex; width: 100%; align-items: center; justify-content: center; gap: 28px; }
.solo-result-heading > div { min-width: 0; }
.solo-result-heading .solo-result-title { margin: 0 auto 6px; font-size: 28px; font-weight: 400; white-space: nowrap; }
.solo-result-score { justify-content: center; margin: 0 auto 22px; font-size: 68px; line-height: 1; }
.solo-result-score strong { color: #d49a17; }
.solo-result-score span { align-self: flex-end; padding-bottom: 8px; color: #111827; font-size: 18px; font-weight: 400; }
.solo-result-laurel { color: #d49a17; font-size: 90px; line-height: 0.5; }
.solo-result-stats article { min-height: 92px; flex-direction: row; gap: 12px; align-items: center; text-align: left; }
.solo-result-stats article > span { flex: 0 0 38px; text-align: center; font-size: 30px; color: #111827; }
.solo-result-stats article strong { margin: 0; }
.solo-result-stats article small { display: block; }
.solo-result-primary { display: flex; min-height: 40px; align-items: center; justify-content: center; box-sizing: border-box; margin-top: 24px; border-radius: 9px; color: #ffffff; text-decoration: none; }
.solo-result-secondary { min-height: 40px; border-color: #2f9958; color: #2f9958; }
.solo-result-share-label { border-top: 0; margin-top: 18px; padding-top: 0; color: #111827; font-weight: 700; }
.solo-result-share { display: flex; justify-content: center; gap: 24px; margin: 8px auto 0; }
.solo-result-share button { display: inline-flex; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; background: #eeeeee; color: #111827; font-size: 25px; }
.solo-result-share button:first-child { background: transparent; }
.solo-result-share img { width: 48px; height: 48px; }
.solo-result-mode .solo-quiz-card { position: relative; }
.solo-result-mode .solo-quiz-card .solo-quiz-next { display: none; }
.solo-result-mode .login-modal-close { display: flex; }

.solo-result-score {
  display: flex;
  align-items: center;
  gap: 22px;
  margin: 2px auto 30px;
  color: #d49a17;
  font-size: 39px;
}

.solo-result-score strong { color: #111827; }
.solo-result-laurel { font-size: 60px; line-height: 0.5; transform: rotate(-30deg); }
.solo-result-laurel-right { transform: scaleX(-1) rotate(-30deg); }

.solo-result-stats {
  display: grid;
  width: min(80%, 720px);
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.solo-result-stats article {
  display: flex;
  min-height: 110px;
  padding: 17px;
  box-sizing: border-box;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 1px solid #e2e5e9;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 7px 16px rgba(15, 23, 42, 0.06);
  text-align: center;
}

.solo-result-stats article > span { color: #2f9958; font-size: 23px; }
.solo-result-stats strong { margin: 3px 0; font-size: 23px; }
.solo-result-stats small { color: #667085; font-size: 12px; line-height: 1.35; }
.solo-result-primary { width: min(80%, 720px); margin: 25px 0 12px; background: #2f9958; font-weight: 700; }
.solo-result-actions { display: flex; width: min(80%, 720px); gap: 12px; }
.solo-result-secondary { flex: 1; margin: 0; border: 1px solid #d1d5db; background: #ffffff; color: #111827; font-size: 14px; font-weight: 700; }
.solo-result-secondary:hover { background: #f8fafc; color: #111827; }
.solo-result-share-label { width: min(80%, 720px); margin: 25px 0 0; padding-top: 16px; border-top: 1px solid #e5e7eb; color: #667085; text-align: center; }
.solo-result-share { width: min(80%, 720px); margin-top: 10px; background: #ffffff; color: #111827; font-weight: 700; }
.solo-result-share:hover { background: #f8fafc; color: #111827; }

@media (max-width: 767px) {
  .category-modal.is-quiz-active {
    overflow-y: auto;
  }

  .quiz-stage {
    min-height: 100dvh;
    padding: 15px 16px 38px;
  }

  .solo-quiz-header {
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
  }

  .solo-quiz-back,
  .solo-quiz-score {
    min-height: 40px;
    padding: 0 11px;
    font-size: 12px;
  }

  .solo-quiz-back { white-space: nowrap; }
  .solo-quiz-back span { display: none; }
  .solo-quiz-progress .quiz-stage-title { margin-bottom: 6px; font-size: 18px; }
  .solo-quiz-progress-track { width: 100%; max-width: 130px; height: 6px; }
  .solo-quiz-card { min-height: 650px; margin-top: 18px; padding: 20px 16px 17px; border-radius: 18px; }
  .solo-quiz-category { min-height: 40px; padding: 0 13px; font-size: 16px; }
  .solo-quiz-card { align-items: center; }
  .solo-quiz-question { width: 100%; margin: 28px auto 18px; font-size: 28px; }
  .solo-quiz-card .timer { margin-bottom: 24px; }
  .solo-quiz-card .timer { align-self: flex-start; margin-left: 0; }
  .solo-quiz-answers { width: 100%; margin-left: 0; gap: 12px; }
  .solo-quiz-card .quiz-option-btn { min-height: 52px; font-size: 14px; }
  .solo-quiz-next-placeholder { min-height: 46px; }
  .solo-quiz-next { width: 100%; }
  .solo-result-title { margin-top: 30px; font-size: 26px; }
  .solo-result-score { gap: 8px; margin-bottom: 24px; font-size: 29px; }
  .solo-result-laurel { font-size: 44px; }
  .solo-result-stats { width: 100%; grid-template-columns: 1fr; gap: 10px; }
  .solo-result-stats article { min-height: 82px; }
  .solo-result-primary,
  .solo-result-actions,
  .solo-result-share-label,
  .solo-result-share { width: 100%; }
  .solo-result-actions { flex-direction: column; }
  .solo-result-secondary { min-height: 48px; }
  .quiz-result-mode #quiz { margin: 0; padding: 24px 16px; border-radius: 20px; }
  .quiz-mode.quiz-result-mode .category-modal .login-modal-close { top: -12px; right: -8px; width: 46px; height: 46px; font-size: 25px; }
  .solo-result-heading { gap: 4px; }
  .solo-result-heading .solo-result-title { font-size: 21px; white-space: normal; }
  .solo-result-score { font-size: 52px; }
  .solo-result-laurel { font-size: 52px; }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.category-modal .back-link {
  display: block;
  position: absolute;
  left: 44px;
  top: 28px;
  margin: 0;
  z-index: 2;
}

.category-modal .back-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #c9c8c5;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
  color: #1f2937;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.category-card:focus-visible {
  outline: 3px solid #f0b51b;
  outline-offset: 3px;
}

.category-modal-header {
  max-width: 760px;
  margin-bottom: 24px;
}

.category-modal-header h2 {
  margin: 0 0 10px;
  color: #111827;
  font-size: 36px;
  line-height: 1.2;
  text-align: left;
  font-weight: 700;
}

.category-modal-header p {
  margin: 0;
  color: #64748b;
  font-size: 18px;
  line-height: 1.5;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.category-card {
  position: relative;
  min-height: 150px;
  overflow: hidden;
  padding: 20px;
  margin: 0;
  border: 1px solid #d1d5db;
  border-radius: 16px;
  background: #080a09;
  cursor: pointer;
  transition: transform 200ms ease-out, border-color 200ms ease-out, box-shadow 200ms ease-out;
}

.category-card::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(0, 0, 0, 0.48);
  transition: background 200ms ease-out;
}

.category-card__asset {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}

.category-card__label {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: 110px;
  place-items: center;
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.category-card:hover,
.category-card:focus-visible,
.category-card.is-selected {
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.1);
}

.category-card:hover::after,
.category-card:focus-visible::after,
.category-card.is-selected::after {
  background: rgba(22, 163, 74, 0.68);
}

@media screen and (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .category-page {
    padding: 20px;
  }

  .category-modal-overlay {
    padding: 12px;
  }

  .category-modal {
    width: calc(100% - 24px);
    max-width: 520px;
    max-height: calc(100dvh - 24px);
    margin: 12px auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 20px;
    border-radius: 20px;
  }

  .category-modal [data-category-stage] {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
  }

  .category-modal .login-modal-close {
    top: 8px;
    right: 8px;
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .category-modal-header {
    margin-bottom: 0;
    padding: 0 44px 16px 0;
  }

  .category-modal-header h2 {
    font-family: 'Product Sans', 'Segoe UI', sans-serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
  }

  .category-modal-header p {
    font-size: 14px;
    line-height: 1.35;
  }

  .category-modal__scroll {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 4px 8px 0;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af transparent;
    -webkit-overflow-scrolling: touch;
  }

  .category-modal__scroll::-webkit-scrollbar {
    width: 6px;
  }

  .category-modal__scroll::-webkit-scrollbar-track {
    background: transparent;
  }

  .category-modal__scroll::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 999px;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-card {
    width: 100%;
    min-height: 110px;
    height: 110px;
    padding: 12px;
    border-radius: 14px;
    box-sizing: border-box;
  }

  .category-card__label {
    min-height: 0;
    font-family: 'Product Sans', 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.1;
  }

  .category-card:active {
    border-color: #16a34a;
    transform: scale(0.98);
  }
}

@media (max-width: 480px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.mode-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (max-width: 767px) {
  .quiz-mode .category-modal {
    width: 100%;
    padding: 20px 16px 28px;
  }

  .quiz-mode .category-modal .back-link {
    top: 20px;
    left: 16px;
  }

  .quiz-mode #quiz {
    margin-top: 76px;
    padding: 22px 16px 28px;
    border-radius: 22px;
  }

  .quiz-mode .quiz-progress {
    margin-bottom: 34px;
  }

  .quiz-mode .quiz-progress__topline {
    display: block;
    text-align: center;
  }

  .quiz-mode .quiz-progress__topline strong {
    font-size: 22px;
  }

  .quiz-mode .quiz-score {
    position: static;
    display: block;
    margin-top: 6px;
    font-size: 16px;
  }

  .quiz-mode .quiz-progress__track {
    width: 180px;
  }

  .quiz-mode .quiz-category-badge {
    margin-bottom: 24px;
    font-size: 16px;
  }

  .quiz-mode .quiz-question {
    font-size: 28px;
    line-height: 1.16;
  }

  .quiz-mode .quiz-answers {
    width: 100%;
  }
}

.mode-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 16px 18px;
  background: #ffffff;
  transition: box-shadow 0.15s ease-in-out;
}

.mode-card:hover,
.mode-card:focus-visible {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Quiz Solo: surface dedicated to the question mockup. */
body.solo-quiz-active {
  overflow: hidden;
}

body.solo-quiz-active .category-modal-overlay {
  z-index: 40;
  align-items: flex-start;
  padding: 0;
}

body.solo-quiz-active .category-modal {
  width: 100%;
  max-width: none;
  height: 100vh;
  min-height: 100vh;
  padding: 0 32px 38px;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.solo-quiz-active [data-category-close] {
  display: none;
}

body.solo-quiz-active [data-category-stage] {
  display: none;
}

body.solo-quiz-active [data-quiz-stage] {
  display: block;
  width: min(100%, 1056px);
  min-height: 100vh;
  margin: 0 auto;
}

.solo-quiz-topbar {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: start;
  width: min(100%, 1056px);
  min-height: 113px;
  margin: 0 auto;
  padding-top: 27px;
  box-sizing: border-box;
}

.solo-quiz-back {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #d7d7d7;
  border-radius: 999px;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}

.solo-quiz-back:hover,
.solo-quiz-back:focus-visible {
  background: #f8fafc;
}

.solo-quiz-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
}

.solo-quiz-progress strong {
  font-size: 30px;
  line-height: 1.1;
}

.solo-quiz-progress-track {
  display: block;
  width: 222px;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e6e6e6;
}

.solo-quiz-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #2f9452;
  transition: width 180ms ease-out;
}

.solo-quiz-score {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid #f2d58d;
  border-radius: 999px;
  color: #a87949;
  font-size: 18px;
  font-weight: 700;
}

.solo-quiz-score span {
  font-size: 21px;
}

.solo-quiz-card {
  position: relative;
  width: 118%;
  margin-inline: -9%;
  min-height: 626px;
  padding: 28px 42px 34px;
  border: 1px solid #dedede;
  border-radius: 28px;
  box-sizing: border-box;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.solo-quiz-card #soloQuiz {
  position: relative;
  width: 100%;
  min-height: 555px;
}

.solo-quiz-content {
  width: 100%;
  margin: 0;
}

.solo-quiz-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  margin: 0 auto 26px;
  padding: 0 18px;
  border: 1px solid #f3d891;
  border-radius: 999px;
  background: #fffdf8;
  font-size: 25px;
}

.solo-quiz-category strong {
  background: var(--category-gradient, var(--gradient-histoire));
  background-clip: text;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.solo-quiz-category[data-category='Histoire'] { --category-gradient: var(--gradient-histoire); }
.solo-quiz-category[data-category='Géographie'] { --category-gradient: var(--gradient-geographie); }
.solo-quiz-category[data-category='Politique'] { --category-gradient: var(--gradient-politique); }
.solo-quiz-category[data-category='Littérature'] { --category-gradient: var(--gradient-litterature); }
.solo-quiz-category[data-category='Tourisme'] { --category-gradient: var(--gradient-tourisme); }
.solo-quiz-category[data-category='Droit & société'] { --category-gradient: var(--gradient-droit); }
.solo-quiz-category[data-category='Aléatoire'] { --category-gradient: var(--gradient-aleatoire); }

.solo-quiz-question {
  width: min(74%, 600px);
  margin: 0 auto 20px;
  color: #050505;
  font-size: 30px;
  line-height: 1.08;
  text-align: center;
}

.solo-quiz-card #soloTimer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 8px 14px;
  border-radius: 999px;
  background: #eeeeee;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
}

.solo-quiz-card #soloTimer::before {
  content: '⏱';
  font-size: 20px;
}

.solo-quiz-answers {
  display: flex;
  width: min(74%, 600px);
  flex-direction: column;
  gap: 28px;
  margin: 0;
}

.solo-quiz-answers .quiz-option-btn {
  width: 100%;
  min-height: 54px;
  margin: 0;
  padding: 8px 20px 8px 12px;
  border: 1px solid #dfe3e8;
  border-radius: 999px;
  background: #ffffff;
  color: #172033;
  box-shadow: 0 9px 14px rgba(15, 23, 42, 0.1);
  font-size: 16px;
}

.solo-quiz-answers .quiz-option-btn:hover {
  background: #ffffff;
}

.solo-quiz-answers .quiz-option-btn.is-correct {
  border-color: #098f42;
  background: #079b46;
  color: #ffffff;
}

.solo-quiz-answers .quiz-option-btn.is-wrong {
  border-color: #b91c1c;
  background: #dc2626;
  color: #ffffff;
}

.solo-quiz-answers .quiz-option-btn.is-correct .quiz-option-index,
.solo-quiz-answers .quiz-option-btn.is-wrong .quiz-option-index {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.solo-quiz-next {
  position: absolute;
  right: 34px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: auto;
  min-height: 44px;
  margin: 0;
  padding: 0 17px;
  border-radius: 9px;
  background: #2f9452;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
}

.solo-quiz-next:hover,
.solo-quiz-next:focus-visible {
  background: #267f45;
}

@media (max-width: 767px) {
  body.solo-quiz-active {
    overflow: auto;
  }

  body.solo-quiz-active .category-modal {
    padding: 0 16px 24px;
  }

  body.solo-quiz-active [data-quiz-stage] {
    width: 100%;
  }

  .solo-quiz-topbar {
    grid-template-columns: auto 1fr;
    gap: 12px;
    min-height: 118px;
    padding-top: 18px;
  }

  .solo-quiz-back {
    min-height: 42px;
    padding: 0 15px;
    font-size: 14px;
  }

  .solo-quiz-progress {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .solo-quiz-progress strong {
    font-size: 23px;
  }

  .solo-quiz-score {
    min-height: 42px;
    padding: 0 14px;
    font-size: 14px;
  }

  .solo-quiz-card {
    width: 100%;
    margin-inline: 0;
    min-height: calc(100vh - 142px);
    padding: 22px 16px 78px;
    border-radius: 22px;
  }

  .solo-quiz-card #soloQuiz {
    min-height: calc(100vh - 222px);
  }

  .solo-quiz-category {
    min-height: 42px;
    font-size: 18px;
  }

  .solo-quiz-content {
    width: 100%;
  }

  .solo-quiz-question {
    font-size: 28px;
    line-height: 1.14;
  }

  .solo-quiz-answers {
    width: 100%;
  }

  .solo-quiz-next {
    right: 16px;
    bottom: 20px;
  }
}

/* Écran de résultat du quiz solo : modale blanche compacte centrée sur overlay sombre. */
body.solo-result-mode .solo-quiz-topbar {
  display: none;
}

body.solo-result-mode .category-modal-overlay {
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.72);
}

body.solo-result-mode .category-modal {
  position: relative;
  width: min(1110px, calc(100vw - 64px));
  height: auto;
  min-height: 0;
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

body.solo-result-mode .category-modal.is-quiz-active {
  overflow: visible;
}

body.solo-result-mode .solo-quiz-card {
  overflow: visible;
}

body.solo-result-mode .solo-quiz-card #soloQuiz {
  min-height: 0;
}

@media (min-width: 751px) {
  body.solo-result-mode .category-modal {
    width: min(1110px, calc(100vw - 64px));
    max-height: calc(100vh - 48px);
  }

  body.solo-result-mode .solo-result-stats,
  body.solo-result-mode .solo-result-primary,
  body.solo-result-mode .solo-result-actions,
  body.solo-result-mode .solo-result-share-label,
  body.solo-result-mode .solo-result-share {
    width: min(82%, 840px);
  }
}

body.solo-result-mode [data-quiz-stage] {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 26px 6.5vw 12px;
}

body.solo-result-mode .solo-quiz-card {
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 34px 34px 28px;
  border: 0;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: none;
}

body.solo-result-mode [data-category-close] {
  display: flex;
  position: absolute;
  top: -18px;
  right: -18px;
  z-index: 20;
  width: 52px;
  height: 52px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
  color: #111827;
  font-size: 28px;
  line-height: 1;
  overflow: visible;
  clip-path: inset(0 round 50%);
}

body.solo-result-mode .solo-result-category strong {
  background: var(--category-gradient, var(--gradient-histoire));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

body.solo-result-mode .solo-result-laurel {
  align-self: center;
  width: 76px;
  height: 76px;
  object-fit: contain;
  transform: none;
}

body.solo-result-mode .solo-result-laurel-right {
  transform: none;
}

body.solo-result-mode .solo-result-score {
  gap: 14px;
  font-size: 56px;
}

body.solo-result-mode .solo-result-score strong {
  color: #d49a17;
  font-size: 1em;
}

body.solo-result-mode .solo-result-score span {
  color: #111827;
  font-size: 18px;
  font-weight: 700;
}

body.solo-result-mode .solo-result-stats {
  width: 100%;
}

body.solo-result-mode .solo-result-stats article {
  display: flex;
  flex-direction: row;
  min-height: 84px;
  padding: 14px 16px;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  text-align: left;
  box-shadow: none;
}

body.solo-result-mode .solo-result-stats article img {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  object-fit: contain;
}

body.solo-result-mode .solo-result-stats strong {
  margin: 0;
  font-size: 20px;
}

body.solo-result-mode .solo-result-stats small {
  font-size: 12px;
  line-height: 1.3;
}

body.solo-result-mode .solo-result-primary {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #2f9958;
  border-radius: 12px;
  font-weight: 700;
}

body.solo-result-mode .solo-result-primary img {
  width: 20px;
  height: 20px;
  filter: brightness(0) invert(1);
}

body.solo-result-mode .solo-result-actions {
  display: flex;
  width: 100%;
  gap: 12px;
}

body.solo-result-mode .solo-result-secondary {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  background: #ffffff;
  box-sizing: border-box;
  color: #111827;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

body.solo-result-mode .solo-result-secondary img {
  display: block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  object-fit: contain;
}

body.solo-result-mode .solo-result-secondary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

body.solo-result-mode .solo-result-share-label {
  width: 100%;
}

body.solo-result-mode .solo-result-share {
  width: 100%;
  gap: 22px;
  background: transparent;
}

body.solo-result-mode .solo-result-share button {
  width: auto;
  height: auto;
  padding: 0;
  background: transparent;
}

body.solo-result-mode .solo-result-share img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

@media (max-width: 767px) {
  body.solo-result-mode .category-modal {
    width: min(94vw, 480px);
    max-height: 94vh;
  }

  body.solo-result-mode .solo-quiz-card {
    padding: 0;
  }

  body.solo-result-mode .solo-result-content-panel {
    width: calc(100% - 18px);
    margin-top: 12px;
    padding: 20px 16px 18px;
  }

  body.solo-result-mode [data-category-close] {
    top: -14px;
    right: -10px;
    width: 44px;
    height: 44px;
    font-size: 22px;
  }

  body.solo-result-mode .solo-result-heading {
    gap: 10px;
  }

  body.solo-result-mode .solo-result-laurel {
    width: 36px;
    height: 36px;
  }

  body.solo-result-mode .solo-result-score {
    font-size: 34px;
  }

  body.solo-result-mode .solo-result-stats {
    grid-template-columns: 1fr;
  }

  body.solo-result-mode .solo-result-actions {
    flex-direction: column;
  }

  body.solo-result-mode .solo-result-secondary {
    min-height: 48px;
  }
}

.mode-card h2 {
  margin: 0 0 4px;
  text-align: left;
  font-size: 20px;
}

.mode-card p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

.mode-card--disabled {
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}

.mode-card-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #a8720a;
  background: #fef1d6;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ==========================================================================
   Profil joueur
   ========================================================================== */
.profile-modal-open {
  overflow: hidden;
}

.profile-modal-overlay[hidden] {
  display: none;
}

.profile-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
}

.profile-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(0, 0, 0, 0.68);
}

.profile-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 10;
  width: min(1180px, calc(100vw - 56px));
  max-height: calc(100vh - 40px);
  padding: 28px 28px 28px;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  background: #ffffff;
  color: #1a1a1a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  overflow: visible;
}

.profile-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.profile-identity {
  min-height: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 34px 20px 24px;
  border: 1px solid #e1e4e2;
  border-radius: 18px;
  background: #ffffff;
  text-align: center;
}

.profile-avatar {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
}

.profile-name {
  margin: 0;
  font-size: 24px;
  color: #092033;
  font-weight: 700;
  word-break: break-word;
}

.profile-stats {
  display: grid;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.profile-stat {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  min-height: 54px;
  padding: 8px 14px;
  border: 1px solid #dfe3e1;
  border-radius: 13px;
  background: #ffffff;
}

.profile-stat-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  object-fit: contain;
}

.profile-stat-copy {
  display: grid;
  gap: 1px;
  text-align: left;
}

.profile-stat dt {
  font-size: 14px;
  color: #5b6b60;
}

.profile-stat dd {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #14a84d;
}

.profile-logout {
  width: 100%;
  min-height: 44px;
  border: 1px solid #e0c3c3;
  border-radius: 999px;
  background: #ffffff;
  color: #cc4e4d;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.18s ease-in-out, color 0.18s ease-in-out;
}

.profile-logout:hover,
.profile-logout:focus-visible {
  background: #cc4e4d;
  color: #ffffff;
}

.profile-content {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: stretch;
}

.profile-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #dfe3e1;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(14, 35, 26, 0.06);
}

.profile-panel h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.profile-panel-rule {
  height: 1px;
  margin: 12px 0 24px;
  background: #d5d8d6;
}

.profile-games,
.profile-badges {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.profile-game {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #edf0ee;
  border-radius: 0;
  background: #ffffff;
}

.profile-game:last-child {
  border-bottom: 0;
}

.profile-game-icon {
  display: grid;
  flex: 0 0 54px;
  width: 54px;
  height: 50px;
  place-items: center;
  border: 1px solid #e0e3e1;
  border-radius: 10px;
  background: #ffffff;
  font-size: 27px;
}

.profile-game-main {
  flex: 1;
  min-width: 0;
}

.profile-game-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  font-size: 11px;
  color: #5b6b60;
}

.profile-game-category {
  display: block;
  margin: 3px 0 0;
  font-size: 16px;
  font-weight: 700;
}

.profile-game-date {
  display: block;
  margin: 2px 0 0;
  font-size: 11px;
  color: #5b6b60;
}

.profile-game-xp {
  color: #14a84d;
  font-weight: 500;
}

.profile-game-replay {
  flex: 0 0 120px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: #14a84d;
  color: #ffffff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.18s ease-in-out, background-color 0.18s ease-in-out;
}

.profile-game-replay:hover,
.profile-game-replay:focus-visible {
  background: #0f8b3f;
  transform: translateY(-1px);
}

.profile-badges {
  grid-template-columns: 1fr;
  gap: 22px;
}

.profile-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  border: 0;
  background: transparent;
}

.profile-badge-icon {
  width: 72px;
  height: 72px;
  flex: 0 0 auto;
  object-fit: contain;
}

.profile-badge.is-locked .profile-badge-icon {
  opacity: 0.07;
}

.profile-badge.is-earned .profile-badge-icon {
  opacity: 1;
}

.profile-badge-name {
  display: block;
  font-size: 16px;
  font-weight: 700;
}

.profile-badge-condition,
.profile-badge-date {
  display: block;
  font-size: 13px;
  color: #5b6b60;
}

.profile-empty {
  margin: 0;
  font-size: 14px;
  color: #5b6b60;
}

@media screen and (min-width: 751px) {
  .profile-layout {
    align-items: stretch;
  }

  .profile-badges {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 34px;
    row-gap: 36px;
    align-items: start;
  }

  .profile-badge {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    justify-items: start;
    gap: 12px;
  }

  .profile-badge-icon {
    width: 140px;
    height: 116px;
    object-fit: contain;
  }

  .profile-badge > div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-badge-name {
    display: none;
  }

  .profile-badge-date {
    order: 1;
  }

  .profile-badge-condition {
    order: 2;
  }

  .profile-badge-condition,
  .profile-badge-date {
    color: #111111;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
  }

  .profile-badge-date {
    font-weight: 400;
  }
}

@media screen and (max-width: 749px) {
  .profile-modal {
    width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    padding: 28px 18px 22px;
    border-radius: 22px;
    overflow-y: auto;
  }

  .profile-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .profile-identity {
    min-height: auto;
  }

  .profile-content {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-avatar {
    width: 96px;
    height: 96px;
  }

  .profile-game {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-game-replay {
    width: 120px;
  }

  .profile-badges {
    grid-template-columns: minmax(0, 1fr);
  }
}
