/* ── Positions Planètes & Maisons ─────────────────────────────── */

/* Tab bar */
.pos-tabs {
  display: flex;
  gap: 2px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--border);
  background: var(--block-header-grad);
  flex-shrink: 0;
}
.pos-tab {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 6px 6px 0 0;
  cursor: pointer;
  background: transparent;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.pos-tab:hover { background: var(--hover-bg); color: var(--text); }
.pos-tab.pos-tab-active {
  background: var(--surface);
  color: var(--indigo);
  border: 1px solid var(--border);
  border-bottom: 1px solid var(--surface);
  margin-bottom: -1px;
}

/* Scroll wrapper */
.pos-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  padding: 0;
}

/* Section header (houses) */
.pos-section { padding: 0 10px 8px; }
.pos-houses { padding-top: 0; }
.pos-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 10px 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pos-sys-badge {
  font-size: 10px;
  font-weight: 600;
  background: var(--hover-bg);
  color: var(--text-muted);
  border-radius: 4px;
  padding: 1px 5px;
  letter-spacing: 0;
  text-transform: none;
}

/* Tables */
.pos-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.pos-table th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.pos-table td {
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.pos-table tbody tr:last-child td { border-bottom: none; }
.pos-table tbody tr:hover { background: var(--hover-bg); }

/* Planet glyph column */
.pos-glyph {
  font-size: 17px;
  text-align: center;
  color: var(--indigo);
  line-height: 1;
}
/* Sign glyph inside cells */
.pos-sign-glyph {
  font-size: 14px;
  margin-right: 3px;
  vertical-align: middle;
}
/* Retrograde indicator */
.pos-retro {
  font-size: 10px;
  color: var(--text-muted);
  margin-left: 2px;
  vertical-align: super;
}
/* House column — roman numeral */
.pos-house { text-align: center; color: var(--text-muted); font-size: 11px; }
/* Degree column */
.pos-deg { font-family: "Aileron", "Inter", sans-serif; font-variant-numeric: tabular-nums; font-size: 12px; color: var(--text-muted); white-space: nowrap; text-align: right; }
/* House number column (houses table) */
.pos-hnum { text-align: center; font-weight: 600; color: var(--indigo); font-size: 12px; }
/* Th alignements — spécificité plus haute que .pos-table th */
.pos-table .pos-th-deg   { text-align: right; }
.pos-table .pos-th-house { text-align: center; }
/* Séparateur Cuspides de maisons */
.pos-sep-row td { border-top: 2px solid var(--border); }
.pos-sep-cell {
  padding: 8px 6px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
/* Lignes maisons */
.pos-house-row .pos-hnum { text-align: left; padding-left: 6px; }
.pos-house-row td { color: var(--text-muted); }
/* Dignity badges */
.pos-dignity {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  /* PILULE (demande Mélanie 2026-07-28) : coins pleins + un peu plus d'air */
  padding: 2px 8px;
  border-radius: 50px;
  margin-left: 5px;
  vertical-align: middle;
  white-space: nowrap;
}
.pos-dignity-dom  { background: rgba(72,160,100,0.15); color: #3a9060; }
.pos-dignity-exal { background: rgba(200,155,20,0.15); color: #a07800; }
.pos-dignity-exil { background: rgba(200,80,60,0.12); color: #b04030; }
.pos-dignity-chut { background: rgba(140,40,40,0.12); color: #8a2020; }
[data-theme="glass"] .pos-dignity-dom  { background: rgba(72,160,100,0.2); color: #6dd49a; }
[data-theme="glass"] .pos-dignity-exal { background: rgba(220,180,50,0.2); color: #d4b840; }
[data-theme="glass"] .pos-dignity-exil { background: rgba(220,90,70,0.2); color: #e07060; }
[data-theme="glass"] .pos-dignity-chut { background: rgba(180,60,60,0.2); color: #c04040; }
[data-theme="lishu"] .pos-dignity-dom  { background: rgba(72,160,100,0.18); color: #2d7a50; }
[data-theme="lishu"] .pos-dignity-exal { background: rgba(190,140,10,0.18); color: #8a6800; }
[data-theme="lishu"] .pos-dignity-exil { background: rgba(190,70,50,0.15); color: #a03020; }
[data-theme="lishu"] .pos-dignity-chut { background: rgba(130,30,30,0.15); color: #801818; }
/* ASC / MC angle rows */
.pos-angle-row td { background: var(--hover-bg); }
.pos-angle-lbl { font-size: 10px; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; }

/* Empty / not computed state */
.pos-empty {
  padding: 18px 14px;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
}

/* Glass theme overrides */
[data-theme="glass"] .pos-tab.pos-tab-active {
  background: rgba(30,32,60,0.7);
  border-color: rgba(255,255,255,0.15);
  border-bottom-color: rgba(30,32,60,0.7);
}
[data-theme="glass"] .pos-table tbody tr:hover { background: rgba(255,255,255,0.05); }
[data-theme="glass"] .pos-angle-row td { background: rgba(255,255,255,0.04); }
[data-theme="glass"] .pos-sys-badge { background: rgba(255,255,255,0.08); }
[data-theme="glass"] .csel-menu {
  background: rgba(16, 18, 40, 0.97);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.20);
}


/* ══════════════════════════════════════════════════════════════
   Lishu theme — component-specific overrides
═══════════════════════════════════════════════════════════════ */

[data-theme="lishu"] .block {
  box-shadow: 0 6px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="lishu"] .block.dragging,
[data-theme="lishu"] .block.resizing {
  box-shadow:
    0 16px 56px rgba(31, 26, 20, 0.14),
    0 4px 20px rgba(31, 26, 20, 0.08),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.90),
    inset 0 -1px  0 rgba(31, 26, 20, 0.06),
    inset  1px 0  rgba(255, 255, 255, 0.38),
    inset -1px 0  rgba(255, 255, 255, 0.38);
}
[data-theme="lishu"] .block-header {
  border-bottom-color: rgba(255, 255, 255, 0.38);
}
[data-theme="lishu"] .block-header::after {
  display: none;
}

[data-theme="lishu"] #btn-house-system,
[data-theme="lishu"] #btn-extra-points,
[data-theme="lishu"] .csel-btn,
[data-theme="lishu"] .prof-sel-btn {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="lishu"] #p-search {
  background-color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="lishu"] #birth-form input[type="text"],
[data-theme="lishu"] #birth-form input[type="number"],
[data-theme="lishu"] #birth-form input[type="time"],
[data-theme="lishu"] #date-group {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="lishu"] #solar-year,
[data-theme="lishu"] #prof-year,
[data-theme="lishu"] .sr-reloc-input,
[data-theme="lishu"] .footer-date-group,
[data-theme="lishu"] .footer-time-group,
[data-theme="lishu"] .block-footer select {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="lishu"] #extra-points-menu,
[data-theme="lishu"] #profile-dropdown,
[data-theme="lishu"] #geocode-suggest-list,
[data-theme="lishu"] #house-system-menu,
[data-theme="lishu"] #theme-menu {
  background: rgba(252, 244, 235, 0.97);
  border-color: rgba(176, 104, 64, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

[data-theme="lishu"] .wheel-wrap text { filter: var(--wheel-glow); }
[data-theme="lishu"] .wheel-wrap line[data-asp-aspect] {
  filter: drop-shadow(0 0 2px rgba(176, 104, 64, 0.22));
}
[data-theme="lishu"] .wheel-wrap .dimmed { opacity: 0.22; }

[data-theme="lishu"] .lc-row.lc-nl td { background: rgba(122, 76, 56, 0.07); }
[data-theme="lishu"] .lc-row.lc-pl td { background: rgba(160, 120, 48, 0.07); }
[data-theme="lishu"] .lc-now-line {
  background: rgba(255, 250, 240, 0.18);
  border-bottom-color: rgba(255, 255, 255, 0.38);
}

[data-theme="lishu"] .phase-svg .phase-dark  { fill: #3a2018; }
[data-theme="lishu"] .phase-svg .phase-light { fill: #faf0e4; }
[data-theme="lishu"] .phase-svg .phase-ring  { stroke: rgba(176, 104, 64, 0.32); }

[data-theme="lishu"] .phase-interp {
  background: rgba(255, 250, 240, 0.24);
  border-color: rgba(255, 255, 255, 0.42);
}

[data-theme="lishu"] .prof-card     { background: rgba(255, 255, 255, 0.22); }
/* (règles lishu .prof-card-lum/.prof-card-custom supprimées le 2026-08-03 :
   les tuiles unifiées de la refonte Profections portent leur propre fond) */

[data-theme="lishu"] #transit-search-popup {
  background: rgba(252, 244, 235, 0.95);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}
[data-theme="lishu"] .ts-row select { background: rgba(255, 252, 245, 0.72); }
[data-theme="lishu"] .ts-sign-select { background: rgba(255, 252, 245, 0.52); }
[data-theme="lishu"] .ts-result-item:hover { background: rgba(255, 250, 240, 0.24); }
[data-theme="lishu"] .ts-dir-btn.ts-dir-active { background: var(--indigo); border-color: var(--indigo); color: #fff; }

[data-theme="lishu"] #views-menu { background: rgba(252, 244, 235, 0.97); }
[data-theme="lishu"] .csel-menu {
  background: rgba(252, 244, 235, 0.97);
  border-color: rgba(176, 104, 64, 0.22);
  box-shadow: 0 4px 20px rgba(31, 26, 20, 0.10), 0 1px 4px rgba(31, 26, 20, 0.05);
}
[data-theme="lishu"] .views-del:hover { background: rgba(220, 38, 38, 0.08); color: #b01010; }

[data-theme="lishu"] .pos-tab.pos-tab-active {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.55);
  color: var(--indigo);
}
[data-theme="lishu"] .pos-table tbody tr:hover { background: rgba(255, 250, 240, 0.22); }
[data-theme="lishu"] .pos-angle-row td { background: rgba(255, 250, 240, 0.14); }
[data-theme="lishu"] .pos-sys-badge { background: rgba(255, 250, 240, 0.28); }

/* ══════════════════════════════════════════════════════════════
   Aurora theme — component-specific overrides
═══════════════════════════════════════════════════════════════ */

[data-theme="aurora"] .block {
  box-shadow: 0 6px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="aurora"] .block.dragging,
[data-theme="aurora"] .block.resizing {
  box-shadow:
    0 16px 56px rgba(92, 46, 74, 0.18),
    0 4px 20px rgba(92, 46, 74, 0.10),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px  0 rgba(92, 46, 74, 0.07),
    inset  1px 0  rgba(255, 255, 255, 0.38),
    inset -1px 0  rgba(255, 255, 255, 0.38);
}
[data-theme="aurora"] .block-header {
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
[data-theme="aurora"] .block-header::after {
  display: none;
}

[data-theme="aurora"] #btn-house-system,
[data-theme="aurora"] #btn-extra-points,
[data-theme="aurora"] .csel-btn,
[data-theme="aurora"] .prof-sel-btn {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="aurora"] #p-search {
  background-color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="aurora"] #birth-form input[type="text"],
[data-theme="aurora"] #birth-form input[type="number"],
[data-theme="aurora"] #birth-form input[type="time"],
[data-theme="aurora"] #date-group {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="aurora"] #solar-year,
[data-theme="aurora"] #prof-year,
[data-theme="aurora"] .sr-reloc-input,
[data-theme="aurora"] .footer-date-group,
[data-theme="aurora"] .footer-time-group,
[data-theme="aurora"] .block-footer select {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="aurora"] #extra-points-menu,
[data-theme="aurora"] #profile-dropdown,
[data-theme="aurora"] #geocode-suggest-list,
[data-theme="aurora"] #house-system-menu,
[data-theme="aurora"] #theme-menu {
  background: rgba(253, 235, 240, 0.97);
  border-color: rgba(196, 112, 144, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

[data-theme="aurora"] .wheel-wrap text { filter: var(--wheel-glow); }
[data-theme="aurora"] .wheel-wrap line[data-asp-aspect] {
  filter: drop-shadow(0 0 2px rgba(196, 112, 144, 0.25));
}
[data-theme="aurora"] .wheel-wrap .dimmed { opacity: 0.22; }

[data-theme="aurora"] .lc-row.lc-nl td { background: rgba(138, 80, 112, 0.08); }
[data-theme="aurora"] .lc-row.lc-pl td { background: rgba(196, 112, 144, 0.08); }
[data-theme="aurora"] .lc-now-line {
  background: rgba(255, 255, 255, 0.18);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

[data-theme="aurora"] .phase-svg .phase-dark  { fill: #5C2E4A; }
[data-theme="aurora"] .phase-svg .phase-light { fill: #fde8f0; }
[data-theme="aurora"] .phase-svg .phase-ring  { stroke: rgba(196, 112, 144, 0.35); }

[data-theme="aurora"] .phase-interp {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.40);
}

[data-theme="aurora"] .prof-card     { background: rgba(255, 255, 255, 0.20); }
/* (règles aurora .prof-card-* supprimées le 2026-08-03, cf. refonte Profections) */

[data-theme="aurora"] #transit-search-popup {
  background: rgba(253, 235, 240, 0.95);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
}
[data-theme="aurora"] .ts-row select { background: rgba(255, 255, 255, 0.70); }
[data-theme="aurora"] .ts-sign-select { background: rgba(255, 255, 255, 0.50); }
[data-theme="aurora"] .ts-result-item:hover { background: rgba(255, 255, 255, 0.22); }
[data-theme="aurora"] .ts-dir-btn.ts-dir-active { background: var(--indigo); border-color: var(--indigo); color: #fff; }

[data-theme="aurora"] #views-menu { background: rgba(253, 235, 240, 0.96); }
[data-theme="aurora"] .csel-menu {
  background: rgba(253, 235, 240, 0.97);
  border-color: rgba(196, 112, 144, 0.25);
  box-shadow: 0 4px 20px rgba(92, 46, 74, 0.12), 0 1px 4px rgba(92, 46, 74, 0.06);
}
[data-theme="aurora"] .views-del:hover { background: rgba(220, 38, 38, 0.08); color: #b01010; }

[data-theme="aurora"] .pos-tab.pos-tab-active {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.55);
  color: var(--indigo);
}
[data-theme="aurora"] .pos-table tbody tr:hover { background: rgba(255, 255, 255, 0.18); }
[data-theme="aurora"] .pos-angle-row td { background: rgba(255, 255, 255, 0.12); }
[data-theme="aurora"] .pos-sys-badge { background: rgba(255, 255, 255, 0.25); }

/* ── Calendrier des Lunes ─────────────────────────────────────── */
#moon-cal-reset {
  background: none;
  border: none;
  padding: 0 4px;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  opacity: .7;
  transition: opacity .15s, color .15s;
}
#moon-cal-reset:hover { opacity: 1; color: var(--indigo); }

/* ── Dominantes ──────────────────────────────────────────────── */
.dom-tab {
  background: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.dom-tab:hover { color: var(--text); border-color: var(--indigo); }
.dom-tab-active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}
[data-theme="lishu"] .dom-tab-active,
[data-theme="aurora"] .dom-tab-active {
  color: #fff;
}

.dom-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px;
  justify-content: center;
}

.dom-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 110px;
}

.dom-panel-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: normal;   /* minuscules + majuscule initiale (Mélanie 2026-08-10) */
  text-transform: none;     /* était uppercase : titres désormais tels qu'écrits */
  color: var(--text-muted);
}

.dom-panel-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dom-donut { flex-shrink: 0; }

.dom-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.dom-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text);
}

.dom-legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0.85;
}

.dom-legend-lbl {
  flex: 1;
  color: var(--text-muted);
  font-size: 10.5px;
}

.dom-legend-val {
  font-weight: 600;
  font-size: 11px;
  min-width: 14px;
  text-align: right;
}

/* Barre sous le titre du bloc Infographie : accueille la bascule Camembert /
   Tableau (déplacée hors du header à la demande de Mélanie, 2026-08-10). */
.dom-bar {
  display: flex;
  align-items: center;
  padding: 2px 14px 8px;
  flex-shrink: 0;
}
/* Bloc rangé en bibliothèque, réduit, ou dans le dock mobile : la barre se
   masque comme le corps (constat de Mélanie 2026-08-10 : la bascule Camembert
   / Tableau s'affichait dans la vignette de la bibliothèque).
   La barre vit HORS de `.block-body`, donc le repli du bloc ne l'emporte pas
   avec lui — exactement le même oubli que l'annexe des roues le 2026-07-27,
   et le même patron de correction. */
.block-in-sidebar .dom-bar,
.block-collapsed .dom-bar,
.block-in-dock .dom-bar { display: none !important; }

/* ── Infographie — vue Tableau (bascule Camembert / Tableau, 2026-08-10) ── */
.dom-table {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
  padding: 14px;
}
/* Option A (Mélanie 2026-08-10) : chaque répartition dans une CARTE ombrée (même
   motif que les Profections : fond --surface + --shadow), plutôt qu'un simple
   liseré — celui-ci était trop clair, donc invisible, dans les thèmes autres que
   Classique et Nocturne. L'ombre délimite dans tous les thèmes ; la piste des
   barres (--hover-bg) reste contrastée sur --surface. */
.dom-cat {
  background: var(--surface);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow);
}
.dom-cat-title {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.dom-cat-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  margin: 4px 0;
}
.dom-cat-lbl { width: 84px; color: var(--text); flex-shrink: 0; }
.dom-cat-track {
  flex: 1;
  height: 7px;
  background: var(--hover-bg);
  border-radius: 4px;
  overflow: hidden;
}
.dom-cat-fill { display: block; height: 100%; border-radius: 4px; opacity: 0.85; }
.dom-cat-val {
  width: 16px;
  text-align: right;
  color: var(--text-muted);
  font-weight: 600;
  flex-shrink: 0;
}

.moon-cal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.moon-cal-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.moon-cal-table tbody tr:last-child td { border-bottom: none; }
.moon-cal-table tbody tr:hover { background: var(--hover-bg); }
.moon-cal-icon  { width: 24px; text-align: center; }
.moon-cal-type  { font-weight: 500; white-space: nowrap; }
.moon-cal-date  { color: var(--text-muted); white-space: nowrap; }
.moon-cal-time  { color: var(--text-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.moon-cal-sign  { white-space: nowrap; }
.moon-cal-new .moon-cal-type  { color: var(--text); }
.moon-cal-full .moon-cal-type { color: var(--indigo); }

.moon-cal-eclipse-row { background: rgba(122, 76, 56, 0.04); }
.moon-cal-eclipse {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--indigo);
  opacity: .75;
  letter-spacing: 0.01em;
  margin-top: 2px;
}

.moon-phase-dot {
  display: inline-block;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  vertical-align: middle;
}
.moon-phase-new  { background: var(--text); }
.moon-phase-full { background: var(--indigo); opacity: .75; }

.moon-cal-sign .astro-glyph {
  font-family: 'Astronomicon','Varela Round',serif;
  font-size: 14px;
}

/* ── Global icon-button tooltip ─────────────────────────────── */
#ui-tooltip {
  position: fixed;
  z-index: 9999;
  padding: 4px 9px;
  background: rgba(18, 18, 32, 0.92);
  color: #f0effa;
  font-size: 11px;
  font-weight: 500;
  border-radius: 5px;
  /* pre-line (ex-nowrap, 2026-08-03) : les infobulles multi-lignes de la roue
     des âges passent à la ligne sur \n ; les infobulles d'une ligne, sans \n,
     restent sur une ligne (pas de max-width, la bulle épouse son contenu). */
  white-space: pre-line;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  letter-spacing: .01em;
}
#ui-tooltip[hidden] { display: none; }
[data-theme="lishu"] #ui-tooltip {
  background: rgba(31, 26, 20, 0.88);
  color: #faf0e4;
}
[data-theme="aurora"] #ui-tooltip {
  background: rgba(58, 26, 42, 0.90);
  color: #fde8f0;
}

/* ── Glass (Nocturne) solid dark background for native menus ─── */
[data-theme="glass"] #theme-menu,
[data-theme="glass"] #house-system-menu,
[data-theme="glass"] #profile-dropdown,
[data-theme="glass"] #geocode-suggest-list {
  background: rgba(16, 18, 40, 0.97);
  border-color: rgba(255, 255, 255, 0.13);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 1px 4px rgba(0, 0, 0, 0.20);
}

/* ── Theme-menu label colors per active theme ────────────────── */
/* Cibler html[data-theme] pour ne pas affecter les boutons data-theme="glass" eux-mêmes */
/* Classique (aucun data-theme sur html) : forcer le texte en foncé */
html:not([data-theme]) .theme-label { color: #1a1a2e !important; }
html:not([data-theme]) .theme-sub   { color: #6b6880 !important; }
html[data-theme="glass"] .theme-label { color: #ffffff; }
html[data-theme="glass"] .theme-item[data-theme="aurora"] .theme-label { color: #c0bedd; }
html[data-theme="glass"] .theme-sub   { color: #c0bedd; }
html[data-theme="glass"] .theme-menu-title { color: #a8a6c2; }
html[data-theme="lishu"]  .theme-label { color: #1f1a14; }
html[data-theme="lishu"]  .theme-sub   { color: #7a4c38; }
html[data-theme="aurora"] .theme-label { color: #3A1A2A; }
html[data-theme="aurora"] .theme-sub   { color: #8A5070; }
html[data-theme="forest"] .theme-label { color: #2D4A35; }
html[data-theme="forest"] .theme-sub   { color: #5A7A62; }
html[data-theme="ocean"]  .theme-label { color: #1e3a4a; }
html[data-theme="ocean"]  .theme-sub   { color: #2e5f78; }

/* ── Ocean : menus natifs OPAQUES (oubli réparé le 2026-08-02, signalé par
   Mélanie : « la liste des thèmes est trop transparente, on ne voit rien »).
   Même patron que lishu/aurora/glass/forest : le groupe des 5 menus du header,
   surface sable d'Ocean (celle des th de tableaux) + bordure lagon. */
[data-theme="ocean"] #theme-menu,
[data-theme="ocean"] #house-system-menu,
[data-theme="ocean"] #profile-dropdown,
[data-theme="ocean"] #extra-points-menu,
[data-theme="ocean"] #geocode-suggest-list {
  background: rgba(251, 246, 232, 0.97);
  border-color: rgba(100, 140, 160, 0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Ocean : « Choisir un point » des Profections au même verre que les pilules
   et les sélecteurs (.csel-btn, st-02) — demande Mélanie 2026-08-02.
   background-color SEULEMENT : le raccourci background effacerait le chevron. */
[data-theme="ocean"] .prof-sel-btn {
  background-color: var(--hover-bg);
  border-color: transparent;
  box-shadow: 0 1px 4px rgba(20, 42, 56, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}
[data-theme="ocean"] .prof-sel-btn:hover { border-color: var(--indigo); color: var(--indigo); }
/* Ocean — champs à remplir en BLANC translucide, exactement comme Lishu (même liste
   de sélecteurs que le bloc Lishu plus haut, demande Mélanie 2026-11-12 : « le
   calendrier et là où il y a les minutes, partout, comme dans Lishu, c'est blanc »).
   Avant : var(--bg) crème #faf5ea. L'arrondi d'Océan est conservé. */
[data-theme="ocean"] #p-search,
[data-theme="ocean"] #birth-form input[type="text"],
[data-theme="ocean"] #birth-form input[type="number"],
[data-theme="ocean"] #birth-form input[type="time"],
[data-theme="ocean"] #date-group,
[data-theme="ocean"] #solar-year,
[data-theme="ocean"] #prof-year,
[data-theme="ocean"] .sr-reloc-input,
[data-theme="ocean"] .footer-date-group,
[data-theme="ocean"] .footer-time-group,
[data-theme="ocean"] .block-footer select {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
}

/* ── Forest — component overrides ───────────────────────────── */
[data-theme="forest"] .block {
  box-shadow: 0 6px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
}
[data-theme="forest"] .block.dragging,
[data-theme="forest"] .block.resizing {
  box-shadow:
    0 16px 56px rgba(45, 74, 53, 0.18),
    0 4px 20px rgba(45, 74, 53, 0.10),
    inset 0 1.5px 0 rgba(255, 255, 255, 0.88),
    inset 0 -1px  0 rgba(45, 74, 53, 0.07),
    inset  1px 0  rgba(255, 255, 255, 0.38),
    inset -1px 0  rgba(255, 255, 255, 0.38);
}
[data-theme="forest"] .block-header {
  border-bottom-color: rgba(255, 255, 255, 0.35);
}
[data-theme="forest"] .block-header::after {
  display: none;
}

[data-theme="forest"] #btn-house-system,
[data-theme="forest"] #btn-extra-points,
[data-theme="forest"] .csel-btn,
[data-theme="forest"] .prof-sel-btn {
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="forest"] #p-search {
  background-color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="forest"] #birth-form input[type="text"],
[data-theme="forest"] #birth-form input[type="number"],
[data-theme="forest"] #birth-form input[type="time"],
[data-theme="forest"] #date-group {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="forest"] #solar-year,
[data-theme="forest"] #prof-year,
[data-theme="forest"] .sr-reloc-input,
[data-theme="forest"] .footer-date-group,
[data-theme="forest"] .footer-time-group,
[data-theme="forest"] .block-footer select {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.6);
  border-radius: 13px;
}
[data-theme="forest"] #extra-points-menu,
[data-theme="forest"] #profile-dropdown,
[data-theme="forest"] #geocode-suggest-list,
[data-theme="forest"] #house-system-menu,
[data-theme="forest"] #theme-menu {
  background: rgba(240, 233, 219, 0.97);
  border-color: rgba(74, 122, 88, 0.25);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

[data-theme="forest"] .wheel-wrap text { filter: var(--wheel-glow); }
[data-theme="forest"] .wheel-wrap line[data-asp-aspect] {
  filter: drop-shadow(0 0 2px rgba(74, 122, 88, 0.25));
}
[data-theme="forest"] .wheel-wrap .dimmed { opacity: 0.22; }

[data-theme="forest"] .lc-row.lc-nl td { background: rgba(45, 74, 53, 0.08); }
[data-theme="forest"] .lc-row.lc-pl td { background: rgba(74, 122, 88, 0.08); }
[data-theme="forest"] .lc-now-line {
  background: rgba(255, 255, 255, 0.18);
  border-bottom-color: rgba(255, 255, 255, 0.35);
}

[data-theme="forest"] .phase-svg .phase-dark  { fill: #1A3A28; }
[data-theme="forest"] .phase-svg .phase-light { fill: #e4f0e8; }
[data-theme="forest"] .phase-svg .phase-ring  { stroke: rgba(74, 122, 88, 0.35); }

[data-theme="forest"] .prof-card     { background: rgba(255, 255, 255, 0.20); }
/* (règles forest .prof-card-* supprimées le 2026-08-03, cf. refonte Profections) */

[data-theme="forest"] #transit-search-popup {
  background: rgba(240, 233, 219, 0.96);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
}
[data-theme="ocean"] #transit-search-popup {
  background: rgba(255, 252, 244, 0.96);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
[data-theme="forest"] .ts-row select { background: rgba(240, 233, 219, 0.80); }
[data-theme="forest"] .ts-result-item:hover { background: rgba(240, 233, 219, 0.40); }
[data-theme="forest"] .ts-dir-btn.ts-dir-active { background: var(--indigo); border-color: var(--indigo); color: #fff; }

[data-theme="forest"] #views-menu { background: rgba(240, 233, 219, 0.97); }
[data-theme="forest"] .csel-menu {
  background: rgba(240, 233, 219, 0.97);
  border-color: rgba(74, 122, 88, 0.25);
  box-shadow: 0 4px 20px rgba(45, 74, 53, 0.12), 0 1px 4px rgba(45, 74, 53, 0.06);
}
[data-theme="forest"] .views-del:hover { background: rgba(220, 38, 38, 0.08); color: #b01010; }

[data-theme="forest"] .pos-tab.pos-tab-active {
  background: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.55);
  color: var(--indigo);
}
[data-theme="forest"] .pos-table tbody tr:hover { background: rgba(255, 255, 255, 0.18); }
[data-theme="forest"] .pos-angle-row td { background: rgba(255, 255, 255, 0.12); }
[data-theme="forest"] .pos-sys-badge { background: rgba(255, 255, 255, 0.25); }

[data-theme="forest"] #ui-tooltip {
  background: rgba(30, 56, 38, 0.90);
  color: #e4f0e8;
}



/* ══════════════════════════════════════════════════════════════
   Calendrier Transit
   ══════════════════════════════════════════════════════════════ */

.tcal-loading {
  text-align: center;
  padding: 24px 12px;
  font-size: 13px;
  opacity: 0.55;
}

/* Period label between prev/next arrows */
#tcal-period-label {
  min-width: 130px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Active view button (Mois / Semaine) */
.btn-tcal-active {
  background: var(--accent, var(--indigo)) !important;
  color: #fff !important;
  border-color: var(--accent, var(--indigo)) !important;
}

/* Harmonisation calendrier : Mois/Semaine/Jour en UNE pilule segmentée ;
   champ date + bouton planètes en pilules ; flèches ‹ › à plat. */
.tcal-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 50px;
  overflow: hidden;
}
.tcal-view-toggle .btn-tcal-view {
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  height: 24px;
  padding: 0 13px;
}
.tcal-view-toggle .btn-tcal-view:first-child { border-left: none; }
/* (Règle d'arrondi/padding des boutons planètes RETIRÉE le 2026-08-22 : ces
   boutons sont devenus de vraies pilules .csel-btn — par id, elle écrasait le
   padding droit de 22 px réservé au chevron, qui mordait sur le texte.) */
#btn-tcal-prev, #btn-tcal-next,
#btn-tncal-prev, #btn-tncal-next {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 6px;
}
#btn-tcal-prev:hover, #btn-tcal-next:hover,
#btn-tncal-prev:hover, #btn-tncal-next:hover {
  color: var(--indigo);
  background: transparent;
}

/* Period trigger button (opens drill-down picker)
   Fond éclairci + ombre douce (demande Mélanie 2026-08-24, « un peu plus
   blanc, avec une ombre ») : color-mix éclaircit le fond du thème courant ;
   glass, sombre, garde son voile clair (surcharge plus bas). Invisible sur
   mobile, qui cache cette pilule. */
.tcal-period-btn {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 14px;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: color-mix(in srgb, var(--bg) 40%, #fff);
  color: var(--fg);
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgba(26, 26, 46, 0.14);
}
[data-theme="glass"] .tcal-period-btn { background: rgba(255, 255, 255, 0.12); }
.tcal-period-btn:hover {
  background: var(--block-hover, rgba(99,91,255,0.08));
}
/* Lishu : crème BLANCHIE (2026-08-24, « un peu plus blanc » — l'ancienne
   crème 255,248,234 écrasait l'éclaircissement de la règle de base) */
[data-theme="lishu"] .tcal-period-btn        { background: rgba(255, 253, 247, 0.98); }
[data-theme="lishu"] .tcal-period-btn:hover  { background: rgba(255, 255, 252, 0.99); }

/* Keep picker popup above other elements */
.tcal-dp-popup {
  z-index: 9999;
}

/* Separator pipe */
.tcal-sep {
  color: var(--border);
  font-size: 14px;
  padding: 0 2px;
  user-select: none;
}

/* ── Aspect toggle buttons ─────────────────────────────────── */

.tcal-asp-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity .12s;
  flex-shrink: 0;
  color: #fff;
  font-family: "Astronomicon","Varela Round","Cormorant Garamond","Segoe UI Symbol","Apple Symbols",serif;
}
.tcal-asp-btn[data-asp="Conjonction"],
.tcal-asp-btn[data-tnasp="Conjonction"] { background: #e8931a; }
.tcal-asp-btn[data-asp="Opposition"],
.tcal-asp-btn[data-tnasp="Opposition"]  { background: #c94b4b; }
.tcal-asp-btn[data-asp="Carré"],
.tcal-asp-btn[data-tnasp="Carré"]       { background: #c94b4b; opacity: 0.80; }
.tcal-asp-btn[data-asp="Trigone"],
.tcal-asp-btn[data-tnasp="Trigone"]     { background: #4b7fc9; }
.tcal-asp-btn[data-asp="Sextile"],
.tcal-asp-btn[data-tnasp="Sextile"]     { background: #4ba876; }
.tcal-asp-btn.tcal-retro-toggle         { background: #8b4ca8; font-style: italic; font-weight: 600; }
.tcal-asp-btn:not(.tcal-asp-active)     { opacity: 0.22 !important; }

/* ── Planet filter dropdown ────────────────────────────────── */

.tcal-planet-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tcal-planet-menu {
  /* position & coordinates set by JS (position:fixed) */
  min-width: 160px;
  background: var(--bg, #fff);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 6px 0;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.tcal-planet-menu[hidden] { display: none; }
[data-theme="lishu"]  .tcal-planet-menu { background: #fdf6ec; }
[data-theme="aurora"] .tcal-planet-menu { background: #fdf2f4; }
[data-theme="forest"] .tcal-planet-menu { background: #f0e9db; }
[data-theme="glass"]  .tcal-planet-menu { background: rgba(30, 39, 80, 0.95); border-color: rgba(255,255,255,0.14); backdrop-filter: blur(20px); }
[data-theme="glass"]  .tcal-pl-opt, [data-theme="glass"] .tcal-pl-all { color: rgba(255,255,255,0.85); }

.tcal-pl-all,
.tcal-pl-opt {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tcal-pl-all:hover,
.tcal-pl-opt:hover { background: var(--hover-bg); }

.tcal-pl-all { font-weight: 600; color: var(--text-muted); font-size: 11px; }

.tcal-pl-opt span {
  font-family: "Astronomicon","Varela Round","Cormorant Garamond","Segoe UI Symbol","Apple Symbols",serif;
  font-size: 15px;
  width: 18px;
  text-align: center;
}

.tcal-pl-sep {
  height: 1px;
  background: var(--border);
  margin: 4px 8px;
}


/* [data-theme="glass"] .tcal-planet-menu moved inline above */

/* ── Calendar grid ─────────────────────────────────────────── */

.tcal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  font-size: 13px;
  min-height: 100%;
}
[data-theme="lishu"]  .tcal-grid,
[data-theme="aurora"] .tcal-grid,
[data-theme="forest"] .tcal-grid  { border-color: rgba(255,255,255,0.22); }
[data-theme="glass"]  .tcal-grid  { border-color: rgba(255,255,255,0.12); }

/* ── Vue Jour (liste verticale des événements d'un jour) ───────── */
.tcal-day-view {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
}
.tcal-day-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tcal-day-time {
  flex: 0 0 auto;
  min-width: 42px;
  font-size: 12px;
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
}
.tcal-day-empty {
  padding: 28px 12px;
  text-align: center;
  opacity: 0.5;
  font-size: 14px;
}
.tcal-day-retro { margin-bottom: 4px; }

.tcal-dow {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 2px;
  opacity: 0.55;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--block-header-grad);
}
[data-theme="lishu"]  .tcal-dow,
[data-theme="aurora"] .tcal-dow,
[data-theme="forest"] .tcal-dow  { border-color: rgba(255,255,255,0.22); }
[data-theme="glass"]  .tcal-dow  { border-color: rgba(255,255,255,0.12); }

.tcal-dow-today {
  color: var(--accent, var(--indigo));
  opacity: 1;
}

/* Day cells */
.tcal-day {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 6px 6px 6px 7px;
  min-height: 110px;
  vertical-align: top;
  overflow: visible;   /* events must never be silently clipped */
  background: rgba(255,255,255,0.06);
}
[data-theme="lishu"]  .tcal-day,
[data-theme="aurora"] .tcal-day,
[data-theme="forest"] .tcal-day  { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); }
[data-theme="glass"]  .tcal-day  { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.04); }

.tcal-day.tcal-other { opacity: 0.3; }

/* Today cell highlight */
.tcal-today {
  background: rgba(var(--accent-rgb, 99, 91, 255), 0.10) !important;
  border-color: rgba(var(--accent-rgb, 99, 91, 255), 0.45) !important;
  box-shadow: inset 0 0 0 1.5px rgba(var(--accent-rgb, 99, 91, 255), 0.30);
}
[data-theme="lishu"]  .tcal-today { background: rgba(246, 213, 194, 0.30) !important; border-color: rgba(176, 104, 64, 0.48) !important; box-shadow: inset 0 0 0 1.5px rgba(176,104,64,0.24); }
[data-theme="aurora"] .tcal-today { background: rgba(255, 160, 100, 0.18) !important; border-color: rgba(255, 140, 80, 0.55) !important; box-shadow: inset 0 0 0 1.5px rgba(255,140,80,0.30); }
[data-theme="glass"]  .tcal-today { background: rgba(130, 120, 255, 0.14) !important; border-color: rgba(130,120,255,0.50) !important; box-shadow: inset 0 0 0 1.5px rgba(130,120,255,0.30); }

.tcal-day-num {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 5px;
}

/* tcal-today-num : la version SANS case surlignée (2026-08-24, demande
   Mélanie « comme la vue Semaine ») — seul le numéro garde sa pastille
   ronde. .tcal-today (case teintée + liseré) n'est plus émis nulle part
   depuis le même jour ; règles conservées telles quelles. */
.tcal-today .tcal-day-num,
.tcal-today-num .tcal-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, var(--indigo));
  color: #fff;
  font-size: 12px;
}

/* Week view: taller cells */
.tcal-week-grid .tcal-week-day {
  min-height: 200px;
}

/* ── Event chips ───────────────────────────────────────────── */

.tcal-ev {
  display: block;
  font-size: 16px;
  line-height: 1.55;
  padding: 3px 7px;
  border-radius: 4px;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
  font-weight: 500;
  letter-spacing: 0.05em;   /* espace les glyphes (sinon collés sur Chrome) */
  /* Glyphe SYSTÈME (européen), comme les roues en SVG — PAS Astronomicon : en HTML
     Chrome ignore le FE0E et prendrait le glyphe américain d'Astronomicon. */
  font-family: "Cormorant Garamond","EB Garamond","Segoe UI Symbol","Apple Symbols","DejaVu Sans",serif;
}

/* ── CARTES D'ÉVÉNEMENTS : fond blanc + liseré (2026-08-15, demande Mélanie).
   Le rendu « fond blanc cassé, seul le liseré et l'encre gardent la couleur »,
   né sur Lishu/Aurora (anti-rose), est GÉNÉRALISÉ à tous les thèmes : les
   fonds teintés des cartes (phases, ingresses, stations, aspects) passent en
   blanc translucide ; Nocturne, sombre, reçoit l'équivalent : un fond neutre
   rgba(255,255,255,0.08), encres claires conservées. Restent EN COULEUR :
   les pastilles d'éclipse ci-dessous et les lunaisons re-colorées de la vue
   Jour/Semaine mobile (tcal-mobile.css, id-scopé, gagne sur ces règles). */

/* ── Moon phases ── carte blanche, liseré doré ───────────── */
.tcal-ev-phase {
  background: rgba(255, 255, 255, 0.62);
  color: #8a6000;
  border-left: 3px solid rgba(220, 165, 20, 0.55);
  text-align: center;
}
[data-theme="lishu"]  .tcal-ev-phase { background: rgba(255, 250, 240, 0.68); color: #7a5000; }
[data-theme="aurora"] .tcal-ev-phase { background: rgba(255, 255, 255, 0.62); color: #7a5000; }
[data-theme="forest"] .tcal-ev-phase { background: rgba(255, 255, 255, 0.62); color: #6a4800; }
[data-theme="glass"]  .tcal-ev-phase { background: rgba(255, 255, 255, 0.08); color: #f0c040; border-left-color: rgba(240,185,40,0.50); }

/* ── Ingresses ── carte blanche, liseré bleu acier ───────── */
.tcal-ev-ingress {
  background: rgba(255, 255, 255, 0.62);
  color: #1e4fa0;
  border-left: 3px solid rgba(60, 120, 230, 0.40);
  text-align: center;
  padding-left: 4px;
  padding-right: 4px;
}
[data-theme="lishu"]  .tcal-ev-ingress { background: rgba(255, 250, 240, 0.68); color: #2a55b0; }
[data-theme="aurora"] .tcal-ev-ingress { background: rgba(255, 255, 255, 0.62); color: #2a55b0; }
[data-theme="forest"] .tcal-ev-ingress { background: rgba(255, 255, 255, 0.62); color: #1a428a; }
[data-theme="glass"]  .tcal-ev-ingress { background: rgba(255, 255, 255, 0.08); color: #90b8ff; border-left-color: rgba(100,160,255,0.50); }

/* ── Eclipse period ── fond teinté des cases de jour RETIRÉ le 2026-08-15
   (demande Mélanie) : la classe .tcal-eclipse-period n'est plus posée par les
   calendriers, les règles ont été supprimées ici. Les pastilles d'événement
   d'éclipse ci-dessous, elles, restent. ─── */

/* ── Eclipse event chips ─────────────────────────────────── */
.tcal-ev-eclipse-solar {
  background: rgba(240, 170, 20, 0.18);
  color: #8a5800;
  border-left: 3px solid rgba(240, 170, 20, 0.55);
  text-align: center;
  font-weight: 600;
  padding-left: 4px;
  padding-right: 4px;
}
.tcal-ev-eclipse-lunar {
  background: rgba(100, 130, 220, 0.16);
  color: #2a3a8a;
  border-left: 3px solid rgba(100, 130, 220, 0.50);
  text-align: center;
  font-weight: 600;
  padding-left: 4px;
  padding-right: 4px;
}
[data-theme="glass"] .tcal-ev-eclipse-solar { background: rgba(255,190,40,0.18); color: #f0c060; border-left-color: rgba(255,190,40,0.55); }
[data-theme="glass"] .tcal-ev-eclipse-lunar { background: rgba(120,150,255,0.18); color: #a0b8ff; border-left-color: rgba(120,150,255,0.55); }
[data-theme="lishu"]  .tcal-ev-eclipse-solar { background: rgba(220,160,20,0.16); color: #7a4800; }
[data-theme="lishu"]  .tcal-ev-eclipse-lunar { background: rgba(80,110,200,0.16); color: #1a308a; }
[data-theme="aurora"] .tcal-ev-eclipse-solar { background: rgba(220,160,20,0.16); color: #7a4800; }
[data-theme="aurora"] .tcal-ev-eclipse-lunar { background: rgba(80,110,200,0.16); color: #1a308a; }
[data-theme="forest"] .tcal-ev-eclipse-solar { background: rgba(200,150,20,0.16); color: #6a4000; }
[data-theme="forest"] .tcal-ev-eclipse-lunar { background: rgba(70,100,180,0.16); color: #1a2878; }

/* ── Retrograde station event chips ── carte blanche ─────── */
.tcal-ev-retro-on {
  background: rgba(255, 255, 255, 0.62);
  color: #a02020;
  border-left: 3px solid rgba(196, 68, 68, 0.45);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.tcal-ev-retro-off {
  background: rgba(255, 255, 255, 0.62);
  color: #1a6a40;
  border-left: 3px solid rgba(50, 160, 100, 0.45);
  text-align: center;
  font-weight: 600;
  letter-spacing: 0.03em;
}
[data-theme="glass"] .tcal-ev-retro-on  { background: rgba(255, 255, 255, 0.08); color: #ff9898; border-left-color: rgba(220,80,80,0.55); }
[data-theme="glass"] .tcal-ev-retro-off { background: rgba(255, 255, 255, 0.08); color: #80eeb0; border-left-color: rgba(60,200,120,0.55); }
[data-theme="lishu"]  .tcal-ev-retro-on,
[data-theme="lishu"]  .tcal-ev-retro-off { background: rgba(255,250,240,0.68); }
[data-theme="aurora"] .tcal-ev-retro-on,
[data-theme="aurora"] .tcal-ev-retro-off { background: rgba(255,255,255,0.62); }

/* "D" (direct station) uses Aileron title font */
.tcal-direct-d {
  font-family: 'Aileron', sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ── Per-day retrograde indicator row ────────────────────── */
.tcal-retro-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-bottom: 2px;
}
.tcal-retro-badge {
  font-size: 0.72rem;
  color: #c44;
  opacity: 0.65;
  line-height: 1.2;
  cursor: default;
}
[data-theme="glass"]  .tcal-retro-badge { color: #ff9090; opacity: 0.75; }
[data-theme="lishu"]  .tcal-retro-badge { color: #a03028; opacity: 0.70; }
[data-theme="aurora"] .tcal-retro-badge { color: #a03030; opacity: 0.70; }

/* ── Retrograde inline marker — shown directly on event chips ── */
.tcal-retro-inline {
  font-size: 0.62rem;
  color: #c44;
  opacity: 0.80;
  line-height: 1;
  vertical-align: super;
  margin: 0 1px;
}
[data-theme="glass"]  .tcal-retro-inline { color: #ff9090; }
[data-theme="lishu"]  .tcal-retro-inline { color: #a03028; }
[data-theme="aurora"] .tcal-retro-inline { color: #a03030; }
[data-theme="forest"] .tcal-retro-inline { color: #8B3030; }

/* ── Aspect chips — 3-column flex layout ─────────────────── */
.tcal-ev-aspect {
  display: flex;
  align-items: center;
  padding: 0;
  overflow: visible;
}

/* Left / right columns : planet + sign */
.tcal-asp-col {
  flex: 1;
  text-align: center;
  padding: 3px 2px;
  letter-spacing: 0.05em;   /* était -0.02em (négatif) → collait les glyphes sur Chrome */
}

/* Middle column : aspect glyph */
.tcal-asp-mid {
  flex: 0 0 auto;
  padding: 3px 4px;
  font-size: 14px;
  opacity: 0.75;
  text-align: center;
}

/* ── Per-aspect colors ── carte blanche, liseré à la couleur de l'aspect
   (2026-08-15, cf. bannière CARTES D'ÉVÉNEMENTS plus haut) ─────────────── */
/* Conjunction : warm orange */
.tcal-asp-conj {
  background: rgba(255, 255, 255, 0.62);
  color: #7a4000;
  border-left: 3px solid rgba(232, 147, 26, 0.55);
}
/* Opposition : red */
.tcal-asp-opp {
  background: rgba(255, 255, 255, 0.62);
  color: #7a1a1a;
  border-left: 3px solid rgba(201, 75, 75, 0.50);
}
/* Square : lighter red */
.tcal-asp-sq {
  background: rgba(255, 255, 255, 0.62);
  color: #7a3010;
  border-left: 3px solid rgba(210, 100, 60, 0.48);
}
/* Trine : blue */
.tcal-asp-tri {
  background: rgba(255, 255, 255, 0.62);
  color: #1a4a7a;
  border-left: 3px solid rgba(75, 127, 201, 0.45);
}
/* Sextile : green */
.tcal-asp-sex {
  background: rgba(255, 255, 255, 0.62);
  color: #1a5a38;
  border-left: 3px solid rgba(75, 168, 118, 0.45);
}

/* Aurora — white-base backgrounds to neutralise pink bleed */
[data-theme="lishu"]  .tcal-asp-conj,
[data-theme="lishu"]  .tcal-asp-opp,
[data-theme="lishu"]  .tcal-asp-sq,
[data-theme="lishu"]  .tcal-asp-tri,
[data-theme="lishu"]  .tcal-asp-sex { background: rgba(255, 250, 240, 0.68); }
[data-theme="lishu"]  .tcal-ev-phase   { background: rgba(255, 250, 240, 0.68); }
[data-theme="lishu"]  .tcal-ev-ingress { background: rgba(255, 250, 240, 0.68); }
[data-theme="aurora"] .tcal-asp-conj,
[data-theme="aurora"] .tcal-asp-opp,
[data-theme="aurora"] .tcal-asp-sq,
[data-theme="aurora"] .tcal-asp-tri,
[data-theme="aurora"] .tcal-asp-sex { background: rgba(255, 255, 255, 0.62); }
[data-theme="aurora"] .tcal-ev-phase   { background: rgba(255, 255, 255, 0.62); }
[data-theme="aurora"] .tcal-ev-ingress { background: rgba(255, 255, 255, 0.62); }

/* Glass — carte sombre neutre, encres claires, liseré coloré (2026-08-15) */
[data-theme="glass"] .tcal-asp-conj  { background: rgba(255,255,255,0.08); color:#e09040; border-left-color:rgba(232,147,26,0.55); }
[data-theme="glass"] .tcal-asp-opp   { background: rgba(255,255,255,0.08); color:#e08080; border-left-color:rgba(210,80,80,0.55); }
[data-theme="glass"] .tcal-asp-sq    { background: rgba(255,255,255,0.08); color:#e09070; border-left-color:rgba(210,100,60,0.52); }
[data-theme="glass"] .tcal-asp-tri   { background: rgba(255,255,255,0.08); color:#90b8ff; border-left-color:rgba(80,130,210,0.55); }
[data-theme="glass"] .tcal-asp-sex   { background: rgba(255,255,255,0.08); color:#80d8a0; border-left-color:rgba(75,168,118,0.55); }


/* ── Ocean — calendriers : le même jeu de surcharges que Lishu, en teintes Océan
   (demande Mélanie 2026-11-12 : « tout est encore dans ce beige dégueulasse, pilule
   des calendriers et tout »). Océan n'avait AUCUNE règle calendrier et retombait sur
   les règles de base, assises sur son --bg crème. Blanc #f3fbf7 = celui validé le
   même jour sur les rapports ; bleu 46,95,120 = --indigo d'Océan. Les cartes
   d'événements (base blanche 0.62) n'avaient pas de beige : non touchées.
   Mobile NON touché (règle « calendriers : jamais le mobile », 2026-08-24). ── */
[data-theme="ocean"] .tcal-period-btn        { background: rgba(255, 254, 251, 0.98); }
[data-theme="ocean"] .tcal-period-btn:hover  { background: rgba(255, 255, 255, 0.99); }
[data-theme="ocean"] .tcal-planet-menu       { background: #f3fbf7; }
[data-theme="ocean"] .tcal-grid,
[data-theme="ocean"] .tcal-dow               { border-color: rgba(255,255,255,0.22); }
[data-theme="ocean"] .tcal-day               { border-color: rgba(255,255,255,0.22); background: rgba(255,255,255,0.08); }
[data-theme="ocean"] .tcal-today { background: rgba(46, 95, 120, 0.12) !important; border-color: rgba(46, 95, 120, 0.48) !important; box-shadow: inset 0 0 0 1.5px rgba(46,95,120,0.24); }

/* ── Glyphes des ROUES dans les cartes des calendriers (2026-08-17, règle
   Mélanie « les dessins maison partout », repérée sur Uranus) : mini-SVG
   <use> des symboles des roues, taille calée sur la police des cartes. ── */
.tcal-gsvg {
  display: inline-block;
  width: 15px;
  height: 15px;
  vertical-align: -2px;
}

/* Préfixe « ℞ : » unique de la rangée des rétrogrades (2026-08-17) —
   même encre que les badges (la classe .tcal-retro-badge est reprise). */
.tcal-retro-rx { font-weight: 600; margin-right: 2px; }

/* ── Entrées en signe teintées à l'ÉLÉMENT du signe d'arrivée (2026-08-21,
   demande Mélanie : « la mini-carte à la couleur de l'élément, complètement
   surlignée mais très légèrement »). ⚠️ Couleurs d'élément EN DUR ci-dessous :
   elles ne suivent PAS le panneau « Apparence des roues » (constat 2026-09-02,
   comportement assumé) ; l'encre et le liseré « entrée en signe » restent. Doubles classes :
   gagner, à spécificité égale et en ordre d'apparition, sur les surcharges
   [data-theme] du fond blanc. Navigateur sans color-mix : carte blanche
   inchangée (déclaration ignorée). */
/* Carte COMPLÈTE à l'élément (précision Mélanie le même jour) : fond lavé,
   liseré ET encre à la couleur de l'élément — l'encre est assombrie
   (75 % élément + encre sombre) pour rester lisible même si l'utilisatrice
   a choisi un élément clair ; en Nocturne elle est éclaircie. */
.tcal-ev-ingress.tcal-ing-fire {
  background: color-mix(in srgb, #C4452F 20%, #ffffff);
  border-left-color: color-mix(in srgb, #C4452F 85%, #000000);
  border-left-width: 4px;
  color: color-mix(in srgb, #C4452F 60%, #000000);
}
.tcal-ev-ingress.tcal-ing-earth {
  background: color-mix(in srgb, #2E8B47 20%, #ffffff);
  border-left-color: color-mix(in srgb, #2E8B47 85%, #000000);
  border-left-width: 4px;
  color: color-mix(in srgb, #2E8B47 60%, #000000);
}
.tcal-ev-ingress.tcal-ing-air {
  background: color-mix(in srgb, #D9A520 20%, #ffffff);
  border-left-color: color-mix(in srgb, #D9A520 85%, #000000);
  border-left-width: 4px;
  color: color-mix(in srgb, #D9A520 60%, #000000);
}
.tcal-ev-ingress.tcal-ing-water {
  background: color-mix(in srgb, #2E6FBF 20%, #ffffff);
  border-left-color: color-mix(in srgb, #2E6FBF 85%, #000000);
  border-left-width: 4px;
  color: color-mix(in srgb, #2E6FBF 60%, #000000);
}
/* Nocturne : même lavis sur le fond sombre, encre éclaircie. */
[data-theme="glass"] .tcal-ev-ingress.tcal-ing-fire {
  background: color-mix(in srgb, #C4452F 20%, transparent);
  border-left-color: color-mix(in srgb, #C4452F 85%, transparent);
  color: color-mix(in srgb, #C4452F 55%, #ffffff);
}
[data-theme="glass"] .tcal-ev-ingress.tcal-ing-earth {
  background: color-mix(in srgb, #2E8B47 20%, transparent);
  border-left-color: color-mix(in srgb, #2E8B47 85%, transparent);
  color: color-mix(in srgb, #2E8B47 55%, #ffffff);
}
[data-theme="glass"] .tcal-ev-ingress.tcal-ing-air {
  background: color-mix(in srgb, #D9A520 20%, transparent);
  border-left-color: color-mix(in srgb, #D9A520 85%, transparent);
  color: color-mix(in srgb, #D9A520 55%, #ffffff);
}
[data-theme="glass"] .tcal-ev-ingress.tcal-ing-water {
  background: color-mix(in srgb, #2E6FBF 20%, transparent);
  border-left-color: color-mix(in srgb, #2E6FBF 85%, transparent);
  color: color-mix(in srgb, #2E6FBF 55%, #ffffff);
}

/* ── Pilule de vue Mois/Semaine/Jour SOUS le titre du Calendrier des transits
   (2026-08-21, demande Mélanie — remplace les 3 boutons du footer). La pilule
   elle-même est le custom-select officiel (data-csel), rien à styler ici. ── */
#block-transit-cal .tcal-subbar,
#block-transit-natal-cal .tcal-subbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 0;
  flex: 0 0 auto;
}
/* « Revenir à maintenant » à côté de la pilule (demande Mélanie 2026-08-21) :
   icône fantôme, comme à côté de la pilule Tri auparavant. */
.tcal-subbar .btn-small {
  background: transparent;
  border-color: transparent;
  padding: 0 5px;
}
.tcal-subbar .btn-small:hover {
  background: transparent;
  border-color: transparent;
  color: var(--text);
}
/* Bloc replié ou rangé : la barre disparaît (st-04 ne cache que
   .block-body/.block-footer — même précédent que l'en-tête mobile). */
#block-transit-cal.block-collapsed .tcal-subbar,
#block-transit-natal-cal.block-collapsed .tcal-subbar,
.block-in-sidebar .tcal-subbar { display: none; }

/* Pilules « Toutes les planètes » / « Événements » des calendriers : libellé
   long — on lève le plafond de largeur de la pilule standard (160 px, le
   chevron mordait sur le texte ; tolérance prévue par CREER_UN_BLOC § 7). */
#btn-tcal-planets, #btn-tncal-planets,
#btn-tcal-events,  #btn-tncal-events { max-width: none; }
