/* ============================================================
   Corpus Théosophique — thème
   ============================================================ */
* { box-sizing: border-box; }

html { background: #0c0a18; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 162, 39, 0.08), transparent),
    radial-gradient(ellipse 60% 40% at 90% 110%, rgba(122, 111, 208, 0.07), transparent),
    #0c0a18;
  color: #e9e2cf;
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
  line-height: 1.6;
}

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

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.main { padding: 2rem 1rem 3rem; width: 100%; }

.font-display {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  letter-spacing: 0.01em;
}
.gold { color: #c9a227; }
.text-dim { color: #a99f86; }
.italic { font-style: italic; }
.small { font-size: 0.88rem; }
.tiny { font-size: 0.75rem; }
.lead { max-width: 56rem; margin-bottom: 2rem; }
.justify { text-align: justify; }
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; } .mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }

h1, h2, h3 { font-weight: 600; }
.h1 { font-size: 2.4rem; margin: 0 0 0.5rem; }
.h2 { font-size: 1.7rem; margin: 0 0 0.5rem; }
.h3 { font-size: 1.3rem; margin: 0 0 0.35rem; }

/* ————— En-tête ————— */
.site-header {
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(201, 162, 39, 0.18);
  background: rgba(12, 10, 24, 0.93);
  backdrop-filter: blur(10px);
}
.header-row { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 0.5rem; }
.brand .symbol-badge { font-size: 1.4rem; }
.brand-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.25rem; color: #c9a227; }
.main-nav { display: flex; gap: 0.25rem; flex-wrap: wrap; }
.nav-link {
  padding: 0.35rem 0.7rem; font-size: 0.85rem; color: #a99f86;
  border-radius: 0.5rem; transition: color 0.2s, background 0.2s; white-space: nowrap;
}
.nav-link:hover { color: #e9e2cf; }
.nav-link.active { color: #e6c969; background: rgba(201, 162, 39, 0.1); }
.search-form { margin-left: auto; width: 15rem; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .main-nav { display: none; width: 100%; }
  .main-nav.open { display: flex; }
  .nav-toggle { display: inline-flex; }
  .search-form { width: 100%; margin-left: 0; order: 3; }
}

/* ————— Composants ————— */
.card-eso {
  background: linear-gradient(160deg, rgba(30, 26, 52, 0.85), rgba(18, 15, 34, 0.9));
  border: 1px solid rgba(201, 162, 39, 0.18);
  border-radius: 0.75rem;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  display: block;
}
a.card-eso:hover {
  border-color: rgba(201, 162, 39, 0.45);
  box-shadow: 0 6px 30px rgba(201, 162, 39, 0.08);
  transform: translateY(-2px);
}
.block-padded { padding: 1.4rem; margin-bottom: 1.2rem; }
.block-label {
  font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.15em;
  color: #a99f86; margin-bottom: 0.6rem;
}

.chip {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.78rem; padding: 0.25rem 0.7rem;
  border: 1px solid rgba(201, 162, 39, 0.28); border-radius: 999px;
  color: #d8cfb4; background: rgba(201, 162, 39, 0.06);
  transition: background 0.2s, border-color 0.2s; cursor: pointer;
  font-family: Georgia, serif;
}
.chip:hover { background: rgba(201, 162, 39, 0.15); border-color: rgba(201, 162, 39, 0.55); }
.chip.active { background: rgba(201, 162, 39, 0.2); border-color: #c9a227; color: #e6c969; }
.chip-lg { font-size: 0.9rem; padding: 0.5rem 1.2rem; }
.chip.tiny { font-size: 0.72rem; padding: 0.15rem 0.55rem; }
.chip-row { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.symbol-badge {
  font-family: Georgia, serif; color: #c9a227;
  text-shadow: 0 0 24px rgba(201, 162, 39, 0.35); line-height: 1;
}
.card-glyph { font-size: 1.8rem; margin-bottom: 0.5rem; }
.med-glyph { font-size: 2.2rem; flex-shrink: 0; }
.big-glyph { font-size: 2.8rem; flex-shrink: 0; }

/* ————— Grilles ————— */
.grid { display: grid; gap: 1.2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.grid-theme { display: grid; grid-template-columns: 2fr 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .grid-theme { grid-template-columns: 1fr; } }
.theme-main > * { margin-bottom: 1.2rem; }
.theme-side > * { margin-bottom: 1.2rem; }
.flex-row { display: flex; align-items: flex-start; gap: 1.2rem; }
.flex-col { display: flex; flex-direction: column; gap: 0.5rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; }

/* ————— Accueil ————— */
.hero { text-align: center; padding: 2.5rem 0 3rem; }
.hero-symbol { font-size: 4.5rem; margin-bottom: 1.2rem; }
.hero-title { font-size: 3.4rem; margin: 0; line-height: 1.15; }
.hero-subtitle { font-size: 1.4rem; margin-top: 0.6rem; }
.hero-text { max-width: 52rem; margin: 1.4rem auto 0; font-size: 1.05rem; }
.hero-actions { display: flex; justify-content: center; gap: 0.8rem; margin-top: 1.8rem; flex-wrap: wrap; }
.transmission { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.8rem; font-size: 1.15rem; }
@media (max-width: 700px) { .hero-title { font-size: 2.2rem; } }

/* ————— Livres ————— */
.book-card h2 { margin: 0 0 0.15rem; font-size: 1.5rem; }
.list { margin: 0.4rem 0 0; padding-left: 1.2rem; }
.list li { margin-bottom: 0.25rem; color: #cfc6ac; font-size: 0.9rem; }

/* ————— Sections ————— */
.refs { margin-top: 0.9rem; padding-top: 0.7rem; border-top: 1px solid rgba(201, 162, 39, 0.15); display: flex; flex-wrap: wrap; gap: 0.4rem; }
.side-link { font-size: 0.9rem; color: #d8cfb4; transition: color 0.2s; }
.side-link:hover { color: #e6c969; }
.plate-thumb {
  background: rgba(255, 255, 255, 0.94); border-radius: 0.4rem; padding: 0.25rem;
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.plate-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ————— Tables ————— */
.table-scroll { overflow-x: auto; }
.corr-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.corr-table th {
  text-align: left; padding: 0.55rem 0.7rem; color: #e6c969;
  border-bottom: 2px solid rgba(201, 162, 39, 0.35);
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1rem; white-space: nowrap;
}
.corr-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid rgba(201, 162, 39, 0.12); vertical-align: top; }
.corr-table tbody tr:hover { background: rgba(201, 162, 39, 0.05); }
.note { border-top: 1px solid rgba(201, 162, 39, 0.15); padding-top: 0.8rem; }

/* ————— Planches ————— */
.filter-bar { display: flex; flex-direction: column; gap: 0.7rem; }
.filter-form { max-width: 26rem; }
.plate-card { overflow: hidden; }
.plate-img {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.95); aspect-ratio: 1; overflow: hidden; padding: 0.4rem;
}
.plate-img img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.25s; }
.plate-img:hover img { transform: scale(1.06); }
.plate-caption { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.55rem 0.7rem; }
.plate-title { font-size: 0.82rem; }

/* ————— Stances ————— */
.stances-list { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 1.2rem; }
.stance { overflow: hidden; }
.stance-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  padding: 0.8rem 1.2rem; background: none; border: none; color: inherit;
  font-size: 1.05rem; cursor: pointer; font-family: Georgia, serif;
}
.stance-body { padding: 0 1.2rem 1.1rem; }

/* ————— Lexique ————— */
.alphabet { margin-top: 0.5rem; }
.lex-list { display: flex; flex-direction: column; gap: 0.7rem; }
.lex-entry { padding: 0.8rem 1.1rem; }
.lex-head { display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.lex-term { font-size: 1.15rem; }
.lex-entry p { margin: 0.3rem 0 0; }
mark { background: rgba(201, 162, 39, 0.35); color: #fff; border-radius: 2px; padding: 0 1px; }
.pagination { justify-content: center; align-items: center; }

/* ————— Graphe ————— */
.graph-wrap { overflow: hidden; }
#graphSvg { width: 100%; display: block; background: radial-gradient(ellipse at center, #141126 0%, #0c0a18 75%); }
.graph-node { cursor: pointer; }
.graph-node:hover circle { fill-opacity: 1; stroke: #e6c969; }

/* ————— Recherche / divers ————— */
.search-input {
  width: 100%; background: rgba(18, 15, 34, 0.9);
  border: 1px solid rgba(201, 162, 39, 0.25); border-radius: 0.6rem;
  padding: 0.6rem 1rem; color: #e9e2cf; font-family: Georgia, serif;
  outline: none; transition: border-color 0.2s; font-size: 0.95rem;
}
.search-input:focus { border-color: rgba(201, 162, 39, 0.6); }
.search-input::placeholder { color: #6f6753; }
.search-form .search-input { padding: 0.4rem 0.8rem; font-size: 0.85rem; }

/* ————— Pied de page ————— */
.site-footer { border-top: 1px solid rgba(201, 162, 39, 0.15); margin-top: 2rem; }
.site-footer .wrap { text-align: center; padding: 1.6rem 1rem; color: #a99f86; font-size: 0.88rem; }
.footer-symbols { font-size: 1.4rem; margin-bottom: 0.5rem; }

/* ————— Animations / sélection / scrollbars ————— */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-in { animation: fadeIn 0.45s ease both; }
::selection { background: rgba(201, 162, 39, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0c0a18; }
::-webkit-scrollbar-thumb { background: #2c2749; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(201, 162, 39, 0.33); }
