/* ============================================================
   DS Jean-Mathieu Berthelot — tokens & composants
   Formateur numérique · La Réunion

   Repris de _ds/ds-jean-mathieu-berthelot-…/styles.css.
   Seules différences avec la source :
   - les polices Google sont chargées via <link> dans le <head> des pages
     (préconnexion + moins de blocage qu'un @import CSS) ;
   - les URLs des textures topo pointent vers assets/brand/.
   ============================================================ */

:root {
  /* ---- Couleurs · accent ---- */
  --accent: #056FBC;            /* boutons, liens, filets, chiffres */
  --accent-hover: #045D9E;
  --accent-deep: #090979;       /* ponctuel : aplats profonds, dégradés */
  --accent-on-dark: #6FB9EC;    /* petits textes sur fonds sombres */
  --accent-soft: #E8F1F9;       /* fonds teintés clairs */

  /* ---- Couleurs · neutres clairs ---- */
  --paper: #FAF9F5;
  --paper-2: #F1EEE7;
  --ink: #10141A;
  --ink-2: #3C434D;
  --muted: #6B7280;
  --line: #E4E1D8;

  /* ---- Couleurs · sombres ---- */
  --dark: #0A0E15;
  --dark-2: #111725;
  --line-on-dark: rgba(255,255,255,.14);
  --text-on-dark: #EEF0F3;
  --muted-on-dark: #9AA3B0;

  /* ---- Typographie ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Consolas, monospace;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 19px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 44px;
  --text-4xl: 60px;
  --text-5xl: 80px;

  /* ---- Espacements ---- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 140px;

  /* ---- Formes ---- */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 999px;

  /* ---- Ombres ---- */
  --shadow-sm: 0 1px 2px rgba(16,20,26,.06);
  --shadow-md: 0 2px 8px rgba(16,20,26,.07), 0 8px 24px rgba(16,20,26,.06);
  --shadow-lg: 0 4px 16px rgba(16,20,26,.08), 0 16px 48px rgba(16,20,26,.10);

  /* ---- Textures topographiques ---- */
  --topo-light: url('../assets/brand/topo-light.svg');
  --topo-dark: url('../assets/brand/topo-dark.svg');
  --topo-deep: url('../assets/brand/topo-deep.svg');
}

/* ============ Base ============ */
* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
.on-dark a { color: var(--accent-on-dark); }
.on-dark a:hover { color: #9CCFF4; }

::selection { background: var(--accent); color: #fff; }

/* ============ Bouton ============ */
.jmb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .1s ease;
}
.jmb-btn:hover { text-decoration: none; }
.jmb-btn:active { transform: translateY(1px); }
.jmb-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.jmb-btn--md { height: 44px; padding: 0 22px; font-size: var(--text-sm); }
.jmb-btn--sm { height: 36px; padding: 0 16px; font-size: 13px; }
.jmb-btn--lg { height: 54px; padding: 0 30px; font-size: var(--text-base); }

.jmb-btn--primary { background: var(--accent); color: #fff; }
.jmb-btn--primary:hover { background: var(--accent-hover); color: #fff; }

.jmb-btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.jmb-btn--secondary:hover { background: var(--ink); color: var(--paper); }
.on-dark .jmb-btn--secondary { color: var(--text-on-dark); border-color: rgba(255,255,255,.4); }
.on-dark .jmb-btn--secondary:hover { background: #fff; color: var(--ink); border-color: #fff; }

.jmb-btn--ghost { background: transparent; color: var(--accent); }
.jmb-btn--ghost:hover { background: var(--accent-soft); color: var(--accent-hover); }
.on-dark .jmb-btn--ghost { color: var(--accent-on-dark); }
.on-dark .jmb-btn--ghost:hover { background: rgba(255,255,255,.08); color: #9CCFF4; }

/* ============ Champs ============ */
.jmb-field { display: flex; flex-direction: column; gap: var(--space-2); }
.jmb-field__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-2);
}
.jmb-input, .jmb-textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
  width: 100%;
}
.jmb-input { height: 46px; }
.jmb-textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.jmb-input::placeholder, .jmb-textarea::placeholder { color: var(--muted); }
.jmb-input:focus, .jmb-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(5,111,188,.15);
}
.jmb-field__hint { font-size: 13px; color: var(--muted); }
.jmb-field--error .jmb-input, .jmb-field--error .jmb-textarea { border-color: #C0392B; }
.jmb-field--error .jmb-field__hint { color: #C0392B; }

/* ============ Carte ============ */
.jmb-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.jmb-card--hover { transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.jmb-card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: #D6D2C6; }
.jmb-card--tinted { background: var(--accent-soft); border-color: transparent; }
.jmb-card--dark {
  background: var(--dark-2);
  border-color: var(--line-on-dark);
  color: var(--text-on-dark);
}

/* ============ Tag ============ */
.jmb-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: .02em;
}
.jmb-tag--accent { background: var(--accent-soft); color: var(--accent-hover); }
.jmb-tag--neutral { background: var(--paper-2); color: var(--ink-2); }
.jmb-tag--outline { background: transparent; color: var(--ink-2); border: 1px solid var(--line); }
.on-dark .jmb-tag--outline { color: var(--muted-on-dark); border-color: var(--line-on-dark); }
.jmb-tag--dark { background: rgba(255,255,255,.1); color: var(--text-on-dark); }

/* ============ Eyebrow ============ */
.jmb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--accent);
}
.jmb-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--accent);
}
.on-dark .jmb-eyebrow { color: var(--accent-on-dark); }
.on-dark .jmb-eyebrow::before { background: var(--accent-on-dark); }

