/* =============================================================================
   myEAF — THÈME (charte centralisée)
   Variables :root + polices (Poppins auto-hébergée) + reset léger + base typo.
   Ce fichier est chargé EN PREMIER : toute la charte se règle ici.
   ========================================================================== */

/* --- Polices auto-hébergées (RGPD / perf, aucun appel Google) ------------- */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url('../fonts/poppins-400.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url('../fonts/poppins-600.woff2') format('woff2');
}
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url('../fonts/poppins-700.woff2') format('woff2');
}

:root {
    /* Police */
    --font-base: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;

    /* Marque / dégradés principaux */
    --brand-1: #9d4ef0;        /* violet */
    --brand-2: #c44ce0;        /* magenta */
    --grad-header: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    --grad-app-bg: linear-gradient(135deg, #c44ff0 0%, #8a6bf2 45%, #6172f3 100%);

    /* Surfaces */
    --surface: #ffffff;
    --surface-soft: #f6f5fb;
    --text-strong: #2b2b3a;
    --text-muted: #8a8aa0;
    --text-on-brand: #ffffff;

    /* Couleurs de blocs / cartes (dégradés pastel) */
    --c-blue-1: #9ecefb;  --c-blue-2: #bfe0fc;
    --c-coral-1: #f5707f; --c-coral-2: #f7929d;
    --c-purple-1: #b583e8; --c-purple-2: #c89aef;
    --c-amber-1: #f5b65c;  --c-amber-2: #f7c77f;
    --c-teal-1: #54d3b0;   --c-teal-2: #7adcc4;

    /* Chips / tags (aplats) */
    --tag-green: #82db9c;
    --tag-blue: #479ff5;
    --tag-orange: #f5b96f;

    /* Couleur d'alerte (actions sensibles : envoi de push, suppression) */
    --danger: #f5707f;
    --danger-fort: #e64b5e;

    /* Rayons */
    --r-xs: 8px;
    --r-sm: 12px;
    --r-md: 18px;     /* cartes */
    --r-lg: 28px;     /* grands blocs / écran */
    --r-pill: 999px;  /* boutons et chips */

    /* Espacements */
    --sp-1: 6px; --sp-2: 10px; --sp-3: 16px; --sp-4: 22px; --sp-5: 32px;

    /* Ombres (douces, teintées, jamais noires dures) */
    --shadow-card: 0 10px 24px rgba(80, 70, 160, 0.18);
    --shadow-soft: 0 4px 14px rgba(80, 70, 160, 0.12);

    /* Focus clavier */
    --focus: #6172f3;

    /* Transitions */
    --t-fast: 140ms ease;
    --t-base: 220ms ease;
}

/* --- Reset léger ----------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

/* L'attribut HTML `hidden` doit toujours l'emporter sur les règles d'affichage. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 15px;
    line-height: 1.45;
    color: var(--text-strong);
    background: var(--surface-soft);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }

/* Focus visible et net au clavier (accessibilité). */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-xs); }

/* --- Base typographique ---------------------------------------------------- */
h1, h2, h3, h4 { line-height: 1.2; color: var(--text-strong); margin: 0 0 var(--sp-2); }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.4rem; font-weight: 700; }   /* titres de section ~22-26px */
h3 { font-size: 1.1rem; font-weight: 600; }   /* titres de carte ~16-18px */
p { margin: 0 0 var(--sp-2); }

.texte-muted { color: var(--text-muted); }
.texte-petit { font-size: 0.8rem; }

/* Zone tactile minimale (accessibilité) : appliquée aux éléments interactifs. */
button, a.bouton, .tactile { min-height: 44px; }
