/*
 * La Forge du Compagnon : identité de la page d'accueil. Tout le reste
 * (hero-jeu, hero-flex, cartes de modes, règles, articles) vient du CSS
 * partagé chargé avant.
 */
/* Braises et enclume qui flottent dans le hero. */
.deco-flottante.braise { border-radius: 50%; background: #f97316; border: 2px solid #fdba74; }
.deco-flottante.braise-vive { background: #fde047; border-color: #fff7d6; }
.deco-flottante.enclume {
  border-radius: 2px; background: #4b5563;
  clip-path: polygon(0 0, 100% 0, 100% 35%, 72% 45%, 66% 70%, 82% 100%, 18% 100%, 34% 70%, 28% 45%, 0 25%);
}

.rules { --rules-symbole: '\2692'; }

.mode-card .mode-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-classe { background: rgba(245, 166, 91, 0.18); color: #f9c48f; }
.badge-defi   { background: rgba(251, 191, 36, 0.18); color: #fcd34d; }
.badge-libre  { background: rgba(148, 163, 184, 0.16); color: #cbd5e1; }

.modes-header {
  text-align: center;
  font-weight: 700;
  margin: 6px 0 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.82rem;
}
a.mode-card { text-decoration: none; display: block; }
/* Les cartes sont des h3 sous le h2 « Les modes de jeu » : même allure que les h2 du socle. */
.mode-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; color: #f0f3f6; margin: 6px 0 4px; }
@media (max-width: 480px) { .mode-card h3 { font-size: 0.85rem; } }
h2.modes-header { font-family: inherit; color: var(--texte-faible); }
/* Cinq cartes : trois puis deux, jamais une carte seule sur sa ligne. */
.modes { grid-template-columns: repeat(6, 1fr); }
.modes .mode-card { grid-column: span 2; }
.modes .mode-card:nth-child(4) { grid-column: 2 / span 2; }
@media (max-width: 820px) {
  .modes { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .modes .mode-card, .modes .mode-card:nth-child(4) { grid-column: auto; padding: 16px 12px; }
  .modes .mode-card:nth-child(5) { grid-column: 1 / span 2; }
}

/* Le classement, visible sous les modes : on le cherche en arrivant sur le jeu. */
.lien-classement-accueil {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 4px auto 22px;
  padding: 12px 20px;
  min-height: 44px;
  border: 1px solid var(--line-forte);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--texte);
  font-weight: 700;
  text-decoration: none;
  text-align: center;
}
.lien-classement-accueil:hover { border-color: var(--color-light); color: #fff; }

/* Questions fréquentes : accordéon (js/faq-accordeon.js partagé) */
.faq-section { display: grid; gap: 8px; margin-top: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
.faq-question {
  display: block; width: 100%; min-height: 48px; padding: 12px 40px 12px 14px; position: relative;
  background: none; border: 0; color: inherit; font: inherit; font-weight: 700; text-align: left; cursor: pointer;
}
.faq-question::after { content: '+'; position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 1.3rem; color: var(--color-light); }
.faq-question[aria-expanded="true"]::after { content: '−'; }
.faq-question:focus-visible { outline: 2px solid var(--color-light); outline-offset: -2px; }
.faq-answer { padding: 0 14px 14px; line-height: 1.6; color: var(--texte); }
.faq-answer[hidden] { display: none; }

/* Tableaux des règles : défilent sur eux-mêmes sur un écran étroit, jamais la page. */
.table-defilante { overflow-x: auto; margin: 10px 0 14px; }
.table-regles { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table-regles th, .table-regles td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.table-regles thead th { color: var(--color-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-regles tbody th { color: #f0f3f6; }
.table-regles td.nombre { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rules a { color: var(--color-light); }

/* Le tableau des zones du fer : une pastille de la couleur de la zone devant son nom. */
.pastille-zone { display: inline-block; width: 12px; height: 12px; margin-right: 8px; border-radius: 3px; vertical-align: -1px; border: 1px solid rgba(255, 255, 255, 0.25); }
.zone-froid { background: #94a3b8; }
.zone-rouge { background: #b91c1c; }
.zone-orange { background: #ea580c; }
.zone-jaune { background: #facc15; }
.zone-blanc { background: #fff7d6; }

/* « En bref » : trois phrases en tête des règles, celles qu'une recherche ou une IA reprend. */
.en-bref { margin: 0 0 22px; padding: 14px 18px 12px; border: 1px solid var(--line); border-left: 4px solid var(--color-light); border-radius: 8px; background: var(--surface-2); }
.en-bref-titre { margin: 0 0 6px; font-weight: 800; color: #f0f3f6; }
.en-bref p:last-child { margin-bottom: 0; line-height: 1.6; }

footer .auth-inscription { color: var(--color-light); font-weight: 700; animation: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