/* ============ Stat ============ */
.jmb-stat { display: flex; flex-direction: column; gap: var(--space-1); }
.jmb-stat__value {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
}
.on-dark .jmb-stat__value { color: var(--accent-on-dark); }
.jmb-stat__label { font-size: var(--text-sm); color: var(--muted); }
.on-dark .jmb-stat__label { color: var(--muted-on-dark); }

/* ============ Témoignage ============ */
.jmb-testimonial { display: flex; flex-direction: column; gap: var(--space-5); max-width: 720px; }
.jmb-testimonial__quote {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-style: italic;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}
.jmb-testimonial__quote::before { content: '« '; color: var(--accent); }
.jmb-testimonial__quote::after { content: ' »'; color: var(--accent); }
.on-dark .jmb-testimonial__quote::before, .on-dark .jmb-testimonial__quote::after { color: var(--accent-on-dark); }
.jmb-testimonial__meta { display: flex; align-items: center; gap: var(--space-3); }
.jmb-testimonial__avatar {
  width: 44px; height: 44px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  overflow: hidden;
  flex-shrink: 0;
}
.jmb-testimonial__avatar img { width: 100%; height: 100%; object-fit: cover; }
.jmb-testimonial__author { font-weight: 600; font-size: var(--text-sm); }
.jmb-testimonial__role { font-size: 13px; color: var(--muted); }
.on-dark .jmb-testimonial__role { color: var(--muted-on-dark); }

/* ============ SectionHeader ============ */
.jmb-section-header { display: flex; flex-direction: column; gap: var(--space-4); max-width: 640px; }
.jmb-section-header--center { align-items: center; text-align: center; margin-inline: auto; }
.jmb-section-header__title { font-size: var(--text-2xl); }
.jmb-section-header__desc { font-size: var(--text-lg); line-height: 1.55; color: var(--ink-2); }
.on-dark .jmb-section-header__desc { color: var(--muted-on-dark); }

/* ============ TopoDivider ============ */
.jmb-topo-divider {
  position: relative;
  height: 120px;
  overflow: hidden;
  background-image: var(--topo-light);
  background-size: 1200px auto;
  background-position: center;
}
.jmb-topo-divider--dark { background-image: var(--topo-dark); background-color: var(--dark); }
.jmb-topo-divider--deep { background-image: var(--topo-deep); }
.jmb-topo-divider::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--paper), transparent 30%, transparent 70%, var(--paper));
}
.jmb-topo-divider--dark::after {
  background: linear-gradient(to bottom, var(--dark), transparent 30%, transparent 70%, var(--dark));
}

/* ============ Surfaces utilitaires ============ */
.on-dark { color: var(--text-on-dark); }
.topo-surface-dark {
  background-color: var(--dark);
  background-image: var(--topo-dark);
  background-size: 1400px auto;
  background-repeat: repeat;
}
.topo-surface-light {
  background-color: var(--paper);
  background-image: var(--topo-light);
  background-size: 1400px auto;
  background-repeat: repeat;
}
