/*
 * Pilote — design system V2 « Instruments de bord ».
 * Jetons partagés par le site vitrine et le cockpit : polices, couleurs (clair et sombre),
 * typographie, espacements, rayons, ombres, mouvement.
 *
 * Contrastes vérifiés (WCAG 2.1 AA) : tout texte ≥ 4,5:1 sur les fonds où il est employé,
 * contours de champs et anneau de focus ≥ 3:1. Les deux blocs du thème sombre doivent rester
 * identiques (préférence du système, et choix explicite dans le cockpit).
 */

/* --- Polices auto-hébergées (licence OFL, voir ../fonts/) ------------------------------------ */

@font-face {
  font-family: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin.woff2") format("woff2");
  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: "Instrument Sans";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 75% 100%;
  font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext.woff2") format("woff2");
  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;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/instrument-serif-latin-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/geist-mono-latin.woff2") format("woff2");
}

/* --- Jetons ------------------------------------------------------------------------------- */

:root {
  /* Typographie */
  --font-sans: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 40px;
  --text-5xl: 52px;
  --text-display: clamp(44px, 6.6vw, 96px);

  --leading-tight: 1.1;
  --leading-snug: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;

  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  --tracking-display: -0.045em;
  --tracking-tighter: -0.03em;
  --tracking-tight: -0.015em;
  --tracking-caps: 0.08em;

  /* Espacements (base 4 px) */
  --space-1: 2px;
  --space-2: 4px;
  --space-3: 6px;
  --space-4: 8px;
  --space-5: 10px;
  --space-6: 12px;
  --space-7: 16px;
  --space-8: 20px;
  --space-9: 24px;
  --space-10: 32px;
  --space-11: 40px;
  --space-12: 48px;
  --space-13: 64px;
  --space-14: 80px;
  --space-15: 104px;
  --space-16: 136px;

  /* Rayons */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 22px;
  --radius-full: 999px;

  /* Mouvement */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-1: 90ms;
  --dur-2: 150ms;
  --dur-3: 220ms;
  --dur-4: 360ms;
  --dur-5: 640ms;

  /* Plans */
  --z-sticky: 20;
  --z-overlay: 40;
  --z-drawer: 45;
  --z-toast: 70;
  --z-progress: 80;

  /* Couleurs — thème clair */
  --canvas: #f6f6f3;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-sunken: #f0f0ec;
  --fill-hover: rgb(20 21 19 / 4.5%);
  --fill-active: rgb(20 21 19 / 8%);
  --fill-selected: rgb(20 21 19 / 6%);
  --border: #e4e4de;
  --border-subtle: #ecece7;
  --border-strong: #d2d2cb;
  --border-control: #8d8e87;
  --text: #141513;
  --text-2: #3b3c37;
  --text-muted: #62635d;
  --text-subtle: #6b6c66;
  --ink: #141513;
  --ink-hover: #2b2c29;
  --on-ink: #ffffff;
  --accent: #ff5b1f;
  --accent-strong: #e24a0e;
  --accent-text: #c2410c;
  --accent-soft: #ffefe7;
  --accent-border: #ffcfb8;
  --on-accent: #1a0a02;
  --focus: #d9480f;
  --ring: rgb(255 91 31 / 22%);
  --selection: rgb(255 91 31 / 18%);

  --success: #146c3b;
  --success-solid: #22a05a;
  --success-soft: #e5f5eb;
  --warning: #835400;
  --warning-solid: #e5a000;
  --warning-soft: #fef4d8;
  --danger: #b0202e;
  --danger-solid: #e5484d;
  --danger-strong: #c42b37;
  --danger-soft: #fdebed;
  --danger-border: #f6c3c8;
  --info: #1d4fbf;
  --info-solid: #3b76f0;
  --info-soft: #eaf1fe;
  --ai: #6d28d9;
  --ai-solid: #7c3aed;
  --ai-solid-hover: #6d28d9;
  --ai-soft: #f3edfe;
  --ai-border: #ddd0fb;
  --on-color: #ffffff;

  /* Statuts des candidatures : pastille (point), fond et texte. Points validés pour la
     séparation des teintes, y compris en vision des couleurs atypique (le libellé accompagne
     toujours la couleur ; « À postuler » est volontairement neutre). */
  --st-apply: #7c8698;
  --st-apply-soft: #f0f0ec;
  --st-apply-text: #4b4c46;
  --st-sent: #3b76f0;
  --st-sent-soft: #eaf1fe;
  --st-sent-text: #1d4fbf;
  --st-followup: #0e9ba8;
  --st-followup-soft: #e3f5f6;
  --st-followup-text: #0a6670;
  --st-interview_scheduled: #5b5bd6;
  --st-interview_scheduled-soft: #edeefd;
  --st-interview_scheduled-text: #3a3ab0;
  --st-interview_done: #d6409f;
  --st-interview_done-soft: #fdeaf5;
  --st-interview_done-text: #a3226f;
  --st-waiting: #e5a000;
  --st-waiting-soft: #fef4d8;
  --st-waiting-text: #835400;
  --st-accepted: #3cc07a;
  --st-accepted-soft: #e5f5eb;
  --st-accepted-text: #146c3b;
  --st-rejected: #b3263a;
  --st-rejected-soft: #fdebed;
  --st-rejected-text: #b0202e;

  /* Profondeur */
  --shadow-xs: 0 1px 1px rgb(20 21 19 / 4%);
  --shadow-sm: 0 1px 2px rgb(20 21 19 / 5%), 0 1px 3px rgb(20 21 19 / 4%);
  --shadow-md: 0 2px 4px -1px rgb(20 21 19 / 5%), 0 8px 18px -6px rgb(20 21 19 / 10%);
  --shadow-lg: 0 4px 10px -2px rgb(20 21 19 / 6%), 0 24px 56px -16px rgb(20 21 19 / 22%);
  --shadow-inset: inset 0 1px 0 rgb(255 255 255 / 60%);
  --backdrop: rgb(20 21 19 / 38%);

  /* Fond « papier » des aperçus de documents : identique dans les deux thèmes */
  --paper: #ffffff;
  --paper-text: #1b1c19;
  --paper-muted: #5b5c57;
  --paper-rule: #d9d9d2;

  color-scheme: light;
}

