/*!****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[3].use[1]!./node_modules/next/dist/build/webpack/loaders/next-font-loader/index.js??ruleSet[1].rules[14].oneOf[3].use[2]!./node_modules/next/font/local/target.css?{"path":"app/layout.tsx","import":"","arguments":[{"src":"./fonts/InterVariable.woff2","display":"swap","weight":"100 900","fallback":["system-ui","-apple-system","Segoe UI","Roboto","sans-serif"]}],"variableName":"inter"} ***!
  \****************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
@font-face {
font-family: 'inter';
src: url(/ntia-dev/_next/static/media/0336a89fb4e7fc1d-s.p.woff2) format('woff2');
font-display: swap;
font-weight: 100 900;
}@font-face {font-family: 'inter Fallback';src: local("Arial");ascent-override: 89.79%;descent-override: 22.36%;line-gap-override: 0.00%;size-adjust: 107.89%
}.__className_06a2ae {font-family: 'inter', 'inter Fallback', system-ui, -apple-system, Segoe UI, Roboto, sans-serif
}

/*!************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/tokens.css ***!
  \************************************************************************************************************************************************************************************************************************************************************/
/* Jetons de la charte — refonte UI, Lot 1 (`docs/LLD-refonte-ui.md` §3,
   `docs/ntia-refonte-ui/01-design-system.md`). Extraits de `globals.css` (qui touchait les
   400 lignes) : UNE source pour toutes les couleurs, rayons et ombres.

   La couleur ne sert qu'à SIGNALER UN ÉTAT (retard, attention, info, fait, donnée
   manquante) ; le reste est neutre, avec un bleu de marque pour les actions. Un état n'est
   jamais porté par la couleur seule : icône et texte l'accompagnent toujours.

   Thème CLAIR uniquement (décision de la refonte) : `color-scheme: light` empêche le
   navigateur de peindre en sombre les champs et les barres de défilement quand le système
   est en thème sombre. */

:root {
  color-scheme: light;

  /* ── Noms historiques — valeurs de la maquette ─────────────────────────── */
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f1b2d;
  --text-muted: #5b6679;
  /* Alias : `--muted` était lu sans être déclaré (audit 02/09). Une seule teinte. */
  --muted: var(--text-muted);
  /* La surface « en retrait » (fond d'une case, d'un code) — celle de la page. */
  --surface-muted: var(--bg);
  --border: #e2e7ef;
  --accent: #0369a1;
  --accent-hover: #075985;
  --danger: #b91c1c;
  --danger-bg: #fef2f2;
  --ok: #047857;

  /* Les TROIS crans d'une échéance (Tony, 26/09 : conservés, palette de la maquette) :
     Bientôt ambre · Urgent rouge (--danger) · Dépassé ROUGE FONCÉ PLEIN. Deux rouges
     proches ne se distinguent pas à la teinte (règle a11y) : le cran « Dépassé » se lit
     aussi par son FOND plein et toujours par son texte (« J+37 · en retard… »).
     Contrastes MESURÉS (WCAG) : --warn 6,84:1 sur --warn-bg ; --danger 5,91:1 sur
     --danger-bg ; --over 8,2:1 sur --over-bg, et blanc sur --over 10,02:1 quand il sert de
     fond plein. */
  --warn: #92400e;
  --warn-bg: #fffbeb;
  --over: #7f1d1d;
  --over-bg: #fee2e2;

  /* Rôles : encore colorés sur les écrans pas encore refondus. La refonte les passe en
     GRIS au fil des lots (la couleur est réservée à l'état) — `.role-chip`, ui.css. */
  --role-system: #0e7490;
  --role-system-bg: #cffafe;
  --role-director: #15803d;
  --role-director-bg: #dcfce7;
  --role-cdt: #1e3a8a;
  --role-cdt-bg: #dbeafe;
  --role-referent: #b45309;
  --role-referent-bg: #fef3c7;

  /* ── Jetons de la refonte ──────────────────────────────────────────────── */
  --card: #ffffff;
  --card-2: #f8fafc;
  --border-strong: #cfd6e2;
  /* La maquette donne #8a94a6 : 3,06:1 sur blanc, sous le seuil AA (4,5:1) d'un texte
     — et il porte des numéros d'étape et le texte des gestes faits. Foncé à 4,83:1. */
  --faint: #6b7280;
  --brand: var(--accent);
  --brand-hover: var(--accent-hover);
  --brand-soft: #e0effe;

  /* États : fond · texte · bordure · plein. */
  --red-bg: #fef2f2;
  --red-fg: #b91c1c;
  --red-bd: #fecaca;
  --red-solid: #dc2626;
  --amber-bg: #fffbeb;
  --amber-fg: #92400e;
  --amber-bd: #fde68a;
  --amber-solid: #d97706;
  --blue-bg: #eff6ff;
  --blue-fg: #1d4ed8;
  --blue-bd: #bfdbfe;
  --blue-solid: #2563eb;
  --green-bg: #ecfdf5;
  --green-fg: #047857;
  --green-bd: #a7f3d0;
  /* Fond du bouton « Marquer faite » / « Cocher ce geste ». La maquette donne #059669 :
     blanc dessus = 3,77:1, sous AA pour un texte de 13-15 px. Le vert FONCÉ tient 5,48:1. */
  --green-solid: #047857;
  --slate-bg: #f1f5f9;
  --slate-fg: #475569;
  --slate-bd: #e2e8f0;
  /* Ce que fait l'APPLICATION (« ⚙ par l'application ») — jamais le mot interdit (D70). */
  --cyan-bg: #ecfeff;
  --cyan-fg: #0e7490;
  --cyan-bd: #a5f3fc;
  /* Donnée manquante. */
  --purple-bg: #faf5ff;
  --purple-fg: #6b21a8;
  --purple-bd: #e9d5ff;

  --radius-card: 12px;
  --radius-btn: 8px;
  --radius-alert: 10px;
  --shadow-card: 0 1px 2px rgba(15, 27, 45, 0.05), 0 1px 3px rgba(15, 27, 45, 0.04);
}

