/**
 * Story B — Design system v2 : socle commun (2026-10-22)
 *
 * Chargé sur toutes les pages, après core.css et avant les CSS de section.
 * Source : AGENTS IA/STORY-B-AGENCY/clients/story-b/design-system/README.md + tokens.json
 * Contient : jetons v2, fond de page, composants réutilisables (surtitre numéroté, surligneur,
 * étiquettes, schéma « plaquette → actif »), et les thèmes de section sombre / clair.
 * Les règles propres à une page restent dans sections/{page}.css.
 *
 * @package Theme_Client
 */

/* ==========================================================================
   JETONS V2 (remplacent les surfaces bleutées et semi-transparentes de la v1)
   ========================================================================== */
:root {
  --sb-bg-dark-2: #0C0D10;
  --sb-surface: #121318;
  --sb-surface-solid: #121318;
  --sb-surface-raised: #1A1C22;
  /* v1 : rgba(12, 16, 28, .86), bleu nuit encore utilisé au survol et dans des encarts (2026-10-22) */
  --sb-surface-elevated: #1A1C22;
  --sb-border-dark: #22242A;
  --sb-border-dark-2: #2A2C33;
  --sb-border-dark-3: #3A3C43;
  /* Surligneur : dégradé bleu → violet (texte blanc lisible partout, contraste ≥ 5,6:1) */
  --sb-hl-grad: linear-gradient(110deg, var(--sb-blue) 0%, var(--sb-violet) 100%);
  /* Boutons (2026-10-22) : couleurs de la charte au lieu des teintes v1 (mint adouci #3EE8B0,
     texte vert-marine #07231A, balayage bleu nuit #12121E, contour et texte bleutés, focus lavande) */
  --sb-btn-accent: var(--sb-mint);
  --sb-btn-on-accent: var(--sb-bg-dark);
  --sb-btn-sweep: var(--sb-surface);
  --sb-btn-text-soft: var(--sb-ink-10);
  --sb-btn-border-soft: var(--sb-border-dark-3);
  --sb-btn-focus: var(--sb-violet);
}

html,
body {
  background: var(--sb-bg-dark);
}

/* ==========================================================================
   COMPOSANTS
   ========================================================================== */

/* --- Composant : surtitre numéroté (mono) ------------------------------- */
.mono-label {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sb-text-on-dark-60);
}
.mono-label__num {
  color: var(--sb-mint);
}

/* --- Composant : surligneur ------------------------------------------------ */
em.hl,
.hl {
  font-style: normal;
  color: var(--sb-bg-dark);
  background: var(--sb-mint);
  border-radius: 12px;
  padding: 0 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  -webkit-text-fill-color: currentColor;
}

/* Surligneur v2 : dégradé bleu → violet, texte blanc */
em.hl,
.hl {
  color: var(--sb-white);
  background: var(--sb-hl-grad);
  -webkit-text-fill-color: var(--sb-white);
}

/* Étiquettes (composant chip, mono) */
.sb-chip {
  display: inline-flex; align-items: center;
  font-family: var(--font-mono); font-size: 12px; font-weight: 500; line-height: 1;
  padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--sb-ink-20); background: var(--sb-white); color: var(--sb-ink);
}
.sb-chip--blue { background: var(--sb-blue); border-color: var(--sb-blue); color: var(--sb-white); }
.sb-chip--violet { background: var(--sb-violet); border-color: var(--sb-violet); color: var(--sb-white); }
.sb-chip--mint { background: var(--sb-mint); border-color: var(--sb-mint); color: var(--sb-bg-dark); }

/* ==========================================================================
   SCHÉMA « DE LA PLAQUETTE À L'ACTIF » — section services (fond noir), 2026-10-22
   Placé après les CTA, pleine largeur. Barre segmentée en chevrons (gris → bleu → violet → mint),
   chiffre clé par étape (Montserrat 800, légende mono, source = cas client), étiquettes des services.
   ========================================================================== */

.sb-path .sb-chip {
  font-size: 11px;
  padding: 5px 8px;
  border-radius: 6px;
  background: transparent;
  border-color: var(--sb-border-dark-3);
  color: var(--sb-text-on-dark);
}
.sb-path__step--before .sb-chip { color: var(--sb-text-on-dark-60); border-style: dashed; }



/* ==========================================================================
   THÈMES DE SECTION — à poser sur les sections des pages migrées
   .sb-dark : fond noir, titres blancs, mot en valeur en mint uni
   .sb-light : fond clair (sb-paper), texte encre, mot en valeur au surligneur
   .sb-dark-2 : seconde nuance de noir, quand deux sections sombres se suivent
   ========================================================================== */
