/* ---------------------------------------------------------------------------
 * Fonte de marque — Inter variable, EMBARQUÉE.
 *
 * Aucune requête vers un tiers : les fichiers sont servis depuis la même
 * origine que le document (garde `construire.mjs`, porte `construire:mfe` du
 * socle). Licence SIL Open Font 1.1 — redistribution admise dans un produit
 * fermé ; le texte de la licence est servi à /fontes/LICENCE-Inter.txt.
 *
 * La coquille possède le document, donc la fonte : un fragment monté dans son
 * Shadow DOM en hérite sans rien déclarer et sans rien savoir d'elle.
 * `font-display: swap` : le texte est lisible avant la fin du téléchargement.
 * ------------------------------------------------------------------------- */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fontes/inter-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fontes/inter-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------------------------------------------------------------------------
 * Jetons de conception Echad — socle commun des faces publiques d'eRakia.
 *
 * Source : couche d'apparence en production sur echad.tech (relevé du
 * 16/09/2026). Ce fichier est la SEULE surface de style partagée entre deux
 * micro-frontends : aucune classe, aucun sélecteur, aucune règle de mise en
 * page n'est partagée. Un micro-frontend qui lit un jeton ne sait rien de la
 * façon dont son voisin le peint.
 *
 * Les propriétés personnalisées traversent le Shadow DOM par construction :
 * c'est ce qui permet la convergence visuelle sans couplage de code.
 * ------------------------------------------------------------------------- */

