/* ALMA Design Tokens — Charte graphique "Douceur" */

:root {
  /* ─── Couleurs primaires ─── */
  --color-primary: #6B7FBF;
  --color-primary-dark: #4A5A96;
  --color-primary-light: #8FA0D6;
  --color-secondary: #E8845A;
  --color-secondary-dark: #D06B3E;
  --color-secondary-light: #F2A882;

  /* ─── Couleurs profils ─── */
  --color-backoffice: #5A6AAF;
  --color-backoffice-light: #7A8ACF;
  --color-backoffice-bg: #EEF0F7;
  --color-mobile: #E8845A;
  --color-mobile-light: #F2A882;
  --color-mobile-bg: #FDF0EA;
  --color-portail: #9B7EB8;
  --color-portail-light: #B9A2D0;
  --color-portail-bg: #F3EFF7;

  /* ─── Fonds & surfaces ─── */
  --bg-main: #F8F7FC;
  --bg-secondary: #EEEDF5;
  --bg-white: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-sidebar: #2D3047;
  --bg-sidebar-hover: #3D4060;

  /* ─── Textes ─── */
  --text-primary: #2D3047;
  --text-secondary: #6E7191;
  --text-tertiary: #9FA2B4;
  --text-inverse: #FFFFFF;
  --text-link: #4A5A96;

  /* ─── Couleurs fonctionnelles ─── */
  --color-success: #3A8A5C;
  --color-success-bg: #E8F5EC;
  --color-error: #C43E3E;
  --color-error-bg: #FDEAEA;
  --color-alert: #C68A20;
  --color-alert-bg: #FFF7E6;
  --color-info: #4A7AB5;
  --color-info-bg: #E8F0FA;

  /* ─── Bordures ─── */
  --border-color: #E2E1EE;
  --border-color-strong: #C8C7D8;

  /* ─── Typographie ─── */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.25rem;    /* 20px */
  --text-xl: 1.5rem;     /* 24px */
  --text-2xl: 2rem;      /* 32px */

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  /* ─── Espacements ─── */
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */

  /* ─── Rayons ─── */
  --radius-sm: 0.5rem;    /* 8px */
  --radius-md: 0.75rem;   /* 12px */
  --radius-lg: 1rem;      /* 16px */
  --radius-xl: 1.25rem;   /* 20px */
  --radius-full: 9999px;

  /* ─── Ombres ─── */
  --shadow-sm: 0 1px 3px rgba(45, 48, 71, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 48, 71, 0.08);
  --shadow-lg: 0 8px 24px rgba(45, 48, 71, 0.10);
  --shadow-xl: 0 12px 40px rgba(45, 48, 71, 0.12);

  /* ─── Transitions ─── */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 350ms ease;

  /* ─── Sidebar ─── */
  --sidebar-width: 260px;
  --sidebar-collapsed: 72px;
  --header-height: 64px;
  --mobile-tab-height: 56px;
}

/* ─── Dark Mode ─── */
[data-theme="dark"] {
  --bg-main: #181A24;
  --bg-secondary: #222436;
  --bg-white: #1E2030;
  --bg-card: #262840;
  --bg-sidebar: #12131C;
  --text-primary: #EEEDF5;
  --text-secondary: #9FA2B4;
  --text-tertiary: #6E7191;
  --color-primary: #8FA0D6;
  --color-primary-dark: #6B7FBF;
  --border-color: #363850;
  --border-color-strong: #4A4D6A;
}

/* ─── Base Styles ─── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); font-weight: 600; }

a {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-primary);
}

/* ─── Utility Classes ─── */
.font-mono { font-family: var(--font-mono); }
.text-muted { color: var(--text-secondary); }

/* ─── Scrollbar ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--border-color-strong); }
