/*
 * Donjon Express — identité visuelle de l'accueil.
 *
 * Ne contient QUE ce que le CSS partagé (css/accueil.css, servi par
 * proxies/css-accueil.php) ne fournit pas : le hero du jeu, sa pierre, ses
 * torches, la grille des héros et le bloc FAQ. Tout le reste (.hero-flex,
 * .hero-visual, .modes, .mode-card, .rules, .blog-section...) vient du partagé -
 * ne rien redéfinir ici, surtout pas .hero-flex.
 *
 * Perf : pas de backdrop-filter permanent, pas de box-shadow animé en boucle,
 * pas de position: fixed décoratif. Animations en transform/opacity seulement.
 */

/* ================= HERO ================= */

.hero-donjon {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 32px 28px;
  margin-bottom: 30px;
  /* Pierre chaude sous une lueur de torche : le donjon vu d'en haut. */
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(251, 191, 36, 0.22) 0%, rgba(251, 191, 36, 0) 60%),
    linear-gradient(165deg, #4a3520 0%, #2a1d12 48%, #120c07 100%);
  border: 1px solid rgba(251, 191, 36, 0.38);
}

/* Ourlet doré en bas, comme le seuil d'une porte éclairée. */
.hero-donjon::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(90deg, rgba(251, 191, 36, 0) 0%, rgba(251, 191, 36, 0.8) 50%, rgba(251, 191, 36, 0) 100%);
  pointer-events: none;
}

.hero-donjon > * { position: relative; z-index: 1; }

/* Appareillage de pierre : deux dégradés répétés, aucun élément supplémentaire. */
.hero-pierre {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(to right, rgba(253, 230, 138, 0.10) 2px, transparent 2px),
    linear-gradient(to bottom, rgba(253, 230, 138, 0.10) 2px, transparent 2px);
  background-size: 62px 34px;
  /* L'appareillage s'efface sur les bords pour ne pas concurrencer le texte. */
  mask-image: radial-gradient(120% 100% at 50% 20%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 20%, #000 0%, transparent 78%);
}

/* ================= TORCHES DECORATIVES ================= */

.hero-torches {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.hero-torche {
  position: absolute;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.55;
  will-change: transform, opacity;
}

.hero-torche-1 {
  top: 12%;
  left: 8%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.55) 0%, rgba(251, 191, 36, 0) 70%);
  animation: dx-vacille 3.4s ease-in-out infinite;
}
.hero-torche-2 {
  top: 58%;
  right: 10%;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.5) 0%, rgba(249, 115, 22, 0) 70%);
  animation: dx-vacille 4.1s ease-in-out infinite 0.7s;
}
.hero-torche-3 {
  bottom: 8%;
  left: 42%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.45) 0%, rgba(167, 139, 250, 0) 70%);
  animation: dx-vacille 5s ease-in-out infinite 1.6s;
}

/* Le vacillement passe par transform et opacity : aucun recalcul de layout. */
@keyframes dx-vacille {
  0%, 100% { opacity: 0.35; transform: scale(0.94); }
  45%      { opacity: 0.7;  transform: scale(1.07); }
  70%      { opacity: 0.5;  transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-torche { animation: none; opacity: 0.4; }
}

@media (max-width: 640px) {
  /* Trois halos sur un hero étroit, ça sature : on n'en garde qu'un. */
  .hero-torche-2, .hero-torche-3 { display: none; }
  .hero-donjon { padding: 24px 18px; }
  .hero-pierre { background-size: 44px 24px; }
}

/* ================= CARTES DE MODES ================= */

/*
 * Les cartes de mode sont des <a> : sans ça, le navigateur les souligne en
 * bleu. (Le partagé style .mode-card mais suppose un conteneur non-lien.)
 */
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;
}

/* ================= LES QUATRE HEROS ================= */

/*
 * « Lequel je prends ? » est la première question de quelqu'un qui découvre le
 * jeu : elle mérite mieux qu'une ligne de texte.
 */
.heros-grille {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
  margin: 18px 0 8px;
}

.heros-carte {
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border-left-width: 3px;
}
.heros-chevalier { border-left-color: #cbd5e1; }
.heros-archere   { border-left-color: #86efac; }
.heros-mage      { border-left-color: #c4b5fd; }
.heros-voleur    { border-left-color: #94a3b8; }

.heros-glyphe {
  display: inline-block;
  font-size: 1.1rem;
  line-height: 1;
  margin-right: 6px;
  vertical-align: -1px;
}
.heros-nom {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--color-accent);
  margin-bottom: 4px;
}
.heros-detail { display: block; font-size: 0.8rem; color: #a8a29e; line-height: 1.55; }

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

.faq-section { margin: 34px 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: #f5f5f4;
  font: inherit;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  /* Cible tactile confortable. */
  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, pas dans une
   classe à part - 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: #a8a29e; line-height: 1.7; }
.faq-answer[hidden] { display: none; }
.faq-answer p { margin: 0 0 10px; }
.faq-answer p:last-child { margin-bottom: 0; }
