/* Breizh Toit - design tokens.
   Merged from the design system (breizh-toit-design-system):
   fonts, colors, typography, spacing, effects, base. */

/* ---- @font-face - self-hosted webfonts (latin subset) ---- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/montserrat-600.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/montserrat-700.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../assets/fonts/montserrat-800.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../assets/fonts/montserrat-900.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../assets/fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../assets/fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../assets/fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../assets/fonts/inter-700.woff2") format("woff2");
}

:root {
  /* ---- Brand: Breizh green ---- */
  --green-500: #3ce40c;
  --green-600: #34c70a;
  --green-700: #2aa408;
  --green-400: #5cee35;
  --green-100: #e6fbdd;
  --green-050: #f3fdee;

  /* ---- Neutral: charcoal → zinc → slate greys ---- */
  --charcoal-900: #1c1e1f;
  --charcoal-800: #242424;
  --charcoal-700: #33373a;
  --grey-600: #595f63;
  --grey-500: #848484;
  --grey-400: #a7adb1;
  --grey-300: #cccccc;
  --grey-200: #e2e5e7;
  --grey-100: #f1f3f4;
  --grey-050: #f7f9fa;
  --white: #ffffff;

  /* ---- Semantic: status ---- */
  --info: #2f6fed;
  --success: var(--green-700);
  --warning: #f2a73b;
  --danger: #e5484d;

  /* ---- Semantic aliases ---- */
  --brand: var(--green-500);
  --brand-hover: var(--green-600);
  --brand-press: var(--green-700);
  --brand-contrast: var(--charcoal-900);

  --text-strong: var(--charcoal-900);
  --text-body: var(--charcoal-800);
  --text-muted: var(--grey-600);
  --text-faint: var(--grey-500);
  --text-on-dark: var(--white);
  --text-on-dark-muted: #b7bdc1;

  --surface-page: var(--grey-050);
  --surface-card: var(--white);
  --surface-sunken: var(--grey-100);
  --surface-dark: var(--charcoal-800);
  --surface-dark-2: var(--charcoal-900);
  --surface-tint: var(--green-100);

  --border-subtle: var(--grey-200);
  --border-default: var(--grey-300);
  --border-strong: var(--grey-400);
  --border-dark: var(--charcoal-700);

  --focus-ring: color-mix(in srgb, var(--green-500) 55%, transparent);

  /* ---- Typography ---- */
  --font-display: "Montserrat", "Arial Narrow", system-ui, sans-serif;
  --font-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-extrabold: 800;
  --fw-black: 900;

  --fs-display: 4rem;
  --fs-h1: 3rem;
  --fs-h2: 2.25rem;
  --fs-h3: 1.5rem;
  --fs-h4: 1.25rem;
  --fs-lead: 1.25rem;
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-xs: 0.75rem;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-normal: 1.5;
  --lh-relaxed: 1.65;

  --ls-display: -0.035em;
  --ls-tight: -0.02em;
  --ls-normal: 0;
  --ls-wide: 0.04em;
  --ls-eyebrow: 0.14em;

  /* ---- Spacing & layout (4px grid) ---- */
  --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;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  --container-max: 1200px;
  --w-1120: 1120px;
  --w-1140: 1140px;
  --container-pad: var(--space-6);
  --section-y: var(--space-24);

  --control-h-sm: 38px;
  --control-h-md: 46px;
  --control-h-lg: 56px;

  /* ---- Effects: radii, shadows, motion ---- */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-2xl: 36px;
  --radius-pill: 999px;

  --shadow-xs: 0 1px 2px rgba(28, 30, 31, 0.05);
  --shadow-sm: 0 1px 2px rgba(28, 30, 31, 0.04), 0 4px 10px rgba(28, 30, 31, 0.06);
  --shadow-md: 0 2px 6px rgba(28, 30, 31, 0.05), 0 12px 28px rgba(28, 30, 31, 0.09);
  --shadow-lg: 0 4px 12px rgba(28, 30, 31, 0.06), 0 28px 60px rgba(28, 30, 31, 0.14);
  --shadow-xl: 0 8px 24px rgba(28, 30, 31, 0.08), 0 48px 96px rgba(28, 30, 31, 0.18);
  --shadow-green: 0 6px 16px rgba(60, 228, 12, 0.28), 0 2px 4px rgba(42, 164, 8, 0.30);
  --ring-green: 0 0 0 4px color-mix(in srgb, var(--green-500) 22%, transparent);

  --scrim: linear-gradient(180deg, rgba(28, 30, 31, 0) 0%, rgba(28, 30, 31, 0.55) 70%, rgba(28, 30, 31, 0.82) 100%);
  --scrim-flat: rgba(28, 30, 31, 0.55);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 130ms;
  --dur: 220ms;
  --dur-slow: 360ms;

  color-scheme: light;
}

/* ---- Base element defaults ---- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-text);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text-body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--text-strong);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
  margin: 0;
}
p { text-wrap: pretty; margin: 0; }

a {
  color: var(--brand-press);
  text-decoration: none;
}

::selection {
  background: var(--green-500);
  color: var(--charcoal-900);
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring-green);
  border-radius: var(--radius-xs);
}

/* Grands écrans (iMac 27", moniteurs larges) : conteneurs élargis pour que
   le contenu occupe mieux la page. Les grilles et clamp() suivent. */
@media (min-width: 1720px) {
  :root {
    --container-max: 1400px;
    --w-1120: 1340px;
    --w-1140: 1360px;
  }
}
