/* ═══════════════════════════════════════════════════════════════════════
   css/modules/sabian.css — Carte « Votre image sabiane » (préfixe .sb-*)
   ─────────────────────────────────────────────────────
   Reprend la mise en scène des heros du site (assets/css/av.css) :
   fond nuit étoilé, image qui se révèle dans l'obscurité puis se fond dans
   le bleu vers le texte, reflet doré qui balaie le titre, canvas d'étoiles.
   La mise en page dépend de la largeur de la CARTE (container query) et non
   de l'écran, car la colonne de résultats varie avec la barre latérale.
   À charger après refonte-2027.css pour hériter des couleurs --rf-*.
   ═══════════════════════════════════════════════════════════════════════ */

.sb-carte {
  --sb-navy: var(--rf-navy, #0B1838);
  --sb-or: var(--rf-or, #D8B365);
  --sb-texte: #E9ECF5;
  position: relative;
  isolation: isolate;
  container-type: inline-size;            /* la mise en page suit la largeur de la carte */
  margin: 1.75rem 0;
  overflow: hidden;
  border-radius: var(--radius-card, 14px);
  color: #fff;
  /* Ciel de secours : quelques étoiles en CSS, comme le .hero du site */
  background:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(2px 2px at 22% 48%, rgba(217,178,106,.85) 50%, transparent 51%),
    radial-gradient(1px 1px at 8% 86%, rgba(255,255,255,.5) 50%, transparent 51%),
    linear-gradient(170deg, #050E27 0%, var(--sb-navy) 55%, #142546 100%);
  box-shadow: 0 1px 2px rgba(11,24,56,.08), 0 18px 40px rgba(11,24,56,.18);
}

/* Grille interne : une carte conteneur ne peut pas s'interroger elle-même */
.sb-cadre { display: grid; }

/* ─── Visuel : image + canvas d'animation ─────────────────────────────── */
.sb-visuel {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 72vh;
  overflow: hidden;
}
.sb-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
}
/* Fondu vers le bleu nuit sous l'image (mise en page empilée) */
.sb-visuel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11,24,56,0) 55%, rgba(11,24,56,.65) 82%, var(--sb-navy) 100%);
}
.sb-ciel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ─── Texte ───────────────────────────────────────────────────────────── */
.sb-corps {
  position: relative;
  z-index: 3;
  padding: 0 clamp(1.25rem, 5cqi, 2.6rem) clamp(1.6rem, 5cqi, 2.4rem);
  margin-top: -3.5rem;                     /* le texte remonte dans le fondu */
}
.sb-surtitre {
  margin: 0 0 .7rem;
  font-family: var(--sans, 'Manrope', sans-serif);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sb-or);
}
.sb-titre {
  margin: 0 0 .4rem;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-weight: 500;
  font-style: italic;
  font-size: clamp(1.6rem, 4.6cqi, 2.35rem);
  line-height: 1.15;
  color: #fff;
  max-width: 24ch;
}
.sb-source {
  margin: 0 0 1.4rem;
  font-size: 0.875rem;
  color: rgba(220,225,238,.62);
}
.sb-lecture,
.sb-soleil {
  margin: 0 0 1rem;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--sb-texte);
  max-width: 60ch;
}
.sb-soleil { color: #fff; }
.sb-piste {
  margin: 1.4rem 0 1.5rem;
  padding: .2rem 0 .2rem 1rem;
  border-left: 2px solid var(--sb-or);
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-style: italic;
  font-size: 1.22rem;
  line-height: 1.45;
  color: #F7F5EF;
  max-width: 52ch;
}
.sb-piste-titre {
  display: block;
  margin-bottom: .2rem;
  font-family: var(--sans, 'Manrope', sans-serif);
  font-style: normal;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sb-or);
}
.sb-note {
  margin: 0 0 1rem;
  font-size: .85rem;
  color: rgba(220,225,238,.75);
}
.sb-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: .7rem 1.3rem;
  border-radius: 999px;
  border: 1px solid #C8A76A;
  background: linear-gradient(180deg, #E2C079 0%, #C8A76A 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(5,14,39,.28);
  color: var(--sb-navy);
  font-weight: 600;
  font-size: .95rem;
  text-decoration: none;
  transition: background .2s, box-shadow .2s;
}
.sb-cta:hover,
.sb-cta:focus-visible {
  background: linear-gradient(180deg, #EBCB89 0%, #D8B365 100%);
  color: var(--sb-navy);
}
.sb-cta:focus-visible { outline: 3px solid #F7F5EF; outline-offset: 2px; }

/* ─── Carte large : image à droite, fondue vers le texte (comme les heros) */
@container (min-width: 760px) {
  .sb-cadre {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-height: 560px;
  }
  .sb-visuel {
    grid-column: 2;
    grid-row: 1;
    aspect-ratio: auto;
    max-height: none;
    margin-left: -18%;                     /* l'image passe sous la fin du texte */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
            mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
  }
  .sb-visuel::after {
    background: linear-gradient(180deg, transparent 65%, rgba(11,24,56,.55) 100%);
  }
  .sb-corps {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    margin-top: 0;
    padding: 2.6rem 1rem 2.6rem 2.6rem;
  }
}
@container (min-width: 760px) {
  .sb-carte-courte .sb-corps { padding: 2rem 2.4rem; }
}
.sb-carte-courte .sb-corps { margin-top: 0; padding-top: 1.6rem; }
.sb-titre-court {
  margin: 0 0 .8rem;
  font-family: var(--serif, 'Cormorant Garamond', Georgia, serif);
  font-size: clamp(1.35rem, 4cqi, 1.75rem);
  line-height: 1.25;
}

/* ═══════════════════════════════════════════════════════════════════════
   ANIMATIONS — actives seulement si render.js a posé .sb-anime (sans JS,
   tout est visible d'emblée). Elles démarrent à l'entrée à l'écran.
   ═══════════════════════════════════════════════════════════════════════ */

/* L'image se révèle dans l'obscurité (même courbe que av-revele du site) */
.sb-anime .sb-image { opacity: 0; filter: brightness(.12); }
.sb-anime.sb-visible .sb-image { animation: sb-revele 3.6s .15s ease-out both; }
@keyframes sb-revele {
  0%   { opacity: 0; filter: brightness(.12); }
  55%  { filter: brightness(.6); }
  100% { opacity: 1; filter: none; }
}

/* Le texte monte doucement, élément après élément */
.sb-anime .sb-corps > * {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .9s ease-out, transform .9s ease-out;
}
.sb-anime.sb-visible .sb-corps > * { opacity: 1; transform: none; }
.sb-anime.sb-visible .sb-corps > :nth-child(1) { transition-delay: .5s; }
.sb-anime.sb-visible .sb-corps > :nth-child(2) { transition-delay: .7s; }
.sb-anime.sb-visible .sb-corps > :nth-child(3) { transition-delay: .9s; }
.sb-anime.sb-visible .sb-corps > :nth-child(4) { transition-delay: 1.1s; }
.sb-anime.sb-visible .sb-corps > :nth-child(5) { transition-delay: 1.3s; }
.sb-anime.sb-visible .sb-corps > :nth-child(n+6) { transition-delay: 1.5s; }

/* Reflet doré qui balaie le titre (même principe que .reflet-or du site) */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .sb-reflet {
    background: linear-gradient(100deg, #fff 0%, #fff 42%, #F2CF86 50%, #fff 58%, #fff 100%) 100% 0 / 250% 100% no-repeat;
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding-right: .08em;                  /* l'italique déborde : évite de rogner */
  }
  .sb-anime.sb-visible .sb-reflet { animation: sb-reflet 9s 1.6s cubic-bezier(.4, 0, .2, 1) infinite both; }
}
@keyframes sb-reflet {
  0%       { background-position: 100% 0; }
  24%, 100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .sb-anime .sb-image,
  .sb-anime .sb-corps > * { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .sb-anime.sb-visible .sb-reflet { animation: none; }
}

/* Impression (Ctrl+P) : pas de canvas, fond clair, texte sombre */
@media print {
  .sb-carte { background: #fff; color: #1A1A2E; box-shadow: none; break-inside: avoid; }
  .sb-ciel, .sb-cta { display: none; }
  .sb-visuel { max-height: 9cm; aspect-ratio: auto; height: 9cm; }
  .sb-visuel::after { display: none; }
  /* L'état masqué d'avant révélation (.sb-anime sans .sb-visible) ne doit
     jamais s'imprimer : image et texte toujours visibles sur papier. */
  .sb-anime .sb-image,
  .sb-anime .sb-corps > * { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .sb-corps { margin-top: 0; }
  .sb-lecture, .sb-soleil, .sb-piste, .sb-titre, .sb-reflet { color: #1A1A2E; -webkit-text-fill-color: #1A1A2E; }
}

/* ═══════════════════════════════════════════════════════════════════════
   2026-11-19 — Quatre autres symboles (Lune, Ascendant, MC, Lilith)
   Boîtes claires, deux par ligne ; une seule colonne sur petite largeur.
   ═══════════════════════════════════════════════════════════════════════ */
.sb-points { container-type: inline-size; margin: 2.5rem 0 1rem; }
.sb-points-titre { font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: clamp(1.6rem, 2.4vw, 2rem); font-weight: 600; color: var(--rf-navy, #0B1838); margin: 0 0 .4rem; }
.sb-points-chapo { max-width: 62ch; margin: 0 0 1.4rem; line-height: 1.65; color: #454859; }
.sb-points-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@container (max-width: 620px) { .sb-points-grille { grid-template-columns: 1fr; } }

.sb-pt { display: flex; flex-direction: column; background: #fff; border: 1px solid rgba(11,24,56,.09); border-radius: var(--radius-card, 14px);
  padding: 22px 22px 24px; box-shadow: 0 1px 2px rgba(11,24,56,.05); }
.sb-pt-point { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8A5F12; }
.sb-pt-glyphe { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--rf-or, #D8B365);
  font-family: "DejaVu Sans", "Segoe UI Symbol", sans-serif; font-size: 0.8125rem; letter-spacing: 0; color: #8A5F12; }
.sb-pt-degre { margin: 8px 0 14px; font-size: .9rem; font-weight: 600; color: var(--rf-navy, #0B1838); }
.sb-pt-visuel { position: relative; aspect-ratio: 4 / 3; margin: 0 -22px 16px; overflow: hidden; background: var(--rf-navy, #0B1838); }
.sb-pt-visuel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
/* Degré pas encore illustré : ciel nuit sobre, signe et numéro du degré */
.sb-pt-vide { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #fff;
  background:
    radial-gradient(1.5px 1.5px at 14% 24%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 30%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 64% 78%, rgba(217,178,106,.8) 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 82%, rgba(255,255,255,.45) 50%, transparent 51%),
    radial-gradient(circle at 50% 46%, rgba(216,179,101,.14), transparent 55%),
    linear-gradient(170deg, #050E27 0%, var(--rf-navy, #0B1838) 60%, #142546 100%); }
.sb-pt-signe { font-family: "DejaVu Sans", "Segoe UI Symbol", sans-serif; font-size: 2.6rem; line-height: 1; color: var(--rf-or, #D8B365); }
.sb-pt-num { font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: 1.7rem; line-height: 1.1; }
.sb-pt-avenir { margin-top: 6px; font-size: 0.75rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.62); }
.sb-pt-symbole { font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-style: italic; font-size: 1.3rem; line-height: 1.3; font-weight: 600; color: var(--rf-navy, #0B1838); margin: 0 0 10px; }
.sb-pt-texte { margin: 0 0 10px; line-height: 1.65; color: #1A1A2E; }
.sb-pt-piste { margin: 6px 0 0; padding: 12px 14px; border-left: 2px solid var(--rf-or, #D8B365); background: #F7F5EF; line-height: 1.6; color: #1A1A2E; }
.sb-pt-piste-titre { display: block; margin-bottom: 4px; font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #8A5F12; }
.sb-pt-note { margin: 10px 0 0; font-size: .86rem; font-style: italic; color: #454859; }
.sb-pt-attente .sb-pt-degre { color: #454859; font-weight: 500; }
/* Heure de naissance inconnue : bloc bleu marine, mention en or */
.sb-pt-sansheure { display: grid; place-items: center; padding: 24px; text-align: center; background: var(--rf-navy, #0B1838); }
.sb-pt-sansheure p { margin: 0; max-width: 22ch; font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: 1.35rem; line-height: 1.35; font-weight: 600; color: var(--rf-or, #D8B365); }

/* 2026-11-19 — Bloc bleu marine : clé du symbole appliquée au thème */
.sb-pt-theme { margin: 6px 0 14px; padding: 18px 18px 16px; border-radius: 10px; background: var(--rf-navy, #0B1838); color: #E9ECF5; }
.sb-pt-theme-titre { margin: 0 0 8px; font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rf-or, #D8B365); }
.sb-pt-theme-cle { margin: 0 0 10px; font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: 1.12rem; line-height: 1.5; color: #fff; }
.sb-pt-theme-appli { margin: 0; padding-top: 10px; border-top: 1px solid rgba(216,179,101,.28); line-height: 1.6; color: #E9ECF5; }

/* 2026-11-19 — Citation du symbole, avant l'interprétation de l'image */
/* Citation littéraire : grand guillemet ornemental en or, texte en italique, attribution sous un tiret */
.sb-pt-citation { position: relative; margin: 6px 0 20px; padding: 26px 8px 0 8px; text-align: left; }
.sb-pt-citation::before { content: "“"; position: absolute; top: -18px; left: -4px; font-family: var(--serif, "Cormorant Garamond", Georgia, serif);
  font-size: 5.2rem; line-height: 1; font-weight: 600; color: var(--rf-or, #D8B365); opacity: .85; pointer-events: none; }
.sb-pt-citation blockquote { margin: 0; }
.sb-pt-citation blockquote p { margin: 0; font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-style: italic; font-size: clamp(1.5rem, 2.1vw, 1.8rem);
  line-height: 1.3; font-weight: 700; letter-spacing: .005em; color: var(--rf-navy, #0B1838); text-wrap: balance; }
.sb-pt-citation figcaption { display: flex; align-items: baseline; gap: 10px; margin-top: 12px; font-size: 0.8125rem; letter-spacing: .03em; color: #454859; }
.sb-pt-citation figcaption::before { content: ""; flex: 0 0 28px; height: 1px; transform: translateY(-3px); background: var(--rf-or, #D8B365); }

/* ═══════════════════════════════════════════════════════════════════════
   2026-11-19 — Accès Découverte : boîte d'incitation Premium (bleu nuit)
   ═══════════════════════════════════════════════════════════════════════ */
.sb-inc-cadre { position: relative; overflow: hidden; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--radius-card, 14px); color: #E9ECF5;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255,255,255,.7) 50%, transparent 51%),
    radial-gradient(1px 1px at 86% 12%, rgba(255,255,255,.5) 50%, transparent 51%),
    radial-gradient(2px 2px at 70% 88%, rgba(217,178,106,.8) 50%, transparent 51%),
    radial-gradient(circle at 85% 0%, rgba(216,179,101,.16), transparent 45%),
    linear-gradient(165deg, #050E27 0%, var(--rf-navy, #0B1838) 55%, #142546 100%);
  box-shadow: 0 18px 40px rgba(11,24,56,.18); }
.sb-inc-acces { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border: 1px solid rgba(216,179,101,.55); border-radius: 999px;
  font-size: 0.75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--rf-or, #D8B365); }
.sb-inc-titre { margin: 0 0 10px; max-width: 24ch; font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.15; font-weight: 600; color: #fff; }
.sb-inc-chapo { max-width: 64ch; margin: 0 0 24px; line-height: 1.7; color: #E9ECF5; }
.sb-inc-tuiles { list-style: none; margin: 0 0 26px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@container (max-width: 760px) { .sb-inc-tuiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sb-inc-tuile { margin: 0; }
.sb-inc-visuel { position: relative; aspect-ratio: 4 / 5; margin-bottom: 10px; overflow: hidden; border-radius: 10px; border: 1px solid rgba(216,179,101,.3); background: #142546; }
.sb-inc-visuel img { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); object-fit: cover; filter: blur(9px) saturate(.85) brightness(.75); }
.sb-inc-cadenas { position: absolute; inset: 0; margin: auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(11,24,56,.72); border: 1px solid var(--rf-or, #D8B365); color: var(--rf-or, #D8B365); }
.sb-inc-point { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 0.75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--rf-or, #D8B365); }
.sb-inc-point .sb-pt-glyphe { width: 26px; height: 26px; color: var(--rf-or, #D8B365); }
.sb-inc-promesse { margin: 8px 0 0; font-size: .9rem; line-height: 1.45; font-weight: 700; color: #F7F5EF; }
.sb-inc-bas { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: end; padding-top: 22px; border-top: 1px solid rgba(216,179,101,.25); }
@container (max-width: 760px) { .sb-inc-bas { grid-template-columns: 1fr; } }
.sb-inc-liste-titre { margin: 0 0 6px; font-weight: 700; color: #fff; }
.sb-inc-liste ul { margin: 0 0 10px; padding-left: 1.1rem; line-height: 1.65; }
.sb-inc-liste li::marker { color: var(--rf-or, #D8B365); }
.sb-inc-plus { margin: 0; font-size: .88rem; line-height: 1.6; color: #C9CFE0; }
.sb-inc-actions { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.sb-inc-actions .lien-code { color: #E9ECF5; }
.sb-inc-actions .lien-code:hover { color: var(--rf-or, #D8B365); }

/* Accès Premium : boîte de fin de page vers l'étude complète */
.sb-etude { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 32px; align-items: center; margin: 2rem 0 1rem;
  padding: clamp(22px, 3vw, 34px); background: #F7F5EF; border: 1px solid rgba(180,154,98,.35); border-left: 3px solid var(--rf-or, #D8B365); border-radius: var(--radius-card, 14px); }
.sb-etude .sb-inc-acces { color: #8A5F12; border-color: rgba(138,106,34,.4); }
.sb-etude-titre { margin: 0 0 8px; font-family: var(--serif, "Cormorant Garamond", Georgia, serif); font-size: clamp(1.6rem, 2.6vw, 2.05rem); line-height: 1.2; font-weight: 600; color: var(--rf-navy, #0B1838); }
.sb-etude p { margin: 0 0 10px; max-width: 64ch; line-height: 1.7; color: #1A1A2E; }
.sb-etude ul { margin: 0; padding-left: 1.1rem; line-height: 1.7; color: #1A1A2E; }
.sb-etude li::marker { color: var(--rf-or, #D8B365); }
@media (max-width: 720px) { .sb-etude { grid-template-columns: 1fr; } .sb-etude-actions { justify-self: start; } }
