/* ══════════════════════════════════════════════════════════════
   Porte CPT - Single & Archive styles
   ══════════════════════════════════════════════════════════════ */

/* ── Layout ── */
.porte-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.porte-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  margin-top: 1.5rem;
}

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

/* ── Hero ── */
.porte-hero {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.porte-hero__number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 4rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  min-width: 80px;
  text-align: center;
  opacity: 0.7;
}

.porte-hero__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 0.3rem;
}

.porte-hero__theme {
  font-size: 1rem;
  color: var(--gold);
  font-style: italic;
  margin: 0;
  opacity: 0.85;
}

/* Porte Soleil Personnalité sous le titre croix */
.croix-hero-sun-gate {
  margin: 0.3rem 0 0.15rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-primary, #f0e6d4);
}
.croix-hero-sun-gate__link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  text-decoration: none;
  color: inherit;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.28);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.croix-hero-sun-gate__link:hover,
.croix-hero-sun-gate__link:focus-visible {
  background: rgba(201, 168, 76, 0.16);
  border-color: rgba(201, 168, 76, 0.6);
  outline: none;
}
.croix-hero-sun-gate__num {
  font-weight: 600;
  color: var(--gold, #c9a84c);
  letter-spacing: 0.01em;
}
.croix-hero-sun-gate__sep {
  opacity: 0.55;
  font-weight: 300;
}
.croix-hero-sun-gate__name {
  font-family: 'Cormorant Garamond', 'Fraunces', serif;
  font-size: 1.02rem;
  color: var(--text-primary, #f0e6d4);
}
.croix-hero-sun-gate__theme {
  font-style: italic;
  color: var(--text-muted, #9a9080);
  font-size: 0.9rem;
}

body.light-mode .croix-hero-sun-gate__link {
  background: rgba(139, 105, 20, 0.07);
  border-color: rgba(139, 105, 20, 0.3);
}
body.light-mode .croix-hero-sun-gate__link:hover,
body.light-mode .croix-hero-sun-gate__link:focus-visible {
  background: rgba(139, 105, 20, 0.14);
  border-color: rgba(139, 105, 20, 0.55);
}
body.light-mode .croix-hero-sun-gate__num { color: #8b6914; }
body.light-mode .croix-hero-sun-gate__name { color: var(--text-primary); }
body.light-mode .croix-hero-sun-gate__theme { color: var(--text-muted); }

.porte-hero__sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.25rem 0 0;
}

/* ── Meta cards ── */
.porte-meta-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.porte-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.porte-card__label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.porte-card__value {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ── Content ── */
.porte-content {
  line-height: 1.75;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.porte-content h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(201,168,76,0.15);
}

.porte-content h3 {
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--gold-light);
  margin: 1.8rem 0 0.8rem;
}

.porte-content p { margin: 0 0 1rem; }

.porte-content ul {
  margin: 0 0 1.2rem 1.2rem;
  padding: 0;
}

.porte-content li {
  margin-bottom: 0.4rem;
  padding-left: 0.3rem;
}

.porte-content strong { color: var(--text-primary); }

.porte-content em { color: var(--gold-light); font-style: italic; }

.porte-content blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  background: rgba(201,168,76,0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* ── Channels section ── */
.porte-channels {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.porte-channels h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.porte-channels__intro {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.porte-channels__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.porte-channel-link {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.75rem 1rem;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.15);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s;
}

.porte-channel-link:hover {
  background: rgba(201,168,76,0.12);
  border-color: rgba(201,168,76,0.3);
  transform: translateY(-1px);
}

.porte-channel-link strong { color: var(--gold); font-size: 0.95rem; }
.porte-channel-link span { color: var(--text-secondary); font-size: 0.85rem; }
.porte-channel-link small { color: var(--text-muted); font-size: 0.75rem; font-style: italic; }

/* ── Sidebar ── */
.porte-sidebar {
  position: sticky;
  top: 2rem;
  align-self: start;
}

.porte-sidebar__cta {
  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.2rem;
  margin-bottom: 1.5rem;
}

.porte-sidebar__cta h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  color: var(--gold);
  margin: 0 0 0.5rem;
}

.porte-sidebar__cta p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.8rem;
  line-height: 1.5;
}

.porte-sidebar__btn {
  display: block;
  text-align: center;
  padding: 0.6rem 1rem;
  background: var(--gold);
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: opacity 0.2s;
}

.porte-sidebar__btn:hover { opacity: 0.85; }

.porte-sidebar__nav {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.2rem;
}

.porte-sidebar__nav h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin: 0 0 0.8rem;
}

.porte-sidebar__nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 400px;
  overflow-y: auto;
}

.porte-sidebar__nav li {
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

.porte-sidebar__nav li.active {
  border-left-color: var(--gold);
  background: rgba(201,168,76,0.06);
}

.porte-sidebar__nav li a {
  display: block;
  padding: 0.35rem 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.porte-sidebar__nav li a:hover,
.porte-sidebar__nav li.active a {
  color: var(--gold-light);
}

/* ══════════════════════════════════════════════════════════════
   Archive - Grid view
   ══════════════════════════════════════════════════════════════ */

.porte-archive__hero {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.porte-archive__hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem;
  font-weight: 400;
  color: var(--text-primary);
  margin: 0 0 0.6rem;
}

.porte-archive__hero p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ══ Archive intro - compact lead + collapsible rest ══ */
.archive-intro {
  max-width: 680px;
  margin: 0 auto;
  text-align: left;
}
.archive-intro__lead {
  text-align: center;
}
.archive-intro__lead p {
  font-size: 0.98rem;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0 auto;
  max-width: 640px;
}
.archive-intro__lead p strong {
  color: var(--text-primary);
}
.archive-intro__more {
  margin-top: 1rem;
  text-align: center;
}
.archive-intro__more[open] {
  text-align: left;
}
.archive-intro__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  list-style: none;
  font-size: 0.82rem;
  color: var(--gold);
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(201,168,76,0.25);
  border-radius: var(--radius-pill);
  background: rgba(201,168,76,0.04);
  transition: background 0.2s, border-color 0.2s;
  user-select: none;
}
.archive-intro__toggle::-webkit-details-marker { display: none; }
.archive-intro__toggle::before {
  content: "+";
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
}
.archive-intro__more[open] .archive-intro__toggle::before { content: "−"; }
.archive-intro__toggle:hover {
  background: rgba(201,168,76,0.1);
  border-color: rgba(201,168,76,0.45);
}
.archive-intro__toggle-close { display: none; }
.archive-intro__more[open] .archive-intro__toggle-open { display: none; }
.archive-intro__more[open] .archive-intro__toggle-close { display: inline; }
.archive-intro__rest {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  animation: archiveIntroFade 0.25s ease-out;
}
.archive-intro__rest p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
  max-width: none;
}
.archive-intro__rest p strong { color: var(--text-secondary); }
.archive-intro__rest p small { font-size: 0.8rem; color: var(--text-muted); }
@keyframes archiveIntroFade {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Light mode */
body.light-mode .archive-intro__toggle {
  color: #8b6914;
  border-color: rgba(139,105,20,0.3);
  background: rgba(139,105,20,0.05);
}
body.light-mode .archive-intro__toggle:hover {
  background: rgba(139,105,20,0.12);
  border-color: rgba(139,105,20,0.5);
}
body.light-mode .archive-intro__rest {
  border-top-color: rgba(0,0,0,0.08);
}

/* ── Centre groups ── */
.porte-centre-group {
  margin-bottom: 3rem;
}

.porte-centre-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(201,168,76,0.12);
  flex-wrap: wrap;
}

.porte-centre-header h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--gold);
  margin: 0;
}

