/* ═══════════════════════════════════════════════════
   Guide - styles complémentaires (s'appuie sur style.css)
   ═══════════════════════════════════════════════════ */

/* ── Layout principal ── */
.guide-wrapper { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.5rem 4rem; position: relative; z-index: 1; }

/* ── Sommaire sidebar (TOC) ── */
.guide-toc {
  position: relative;
  margin-bottom: 1.5rem; padding: 1rem 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px;
}
.guide-toc__title {
  font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600;
  color: var(--gold); margin: 0 0 0.6rem; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.guide-toc__list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 0.15rem;
}
.guide-toc__link {
  display: block; padding: 0.3rem 0.5rem;
  font-size: 0.72rem; line-height: 1.35;
  color: var(--text-secondary); text-decoration: none;
  border-left: 2px solid transparent;
  border-radius: 0 4px 4px 0;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.guide-toc__link:hover {
  color: var(--gold); background: rgba(201,168,76,0.06);
}
.guide-toc__link.is-active {
  color: var(--gold); border-left-color: var(--gold);
  background: rgba(201,168,76,0.08); font-weight: 600;
}
body.light-mode .guide-toc {
  background: #fff; border-color: rgba(0,0,0,0.08);
}
body.light-mode .guide-toc__link { color: #666; }
body.light-mode .guide-toc__link:hover { color: #8b6914; background: rgba(139,105,20,0.06); }
body.light-mode .guide-toc__link.is-active {
  color: #8b6914; border-left-color: #8b6914; background: rgba(139,105,20,0.08);
}
/* Glossaire : sommaire alphabétique compact */
.guide-toc.is-alpha .guide-toc__list {
  flex-direction: row; flex-wrap: wrap; gap: 0.35rem;
}
.guide-toc.is-alpha .guide-toc__link {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  border-left: none; border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  text-align: center;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
}
.guide-toc.is-alpha .guide-toc__link:hover {
  background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.35);
}
.guide-toc.is-alpha .guide-toc__link.is-active {
  background: rgba(201,168,76,0.2); border-color: var(--gold);
  color: var(--gold);
}
body.light-mode .guide-toc.is-alpha .guide-toc__link {
  background: rgba(139,105,20,0.06); border-color: rgba(139,105,20,0.15); color: #666;
}
body.light-mode .guide-toc.is-alpha .guide-toc__link:hover {
  background: rgba(139,105,20,0.12); border-color: rgba(139,105,20,0.3);
}
body.light-mode .guide-toc.is-alpha .guide-toc__link.is-active {
  background: rgba(139,105,20,0.18); border-color: #8b6914; color: #8b6914;
}

/* ── Glossaire search sidebar ── */
.glossaire-search-sidebar {
  position: relative;
  margin-bottom: 1.5rem; padding: 1.25rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px;
}
.glossaire-search__title {
  font-family: var(--font-heading); font-size: 0.8rem; font-weight: 600;
  color: var(--gold); margin: 0 0 0.75rem; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.glossaire-search__input-wrap {
  position: relative;
}
.glossaire-search__icon {
  position: absolute; left: 0.7rem; top: 50%; transform: translateY(-50%);
  color: rgba(201,168,76,0.5); pointer-events: none;
}
.glossaire-search__input-wrap input {
  width: 100%; padding: 0.55rem 0.7rem 0.55rem 2.2rem;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 8px; color: var(--text-primary);
  font-family: var(--font-body); font-size: 0.82rem;
  transition: border-color 0.2s;
}
.glossaire-search__input-wrap input:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}
.glossaire-search__input-wrap input::placeholder {
  color: var(--text-muted); font-size: 0.78rem;
}
.glossaire-search__count {
  margin-top: 0.5rem; font-size: 0.7rem; color: var(--text-muted);
  text-align: right;
}
.glossaire-search__alpha {
  margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.3rem;
}
.glossaire-alpha__btn {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; padding: 0;
  background: rgba(201,168,76,0.06); border: 1px solid rgba(201,168,76,0.15);
  border-radius: 5px; color: var(--text-secondary);
  font-size: 0.72rem; font-weight: 600; cursor: pointer;
  transition: all 0.15s;
}
.glossaire-alpha__btn:hover {
  background: rgba(201,168,76,0.15); border-color: var(--gold); color: var(--gold);
}
body.light-mode .glossaire-search-sidebar {
  background: #fff; border-color: rgba(0,0,0,0.08);
}
body.light-mode .glossaire-search__input-wrap input {
  background: #f5f3ef; border-color: #e0ddd5; color: #101e3c;
}
body.light-mode .glossaire-alpha__btn {
  background: rgba(139,105,20,0.06); border-color: rgba(139,105,20,0.15); color: #666;
}
body.light-mode .glossaire-alpha__btn:hover {
  background: rgba(139,105,20,0.12); border-color: #8b6914; color: #8b6914;
}

/* ── Symbole Nœud Nord / Sud ── */
.node-symbol-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin: 0 auto 2.5rem; max-width: 260px;
  padding: 2.5rem 1.5rem 1.75rem;
  border-radius: 20px;
  background: radial-gradient(ellipse at 50% 40%, rgba(123,104,238,0.1) 0%, transparent 70%);
  border: 1px solid rgba(123,104,238,0.2);
}
.node-symbol {
  width: 140px; height: 140px;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold);
  filter: drop-shadow(0 0 18px rgba(123,104,238,0.5));
}
.node-symbol svg { width: 100%; height: 100%; }
.node-symbol__label {
  margin-top: 1rem; font-size: 0.82rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: rgba(201,168,76,0.6); text-align: center;
}