/*!************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/badges.css ***!
  \************************************************************************************************************************************************************************************************************************************************************/
/* globals.css — badges, rôles et texte atténué (partie extraite le 02/09, garde de
   taille étendue aux CSS). Importée par globals.css et HISSÉE en tête du module,
   comme tout @import — ces règles précèdent donc celles de globals.css dans la
   cascade, pas la place qu'elles y occupaient avant l'extraction (relecture du
   02/09 : à spécificité égale, une règle de globals.css l'emporte sur celle d'ici).
   Ne pas l'importer directement (§15). */

/* ── Badges & légende ──────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

/* « Actif » / « Désactivé » (ActiveBadge) — ici, et non dans admin.css ou
   conducteurs.css, parce que le badge sert aux deux espaces : deux paires de classes
   aux couleurs différentes disaient la même chose (audit 02/09). */
.badge-ok {
  color: var(--ok);
  background: var(--role-director-bg);
}

.badge-off {
  color: var(--danger);
  background: var(--danger-bg);
}

.role-system {
  color: var(--role-system);
  background: var(--role-system-bg);
}

.role-director {
  color: var(--role-director);
  background: var(--role-director-bg);
}

.role-cdt {
  color: var(--role-cdt);
  background: var(--role-cdt-bg);
}

.role-referent {
  color: var(--role-referent);
  background: var(--role-referent-bg);
}

/* Un geste que DEUX rôles peuvent cocher (D74 : « référent ou conducteur ») : un badge
   neutre, parce que la couleur de l'un mentirait sur l'autre. Le texte nomme les deux. */
.role-partage {
  color: var(--over);
  background: var(--over-bg);
}

/* Chapeaux NTIA (sélecteur de rôle, bandeau, liste des comptes) : le sélecteur
   génère `role-${role}` pour TOUT rôle, et les trois niveaux staff n'avaient aucune
   règle (audit 02/09) — badge sans couleur. Une seule teinte pour les trois : la
   hiérarchie staff ne regarde pas le client, elle n'a pas à se voir ici. */
.role-operator,
.role-admin,
.role-super_admin {
  color: var(--accent);
  background: #e3edf6;
}

.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
}

.muted {
  color: var(--text-muted);
}


/*!*************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/globals.css ***!
  \*************************************************************************************************************************************************************************************************************************************************************/
