/* ============================================================
   Budget Mariage 2026 : composants du design system.
   Adapté de design/mockups/assets/tokens.css (bibliothèque de
   référence Claude Design). Les custom properties gardent les
   mêmes noms que les mockups pour porter leurs gabarits tels quels.
   ============================================================ */

:root {
  --bg-page: #fbf9f5;
  --bg-elevated: #ffffff;
  --bg-sand: #f3ede3;
  --bg-sand-deep: #ece4d6;
  --bg-ink: #27395c;
  --border-subtle: #ece4d6;
  --border-default: #e0d6c6;
  --border-strong: #cdbfa9;
  --ardoise-900: #27395c;
  --ardoise-700: #3f5b8c;
  --ardoise-500: #5872a3;
  --ardoise-300: #9fb0d0;
  --ardoise-tint: #eaeef7;
  --framboise-700: #a23c61;
  --framboise-500: #c4527a;
  --framboise-300: #e3a3bb;
  --framboise-tint: #f9e8ef;
  --text-primary: #1b2433;
  --text-secondary: #5b6573;
  --text-muted: #8b94a0;
  --text-on-ardoise: #fbf9f5;
  --success: #2e7d52;
  --success-tint: #eaf3ec;
  --warning: #b7791f;
  --warning-tint: #fbf0d9;
  --font-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-full: 999px;
  --shadow-sm: 0 2px 8px rgba(39, 57, 92, 0.07);
  --shadow-md: 0 8px 24px rgba(39, 57, 92, 0.09);
  --shadow-lg: 0 18px 48px rgba(39, 57, 92, 0.12);
  --shadow-focus: 0 0 0 3px rgba(63, 91, 140, 0.38);
  --touch: 44px;
}

:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--r-sm);
}

.num { font-variant-numeric: tabular-nums; }

.kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--framboise-700);
}

/* ---------- boutons (styles de blocs core/button) ---------- */
.wp-block-button .wp-block-button__link {
  min-height: var(--touch);
  box-shadow: 0 6px 16px rgba(196, 82, 122, 0.25);
  transition: background 0.15s ease;
}

.wp-block-button.is-style-secondaire .wp-block-button__link {
  background: var(--bg-elevated);
  color: var(--ardoise-700);
  border: 1.5px solid var(--border-strong);
  box-shadow: none;
}

.wp-block-button.is-style-secondaire .wp-block-button__link:hover {
  border-color: var(--ardoise-700);
  background: var(--bg-elevated);
}

.wp-block-button.is-style-ardoise .wp-block-button__link {
  background: var(--ardoise-700);
  box-shadow: none;
}

.wp-block-button.is-style-ardoise .wp-block-button__link:hover {
  background: var(--ardoise-900);
}

/* ---------- carte (style de bloc core/group) ---------- */
.is-style-carte {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  padding: 24px;
}

/* ---------- « En bref » : cible position zéro ---------- */
.is-style-enbref {
  background: var(--ardoise-tint);
  border-left: 3px solid var(--ardoise-700);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 15px 18px;
}

.is-style-enbref > h2:first-child,
.is-style-enbref > p:first-child > strong:only-child {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ardoise-700);
}

.is-style-enbref ul {
  margin: 0;
  padding-left: 17px;
  font-size: 15px;
  line-height: 1.65;
  color: #233a5e;
}

/* ---------- bulle Margot (voix IA, jamais de mascotte) ---------- */
.is-style-margot {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--ardoise-tint);
  border-radius: 14px;
  padding: 13px 14px;
}

.is-style-margot p {
  font-size: 14px;
  line-height: 1.5;
  color: #233a5e;
  margin: 0;
}

.margot-spark {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--ardoise-700);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: spark 2.6s ease-in-out infinite;
}

@keyframes spark {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.12); }
}

@media (prefers-reduced-motion: reduce) {
  .margot-spark { animation: none; }
}

/* ---------- badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--r-full);
  font-weight: 600;
  font-size: 13px;
}

.badge-ardoise { background: var(--ardoise-tint); color: var(--ardoise-700); }
.badge-framboise { background: var(--framboise-tint); color: var(--framboise-700); }
.badge-success { background: var(--success-tint); color: var(--success); }
.badge-warning { background: var(--warning-tint); color: var(--warning); }

/* ---------- FAQ accordéon (details natif) ---------- */
.faq {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-elevated);
}

