/**
 * tokens.css — Design tokens UTTOP Maker Space
 *
 * Source de vérité unique pour couleurs, typo, espacement.
 * Référence : prompts/v2-2026-06-05-cedrick-00-design-system.md
 * Charte officielle UTTOP (priorité sur palette dérivée plan Bastien).
 */

:root {
  /* ========================================================================
     CHARTE OFFICIELLE UTTOP
     ======================================================================== */

  /* Couleur principale (à utiliser avec parcimonie) */
  --uttop-principale: #005078;          /* Pantone 301 U  R0 V80 B120 */

  /* Complémentaires (palette graphique de l'app) */
  --uttop-compl-1: #129A7E;             /* vert sapin    Pantone 3285 U */
  --uttop-compl-2: #45DB96;             /* vert tendre   Pantone 353 U */
  --uttop-compl-3: #F5D836;             /* jaune doré    Pantone 108 U */
  --uttop-compl-4: #FF99D6;             /* rose tendre   Pantone 224 U */
  --uttop-compl-5: #586DDD;             /* bleu lavande  Pantone 2728 U */

  /* ========================================================================
     ROLES SÉMANTIQUES (dérivés charte UTTOP)
     ======================================================================== */

  --color-action-primary: var(--uttop-principale);
  --color-success: var(--uttop-compl-2);
  --color-warning: var(--uttop-compl-3);
  --color-info: var(--uttop-compl-5);
  --color-danger: #DC2626;              /* rouge AA accessible — alertes critiques uniquement */

  /* ========================================================================
     ZONES MAKER SPACE (couleur par zone, dérivée charte UTTOP)
     ======================================================================== */

  --zone-ideation: var(--uttop-compl-2);          /* vert tendre */
  --zone-numerique: #0891B2;                      /* cyan profond — Pôle Numérique (ajout 2026-06-05) — co-localisé physiquement avec Idéation */
  --zone-electronique: var(--uttop-compl-5);      /* bleu lavande */
  --zone-impression-3d: var(--uttop-compl-1);     /* vert sapin */
  --zone-textile: var(--uttop-compl-4);           /* rose tendre */
  --zone-libre-perceuse: var(--uttop-compl-3);    /* jaune doré */
  --zone-outillage-manuel: var(--uttop-principale); /* bleu UTTOP */

  /* ========================================================================
     NEUTRES & TEXTE
     ======================================================================== */

  --color-bg: #FFFFFF;
  --color-bg-soft: #FBF7F0;             /* crème pour sections calmes */
  --color-text: #1F2937;                /* ardoise — texte principal */
  --color-text-soft: #6B7280;           /* gris moyen — texte secondaire */
  --color-border: #E5E7EB;              /* bordures fines */
  --color-overlay: rgba(0, 0, 0, 0.5);  /* modals */

  /* ========================================================================
     TYPOGRAPHIE
     ======================================================================== */

  --font-family-base: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont,
                      "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, monospace;

  --font-size-h1: 2rem;       /* 32px */
  --font-size-h2: 1.5rem;     /* 24px */
  --font-size-h3: 1.25rem;    /* 20px */
  --font-size-body: 1rem;     /* 16px */
  --font-size-small: 0.875rem; /* 14px */

  --line-height-tight: 1.2;   /* titres */
  --line-height-base: 1.5;    /* corps */

  --font-weight-regular: 400;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* ========================================================================
     ESPACEMENT
     ======================================================================== */

  --space-xs: 0.25rem;        /* 4px */
  --space-sm: 0.5rem;         /* 8px */
  --space-md: 1rem;           /* 16px */
  --space-lg: 1.5rem;         /* 24px */
  --space-xl: 2rem;           /* 32px */
  --space-2xl: 3rem;          /* 48px */
  --space-3xl: 4rem;          /* 64px */

  /* ========================================================================
     RAYONS & OMBRES
     ======================================================================== */

  --radius-sm: 4px;
  --radius-md: 8px;           /* boutons */
  --radius-lg: 12px;          /* cards */
  --radius-xl: 16px;
  --radius-pill: 9999px;      /* badges */

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.10);
  --shadow-focus: 0 0 0 3px rgba(0, 80, 120, 0.25); /* halo focus accessibilité */

  /* ========================================================================
     TOUCH / MOBILE
     ======================================================================== */

  --touch-target-min: 44px;
  --touch-target-comfortable: 48px;

  /* ========================================================================
     ANIMATIONS
     ======================================================================== */

  --transition-fast: 150ms ease-out;
  --transition-base: 250ms ease-out;
  --transition-slow: 400ms ease-out;

  /* ========================================================================
     Z-INDEX
     ======================================================================== */

  --z-base: 0;
  --z-sticky: 10;
  --z-fab: 20;
  --z-modal-bg: 100;
  --z-modal: 101;
  --z-toast: 200;
}

/* ============================================================================
   Préférences utilisateur — mode sombre minimal (à enrichir plus tard)
   ============================================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    /* Pour l'instant on garde le thème clair par défaut.
       Mode sombre à designer en V2. */
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-base: 0ms;
    --transition-slow: 0ms;
  }
}
