/* =============================================================================
   Dreamolab — birth-form.css
   Version : 1.3.0 (2026-10-10)
   1.3.0 — plugin 2.5.0 : case de prospection (.dbf-consent--marketing) placée sous la
           case de consentement ; espacement réduit entre deux cases consécutives.
   1.2.0 — plugin 2.3.0 : la question libre du Daśā Phala (focus_libre) devient un
           <textarea> de 4 lignes qui s'agrandit avec le texte (300 caractères visibles
           en entier avant le paiement, y compris sur mobile). Même style que les autres
           champs ; compteur « n / 300 » sous le champ (.dbf-count, orange à 280+).
   1.1.0 — plugin 2.0.0 (Daśā Phala) : .dbf-field[hidden] (le display:flex des
           champs neutralisait l'attribut hidden) et .dbf-hint (aide sous un champ).
           Les règles de résultat synastrie (plugin 1.9.x) figuraient déjà sans
           numéro de version.
   1.0.0 — 2026-06-02 — création.
   Style aligné Mystic. Pensé pour la section sombre (.dml-dark / #calculer),
   mais lisible aussi sur fond parchemin. Réutilise les variables du thème enfant
   si présentes, avec valeurs de repli.
   ========================================================================== */
.dbf-form {
  --dbf-gold:  var(--dml-gold, #c8a25a);
  --dbf-ink:   var(--dml-ink, #1a1d3a);
  --dbf-parch: var(--dml-parch, #f4ead5);
  --dbf-line:  rgba(200, 162, 90, 0.30);

  max-width: 620px;
  margin: 1.6rem auto 0;
  text-align: left;
  font-family: var(--dml-font-body, 'Inter', system-ui, sans-serif);
}

.dbf-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.2rem;
}
.dbf-col-2 { grid-column: 1 / -1; }

.dbf-field { display: flex; flex-direction: column; gap: 0.35rem; }
.dbf-field > span {
  font-family: var(--dml-font-sc, 'Cormorant SC', serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: var(--dbf-gold);
}
.dbf-field input,
.dbf-field select,
.dbf-field textarea {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--dbf-line);
  border-radius: 2px;
  padding: 0.7rem 0.8rem;
  color: var(--dbf-parch);
  font-size: 0.95rem;
  font-family: inherit;
  width: 100%;
}
.dbf-field input::placeholder,
.dbf-field textarea::placeholder { color: rgba(244, 234, 213, 0.4); }
.dbf-field input:focus,
.dbf-field select:focus,
.dbf-field textarea:focus {
  outline: none;
  border-color: var(--dbf-gold);
  box-shadow: 0 0 0 2px rgba(200, 162, 90, 0.18);
}
/* v1.2.0 — question libre : 4 lignes au départ, agrandie par le JS selon le texte */
.dbf-field textarea {
  box-sizing: border-box;
  line-height: 1.5;
  min-height: calc(4 * 1.5em + 1.4rem + 2px);
  resize: vertical;
  overflow-y: hidden;
}
/* Icônes natives des champs date/time en clair sur fond sombre */
.dbf-field input[type="date"]::-webkit-calendar-picker-indicator,
.dbf-field input[type="time"]::-webkit-calendar-picker-indicator { filter: invert(0.8) sepia(1) saturate(2) hue-rotate(5deg); }

.dbf-turnstile { margin: 1.1rem 0 0; }

.dbf-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin: 1.2rem 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: rgba(244, 234, 213, 0.8);
}
.dbf-consent input { margin-top: 0.2rem; accent-color: var(--dbf-gold); }
/* 1.3.0 — deux cases à la suite (service puis prospection) */
.dbf-consent + .dbf-consent { margin-top: 0.6rem; }

/* honeypot : sorti de l'écran, jamais visible ni focusable visuellement */
.dbf-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.dbf-submit {
  margin-top: 1.4rem;
  width: 100%;
  background: var(--dbf-gold);
  color: var(--dbf-ink);
  border: none;
  border-radius: 2px;
  padding: 0.95rem 1.4rem;
  font-family: var(--dml-font-sc, 'Cormorant SC', serif);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, opacity .15s ease;
}
.dbf-submit:hover { background: var(--dml-gold-deep, #a07a3a); transform: translateY(-1px); }
.dbf-submit:disabled { opacity: 0.55; cursor: default; transform: none; }
.dbf-submit.is-loading { position: relative; color: transparent; }
.dbf-submit.is-loading::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(26, 29, 58, 0.35);
  border-top-color: var(--dbf-ink);
  animation: dbf-spin .7s linear infinite;
}
@keyframes dbf-spin { to { transform: rotate(360deg); } }

.dbf-status {
  margin: 0.9rem 0 0;
  min-height: 1.2em;
  font-size: 0.9rem;
  text-align: center;
}
.dbf-status.is-error   { color: #e9a17a; }
.dbf-status.is-ok      { color: var(--dbf-gold); }
.dbf-status.is-loading { color: rgba(244, 234, 213, 0.75); }

.dbf-result {
  max-width: 620px;
  margin: 1.5rem auto 0;
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--dbf-line);
  border-radius: 3px;
  color: var(--dbf-parch);
  line-height: 1.6;
}

.dbf-person {
  border: 1px solid var(--dbf-line);
  border-radius: 3px;
  padding: 1.1rem 1.2rem 1.3rem;
  margin: 1.1rem 0 0;
}
.dbf-person > legend {
  font-family: var(--dml-font-sc, 'Cormorant SC', serif);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--dbf-gold);
  padding: 0 0.5rem;
}

@media (max-width: 640px) {
  .dbf-grid { grid-template-columns: 1fr; }
}

/* ---- Autocomplétion ville/pays ---- */
.dbf-geo { position: relative; }
.dbf-geo-list {
  position: absolute;
  z-index: 30;
  top: 100%;
  left: 0;
  right: 0;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
  background: #fffdf8;
  border: 1px solid var(--dbf-line, #c8a25a);
  border-radius: 4px;
  box-shadow: 0 6px 18px rgba(26, 29, 58, 0.18);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.dbf-geo-list.is-open { display: block; }
.dbf-geo-item {
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--dbf-ink, #1a1d3a);
}
.dbf-geo-item:hover,
.dbf-geo-item[aria-selected="true"] { background: rgba(200, 162, 90, 0.16); }

/* Indicateurs de validation du lieu */
.dbf-geo input.is-geo-ok   { border-color: #3a8a4a; box-shadow: 0 0 0 1px rgba(58,138,74,0.35); }
.dbf-geo input.is-geo-warn { border-color: #b56a2a; box-shadow: 0 0 0 1px rgba(181,106,42,0.35); }

/* ============================================================
 * v1.9.1 — Score de synastrie gratuite (mode synastrie_score)
 * Rendu dans .dbf-result (carte existante) sous le formulaire.
 * ============================================================ */
/* v1.9.5 — Bandeau parchemin pleine largeur via la classe NATIVE `alignfull`
 * (posée par le JS) : c'est le thème Astra qui gère l'étirement, comme pour
 * les sections dml-parch de la page. Ici on ne définit que l'apparence :
 * fond crème, pas de box (ni bordure ni ombre ni arrondi), contenu centré,
 * espace vertical généreux en bas. AUCUN trick de largeur (100vw/left/margin
 * négative) : c'est ce qui causait le décalage à droite. */
.dbf-result--synastrie {
  text-align: left;
  max-width: none;
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 3rem 1.4rem 4.5rem;
  border: none;
  border-radius: 0;
  background: var(--dbf-parch, #f4ead5);
  color: #2e2a20;
  box-shadow: none;
  box-sizing: border-box;
}
.dbf-syn-inner { max-width: 720px; margin: 0 auto; }

.dbf-score { text-align: center; margin-bottom: 1.4rem; }
.dbf-score-ring {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 4px solid var(--dbf-gold, #c8a25a);
  background: #fff;
}
.dbf-score-num {
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  font-size: 3.2rem;
  line-height: 1;
  font-weight: 700;
  color: var(--dbf-ink, #1a1d3a);
}
.dbf-score-max { font-size: 0.95rem; color: #6b5d44; margin-top: 0.15rem; }
.dbf-score-pct {
  margin: 0.7rem 0 0;
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  font-size: 1.15rem;
  color: var(--dbf-ink, #1a1d3a);
}
.dbf-verdict { margin: 0.6rem auto 0; max-width: 90%; font-size: 0.92rem; line-height: 1.55; color: #3a3220; }
.dbf-score.is-excellent  .dbf-score-ring { border-color: #5a7a52; }
.dbf-score.is-bonne      .dbf-score-ring { border-color: #c8a25a; }
.dbf-score.is-acceptable .dbf-score-ring { border-color: #b58a3a; }
.dbf-score.is-faible     .dbf-score-ring { border-color: #b56a2a; }

.dbf-moons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; margin-bottom: 1.4rem; }
@media (max-width: 480px) { .dbf-moons { grid-template-columns: 1fr; } }
.dbf-moon {
  padding: 0.7rem 0.9rem;
  border: 1px solid rgba(200, 162, 90, 0.4);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.5);
}
.dbf-moon strong { display: block; color: var(--dbf-ink, #1a1d3a); font-size: 0.95rem; }
.dbf-moon span { font-size: 0.82rem; color: #6b5d44; }

.dbf-koots h3 {
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  font-size: 1.2rem;
  color: var(--dbf-ink, #1a1d3a);
  margin: 0 0 0.9rem;
  text-align: center;
}
.dbf-koot { margin-bottom: 0.7rem; }
.dbf-koot-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.25rem; }
.dbf-koot-name { font-size: 0.92rem; font-weight: 600; color: #1a1d3a; }
.dbf-koot-val { font-family: var(--dbf-font-mono, 'JetBrains Mono', monospace); font-size: 0.82rem; color: #5a4a2a; }
.dbf-koot-bar { height: 9px; border-radius: 999px; background: rgba(26, 29, 58, 0.14); overflow: hidden; }
.dbf-koot-bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #c8a25a, #a8791f); }

/* v1.9.2 — Encadré bleu nuit : les points verrouillés, débloqués par la
 * synastrie complète. Reprend l'ambiance dml-dark du design system. */
.dbf-locked {
  margin: 2rem 0 0;
  padding: 1.6rem 1.6rem 1.8rem;
  border: 1px solid rgba(200, 162, 90, 0.55);
  border-radius: 12px;
  background: var(--dbf-ink, #1a1d3a);
  color: var(--dbf-parch, #f4ead5);
}
.dbf-locked-eyebrow {
  margin: 0 0 0.3rem;
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  font-size: 0.74rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dbf-gold, #c8a25a);
  text-align: center;
}
.dbf-locked h3 {
  margin: 0 0 1.1rem;
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  font-size: 1.3rem;
  color: var(--dbf-parch, #f4ead5);
  text-align: center;
}
.dbf-locked ul { list-style: none; margin: 0; padding: 0; }
.dbf-locked li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.7rem;
  font-size: 0.92rem;
  line-height: 1.55;
  color: rgba(244, 234, 213, 0.92);
  border-bottom: 1px solid rgba(200, 162, 90, 0.18);
}
.dbf-locked li:last-child { border-bottom: none; }
.dbf-locked li::before {
  content: "🔒";
  position: absolute;
  left: 0;
  top: 0.5rem;
  font-size: 0.85rem;
}
.dbf-locked li strong { color: var(--dbf-gold, #c8a25a); }
.dbf-locked-cta { margin: 1.4rem 0 0; text-align: center; }

.dbf-upsell-btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  background: var(--dbf-gold, #c8a25a);
  color: var(--dbf-ink, #1a1d3a) !important;
  font-family: var(--dbf-font-sc, 'Cormorant SC', serif);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.dbf-upsell-btn:hover { opacity: 0.9; }

/* --- v1.9.2 : garantir que la section de score n'est jamais rognée ---
 * Le résultat s'insère dans la section hero WordPress (dml-hero), qui peut
 * imposer une hauteur ou un overflow. On neutralise ces contraintes pour la
 * carte de synastrie et on lui laisse toute la hauteur nécessaire. */
.dbf-result--synastrie {
  height: auto;
  max-height: none;
  overflow: visible;
}
/* Filet de sécurité : si le hero coupe le débordement, on le rouvre lorsqu'il
 * contient une carte de résultat synastrie. */
.dml-hero:has(.dbf-result--synastrie),
.dml-hero:has(.dbf-result--synastrie) > .wp-block-group {
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
}

/* v1.1.0 — champ masqué (focus libre du Daśā Phala) et aide sous un champ */
.dbf-field[hidden] { display: none; }
.dbf-hint {
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(244, 234, 213, 0.6);
}

/* v1.2.0 — aide + compteur sur une même ligne sous la question libre */
.dbf-hint-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}
.dbf-count {
  flex: none;
  font-family: var(--dbf-font-mono, 'JetBrains Mono', monospace);
  font-size: 0.72rem;
  color: rgba(244, 234, 213, 0.55);
}
.dbf-count.is-near { color: #e9a17a; }
/* la ligne aide + compteur n'hérite pas du style des intitulés (.dbf-field > span) */
.dbf-field > span.dbf-hint-row {
  font-family: inherit;
  letter-spacing: normal;
  text-transform: none;
  font-size: inherit;
  color: inherit;
}