/* ── Sidebar planètes - blocs pleine largeur ── */
.sidebar-planets { padding: 0; }
.sidebar-planets__title {
  font-family: var(--font-heading); font-size: 0.75rem; font-weight: 600;
  color: var(--gold); text-transform: uppercase; letter-spacing: 0.1em;
  margin: 0 0 1rem; padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
}
.sidebar-planets__grid {
  display: flex; flex-direction: column; gap: 0.5rem;
}
.sidebar-planets__credit {
  margin-top: 0.75rem; font-size: 0.65rem; color: var(--text-muted);
  text-align: center; opacity: 0.6;
}
.sidebar-planets__credit a { color: var(--gold); text-decoration: none; }
.sidebar-planets__credit a:hover { text-decoration: underline; }

/* Bloc planète */
.planet-block { width: 100%; }
.planet-block__link {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.75rem 0.5rem 0.6rem;
  border-radius: 12px; text-decoration: none;
  transition: background 0.18s, transform 0.18s;
  border: 1px solid transparent;
}
.planet-block__link:hover {
  background: rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.15);
  transform: translateY(-1px);
}
.planet-block.is-current .planet-block__link {
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.25);
  pointer-events: none;
}

/* Sphère dans le bloc */
.planet-block__sphere-wrap {
  position: relative;
  width: 100%; max-width: 180px;
  aspect-ratio: 1;
}
.planet-block__sphere-wrap.has-ring {
  max-width: 200px;
}
.planet-block__sphere {
  display: block;
  width: 100%; height: 100%;
  border-radius: 50%;
  background-size: 200% auto;
  animation: planet-sidebar-spin 10s linear infinite;
}
.is-current .planet-block__sphere { animation-play-state: paused; }

/* Éclairage 3D */
.planet-block__light {
  position: absolute; inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 33% 28%, rgba(255,255,255,0.3) 0%, transparent 48%),
    radial-gradient(circle at 70% 72%, rgba(0,0,0,0.5) 0%, transparent 42%);
  pointer-events: none; z-index: 2;
}

/* Anneau Saturne */
.planet-block__ring {
  position: absolute;
  top: 50%; left: 50%;
  width: 140%; height: 35%;
  transform: translate(-50%, -50%) rotateX(70deg);
  border-radius: 50%;
  border: 4px solid rgba(212,192,138,0.5);
  box-shadow: 0 0 6px rgba(212,192,138,0.2);
  pointer-events: none; z-index: 1;
}

/* Nom sous la sphère */
.planet-block__name {
  margin-top: 0.6rem;
  font-size: 0.8rem; font-weight: 500;
  color: var(--text-secondary); text-align: center;
  transition: color 0.18s;
  display: flex; align-items: center; gap: 0.3rem;
}
.planet-block__sym {
  font-size: 0.75rem; color: var(--gold); opacity: 0.7;
}
.planet-block__link:hover .planet-block__name { color: var(--gold); }
.is-current .planet-block__name { color: var(--gold); font-weight: 600; }