:root,
:host {
  /* Rampe primaire — bleu Echad */
  --echad-p50: #f3f9fe;
  --echad-p100: #e4f2fe;
  --echad-p200: #cce6fd;
  --echad-p300: #9ecffa;
  --echad-p400: #51a9f6;
  --echad-p500: #0f8af4;
  --echad-p600: #0c71c8;
  --echad-p700: #085191;
  --echad-p800: #074071;
  --echad-p900: #062a49;

  /* Rôles de marque */
  --echad-primary: #0f8af4;
  --echad-primary-strong: #0c71c8;
  --echad-primary-deep: #0c71c8;
  --echad-primary-deep-hover: #074071;
  --echad-primary-ink: #085191;
  --echad-accent: #e7b700;
  --echad-rule: #0f8af4;
  --echad-eyebrow: #0c71c8;
  --echad-band: #0f8af4;
  --echad-band-deep: #0c71c8;
  --echad-band-ink: #ffffff;

  /* Surfaces */
  --echad-surface: #ffffff;
  --echad-surface-alt: #f3f9fe;
  --echad-surface-sunken: #e4f2fe;
  --echad-surface-inverse: #085191;
  --echad-surface-marque: #085191;
  --echad-surface-marque-creuse: #074071;
  --echad-surface-marque-bande: #0f8af4;
  --echad-surface-marque-tuile: rgb(8 81 145 / 78%);
  --echad-surface-marque-tuile-survol: rgb(8 81 145 / 88%);
  --echad-surface-marque-active: #ffffff;

  /* Encres */
  --echad-encre-marque-active: #085191;
  --echad-text: #062a49;
  --echad-text-muted: #2c4f6d;
  --echad-text-faint: #2c4f6d;
  --echad-text-on-primary: #ffffff;
  --echad-on-primary-deep: #ffffff;
  --echad-text-inverse: #edf4fa;
  --echad-on-media: #ffffff;
  --echad-on-media-corps: #ffffff;
  --echad-on-media-surtitre: #ffffff;

  /* Bordures, liens, focus */
  --echad-border: #b5cee3;
  --echad-border-strong: #4c7394;
  --echad-link: #0c71c8;
  --echad-link-hover: #085191;
  --echad-focus: #085191;
  --echad-overlay: rgb(6 42 73 / 84%);

  /* États de service */
  --echad-ok: #16653c;
  --echad-ok-surface: #e2f4ea;
  --echad-warn: #645000;
  --echad-warn-surface: #fbf3d4;
  --echad-down: #96222a;
  --echad-down-surface: #fbe6e7;
  --echad-maint: #085191;
  --echad-maint-surface: #e4f2fe;
  --echad-neutral: #2c4f6d;
  --echad-neutral-surface: #e4f2fe;

  /* Niveaux de service */
  --echad-sla-bronze: #51471f;
  --echad-sla-bronze-surface: #f8f5e7;
  --echad-sla-silver: #3c4e5d;
  --echad-sla-silver-surface: #eef3f6;
  --echad-sla-gold: #5c4900;
  --echad-sla-gold-surface: #fcf3d5;
  --echad-sla-platinum: #085191;
  --echad-sla-platinum-surface: #e4f2fe;

  /* Média */
  --echad-media-voile: rgb(7 64 113 / 86%);
  --echad-media-voile-degrade: linear-gradient( 100deg, rgb(7 64 113 / 60%) 0%, rgb(7 64 113 / 50%) 38%, rgb(7 64 113 / 18%) 72%, rgb(7 64 113 / 8%) 100% ), linear-gradient(to top, rgb(7 64 113 / 32%) 0%, rgb(7 64 113 / 0%) 58%);
  --echad-media-fond: #085191;

  /* Typographie */
  --echad-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", roboto, helvetica, arial, sans-serif;
  --echad-font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", consolas, monospace;
  --echad-poids-affichage: 300;
  --echad-poids-titre: 400;
  --echad-poids-sous-titre: 500;
  --echad-poids-navigation: 300;
  --echad-poids-libelle: 600;
  --echad-step--1: clamp(.8125rem, .79rem + .11vw, .875rem);
  --echad-step-0: clamp(.9375rem, .91rem + .14vw, 1rem);
  --echad-step-1: clamp(1.0625rem, 1rem + .31vw, 1.25rem);
  --echad-step-2: clamp(1.25rem, 1.13rem + .6vw, 1.625rem);
  --echad-step-3: clamp(1.5rem, 1.28rem + 1.1vw, 2.125rem);
  --echad-step-4: clamp(1.75rem, 1.4rem + 1.75vw, 2.625rem);
  --echad-step-5: clamp(2rem, 1.55rem + 2.25vw, 3.125rem);
  --echad-step-6: clamp(2.375rem, 1.7rem + 2.9vw, 3.75rem);
  --echad-step--1: clamp(.8125rem, .79rem + .11vw, .875rem);

  /* Espacement, rayons, ombres */
  --echad-space-1: .25rem;
  --echad-space-2: .5rem;
  --echad-space-3: .75rem;
  --echad-space-4: 1rem;
  --echad-space-5: 1.5rem;
  --echad-space-6: 2rem;
  --echad-space-7: 3rem;
  --echad-space-8: 4rem;
  --echad-space-9: 6rem;
  --echad-radius-1: 4px;
  --echad-radius-2: 8px;
  --echad-radius-3: 14px;
  --echad-radius-4: 22px;
  --echad-shadow-1: 0 1px 2px rgb(6 42 73 / 8%), 0 1px 3px rgb(6 42 73 / 6%);
  --echad-shadow-2: 0 2px 6px rgb(6 42 73 / 10%), 0 8px 24px rgb(6 42 73 / 10%);
  --echad-shadow-3: 0 6px 14px rgb(6 42 73 / 12%), 0 18px 48px rgb(6 42 73 / 14%);

  /* Gabarit */
  --echad-shell: 82rem;
  --echad-shell-narrow: 52rem;
  --echad-header-height: 4.5rem;
  --echad-header-height-condense: 3.5rem;
  --echad-header-reserve: var(--echad-header-height);
  --echad-utilitaire-height: 2.125rem;
  --echad-entete-encre: #085191;

  /* Mouvement */
  --echad-duration: .24s;
  --echad-duration-entree: .32s;
  --echad-ease: cubic-bezier(.2, .6, .2, 1);

}

