/* ============================================================
   SOCIALBROZ.CO — THEME BOOTSTRAP 5.3
   Mappe les design tokens (tokens.css) sur les composants Bootstrap.
   Direction B « Vivante & Engageante » — spec.md §1-§2
   ============================================================ */

/* ---------- FONDATIONS ---------- */
/* overflow-x: clip empêche le scroll horizontal causé par les éléments
   décoratifs débordants (float-cards, doodles, halos) en préservant
   position:sticky du header (clip ne crée pas de scroll container). */
html, body { overflow-x: clip; max-width: 100%; }

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text);
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  color: var(--color-text);
}
h1, .h1 { font-size: var(--text-h1); font-weight: 700; line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); }
h2, .h2 { font-size: var(--text-h2); font-weight: 700; line-height: 1.15; letter-spacing: var(--tracking-tight); }
h3, .h3 { font-size: var(--text-h3); font-weight: 600; line-height: var(--leading-snug); }
h4, .h4 { font-size: var(--text-h4); font-weight: 600; line-height: 1.3; }
h5, .h5 { font-size: var(--text-h5); font-weight: 600; line-height: 1.4; }
h6, .h6 { font-size: var(--text-h6); font-weight: 600; line-height: 1.4; }

@media (max-width: 767px) {
  h1, .h1 { font-size: 2.5rem; }   /* 40px */
  h2, .h2 { font-size: 2rem; }     /* 32px */
  h3, .h3 { font-size: 1.5rem; }   /* 24px */
  h4, .h4 { font-size: 1.25rem; }  /* 20px */
}

a { color: var(--color-primary-600); }
a:hover { color: var(--color-primary-700); }

.text-secondary-token { color: var(--color-text-secondary) !important; }
.text-caption { font-size: var(--text-caption); line-height: 1.45; color: var(--color-text-secondary); }
.lead { font-size: var(--text-body-lg); line-height: var(--leading-relaxed); color: var(--color-text-secondary); }

/* Focus visible global — ring 3px coral (spec §1) */
:focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-color: var(--color-primary-500);
  border-radius: var(--radius-sm);
}

/* ---------- LAYOUT ---------- */
.section { padding-top: var(--space-section); padding-bottom: var(--space-section); }
.section-tint { background-color: var(--color-surface-tint); }
.section-dark { background-color: var(--color-neutral-900); color: #F2F4F6; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-teal { background-color: var(--color-secondary-100); }
@media (min-width: 1440px) { .container { max-width: 1200px; } }

/* ---------- BOUTONS ---------- */
.btn {
  --bs-btn-border-radius: var(--radius-sm);
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: .65rem;
  --bs-btn-padding-x: 1.25rem;
  --bs-btn-focus-box-shadow: var(--shadow-focus);
  font-family: var(--font-body);
  transition: transform var(--duration-fast) var(--ease-out), background-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
  min-height: 44px; /* cible tactile spec §2 */
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  --bs-btn-bg: var(--color-primary-500);
  --bs-btn-border-color: var(--color-primary-500);
  --bs-btn-hover-bg: var(--color-primary-600);
  --bs-btn-hover-border-color: var(--color-primary-600);
  --bs-btn-active-bg: var(--color-primary-700);
  --bs-btn-active-border-color: var(--color-primary-700);
  --bs-btn-disabled-bg: var(--color-primary-200);
  --bs-btn-disabled-border-color: var(--color-primary-200);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
}
.btn-secondary {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--color-primary-600);
  --bs-btn-border-color: var(--color-primary-500);
  --bs-btn-hover-bg: var(--color-primary-50);
  --bs-btn-hover-color: var(--color-primary-700);
  --bs-btn-hover-border-color: var(--color-primary-600);
  --bs-btn-active-bg: var(--color-primary-100);
  --bs-btn-active-color: var(--color-primary-700);
  --bs-btn-active-border-color: var(--color-primary-700);
}
.btn-ghost {
  --bs-btn-bg: transparent;
  --bs-btn-color: var(--color-text);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--color-neutral-100);
  --bs-btn-hover-color: var(--color-text);
  --bs-btn-active-bg: var(--color-neutral-100);
  --bs-btn-active-color: var(--color-text);
}
.btn-danger {
  --bs-btn-bg: var(--color-error-500);
  --bs-btn-border-color: var(--color-error-500);
  --bs-btn-hover-bg: var(--color-error-700);
  --bs-btn-hover-border-color: var(--color-error-700);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
}
.btn-lg { --bs-btn-padding-y: .85rem; --bs-btn-padding-x: 1.75rem; --bs-btn-font-size: 1.0625rem; }
.btn-sm { --bs-btn-padding-y: .4rem; --bs-btn-padding-x: .9rem; min-height: 36px; }

