/* ==========================================================================
   HonteRP — design system partagé
   Palette : nuit violette, accents magenta. Une seule source de vérité pour
   les trois pages du site.
   ========================================================================== */

:root {
  /* Fonds */
  --bg:            #0f0f1a;
  --bg-alt:        #1a1a2e;
  --bg-card:       rgba(168, 85, 247, 0.08);
  --bg-card-hover: rgba(217, 70, 239, 0.15);

  /* Accents */
  --violet:        #a855f7;
  --magenta:       #d946ef;
  --gradient:      linear-gradient(135deg, #d946ef 0%, #a855f7 100%);

  /* Texte */
  --text:          #e0e0ff;
  --text-muted:    #c0b0ff;
  --text-dim:      #8f85b8;

  /* Bordures */
  --border:        rgba(168, 85, 247, 0.3);
  --border-strong: rgba(217, 70, 239, 0.6);

  /* Sémantique */
  --danger:        #f87171;
  --danger-bg:     rgba(248, 113, 113, 0.08);

  /* Structure */
  --radius:        12px;
  --nav-h:         72px;
  --container:     1300px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  /* Grille de fond très discrète, pour que le noir ne soit pas plat */
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.035) 1px, transparent 1px);
  background-size: 60px 60px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--magenta); color: #fff; }

:focus-visible {
  outline: 2px solid var(--magenta);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Texte en dégradé — utilisé par les titres */
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Un emoji doit rester EN DEHORS d'un .gradient-text : le background-clip
   découperait son glyphe et le réduirait à une silhouette magenta. Cette
   classe garantit qu'il garde ses couleurs propres même par accident. */
.emoji {
  -webkit-text-fill-color: initial;
  color: initial;
  background: none;
  font-style: normal;
}

/* Réservé aux lecteurs d'écran */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(15, 15, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* Ajoutée par le JS dès que la page défile */
.nav.is-scrolled {
  background: rgba(15, 15, 26, 0.94);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-logo {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin-right: auto;
}

.nav-links a {
  position: relative;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 0;
  transition: color 0.25s ease;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.25s ease;
}

.nav-links a:hover { color: #fff; }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--magenta); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* Bouton burger — masqué au-dessus de 900px */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  width: 42px;
  height: 42px;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   BOUTONS
   ========================================================================== */

.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease,
              background 0.25s ease, border-color 0.25s ease;
  text-align: center;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 20px rgba(217, 70, 239, 0.3);
}

.btn-primary:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(217, 70, 239, 0.5);
}

.btn-secondary {
  background: rgba(168, 85, 247, 0.15);
  color: var(--magenta);
  border: 2px solid var(--violet);
}

.btn-secondary:hover {
  background: rgba(168, 85, 247, 0.28);
  border-color: var(--magenta);
  transform: translateY(-4px);
}

.btn-light {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border: 2px solid #fff;
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-4px);
}

/* Version compacte, pour la barre de navigation */
.btn-sm {
  padding: 10px 18px;
  font-size: 0.8rem;
  letter-spacing: 0.5px;
}

.btn-sm:hover { transform: translateY(-2px); }

/* ==========================================================================
   HERO (accueil) & PAGE-HEADER (pages internes)
   ========================================================================== */

.hero,
.page-header {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
  padding: 110px 20px;
}

.page-header { padding: 80px 20px 60px; }

.hero::before,
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(168, 85, 247, 0.14) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(217, 70, 239, 0.14) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content,
.page-header-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2.6rem, 8vw, 5rem);
  font-weight: 900;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation: slideDown 0.8s ease-out both;
}

.hero-subtitle {
  font-size: clamp(1.05rem, 3vw, 1.5rem);
  font-weight: 600;
  color: var(--violet);
  margin-bottom: 15px;
  animation: slideUp 0.8s ease-out 0.2s both;
}

.hero-description {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 40px;
  animation: fadeIn 1s ease-out 0.4s both;
}

.cta-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeIn 1s ease-out 0.6s both;
}

.page-title {
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1px;
  margin-bottom: 14px;
}

.page-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto;
}

/* Fil d'ariane */
.breadcrumb {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 18px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.breadcrumb a:hover { color: var(--magenta); }

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.section {
  position: relative;
  padding: 80px 20px;
  background: var(--bg);
}

/* Liseré lumineux qui sépare les sections */
.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.5), transparent);
}