/* Mode sombre — plancher de nuit. Clarté CIE L* du fond mesurée ≥ 15. */
:root[data-echad-theme="dark"],
:host([data-echad-theme="dark"]) {
  --echad-primary: #0f8af4;
  --echad-primary-strong: #51a9f6;
  --echad-primary-deep: #9ecffa;
  --echad-primary-deep-hover: #cce6fd;
  --echad-primary-ink: #9ecffa;
  --echad-link: #9ecffa;
  --echad-link-hover: #cce6fd;
  --echad-eyebrow: #cce6fd;
  --echad-rule: #51a9f6;
  --echad-accent: #e7b700;
  --echad-surface: #062a49;
  --echad-surface-alt: #074071;
  --echad-surface-sunken: #085191;
  --echad-surface-inverse: #f3f9fe;
  --echad-overlay: rgb(6 42 73 / 88%);
  --echad-text: #edf4fa;
  --echad-text-muted: #cce6fd;
  --echad-text-faint: #cce6fd;
  --echad-text-on-primary: #062a49;
  --echad-on-primary-deep: #062a49;
  --echad-text-inverse: #062a49;
  --echad-entete-encre: #ffffff;
  --echad-border: #0a63b0;
  --echad-border-strong: #51a9f6;
  --echad-focus: #9ecffa;
  --echad-ok: #98dfbb;
  --echad-ok-surface: #0f4632;
  --echad-warn: #e7b700;
  --echad-warn-surface: #42360b;
  --echad-down: #ffabaf;
  --echad-down-surface: #57222a;
  --echad-maint: #afd7fb;
  --echad-maint-surface: #074071;
  --echad-neutral: #cce6fd;
  --echad-neutral-surface: #074071;
  --echad-sla-bronze: #e6d9a8;
  --echad-sla-bronze-surface: #403610;
  --echad-sla-silver: #c3d2df;
  --echad-sla-silver-surface: #162939;
  --echad-sla-gold: #e7b700;
  --echad-sla-gold-surface: #473908;
  --echad-sla-platinum: #9ecffa;
  --echad-sla-platinum-surface: #062a49;
  --echad-shadow-1: 0 1px 2px rgb(6 42 73 / 48%);
  --echad-shadow-2: 0 2px 6px rgb(6 42 73 / 48%), 0 8px 24px rgb(6 42 73 / 42%);
  --echad-shadow-3: 0 6px 14px rgb(6 42 73 / 52%), 0 18px 48px rgb(6 42 73 / 48%);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-echad-theme="light"]) {
    --echad-primary: #0f8af4;
    --echad-primary-strong: #51a9f6;
    --echad-primary-deep: #9ecffa;
    --echad-primary-deep-hover: #cce6fd;
    --echad-primary-ink: #9ecffa;
    --echad-link: #9ecffa;
    --echad-link-hover: #cce6fd;
    --echad-eyebrow: #cce6fd;
    --echad-rule: #51a9f6;
    --echad-accent: #e7b700;
    --echad-surface: #062a49;
    --echad-surface-alt: #074071;
    --echad-surface-sunken: #085191;
    --echad-surface-inverse: #f3f9fe;
    --echad-overlay: rgb(6 42 73 / 88%);
    --echad-text: #edf4fa;
    --echad-text-muted: #cce6fd;
    --echad-text-faint: #cce6fd;
    --echad-text-on-primary: #062a49;
    --echad-on-primary-deep: #062a49;
    --echad-text-inverse: #062a49;
    --echad-entete-encre: #ffffff;
    --echad-border: #0a63b0;
    --echad-border-strong: #51a9f6;
    --echad-focus: #9ecffa;
    --echad-ok: #98dfbb;
    --echad-ok-surface: #0f4632;
    --echad-warn: #e7b700;
    --echad-warn-surface: #42360b;
    --echad-down: #ffabaf;
    --echad-down-surface: #57222a;
    --echad-maint: #afd7fb;
    --echad-maint-surface: #074071;
    --echad-neutral: #cce6fd;
    --echad-neutral-surface: #074071;
    --echad-sla-bronze: #e6d9a8;
    --echad-sla-bronze-surface: #403610;
    --echad-sla-silver: #c3d2df;
    --echad-sla-silver-surface: #162939;
    --echad-sla-gold: #e7b700;
    --echad-sla-gold-surface: #473908;
    --echad-sla-platinum: #9ecffa;
    --echad-sla-platinum-surface: #062a49;
    --echad-shadow-1: 0 1px 2px rgb(6 42 73 / 48%);
    --echad-shadow-2: 0 2px 6px rgb(6 42 73 / 48%), 0 8px 24px rgb(6 42 73 / 42%);
    --echad-shadow-3: 0 6px 14px rgb(6 42 73 / 52%), 0 18px 48px rgb(6 42 73 / 48%);
  }
}

/* Mouvement réduit — honoré sans exception (WCAG 2.2, 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  :root, :host { --echad-duration: 0ms; --echad-duration-entree: 0ms; }
}