/* ---------- FORMULAIRES ---------- */
.form-label { font-weight: 500; color: var(--color-text); }
.form-control, .form-select {
  border-radius: var(--radius-sm);
  border-color: var(--color-border);
  padding: .65rem .9rem;
  color: var(--color-text);
}
.form-control:focus, .form-select:focus {
  border-color: var(--color-primary-500);
  box-shadow: var(--shadow-focus);
}
.form-control.is-invalid { border-color: var(--color-error-500); }
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(220, 47, 47, .2); }
.invalid-feedback { color: var(--color-error-700); }
.form-text { color: var(--color-text-secondary); font-size: var(--text-body-sm); }
.form-check-input:checked { background-color: var(--color-primary-500); border-color: var(--color-primary-500); }
.form-check-input:focus { border-color: var(--color-primary-500); box-shadow: var(--shadow-focus); }
.input-group-text { background: var(--color-neutral-100); border-color: var(--color-border); border-radius: var(--radius-sm); }

/* ---------- CARTES ---------- */
.card {
  --bs-card-border-radius: var(--radius-md);
  --bs-card-border-color: var(--color-border);
  --bs-card-bg: var(--color-surface);
  box-shadow: var(--shadow-sm);
}
.card-elevated { box-shadow: var(--shadow-md); border: none; }
.card-interactive { transition: transform var(--duration-base) var(--ease-out), box-shadow var(--duration-base) var(--ease-out); }
.card-interactive:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

/* Pricing card (spec §2) */
.pricing-card {
  border-radius: var(--radius-lg);
  border: 2px solid var(--color-primary-500);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.pricing-card .pricing-flag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--color-primary-500); color: #fff;
  font-weight: 600; font-size: var(--text-body-sm);
  padding: .25rem 1rem; border-radius: var(--radius-full);
}
.pricing-price { font-family: var(--font-display); font-size: 2.75rem; font-weight: 700; }
.pricing-price small { font-size: 1rem; font-weight: 400; color: var(--color-text-secondary); }

/* Testimonial */
.testimonial .stars { color: var(--color-warning-500); }
.testimonial blockquote { font-size: var(--text-body-lg); }

/* ---------- BADGES ---------- */
.badge { border-radius: var(--radius-full); font-weight: 500; padding: .4em .9em; }
.badge-primary { background: var(--color-primary-100); color: var(--color-primary-700); }
.badge-teal { background: var(--color-secondary-100); color: var(--color-secondary-700); }
.badge-success { background: var(--color-success-100); color: var(--color-success-700); }
.badge-warning { background: var(--color-warning-100); color: var(--color-warning-700); }
.badge-error { background: var(--color-error-100); color: var(--color-error-700); }
.badge-info { background: var(--color-info-100); color: var(--color-info-700); }
.badge-neutral { background: var(--color-neutral-100); color: var(--color-neutral-700); }

/* ---------- AVATARS ---------- */
.avatar {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-secondary-100); color: var(--color-secondary-700);
  font-weight: 600; font-size: .9rem; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-stack { display: inline-flex; }