.section-alt {
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-alt) 100%);
}

/* Les sections alternées portent déjà un dégradé : la grille de fond du body
   n'y est plus visible, on la redessine pour garder le rythme d'une section
   à l'autre. */
.section-alt::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(168, 85, 247, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 85, 247, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.section-alt > * { position: relative; z-index: 1; }

.section-title {
  text-align: center;
  font-size: clamp(1.7rem, 5vw, 2.8rem);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 18px;
}

.section-lead {
  text-align: center;
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto 60px;
  font-size: 1.05rem;
}

.section-title + .grid,
.section-title + .stats-grid,
.section-title + .why-list,
.section-title + .addon-list,
.section-title + .steps { margin-top: 60px; }

/* ==========================================================================
   CARTES
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  max-width: var(--container);
  margin: 0 auto;
}

.card {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(217, 70, 239, 0.08) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 35px;
  transition: transform 0.3s ease, background 0.3s ease,
              border-color 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-12px);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(217, 70, 239, 0.15) 100%);
  border-color: var(--border-strong);
  box-shadow: 0 15px 40px rgba(217, 70, 239, 0.25);
}

.card-icon {
  font-size: 3.5rem;
  line-height: 1;
  margin-bottom: 20px;
  display: inline-block;
}

.card-title {
  color: var(--magenta);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ==========================================================================
   STATS
   ========================================================================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.stat-item {
  padding: 30px;
  text-align: center;
  background: var(--bg-card);
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}

.stat-item:hover {
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  border-color: var(--magenta);
}

.stat-number {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 10px;
}

/* Les cinq étoiles ne peuvent pas suivre la taille des chiffres : à 2.8rem
   elles dépassent la largeur de la carte et la dernière se fait rogner.
   Le min-height reproduit la hauteur qu'occupe un chiffre, pour que les
   libellés des quatre cartes restent alignés sur la même ligne. */
.stat-stars {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(clamp(1.8rem, 5vw, 2.8rem) * 1.6);
  margin-bottom: 10px;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  letter-spacing: 2px;
  white-space: nowrap;
}

.stat-label {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   LISTE « POURQUOI NOUS »
   ========================================================================== */

.why-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 25px;
  max-width: 1200px;
  margin: 0 auto;
}

.why-item {
  padding: 25px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1) 0%, rgba(217, 70, 239, 0.05) 100%);
  border-left: 5px solid var(--magenta);
  border-radius: 8px;
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
  transform: translateX(8px);
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.15) 0%, rgba(217, 70, 239, 0.1) 100%);
  box-shadow: 0 8px 25px rgba(217, 70, 239, 0.2);
}