/* Charte NTIA — langage métier, mobile-first (§6-B).
   La COULEUR dit QUI agit (héritée du fichier Excel de l'assistante, §3) :
   système (ex-colonne ASS) cyan · directeur vert · CDT bleu foncé · référent
   ambre. L'état dit l'urgence : échéance dépassée = rouge (fail-visible).
   Styles propres à la check-list : app/(client)/checklist/checklist.css. */

/* Badges, rôles et texte atténué — extraits le 02/09 (garde de taille étendue aux
   CSS). L'@import se pose ICI, avant toute règle : le CSS l'exige, et le css-loader
   de webpack hisse de toute façon tout @import en tête du module (mesuré à la relecture
   du 02/09 — posé ligne 281, `.badge` compilait quand même ligne 10, `:root` ligne 83).
   La cascade réelle est donc : badges.css d'abord, cette feuille ensuite. Garde :
   lib/css-imports.guard.test.ts. */

* {
  box-sizing: border-box;
}

/* Focus clavier VISIBLE partout (refonte UI, critère du Lot 1) : un contour de marque,
   décalé. `:focus-visible` et non `:focus` : la souris ne dessine pas de contour. */
/* `hidden` CACHE, toujours : sans `!important`, n'importe quelle règle `display` d'une
   classe (grid, flex) l'emporte sur la feuille du navigateur, et un élément « caché »
   reste affiché — le chevron de la fiche chantier ne repliait rien (26/09). */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* Pas d'animation de rotation ni de dépliage pour qui les a désactivées. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.5;
}

/* Conteneur des pages de l'espace CLIENT et de l'espace CONDUCTEUR (l'admin ne
   l'utilise pas : son contenu emplit `.admin-main`, à côté de la barre latérale).

   PLEINE LARGEUR depuis le 07/09 (Tony : « il faut que la partie client prenne la
   largeur de l'écran, comme la partie admin »). Il avait été élargi de 760 à 1180 px
   le 11/08 ; à 1180 il restait centré, avec un tiers d'un écran de bureau vide de
   chaque côté pendant que l'admin, lui, allait jusqu'au bord. Plus de plafond, plus de
   centrage : la même respiration que `.admin-main` (24 px 28 px au-delà de 900 px).
   Garde de source : `page-largeur.guard.test.ts`.

   ⚠️ Emplir l'écran n'autorise pas des lignes de texte de 1 900 px : au-delà de
   ~75 caractères, l'œil perd la ligne suivante. Les blocs de PROSE se bornent donc
   eux-mêmes en `ch` (voir `.fiche-prose`, `.aide`, `.ppsps-intro`) — le conteneur
   porte la mise en page, pas la lisibilité. */
.page {
  width: 100%;
  box-sizing: border-box;
  padding: 16px;
}

