:root{
  --bg: #0e0e10;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(0,0,0,0.35);
  --text: #f5f5f5;
  --muted: rgba(245,245,245,0.78);

  --accent: #b11226;   /* rouge chaud */
  --accent2: #5a0f1b;  /* bordeaux */
  --gold: #c9a24d;

  --ring: rgba(201,162,77,0.35);
  --shadow: 0 18px 50px rgba(0,0,0,0.55);

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-pill: 999px;

  --line: rgba(255,255,255,0.10);
  --line2: rgba(255,255,255,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body{
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}

/* HERO background image */
.hero{
  position: relative;
  min-height: 100vh;
  background: url("/two-player-questions/public/premium_photo-1696959081650-c2bc704ecd59.avif") center/cover no-repeat;
}

.overlay{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 35% 30%, rgba(0,0,0,0.25), rgba(0,0,0,0.72)),
    rgba(0,0,0,0.55);
}

.navbar{
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 44px;
}

.brand{ display: grid; gap: 4px; }
.logo{
  font-family: "Playfair Display", serif;
  font-size: 28px;
  letter-spacing: 0.5px;
}
.logo span{ color: var(--gold); }

.tagline{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.2px;
}

.nav-actions{
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-link{
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 10px;
  border-radius: var(--radius-pill);
  transition: 0.25s ease;
}
.nav-link:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.pill-btn{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(177,18,38,0.25);
  transition: 0.25s ease;
}
.pill-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(177,18,38,0.35);
}

.hero-content{
  position: relative;
  z-index: 2;
  padding: 72px 44px 44px;
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  gap: 22px;
}

.hero-card{
  background: var(--panel2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-top h1{
  font-family: "Playfair Display", serif;
  font-size: 44px;
  line-height: 1.1;
  margin-bottom: 10px;
}
.sub{
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}

.cta-row{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 14px;
  align-items: center;
}

.join-group{
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 10px;
}

.input{
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line2);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}
.input::placeholder{ color: rgba(245,245,245,0.55); }
.input:focus{
  border-color: rgba(201,162,77,0.55);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Boutons */
.btn{
  padding: 14px 18px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 600;
  transition: 0.25s ease;
  color: var(--text);
  background: rgba(255,255,255,0.08);
  border-color: var(--line2);
}

.btn:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.20);
}

.btn-primary{
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #fff;
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 10px 28px rgba(177,18,38,0.25);
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(177,18,38,0.35);
}

.btn-ghost{
  background: rgba(255,255,255,0.08);
  border-color: var(--line2);
  color: var(--text);
}

.btn.danger, .btn-danger{
  background: rgba(177,18,38,0.18);
  border-color: rgba(177,18,38,0.35);
}
.btn.danger:hover, .btn-danger:hover{
  background: rgba(177,18,38,0.28);
  border-color: rgba(177,18,38,0.55);
}

/* Status */
.status{
  margin-top: 12px;
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* =======================
   VIEW (#view) : affichage conditionnel
   ======================= */
#view{
  display: none;
  margin: 0;
  padding: 0;
}
#view.has-content{
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

/* =======================
   UI injectée par app.js (LOBBY/QUESTION/REVEAL)
   ======================= */

.container{
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: 18px;
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

/* Carte principale (Lobby, Question, Reveal...) */
.card{
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
}

/* Titres/texte utilisés par card() */
.h1{
  font-family: "Playfair Display", serif;
  font-size: 26px;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.p{
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Layout helpers (row/col) */
.row{
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.col{
  display: grid;
  gap: 10px;
}

/* Séparateur */
.sep{
  height: 1px;
  background: rgba(255,255,255,0.10);
  margin: 12px 0;
}

/* Badges (joueurs, timer, lien) */
.badge{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.05);
  color: rgba(245,245,245,0.92);
  font-size: 13px;
  line-height: 1;
}

/* Badge lien : meilleure lisibilité + wrap */
.badge[style*="flex: 1"]{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Notices */
.notice{
  color: rgba(245,245,245,0.78);
  font-size: 13px;
  line-height: 1.45;
}
.notice.ok{
  color: rgba(201,162,77,0.95);
}
.notice.bad{
  color: rgba(255,120,120,0.95);
}

/* Selects du lobby */
select{
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line2);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  outline: none;
  appearance: none;
  transition: 0.2s ease;
}
select:focus{
  border-color: rgba(201,162,77,0.55);
  box-shadow: 0 0 0 4px var(--ring);
}

/* LabelWrap : "Thème", "Sous-catégorie" */
.col .notice{
  margin-bottom: -6px;
}

/* Grid reveal */
.grid2{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 700px){
  .grid2{ grid-template-columns: 1fr; }
}

/* Answer box */
.answerBox{
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(0,0,0,0.25);
  color: rgba(245,245,245,0.92);
  white-space: pre-wrap;
  word-break: break-word;
}

/* Timer highlight */
.timer{
  color: var(--gold);
  font-weight: 700;
}

/* Textarea meilleure */
textarea.input{
  border-radius: 18px;
  resize: vertical;
}

/* =======================
   MODAL (popup pseudo)
   ======================= */

.modal-backdrop{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;

  display: grid;
  place-items: center;

  background: rgba(0,0,0,0.70);
  z-index: 99999;

  padding: 18px;
}

.modal{
  width: min(520px, 100%);
  background: rgba(16,16,18,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 22px;

  box-shadow: 0 24px 70px rgba(0,0,0,0.65);
  backdrop-filter: blur(12px);
}

.modal-title{
  font-family: "Playfair Display", serif;
  font-size: 26px;
  margin-bottom: 6px;
}

.modal-subtitle{
  color: rgba(245,245,245,0.78);
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 14px;
}

.modal-input{
  margin-top: 4px;
}

.modal-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

/* Responsive */
@media (max-width: 900px){
  .navbar{ padding: 18px 18px; }
  .hero-content{ padding: 46px 18px 18px; }
  .hero-top h1{ font-size: 36px; }
  .cta-row{ grid-template-columns: 1fr; }
  .join-group{ grid-template-columns: 1fr; }
}

@media (max-width: 420px){
  .hero-top h1{ font-size: 32px; }
}

/* =======================
   BAS DE PAGE (sections marketing)
   ======================= */

/* Rend la section du bas plus "premium" */
.section{
  padding: 84px 44px;
}

.section-inner{
  max-width: 1100px;
  margin: 0 auto;
}

/* Fond + séparation plus élégants */
.section-dark{
  background:
    radial-gradient(900px 380px at 50% 15%, rgba(177,18,38,0.18), rgba(0,0,0,0)),
    linear-gradient(180deg, rgba(14,14,16,0.92), rgba(14,14,16,1));
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* Titre du bas */
.section h2{
  font-family: "Playfair Display", serif;
  font-size: 40px;
  margin-bottom: 18px;
  letter-spacing: 0.2px;
}

/* Grille des cartes (au lieu des barres) */
.cards{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

/* Chaque item devient une vraie card */
.cards > *{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  padding: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.25);
}

/* H3 / titres dans tes items (si tu utilises <h3> ou <strong>) */
.cards h3, .cards strong{
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: rgba(245,245,245,0.92);
}

/* Texte secondaire dans les items */
.cards p{
  color: rgba(245,245,245,0.72);
  font-size: 14px;
  line-height: 1.55;
}

/* Citation finale : mieux intégrée */
.section-quote{
  background:
    radial-gradient(900px 280px at 50% 30%, rgba(201,162,77,0.12), rgba(0,0,0,0)),
    rgba(14,14,16,1);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.quote{
  max-width: 900px;
  margin: 0 auto;
  padding: 26px 18px 8px;
  font-family: "Playfair Display", serif;
  font-size: 30px;
  text-align: center;
  color: rgba(201,162,77,0.95);
}

/* Petit texte en dessous de la quote (si présent) */
.section-quote p, .section-quote .muted{
  text-align: center;
  color: rgba(245,245,245,0.65);
  margin-top: 10px;
  font-size: 14px;
}

/* Responsive */
@media (max-width: 900px){
  .section{ padding: 64px 18px; }
  .section h2{ font-size: 34px; }
  .cards{ grid-template-columns: 1fr; }
}
