/* ===============================
   RESET & BASE
================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f7f7f7;
  color: #2b2b2b;
}

/* ===============================
   DESKTOP / MOBILE SWITCH
================================ */
.page-mobile { display: none; }
.page-desktop { display: block; }
.m-nav { display: none; }
.m-menu { display: none; }

/* ===============================
   NAVBAR DESKTOP
================================ */
.d-nav {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  padding: 0 2rem;
  height: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.d-logo { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.d-logo-icon { font-size: 22px; }
.d-nav-right { display: flex; align-items: center; gap: 4px; }
.d-nav-right a {
  margin-left: 8px; text-decoration: none; color: #2b2b2b; font-size: 14px; padding: 4px 6px;
}
.d-nav-right a:hover, .d-nav-right a.d-nav-active { color: #8b1e1e; font-weight: 600; }
.d-nav-oignons {
  background: #fff5e6; color: #8b1e1e; border-radius: 20px;
  padding: 4px 10px; font-size: 13px; font-weight: 600; margin-left: 10px;
}
.d-avatar {
  width: 32px; height: 32px; background: #8b1e1e; color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; text-decoration: none; margin-left: 8px;
}
.d-nav-logout { color: #999 !important; font-size: 13px !important; }

/* ===============================
   FLASH MESSAGES
================================ */
.flash {
  width: 80%; margin: 15px auto; padding: 12px;
  border-radius: 10px; text-align: center; font-weight: bold;
}
.flash.success { background: #e6f7ec; color: green; border: 1px solid #b7e4c7; }
.flash.error { background: #fdeaea; color: red; border: 1px solid #f5c2c2; }

/* ===============================
   COMPOSANTS COMMUNS
================================ */
.card {
  background: white; padding: 20px; border-radius: 12px;
  border: 1px solid #eee; margin-bottom: 0;
}
.card-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: #999; text-transform: uppercase; margin-bottom: 4px;
}
.btn-primary {
  background: #8b1e1e; color: white; border: none;
  border-radius: 10px; padding: 12px 20px; font-size: 15px;
  font-weight: 600; cursor: pointer;
}
.btn-primary:hover { background: #6e1717; }
.btn-outline {
  display: inline-block; border: 1px solid #ddd; border-radius: 8px;
  padding: 8px 16px; font-size: 13px; text-decoration: none; color: #444;
  margin-top: 10px;
}
.btn-outline:hover { background: #f5f5f5; }

input {
  padding: 10px 12px; border-radius: 8px; border: 1px solid #ddd;
  width: 100%; font-size: 14px;
}
input:focus { border-color: #8b1e1e; outline: none; }
button { cursor: pointer; }

/* PROGRESS BAR */
.game-progress-bar {
  flex: 1; height: 6px; background: #eee; border-radius: 4px; overflow: hidden;
}
.game-progress-fill { height: 100%; background: #8b1e1e; border-radius: 4px; }

/* ANSWERS */
.answer {
  padding: 12px 16px; border-radius: 10px; border: 1px solid #ddd;
  cursor: pointer; display: flex; align-items: center; gap: 12px;
  background: white; font-size: 15px;
}
.answer:hover { background: #fff5f5; border-color: #8b1e1e; }
.answer.selected { background: #fff5f5; border-color: #8b1e1e; }
.answer.correct { background: #e6f7ec; border-color: green; }
.answer.wrong { background: #fdeaea; border-color: red; }
.answer-letter {
  width: 26px; height: 26px; border-radius: 50%; background: #f0f0f0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}

/* BADGE VOUS */
.badge-vous {
  background: #fff5e6; color: #8b1e1e; font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px; border: 1px solid #f5c2a0;
}
.badge-dispo {
  background: #e6f7ec; color: green; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}

/* WARNING BOX */
.warning-box {
  background: #fffbf0; border: 1px solid #fde68a;
  border-radius: 10px; padding: 14px; margin-top: 12px;
  line-height: 2; font-size: 14px;
}

/* ===============================
   AUTH PAGE
================================ */
.auth-container { display: flex; min-height: calc(100vh - 60px); }
.auth-left {
  flex: 1; background: #8b1e1e; color: white; padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-left::after {
  content: ""; position: absolute; bottom: -30px; right: -30px;
  width: 180px; height: 180px; background: rgba(255,255,255,0.07); border-radius: 50%;
}
.auth-left h1 { font-size: 32px; margin-bottom: 16px; line-height: 1.3; }
.auth-left > p { opacity: 0.9; margin-bottom: 28px; line-height: 1.6; }
.auth-left ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.auth-left li { display: flex; align-items: center; gap: 10px; font-size: 14px; opacity: 0.9; }
.icon-circle {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,0.15); display: flex; align-items: center;
  justify-content: center; flex-shrink: 0;
}
.auth-right {
  flex: 1; background: #f7f7f7; display: flex;
  justify-content: center; align-items: center; padding: 40px 24px;
}
.auth-box {
  background: white; padding: 30px; border-radius: 16px;
  width: 100%; max-width: 360px; box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}
.auth-box h2 { font-size: 20px; margin-bottom: 4px; color: #111; }
.auth-sub { font-size: 13px; color: #888; margin-bottom: 16px; }
.tabs {
  display: flex; background: #f0f0f0; border-radius: 10px;
  padding: 4px; margin-bottom: 22px;
}
.tabs a {
  flex: 1; text-align: center; padding: 8px; text-decoration: none;
  color: #666; border-radius: 8px; font-size: 14px;
}
.tabs a.active { background: white; color: #111; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.forgot { text-align: right; font-size: 12px; margin-bottom: 14px; margin-top: -4px; }
.forgot a { color: #8b1e1e; text-decoration: none; }
.auth-link { text-align: center; margin-top: 12px; font-size: 13px; color: #888; }
.auth-link a { color: #8b1e1e; text-decoration: none; font-weight: 600; }
form { display: flex; flex-direction: column; gap: 10px; }

/* AUTH MOBILE (hidden by default) */
.auth-mobile { display: none; }
.auth-mobile-form { width: 100%; max-width: 420px; display: flex; flex-direction: column; }
.auth-mobile-topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 4px 12px; font-size: 15px; font-weight: 600; color: #2b2b2b;
}
.auth-mobile-back { font-size: 22px; text-decoration: none; color: #2b2b2b; line-height: 1; }
.auth-mobile-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 15px; }
.auth-mobile-brand .auth-mobile-logo { width:32px;height:32px;border-radius:8px;font-size:16px;margin-bottom:0;box-shadow:none; }
.brand-red { color: #8b1e1e; }
.auth-mobile-card h2 { font-size: 20px; font-weight: 700; color: #1a1a1a; margin-bottom: 4px; }
.auth-mobile-sub { font-size: 13px; color: #999; margin-bottom: 20px; }
.auth-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.auth-field label { font-size: 13px; font-weight: 500; color: #555; }
.auth-field small { font-size: 12px; color: #aaa; margin-top: 2px; }
.auth-field input { margin-bottom: 0; }

/* ===============================
   HOME PAGE
================================ */
.home-container { max-width: 1200px; margin: 0 auto; padding: 24px 32px; }

.home-hero {
  background: #8b1e1e; color: white; border-radius: 16px;
  padding: 48px 48px; margin-bottom: 24px;
  display: flex; justify-content: space-between; align-items: center;
  position: relative; overflow: hidden;
}
.home-hero-content { max-width: 500px; }
.home-hero h1 { font-size: 28px; line-height: 1.3; margin-bottom: 16px; }
.home-hero h1 span { color: #f5c842; }
.home-hero p { opacity: 0.88; line-height: 1.7; margin-bottom: 24px; font-size: 15px; }
.home-hero-deco {
  font-size: 140px; opacity: 0.15; position: absolute;
  right: 40px; bottom: -20px; line-height: 1;
}
.home-hero-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-hero-play {
  background: white; color: #8b1e1e; border: none; border-radius: 10px;
  padding: 12px 22px; font-size: 15px; font-weight: 700; text-decoration: none;
  display: inline-block;
}
.btn-hero-play:hover { background: #f5f5f5; }
.btn-hero-train {
  background: transparent; color: white; border: 1px solid rgba(255,255,255,0.4);
  border-radius: 10px; padding: 12px 22px; font-size: 15px; text-decoration: none;
  display: inline-block;
}
.btn-hero-train:hover { background: rgba(255,255,255,0.1); }

.home-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 16px; margin-bottom: 24px;
}
.home-stat-card {
  background: white; border-radius: 12px; border: 1px solid #eee;
  padding: 20px; text-align: center;
}
.home-stat-val { font-size: 26px; font-weight: 700; color: #1a1a1a; }
.home-stat-label { font-size: 13px; color: #999; margin-top: 4px; }

.home-bottom { display: grid; grid-template-columns: 1fr 380px; gap: 20px; }
.jokers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.joker-card {
  border: 1px solid #eee; border-radius: 10px; padding: 14px;
  display: flex; gap: 12px; align-items: flex-start;
}
.joker-icon { font-size: 24px; }
.joker-card p { font-size: 13px; color: #777; margin-top: 4px; }

.top3-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.top3-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border-radius: 10px; border: 1px solid #f0f0f0;
}
.top3-first { background: #fffbf0; border-color: #fde68a; }
.top3-rank { font-size: 15px; font-weight: 700; color: #999; width: 20px; }
.top3-first .top3-rank { color: #b45309; }
.top3-avatar {
  width: 34px; height: 34px; border-radius: 50%; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.top3-name { flex: 1; font-size: 15px; font-weight: 500; }
.top3-score { font-size: 14px; font-weight: 700; color: #b45309; }
.top3-link {
  display: block; text-align: right; margin-top: 14px;
  color: #8b1e1e; text-decoration: none; font-size: 13px; font-weight: 600;
}

/* ===============================
   GAME PAGE
================================ */
.game-layout {
  display: grid; grid-template-columns: 180px 1fr 260px;
  gap: 0; min-height: calc(100vh - 60px);
}
.game-scale {
  background: white; border-right: 1px solid #eee;
  padding: 24px 16px; display: flex; flex-direction: column; gap: 6px;
}
.game-scale-title { font-size: 10px; font-weight: 700; color: #bbb; letter-spacing: 0.1em; margin-bottom: 8px; }
.scale-row {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px; font-size: 13px; color: #999;
}
.scale-current {
  background: #fff5f5; color: #8b1e1e; font-weight: 700; border-radius: 8px;
}
.scale-dot { font-size: 10px; width: 12px; text-align: center; }
.scale-q { width: 28px; font-size: 12px; font-weight: 600; }
.scale-pts { font-size: 12px; }

.game-center { padding: 32px 40px; background: #f9f9f9; }
.game-progress-bar-wrap {
  display: flex; align-items: center; gap: 12px; margin-bottom: 24px;
  font-size: 13px; color: #999;
}
.game-progress-num { color: #8b1e1e; font-weight: 600; white-space: nowrap; }
.game-progress-label { white-space: nowrap; }

.game-question-card {
  background: white; border-radius: 12px; border: 1px solid #eee;
  padding: 28px; margin-bottom: 20px;
}
.game-q-num { font-size: 11px; font-weight: 700; color: #8b1e1e; letter-spacing: 0.1em; margin-bottom: 12px; }
.game-q-text { font-size: 18px; line-height: 1.6; color: #1a1a1a; }

.game-answers { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.game-answer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.game-actions { display: flex; gap: 10px; justify-content: center; }
.btn-joker {
  background: white; border: 1px solid #ddd; border-radius: 10px;
  padding: 10px 20px; font-size: 14px; font-weight: 500;
}
.btn-joker:hover { background: #f5f5f5; border-color: #8b1e1e; }

.game-sidebar {
  background: white; border-left: 1px solid #eee; padding: 24px 16px;
}
.sidebar-section-title { font-size: 10px; font-weight: 700; color: #bbb; letter-spacing: 0.1em; margin-bottom: 10px; }
.sidebar-joker {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border: 1px solid #eee; border-radius: 10px; margin-bottom: 8px;
}
.sidebar-joker-icon { font-size: 22px; }
.sidebar-joker-info { flex: 1; }
.sidebar-joker-info strong { font-size: 13px; display: block; }
.sidebar-joker-info p { font-size: 11px; color: #999; margin-top: 2px; }

.sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sidebar-stat {
  background: #f9f9f9; border-radius: 8px; padding: 10px;
  display: flex; flex-direction: column; align-items: center;
}
.stat-val { font-size: 18px; font-weight: 700; color: #1a1a1a; }
.stat-lbl { font-size: 11px; color: #999; margin-top: 2px; }

.vote-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.vote-letter { width: 16px; font-weight: 700; color: #666; }
.vote-bar-wrap { flex: 1; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; }
.vote-bar { height: 100%; background: #8b1e1e; border-radius: 3px; }
.vote-pct { width: 32px; text-align: right; font-size: 12px; color: #777; }

/* ===============================
   RANKING PAGE
================================ */
.ranking-container { max-width: 1100px; margin: 0 auto; padding: 24px 32px; display: grid; grid-template-columns: 1fr 340px; gap: 20px; }
.ranking-main { padding: 0; overflow: hidden; }
.ranking-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; }
.ranking-tabs { display: flex; gap: 6px; }
.ranking-tab { font-size: 13px; padding: 6px 14px; border-radius: 20px; cursor: pointer; color: #777; border: 1px solid #eee; }
.ranking-tab.active { background: #8b1e1e; color: white; border-color: #8b1e1e; }
.ranking-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 20px; border-bottom: 1px solid #f8f8f8;
}
.ranking-row:last-child { border-bottom: none; }
.ranking-me { background: #fff5f5; }
.ranking-rank { width: 20px; font-size: 14px; font-weight: 700; color: #bbb; }
.ranking-avatar {
  width: 36px; height: 36px; border-radius: 50%; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.ranking-name { flex: 1; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.ranking-score { font-size: 14px; font-weight: 700; color: #b45309; }

.podium { display: flex; align-items: flex-end; justify-content: center; gap: 8px; padding: 20px 0 0; }
.podium-player { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.podium-avatar {
  width: 44px; height: 44px; border-radius: 50%; color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}
.podium-name { font-size: 12px; font-weight: 600; text-align: center; }
.podium-score { font-size: 11px; color: #b45309; }
.podium-block {
  width: 70px; display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white; border-radius: 6px 6px 0 0;
}
.p1 { background: #c9a000; height: 64px; }
.p2 { background: #9aa0a6; height: 48px; }
.p3 { background: #b46d3a; height: 40px; }

.my-position {
  display: flex; align-items: center; gap: 12px; margin-top: 10px;
}
.my-pos-rank { font-size: 20px; font-weight: 700; color: #8b1e1e; width: 24px; }

/* ===============================
   PROFILE PAGE
================================ */
.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 20px; max-width: 1100px; margin: 0 auto; padding: 24px 32px; }
.profile-card { text-align: center; padding: 28px; }
.profile-avatar-lg {
  width: 80px; height: 80px; background: #8b1e1e; color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; margin: 0 auto 14px;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-since { font-size: 13px; color: #999; margin-top: 4px; }

.profile-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.profile-stat {
  background: #f9f9f9; border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; align-items: center;
}
.profile-stat-val { font-size: 22px; font-weight: 700; color: #1a1a1a; }
.profile-stat-lbl { font-size: 12px; color: #999; margin-top: 3px; }

.trophees-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.trophee {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 14px 8px; border-radius: 10px; border: 1px solid #eee; text-align: center;
}
.trophee span { font-size: 28px; }
.trophee small { font-size: 11px; color: #777; }
.trophee.earned { background: white; }
.trophee.locked { background: #f9f9f9; opacity: 0.45; }

.history-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid #f5f5f5;
}
.history-row:last-child { border-bottom: none; }
.history-badge {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.history-win .history-badge { background: #e6f7ec; color: green; }
.history-lose .history-badge { background: #fdeaea; color: red; }
.history-info { flex: 1; }
.history-info strong { font-size: 14px; display: block; }
.history-info small { font-size: 12px; color: #999; }
.history-pts { font-size: 14px; font-weight: 700; color: #b45309; white-space: nowrap; }

/* ===============================
   FOOTER
================================ */
.site-footer { text-align: center; padding: 20px; color: #bbb; font-size: 13px; margin-top: 40px; }

/* ===============================
   RESPONSIVE — MOBILE
================================ */
@media (max-width: 900px) {

  /* SWITCH DESKTOP/MOBILE */
  .page-desktop { display: none; }
  .page-mobile { display: block; }
  .d-nav { display: none; }
  .auth-container { display: none; }
  .auth-mobile { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: calc(100vh - 56px); padding: 24px 20px; }

  /* NAVBAR MOBILE */
  .m-nav {
    display: flex; justify-content: space-between; align-items: center;
    background: white; border-bottom: 1px solid #eee;
    padding: 0 16px; height: 56px; position: sticky; top: 0; z-index: 100;
  }
  .m-nav-left { display: flex; align-items: center; }
  .m-nav-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: #2b2b2b; font-size: 15px; }
  .m-nav-logo {
    width: 32px; height: 32px; background: #8b1e1e; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: 16px;
  }
  .m-nav-right { display: flex; align-items: center; gap: 10px; }
  .m-nav-oignons {
    background: #fff5e6; color: #8b1e1e; border-radius: 20px;
    padding: 4px 10px; font-size: 13px; font-weight: 600;
  }
  .m-nav-burger {
    background: none; border: none; font-size: 22px; color: #333;
    padding: 4px 8px; cursor: pointer;
  }

  /* MENU DÉROULANT */
  .m-menu {
    display: none; flex-direction: column;
    background: white; border-bottom: 1px solid #eee;
    position: sticky; top: 56px; z-index: 99;
  }
  .m-menu.open { display: flex; }
  .m-menu a {
    padding: 14px 20px; text-decoration: none; color: #2b2b2b;
    font-size: 15px; border-bottom: 1px solid #f5f5f5;
  }
  .m-menu a:hover { background: #f9f9f9; }
  .m-menu-logout { color: #c0392b !important; }

  /* LAYOUT MOBILE GÉNÉRAL */
  .m-page-content {
    padding: 16px;
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
  }
  .m-card { margin-bottom: 12px; }

  /* HOME MOBILE */
  .m-home-hero {
    background: #8b1e1e; color: white; border-radius: 14px;
    padding: 28px 24px; margin-bottom: 12px;
  }
  .m-home-hero h2 { font-size: 22px; line-height: 1.3; margin-bottom: 12px; }
  .m-home-hero h2 span { color: #f5c842; }
  .m-home-hero p { opacity: 0.88; font-size: 14px; line-height: 1.6; }
  .m-hero-last { font-size: 12px; opacity: 0.7; margin-top: 10px; }

  .m-jokers-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
  .m-joker-card {
    border: 1px solid #eee; border-radius: 10px; padding: 12px;
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
  }
  .m-joker-card p { font-size: 12px; color: #777; }

  /* GAME MOBILE */
  .m-game { padding: 12px; }
  .m-game-topbar {
    display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
  }
  .m-game-badge {
    background: #f0f0f0; border-radius: 20px; padding: 4px 10px;
    font-size: 12px; color: #555;
  }
  .m-game-progress {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #999; margin-bottom: 12px;
  }
  .m-game-answers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
  .m-game-jokers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .m-joker-btn {
    border: 1px solid #eee; border-radius: 10px; padding: 12px;
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    background: white;
  }
  .m-joker-btn span { font-size: 20px; }
  .m-joker-btn strong { font-size: 13px; display: block; }
  .m-joker-btn small { font-size: 11px; color: #999; }

  /* RANKING MOBILE */
  .m-ranking-tabs {
    display: flex; gap: 6px; margin: 12px 0;
  }
  .m-ranking-tab {
    font-size: 13px; padding: 6px 14px; border-radius: 20px;
    cursor: pointer; color: #777; border: 1px solid #eee;
    background: white;
  }
  .m-ranking-tab.active { background: #8b1e1e; color: white; border-color: #8b1e1e; }

  /* PROFILE MOBILE */
  .m-profile-header { padding: 16px; }

  /* AUTH MOBILE CARD */
  .auth-mobile-card {
    background: white; border-radius: 20px; padding: 36px 24px 28px;
    width: 100%; max-width: 380px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    display: flex; flex-direction: column; align-items: center; text-align: center;
  }
  .auth-mobile-logo {
    width: 80px; height: 80px; background: #8b1e1e; border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    font-size: 36px; margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(139,30,30,0.35);
  }
  .auth-mobile-card h1 { font-size: 26px; font-weight: 700; line-height: 1.3; margin-bottom: 12px; color: #1a1a1a; }
  .auth-mobile-card h1 span { color: #8b1e1e; }
  .auth-mobile-card p { font-size: 14px; color: #888; line-height: 1.6; margin-bottom: 28px; }
  .auth-mobile-actions { width: 100%; display: flex; flex-direction: column; gap: 12px; }
  .btn-mobile-primary {
    width: 100%; background: #8b1e1e; color: white; border: none;
    border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 600;
    text-decoration: none; display: block; text-align: center;
  }
  .btn-mobile-secondary {
    width: 100%; background: white; color: #2b2b2b; border: 1px solid #ddd;
    border-radius: 12px; padding: 14px; font-size: 15px;
    text-decoration: none; display: block; text-align: center;
  }
  .auth-mobile-footer { margin-top: 24px; font-size: 12px; color: #bbb; }

  /* MISC */
  .site-footer { margin-top: 20px; }
}

/* EMPTY STATE */
.empty-state {
  text-align: center; padding: 32px 20px;
  color: #aaa; font-size: 14px; line-height: 1.8;
}

/* ===============================
   EDIT PROFILE
================================ */
.edit-profile-container { max-width: 900px; margin: 0 auto; padding: 24px 32px; }
.edit-profile-header { margin-bottom: 24px; }
.edit-back { color: #8b1e1e; text-decoration: none; font-size: 14px; font-weight: 600; }
.edit-back:hover { text-decoration: underline; }

.edit-profile-grid { display: grid; grid-template-columns: 220px 1fr; gap: 20px; }

.edit-preview-card {
  text-align: center; padding: 28px 20px;
  position: sticky; top: 80px; align-self: start;
}

.edit-forms { display: flex; flex-direction: column; gap: 16px; }

.edit-section { padding: 24px; }
.edit-section-desc { font-size: 13px; color: #888; margin: 6px 0 16px; line-height: 1.5; }

.btn-save {
  background: #8b1e1e; color: white; border: none;
  border-radius: 8px; padding: 10px 20px; font-size: 14px;
  font-weight: 600; cursor: pointer; margin-top: 4px;
}
.btn-save:hover { background: #6e1717; }

.btn-danger {
  background: white; color: #c0392b; border: 1.5px solid #c0392b;
  border-radius: 8px; padding: 10px 20px; font-size: 14px;
  font-weight: 600; cursor: pointer; margin-top: 4px;
}
.btn-danger:hover { background: #fdeaea; }

.edit-danger-zone { border-color: #fdd; background: #fffafa; }

.pass-match-msg { font-size: 12px; margin-top: -4px; min-height: 18px; }

@media (max-width: 900px) {
  .edit-profile-grid { grid-template-columns: 1fr; }
  .edit-preview-card { display: none; }
}

/* ===============================
   MODAL JOKER
================================ */
.joker-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.joker-overlay-box {
  background: white;
  border-radius: 20px;
  padding: 36px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  animation: overlayPop 0.2s ease;
}
@keyframes overlayPop {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.joker-overlay-icon { font-size: 52px; margin-bottom: 16px; }
.joker-overlay-msg  { font-size: 17px; line-height: 1.6; color: #2b2b2b; font-style: italic; }

/* JOKER BUTTON STATES */
.btn-joker-used    { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.badge-used        { background: #eee; color: #999; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; }
.sidebar-joker-used { opacity: 0.5; }
.badge-used-sm     { opacity: 0.5; text-decoration: line-through; }

/* FEEDBACK */
.feedback-box     { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.feedback-correct { background: #e6f7ec; color: #1a6b35; border: 1px solid #b7e4c7; }
.feedback-wrong   { background: #fdeaea; color: #c0392b; border: 1px solid #f5c2c2; }
label.answer { cursor: pointer; transition: opacity 0.3s, background 0.2s; }
label.answer:has(input:checked) { background: #fff5f5; border-color: #8b1e1e; }

/* ===============================
   GAME OVER
================================ */
.game-over-card {
  text-align: center;
  padding: 48px 32px;
  border: 2px solid #f5c2c2;
}
.game-over-icon { font-size: 52px; margin-bottom: 16px; }
.game-over-title { font-size: 24px; font-weight: 700; margin-bottom: 8px; }
.game-over-sub { color: #777; font-size: 15px; margin-bottom: 16px; }
.game-over-answer {
  background: #fdeaea; color: #c0392b; border: 1px solid #f5c2c2;
  border-radius: 10px; padding: 12px 16px; margin: 12px 0; font-size: 14px;
}
.game-over-score {
  font-size: 16px; color: #444; margin: 12px 0;
}

/* ===============================
   ADMIN
================================ */
.admin-container { max-width: 1200px; margin: 0 auto; padding: 24px 32px; }
.admin-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 24px;
}
.admin-grid { display: grid; grid-template-columns: 420px 1fr; gap: 20px; align-items: start; }
.admin-form-card { padding: 24px; position: sticky; top: 80px; }

.admin-list-col { display: flex; flex-direction: column; gap: 12px; }
.admin-question-card { padding: 16px; }
.admin-question-active { border-color: #8b1e1e; background: #fff5f5; }
.admin-q-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.admin-q-id { font-size: 11px; font-weight: 700; color: #bbb; }
.admin-q-actions { display: flex; gap: 8px; }
.admin-btn-edit {
  font-size: 12px; color: #185fa5; text-decoration: none;
  padding: 3px 8px; border: 1px solid #b5d4f4; border-radius: 6px;
  background: #e6f1fb;
}
.admin-btn-delete {
  font-size: 12px; color: #c0392b; text-decoration: none;
  padding: 3px 8px; border: 1px solid #f5c2c2; border-radius: 6px;
  background: #fdeaea;
}
.admin-q-text { font-size: 14px; color: #333; line-height: 1.5; margin-bottom: 10px; }
.admin-answers-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-answer-pill {
  background: #f5f5f5; border: 1px solid #eee; border-radius: 6px;
  padding: 4px 10px; font-size: 12px; color: #555;
}
.admin-answer-correct {
  background: #e6f7ec; border-color: #b7e4c7; color: #1a6b35; font-weight: 600;
}

/* ===============================
   MENTIONS LÉGALES
================================ */
.legal-container { max-width: 760px; margin: 0 auto; padding: 32px; }
.legal-section { margin-bottom: 16px; padding: 20px 24px; }
.legal-section p { font-size: 14px; line-height: 1.8; color: #444; margin-top: 8px; }

@media (max-width: 900px) {
  .admin-grid { grid-template-columns: 1fr; }
  .admin-form-card { position: static; }
  .legal-container { padding: 16px; }
}
