/* ═══════════════════════════════════════════════════════════════════════
   buttons-results.css — Boutons (primary, secondary, export PDF), panneau résultats, theme header, secti
   ─────────────────────────────────────────────────────────
   Extrait de astro_app_V3.8.9.html lignes 1205-1845 (Phase 2 du refactoring).
   Cascade : ce fichier doit être chargé dans l'ordre indiqué dans index.html.
   ═══════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════
   BOUTONS
══════════════════════════════════════════════════════════════════════════ */
.btn-primary {
  width: 100%;
  padding: 0.85rem;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--terracotta);
  color: var(--ivoire);
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}

.btn-primary:hover { background: var(--terracotta-fonce); }
.btn-primary:active { transform: translateY(1px); }

.btn-secondary {
  width: 100%;
  padding: 0.7rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8rem;
  background: transparent;
  color: var(--encre-clair);
  border: 1px solid var(--ivoire-fonce);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 0.5rem;
}

.btn-secondary:hover {
  border-color: var(--encre-clair);
  color: var(--encre);
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-secondary:disabled:hover {
  border-color: var(--ivoire-fonce);
  color: var(--encre-clair);
}

/* ═══════════════════════════════════════════════════════════════════════
   V3.8.7 — BOUTON EXPORT PDF SOBRE
   Plus de gradient terracotta/or, plus d'icône rouge agressive.
   Fond transparent, bordure fine, hover bleu pâle.
══════════════════════════════════════════════════════════════════════════ */
.btn-export-pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.1rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0;
  background: transparent;
  color: var(--astro-text);
  border: 1px solid var(--astro-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  box-shadow: none;
}

/* Variante pleine largeur dans les formulaires (.form-panel) */
.form-panel .btn-export-pdf {
  display: flex;
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.7rem 1.1rem;
}

.btn-export-pdf:not(:disabled):hover {
  background: var(--astro-card-blue);
  color: var(--astro-text);
  border-color: var(--astro-accent);
  transform: none;
  box-shadow: none;
}

.btn-export-pdf:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--astro-border);
  color: var(--astro-text-muted);
  background: transparent;
}

.btn-export-pdf:disabled:hover {
  background: transparent;
  color: var(--astro-text-muted);
}

/* V3.8.7 — Pictogramme texte « PDF » discret au lieu de l'icône rouge.
   On garde ::before mais on change de média : un mini-encadré "PDF" en lettres. */
.btn-export-pdf::before {
  content: 'PDF';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  padding: 0.05rem 0.3rem;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--astro-text-soft);
  background: var(--astro-card-blue);
  border: 1px solid var(--astro-border);
  border-radius: 3px;
  flex-shrink: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  /* Annulation de l'ancien fond SVG */
  background-image: none;
  height: auto;
}

.btn-export-pdf:not(:disabled):hover::before {
  color: var(--astro-accent);
  border-color: var(--astro-accent);
  background: #FFFFFF;
}

.btn-export-pdf:active {
  transform: none;
  box-shadow: none;
}

.btn-export-pdf:focus-visible {
  outline: 2px solid var(--astro-accent);
  outline-offset: 2px;
}

/* V3.8.7 — Verrouillage Premium (FREE mode) : badge "Premium" sur le bouton PDF */
body.mode-free .btn-export-pdf::after,
body.mode-client .btn-export-pdf::after {
  content: 'PREMIUM';
  margin-left: 0.4rem;
  padding: 0.08rem 0.4rem;
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(83, 158, 218, 0.85);
  background: rgba(83, 158, 218, 0.10);
  border: 1px solid rgba(83, 158, 218, 0.22);
  border-radius: 999px;
}

/* On annule les anciennes règles spécifiques aux IDs (terracotta/or) */
#btn-pdf:not(:disabled),
#btn-pdf-transits:not(:disabled) {
  border-color: var(--astro-border);
  color: var(--astro-text);
  font-weight: 500;
}

#btn-pdf:not(:disabled):hover,
#btn-pdf-transits:not(:disabled):hover {
  background: var(--astro-card-blue);
  color: var(--astro-text);
  border-color: var(--astro-accent);
}

/* ─── Grille de cases à cocher (onglet Transits) ─── */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.7rem;
  margin-bottom: 0.5rem;
}

.checkbox-grid label {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem !important;
  font-weight: 400 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--encre) !important;
  cursor: pointer;
  padding: 0.2rem 0.3rem;
  border-radius: 2px;
  margin-bottom: 0 !important;
  transition: background 0.15s;
}