@keyframes planet-sidebar-spin {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* ── Planet 3D illustration ── */
.planet-3d-wrap {
  width: 100%; max-width: 460px;
  margin: 0 auto 2.5rem;
  border-radius: 16px;
  background: radial-gradient(ellipse at center, #050c1c 0%, #030810 100%);
  box-shadow: 0 8px 48px rgba(0,0,0,0.6), 0 0 0 1px rgba(201,168,76,0.1);
  position: relative;
}
.planet-3d-wrap canvas {
  display: block;
  width: 100% !important;
  border-radius: 16px;
}
body.light-mode .planet-3d-wrap {
  background: radial-gradient(ellipse at center, #12122a 0%, #060615 100%);
  box-shadow: 0 8px 48px rgba(0,0,0,0.35), 0 0 0 1px rgba(139,105,20,0.15);
}

.guide-layout { display: grid; grid-template-columns: 1fr 260px; gap: 2.5rem; align-items: start; }
/* Modifier - pages sans sidebar (circuits hub, taxonomy circuit) :
   on récupère les 260px réservés et le gap pour passer en pleine largeur. */
.guide-layout.guide-layout--full { grid-template-columns: 1fr; gap: 0; }

.guide-main { min-width: 0; }

.guide-page-title {
  font-family: var(--font-heading); font-size: clamp(1.8rem,4vw,2.8rem);
  font-weight: 300; color: var(--gold); margin-bottom: 1.75rem;
  padding-bottom: 1rem; border-bottom: none;
}
.guide-page-title::after {
  content: ''; display: block; width: 100%; max-width: 200px; height: 1px;
  background: linear-gradient(to right, var(--gold), transparent);
  margin: 0.5rem 0 0;
}

/* ── Section cards (mode nuit uniquement) ── */
.guide-section-card {
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.75rem 2rem 1.5rem;
  margin-bottom: 1.25rem;
  transition: border-color 0.2s;
}
.guide-section-card:hover {
  background: rgba(201,168,76,0.04);
  border-color: rgba(201,168,76,0.18);
}
.guide-section-card > h2:first-child { margin-top: 0; }

/* Intro card : pas de boite */
.guide-section-card--intro {
  background: transparent !important;
  border: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-shadow: none !important;
}

/* Mode jour : cartes blanches sur fond beige */
body.light-mode .guide-section-card {
  background: rgba(255,255,255,0.75);
  border-color: rgba(0,0,0,0.07);
  box-shadow: 0 1px 5px rgba(0,0,0,0.05);
}
body.light-mode .guide-section-card:hover {
  background: rgba(255,255,255,0.92);
  border-color: rgba(139,105,20,0.20);
  box-shadow: 0 2px 10px rgba(0,0,0,0.07);
}
body.light-mode .guide-section-card--intro {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* ── Contenu des pages ── */
.guide-content { color: var(--text-secondary); line-height: 1.8; font-size: 0.9rem; }
.guide-content h2 {
  font-family: var(--font-heading); font-size: 1.5rem; font-weight: 400;
  color: var(--gold); margin: 2rem 0 1rem; padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}
.guide-content h3 {
  font-family: var(--font-heading); font-size: 1.45rem; font-weight: 400;
  color: var(--text-primary); margin: 1.8rem 0 0.7rem;
}
.guide-content h4 {
  font-size: 1.1rem; font-weight: 600;
  color: var(--gold-light); margin: 1.5rem 0 0.6rem;
}
.guide-content h5 {
  font-size: 0.95rem; font-weight: 600;
  color: var(--text-primary); margin: 1.2rem 0 0.5rem;
}
.guide-content h6 {
  font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--text-muted); margin: 1rem 0 0.4rem;
}
.guide-content p { margin-bottom: 1rem; }
.guide-content strong { color: var(--text-primary); font-weight: 600; }
.guide-content em { color: var(--gold-light); font-style: italic; }
.guide-content ul, .guide-content ol { margin: 0.75rem 0 1rem 1.5rem; }
.guide-content li { margin-bottom: 0.4rem; }
.guide-content a { color: var(--gold); text-decoration: underline; text-decoration-color: rgba(201,168,76,0.4); }
.guide-content a:hover { color: var(--gold-light); }
.guide-content blockquote {
  border-left: 3px solid var(--gold); margin: 1.5rem 0; padding: 0.75rem 1.25rem;
  background: rgba(201,168,76,0.05); border-radius: 0 8px 8px 0;
  color: var(--text-primary); font-style: italic;
}


/* ── Sidebar ── */
.guide-sidebar {
  display: flex; flex-direction: column; gap: 1.5rem;
}
.guide-sidebar > .sidebar-generator {
  order: 99;
}

/* ── Navigation fratrie (Explorer) ── */
.guide-sibling-nav {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.25rem;
}
.guide-sibling-nav .guide-toc__title {
  font-family: var(--font-heading); font-size: 0.9rem; font-weight: 500;
  color: var(--gold); letter-spacing: 0.05em; text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.guide-sibling-nav ul { list-style: none; display: flex; flex-direction: column; gap: 0.15rem; }
.guide-sibling-nav li { list-style: none; }
.guide-sibling-nav li a {
  display: block; font-size: 0.8rem; color: var(--text-muted); text-decoration: none;
  padding: 0.35rem 0.6rem; border-radius: 6px; transition: all var(--transition); line-height: 1.4;
}
.guide-sibling-nav li a:hover { color: var(--text-primary); background: rgba(201,168,76,0.05); }
.guide-sibling-nav li.active a { color: var(--gold); background: rgba(201,168,76,0.08); font-weight: 500; }

/* ── Sidebar mini generator ── */
.sidebar-generator {
  background: linear-gradient(135deg, rgba(201,168,76,0.1), rgba(201,168,76,0.03));
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 12px; padding: 1.25rem; margin-top: 1.25rem;
}
.sidebar-generator__title {
  font-family: var(--font-heading); font-size: 1.3rem; font-weight: 500;
  color: var(--gold); margin: 0 0 0.8rem;
}
.sidebar-generator__form { display: flex; flex-direction: column; gap: 0.5rem; }
.sg-row { display: flex; gap: 0.4rem; }
.sg-row--3 .sg-field { flex: 1; }
.sg-row--2 .sg-field { flex: 1; }
.sg-field label {
  display: block; font-size: 0.6rem; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.15rem;
}
.sg-field select,
.sg-field input[type="text"] {
  width: 100%; padding: 0.4rem 0.3rem; border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-secondary); color: var(--text-primary);
  font-size: 0.8rem; font-family: var(--font-body);
  box-sizing: border-box;
}
.sg-field select:focus,
.sg-field input[type="text"]:focus {
  outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201,168,76,0.15);
}
.sidebar-generator__btn {
  margin-top: 0.4rem; width: 100%; padding: 0.55rem 1rem;
  background: var(--gold); color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  border: none; border-radius: 6px; cursor: pointer;
  font-weight: 600; font-size: 0.8rem; font-family: var(--font-body);
  transition: opacity 0.2s;
}
.sidebar-generator__btn:hover { opacity: 0.85; }

/* ── Navigation Précédent / Suivant ── */
.guide-prev-next {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border);
}
.gpn-link {
  display: flex; align-items: center; gap: 0.75rem; text-decoration: none;
  padding: 0.9rem 1.25rem; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; transition: all var(--transition); max-width: 48%;
}
.gpn-link:hover { border-color: var(--gold); box-shadow: var(--glow); }
.gpn-next { margin-left: auto; text-align: right; }
.gpn-arrow { font-size: 1.2rem; color: var(--gold); flex-shrink: 0; }
.gpn-meta { display: flex; flex-direction: column; gap: 0.15rem; }
.gpn-label { font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.gpn-title { font-size: 0.85rem; color: var(--text-primary); line-height: 1.3; }

/* ── Accordéons ── */
.g-accordion { border: 1px solid var(--border); border-radius: 10px; margin-bottom: 0.5rem; overflow: hidden; }
.g-acc-header {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.1rem; background: var(--bg-card); border: none; cursor: pointer;
  color: var(--text-primary); font-family: var(--font-body); font-size: 0.9rem;
  font-weight: 500; text-align: left; transition: background var(--transition);
}
.g-acc-header:hover { background: rgba(201,168,76,0.06); }
.g-acc-header.open { color: var(--gold); background: rgba(201,168,76,0.08); }
.g-acc-arrow { font-size: 0.65rem; color: var(--text-muted); transition: transform var(--transition); flex-shrink: 0; margin-left: 0.5rem; }
.g-acc-header.open .g-acc-arrow { transform: rotate(180deg); color: var(--gold); }
.g-acc-body { display: none; }
.g-acc-body.open { display: block; animation: fadeUp 0.2s ease-out; }
.g-acc-inner { padding: 1rem 1.25rem 1.1rem; background: var(--bg-card); font-size: 0.88rem; line-height: 1.75; color: var(--text-secondary); }
.g-acc-inner p:last-child { margin-bottom: 0; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Nav styles moved to style.css - available on all pages */

/* Hub cards for landing page */
.guide-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin: 2rem 0; }
.guide-hub-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; text-decoration: none; transition: all var(--transition); display: block; }
.guide-hub-card:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: var(--glow); }
.guide-hub-card__icon {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: 0.75rem;
  background: rgba(201,168,76,0.08); border: 1px solid rgba(201,168,76,0.18);
  border-radius: 10px; color: var(--gold);
  transition: background 0.2s, border-color 0.2s;
}
.guide-hub-card:hover .guide-hub-card__icon {
  background: rgba(201,168,76,0.15); border-color: rgba(201,168,76,0.4);
}
.guide-hub-card__icon svg { width: 24px; height: 24px; }
body.light-mode .guide-hub-card__icon {
  background: rgba(139,105,20,0.06); border-color: rgba(139,105,20,0.15); color: #8b6914;
}
body.light-mode .guide-hub-card:hover .guide-hub-card__icon {
  background: rgba(139,105,20,0.12); border-color: rgba(139,105,20,0.3);
}
.guide-hub-card__title { font-family: var(--font-heading); font-size: 1.1rem; color: var(--gold); margin-bottom: 0.4rem; }
.guide-hub-card__desc { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.5; }

