/* =====================================================================
   Agribanana — Design tokens
   Source de verite unique. Tous les autres fichiers CSS consomment ces
   variables. Ne pas hardcoder de couleurs ou de tailles ailleurs.
   ===================================================================== */

:root {
    /* --- Couleurs de marque (IMMUABLES, cf. CLAUDE.md) --- */
    --vert-primary:    #43b16a;
    --vert-dark:       #368b55;
    --vert-light:      #e8f5ee;
    --bleu-primary:    #0e72ad;
    --bleu-dark:       #0a5a89;
    --jaune-accent:    #ddd81c;
    --marron-brand:    #5c3b36;
    --marron-dark:     #3d2623;
    --marron-soft:     #8a6862;
    --beige-fibre:     #f5efe4;
    --beige-deep:      #e9dfcc;
    --blanc-casse:     #fafaf7;
    --gris-text:       #2c2c2c;
    --gris-muted:      #7a7a75;
    --gris-line:       #d8d3c6;
    --whatsapp-green:  #25D366;
    --whatsapp-hover:  #1ea952;

    /* --- Semantique --- */
    --color-bg:            var(--blanc-casse);
    --color-surface:       #ffffff;
    --color-surface-alt:   var(--beige-fibre);
    --color-text:          var(--gris-text);
    --color-text-muted:    var(--gris-muted);
    --color-heading:       var(--marron-brand);
    --color-accent:        var(--vert-primary);
    --color-accent-hover:  var(--vert-dark);
    --color-border:        var(--gris-line);
    --color-border-strong: var(--marron-soft);

    --color-danger:  #c53030;
    --color-warning: #d69e2e;
    --color-success: var(--vert-primary);

    /* --- Typographie ---
     * display : Rye. Graisse UNIQUE 400, non variable, chasse large.
     *           Reserve aux h1/h2 et aux moments de marque. Jamais de gras
     *           demande dessus (font-synthesis: none le bloque, cf. base.css).
     * accent  : Playwrite VN. Manuscrite, 100-400, SANS gras.
     *           Usage rare et court : signature, citation fondatrice, ancrage
     *           "fait a Dabou". Jamais de paragraphe, jamais en capitales.
     * body    : Manrope. Porte tout le texte courant, les h3-h6, les
     *           formulaires et l'integralite des surfaces de travail admin.
     */
    --font-display: 'Rye', 'Georgia', 'Cambria', serif;
    --font-accent:  'Playwrite VN', 'Segoe Script', 'Bradley Hand', cursive;
    --font-body:    'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-mono:    'JetBrains Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

    /* Font-size fluide clamp(min, preferred, max) */
    --fs-xs:   0.75rem;      /* 12px */
    --fs-sm:   0.875rem;     /* 14px */
    --fs-base: 1rem;         /* 16px */
    --fs-md:   1.125rem;     /* 18px */
    --fs-lg:   1.375rem;     /* 22px */
    --fs-xl:   clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
    --fs-2xl:  clamp(2rem, 1.4rem + 2.4vw, 3rem);
    --fs-3xl:  clamp(2.5rem, 1.6rem + 3.6vw, 4.5rem);
    --fs-hero: clamp(3rem, 2rem + 5vw, 6rem);

    /* Font-weight */
    --fw-light: 300;
    --fw-book:  400;
    --fw-medium: 500;
    --fw-semi: 600;
    --fw-bold:  700;
    --fw-black: 900;

    /* Line-height */
    --lh-tight:  1.1;
    --lh-snug:   1.25;
    --lh-normal: 1.5;
    --lh-loose:  1.7;

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

    /* --- Espacement (echelle 4px) --- */
    --space-1:  0.25rem;
    --space-2:  0.5rem;
    --space-3:  0.75rem;
    --space-4:  1rem;
    --space-5:  1.5rem;
    --space-6:  2rem;
    --space-7:  3rem;
    --space-8:  4rem;
    --space-9:  6rem;
    --space-10: 8rem;

    /* --- Rayon --- */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-pill: 999px;

    /* --- Ombres (discretes — ton chaleureux base marron) --- */
    --shadow-xs: 0 1px 2px rgba(92, 59, 54, 0.06);
    --shadow-sm: 0 2px 6px rgba(92, 59, 54, 0.08);
    --shadow-md: 0 6px 18px rgba(92, 59, 54, 0.10);
    --shadow-lg: 0 18px 42px rgba(92, 59, 54, 0.14);
    --shadow-wa: 0 8px 24px rgba(37, 211, 102, 0.35);

    /* --- Layout --- */
    --container-xs: 640px;
    --container-sm: 840px;
    --container-md: 1080px;
    --container-lg: 1280px;
    --container-xl: 1440px;
    --gutter: clamp(1rem, 2vw, 2rem);

    /* --- Transitions --- */
    --ease-out:  cubic-bezier(0.2, 0.8, 0.2, 1);
    --ease-in:   cubic-bezier(0.8, 0.2, 0.8, 0.8);
    --ease-inout: cubic-bezier(0.65, 0, 0.35, 1);
    --dur-fast:   120ms;
    --dur-base:   220ms;
    --dur-slow:   420ms;

    /* --- Z-index --- */
    --z-base:    1;
    --z-sticky:  100;
    --z-overlay: 500;
    --z-modal:   1000;
    --z-toast:   5000;
    --z-wa:      9999;

    /* --- Breakpoints (declaratifs, consommes par media queries) --- */
    /* --bp-sm: 640px  -- mobile large / tablet portrait */
    /* --bp-md: 840px  -- tablet paysage */
    /* --bp-lg: 1080px -- desktop */
    /* --bp-xl: 1280px -- large desktop */
}

/* --- Preferences reduites --- */
@media (prefers-reduced-motion: reduce) {
    :root {
        --dur-fast: 0ms;
        --dur-base: 0ms;
        --dur-slow: 0ms;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