.sb-dark,
.sb-dark-2 {
  background: var(--sb-bg-dark) !important; /* les sections du parent ont leur propre fond */
  color: var(--sb-text-on-dark);
}
.sb-dark-2 { background: var(--sb-bg-dark-2) !important; }
.sb-dark h1, .sb-dark h2, .sb-dark h3, .sb-dark .h2-style, .sb-dark .h3-style,
.sb-dark-2 h1, .sb-dark-2 h2, .sb-dark-2 h3, .sb-dark-2 .h2-style, .sb-dark-2 .h3-style {
  color: var(--sb-text-on-dark-hi);
}
.sb-dark h1 em, .sb-dark h2 em, .sb-dark .h2-style em,
.sb-dark-2 h1 em, .sb-dark-2 h2 em, .sb-dark-2 .h2-style em {
  font-style: normal;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: var(--sb-mint);
}
.sb-dark .lead, .sb-dark-2 .lead { color: var(--sb-text-on-dark-72); }
.sb-dark .mono-label, .sb-dark-2 .mono-label { color: var(--sb-text-on-dark-60); }

.sb-light {
  background: var(--sb-paper) !important;
  color: var(--sb-ink);
}
.sb-light h1, .sb-light h2, .sb-light h3, .sb-light .h2-style, .sb-light .h3-style,
.sb-light [class*="__title"] {
  color: var(--sb-ink);
}
.sb-light p, .sb-light .lead, .sb-light [class*="__desc"], .sb-light [class*="__text"],
.sb-light [class*="__intro"], .sb-light [class*="__content"] {
  color: var(--sb-ink-80);
}
.sb-light h1 em, .sb-light h2 em, .sb-light .h2-style em {
  font-style: normal;
  color: var(--sb-white);
  background: var(--sb-hl-grad);
  -webkit-text-fill-color: var(--sb-white);
  border-radius: 12px;
  padding: 0 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.sb-light .mono-label { color: var(--sb-ink-60); }
.sb-light .mono-label__num { color: var(--sb-ink); }
.sb-light a:not(.btn) { color: var(--sb-blue); }

/* ==========================================================================
   HEROS : pluie binaire et libellé des logos (2026-10-22)
   La pluie est un <div class="hero__binary" aria-hidden="true"> placé en premier dans la section,
   uniquement dans les heros SANS animation (À propos, articles, tarifs, service sans animation).
   Canvas dessiné par assets/js/hero-binary.js. Le halo diagonal a été retiré de la charte le 2026-10-22.
   ========================================================================== */
.hero:has(> .hero__binary),
.cas-hero:has(> .hero__binary),
.single-hero:has(> .hero__binary) {
  position: relative;
  overflow: hidden;
}
.hero:has(> .hero__binary) .hero__content,
.cas-hero:has(> .hero__binary) > .container,
.single-hero:has(> .hero__binary) > .container {
  position: relative;
  z-index: 1;
}
/* Couvre tout le hero ; fondue en haut (navigation), en bas et à gauche (sous le texte) */
.hero__binary {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 18%, #000 35%, rgba(0,0,0,.5) 60%, transparent 85%), linear-gradient(90deg, transparent 0%, rgba(0,0,0,.05) 35%, #000 75%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,.6) 18%, #000 35%, rgba(0,0,0,.5) 60%, transparent 85%), linear-gradient(90deg, transparent 0%, rgba(0,0,0,.05) 35%, #000 75%);
  mask-composite: intersect;
  pointer-events: none;
  z-index: 0;
}
.hero__binary canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* « Ils nous font confiance » : un peu d'air avant les logos */
.hero .hero__logos-label {
  margin-bottom: var(--sp-3);
}

/* ==========================================================================
   THÈME CLAIR : compléments (2026-10-22)
   Les titres et le mot en valeur doivent l'emporter sur les règles v1 (texte clair, texte en dégradé).
   ========================================================================== */
.sb-light h1, .sb-light h2, .sb-light h3, .sb-light .h2-style, .sb-light .h3-style {
  color: var(--sb-ink) !important;
  -webkit-text-fill-color: currentColor;
}
.sb-light h1 em, .sb-light h2 em, .sb-light .h2-style em {
  background: var(--sb-hl-grad) !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  color: var(--sb-white) !important;
  -webkit-text-fill-color: var(--sb-white) !important;
}
/* Bouton secondaire sur fond clair : contour noir (comme les sections claires de l'accueil) */
.sb-light .btn.btn-secondary {
  color: var(--sb-ink);
  border-color: var(--sb-ink);
  background: transparent;
}
.sb-light .btn.btn-secondary:hover {
  color: var(--sb-white);
  background: var(--sb-bg-dark);
}

/* ==========================================================================
   PIED DE PAGE COMMUN (footer.php) : témoignages (2026-10-22). Le CTA final garde son style (core.css).
   ========================================================================== */

/* Témoignages : grand titre en capitales conservé (core.css), surtitre et avis Google en mono */
.reviews .reviews__header .mono-label { justify-content: center; color: var(--sb-text-on-dark-60); }
.reviews .reviews__subtitle {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sb-text-on-dark-60);
}

/* CTA final (pied de page, toutes les pages) : bordure en dégradé animée conservée (core.css) ; fond gris anthracite neutre #121318 au lieu du bleu nuit, mot en valeur en mint uni */
body .cta .cta__inner { background: var(--sb-surface) !important; }
body .cta .cta__title em {
  font-style: normal;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
  color: var(--sb-mint);
}