@media (min-width: 900px) {
  .page {
    padding: 24px 28px;
  }
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.page-header h1 {
  font-size: 1.35rem;
  margin: 0;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
}

/* ── Connexion ─────────────────────────────────────────────────────────── */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h1 {
  font-size: 1.2rem;
  margin: 0 0 4px;
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

/* ── Formulaires ───────────────────────────────────────────────────────── */

.field {
  display: block;
  margin-bottom: 12px;
}

.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.field input,
.field select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
  color: var(--text);
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

.button:hover {
  background: var(--accent-hover);
}

.button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  font-weight: 500;
}

.button-secondary:hover {
  background: #eef4fa;
  color: var(--accent);
}

/* Le geste DESTRUCTEUR, une fois confirmé : il ne partage pas la couleur des autres
   boutons, un pouce qui glisse doit le voir venir (B-013). */
.button-danger {
  background: var(--danger);
}

.button-danger:hover {
  background: #991b1b;
}

.form-error {
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  margin: 8px 0;
}

/* Accusé de réception d'un formulaire (pendant de .form-error) : un geste qui a
   porté doit se voir autant qu'un geste qui a échoué — sans lui, l'utilisateur
   ressaisit (§6-B). Même gabarit, couleur « ok » de la charte. */
.form-success {
  color: var(--ok);
  background: var(--role-director-bg);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9rem;
  margin: 8px 0;
}

/* Explication du bouton grisé, rendue par le SERVEUR et retirée à l'hydratation.
   Discrète — ce n'est pas une erreur, c'est un état d'attente — mais lisible : elle
   est le seul indice disponible quand le JS n'arrive jamais (incident 2026-08-16). */
.login-attente {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  margin: 8px 0 0;
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Une table large défile DANS son conteneur, jamais le body (B-015 : les tables
   d'appariement DICT, avec un courriel et un <select> de noms de fichiers par ligne,
   faisaient défiler la page entière sur un téléphone). */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Pastilles « valeur + retrait » — partagées par l'espace CLIENT (chantiers d'un
   conducteur) et l'espace ADMIN (mes chapeaux clients). Ici et pas dans une feuille
   d'espace : les deux en ont besoin, et une seconde définition finirait par diverger. */
.chips {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 10px 0;
  /* Portée aussi par des <ul> (mes chapeaux) : sans ça, puces et retrait par défaut. */
  list-style: none;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px 2px 10px;
  font-size: 0.85rem;
}

.chip-remove {
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.chip-remove:hover:not(:disabled) {
  color: var(--danger);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 0 12px;
  gap: 0 12px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

/* ── Badges & légende : `badges.css`, importée en tête de cette feuille ────── */

/* Bouton d'action SECONDAIRE rendu comme un lien : il déclenche une recherche, pas une
   soumission. Le styler en bouton plein le mettrait au même rang que « Créer », alors
   qu'il est facultatif. */
.lien-discret {
  align-self: flex-start;
  background: none;
  border: none;
  padding: 0;
  margin: 4px 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--accent, var(--text-muted));
  text-decoration: underline;
  cursor: pointer;
}

.lien-discret:disabled {
  color: var(--text-muted);
  text-decoration: none;
  cursor: default;
}

/* ── Lien d'accès conducteur (affiché UNE fois — espaces client ET admin) ── */

.link-reveal {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
}

.link-reveal-row {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}

.link-reveal-row input {
  flex: 1 1;
  min-width: 0;
  font-size: 0.85rem;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: inherit;
}

/* Mot de passe initial du conducteur (D-MR6), révélé une seule fois à côté du lien.
   `user-select: all` + police à chasse fixe : il sera recopié à la main sur un
   téléphone — un « l » pris pour un « 1 » coûte un appel au support. */
.link-reveal-password {
  font-size: 0.85rem;
  margin: 8px 0 0;
}

.link-reveal-password code {
  -webkit-user-select: all;
     -moz-user-select: all;
          user-select: all;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.95rem;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--surface-muted);
}

.link-reveal-warning {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 4px 0 0;
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-grid .span-2 {
    grid-column: span 1;
  }
}

/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/checklist.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/* Styles propres à la CHECK-LIST, hors de `globals.css`.
 *
 * Pourquoi un fichier séparé : `globals.css` touchait les 400 lignes de §15, et la
 * règle suivante l'aurait fait basculer — le garde `test_file_sizes.py` l'a arrêtée
 * le 05/09. Plutôt que de raboter des commentaires pour gagner deux lignes (ce qui
 * ne fait que déplacer l'échéance), les styles de l'écran le plus vivant du produit
 * vivent ici, avec la place d'y grandir.
 */

/* La CONDITION d'une tâche : ce qu'elle attend pour se déclencher (D67 obligation 3).
   Ton d'ATTENTE, jamais d'erreur — rien n'est en panne, il manque une entrée. */
.step-condition {
  margin: 0.35rem 0 0;
  /* UNE ligne depuis le 06/09 (D72) : le résumé (≤ 90 caractères) vient du serveur,
     le texte long est derrière ⓘ. Bordure gauche, pas de fond : un repère, pas un pavé. */
  padding: 0.15rem 0.65rem;
  border-left: 3px solid var(--accent, #2f6f9f);
  border-radius: 0 4px 4px 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-muted, #4a5568);
}

/* Qui a fait quoi sur les pièces (D79) — partagé par l'admin et la carte chantier. */
.document-operations {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.document-operations th,
.document-operations td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid #e3e6ea;
  text-align: left;
  vertical-align: top;
}
.document-operations tr.op-refused td,
.document-operations tr.op-failed td {
  background: #fff6e5;
}

/*!********************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/ui.css ***!
  \********************************************************************************************************************************************************************************************************************************************************/
/* Composants de base de la refonte UI — Lot 1 (`docs/LLD-refonte-ui.md`,
   `docs/ntia-refonte-ui/01-design-system.md` et `03-composants.md`). Les couleurs viennent
   TOUTES de `tokens.css` : aucune teinte n'est écrite ici. */

/* ── Pastilles ─────────────────────────────────────────────────────────── */

.ui-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.ui-chip-red {
  background: var(--red-bg);
  color: var(--red-fg);
  border-color: var(--red-bd);
}

/* Le cran « Dépassé » : PLEIN, pour se distinguer de « Urgent » autrement que par la
   teinte (deux rouges proches ne se lisent pas l'un contre l'autre). */
.ui-chip-over {
  background: var(--over);
  color: #ffffff;
  border-color: var(--over);
}

.ui-chip-amber {
  background: var(--amber-bg);
  color: var(--amber-fg);
  border-color: var(--amber-bd);
}

.ui-chip-blue {
  background: var(--blue-bg);
  color: var(--blue-fg);
  border-color: var(--blue-bd);
}

.ui-chip-green {
  background: var(--green-bg);
  color: var(--green-fg);
  border-color: var(--green-bd);
}

.ui-chip-slate,
.ui-chip-role {
  background: var(--slate-bg);
  color: var(--slate-fg);
  border-color: var(--slate-bd);
}

.ui-chip-cyan {
  background: var(--cyan-bg);
  color: var(--cyan-fg);
  border-color: var(--cyan-bd);
}

.ui-chip-purple {
  background: var(--purple-bg);
  color: var(--purple-fg);
  border-color: var(--purple-bd);
}

.ui-chip-outline {
  background: var(--card);
}

/* ── Barre d'avancement et indicateurs ─────────────────────────────────── */

.ui-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--slate-bg);
  overflow: hidden;
}