/* Tabs for guide pages */
.g-tabs { margin: 1.5rem 0; }
.g-tabs-nav { display: flex; flex-wrap: wrap; gap: 0.25rem; border-bottom: 2px solid var(--border); margin-bottom: 0; }
.g-tab-btn { background: none; border: none; border-bottom: 2px solid transparent; padding: 0.75rem 1rem; margin-bottom: -2px; font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--text-primary); cursor: pointer; transition: all var(--transition); }
.g-tab-btn:hover { color: #fff; }
.g-tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.g-tab-panel { display: none; padding: 1.5rem 0; }
.g-tab-panel.active { display: block; animation: fadeUp 0.3s ease-out; }

/* Compare cards */
.guide-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.guide-compare-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1.25rem; }
.guide-compare-card h4 { color: var(--gold); margin: 0 0 0.5rem; font-family: var(--font-heading); }

/* ── Tables ── */
.guide-content table,
.porte-content table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 1.5rem 0; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
  background: var(--bg-card);
  font-size: 0.88rem;
}
.guide-content thead,
.porte-content thead {
  background: linear-gradient(135deg, rgba(201,168,76,0.15), rgba(201,168,76,0.06));
}
.guide-content th,
.porte-content th {
  padding: 0.75rem 1rem;
  font-family: var(--font-heading);
  font-weight: 500; font-size: 0.85rem;
  color: var(--gold);
  text-align: left;
  letter-spacing: 0.03em;
  border-bottom: 2px solid rgba(201,168,76,0.25);
}
.guide-content td,
.porte-content td {
  padding: 0.7rem 1rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.15s;
}
.guide-content tr:last-child td,
.porte-content tr:last-child td {
  border-bottom: none;
}
.guide-content tbody tr:hover td,
.porte-content tbody tr:hover td {
  background: rgba(201,168,76,0.04);
}
.guide-content tbody tr:nth-child(even) td,
.porte-content tbody tr:nth-child(even) td {
  background: rgba(255,255,255,0.015);
}
.guide-content tbody tr:nth-child(even):hover td,
.porte-content tbody tr:nth-child(even):hover td {
  background: rgba(201,168,76,0.05);
}
.guide-content td strong,
.porte-content td strong { color: var(--text-primary); }
.guide-content td em,
.porte-content td em { color: var(--gold-light); font-style: italic; }

/* First column accent */
.guide-content td:first-child,
.porte-content td:first-child {
  color: var(--text-primary); font-weight: 500;
}