.porte-centre-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  font-style: italic;
}

.porte-centre-count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
  background: rgba(255,255,255,0.04);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

/* ── Card grid ── */
.porte-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}

.porte-grid-card {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.25s;
}

.porte-grid-card:hover {
  background: rgba(201,168,76,0.06);
  border-color: rgba(201,168,76,0.2);
  transform: translateY(-2px);
}

.porte-grid-card__num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  opacity: 0.6;
}

.porte-grid-card__name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.porte-grid-card__theme {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
}

.porte-grid-card__badge {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  margin-top: 0.3rem;
  align-self: flex-start;
}

.porte-grid-card__badge--voice {
  background: rgba(201,168,76,0.1);
  color: var(--gold-light);
}

.porte-grid-card__badge--fear {
  background: rgba(231,76,94,0.08);
  color: var(--red-hd-light);
}

/* ══ Premium Content Gate (Gene Keys, Croix) ══
   Note : depuis le gating server-side total, le contenu gaté n'est plus
   rendu dans le DOM pour les visiteurs non autorisés. La règle CSS
   .premium-gated (mask-image) ne sert plus qu'aux onglets d'analyse BG
   (--tab) qui conservent un truncate CSS pour les premiers paragraphes.
   Le selector de base reste listé pour compat rétroactive (si un template
   non refondu l'utilisait encore). */

