/*
 * ConciergerieFlow — jetons de design, direction A « Pétrole » (H-66).
 * Contrastes WCAG vérifiés (docs/design-preview.html) : AA minimum sur les deux thèmes.
 * L'accent de la conciergerie est surchargé par /marque/theme-<empreinte>.css (R-UI-06).
 */

@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --text-sm: 0.875rem;    /* 14 px : minimum de l'interface */
  --text-base: 1rem;      /* 16 px : texte courant */
  --text-md: 1.0625rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --leading: 1.5;
  --leading-tight: 1.2;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 8px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;

  --control-height: 44px;   /* zones tactiles ≥ 44 px (R-UI-09) */
  --topbar-height: 64px;
  --sidenav-width: 264px;
  --content-max: 1120px;

  --ease: cubic-bezier(0.2, 0, 0, 1);
  --duration: 150ms;
}

/* Thème clair */
:root,
[data-theme="light"] {
  color-scheme: light;
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-2: #F1EFEB;
  --border: #E3E0DA;
  --border-strong: #8A8F96;
  --text: #16191C;
  --muted: #555B62;
  --accent: #1C5A61;
  --on-accent: #FFFFFF;
  --accent-soft: #E3EFF0;
  --success: #1D6B43;
  --success-bg: #E4F2EA;
  --warning: #8A5100;
  --warning-bg: #FBF0DC;
  --danger: #B0261C;
  --danger-bg: #FBE7E5;
  --info: #1F5A9E;
  --info-bg: #E5EEF8;
  --shadow: 0 1px 2px rgba(22, 25, 28, 0.05), 0 2px 8px rgba(22, 25, 28, 0.04);
  --overlay: rgba(22, 25, 28, 0.45);
  /* Logos : fond d'appoint seulement si le dessin disparaîtrait sur ce thème (teinte calculée à l'envoi) */
  --logo-plate-dark: transparent;
  --logo-plate-light: #1F2427;
}

/* Thème sombre (défaut du back-office, H-65) */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101315;
  --surface: #181C1F;
  --surface-2: #1F2427;
  --border: #2A3035;
  --border-strong: #6E767D;
  --text: #ECEEEF;
  --muted: #A6ADB3;
  --accent: #7CC3C9;
  --on-accent: #0B1416;
  --accent-soft: #16302F;
  --success: #6FD19A;
  --success-bg: #12291D;
  --warning: #F2B75C;
  --warning-bg: #2E2210;
  --danger: #FF8A80;
  --danger-bg: #35161A;
  --info: #8DB8F2;
  --info-bg: #14233A;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --overlay: rgba(0, 0, 0, 0.6);
  --logo-plate-dark: #F1EFEB;
  --logo-plate-light: transparent;
}

/* « Comme l'appareil » : suit prefers-color-scheme */
@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    color-scheme: dark;
    --bg: #101315;
    --surface: #181C1F;
    --surface-2: #1F2427;
    --border: #2A3035;
    --border-strong: #6E767D;
    --text: #ECEEEF;
    --muted: #A6ADB3;
    --accent: #7CC3C9;
    --on-accent: #0B1416;
    --accent-soft: #16302F;
    --success: #6FD19A;
    --success-bg: #12291D;
    --warning: #F2B75C;
    --warning-bg: #2E2210;
    --danger: #FF8A80;
    --danger-bg: #35161A;
    --info: #8DB8F2;
    --info-bg: #14233A;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --overlay: rgba(0, 0, 0, 0.6);
    --logo-plate-dark: #F1EFEB;
    --logo-plate-light: transparent;
  }
}