/* ── Porte popup ── */
.porte-popup-overlay {
  display: none; position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(0,0,0,0.75); align-items: center; justify-content: center;
  padding: 2rem;
}
.porte-popup-overlay.open { display: flex; }
.porte-popup {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; width: 100%; max-width: 700px;
  max-height: 85vh; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.porte-popup__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.porte-popup__title {
  font-family: var(--font-heading); font-size: 1.2rem; font-weight: 400;
  color: var(--gold); margin: 0;
}
.porte-popup__close {
  background: none; border: none; color: var(--text-muted);
  font-size: 1.8rem; cursor: pointer; line-height: 1; padding: 0;
}
.porte-popup__close:hover { color: var(--text-primary); }
.porte-popup__body {
  padding: 1.5rem; overflow-y: auto; flex: 1;
  color: var(--text-secondary); font-size: 0.88rem; line-height: 1.75;
}
.porte-popup__body h2 {
  font-family: var(--font-heading); font-size: 1.3rem; font-weight: 400;
  color: var(--text-primary); margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
}
.porte-popup__body h2:first-child { margin-top: 0; }
.porte-popup__body h3 {
  font-size: 1.1rem; color: var(--gold-light); margin: 1.2rem 0 0.5rem;
}
.porte-popup__body p { margin: 0 0 0.8rem; }
.porte-popup__body ul { margin: 0 0 1rem 1.2rem; padding: 0; }
.porte-popup__body li { margin-bottom: 0.3rem; }
.porte-popup__body strong { color: var(--text-primary); }
.porte-popup__body em { color: var(--gold-light); }
.porte-popup__body blockquote {
  border-left: 3px solid var(--gold); margin: 1rem 0;
  padding: 0.6rem 1rem; background: rgba(201,168,76,0.05);
  border-radius: 0 8px 8px 0; font-style: italic;
}
.porte-popup__loading {
  text-align: center; color: var(--text-muted); padding: 2rem;
  font-style: italic;
}
.porte-popup__link {
  display: block; text-align: center; padding: 0.8rem;
  border-top: 1px solid var(--border);
  color: var(--gold); text-decoration: none; font-size: 0.85rem; font-weight: 500;
  flex-shrink: 0;
}
.porte-popup__link:hover { background: rgba(201,168,76,0.05); }

/* Row hover */
.porte-row:hover td { background: rgba(201,168,76,0.06) !important; }

/* Responsive table */
@media (max-width: 600px) {
  .guide-content table,
  .porte-content table { font-size: 0.8rem; }
  .guide-content th,
  .guide-content td,
  .porte-content th,
  .porte-content td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 900px) {
  .guide-toc { display: none; }
  .guide-hub-grid { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }

  .guide-prev-next { flex-direction: column; }
  .gpn-link { max-width: 100%; }

  /* Sidebar planètes en dessous : 2 colonnes */
  .sidebar-planets__grid {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .planet-block {
    width: calc(50% - 0.25rem);
  }
  .planet-block__sphere-wrap { max-width: 140px; }
  .planet-block__sphere-wrap.has-ring { max-width: 160px; }
}

@media (max-width: 600px) {
  .guide-wrapper { padding: 1rem 1rem 3rem; }
  .guide-page-title { font-size: 1.6rem; }
  .guide-compare { grid-template-columns: 1fr; }
  .g-tabs-nav { gap: 0.1rem; }
  .g-tab-btn { padding: 0.6rem 0.7rem; font-size: 0.75rem; }
}

/* ══════════════════════════════════════════════════
   Système Solaire
   ══════════════════════════════════════════════════ */
.solar-system-section {
  margin-top: 4rem;
  border-top: 1px solid rgba(201,168,76,0.1);
  padding-top: 2rem;
  position: relative;
}
.solar-system-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.solar-system-title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  color: var(--gold);
  font-weight: 400;
  letter-spacing: 0.04em;
}
.solar-system-subtitle {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
}
.solar-system-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(201,168,76,0.07);
  border: 1px solid rgba(201,168,76,0.22);
  color: var(--gold);
  border-radius: 8px;
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.18s, border-color 0.18s;
}
.solar-system-btn:hover { background: rgba(201,168,76,0.16); border-color: rgba(201,168,76,0.45); }

.solar-system-canvas-wrap {
  position: relative;
  width: 100%;
  height: 540px;
  background: #030208;
  border-radius: 12px;
}
#solar-system-canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: crosshair;
  background: #030208; /* masque le fond transparent du canvas entre les frames */
}
.solar-system-tip {
  position: fixed;
  background: rgba(6,4,18,0.92);
  border: 1px solid rgba(201,168,76,0.32);
  color: var(--gold);
  border-radius: 7px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  pointer-events: none;
  display: none;
  z-index: var(--z-toast);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

/* Plein écran */
.solar-system-section.is-fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh; /* fallback */
  height: 100dvh;
  z-index: var(--z-loader);
  margin: 0;
  padding: 0;
  background: #030208;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.solar-system-section.is-fullscreen .solar-system-canvas-wrap {
  flex: 1;
  height: auto;
  min-height: 0;
  border-radius: 0;
  background: #030208;
}
.solar-system-section.is-fullscreen .solar-system-head {
  display: none;
}
.solar-system-fs-close {
  display: none;
}
.solar-system-section.is-fullscreen .solar-system-fs-close {
  display: flex;
  position: absolute;
  top: max(1rem, env(safe-area-inset-top, 0px));
  right: max(1rem, env(safe-area-inset-right, 0px));
  z-index: var(--z-toast);
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  background: rgba(3,2,8,0.7);
  border: 1px solid rgba(201,168,76,0.4);
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.4rem;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.15s;
}
.solar-system-section.is-fullscreen .solar-system-fs-close:hover {
  background: rgba(201,168,76,0.25);
}

/* ── Popup planète ── */
.solar-system-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-toast);
  background: rgba(3,2,8,0.82);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}
.solar-system-popup.is-open {
  display: flex;
}
.solar-system-popup__inner {
  position: relative;
  background: linear-gradient(135deg, #110d22 0%, #0d0a1e 100%);
  border: 1px solid rgba(201,168,76,0.28);
  border-radius: 18px;
  width: min(440px, 92vw);
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(201,168,76,0.1);
  overflow: hidden;
}
.solar-system-popup__close {
  position: absolute;
  top: 0.9rem; right: 0.9rem;
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  color: rgba(201,168,76,0.7);
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.15s, color 0.15s;
}
.solar-system-popup__close:hover { background: rgba(201,168,76,0.2); color: var(--gold); }
.solar-system-popup__body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}
.solar-system-popup__icon {
  flex-shrink: 0;
  width: 96px; height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0815;
  box-shadow: 0 0 24px rgba(201,168,76,0.18), inset 0 0 12px rgba(0,0,0,0.6);
}
.solar-system-popup__icon canvas {
  display: block;
  border-radius: 50%;
}
.solar-system-popup__text { flex: 1; min-width: 0; }
.solar-system-popup__name {
  margin: 0 0 0.6rem;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.06em;
}
.solar-system-popup__desc {
  margin: 0 0 1.1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}
