/* ==========================================================================
   FinRadar — tokens.css
   La police et les tokens. Seule feuille qui déclare des valeurs brutes
   (couleurs, px) et seule qui déclare des tokens. Chargée la première.
   Référence : .doc/DESIGN.md
   ========================================================================== */

/* Montserrat variable (100 à 900), locale, sous-ensemble latin : couvre le
   français, l'euro, les guillemets et les espaces fines. Aucun CDN. */
@font-face {
  font-family: 'Montserrat';
  src: url('../assets/fonts/montserrat-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Couleurs, en composantes RVB pour composer des alphas sans hex en dur */
  --rgb-bg: 5 31 27;
  --rgb-bg-deep: 3 20 17;
  --rgb-bg-raised: 9 43 37;
  --rgb-bg-alt: 10 56 48;
  --rgb-accent: 31 175 138;
  --rgb-accent-light: 40 201 154;
  --rgb-accent-ink: 11 120 92;
  --rgb-mint: 170 244 213;
  --rgb-teal: 45 212 191;
  --rgb-warn: 245 180 74;
  --rgb-warn-ink: 138 83 0;
  --rgb-text: 234 242 236;
  --rgb-panel: 247 250 248;
  --rgb-lite: 236 239 238;
  --rgb-white: 255 255 255;
  --rgb-shadow: 0 9 7;

  --c-bg: rgb(var(--rgb-bg));
  --c-bg-deep: rgb(var(--rgb-bg-deep));
  --c-bg-raised: rgb(var(--rgb-bg-raised));
  --c-bg-alt: rgb(var(--rgb-bg-alt));
  --c-accent: rgb(var(--rgb-accent));
  --c-accent-light: rgb(var(--rgb-accent-light));
  --c-mint: rgb(var(--rgb-mint));
  --c-teal: rgb(var(--rgb-teal));
  --c-text: rgb(var(--rgb-text));
  --c-text-muted: rgb(var(--rgb-text) / 0.7);
  --c-text-faint: rgb(var(--rgb-text) / 0.5);
  --c-on-accent: rgb(var(--rgb-bg));
  --c-surface: rgb(var(--rgb-text) / 0.04);
  --c-surface-strong: rgb(var(--rgb-text) / 0.07);
  --c-line: rgb(var(--rgb-text) / 0.1);
  --c-line-strong: rgb(var(--rgb-text) / 0.2);
  --c-accent-soft: rgb(var(--rgb-accent) / 0.16);
  --c-accent-line: rgb(var(--rgb-accent-light) / 0.5);
  --c-warn: rgb(var(--rgb-warn));
  --c-focus: var(--c-accent-light);
  --c-overlay: rgb(var(--rgb-bg) / 0.72);
  --c-backdrop: rgb(var(--rgb-bg-deep) / 0.82);

  /* Panneau clair : visuels produit. --c-lite : bandeaux de section clairs.
     Leur encre est le fond du site, une seule famille de verts. */
  --c-lite: rgb(var(--rgb-lite));
  --c-panel: rgb(var(--rgb-panel));
  --c-panel-raised: rgb(var(--rgb-white));
  --c-panel-soft: rgb(var(--rgb-bg) / 0.05);
  --c-panel-line: rgb(var(--rgb-bg) / 0.1);
  --c-ink: rgb(var(--rgb-bg));
  --c-ink-muted: rgb(var(--rgb-bg) / 0.62);
  --c-ink-faint: rgb(var(--rgb-bg) / 0.38);
  --c-ink-accent: rgb(var(--rgb-accent-ink));
  --c-ink-accent-soft: rgb(var(--rgb-accent) / 0.16);
  --c-warn-soft: rgb(var(--rgb-warn) / 0.22);
  --c-warn-ink: rgb(var(--rgb-warn-ink));

  /* Dégradés : une seule famille, du menthe à l'émeraude */
  --g-brand: linear-gradient(135deg, var(--c-mint), var(--c-accent-light) 45%, var(--c-accent));
  --g-text: linear-gradient(100deg, var(--c-mint) 10%, var(--c-accent-light) 55%, var(--c-teal));
  --g-button: linear-gradient(180deg, var(--c-accent-light), var(--c-accent));
  --g-card: linear-gradient(180deg, rgb(var(--rgb-text) / 0.055), rgb(var(--rgb-text) / 0.015));
  --g-aurora:
    radial-gradient(55% 45% at 50% 0%, rgb(var(--rgb-accent) / 0.34), transparent 70%),
    radial-gradient(30% 35% at 88% 18%, rgb(var(--rgb-teal) / 0.14), transparent 70%),
    radial-gradient(30% 35% at 10% 30%, rgb(var(--rgb-mint) / 0.08), transparent 70%);
  --g-cta:
    radial-gradient(70% 90% at 0% 0%, rgb(var(--rgb-accent) / 0.4), transparent 60%),
    radial-gradient(60% 80% at 100% 100%, rgb(var(--rgb-teal) / 0.2), transparent 60%),
    linear-gradient(160deg, var(--c-bg-alt), var(--c-bg-deep));

  /* Ombres portées : en couches, généreuses. --shadow-ui vit sur le panneau clair. */
  --shadow-inset: inset 0 1px 0 rgb(var(--rgb-text) / 0.08);
  --shadow-sm: 0 1px 2px rgb(var(--rgb-shadow) / 0.3), 0 6px 16px rgb(var(--rgb-shadow) / 0.24);
  --shadow-md: 0 2px 4px rgb(var(--rgb-shadow) / 0.26), 0 20px 48px rgb(var(--rgb-shadow) / 0.44);
  --shadow-lg: 0 4px 10px rgb(var(--rgb-shadow) / 0.28), 0 36px 72px rgb(var(--rgb-shadow) / 0.5), 0 90px 160px rgb(var(--rgb-shadow) / 0.55);
  --shadow-glow: 0 10px 30px rgb(var(--rgb-accent) / 0.32), 0 30px 80px rgb(var(--rgb-accent) / 0.18);
  --shadow-ui: 0 1px 2px rgb(var(--rgb-bg) / 0.06), 0 4px 14px rgb(var(--rgb-bg) / 0.07);
  --shadow-ui-lg: 0 2px 6px rgb(var(--rgb-bg) / 0.08), 0 22px 48px rgb(var(--rgb-bg) / 0.18);
  --ring-live: 0 0 0 4px rgb(var(--rgb-accent) / 0.14);

  /* Typographie : Montserrat seule, contraste thin / extrabold */
  --ff-sans: 'Montserrat', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --ff-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --fw-thin: 200;
  --fw-hairline: var(--fw-thin);
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  --fw-heavy: 800;

  --fs-display: 32px;
  --lh-display: 1.04;
  --fs-h2: 30px;
  --lh-h2: 1.1;
  --fs-h3: 18px;
  --lh-h3: 1.3;
  --fs-lead: 17px;
  --lh-lead: 1.6;
  --fs-body: 16px;
  --lh-body: 1.6;
  --fs-small: 14px;
  --lh-small: 1.55;
  --fs-eyebrow: 12px;
  --ls-eyebrow: 0.16em;
  --fs-stat: 40px;
  --fs-price: 40px;
  --fs-wordmark: 22vw;

  /* Texte des visuels produit : une échelle à part, plus serrée */
  --fs-ui-xl: 18px;
  --fs-ui-lg: 15px;
  --fs-ui: 13px;
  --fs-ui-sm: 12px;
  --fs-ui-xs: 11px;

  /* Rythme */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;
  --space-11: 128px;
  --space-12: 160px;

  --pad-x: 20px;
  --section-y: 72px;
  --card-pad: 24px;
  --container-max: 1200px;
  --measure: 60ch;

  /* Rayons : généreux partout, 100 % ronds pour les boutons */
  --radius-2xl: 32px;
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --radius-pill: 999px;

  /* Mouvement : court, amorti, jamais rebondi */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 220ms;
  --dur-in: 600ms;
  --dur-reveal: 800ms;
  --transition: var(--dur) var(--ease-out);
  --loop-hero: 12s;
  --loop-catalog: 40s;

  /* Gabarits des visuels produit. Densité serrée tant que les visuels sont
     étroits (mobile, et demi-carte en tablette) : les noms doivent tenir. */
  --hero-visual-max: 1080px;
  --app-side: 188px;
  --ui-gap: var(--space-2);
  --scene-pad: var(--space-3);
  --scene-h: 188px;
  --bars-h: 136px;
  --ring-size: 148px;
  --sweep-size: 232px;
  --portfolio-max: 440px;

  /* Divers */
  --header-h: 60px;
  --header-top: 12px;
  --tap-min: 48px;
  --tap-compact: 40px;
  --cta-max: 360px;
  --dialog-max: 560px;
  --grid-step: 64px;
  --grid-line: rgb(var(--rgb-text) / 0.05);

  /* Icônes : masques SVG peints en currentColor (voir .ico) */
  --ico-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E");
  --ico-arrow-down: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5v14M6 13l6 6 6-6'/%3E%3C/svg%3E");
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  --ico-cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E");
  --ico-lock: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10.5' width='14' height='10' rx='2.5'/%3E%3Cpath d='M8.5 10.5V8a3.5 3.5 0 0 1 7 0v2.5'/%3E%3C/svg%3E");
  --ico-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 16.5V11a5.5 5.5 0 0 1 11 0v5.5L19 18H5z'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
  --ico-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l7 3v5.5c0 4.4-2.9 8.1-7 9.5-4.1-1.4-7-5.1-7-9.5V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E");
  --ico-monitor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='12' rx='2.5'/%3E%3Cpath d='M8 20h8M12 16v4'/%3E%3C/svg%3E");
  --ico-medical: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='3.5' width='17' height='17' rx='5'/%3E%3Cpath d='M12 8v8M8 12h8'/%3E%3C/svg%3E");
  --ico-users: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='8.5' r='3.5'/%3E%3Cpath d='M2.5 20a6.5 6.5 0 0 1 13 0M16 5a3.5 3.5 0 0 1 0 7M18 14.5a6 6 0 0 1 3.5 5.5'/%3E%3C/svg%3E");
  --ico-building: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4.5' y='3' width='15' height='18' rx='2'/%3E%3Cpath d='M9 7.5h1.5M13.5 7.5H15M9 11.5h1.5M13.5 11.5H15M10 21v-4h4v4'/%3E%3C/svg%3E");
  --ico-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E");
  --ico-plug: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 3v5M15 3v5M6 8h12v3a6 6 0 0 1-12 0zM12 17v4'/%3E%3C/svg%3E");
  --ico-code: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 7l-5 5 5 5M16 7l5 5-5 5M13.5 4.5l-3 15'/%3E%3C/svg%3E");
  --ico-id: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='3'/%3E%3Ccircle cx='9' cy='12' r='2.5'/%3E%3Cpath d='M14 10.5h4M14 13.5h3'/%3E%3C/svg%3E");
  --ico-wind: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8h11a3 3 0 1 0-3-3M4 12h14a3 3 0 1 1-3 3M4 16h8'/%3E%3C/svg%3E");
  --ico-signal: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 18h.01M8.2 14.2a5.5 5.5 0 0 1 7.6 0M5.2 11.2a9.5 9.5 0 0 1 13.6 0M2.5 8.2a13.5 13.5 0 0 1 19 0'/%3E%3C/svg%3E");
  --ico-linkedin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-4 0v7h-4v-7a6 6 0 0 1 6-6z'/%3E%3Crect width='4' height='12' x='2' y='9'/%3E%3Ccircle cx='4' cy='4' r='2'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
  :root {
    --fs-display: 48px;
    --fs-h2: 42px;
    --fs-h3: 20px;
    --fs-lead: 19px;
    --fs-stat: 52px;
    --fs-wordmark: 20vw;
    --fs-ui-xl: 22px;
    --pad-x: 32px;
    --section-y: 104px;
    --card-pad: 32px;
    --radius-2xl: 40px;
    --scene-h: 204px;
    --header-h: 64px;
    --header-top: 16px;
  }
}

@media (min-width: 1080px) {
  :root {
    --fs-display: 60px;
    /* Le vrai Thin de Montserrat ne tient qu'en taille display. */
    --fw-hairline: 100;
    --fs-h2: 52px;
    --fs-lead: 20px;
    --fs-stat: 60px;
    --fs-wordmark: 248px;
    --pad-x: 40px;
    --section-y: 136px;
    /* Les cartes à trois colonnes s'élargissent de 1080 à 1280 px : la
       densité suit, de 8 à 12 px, de 12 à 16 px. */
    --ui-gap: clamp(var(--space-2), 2vw - 13.6px, var(--space-3));
    --scene-pad: clamp(var(--space-3), 2vw - 9.6px, var(--space-4));
  }
}