/* ==========================================================================
   HERO DES PAGES INTÉRIEURES : .hero--v2 (2026-10-22)
   Pages service, À propos… : fond noir (.sb-dark), halo, surtitre numéroté en mono,
   mot en valeur au surligneur, chiffres et libellés en mono, visuel à droite
   (animation du service, portrait…), texte à gauche et visuel dessous en mobile.
   ========================================================================== */
body .hero.hero--v2 {
  border-bottom: 1px solid var(--sb-border-dark);
}
.hero--v2 .hero__eyebrow.mono-label {
  display: flex;
  margin-bottom: var(--space-lg);
}
.hero--v2 .hero__eyebrow .hero__eyebrow-text {
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  color: inherit;
}
body .hero--v2 .hero__title {
  font-size: clamp(36px, 4.6vw, 64px);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--sb-text-on-dark-hi);
}
/* Mot mis en valeur : surligneur bleu → violet, comme le titre de l'accueil (choix du 2026-10-22) */
body .hero--v2 .hero__title em {
  font-style: normal;
  background: var(--sb-hl-grad);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--sb-white);
  color: var(--sb-white);
  border-radius: 14px;
  padding: 0 0.14em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
body .hero--v2 .hero__intro { color: var(--sb-text-on-dark-72); }
.hero--v2 .hero__logos-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sb-text-on-dark-60);
}
.hero--v2 .hero__zones { font-family: var(--font-mono); font-size: 12px; }
/* Animation du service : même taille que dans la section services de l'accueil */
.hero--v2 .hero__col--visual .sba { max-width: 460px; }
.hero--v2 .hero__scroll { display: none; }

/* Hero service v2, tablette et mobile : texte aligné à gauche comme l'accueil, animation sous le texte */
@media (max-width: 1023px) {
  body .hero--v2 .hero__grid { text-align: left; gap: var(--sp-7); }
  body .hero--v2 .hero__inner { text-align: left; }
  body .hero.hero--v2 .hero__grid > .hero__col--content { order: 1; }
  body .hero.hero--v2 .hero__grid > .hero__col--visual { order: 2; margin: 0; }
  body .hero--v2 .hero__eyebrow,
  body .hero--v2 .hero__intro { margin-left: 0; margin-right: 0; }
  body .hero--v2 .hero__ctas { justify-content: flex-start; }
  body .hero--v2 .hero__zones { justify-content: flex-start; }
  body .hero--v2 .hero__logos-inner { justify-content: flex-start; }
}

/* Chiffres du hero (À propos) : valeurs en mint, libellés en mono, comme l'accueil */
.hero--v2 .hero__metric-value { font-weight: 700; color: var(--sb-mint); }
.hero--v2 .hero__metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sb-text-on-dark-60);
}
.hero--v2 .hero__bg,
.hero--v2 .hero__overlay { display: none; }
/* Portrait (hero-visual) : libellés des badges en mono, comme la section À propos de l'accueil */
.hero-visual__badge-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ==========================================================================
   BORDURE EN DÉGRADÉ ANIMÉE DES CTA (2026-10-22)
   Contour bleu → mint → violet qui tourne : CTA final du pied de page, encarts « Estimer mon site »
   (fin d'article) et « Discutons de votre projet » (colonne des articles). Sortie de core.css.
   ========================================================================== */
@property --cta-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}
@keyframes ctaBorderRotate {
  to { --cta-angle: 360deg; }
}
.cta__inner,
.single-content__cta,
.single-sidebar__cta {
  position: relative;
}
.single-content__cta,
.single-sidebar__cta {
  border-color: transparent !important;
}
.cta__inner::before,
.single-content__cta::before,
.single-sidebar__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 2px;
  background: conic-gradient(
    from var(--cta-angle, 0deg),
    var(--sb-blue),
    var(--sb-mint),
    var(--sb-violet),
    var(--sb-blue)
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: ctaBorderRotate 4s linear infinite;
  pointer-events: none;
}
/* Hors écran : bordure en pause (classe posée par main.js, initPauseHorsEcran) */
.sb-hors-ecran::before { animation-play-state: paused; }
.hero-visual.sb-hors-ecran *, .hero-visual.sb-hors-ecran *::before { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .cta__inner::before,
  .single-content__cta::before,
  .single-sidebar__cta::before { animation: none; }
}

/* ==========================================================================
   SÉPARATEUR ENTRE DEUX SECTIONS SOMBRES (2026-10-22) : filet centré sur 70 % de la largeur,
   en haut de la section (comme entre les chiffres et À propos sur l'accueil). Classe .sb-sep.
   ========================================================================== */
.sb-sep { position: relative; }
.sb-sep::before {
  content: '';
  position: absolute;
  top: 0;
  left: 15%;
  width: 70%;
  height: 1px;
  background: var(--sb-border-dark-2);
  pointer-events: none;
}

/* Pied de page : la promesse en blanc dans la baseline (2026-10-22) */
.footer__baseline-hi {
  color: var(--sb-text-on-dark-hi);
}