.premium-gated--tab {
  position: relative;
  max-height: 30rem;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 65%, transparent 100%);
}
@media (max-width: 600px) {
  .premium-gated--tab { max-height: 24rem; }
}

/* Nouveau teaser : bloc d'accroche server-side (liste de catégories,
   intro textuelle) affiché à la place du contenu complet pour les
   visiteurs non autorisés. */
.archive-gated-teaser {
  margin: 1.5rem 0;
  padding: 1.25rem 1.5rem;
  background: rgba(201, 168, 76, 0.05);
  border: 1px solid rgba(201, 168, 76, 0.15);
  border-radius: 8px;
  line-height: 1.65;
}
.archive-gated-teaser__lead {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--text-primary);
}
.archive-gated-teaser__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.5rem 1.25rem;
}
.archive-gated-teaser__list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 0.2rem 0;
}
body.light-mode .archive-gated-teaser {
  background: rgba(139, 105, 20, 0.04);
  border-color: rgba(139, 105, 20, 0.2);
}
/* Teaser single CPT : simple, juste les 50 premiers mots */
.guide-content--teaser p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-secondary);
  font-style: italic;
  margin: 0 0 1rem;
  opacity: 0.85;
}

.premium-gate-cta {
  position: relative;
  margin-top: -2rem;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  background: var(--bg-primary);
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 10px;
  z-index: 2;
}

.premium-gate-cta__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(201,168,76,.1);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.premium-gate-cta__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--gold-light);
  margin: 0 0 0.5rem;
}

.premium-gate-cta__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto 1.25rem;
  line-height: 1.6;
}

.premium-gate-cta__btn {
  display: inline-block;
  padding: 0.7rem 2rem;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 6px;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.premium-gate-cta__btn:hover,
.premium-gate-cta__btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(201,168,76,.4);
  color: #fff;
  opacity: 0.95;
}

/* Variante Free - CTA "Créer un compte gratuit" - même gradient doré,
   texte blanc garanti en mode jour et nuit. */