.solar-system-popup__link {
  display: inline-block;
  background: rgba(201,168,76,0.1);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold);
  border-radius: 8px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.18s;
}
.solar-system-popup__link:hover { background: rgba(201,168,76,0.2); }

@media (max-width: 600px) {
  .solar-system-canvas-wrap { height: 380px; }
  .solar-system-head { flex-wrap: wrap; }
  .solar-system-popup { align-items: flex-end; }
  .solar-system-popup__inner {
    width: 100vw; max-height: 85vh; overflow-y: auto;
    border-radius: 18px 18px 0 0; border-bottom: none;
  }
  .solar-system-popup__close {
    width: 36px; height: 36px; font-size: 1rem;
    top: 0.75rem; right: 0.75rem;
  }
  .solar-system-popup__body { flex-direction: column; text-align: center; padding: 1.5rem 1.25rem; }
  .solar-system-popup__icon { width: 72px; height: 72px; }
  .solar-system-popup__icon canvas { width: 72px !important; height: 72px !important; }
  .solar-system-popup__name { font-size: 1.25rem; }
  .solar-system-popup__desc { font-size: 0.8rem; }
}

/* ── Bouton crédits (©) ── */
.credits-btn {
  position: absolute;
  bottom: 8px;
  right: 8px;
  z-index: 10;
  background: rgba(0,0,0,.45);
  border: 1px solid rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
  font-size: .85rem;
  line-height: 1;
  padding: 5px 9px;
  border-radius: 4px;
  cursor: pointer;
  transition: background .2s, color .2s;
  backdrop-filter: blur(4px);
}
.credits-btn:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}
body.light-mode .credits-btn {
  background: rgba(255,255,255,.55);
  border-color: rgba(139,105,20,.25);
  color: black;
}
body.light-mode .credits-btn:hover {
  background: rgba(139,105,20,.12);
  color: #8b6914;
}