.ui-progress-fill {
  height: 100%;
  border-radius: 999px;
}

.ui-progress-brand {
  background: var(--brand);
}

.ui-progress-green {
  background: var(--green-solid);
}

.ui-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: var(--card);
  box-shadow: var(--shadow-card);
  color: var(--text);
  text-align: left;
  font: inherit;
}

.ui-kpi-action {
  cursor: pointer;
  min-height: 44px;
}

.ui-kpi-action:hover {
  background: var(--card-2);
}

.ui-kpi-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.ui-kpi-value {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.ui-kpi-sub {
  font-size: 12px;
  color: var(--muted);
}

.ui-kpi-default .ui-kpi-value {
  color: var(--text);
}

/* Tons TEINTÉS, comme la maquette : le fond dit la famille, le chiffre la dit aussi. */
.ui-kpi-red {
  background: var(--red-bg);
  border-color: var(--red-bd);
}

.ui-kpi-red .ui-kpi-value,
.ui-kpi-red .ui-kpi-label {
  color: var(--red-fg);
}

.ui-kpi-amber {
  background: var(--amber-bg);
  border-color: var(--amber-bd);
}

.ui-kpi-amber .ui-kpi-value,
.ui-kpi-amber .ui-kpi-label {
  color: var(--amber-fg);
}

.ui-kpi-purple {
  background: var(--purple-bg);
  border-color: var(--purple-bd);
}

.ui-kpi-purple .ui-kpi-value,
.ui-kpi-purple .ui-kpi-label {
  color: var(--purple-fg);
}

/* ── Filtres segmentés et interrupteur ─────────────────────────────────── */

.segmented {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--slate-bg);
}

.segmented-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 6px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.segmented-option[aria-pressed="true"] {
  background: var(--card);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

.segmented-count {
  padding: 0 6px;
  border-radius: 999px;
  background: var(--slate-bd);
  font-size: 11px;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  font-size: 13px;
  cursor: pointer;
}

/* Masquée VISUELLEMENT, pas pour le clavier ni le lecteur d'écran. */
.toggle-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.toggle-track {
  position: relative;
  width: 32px;
  height: 18px;
  flex: none;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background 0.15s;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--card);
  transition: transform 0.15s;
}

.toggle-input:checked + .toggle-track {
  background: var(--brand);
}

