/* === Snake Arena : identité de la page d'accueil ===
   Réutilise les classes de base partagées (accueil.css) ; ici le hero, le
   tableau des bonus, les records, les salons et la FAQ. Les couleurs suivent
   les variables de thème injectées par theme-vars.php (vert émeraude). */

/* Hero : patron partagé .hero-jeu motif-pastilles (fichiers-partages-des-jeux/css/accueil.css) :
   bandeau, pois de coin (les pastilles de nourriture), rangée de décos et
   flottement. Ici, seulement la tête de serpent et sa couleur, sans ombre
   portée colorée. */
.serpent-deco {
  width: 30px; height: 30px;
  border-radius: 50% 50% 50% 8px;
}
.serpent-vert  { background: radial-gradient(circle at 35% 35%, #86efac, #22c55e); }
.serpent-cyan  { background: radial-gradient(circle at 35% 35%, #a5f3fc, #22d3ee); }
.serpent-jaune { background: radial-gradient(circle at 35% 35%, #fde68a, #facc15); }

.hero-jeu .btn-cta-hero { text-decoration: none; }
.liens-hero {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0 0;
}
.liens-hero a {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-accent, #86efac);
  text-decoration: none;
  /* Cible tactile confortable */
  padding: 6px 4px;
}
.liens-hero a:hover { text-decoration: underline; }

/* Accès au classement, sous le bandeau d'activité */
.lien-classement-accueil {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 14px auto 4px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.4);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  text-align: center;
}
.lien-classement-accueil:hover { background: rgba(250, 204, 21, 0.16); }

/* Tableau des bonus. Un tableau plutôt qu'une liste : nom, effet et bon usage se
   lisent d'un coup d'œil. Le cadre défile seul sur mobile si le tableau déborde,
   jamais la page. */
.tableau-bonus-cadre {
  overflow-x: auto;
  margin: 8px 0 14px;
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 12px;
}
.tableau-bonus {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.45;
}
.tableau-bonus th,
.tableau-bonus td {
  padding: 9px 12px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgba(74, 222, 128, 0.12);
}
.tableau-bonus tbody tr:last-child th,
.tableau-bonus tbody tr:last-child td { border-bottom: 0; }
.tableau-bonus thead th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--texte-faible, #94a3b8);
  background: rgba(34, 197, 94, 0.12);
}
.tableau-bonus tbody th {
  font-weight: 700;
  color: var(--color-light, #4ade80);
  white-space: nowrap;
}
.tableau-bonus td { color: var(--texte-doux, #cbd5e1); }
.bonus-picto {
  display: inline-block;
  min-width: 1.6em;
  text-align: center;
  font-weight: 800;
}

/* ================= Tes records (connectés) ================= */
.mes-records { margin: 22px 0 6px; }
.mes-records h2 { font-size: 1.15rem; margin-bottom: 10px; text-align: left; }
.mes-records ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 8px;
}
.mes-records li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(74, 222, 128, 0.07);
  border: 1px solid rgba(74, 222, 128, 0.25);
  text-align: left;
}
.mes-records strong { font-size: 1.2rem; color: var(--color-light, #4ade80); }
.mes-records span { font-size: 0.78rem; color: var(--texte-doux, #cbd5e1); }

/* ================= Jouer entre amis ================= */
.entre-amis { margin: 26px 0 6px; text-align: left; }
.entre-amis h2 { font-size: 1.15rem; margin-bottom: 6px; }
.entre-amis > p { font-size: 0.88rem; color: var(--texte-doux, #cbd5e1); margin-bottom: 12px; }
.entre-amis-grille {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.entre-amis-carte {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.25);
  font-size: 0.86rem;
  color: var(--texte-doux, #cbd5e1);
}
.entre-amis-carte label { display: flex; flex-direction: column; gap: 5px; }
.entre-amis-carte label.case { flex-direction: row; align-items: center; gap: 8px; }
.entre-amis-carte select,
.entre-amis-carte input[type="text"] {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-forte, rgba(255, 255, 255, 0.2));
  background: var(--surface-2, #1b1f27);
  color: var(--texte, #e5e7eb);
}
.entre-amis-carte input[type="text"] { text-transform: uppercase; letter-spacing: 0.2em; }
.btn-salon {
  align-self: flex-start;
  font: inherit;
  font-weight: 700;
  padding: 9px 16px;
  border-radius: 10px;
  border: 0;
  background: #22d3ee;
  color: #062a33;
  cursor: pointer;
  margin-top: auto;
}

/* ================= FAQ ================= */
.faq-section { margin: 30px 0 10px; }
.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 15px 18px;
  background: none;
  border: 0;
  color: #f1f5f9;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  min-height: 54px;
}
.faq-question:hover { background: color-mix(in srgb, var(--color-mid) 12%, transparent); }
.faq-question:focus-visible { outline: 2px solid var(--color-accent); outline-offset: -2px; }
/* Chevron piloté par aria-expanded : le script partagé ne gère que l'attribut. */
.faq-question::after {
  content: '';
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-right: 2px solid var(--color-light);
  border-bottom: 2px solid var(--color-light);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}
.faq-question[aria-expanded="true"]::after { transform: rotate(-135deg) translate(-2px, -2px); }
.faq-answer { padding: 0 18px 16px; color: #94a3b8; line-height: 1.7; }
.faq-answer[hidden] { display: none; }
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