/* ── Modal crédits ── */
.credits-modal {
  display: none;
}
.credits-modal.is-open {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.credits-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
}
.credits-modal__box {
  position: relative;
  background: #0b1428;
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
}
body.light-mode .credits-modal__box {
  background: #fff;
  border-color: rgba(139,105,20,.2);
  box-shadow: 0 16px 48px rgba(0,0,0,.15);
}
.credits-modal__close {
  position: absolute;
  top: .75rem;
  right: .75rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: 4px;
  line-height: 1;
}
.credits-modal__close:hover { color: var(--gold); }
.credits-modal__title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0 0 1.25rem;
}
.credits-modal__section {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(201,168,76,.1);
}
.credits-modal__section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.credits-modal__section h4 {
  font-family: var(--font-heading);
  font-size: .95rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0 0 .5rem;
  letter-spacing: .03em;
}
.credits-modal__section p {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 .4rem;
}
.credits-modal__link {
  font-size: .78rem;
  color: var(--gold);
  text-decoration: none;
  opacity: .8;
}
.credits-modal__link:hover { opacity: 1; text-decoration: underline; }
body.light-mode .credits-modal__section { border-bottom-color: rgba(0,0,0,.08); }
body.light-mode .credits-modal__link { color: #8b6914; }

/* === Schéma corporel annoté (shortcode [hd_schema_annote]) === */
.hd-schema-figure {
  margin: 2.5rem auto;
  max-width: 1040px;
  padding: 1.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
}
.hd-schema-figure svg.bg-schema-annote {
  width: 100%;
  height: auto;
  display: block;
  color: var(--text-primary, #e8e8e8);
}
.hd-schema-figure figcaption {
  text-align: center;
  margin-top: 1rem;
  font-size: .85rem;
  font-style: italic;
  color: var(--text-secondary, #999);
}

/* ── Version 2 : layout SVG + légende numérotée ── */
.hd-schema-v2 .hd-schema-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 1.25fr;
  gap: 2rem;
  align-items: start;
}
.hd-schema-v2 .hd-schema-svg {
  position: sticky;
  top: 1rem;
}
.hd-schema-v2 .hd-schema-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  counter-reset: none;
}
.hd-schema-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.hd-schema-item:hover,
.hd-schema-item.is-active,
.hd-schema-item:focus-visible {
  background: rgba(255,255,255,0.05);
  transform: translateX(3px);
  outline: none;
}
.hd-schema-item[data-key="centre"].is-active  { border-left-color: #66BB6A; }
.hd-schema-item[data-key="porte"].is-active   { border-left-color: #FFA726; }
.hd-schema-item[data-key="canal"].is-active   { border-left-color: #29B6F6; }
.hd-schema-item[data-key="var"].is-active     { border-left-color: #AB47BC; }
.hd-schema-item[data-key="fleche"].is-active  { border-left-color: #EF5350; }
.hd-schema-item[data-key="planete"].is-active { border-left-color: #FFCA28; }

.hd-schema-badge {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Lora', serif;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.hd-schema-body { flex: 1; min-width: 0; }
.hd-schema-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 0.2rem;
  color: var(--text-primary);
  line-height: 1.2;
}
.hd-schema-desc {
  margin: 0 0 0.6rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-secondary, #a8a8a8);
}
.hd-schema-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Lora', serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--cta-color, #e8e8e8);
  text-decoration: none;
  padding: 0.32rem 0.75rem;
  border: 1px solid var(--cta-color, rgba(255,255,255,0.2));
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.02);
  transition: all 0.2s ease;
}
.hd-schema-cta:hover,
.hd-schema-cta:focus-visible {
  background: var(--cta-color, rgba(255,255,255,0.1));
  color: #fff;
  transform: translateX(2px);
  outline: none;
}
.hd-schema-cta span { transition: transform 0.2s ease; }
.hd-schema-cta:hover span { transform: translateX(3px); }
body.light-mode .hd-schema-cta {
  background: rgba(255,255,255,0.5);
}
body.light-mode .hd-schema-cta:hover,
body.light-mode .hd-schema-cta:focus-visible {
  color: #1a1a1a;
}

/* Hotspots SVG */
.schema-hotspot { cursor: pointer; }
.schema-hotspot .hs-halo {
  transition: opacity 0.3s, r 0.3s;
  transform-origin: center;
}
.schema-hotspot:hover .hs-halo,
.schema-hotspot.is-active .hs-halo {
  opacity: 0.45;
}
.schema-hotspot:hover circle:not(.hs-halo),
.schema-hotspot.is-active circle:not(.hs-halo) {
  filter: drop-shadow(0 0 8px currentColor);
}
.schema-hotspot:focus { outline: none; }

/* Halos d'overlay sur la BG */
.schema-highlights .hl {
  transition: opacity 0.3s;
  pointer-events: none;
}
.schema-highlights .hl.is-visible { opacity: 0.65 !important; }

/* Triangles/points indicatifs (variables, flèches, planètes) */
.schema-bg .hl-shape { transition: filter 0.2s, transform 0.2s; }
.bg-schema-annote.is-active-var .hl-shape[data-hl="var"],
.bg-schema-annote.is-active-fleche .hl-shape[data-hl="fleche"],
.bg-schema-annote.is-active-planete .hl-shape[data-hl="planete"] {
  filter: drop-shadow(0 0 6px currentColor);
}

/* Mode clair */
body.light-mode .hd-schema-figure {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.1);
}
body.light-mode .hd-schema-figure svg.bg-schema-annote {
  color: #1a1a1a;
}
body.light-mode .hd-schema-figure svg.bg-schema-annote path[fill*="050c1c"],
body.light-mode .hd-schema-figure svg.bg-schema-annote rect[fill*="050c1c"] {
  fill: #ffffff !important;
}
body.light-mode .hd-schema-item {
  background: rgba(0,0,0,0.02);
  border-color: rgba(0,0,0,0.08);
}
body.light-mode .hd-schema-item:hover,
body.light-mode .hd-schema-item.is-active {
  background: rgba(0,0,0,0.05);
}

/* Responsive */
@media (max-width: 820px) {
  .hd-schema-v2 .hd-schema-layout {
    grid-template-columns: 1fr;
    gap: 1.3rem;
  }
  .hd-schema-v2 .hd-schema-svg {
    position: static;
    max-width: 340px;
    margin: 0 auto;
  }
}

/* === Page de recherche === */
.hd-search-page__form { max-width: 640px; margin: 1.2rem auto 0; }
.hd-search-page__inputwrap {
  display: flex; align-items: center; gap: 0.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(201,168,76,0.3);
  border-radius: 12px;
  padding: 0.4rem 0.4rem 0.4rem 0.9rem;
  transition: all 0.2s;
}
.hd-search-page__inputwrap:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.12); }
body.light-mode .hd-search-page__inputwrap { background: #fff; border-color: rgba(139,105,20,0.3); }
.hd-search-page__inputwrap svg { color: var(--text-muted); flex-shrink: 0; }
.hd-search-page__inputwrap input[type="search"] {
  flex: 1; background: none; border: 0; outline: 0;
  font-family: 'Lora', serif; font-size: 1.05rem;
  color: var(--text-primary, #e8e8e8);
  padding: 0.5rem 0.2rem;
}
body.light-mode .hd-search-page__inputwrap input[type="search"] { color: #1a1a1a; }
.hd-search-page__inputwrap button {
  background: var(--gold); color: #050c1c; border: 0; border-radius: 9px;
  padding: 0.55rem 1.1rem; font-family: 'Lora', serif; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
}
.hd-search-page__inputwrap button:hover { background: #d4b355; }

.hd-search-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 2.5rem;
  margin-top: 2.5rem;
  align-items: start;
}
.hd-search-filters {
  position: sticky; top: 1rem;
  padding: 1.2rem 1rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
}
body.light-mode .hd-search-filters { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
.hd-search-filters h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; font-weight: 500; margin: 0 0 0.8rem;
  color: var(--text-primary);
  padding-bottom: 0.6rem; border-bottom: 1px solid rgba(255,255,255,0.08);
}
body.light-mode .hd-search-filters h3 { border-color: rgba(0,0,0,0.08); }
.hd-search-filters ul { list-style: none; margin: 0; padding: 0; }
.hd-search-filter__group {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--text-muted); margin: 1rem 0 0.4rem; padding: 0 0.35rem;
}
.hd-search-filter {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  text-decoration: none; color: var(--text-secondary, #a8a8a8);
  transition: all 0.18s;
  font-size: 0.88rem;
}
.hd-search-filter:hover { background: rgba(201,168,76,0.06); color: var(--gold); }
.hd-search-filter.is-active { background: rgba(201,168,76,0.12); color: var(--gold); }
.hd-search-filter__dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hd-search-filter__label { flex: 1; }
.hd-search-filter__count {
  font-size: 0.75rem; padding: 0.1rem 0.5rem;
  border-radius: var(--radius-pill); background: rgba(255,255,255,0.06);
  color: var(--text-muted);
}
.hd-search-filter.is-active .hd-search-filter__count { background: rgba(201,168,76,0.18); color: var(--gold); }
body.light-mode .hd-search-filter:hover { background: rgba(139,105,20,0.06); color: #8b6914; }
body.light-mode .hd-search-filter.is-active { background: rgba(139,105,20,0.12); color: #8b6914; }
body.light-mode .hd-search-filter__count { background: rgba(0,0,0,0.05); }

.hd-search-results__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.hd-search-result {}
.hd-search-result__link {
  display: block;
  padding: 1.2rem 1.4rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.08);
  border-left: 3px solid transparent;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
}
.hd-search-result__link:hover {
  background: rgba(201,168,76,0.06);
  border-left-color: var(--gold);
  transform: translateX(3px);
}
body.light-mode .hd-search-result__link { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
body.light-mode .hd-search-result__link:hover { background: rgba(139,105,20,0.06); border-left-color: #8b6914; }
.hd-search-result__badge {
  display: inline-block;
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 600;
  color: #fff; padding: 0.22rem 0.65rem; border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}
.hd-search-result__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.35rem; font-weight: 500; margin: 0 0 0.4rem;
  color: var(--text-primary);
  line-height: 1.25;
}
.hd-search-result__link:hover .hd-search-result__title { color: var(--gold); }
body.light-mode .hd-search-result__link:hover .hd-search-result__title { color: #8b6914; }
.hd-search-result__excerpt {
  margin: 0 0 0.5rem;
  font-size: 0.9rem; line-height: 1.5;
  color: var(--text-secondary, #a8a8a8);
}
.hd-search-result__url {
  font-size: 0.75rem; color: var(--text-muted);
  font-family: 'Lora', serif;
}

.hd-search-empty, .hd-search-shortcuts {
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  text-align: center;
}
.hd-search-empty h2 { font-family: 'Cormorant Garamond', serif; font-weight: 400; }
.hd-search-empty__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.8rem;
  margin-top: 1.5rem;
}
.hd-search-empty__grid a {
  padding: 0.9rem 1rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-secondary);
  font-family: 'Lora', serif;
  font-size: 0.92rem;
  transition: all 0.2s;
}
.hd-search-empty__grid a:hover {
  background: rgba(201,168,76,0.08);
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-2px);
}
body.light-mode .hd-search-empty, body.light-mode .hd-search-shortcuts { background: rgba(0,0,0,0.02); border-color: rgba(0,0,0,0.08); }
body.light-mode .hd-search-empty__grid a { background: rgba(0,0,0,0.02); border-color: rgba(139,105,20,0.25); }
body.light-mode .hd-search-empty__grid a:hover { background: rgba(139,105,20,0.06); border-color: #8b6914; color: #8b6914; }

.hd-search-pagination { margin-top: 2rem; text-align: center; }
.hd-search-pagination .nav-links { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center; }
.hd-search-pagination a, .hd-search-pagination .current {
  padding: 0.5rem 0.9rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-secondary); text-decoration: none;
  font-family: 'Lora', serif; font-size: 0.88rem;
  transition: all 0.2s;
}
.hd-search-pagination a:hover { border-color: var(--gold); color: var(--gold); }
.hd-search-pagination .current { background: rgba(201,168,76,0.12); border-color: var(--gold); color: var(--gold); }
body.light-mode .hd-search-pagination a { border-color: rgba(0,0,0,0.1); }

@media (max-width: 820px) {
  .hd-search-layout { grid-template-columns: 1fr; gap: 1.5rem; }
  .hd-search-filters { position: static; }
  .hd-search-filters ul { display: flex; flex-wrap: wrap; gap: 0.35rem; }
  .hd-search-filter__group { width: 100%; }
}

/* ===================================================================
   Intro siblings - navigation croisée entre pages d'introduction
   =================================================================== */
.intro-siblings {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(201,168,76,0.2);
}
.intro-siblings__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--gold);
  text-align: center;
  margin: 0 0 1.75rem;
  letter-spacing: 0.3px;
}
.intro-siblings__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.25rem;
}
.intro-siblings__card {
  display: flex;
  flex-direction: column;
  padding: 1.4rem 1.3rem 1.25rem;
  background: linear-gradient(180deg, rgba(201,168,76,0.05) 0%, rgba(201,168,76,0.02) 100%);
  border: 1px solid rgba(201,168,76,0.22);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}
.intro-siblings__card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.5;
  transition: opacity 0.25s ease;
}
.intro-siblings__card:hover {
  transform: translateY(-3px);
  border-color: rgba(201,168,76,0.5);
  background: linear-gradient(180deg, rgba(201,168,76,0.09) 0%, rgba(201,168,76,0.04) 100%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.intro-siblings__card:hover::before { opacity: 1; }
.intro-siblings__card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  line-height: 1.25;
}
.intro-siblings__card-excerpt {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 1rem;
  flex: 1;
}
.intro-siblings__card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  margin-top: auto;
}
.intro-siblings__card-cta svg {
  transition: transform 0.25s ease;
}
.intro-siblings__card:hover .intro-siblings__card-cta svg {
  transform: translateX(3px);
}

body.light-mode .intro-siblings { border-top-color: rgba(201,168,76,0.3); }
body.light-mode .intro-siblings__card {
  background: linear-gradient(180deg, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0.4) 100%);
  border-color: rgba(201,168,76,0.3);
}
body.light-mode .intro-siblings__card:hover {
  background: linear-gradient(180deg, #fff 0%, rgba(255,255,255,0.85) 100%);
  box-shadow: 0 8px 24px rgba(201,168,76,0.15);
}

@media (max-width: 820px) {
  .intro-siblings__grid { grid-template-columns: 1fr; gap: 1rem; }
  .intro-siblings { margin-top: 2.25rem; padding-top: 2rem; }
  .intro-siblings__title { font-size: 1.4rem; margin-bottom: 1.25rem; }
}
