/* QaLyZa — jetons de marque communs aux trois sites vitrines.
   Valeurs reprises des variables CSS des applications (eQMS, LIMS, MES, EMS, AMS),
   plus le rouge demandé pour le site vitrine.
   Ce fichier est SYNCHRONISÉ dans chaque site (assets/commun/) : ne pas le modifier dans un site. */

/* Polices hébergées localement (fichiers variables, sous-ensembles latin et latin étendu) :
   aucune requête vers un service tiers. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/inter-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: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-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;
}
/* Symboles absents des sous-ensembles latins : flèches (→ ↔ ↵), opérateurs (≠ ≥ ≤ ± ×), trait d'union
   insécable, coches, touches (⌘ ⇧ ⌫). Déclarés en dernier : ils priment pour ces seuls caractères. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/inter-symboles.woff2') format('woff2');
  unicode-range: U+3D, U+B1, U+B7, U+D7, U+F7, U+338, U+2011, U+2013-2014, U+2022, U+2026, U+2190-2194, U+219A-219B, U+21AE, U+21B5, U+21C4, U+21E7, U+2212, U+2260, U+2264-2265, U+2270-2271, U+2318, U+232B, U+2713, U+2717;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-symboles.woff2') format('woff2');
  unicode-range: U+3D, U+B1, U+B7, U+D7, U+F7, U+338, U+2011, U+2013-2014, U+2022, U+2026, U+2190-2194, U+219A-219B, U+21AE, U+21B5, U+21C4, U+21E7, U+2212, U+2260, U+2264-2265, U+2270-2271, U+2318, U+232B, U+2713, U+2717;
}

:root {
  /* Verts de la marque, du plus sombre au plus clair */
  --q-night:  #070f0c;  /* fond sombre des applications */
  --q-panel:  #0d1a14;  /* panneaux en thème sombre */
  --q-input:  #132922;
  --q-hover:  #1a3a2e;
  --q-deep:   #0d3d2c;  /* vert bouteille : fond des icônes d'application */
  --q-forest: #246b49;
  --q-green:  #2f8f63;  /* couleur primaire */
  --q-leaf:   #4ba876;  /* primaire claire en thème clair */
  --q-mint:   #57c08a;  /* primaire claire en thème sombre */

  /* Thème clair */
  --q-paper:   #f9faf8;
  --q-paper-2: #f3f6f5;
  --q-paper-3: #e8f1ed;
  --q-white:   #ffffff;
  --q-ink:       #0a1614;  /* texte en thème clair */
  --q-ink-muted: #5a7169;
  --q-mist:      #93a39a;  /* texte secondaire en thème sombre */

  /* Accents assourdis de la charte */
  --q-gold:     #c9a456;
  --q-teal:     #3f9188;
  --q-steel:    #5d8aa8;
  --q-rose:     #b06a8a;
  --q-cuivre:   #c27a52;
  --q-brick:    #b0564d;  /* alerte de la charte (OOS, critique) */
  --q-ochre:    #b0832f;
  --q-lavender: #7b6bab;

  /* Rouge QaLyZa — touches seulement (signaux, sceaux, liserés), jamais en aplat ni sur un bouton principal.
     Il signale ce que QaLyZa intercepte : dépassement, excursion, OOS, altération, rejet — et le cachet d'une signature. */
  --q-rouge:         #e5484d;  /* signal : graphismes, lueurs, texte sur fond sombre (contraste 5:1 sur --q-night) */
  --q-rouge-encre:   #b8323c;  /* texte et filets rouges sur fond clair (contraste 5,5:1 sur --q-paper) */
  --q-rouge-profond: #7a1b26;  /* fond de dégradés, ombres colorées */
  --q-vin:           #6b272e;  /* bordure de la charte en thème sombre */
  --q-rouge-lueur:   rgba(229, 72, 77, 0.35);

  /* Lya : seul dégradé saturé admis par la charte */
  --q-lya-a: #7c3aed;
  --q-lya-b: #2f6ced;
  --q-lya-gradient: linear-gradient(135deg, var(--q-lya-a), var(--q-lya-b));

  /* Couleur d'accent par application */
  --app-eqms: var(--q-mint);
  --app-lims: var(--q-teal);
  --app-mes:  var(--q-gold);
  --app-ems:  var(--q-steel);
  --app-ams:  var(--q-rose);
  --app-vms:  var(--q-cuivre);

  /* Polices de la charte : Inter (texte) et JetBrains Mono (chronos, empreintes) */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, 'Fira Mono', monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg, canvas, video { display: block; max-width: 100%; }

/* Chrono d'enregistrement : monospace, jamais en gras (règle de la charte) */
.q-chrono {
  font-family: var(--font-mono);
  font-weight: 400;
  letter-spacing: 0;
  font-variant-ligatures: none;
}

/* Logotype : barre verte + « QaLyZa » + nom de produit en vert (en-tête des applications) */
.q-wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}
.q-wordmark::before {
  content: '';
  width: 0.45em;
  height: 1.1em;
  border-radius: 2px;
  background: var(--q-green);
  flex: none;
}
.q-wordmark .q-product { color: var(--q-green); }

/* Icône d'application issue du sprite (voir brand.js) */
.q-icon {
  width: 40px;
  height: 40px;
  flex: none;
  color: var(--q-mint);   /* trait des icônes (currentColor) */
}

:focus-visible {
  outline: 2px solid var(--q-mint);
  outline-offset: 3px;
  border-radius: 4px;
}

.q-sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