/* Thème sombre — préférence du système (bloc identique au suivant) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #0b0b0a;
    --surface: #131312;
    --surface-raised: #1a1a18;
    --surface-sunken: #0f0f0e;
    --fill-hover: rgb(250 250 240 / 5%);
    --fill-active: rgb(250 250 240 / 9%);
    --fill-selected: rgb(250 250 240 / 7%);
    --border: #262624;
    --border-subtle: #1f1f1d;
    --border-strong: #33332f;
    --border-control: #6e6e67;
    --text: #edede8;
    --text-2: #c9c9c2;
    --text-muted: #9c9c94;
    --text-subtle: #85857d;
    --ink: #edede8;
    --ink-hover: #ffffff;
    --on-ink: #131312;
    --accent: #ff6b33;
    --accent-strong: #ff8552;
    --accent-text: #ff9466;
    --accent-soft: #2e160b;
    --accent-border: #5a2a14;
    --on-accent: #1a0a02;
    --focus: #ff8552;
    --ring: rgb(255 107 51 / 30%);
    --selection: rgb(255 107 51 / 30%);
    --success: #6bd89a;
    --success-solid: #3fbf78;
    --success-soft: #0f2a1b;
    --warning: #f2c45a;
    --warning-solid: #e5a000;
    --warning-soft: #2d2309;
    --danger: #ff8c96;
    --danger-solid: #f0545d;
    --danger-strong: #c42b37;
    --danger-soft: #371318;
    --danger-border: #6a2229;
    --info: #8eb2ff;
    --info-solid: #5b8def;
    --info-soft: #14223f;
    --ai: #c4b5fd;
    --ai-solid: #7c3aed;
    --ai-solid-hover: #6d28d9;
    --ai-soft: #21173a;
    --ai-border: #3d2a6b;
    --on-color: #ffffff;
    --st-apply: #8a8f99;
    --st-apply-soft: #1e1e1c;
    --st-apply-text: #bdbdb5;
    --st-sent: #3f74e0;
    --st-sent-soft: #14223f;
    --st-sent-text: #8eb2ff;
    --st-followup: #169ea8;
    --st-followup-soft: #0e2a2d;
    --st-followup-text: #6fd3dc;
    --st-interview_scheduled: #6f6fe8;
    --st-interview_scheduled-soft: #1c1d45;
    --st-interview_scheduled-text: #a9aaff;
    --st-interview_done: #cf4f9c;
    --st-interview_done-soft: #3a1530;
    --st-interview_done-text: #f39bd0;
    --st-waiting: #c08300;
    --st-waiting-soft: #2d2309;
    --st-waiting-text: #f2c45a;
    --st-accepted: #34ae6c;
    --st-accepted-soft: #0f2a1b;
    --st-accepted-text: #6bd89a;
    --st-rejected: #c93644;
    --st-rejected-soft: #371318;
    --st-rejected-text: #ff8c96;
    --shadow-xs: 0 1px 1px rgb(0 0 0 / 40%);
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 50%), 0 0 0 1px rgb(255 255 255 / 2%);
    --shadow-md: 0 2px 6px -1px rgb(0 0 0 / 50%), 0 10px 24px -8px rgb(0 0 0 / 60%);
    --shadow-lg: 0 6px 14px -4px rgb(0 0 0 / 55%), 0 28px 64px -18px rgb(0 0 0 / 75%);
    --shadow-inset: inset 0 1px 0 rgb(255 255 255 / 4%);
    --backdrop: rgb(0 0 0 / 62%);
    color-scheme: dark;
  }
}

/* Thème sombre — choix explicite dans le cockpit (bloc identique au précédent), et îlots
   sombres du site (.theme-dark : liste d'attente, offre mise en avant), quel que soit le thème */
