/* ============================================================
   GUIDE.CSS — Page de guide (style "dossier de briefing tactique")
   Réutilise les tokens de style.css (couleurs, polices) pour rester
   cohérent avec le reste du site, avec une identité "document" propre.
   ============================================================ */

#guide {
  max-width: 1400px;
  margin: auto;
}

.guide-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 30px;
  counter-reset: guide-entry;
}

/* ---------- Entrée d'index (liste des guides, page d'accueil) ---------- */
.guide-card {
  counter-increment: guide-entry;
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  padding: 20px 24px;
  text-decoration: none;
  color: white;
  transition: border-color 0.2s ease, background 0.2s ease, padding-left 0.2s ease;
}

.guide-card::before {
  content: counter(guide-entry, decimal-leading-zero);
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--dim);
  border: 1px solid var(--line);
  padding: 4px 9px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.guide-card::after {
  content: '→';
  margin-left: auto;
  flex-shrink: 0;
  font-family: 'JetBrains Mono', monospace;
  color: var(--dim);
  font-size: 16px;
  transition: transform 0.2s ease, color 0.2s ease;
}

.guide-card:hover {
  border-left-color: var(--accent);
  background: #182130;
  padding-left: 28px;
}
.guide-card:hover::before {
  color: var(--accent);
  border-color: var(--accent);
}
.guide-card:hover::after {
  color: var(--accent);
  transform: translateX(4px);
}

.guide-content {
  padding: 0;
  text-align: left;
  z-index: 1;
}

.guide-content h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
  text-transform: none;
  letter-spacing: 0;
}

/* ============================================================
   PAGE D'UN GUIDE (guerre-galactique.html, etc.)
   ============================================================ */

/* Cette page réutilise <section id="guide"> pour la mise en page globale,
   mais le contenu d'article utilise .guide-section — toujours visible,
   contrairement aux onglets de la page d'accueil qui masquent <section>. */
.guide-section {
  display: block;
}

main#guide {
  max-width: 820px;
  padding: 40px 20px;
}

/* ---------- Lien retour ---------- */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dim);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 7px 12px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.back-link:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- En-tête d'article ---------- */
.guide-article {
  margin-top: 24px;
}

.guide-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
  margin-bottom: 36px;
  position: relative;
}

.guide-header::before {
  content: 'DOSSIER DE BRIEFING';
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 10px;
}

.guide-header h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
  color: #fff;
}

/* ---------- Sections numérotées ---------- */
.guide-section {
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.guide-section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.guide-section h2 {
  font-size: 19px;
  color: #fff;
  margin: 0 0 16px;
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}

.guide-section h3 {
  font-size: 15px;
  color: var(--accent);
  text-transform: none;
  letter-spacing: 0;
  margin: 0 0 8px;
}

.guide-section p {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  margin: 0 0 14px;
}

.guide-section strong {
  color: #fff;
  font-weight: 700;
}

/* ---------- Listes ---------- */
.guide-list {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
.guide-list li {
  position: relative;
  padding: 10px 0 10px 24px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
  border-bottom: 1px dashed var(--line);
}
.guide-list li:last-child { border-bottom: none; }
.guide-list li::before {
  content: '»';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
}

.guide-steps {
  list-style: none;
  counter-reset: guide-step;
  margin: 0 0 16px;
  padding: 0;
}
.guide-steps li {
  counter-increment: guide-step;
  position: relative;
  padding: 4px 0 4px 40px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-steps li::before {
  content: counter(guide-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--bg);
  background: var(--accent);
}

/* ---------- Cartes (grille de bonus) — cadre "viseur HUD" ---------- */
.guide-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.guide-card-grid .guide-card,
.guide-card-grid > .guide-card {
  min-height: auto;
  display: block;
  text-align: left;
  background: var(--panel);
  border: none;
  padding: 18px 20px;
}

/* redéfinition locale : dans la grille de bonus, .guide-card est un panneau
   de contenu (pas un lien vers une page), donc on retire le style "carte-lien" */
.guide-card-grid .guide-card {
  position: relative;
}

.hud-frame,
.guide-card-grid .guide-card,
.guide-callout {
  position: relative;
}

.hud-frame::before, .hud-frame::after,
.guide-card-grid .guide-card::before, .guide-card-grid .guide-card::after,
.guide-callout::before, .guide-callout::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  opacity: 0.85;
}
.guide-card-grid .guide-card::before, .guide-callout::before {
  top: -1px; left: -1px;
  border-right: none; border-bottom: none;
}
.guide-card-grid .guide-card::after, .guide-callout::after {
  bottom: -1px; right: -1px;
  border-left: none; border-top: none;
}

.guide-card-grid .guide-card h3 {
  font-family: 'Rajdhani', sans-serif;
  text-transform: none;
}
.guide-card-grid .guide-card p {
  margin: 0;
  font-size: 13.5px;
}

/* ---------- Encart d'info ---------- */
.guide-callout {
  background: var(--panel);
  border-left: 3px solid var(--prot);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}
.guide-callout-info::before,
.guide-callout-info::after {
  border-color: var(--prot);
}
.guide-callout strong {
  color: var(--prot);
}

/* ---------- Conseils stratégiques ---------- */
.guide-tips {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tip-item {
  display: flex;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text);
}
.tip-item:last-child { border-bottom: none; }
.tip-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.tip-item strong {
  color: #fff;
}

@media (max-width: 640px) {
  .guide-header h1 { font-size: 24px; }
  .guide-section h2 { font-size: 17px; }
}