.why-item-title {
  color: var(--magenta);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.why-item-text {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */

.final-cta {
  background: var(--gradient);
  padding: 70px 20px;
  text-align: center;
  color: #fff;
}

.final-cta h2 {
  font-size: clamp(1.7rem, 5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 20px;
}

.final-cta p {
  font-size: 1.15rem;
  font-weight: 500;
  opacity: 0.95;
  margin-bottom: 35px;
}

/* ==========================================================================
   PAGE RÈGLES — sommaire + articles
   ========================================================================== */

.rules-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 50px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.toc {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.toc-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 16px;
}

/* Intitulé d'une des deux parties, dans le sommaire */
.toc-group {
  margin: 18px 0 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--magenta);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.toc-group:first-of-type { margin-top: 0; }

.toc ol {
  list-style: none;
  counter-reset: toc;
}

.toc li { counter-increment: toc; }

.toc a {
  display: block;
  padding: 8px 0 8px 30px;
  position: relative;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  font-size: 0.8rem;
}

.toc a:hover { color: #fff; }

/* Ajoutée par le JS selon la section visible */
.toc a.active {
  color: var(--magenta);
  border-left-color: var(--magenta);
}

.rule-block {
  scroll-margin-top: calc(var(--nav-h) + 24px);
  margin-bottom: 50px;
}

.rule-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.rule-num {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.rule-head h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
}

/* ---- Les deux parties du règlement ---- */

.rule-part {
  margin-bottom: 60px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.rule-part:last-child { margin-bottom: 0; }

.part-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
  padding: 18px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.14) 0%, rgba(168, 85, 247, 0.08) 100%);
  font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  font-weight: 800;
  letter-spacing: 0.5px;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}

.part-count {
  margin-left: auto;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
}

/* ---- Boutons de partie ---- */

.rule-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.rule-tab {
  padding: 11px 20px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(168, 85, 247, 0.08);
  border: 2px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.25s ease, background 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease;
}

.rule-tab:hover {
  color: #fff;
  border-color: var(--border-strong);
}

.rule-tab.is-active {
  color: #fff;
  background: var(--gradient);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(217, 70, 239, 0.3);
}

/* ---- Barre de recherche ---- */

.rule-search { margin-bottom: 40px; }

.rule-search-field {
  position: relative;
  display: flex;
  align-items: center;
}

.rule-search-field .emoji {
  position: absolute;
  left: 18px;
  font-size: 1.05rem;
  pointer-events: none;
  opacity: 0.75;
}

#rule-search {
  width: 100%;
  padding: 15px 48px 15px 48px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: rgba(168, 85, 247, 0.08);
  border: 2px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.25s ease, background 0.25s ease;
  /* Neutralise la croix native de <input type="search"> : on fournit la nôtre */
  appearance: none;
  -webkit-appearance: none;
}

#rule-search::-webkit-search-cancel-button { display: none; }

#rule-search::placeholder { color: var(--text-dim); }

#rule-search:focus {
  outline: none;
  border-color: var(--magenta);
  background: rgba(168, 85, 247, 0.14);
}

