/* === Page d'accueil jeu — CSS partage === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
  color: #e0e0e0;
  padding: 16px;
}

#app {
  background: rgba(20, 20, 35, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  padding: 40px 32px 32px;
  max-width: 800px;
  width: 100%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  text-align: center;
}

h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 8px;
  background: linear-gradient(90deg, var(--color-light), var(--color-mid), var(--color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 1rem;
  color: #94a3b8;
  margin-bottom: 32px;
  line-height: 1.5;
}

/* Mini grille Wordle décorative */
.wordle-mini { display: inline-flex; gap: 3px; margin-bottom: 8px; }
.wordle-mini-cell { width: 28px; height: 28px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 0.85rem; color: #fff; }
.wordle-mini-cell.correct { background: #22c55e; }
.wordle-mini-cell.present { background: #eab308; }
.wordle-mini-cell.absent { background: #64748b; }

/* Exemple de couleurs dans les règles */
.regle-couleur { display: inline-block; width: 18px; height: 18px; border-radius: 3px; vertical-align: middle; margin: 0 2px; }
.regle-couleur.vert { background: #22c55e; }
.regle-couleur.jaune { background: #eab308; }
.regle-couleur.gris { background: #64748b; }

/* Modes de jeu */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.mode-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 28px 20px;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.mode-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: color-mix(in srgb, var(--color-light) 40%, transparent);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-light) 15%, transparent);
}

.mode-icon { font-size: 2.5rem; line-height: 1; }
.mode-card h2 { font-size: 1.15rem; font-weight: 700; color: var(--color-accent); }
.mode-card p { font-size: 0.82rem; color: #94a3b8; line-height: 1.4; }

/* Panels depliables */
.section-panel {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 28px;
  animation: fadeIn 0.3s;
}
.section-panel.visible { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.section-panel h3 { font-size: 1.05rem; font-weight: 700; color: var(--color-accent); margin-bottom: 16px; }
.custom-settings { display: none; padding: 12px 0; }
.custom-settings.visible { display: block; }

/* Formulaires */
.form-group { display: flex; flex-direction: column; gap: 12px; }
.form-label { font-size: 0.85rem; color: var(--color-accent); font-weight: 600; text-align: left; }

.input-field {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  outline: none;
  transition: border-color 0.2s;
}
.input-field:focus { border-color: color-mix(in srgb, var(--color-light) 50%, transparent); }
.input-field::placeholder { color: #64748b; }
select.input-field { cursor: pointer; }

/* Custom select */
.custom-select { position: relative; width: 100%; }
.custom-select-trigger {
  width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  background: rgba(255, 255, 255, 0.05); color: #f5ecff; font-family: 'Inter', sans-serif;
  font-size: 0.95rem; font-weight: 500; text-align: left; cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.custom-select-trigger:hover { background: rgba(255, 255, 255, 0.07); }
.custom-select-trigger:focus { outline: none; border-color: color-mix(in srgb, var(--color-light) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-light) 12%, transparent); }
.custom-select.open .custom-select-trigger { border-color: color-mix(in srgb, var(--color-light) 45%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-light) 12%, transparent); background: rgba(255, 255, 255, 0.07); }
.custom-select-arrow { flex-shrink: 0; color: rgba(255, 255, 255, 0.75); font-size: 1rem; line-height: 1; transition: transform 0.2s ease; }
.custom-select.open .custom-select-arrow { transform: rotate(180deg); }
.custom-select-dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 1000; padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px;
  background: rgb(40, 30, 70);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  max-height: 220px; overflow-y: auto;
}
.custom-select-option {
  width: 100%; display: block; padding: 10px 14px; border: 0; border-radius: 10px;
  background: transparent; color: #f5ecff; font-family: 'Inter', sans-serif;
  font-size: 0.9rem; font-weight: 500; text-align: left; cursor: pointer;
  transition: background 0.15s ease;
}
.custom-select-option:hover { background: rgba(255, 255, 255, 0.08); }
.custom-select-option.is-selected { background: color-mix(in srgb, var(--color-light) 18%, transparent); color: #fff; }

.input-row { display: flex; gap: 8px; }

/* Option buttons (solo config, etc.) */
.option-group { margin-bottom: 16px; }
.option-label { font-size: 0.85rem; font-weight: 600; color: #94a3b8; margin-bottom: 8px; display: block; text-align: left; }
.option-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.opt-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: all 0.2s;
}
.opt-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.opt-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }

/* Visibilite toggle */
.visibilite-grille { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.visibilite-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: all 0.2s;
}
.visibilite-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.visibilite-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }

/* Mode de jeu grille */
.mode-jeu-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.mode-jeu-btn {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1; transition: all 0.2s;
}
.mode-jeu-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.mode-jeu-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }
.mode-jeu-btn .mode-icone { display: block; font-size: 1.2rem; margin-bottom: 2px; }

/* Sélecteur de longueur */
.longueur-grille { display: flex; gap: 6px; justify-content: center; margin-bottom: 12px; }
.longueur-btn {
  font-family: 'Inter', sans-serif; font-size: 0.9rem; font-weight: 700; width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1; transition: all 0.2s;
}
.longueur-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.longueur-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }

/* Sélecteur de grille */
.grille-selecteur { margin-bottom: 16px; }
.grille-selecteur .form-label { margin-bottom: 6px; display: block; }

/* Sous-mode (Course / Collaboratif / Course+Score) */
.sous-mode-grille { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.sous-mode-btn {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1; transition: all 0.2s;
}
.sous-mode-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.sous-mode-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }

/* Difficulte toggle */
.difficulte-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }
.difficulte-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: all 0.2s;
}
.difficulte-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.difficulte-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }
.difficulte-btn .diff-icone { display: block; font-size: 1.2rem; margin-bottom: 2px; }
.difficulte-btn .diff-details { display: block; font-size: 0.72rem; font-weight: 400; color: #94a3b8; margin-top: 2px; }

/* Choix grille (quizz: tranche d'âge, difficulté, nombre) */
.choix-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; margin-bottom: 12px; }
.choix-grille-3 { grid-template-columns: repeat(3, 1fr); }
.choix-btn {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1; transition: all 0.2s;
}
.choix-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.choix-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }
.choix-btn .choix-icone { display: block; font-size: 1.2rem; margin-bottom: 2px; }
.choix-btn .choix-details { display: block; font-size: 0.72rem; font-weight: 400; color: #94a3b8; margin-top: 2px; }

/* Thèmes grille (quizz) */
.themes-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; margin-bottom: 12px; }
.theme-btn {
  font-family: 'Inter', sans-serif; font-size: 0.82rem; font-weight: 600; padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); color: #cbd5e1; transition: all 0.2s;
}
.theme-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.theme-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }
.theme-btn .theme-icone { display: block; font-size: 1.2rem; margin-bottom: 2px; }

