/*
 * Cryptogrammes — identité visuelle de l'accueil.
 *
 * Le hero (.hero-jeu, ses motifs, .hero-decos, .deco-flottante), les cartes de
 * mode, le bloc de règles et les sections viennent du CSS partagé
 * (css/accueil.css, servi par proxies/css-accueil.php). Ce fichier ne pose que
 * le remplissage des lettres décoratives et les rares réglages propres au jeu :
 * ne rien redéfinir de ce que le partagé fournit (surtout pas .hero-flex).
 */

:root { --rules-symbole: '?'; }

/* Les trois lettres du hero : des lettres chiffrées, l'une déjà déchiffrée. */
.lettre-code {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f6f1e4;
  color: #13263a;
  font-weight: 800;
  font-size: 1.3rem;
  line-height: 1;
}
.lettre-code-trouvee { background: #f59e0b; color: #13263a; }

/* Les cartes de mode sont des liens : pas de soulignement. */
a.mode-card { text-decoration: none; color: inherit; display: block; }
a.mode-card:hover { text-decoration: none; }

.modes-header {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-accent);
  margin: 26px 0 14px;
}

.lien-classement-accueil {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-light);
  text-decoration: none;
}
.lien-classement-accueil:hover { text-decoration: underline; }

.hero-jeu .lien-defi-hero {
  display: block;
  margin-top: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--color-accent);
  text-decoration: none;
}
.hero-jeu .lien-defi-hero:hover { text-decoration: underline; }
.hero-jeu a.btn-cta-hero { text-decoration: none; display: inline-block; }

.rules a { color: var(--color-light); }

/* L'exemple de l'accueil : une phrase chiffrée, puis la même déchiffrée. Dessiné
   en HTML par le serveur, lisible sans script. */
.exemple-crypto {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 16px;
  margin: 12px auto 8px;
  padding: 16px 12px;
  border-radius: 12px;
  background: #f6f1e4;
  color: #13263a;
  max-width: 640px;
}
.exemple-mot { display: inline-flex; gap: 3px; }
.exemple-case { display: inline-flex; flex-direction: column; align-items: center; width: 1.5em; }
.exemple-case b { display: block; width: 100%; height: 1.4em; line-height: 1.4em; text-align: center; border-bottom: 2px solid #13263a; font-size: 1.05rem; }
.exemple-case i { font-style: normal; font-size: 0.75rem; font-weight: 700; color: #6b7a8c; margin-top: 2px; }
.exemple-case.donnee b { color: #b45309; }
.exemple-signe { font-weight: 800; font-size: 1.05rem; align-self: flex-start; line-height: 1.4em; }
.exemple-legende { text-align: center; font-size: 0.85rem; color: var(--texte-doux); margin: 0 0 14px; }

/* ================= FAQ ================= */

.faq-section { margin: 34px 0 10px; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--surface-1);
  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 : l'état est dans l'ARIA, 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: var(--texte-doux); line-height: 1.7; }
.faq-answer[hidden] { display: none; }
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
.faq-section h2 { font-family: var(--font-display); }