.faq details + details { border-top: 1px solid var(--border-subtle); }

.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 14px 15px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: '›';
  color: var(--framboise-500);
  font-size: 18px;
  transition: transform 0.2s;
}

.faq details[open] summary::after { transform: rotate(90deg); }

.faq .faq-body {
  padding: 0 15px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* ---------- tableau de prix ---------- */
.table-prix {
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
}

.table-prix .tr {
  display: grid;
  padding: 11px 14px;
  font-size: 14px;
  border-top: 1px solid var(--bg-sand);
}

.table-prix .tr.head {
  background: var(--bg-sand);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-top: none;
}

.table-prix .td-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- barres de répartition ---------- */
.bar {
  height: 7px;
  border-radius: var(--r-full);
  background: var(--bg-sand);
  overflow: hidden;
}

.bar > span {
  display: block;
  height: 100%;
  border-radius: var(--r-full);
  background: var(--ardoise-700);
}

.bar.framboise > span { background: var(--framboise-500); }

/* ---------- header / footer ---------- */
.site-header-bm {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 249, 245, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-decoration: none;
}

.wordmark .dot { color: var(--framboise-500); }

.site-footer-bm a { color: var(--ardoise-300); text-decoration: none; }
.site-footer-bm a:hover { color: var(--text-on-ardoise); }

/* ---------- page pilier ---------- */
.bm-fil-ariane {
  font-size: 13px;
  color: var(--text-muted);
}
.bm-fil-ariane a { color: inherit; text-decoration: none; }
.bm-fil-ariane a:hover { color: var(--ardoise-700); }

/* Byline auteur (core/post-author rendu en ligne). */
.bm-byline .wp-block-post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
}
.bm-byline .wp-block-post-author__avatar img {
  border-radius: 50%;
  display: block;
}
.bm-byline .wp-block-post-author__name {
  font-weight: 600;
  color: var(--text-primary);
}

/* Sidebar sommaire / CTA : collante sous le header. */
.bm-pilier-aside { position: sticky; top: 84px; }

/* Bande CTA Margot dans le corps. */
.cta-band {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--framboise-tint);
  border-radius: var(--r-lg);
  padding: 18px 20px;
}
.cta-band .margot-spark { background: var(--framboise-500); animation: none; }
.cta-band .cta-band-texte { flex: 1; }
.cta-band .cta-band-titre {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-primary);
  margin: 0;
}
.cta-band .cta-band-sous { font-size: 13px; color: var(--framboise-700); margin: 0; }
@media (max-width: 560px) { .cta-band { flex-direction: column; align-items: flex-start; } }

/* FAQ : accordéon natif via le bloc core/details (classe .faq sur le groupe). */
.faq .wp-block-details {
  border: 0;
}
.faq .wp-block-details + .wp-block-details { border-top: 1px solid var(--border-subtle); }
.faq .wp-block-details > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 14px 15px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
}
.faq .wp-block-details > summary::-webkit-details-marker { display: none; }
.faq .wp-block-details > summary::after {
  content: '›';
  color: var(--framboise-500);
  font-size: 18px;
  transition: transform 0.2s;
}
.faq .wp-block-details[open] > summary::after { transform: rotate(90deg); }
.faq .wp-block-details > :not(summary) {
  margin: 0 15px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

/* Carte Margot encre (sidebar). */
.bm-carte-ia {
  background: var(--bg-ink);
  border-radius: var(--r-lg);
  padding: 18px;
}
.bm-carte-ia .margot-spark { background: var(--framboise-500); width: 24px; height: 24px; border-radius: 7px; animation: none; }

/* ---------- archive : carte média (image à fleur) ---------- */
.bm-carte-media {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg);
  overflow: hidden;
  height: 100%;
}
.bm-carte-media .wp-block-post-featured-image { margin: 0; }
.bm-carte-media .wp-block-post-featured-image img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.bm-carte-media .bm-carte-corps { padding: 13px 16px 16px; }
.bm-carte-media .bm-carte-corps :where(h2, h3) { margin: 0 0 4px; }
.bm-carte-media .bm-carte-meta { font-size: 12px; color: var(--text-muted); }
/* Lead de description de catégorie. */
.bm-archive-lead { font-size: 16px; max-width: 60ch; }