/* Categorie toggle */
.categorie-grille { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 12px; }
.categorie-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
  color: #cbd5e1;
  transition: all 0.2s;
}
.categorie-btn:hover { background: rgba(255, 255, 255, 0.12); border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.categorie-btn.active { background: color-mix(in srgb, var(--color-light) 20%, transparent); border-color: color-mix(in srgb, var(--color-light) 50%, transparent); color: var(--color-accent); }

/* Boutons */
.btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 10px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  color: #fff;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2));
  box-shadow: 0 4px 15px color-mix(in srgb, var(--color-btn2) 40%, transparent);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2));
  box-shadow: 0 4px 15px color-mix(in srgb, var(--color-btn2) 40%, transparent);
}

.btn-full { width: 100%; padding: 12px 20px; font-size: 1rem; }

/* Input code partie */
.input-code {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #e0e0e0;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 4px;
  outline: none;
  margin-bottom: 8px;
}
.input-code:focus { border-color: color-mix(in srgb, var(--color-light) 50%, transparent); }
.input-code::placeholder { color: #64748b; letter-spacing: 2px; font-weight: 400; }

/* Separator */
.separator { display: flex; align-items: center; gap: 12px; color: #64748b; font-size: 0.8rem; margin: 4px 0; }
.separator::before, .separator::after { content: ''; flex: 1; height: 1px; background: rgba(255, 255, 255, 0.1); }

.error-msg { color: #f87171; font-size: 0.82rem; min-height: 1.2rem; }

/* Parties publiques */
.public-games { margin-top: 16px; }
.public-game-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.08); margin-bottom: 6px; font-size: 0.85rem; }
.public-game-row .info { color: #94a3b8; }
.public-game-row .info strong { color: var(--color-accent); }
.btn-join {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border: 1px solid color-mix(in srgb, var(--color-mid) 40%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--color-mid) 15%, transparent);
  color: var(--color-accent);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-join:hover { background: color-mix(in srgb, var(--color-mid) 30%, transparent); }
.no-games { color: #64748b; font-size: 0.82rem; font-style: italic; text-align: center; padding: 16px 0; }

.parties-publiques { margin-top: 16px; text-align: left; }
.parties-publiques h4 { font-size: 0.9rem; color: var(--color-accent); margin-bottom: 10px; font-weight: 700; text-align: center; }
.liste-publiques { display: flex; flex-direction: column; gap: 8px; max-height: 250px; overflow-y: auto; }
.carte-publique { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; transition: border-color 0.2s; }
.carte-publique:hover { border-color: color-mix(in srgb, var(--color-light) 30%, transparent); }
.carte-publique-info { flex: 1; min-width: 0; }
.carte-publique-info .createur { font-size: 0.85rem; font-weight: 700; color: var(--color-accent); }
.carte-publique-info .details { font-size: 0.75rem; color: #94a3b8; margin-top: 2px; }
.carte-publique .btn { font-size: 0.78rem; padding: 6px 14px; flex-shrink: 0; }
.aucune-partie { font-size: 0.82rem; color: #64748b; text-align: center; font-style: italic; padding: 12px 0; }

/* Toggle chrono */
.chrono-option { margin-bottom: 12px; text-align: left; }
.toggle-label { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 0.88rem; font-weight: 600; color: #cbd5e1; user-select: none; }
.toggle-label input[type="checkbox"] { display: none; }
.toggle-switch { width: 40px; height: 22px; background: rgba(255, 255, 255, 0.12); border-radius: 12px; position: relative; transition: background 0.3s; flex-shrink: 0; }
.toggle-switch::after { content: ''; position: absolute; width: 16px; height: 16px; background: #94a3b8; border-radius: 50%; top: 3px; left: 3px; transition: all 0.3s; }
.toggle-label input:checked + .toggle-switch { background: color-mix(in srgb, var(--color-light) 50%, transparent); }
.toggle-label input:checked + .toggle-switch::after { left: 21px; background: var(--color-light); }

.chrono-delai { margin-top: 12px; padding: 12px; background: rgba(255, 255, 255, 0.04); border-radius: 10px; }
.delai-slider-row { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.slider-chrono { flex: 1; -webkit-appearance: none; appearance: none; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.15); outline: none; }
.slider-chrono::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2)); cursor: pointer; box-shadow: 0 2px 6px color-mix(in srgb, var(--color-btn2) 40%, transparent); }
.slider-chrono::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2)); cursor: pointer; border: none; box-shadow: 0 2px 6px color-mix(in srgb, var(--color-btn2) 40%, transparent); }
.delai-valeur { font-size: 1rem; font-weight: 700; color: var(--color-light); min-width: 32px; text-align: center; }

/* Rules */
.rules { text-align: left; margin-bottom: 24px; }
.rules h2 { font-size: 1rem; font-weight: 700; color: var(--color-accent); margin-bottom: 10px; }
.rules h3 { font-size: 0.92rem; font-weight: 700; color: var(--color-accent); margin: 16px 0 8px; }
.rules p { font-size: 0.82rem; color: #94a3b8; line-height: 1.6; }
.rules ul { list-style: none; padding: 0; }
.rules li { font-size: 0.82rem; color: #94a3b8; padding: 4px 0; padding-left: 20px; position: relative; line-height: 1.5; }
.rules li::before { content: '\2022'; color: var(--color-light); position: absolute; left: 4px; }

/* Blog preview (4 derniers articles) */
.blog-section { margin-top: 28px; margin-bottom: 24px; }
.blog-section h2 { font-size: 1.15rem; font-weight: 700; color: var(--color-accent); margin-bottom: 16px; }
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 16px; }
.blog-card { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 16px; padding: 20px; transition: all 0.3s ease; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.blog-card:hover { background: rgba(255, 255, 255, 0.1); border-color: color-mix(in srgb, var(--color-light) 40%, transparent); transform: translateY(-4px); box-shadow: 0 8px 24px color-mix(in srgb, var(--color-light) 15%, transparent); }
.blog-card .card-date { font-size: 0.75rem; color: #64748b; font-weight: 600; }
.blog-card h3 { font-size: 1rem; font-weight: 700; line-height: 1.4; }
.blog-card h3 a { color: var(--color-accent); text-decoration: none; transition: color 0.2s; }
.blog-card h3 a:hover { color: var(--color-light); }
.blog-card p { font-size: 0.82rem; color: #94a3b8; line-height: 1.5; flex: 1; }
.blog-card .read-more { font-size: 0.82rem; font-weight: 600; color: var(--color-mid); text-decoration: none; transition: color 0.2s; }
.blog-card .read-more:hover { color: var(--color-light); }
.btn-all-articles { display: inline-block; font-family: 'Inter', sans-serif; font-size: 0.88rem; font-weight: 700; padding: 10px 24px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2)); box-shadow: 0 4px 15px color-mix(in srgb, var(--color-btn2) 40%, transparent); text-decoration: none; transition: transform 0.2s, box-shadow 0.2s; }
.btn-all-articles:hover { transform: translateY(-2px); }

/* Footer */
footer { font-size: 0.78rem; color: #64748b; margin-top: 4px; }
footer a { color: #818cf8; text-decoration: none; transition: color 0.2s; }
footer a:hover { color: #a78bfa; }

/* Animations d'apparition au scroll (desktop/tablette uniquement) */
@media (min-width: 769px) {
  .scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
  }
  .scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }
  .scroll-reveal:nth-child(2) { transition-delay: 0.12s; }
  .scroll-reveal:nth-child(3) { transition-delay: 0.24s; }
  .scroll-reveal:nth-child(4) { transition-delay: 0.36s; }
  .mode-card.scroll-reveal { transition-delay: calc(var(--i, 0) * 0.15s); }
}

/* Responsive */
@media (max-width: 600px) {
  body { padding: 30px 0 0; }
  #app {
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-height: calc(100vh - 30px);
  }
}
@media (max-width: 480px) {
  #app { padding: 28px 18px 22px; }
  h1 { font-size: 1.6rem; }
  .modes { grid-template-columns: 1fr; gap: 12px; }
  .mode-card { padding: 20px 16px; }
  .input-row { flex-direction: column; }
  .blog-grid { grid-template-columns: 1fr; }
  .section-panel { padding: 18px 14px; }
}

/* ============================================== */
/* === Hero / bandeau / CTA — communs aux jeux === */
/* ============================================== */

/* Bandeau joueur le plus actif */
.bandeau-joueur-actif {
  margin-bottom: 16px;
  padding: 9px 18px;
  background: color-mix(in srgb, var(--color-mid) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-mid) 30%, transparent);
  border-radius: 10px;
  text-align: center;
  font-size: 0.82rem;
  color: #cbd5e1;
  overflow: hidden;
  animation: bandeau-apparition 0.8s ease both;
}
.bandeau-joueur-actif strong { color: var(--color-mid); font-weight: 700; }
.bandeau-carousel { position: relative; height: 1.4em; }
.bandeau-msg {
  position: absolute; inset: 0;
  text-align: center; line-height: 1.4em;
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.bandeau-msg-visible { opacity: 1; transform: translateY(0); }
.bandeau-msg-sortie { opacity: 0; transform: translateY(-100%); }
.bandeau-msg-entree { opacity: 0; transform: translateY(100%); }
@keyframes bandeau-apparition {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero — structure commune (le wrapper .hero-XXX reste spécifique au jeu : padding, gradients, motif décoratif) */
.hero-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  margin: 4px 0 16px;
  flex-wrap: wrap;
}
.hero-visual {
  display: block;
  width: min(200px, 38vw);
  height: auto;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  margin: 0;
  border-radius: 18px;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--color-btn2) 25%, transparent), 0 0 0 1px color-mix(in srgb, var(--color-light) 15%, transparent);
  position: relative;
  z-index: 1;
}
.hero-text {
  flex: 1 1 260px;
  min-width: 0;
  max-width: 420px;
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin: 0 0 10px;
  line-height: 1.1;
  background: linear-gradient(90deg, var(--color-light), var(--color-mid), var(--color-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-h1 {
  font-size: 1rem;
  font-weight: 400;
  margin: 0 0 10px;
  line-height: 1.4;
}

/* Bouton CTA hero */
.btn-cta-hero {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  padding: 14px 36px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--color-btn1), var(--color-btn2));
  box-shadow: 0 6px 24px color-mix(in srgb, var(--color-btn1) 40%, transparent);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
}
.btn-cta-hero::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 16px;
  border: 2px solid color-mix(in srgb, var(--color-light) 50%, transparent);
  pointer-events: none;
  animation: cta-ring 2.5s ease-in-out infinite;
  will-change: transform, opacity;
}
.btn-cta-hero:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px color-mix(in srgb, var(--color-btn1) 50%, transparent);
}
@keyframes cta-ring {
  0%, 100% { transform: scale(1); opacity: 0; }
  50% { transform: scale(1.08); opacity: 1; }
}

