/*
 * Jetons Yrytys. Charges par partials/_favicon, donc sur toutes les pages, y
 * compris celles qui posent leurs feuilles apres ce partiel : `html:root` gagne
 * en specificite sur le `:root` des variables communes, quel que soit l'ordre.
 * Source : canvas de design, planches 01 et 02.
 */
@font-face {
    font-family: 'Plus Jakarta Sans';
    src: url('../fonts/PlusJakartaSans-latin.woff2') format('woff2');
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Geist Mono';
    src: url('../fonts/GeistMono-latin.woff2') format('woff2');
    font-weight: 400 500;
    font-style: normal;
    font-display: swap;
}

html:root {
    /* Palette de la marque */
    --yr-encre-900: #0E1A24;
    --yr-encre-700: #2A3A47;
    --yr-encre-500: #5A6772;
    --yr-encre-300: #A3ACB3;
    --yr-encre-200: #C9D0D5;
    --yr-ligne: #E3E6E8;
    --yr-papier: #F6F5F1;
    --yr-blanc: #FFFFFF;
    --yr-sceau-700: #0B4F45;
    --yr-sceau-600: #0F6B5D;
    --yr-sceau-clair: #4FB3A1;
    --yr-ambre: #F2B544;
    --yr-valide-bg: #DDEEEA;
    --yr-afaire-bg: #FCEFD3;
    --yr-afaire-text: #7A4A00;
    --yr-info-bg: #E6EDFB;
    --yr-info-text: #1F4FB8;
    --yr-refuse-bg: #FDECEA;
    --yr-refuse-text: #B42318;

    /* Echelle typographique, nommee par role (DESIGN.md, Typography). Les
       titres d'affichage en clamp() et les grands chiffres restent propres
       a chaque page. */
    --yr-text-micro: 11px;     /* etiquettes mono en capitales */
    --yr-text-label: 12px;     /* sur-titres, metadonnees */
    --yr-text-caption: 13px;   /* mentions, aides, descriptions de menu */
    --yr-text-small: 14px;     /* texte secondaire, listes, navigation */
    --yr-text-body: 15px;      /* texte courant, boutons */
    --yr-text-body-lg: 16px;   /* champs, texte mobile, grands boutons */
    --yr-text-lead-sm: 17px;   /* titres d'encart */
    --yr-text-subtitle: 18px;  /* sous-titres */
    --yr-text-lead: 19px;      /* chapeau du hero */
    --yr-text-title-sm: 20px;
    --yr-text-title: 22px;
    --yr-text-title-md: 24px;
    --yr-text-title-lg: 26px;  /* titre de carte offre */

    --yr-font: 'Plus Jakarta Sans', system-ui, sans-serif;
    --yr-mono: 'Geist Mono', ui-monospace, monospace;
    --yr-ease: cubic-bezier(.2, 0, 0, 1);
    --yr-dur-1: 120ms;
    --yr-dur-2: 200ms;

    /* Variables communes : tunnel, dossier, dashboard, authentification */
    --font-family: var(--yr-font);

    --color-neutral-100: var(--yr-encre-300);
    --color-neutral-300: var(--yr-encre-500);
    --color-neutral-500: var(--yr-encre-900);

    --color-primary-50: var(--yr-papier);
    --color-primary-100: var(--yr-valide-bg);
    --color-primary-300: var(--yr-sceau-clair);
    --color-primary-400: var(--yr-sceau-600);
    --color-primary-500: var(--yr-sceau-600);
    --color-primary-600: var(--yr-sceau-600);
    --color-primary-700: var(--yr-sceau-700);
    --color-primary-800: var(--yr-sceau-700);
    --color-primary-900: var(--yr-encre-900);
    --color-accent: var(--yr-sceau-600);

    --color-secondary-50: var(--yr-valide-bg);
    --color-secondary-500: var(--yr-sceau-600);
    --color-secondary-700: var(--yr-sceau-700);

    --color-text-default: var(--yr-encre-900);
    --color-text-muted: var(--yr-encre-500);
    --color-text-subtle: var(--yr-encre-500);
    --color-error: var(--yr-refuse-text);
    --color-error-light: var(--yr-refuse-bg);
    --color-error-dark: var(--yr-refuse-text);
    --color-error-tint: rgba(180, 35, 24, .12);
    --color-error-shadow: transparent;
    --color-success-500: var(--yr-sceau-600);
    --color-success-700: var(--yr-sceau-700);
    --color-success-800: var(--yr-sceau-700);

    --order-bg: var(--yr-papier);
    --order-title-bg: var(--yr-papier);
    --order-card-border: var(--yr-ligne);
    --order-card-selected-border: var(--yr-sceau-600);
    --order-card-selected-bg: var(--yr-blanc);
    --order-separator: var(--yr-ligne);
    --order-shadow-color: transparent;
    --order-shadow-color-strong: transparent;
    --order-turquoise-tint: var(--yr-valide-bg);
    --order-turquoise-tint-soft: var(--yr-papier);
    --order-input-locked-bg: var(--yr-papier);
    --order-input-readonly-bg: var(--yr-papier);
    --order-notice-info-bg: var(--yr-info-bg);
    --order-notice-warning-bg: var(--yr-afaire-bg);
    --order-notice-warning-border: var(--yr-ambre);
    --order-notice-warning-text: var(--yr-afaire-text);
    --order-siren-notice-bg: var(--yr-afaire-bg);
    --order-siren-notice-text: var(--yr-afaire-text);
    --order-acknowledgement-accent: var(--yr-ambre);
    --order-acknowledgement-accent-soft: var(--yr-afaire-bg);
    --order-acknowledgement-ink: var(--yr-afaire-text);
    --order-acknowledgement-yours-bg: var(--yr-blanc);
    --order-payment-success-bg: var(--yr-valide-bg);
    --order-payment-success-border: var(--yr-sceau-clair);
    --order-payment-success-text: var(--yr-sceau-700);
    --order-tracking-done-bg: var(--yr-valide-bg);
    --order-tracking-pending-bg: var(--yr-papier);
    --order-tracking-waiting-border: var(--yr-ligne);

    --dash-bg: var(--yr-papier);
    --dash-primary-dark: var(--yr-encre-900);
    --dash-primary: var(--yr-sceau-600);
    --dash-primary-light: var(--yr-sceau-clair);
    --dash-primary-tint: var(--yr-papier);
    --dash-primary-tint-soft: var(--yr-papier);
    --dash-primary-wash: var(--yr-papier);
    --dash-secondary: var(--yr-sceau-600);
    --dash-secondary-dark: var(--yr-sceau-700);
    --dash-secondary-bg: var(--yr-valide-bg);
    --dash-warning: var(--yr-ambre);
    --dash-warning-bg: var(--yr-afaire-bg);
    --dash-text: var(--yr-encre-900);
    --dash-muted: var(--yr-encre-500);
    --dash-border: var(--yr-ligne);
    --dash-gray: var(--yr-encre-500);
    --dash-shadow-xs: transparent;
    --dash-shadow-sm: transparent;
    --dash-shadow-md: transparent;
    --dash-shadow-lg: transparent;
    --dash-ring: rgba(15, 107, 93, .2);
    --dash-ring-strong: rgba(15, 107, 93, .3);
    --dash-input-readonly-bg: var(--yr-papier);
    --dash-input-locked-bg: var(--yr-papier);
    --dash-input-locked-border: var(--yr-encre-200);
    --dash-success: var(--yr-sceau-600);
    --dash-success-text: var(--yr-sceau-700);
    --dash-success-ink: var(--yr-sceau-700);
    --dash-success-bg: var(--yr-valide-bg);
    --dash-success-border: var(--yr-sceau-clair);
}

/* Le dashboard et l'authentification posent leur police en dur dans la page.
   Le tunnel et le dossier (.order-body) restent identiques a la production :
   aucune police ni feuille de la marque. */
html body:not(.order-body) {
    font-family: var(--yr-font);
}

/* Boutons desactives des vues communes (tunnel, dossier) : leur libelle blanc
   disparaissait sur le vert pale que prend ici --color-primary-100. Couleurs
   seules, la forme reste celle de la production. */
html:root .btn-blue:disabled,
html:root .btn-blue.disabled {
    background-color: var(--yr-encre-200);
    color: var(--yr-encre-700);
    opacity: 1;
}

html:root .btn-blue-outline:disabled,
html:root .btn-blue-outline.disabled {
    border-color: var(--yr-encre-200);
    color: var(--yr-encre-500);
}