.rule-search-clear {
  position: absolute;
  right: 10px;
  width: 32px;
  height: 32px;
  display: none;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.rule-search-clear:hover { background: var(--magenta); }

/* Le JS bascule cette classe dès que le champ contient quelque chose */
.rule-search.has-query .rule-search-clear { display: grid; }

.rule-search-status {
  margin-top: 12px;
  min-height: 1.4em;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* Aucun résultat */
.rule-search-empty {
  display: none;
  padding: 40px 24px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

.rule-search-empty strong { color: var(--magenta); }

/* Terme trouvé, surligné dans le texte des règles */
mark {
  background: rgba(217, 70, 239, 0.35);
  color: #fff;
  border-radius: 3px;
  padding: 0 2px;
}

/* Masquage utilitaire, piloté par la recherche */
.is-filtered { display: none; }

.rule-list { list-style: none; }

.rule-list li {
  position: relative;
  padding: 10px 0 10px 26px;
  color: var(--text-muted);
  font-size: 0.98rem;
}

.rule-list li::before {
  content: '\25B9';
  position: absolute;
  left: 0;
  top: 10px;
  color: var(--magenta);
  font-weight: 700;
}

.rule-list strong { color: var(--text); }

.callout {
  margin: 22px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--violet);
  border-radius: 8px;
  background: rgba(168, 85, 247, 0.1);
  font-size: 0.95rem;
  color: var(--text-muted);
}

.callout-danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

.callout-title {
  display: block;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.callout-danger .callout-title { color: var(--danger); }

/* ---- Fiche métier : un encadré par job, dans un bloc de règles ---- */

.job {
  margin: 16px 0;
  padding: 20px 22px;
  background: rgba(168, 85, 247, 0.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.job:hover {
  border-color: var(--border-strong);
  background: rgba(168, 85, 247, 0.1);
}

.job-name {
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
}

.job .rule-list li {
  padding: 6px 0 6px 24px;
  font-size: 0.93rem;
}

.job .rule-list li::before { top: 6px; }

/* Étiquette de rang (VIP, Divin) devant un nom de métier */
.job-tag {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- Tableau (seuils d'avertissement) ---- */

/* Un tableau ne doit jamais élargir la page : il défile dans son cadre */
.table-scroll {
  overflow-x: auto;
  margin: 22px 0;
}

.rule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.rule-table th,
.rule-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.rule-table th {
  color: var(--magenta);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.rule-table td { color: var(--text-muted); }

.rule-table td:first-child {
  color: var(--text);
  font-weight: 700;
}

.rule-table tbody tr:hover { background: rgba(168, 85, 247, 0.07); }

.rule-table tbody tr:last-child td { border-bottom: none; }

/* ==========================================================================
   PAGE WORKSHOP — étapes + addons
   ========================================================================== */

/* Bloc mis en avant : la collection obligatoire */
.spotlight {
  max-width: 900px;
  margin: 0 auto;
  padding: 45px;
  text-align: center;
  border: 2px solid var(--border-strong);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.12) 0%, rgba(168, 85, 247, 0.12) 100%);
  box-shadow: 0 20px 60px rgba(217, 70, 239, 0.15);
}

.spotlight-badge {
  display: inline-block;
  padding: 6px 16px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.spotlight h2 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 14px;
}

.spotlight p {
  color: var(--text-muted);
  max-width: 620px;
  margin: 0 auto 28px;
}

.steps {
  display: grid;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
  counter-reset: step;
}

.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 62px 1fr;
  gap: 22px;
  align-items: start;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.3s ease, background 0.3s ease;
}

.step:hover {
  border-color: var(--border-strong);
  background: rgba(168, 85, 247, 0.13);
}

.step::before {
  content: counter(step);
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--violet);
  background: rgba(168, 85, 247, 0.12);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--magenta);
}

.step h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.step code,
.inline-code {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 8px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.88em;
  color: var(--magenta);
}

.addon-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 16px;
  max-width: var(--container);
  margin: 0 auto;
}

.addon {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.addon:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.addon-icon { font-size: 1.6rem; line-height: 1; flex-shrink: 0; }
.addon-name { font-weight: 700; font-size: 0.98rem; }
.addon-meta { font-size: 0.82rem; color: var(--text-dim); }

/* ==========================================================================
   PIED DE PAGE
   ========================================================================== */

.footer {
  background: #0b0b13;
  border-top: 1px solid var(--border);
  padding: 55px 20px 30px;
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-logo {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 12px;
}

.footer-about {
  color: var(--text-dim);
  font-size: 0.9rem;
  max-width: 340px;
}

.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--magenta);
  font-weight: 800;
  margin-bottom: 16px;
}

.footer-col ul { list-style: none; }

.footer-col li { margin-bottom: 10px; }

.footer-col a {
  color: var(--text-dim);
  font-size: 0.92rem;
  transition: color 0.2s ease, padding-left 0.2s ease;
}

.footer-col a:hover { color: var(--magenta); padding-left: 4px; }

.footer-bottom {
  max-width: var(--container);
  margin: 40px auto 0;
  padding-top: 22px;
  border-top: 1px solid rgba(168, 85, 247, 0.15);
  text-align: center;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Apparition au scroll — le JS ajoute .is-visible */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* Décalage en cascade dans une grille */
.reveal-d1 { transition-delay: 0.08s; }
.reveal-d2 { transition-delay: 0.16s; }
.reveal-d3 { transition-delay: 0.24s; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1000px) {
  .rules-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 960px) {
  .nav-toggle { display: flex; }

  /* En dessous, la nav ne garde que le bouton Discord : « Copier l'IP » est
     un raccourci, pas une destination — c'est le premier sacrifié. */
  .nav-actions .btn-copy { display: none; }

  /* Le menu se replie en panneau déroulant sous la barre */
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 10px 20px 20px;
    background: rgba(15, 15, 26, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  }

  .nav-links.is-open { opacity: 1; visibility: visible; transform: none; }

  .nav-links li { border-bottom: 1px solid rgba(168, 85, 247, 0.15); }
  .nav-links a { display: block; padding: 16px 4px; font-size: 1.05rem; }
  .nav-links a::after { display: none; }

  .nav-inner { gap: 14px; justify-content: space-between; }
  .nav-actions { margin-left: auto; }
}

@media (max-width: 768px) {
  body { background-size: 40px 40px; }
  .hero { padding: 70px 20px; }
  .cta-buttons { flex-direction: column; }
  .cta-buttons .btn { width: 100%; }
  .card { padding: 26px; }
  .spotlight { padding: 30px 22px; }
  .step { grid-template-columns: 1fr; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 420px) {
  .nav-logo { font-size: 1.1rem; }
  .nav-actions .btn { padding: 9px 14px; font-size: 0.72rem; }
}

/* Respect du réglage système « réduire les animations » */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