/* Indicateur live dans le hero */
.hero-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.82rem;
  color: #94a3b8;
}
.live-dot {
  position: relative;
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.4);
  animation: live-pulse 2s ease-in-out infinite;
  will-change: transform, opacity;
}
@keyframes live-pulse {
  0%, 100% { transform: scale(1); opacity: 0.7; }
  50% { transform: scale(2.4); opacity: 0; }
}

/* Modes — surcharges identité (effet hover, ::before gradient, badges) */
.modes { gap: 14px; margin-bottom: 24px; }
.mode-card {
  position: relative;
  padding: 24px 18px;
  border-radius: 18px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.mode-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-light), var(--color-mid));
  opacity: 0;
  transition: opacity 0.3s;
}
.mode-card:hover::before { opacity: 1; }
.mode-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px color-mix(in srgb, var(--color-btn1) 20%, transparent);
  border-color: color-mix(in srgb, var(--color-light) 30%, transparent);
}
.mode-card:hover .mode-icon { transform: scale(1.15); }

/* Badge sur les cartes (variantes communes) */
.mode-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 6px;
}
.badge-solo {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.badge-defi {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.2);
}
.badge-action {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Header au-dessus de la grille de modes */
.modes-header {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b;
  margin-bottom: 14px;
}

/* Override .btn-primary plus punchy en accueil */
.btn-primary {
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--color-btn1) 40%, transparent);
}
.btn-primary:active { transform: translateY(0); }

/* Section rules — fond + bordure */
.rules {
  position: relative;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Hero responsive (commun — chaque jeu peut surcharger son wrapper) */
@media (max-width: 600px) {
  .hero-flex { gap: 14px; }
  .hero-text { text-align: center; align-items: center; flex-basis: 100%; max-width: none; }
  .hero-visual { width: min(170px, 46vw); }
  .hero-h1 { font-size: 0.95rem; }
}
@media (max-width: 480px) {
  .hero-visual { width: min(150px, 42vw); }
  .hero-title { font-size: 1.8rem; }
  .btn-cta-hero { font-size: 1rem; padding: 12px 28px; }
  .bandeau-joueur-actif { font-size: 0.78rem; padding: 8px 12px; }
  .bandeau-carousel { height: 3.6em; }
  .bandeau-cta { display: block; }
}