.toggle-input:checked + .toggle-track::after {
  transform: translateX(14px);
}

.toggle-input:focus-visible + .toggle-track {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* ── Boutons ajoutés à la gamme existante (`.button`, `.button-secondary`) ── */

.button-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.button-ghost:hover {
  background: var(--slate-bg);
}

/* ── Les boutons DANS les écrans refondus (barre du haut, fiche chantier) ─────
   Taille et graisse de la maquette (13 px / 500, `7px 12px`), jamais soulignés même
   quand ils sont des liens. Portée limitée aux écrans refondus (fiche chantier, « Mes chantiers ») : les autres gardent
   `.button` tel quel jusqu'à leur tour (et les gardes de cible tactile qui le visent). */
.app-header .button,
.fiche-chantier .button,
.accueil .button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid var(--brand);
  border-radius: var(--radius-btn);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.app-header .button:hover,
.fiche-chantier .button:hover,
.accueil .button:hover {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}

.fiche-chantier .button-secondary,
.accueil .button-secondary {
  border-color: var(--border-strong);
  background: var(--card);
  color: var(--text);
}

.fiche-chantier .button-secondary:hover,
.accueil .button-secondary:hover {
  background: var(--card-2);
  border-color: var(--border-strong);
}

.fiche-chantier .button-ghost,
.accueil .button-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.fiche-chantier .button-ghost:hover,
.accueil .button-ghost:hover {
  background: var(--slate-bg);
  border-color: transparent;
}

.fiche-chantier .button-sm,
.accueil .button-sm {
  min-height: 32px;
  padding: 4px 10px;
  font-size: 12.5px;
}

/* Texte pour les lecteurs d'écran seulement (nom accessible complet d'un bouton). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Un bouton qui se LIT comme un lien (« Afficher », « Voir les 11 retards », « Ouvrir les
   intervenants »). Commun à tous les écrans refondus : il ne vivait que dans les feuilles
   de la fiche, et la Vue directeur le rendait en bouton brut du navigateur (Lot 7).
   24 px de haut au moins (WCAG 2.2, 2.5.8). */
.link-button {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}


/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/ui-header.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/* La barre du haut commune (`components/ui/app-header.tsx`) — refonte UI, Lot 1.
   Blanche, bordure basse, collée en haut au défilement. */

.app-header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card);
}

.app-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-header-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-btn);
  background: var(--brand);
  color: #ffffff;
}

.app-header-eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.app-header-title {
  display: block;
  font-size: 15px;
  font-weight: 700;
}

.app-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.app-header-role {
  font-size: 13px;
  color: var(--muted);
}

.app-header-tenant {
  color: var(--muted);
}

.app-header-menu {
  position: relative;
}

.app-header-menu > summary {
  list-style: none;
  cursor: pointer;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.app-header-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 13px;
  font-weight: 700;
}

.app-header-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  display: flex;
  flex-direction: column;
  min-width: 200px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.app-header-menu-panel > a,
.app-header-logout {
  display: block;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.app-header-menu-panel > a:hover,
.app-header-logout:hover {
  background: var(--slate-bg);
}

@media (min-width: 900px) {
  .app-header {
    padding: 10px 28px;
  }
}

/*!***************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./app/ui-drawer.css ***!
  \***************************************************************************************************************************************************************************************************************************************************************/
/* Le TIROIR latéral (`components/ui/drawer.tsx`) — refonte UI, 26/09. À droite, par-dessus
   la page qui reste visible ; plein écran sur téléphone. */

.ui-drawer-racine {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.ui-drawer-voile {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 45, 0.28);
}

.ui-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(560px, 100vw);
  background: var(--card);
  box-shadow: -8px 0 24px rgba(15, 27, 45, 0.12);
  outline: none;
}

.ui-drawer-tete {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 14px;
  border-bottom: 1px solid var(--border);
}

.ui-drawer-titre {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.ui-drawer-sous {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.ui-drawer-fermer {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-btn);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ui-drawer-fermer:hover {
  background: var(--slate-bg);
}

.ui-drawer-corps {
  display: grid;
  grid-gap: 14px;
  gap: 14px;
  align-content: start;
  flex: 1 1;
  overflow-y: auto;
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom));
}