.avatar-stack .avatar { border: 2px solid var(--color-surface); margin-left: -10px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- NAVBAR ---------- */
.site-header {
  /* pas de backdrop-filter : créerait un containing block qui clippe l'offcanvas (position:fixed) */
  background: rgba(254, 249, 246, .97);
  border-bottom: 1px solid var(--color-border-subtle);
}
.navbar-brand { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--color-text) !important; }
.navbar-brand .brand-dot { color: var(--color-primary-500); }
.navbar .nav-link { color: var(--color-text); font-weight: 500; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: var(--color-primary-600); }
.navbar .nav-link[aria-current="page"] { color: var(--color-primary-600); font-weight: 600; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--color-neutral-900); color: #CBD5E1; }
.site-footer .navbar-brand { color: #fff !important; } /* le !important de .navbar-brand rendait le logo noir sur noir */
.site-footer h6 { color: #fff; font-size: var(--text-body-sm); text-transform: uppercase; letter-spacing: var(--tracking-wide); }
.site-footer a { color: #CBD5E1; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .legal-block { border-top: 1px solid #3D4A58; font-size: var(--text-caption); color: #A8B3BD; }

/* ---------- ACCORDION (FAQ) ---------- */
.accordion {
  --bs-accordion-border-radius: var(--radius-md);
  --bs-accordion-border-color: var(--color-border);
  --bs-accordion-btn-focus-box-shadow: var(--shadow-focus);
  --bs-accordion-active-bg: var(--color-primary-50);
  --bs-accordion-active-color: var(--color-primary-700);
  --bs-accordion-btn-bg: var(--color-surface);
  --bs-accordion-bg: var(--color-surface);
}
.accordion-button { font-weight: 600; font-family: var(--font-body); }

/* ---------- TIMELINE (Pricing facturation) ---------- */
.timeline { list-style: none; padding-left: 0; position: relative; }
.timeline > li { position: relative; padding-left: 2.25rem; padding-bottom: 1.5rem; }
.timeline > li::before {
  content: ""; position: absolute; left: .55rem; top: 1.4rem; bottom: 0;
  width: 2px; background: var(--color-border-strong);
}
.timeline > li:last-child::before { display: none; }
.timeline > li::after {
  content: ""; position: absolute; left: 0; top: .35rem;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  background: var(--color-secondary-500); border: 3px solid var(--color-secondary-100);
}

/* ---------- ICÔNE EN CERCLE (features) ---------- */
.feature-icon {
  width: 56px; height: 56px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--color-primary-50); color: var(--color-primary-600);
}
.feature-icon--teal { background: var(--color-secondary-100); color: var(--color-secondary-700); }
.feature-icon--purple { background: var(--color-accent-100); color: var(--color-accent-700); }
.feature-icon .icon { width: 26px; height: 26px; }

/* illustrations des cartes « étapes » — hauteur uniforme pour aligner les titres.
   .illu.step-illu : double classe pour battre .illu { height:auto } en spécificité */
.illu.step-illu { height: 150px; width: auto; max-width: 100%; object-fit: contain; }

/* halo décoratif derrière les illustrations hero */
.illu-halo { position: relative; }
.illu-halo::before {
  content: ""; position: absolute; inset: -8% -6% -8% -6%; z-index: 0;
  background: radial-gradient(60% 60% at 60% 40%, var(--color-secondary-100) 0%, transparent 70%);
  border-radius: var(--radius-full);
}
.illu-halo > * { position: relative; z-index: 1; }

/* ---------- ÉTAPES NUMÉROTÉES ---------- */
.step-number {
  width: 48px; height: 48px; border-radius: var(--radius-full);
  background: var(--color-primary-500); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- SIGNUP WIZARD ---------- */
.signup-progress { display: flex; gap: .5rem; }
.signup-progress .seg { height: 6px; flex: 1; border-radius: var(--radius-full); background: var(--color-neutral-100); }
.signup-progress .seg.active { background: var(--color-primary-500); }
.signup-progress .seg.done { background: var(--color-secondary-500); }
.signup-step { display: none; }
.signup-step.active { display: block; }

/* ---------- COOKIE BANNER ---------- */
.cookie-banner {
  position: fixed; bottom: 1rem; left: 1rem; right: 1rem; z-index: 1035; /* sous l'offcanvas (1045) et son backdrop (1040) */
  max-width: 560px; margin-inline: auto;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  padding: 1.25rem;
}
.cookie-banner[hidden] { display: none; }

/* ---------- ILLUSTRATIONS & ACCENTS ---------- */
.illu { border-radius: var(--radius-xl); max-width: 100%; height: auto; }
.float-card {
  background: var(--color-surface); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: .75rem 1rem;
  font-size: var(--text-body-sm); font-weight: 500;
  display: inline-flex; align-items: center; gap: .5rem;
}
.u-squiggle { position: relative; white-space: nowrap; }
.u-squiggle::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.15em; height: .35em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 12' preserveAspectRatio='none'%3E%3Cpath d='M0 8 Q 12 2 25 8 T 50 8 T 75 8 T 100 8' fill='none' stroke='%23FF6B6B' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* ---------- DIVERS ---------- */
.icon { width: 24px; height: 24px; stroke-width: 2; flex-shrink: 0; }
.icon-sm { width: 18px; height: 18px; }
.icon-lg { width: 32px; height: 32px; }
.check-list { list-style: none; padding-left: 0; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: .6rem; }
.check-list .icon { color: var(--color-success-500); margin-top: .15rem; }
.never-list .icon { color: var(--color-error-500); }

/* ---------- HERO LANDING (réf. FollowTrust analyse) ---------- */
/* Stepper « Étape X sur 3 » */
.hero-stepper { max-width: 620px; margin-inline: auto; }
.hero-stepper__label { text-align: center; font-weight: 600; color: var(--color-text); margin-bottom: 1rem; }
.hero-stepper__track { display: flex; align-items: center; }
.hero-stepper__dot {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700;
  background: var(--color-surface); color: var(--color-text-secondary);
  border: 2px solid var(--color-border-strong);
}
.hero-stepper__dot.is-active { background: var(--color-primary-500); color: #fff; border-color: var(--color-primary-500); box-shadow: var(--shadow-focus); }
.hero-stepper__dot.is-done { background: var(--color-secondary-500); color: #fff; border-color: var(--color-secondary-500); }
.hero-stepper__line { flex: 1 1 auto; height: 4px; border-radius: var(--radius-full); background: var(--color-border-strong); margin: 0 .5rem; }
.hero-stepper__line.is-done { background: var(--color-primary-500); }

/* Gros champ pseudo en carte (hero landing) */
.hero-funnel-xl { max-width: 560px; }
.hero-funnel-xl .input-group {
  background: var(--color-surface); border: 2px solid var(--color-border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: .35rem;
}
.hero-funnel-xl .input-group:focus-within { border-color: var(--color-primary-300); box-shadow: var(--shadow-lg); }
.hero-funnel-xl .input-group-text {
  background: var(--color-neutral-100); border: none; border-radius: var(--radius-md);
  font-size: 1.5rem; font-weight: 600; color: var(--color-text-secondary); padding: 0 .9rem;
}
.hero-funnel-xl .form-control { border: none; box-shadow: none; font-size: 1.25rem; padding: .9rem .75rem; background: transparent; }
.hero-funnel-xl .form-control:focus { box-shadow: none; }
.hero-funnel-xl .btn-submit { border-radius: var(--radius-lg); padding: .95rem 1rem; font-size: 1.15rem; }

/* Badges check (pills) */
.pill-check {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-full); padding: .5rem 1.1rem; font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.pill-check .icon { color: var(--color-success-500); }

/* Carte preuve sociale (avatars + mention, sans chiffre) */
.social-proof-card {
  display: inline-flex; align-items: center; gap: 1rem;
  background: var(--color-surface-tint); border-radius: var(--radius-lg);
  padding: .85rem 1.35rem;
}

/* Doodles décoratifs (accents coral autour de l'illustration) */
.hero-doodles { position: relative; }
.doodle { position: absolute; color: var(--color-primary-400); opacity: .8; pointer-events: none; z-index: 2; }
.doodle--heart { color: var(--color-primary-500); }

/* ---------- FUNNEL PACKS (réplique tunnel FollowTrust) ---------- */
.hero-funnel { display: flex; flex-wrap: wrap; gap: .75rem; max-width: 560px; }
.hero-funnel .input-group { flex: 1 1 300px; }
.hero-funnel .input-group .form-control { padding: .85rem 1rem; font-size: 1.0625rem; }

.pack-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.pack-card {
  position: relative; overflow: hidden;
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); box-shadow: var(--shadow-sm);
  padding: 1.5rem .5rem .75rem; text-align: center; cursor: pointer;
  display: flex; flex-direction: column; gap: .25rem; align-items: center;
  transition: transform var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.pack-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pack-card.is-selected { border: 2px solid var(--color-info-500); box-shadow: var(--shadow-md); }
.pack-card:last-child { grid-column: 2; }
.pack-goal { font-size: .62rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-secondary); }
.pack-qty { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.pack-price { font-size: var(--text-caption); font-style: italic; }
.pack-price s { margin-left: .35rem; }
.pack-off {
  position: absolute; top: 0; right: 0;
  background: var(--color-warning-500); color: var(--color-neutral-900);
  font-size: .7rem; font-weight: 700; padding: .15rem 1.1rem .55rem;
  transform: rotate(38deg) translate(24%, -42%); width: 90px;
}
.pack-flag {
  position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  background: var(--color-success-700); color: #fff;
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  padding: .2rem .6rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  white-space: nowrap; z-index: 1;
}
.pack-chip { background: var(--color-neutral-100); border-radius: var(--radius-sm); padding: .35rem .75rem; font-size: 1.05rem; }
.card-brands { display: inline-flex; gap: .35rem; }
.cb { font-size: .6rem; font-weight: 700; padding: .25rem .4rem; border-radius: 4px; color: #fff; }
.cb-visa { background: #1A1F71; }
.cb-mc { background: #EB001B; }
.cb-amex { background: #2E77BC; }
.btn-pay {
  --bs-btn-bg: #2BBE8C; --bs-btn-border-color: #2BBE8C;
  --bs-btn-hover-bg: #23A076; --bs-btn-hover-border-color: #23A076;
  --bs-btn-active-bg: #1E8A66; --bs-btn-active-border-color: #1E8A66;
  --bs-btn-color: #fff; --bs-btn-hover-color: #fff; --bs-btn-active-color: #fff;
  font-weight: 700;
}
@media (max-width: 480px) {
  .pack-grid { grid-template-columns: repeat(2, 1fr); }
  .pack-card:last-child { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