.checkbox-grid label:hover {
  background: rgba(184, 85, 63, 0.06);
}

.checkbox-grid input[type="checkbox"] {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--terracotta);
}

.checkbox-grid .symbol-prefix {
  color: var(--terracotta);
  font-weight: 600;
  width: 14px;
  display: inline-block;
}

/* Boutons mini (tout cocher/décocher) */
.btn-mini {
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  background: transparent;
  border: 1px solid var(--ivoire-fonce);
  color: var(--encre-clair);
  border-radius: 2px;
  cursor: pointer;
  margin-right: 0.3rem;
  font-family: var(--sans);
  transition: all 0.15s;
}
.btn-mini:hover {
  border-color: var(--encre-clair);
  color: var(--encre);
}

/* ═══════════════════════════════════════════════════════════════════════
   PANNEAU RÉSULTATS
══════════════════════════════════════════════════════════════════════════ */
.results-panel {
  min-height: 60vh;
}

.empty-state {
  text-align: center;
  padding: 6rem 2rem;
  color: var(--encre-clair);
}

.empty-state .symbol {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--terracotta);
  opacity: 0.4;
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  font-style: italic;
  margin-bottom: 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   RÉSULTATS — En-tête du thème calculé
══════════════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════════════
   V3.8.6 — Bloc identité du thème natal
   Conteneur respirant avec bordure et accent cyan, hiérarchie typo claire :
   - person-name en serif (titre)
   - person-data en sans-serif (info fonctionnelle, pas d'italique)
   - signature en sans-serif aérée (pas de mono sur toute la ligne)
══════════════════════════════════════════════════════════════════════════ */
.theme-header {
  padding: clamp(1rem, 1.8vw, 1.5rem);
  margin: 0 0 1.5rem 0;
  border: 1px solid var(--astro-border);
  border-left: 4px solid var(--astro-accent);
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, #FFFFFF 0%, #EEF3F7 100%);
  border-bottom: 1px solid var(--astro-border);
}

.theme-header .person-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.65rem, 2.4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--astro-text);
  margin: 0 0 0.45rem 0;
}

.theme-header .person-data {
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(0.9rem, 1vw, 0.98rem);
  line-height: 1.55;
  color: var(--astro-text-soft);
  max-width: 72ch;
  margin: 0;
}

.theme-header .signature {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--astro-text-soft);
  margin-top: 0.7rem;
  letter-spacing: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
}

/* Les valeurs strictement numériques (degrés, coordonnées) restent en mono — */
/* mais on enveloppe ça via balises strong/em si besoin, sans imposer la mono */
/* sur toute la phrase de signature. */
.theme-header .signature .num,
.theme-header .signature code {
  font-family: var(--mono);
  letter-spacing: 0.01em;
}

/* ═══════════════════════════════════════════════════════════════════════
   SECTIONS DE RÉSULTATS
══════════════════════════════════════════════════════════════════════════ */
.section {
  margin-bottom: 2.5rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.4rem;
  letter-spacing: -0.005em;
  margin-bottom: 1rem;
  color: var(--encre);
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 1px;
  background: var(--terracotta);
}

.section-title .count {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--encre-clair);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════════════════════════
   TABLEAUX — Style épuré, lignes fines
══════════════════════════════════════════════════════════════════════════ */
.astro-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--ivoire-clair);
  border: 1px solid var(--ivoire-fonce);
  border-radius: 3px;
  overflow: hidden;
}

/* Wrapper de scroll horizontal pour les tableaux non-responsive sur mobile
   (les tableaux avec .astro-table-responsive deviennent des cartes en CSS). */
@media (max-width: 720px) {
  .section .astro-table:not(.astro-table-responsive) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    max-width: 100%;
  }

  .section .astro-table:not(.astro-table-responsive) thead,
  .section .astro-table:not(.astro-table-responsive) tbody {
    display: table;
    width: 100%;
    min-width: 600px;
  }
}

.astro-table thead {
  background: var(--encre);
  color: var(--ivoire);
}

.astro-table th {
  text-align: left;
  padding: 0.7rem 1rem;
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.astro-table td {
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--ivoire-fonce);
}

.astro-table tr:hover td {
  background: rgba(184, 85, 63, 0.04);
}

.astro-table .symbol-cell {
  width: 36px;
  text-align: center;
  font-size: 1.1rem;
  color: var(--terracotta);
  font-weight: 500;
}