:root[data-theme="dark"],
.theme-dark {
  --canvas: #0b0b0a;
  --surface: #131312;
  --surface-raised: #1a1a18;
  --surface-sunken: #0f0f0e;
  --fill-hover: rgb(250 250 240 / 5%);
  --fill-active: rgb(250 250 240 / 9%);
  --fill-selected: rgb(250 250 240 / 7%);
  --border: #262624;
  --border-subtle: #1f1f1d;
  --border-strong: #33332f;
  --border-control: #6e6e67;
  --text: #edede8;
  --text-2: #c9c9c2;
  --text-muted: #9c9c94;
  --text-subtle: #85857d;
  --ink: #edede8;
  --ink-hover: #ffffff;
  --on-ink: #131312;
  --accent: #ff6b33;
  --accent-strong: #ff8552;
  --accent-text: #ff9466;
  --accent-soft: #2e160b;
  --accent-border: #5a2a14;
  --on-accent: #1a0a02;
  --focus: #ff8552;
  --ring: rgb(255 107 51 / 30%);
  --selection: rgb(255 107 51 / 30%);
  --success: #6bd89a;
  --success-solid: #3fbf78;
  --success-soft: #0f2a1b;
  --warning: #f2c45a;
  --warning-solid: #e5a000;
  --warning-soft: #2d2309;
  --danger: #ff8c96;
  --danger-solid: #f0545d;
  --danger-strong: #c42b37;
  --danger-soft: #371318;
  --danger-border: #6a2229;
  --info: #8eb2ff;
  --info-solid: #5b8def;
  --info-soft: #14223f;
  --ai: #c4b5fd;
  --ai-solid: #7c3aed;
  --ai-solid-hover: #6d28d9;
  --ai-soft: #21173a;
  --ai-border: #3d2a6b;
  --on-color: #ffffff;
  --st-apply: #8a8f99;
  --st-apply-soft: #1e1e1c;
  --st-apply-text: #bdbdb5;
  --st-sent: #3f74e0;
  --st-sent-soft: #14223f;
  --st-sent-text: #8eb2ff;
  --st-followup: #169ea8;
  --st-followup-soft: #0e2a2d;
  --st-followup-text: #6fd3dc;
  --st-interview_scheduled: #6f6fe8;
  --st-interview_scheduled-soft: #1c1d45;
  --st-interview_scheduled-text: #a9aaff;
  --st-interview_done: #cf4f9c;
  --st-interview_done-soft: #3a1530;
  --st-interview_done-text: #f39bd0;
  --st-waiting: #c08300;
  --st-waiting-soft: #2d2309;
  --st-waiting-text: #f2c45a;
  --st-accepted: #34ae6c;
  --st-accepted-soft: #0f2a1b;
  --st-accepted-text: #6bd89a;
  --st-rejected: #c93644;
  --st-rejected-soft: #371318;
  --st-rejected-text: #ff8c96;
  --shadow-xs: 0 1px 1px rgb(0 0 0 / 40%);
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 50%), 0 0 0 1px rgb(255 255 255 / 2%);
  --shadow-md: 0 2px 6px -1px rgb(0 0 0 / 50%), 0 10px 24px -8px rgb(0 0 0 / 60%);
  --shadow-lg: 0 6px 14px -4px rgb(0 0 0 / 55%), 0 28px 64px -18px rgb(0 0 0 / 75%);
  --shadow-inset: inset 0 1px 0 rgb(255 255 255 / 4%);
  --backdrop: rgb(0 0 0 / 62%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  color-scheme: light;
}