.premium-gate-cta__btn--free {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #fff;
}
.premium-gate-cta__btn--free:hover,
.premium-gate-cta__btn--free:focus-visible { color: #fff; }

.premium-gate-cta__sub {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Reduce spacing after CTA block */
.premium-gate-cta + .porte-channels {
  margin-top: 1.5rem;
}

/* Hide CTA for premium users (JS adds this class) */
.premium-unlocked .premium-gate-cta {
  display: none;
}
.premium-unlocked .guide-content {
  max-height: none;
  -webkit-mask-image: none;
  mask-image: none;
}

/* ══ Pro Gate variant (pourpre) - Gene Keys, Croix, PHS croisées ══ */
.premium-gate-cta--pro {
  border-color: rgba(183,148,217,.28);
  background: linear-gradient(180deg, rgba(183,148,217,.04), var(--bg-primary) 60%);
}
.premium-gate-cta--pro .premium-gate-cta__icon {
  background: rgba(183,148,217,.12);
  color: #b794d9;
}
.premium-gate-cta--pro .premium-gate-cta__title {
  color: #b794d9;
}
.premium-gate-cta__btn--pro {
  background: linear-gradient(135deg, #8b5fbf, #b794d9);
  color: #fff;
}
.premium-gate-cta__btn--pro:hover {
  box-shadow: 0 4px 16px rgba(183,148,217,.35);
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .porte-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .porte-sidebar { position: static; }
  .porte-hero__bg-illustration { width: 120px; }
  .porte-hero__bg-illustration .bg-illustration { max-width: 120px; }
  .porte-hero__title { font-size: 1.5rem; }
  .porte-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
}

@media (max-width: 480px) {
  .porte-hero { flex-direction: column; text-align: center; }
  .porte-hero__bg-illustration { width: 108px; }
  .porte-hero__bg-illustration .bg-illustration { max-width: 108px; }
  .porte-meta-cards { justify-content: center; }
  .porte-grid { grid-template-columns: 1fr 1fr; }
}

/* ── BG Illustration in hero ── */
.porte-hero__bg-illustration {
  flex-shrink: 0;
  width: 144px;
}
.porte-hero__bg-illustration .bg-illustration {
  max-width: 144px;
}

/* ── BG Illustration (mini body graph) ── */
.bg-illustration-wrap {
  display: flex; flex-direction: column; align-items: center;
  margin: 1.5rem 0 1rem; padding: 1.75rem 2rem 1.5rem;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
}
.bg-illustration {
  width: 100%; max-width: 300px;
  display: flex; align-items: center; justify-content: center;
}
.bg-illustration svg { display: block; width: 100%; height: auto; }
/* Empreinte monochrome : blanc en thème nuit, noir en thème jour */
.bg-illustration svg.bg-empreinte { color: #ffffff; }
body.light-mode .bg-illustration svg.bg-empreinte { color: #000000; }

/* ── Lightbox BG illustration ── */
.bg-illustration { cursor: zoom-in; }
.bg-illustration::after {
  content: "\2922"; /* ⤢ */
  position: absolute; top: 6px; right: 6px;
  font-size: 0.9rem; color: var(--gold, #d4af37);
  opacity: 0.8; pointer-events: none;
}
.porte-hero__bg-illustration { position: relative; }
.bg-lightbox {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,12,28,0.92);
  display: flex; align-items: center; justify-content: center;
  padding: 3vh 3vw;
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
  cursor: zoom-out;
  backdrop-filter: blur(4px);
}
.bg-lightbox.open { opacity: 1; visibility: visible; }
.bg-lightbox__inner {
  max-width: min(90vw, 680px);
  max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
body.light-mode .bg-lightbox { background: rgba(250,250,250,0.94); }
body.light-mode .bg-lightbox__inner { color: #000; }
.bg-lightbox__inner svg { width: 100%; height: auto; max-height: 90vh; }
.bg-lightbox__close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: 0;
  color: inherit; font-size: 2rem; line-height: 1;
  cursor: pointer; opacity: 0.7; padding: 0.3rem 0.6rem;
}
.bg-lightbox__close:hover { opacity: 1; }
.bg-illustration__caption {
  margin-top: 1.25rem; padding-top: 0.75rem;
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: 1.3rem; font-weight: 400; color: var(--gold);
  text-align: center; letter-spacing: 0.02em;
  border-top: 1px solid var(--border);
  width: 100%;
}
body.light-mode .bg-illustration-wrap {
  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);
}

/* ── Circuits : hub + taxonomy modifiers ──────────────────────── */
.porte-grid-card__theme--muted {
  font-style: normal;
  opacity: 0.72;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.porte-grid--circuits {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.porte-grid-card--circuit {
  padding: 1.4rem 1.3rem;
  gap: 0.55rem;
  background: linear-gradient(155deg, rgba(201,168,76,0.05), rgba(255,255,255,0.025));
  border-color: rgba(201,168,76,0.14);
}
.porte-grid-card--circuit .porte-grid-card__num {
  font-size: 2.6rem;
  opacity: 0.9;
}
.porte-grid-card--circuit .porte-grid-card__name {
  font-family: var(--font-heading, 'Cormorant Garamond', serif);
  font-size: 1.45rem;
  font-weight: 400;
  color: var(--gold);
  letter-spacing: 0.01em;
}
.porte-grid-card--circuit .porte-grid-card__theme {
  font-size: 0.92rem;
  color: var(--text-secondary);
  font-style: normal;
  line-height: 1.55;
}
.porte-grid-card--circuit:hover {
  background: linear-gradient(155deg, rgba(201,168,76,0.1), rgba(201,168,76,0.04));
  border-color: rgba(201,168,76,0.32);
}

body.light-mode .porte-grid-card--circuit {
  background: linear-gradient(155deg, rgba(139,105,20,0.05), rgba(0,0,0,0.02));
  border-color: rgba(139,105,20,0.16);
}
body.light-mode .porte-grid-card--circuit:hover {
  background: linear-gradient(155deg, rgba(139,105,20,0.11), rgba(139,105,20,0.04));
  border-color: rgba(139,105,20,0.28);
}

/* CTA box partagée - remplace les anciens blocs inline style */
.guide-cta-box {
  max-width: 820px;
  margin: 2.4rem auto 1rem;
  padding: 1.2rem 1.5rem;
  background: rgba(201,168,76,0.07);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  line-height: 1.6;
}
.guide-cta-box p { margin: 0; }
.guide-cta-box a {
  color: var(--gold);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(201,168,76,0.4);
  text-underline-offset: 3px;
}
body.light-mode .guide-cta-box {
  background: rgba(139,105,20,0.07);
  border-left-color: #8b6914;
}
body.light-mode .guide-cta-box a { color: #8b6914; }

@media (max-width: 640px) {
  .porte-grid--circuits { grid-template-columns: 1fr; gap: 0.75rem; }
  .porte-grid-card--circuit { padding: 1.1rem 1rem; }
  .porte-grid-card--circuit .porte-grid-card__num { font-size: 2.1rem; }
  .porte-grid-card--circuit .porte-grid-card__name { font-size: 1.25rem; }
  .guide-cta-box { padding: 1rem 1.1rem; margin: 1.8rem auto 0.8rem; }
}

/* ══════════════════════════════════════════════════════════════════════
   REFONTE - Bloc d'en-tête des CPT (porte, centre, canal, gene_key, etc.)
   ───────────────────────────────────────────────────────────────────────
   .porte-hero : carte élégante qui présente l'élément (illustration BG
   ou emblème + titre + sous-titre).
   .porte-meta-cards / .porte-card : rangée de puces méta (Catégorie,
   Portes, Biologique, Angle, Ligne, Centre…) mieux lisibles et
   identifiables sur tous les CPT.
   Design aligné sur la charte : or + bleu nuit (sombre) / or + ivoire
   (jour).
   ══════════════════════════════════════════════════════════════════════ */

/* ── Hero : encadrement et fond subtil ──────────────────────────── */
.porte-hero {
    position: relative;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.75rem;
    background:
        radial-gradient(ellipse 70% 90% at 85% 0%, rgba(201,168,76,0.15), transparent 60%),
        linear-gradient(135deg, #121a30 0%, #0b1428 100%);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 16px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.06),
        0 6px 24px rgba(0,0,0,0.25),
        0 0 0 1px rgba(201,168,76,0.06);
    /* Annule l'ancien border-bottom qui faisait doublon */
    border-bottom-width: 1px;
}
.porte-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.15) 20%, var(--gold, #c9a84c) 50%, rgba(201,168,76,0.15) 80%, transparent 100%);
    pointer-events: none;
}
.porte-hero__bg-illustration {
    flex-shrink: 0;
}
.porte-hero__text {
    min-width: 0;
    flex: 1 1 auto;
}
.porte-hero__theme {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    background: rgba(201,168,76,0.12);
    border: 1px solid rgba(201,168,76,0.3);
    border-radius: 999px;
    font-style: normal;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: var(--gold-light, #e8d48b);
    opacity: 1;
    margin-top: 0.4rem;
    font-weight: 600;
    text-transform: uppercase;
}
.porte-hero__sub {
    color: rgba(255,255,255,0.62);
    margin-top: 0.55rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Light mode hero */
body.light-mode .porte-hero {
    background:
        radial-gradient(ellipse 70% 90% at 85% 0%, rgba(201,168,76,0.2), transparent 60%),
        linear-gradient(135deg, #fefcf6 0%, #f7efe0 100%);
    border-color: rgba(160,124,42,0.3);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.7),
        0 6px 24px rgba(160,124,42,0.08),
        0 0 0 1px rgba(160,124,42,0.06);
}
body.light-mode .porte-hero::before {
    background: linear-gradient(90deg, transparent 0%, rgba(160,124,42,0.2) 20%, var(--gold-dark, #a07c2a) 50%, rgba(160,124,42,0.2) 80%, transparent 100%);
}
body.light-mode .porte-hero__theme {
    background: rgba(160,124,42,0.1);
    border-color: rgba(160,124,42,0.35);
    color: var(--gold-dark, #8b6914);
}
body.light-mode .porte-hero__sub {
    color: rgba(0,0,0,0.58);
}

/* ── Meta cards : chips premium ───────────────────────────────── */
.porte-meta-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 2rem;
}

.porte-card {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.7rem 1.1rem 0.75rem;
    background: rgba(201,168,76,0.05);
    border: 1px solid rgba(201,168,76,0.25);
    border-radius: 10px;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
    position: relative;
    min-width: 0;
}
.porte-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0.9rem;
    right: 0.9rem;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(201,168,76,0.5) 50%, transparent 100%);
    opacity: 0.75;
    pointer-events: none;
    border-radius: 2px;
}
.porte-card:hover {
    border-color: rgba(201,168,76,0.5);
    background: rgba(201,168,76,0.1);
    transform: translateY(-1px);
}

.porte-card__label {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gold-light, #e8d48b);
    opacity: 0.85;
    font-weight: 600;
}

.porte-card__value {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.05rem;
    line-height: 1.25;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Light mode meta cards */
body.light-mode .porte-card {
    background: rgba(160,124,42,0.06);
    border-color: rgba(160,124,42,0.28);
}
body.light-mode .porte-card::before {
    background: linear-gradient(90deg, transparent 0%, rgba(160,124,42,0.45) 50%, transparent 100%);
}
body.light-mode .porte-card:hover {
    border-color: rgba(160,124,42,0.5);
    background: rgba(160,124,42,0.1);
}
body.light-mode .porte-card__label {
    color: var(--gold-dark, #8b6914);
    opacity: 1;
}
body.light-mode .porte-card__value {
    color: #1d2742;
}

/* Mobile */
@media (max-width: 640px) {
    .porte-hero {
        padding: 1.1rem 1.1rem;
        margin-bottom: 1.25rem;
    }
    .porte-card {
        padding: 0.55rem 0.9rem 0.6rem;
        flex: 1 1 calc(50% - 0.3rem);
    }
    .porte-card__value {
        font-size: 0.95rem;
    }
}