.astro-table .position {
  font-family: var(--mono);
  font-size: 0.85rem;
}

.astro-table .house {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--encre-clair);
  text-align: center;
  width: 60px;
}

/* Label de cuspide dans le tableau Maisons : plus large pour "M10 — MC ★" */
.astro-table .house-label {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--encre);
  font-weight: 500;
  width: 130px;
  white-space: nowrap;
}

.astro-table .house-label.angular {
  color: var(--terracotta);
}

.astro-table .retro {
  color: var(--terracotta);
  font-weight: 600;
  margin-left: 0.3rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}

.astro-table .planet-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.05rem;
}

/* ═══════════════════════════════════════════════════════════════════════
   ASPECTS — Style spécifique
══════════════════════════════════════════════════════════════════════════ */
.aspect-symbol {
  font-family: var(--mono);
  font-size: 1.05rem;
  font-weight: 600;
}
.aspect-symbol.harm  { color: var(--vert-sauge); }
.aspect-symbol.tense { color: var(--rouge-brique); }
.aspect-symbol.neutral { color: var(--or-mat); }

.orb {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--encre-clair);
}

/* ═══════════════════════════════════════════════════════════════════════
   STATS DE RÉPARTITION — Éléments / Modalités / Polarités
   Refonte v2.2 : barres plus épaisses, couleurs symboliques, pct visible
══════════════════════════════════════════════════════════════════════════ */
.distribution {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  background: var(--ivoire-clair);
  border: 1px solid var(--ivoire-fonce);
  padding: 1.8rem 2rem;
  border-radius: 3px;
}

.dist-block h4 {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--encre);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ivoire-fonce);
}

.dist-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.92rem;
  margin-bottom: 0.7rem;
}

.dist-bar:last-child {
  margin-bottom: 0;
}

.dist-bar .label {
  font-family: var(--serif);
  font-weight: 500;
  width: 78px;
  flex-shrink: 0;
  color: var(--encre);
}

.dist-bar .bar {
  flex: 1;
  display: block;            /* CRITIQUE : sans ça, span inline = hauteur ignorée */
  height: 10px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
  overflow: hidden;
  position: relative;
}

.dist-bar .bar-fill {
  display: block;
  height: 100%;
  border-radius: 5px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.08);
}

.dist-bar .count-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--encre);
  width: 26px;
  text-align: right;
  flex-shrink: 0;
}

.dist-bar .pct {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--encre-clair);
  width: 38px;
  text-align: right;
  flex-shrink: 0;
}

@media (max-width: 700px) {
  .distribution { grid-template-columns: 1fr; gap: 1.2rem; padding: 1.2rem; }
}

/* ═══════════════════════════════════════════════════════════════════════
   MESSAGE D'ERREUR / NOTE
══════════════════════════════════════════════════════════════════════════ */
.notice {
  background: rgba(184, 85, 63, 0.08);
  border-left: 3px solid var(--terracotta);
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 0.95rem;
  font-family: var(--sans);
  font-style: normal;
  color: var(--encre);
  border-radius: 3px;
  line-height: 1.6;
}

.notice strong { font-style: normal; color: var(--terracotta); font-weight: 600; }

/* Les paragraphes à l'intérieur d'un .notice sont lisibles : pas trop petits,
   pas systématiquement en italique. L'italique est réservé aux mots <em>. */
.notice p {
  margin: 0.5rem 0;
  line-height: 1.6;
  font-size: 0.95rem;
  font-family: var(--sans);
  font-style: normal;
}

.notice p:first-child { margin-top: 0; }
.notice p:last-child { margin-bottom: 0; }

/* Les listes à l'intérieur d'un .notice */
.notice ul {
  margin: 0.5rem 0 0.5rem 1.4rem;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.notice ul li {
  margin-bottom: 0.3rem;
}

/* L'italique reste possible mais via la balise <em> uniquement,
   pas de manière systématique sur le bloc */
.notice em {
  font-style: italic;
  color: var(--encre-clair);
}

/* ═══════════════════════════════════════════════════════════════════════
   PIED DE PAGE — Note technique discrète
══════════════════════════════════════════════════════════════════════════ */
.footer-note {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 3rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--encre-clair);
  letter-spacing: 0.05em;
  border-top: 1px solid var(--ivoire-fonce);
  text-align: center;
}

.footer-note a {
  color: var(--terracotta);
  text-decoration: none;
}
.footer-note a:hover { text-decoration: underline; }

