/* ============================================================
   LA BRAYE — BASE.CSS
   Design system partagé : tokens, reset, typographie, boutons,
   accessibilité, utilitaires. Source unique de vérité.
   ============================================================ */

:root {
    /* ----------------------------------------------------------
       COULEURS — MARQUE
       ---------------------------------------------------------- */
    --bleu-massif: #0f172a;   /* fond principal / texte sur clair */
    --zenith:      #f1d3cb;   /* accent rosé / texte sur foncé   */
    --sable-clair: #fcefb4;   /* accent doré (ex printemps/ete-zenith) */
    --blanc:       #ffffff;

    /* ----------------------------------------------------------
       COULEURS — SAISONS (accents)
       ---------------------------------------------------------- */
    --printemps:      #ff8484;
    --printemps-dark: #b83d3d;
    --ete:            #67dfa0;
    --ete-dark:       #2a7a4e;
    --automne:        #ff9f43;
    --automne-dark:   #a35e18;
    --automne-galet:  #be9a80;
    --hiver:          #55c1e8;
    --hiver-dark:     #1e6e8f;
    --hiver-ardoise:  #cadbe2;

    /* ----------------------------------------------------------
       SURFACES & BORDURES (remplacent les rgba ad hoc)
       ---------------------------------------------------------- */
    --surface-1: rgba(255, 255, 255, 0.04);  /* carte sur fond foncé   */
    --surface-2: rgba(255, 255, 255, 0.08);  /* carte survolée / focus */
    --surface-3: rgba(255, 255, 255, 0.12);  /* zone active            */
    --border-1:  rgba(241, 211, 203, 0.15);  /* bordure discrète       */
    --border-2:  rgba(241, 211, 203, 0.30);  /* bordure marquée        */
    --border-3:  rgba(241, 211, 203, 0.50);  /* bordure survol         */

    /* ----------------------------------------------------------
       TEXTE (opacités fixées — fini les 11 niveaux)
       ---------------------------------------------------------- */
    --text-strong:   #ffffff;                  /* sur fond foncé        */
    --text-muted:    rgba(255, 255, 255, 0.70);
    --text-subtle:   rgba(255, 255, 255, 0.50);
    --text-on-light: #0f172a;                  /* sur sections claires  */

    /* ----------------------------------------------------------
       TYPOGRAPHIE — ÉCHELLE (base 16px, ratio ~1.2)
       ---------------------------------------------------------- */
    --fs-xs:   0.75rem;   /* légendes, méta, labels        */
    --fs-sm:   0.875rem;  /* texte secondaire, notes       */
    --fs-base: 1rem;      /* corps de texte                */
    --fs-md:   1.125rem;  /* chapô, intro                  */
    --fs-lg:   1.5rem;    /* H3, sous-titres               */
    --fs-xl:   2rem;      /* H2 secondaire                 */
    --fs-2xl:  clamp(2rem, 5vw, 3.2rem);    /* H2 principal */
    --fs-3xl:  clamp(2.8rem, 8vw, 5.5rem);  /* H1 hero      */

    /* Graisses */
    --fw-light:   300;
    --fw-regular: 400;
    --fw-medium:  500;
    --fw-bold:    700;
    --fw-black:   900;

    /* Interlignages */
    --lh-tight:   1.0;
    --lh-snug:    1.15;
    --lh-normal:  1.5;
    --lh-relaxed: 1.65;

    /* Letter-spacing */
    --ls-tight:  -0.02em;
    --ls-normal: 0;
    --ls-wide:   0.15em;

    /* ----------------------------------------------------------
       ESPACEMENTS — ÉCHELLE 4px
       ---------------------------------------------------------- */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;
    --section-padding: clamp(60px, 10vw, 120px);
    --container-max: 1200px;

    /* ----------------------------------------------------------
       RAYONS
       ---------------------------------------------------------- */
    --radius-sm:   12px;   /* champs de formulaire        */
    --radius-md:   20px;   /* cartes, conteneurs          */
    --radius-lg:   32px;   /* grandes sections, hero card */
    --radius-pill: 999px;  /* boutons, badges             */

    /* ----------------------------------------------------------
       EASINGS & TRANSITIONS
       ---------------------------------------------------------- */
    --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-soft:  cubic-bezier(0.33, 1, 0.68, 1);
    --t-fast:   0.2s;
    --t-base:   0.3s;
    --t-slow:   0.6s;

    /* ----------------------------------------------------------
       COMPATIBILITÉ — anciens tokens mappés sur les nouveaux
       (évite de tout réécrire d'un coup ; à retirer à terme)
       ---------------------------------------------------------- */
    --border-radius:       var(--radius-lg);
    --border-radius-large: var(--radius-lg);
    --printemps-zenith:    var(--sable-clair);
    --ete-zenith:          var(--sable-clair);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    font-weight: var(--fw-regular);
    line-height: var(--lh-relaxed);
    color: var(--text-strong);
    background-color: var(--bleu-massif);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================================
   ACCESSIBILITÉ
   ============================================================ */
:focus {
    outline: none;
}

:focus-visible {
    outline: 3px solid var(--zenith);
    outline-offset: 3px;
    border-radius: var(--space-1);
}

/* Interactifs sur fond clair / accent : focus vert pour le contraste */
.btn:focus-visible,
.nav a:focus-visible,
.footer-cta:focus-visible,
.hero-cta:focus-visible,
.cta-adhesion-button:focus-visible,
.form-submit:focus-visible,
.bio-toggle:focus-visible {
    outline-color: var(--ete);
    outline-offset: 4px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: var(--space-4);
    background: var(--ete);
    color: var(--bleu-massif);
    padding: var(--space-3) var(--space-5);
    font-weight: var(--fw-bold);
    text-decoration: none;
    border-radius: var(--space-2);
    z-index: 10000;
    transition: top var(--t-fast) ease;
}

.skip-link:focus {
    top: var(--space-4);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
}

/* ============================================================
   BOUTONS — base unique + variantes
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 14px 28px;
    border-radius: var(--radius-pill);
    font-family: 'Outfit', sans-serif;
    font-size: var(--fs-base);
    font-weight: var(--fw-bold);
    letter-spacing: var(--ls-wide);
    text-transform: uppercase;
    line-height: 1;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform var(--t-base) var(--ease-out-expo),
                box-shadow var(--t-base) var(--ease-out-expo),
                background var(--t-base) ease,
                color var(--t-base) ease;
}

.btn--primary {
    background: var(--zenith);
    color: var(--bleu-massif);
    box-shadow: 0 8px 25px rgba(241, 211, 203, 0.2);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(241, 211, 203, 0.35);
}

.btn--secondary {
    background: transparent;
    color: var(--zenith);
    box-shadow: inset 0 0 0 1.5px var(--border-2);
}

.btn--secondary:hover {
    transform: translateY(-2px);
    box-shadow: inset 0 0 0 1.5px var(--border-3);
    background: var(--surface-1);
}

.btn--lg {
    padding: 20px 40px;
    font-size: var(--fs-md);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   ANIMATIONS — apparition hero + reveal au scroll
   ============================================================ */
.animate-in {
    opacity: 0;
    transform: translateY(50px);
    animation: heroReveal 1.4s var(--ease-out-expo) forwards;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.35s; }
.delay-3 { animation-delay: 0.55s; }
.delay-4 { animation-delay: 0.75s; }

.reveal {
    opacity: 1;
    transform: none;
}
