/* ACCES IA Space : la palette nuit d'acces-ia-site-web, plus l'ambre des alertes (planche de
   la phase 5, validee le 2026-11-02). Les polices sont servies d'ici : aucune requete vers un
   tiers depuis l'espace d'un cabinet. */

@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(polices/playfair-display-400-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: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(polices/playfair-display-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }
@font-face { font-family: "Work Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(polices/work-sans-400-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: "Work Sans"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(polices/work-sans-400-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+A720-A7FF; }

:root {
  --fond: #0D1117; --surface: #161B22; --alt: #111821; --trait: #2A3443;
  --bleu: #0EA5E9; --bleu-clair: #38BDF8; --bleu-pale: #7DD3FC; --bleu-nuit: #075985; --bleu-bord: #0B4A6B;
  --vert: #86EFAC; --vert-bord: #1F5135; --ambre: #FBBF24; --ambre-bord: #5C4512;
  --texte: #FFFFFF; --doux: #9FB0C3;
  /* La gravite (planche du 2026-11-10, direction vivante) : rouge, ce qui bloque ; ambre, ce qui
     est a faire ; vert, a jour ; bleu, en cours ; gris, rien de lance. Des aplats teintes, et une
     icone qui double toujours la couleur. */
  --rouge: #FCA5A5; --rouge-bord: #7F1D1D; --rouge-fond: rgba(248, 113, 113, .12);
  --ambre-fond: rgba(251, 191, 36, .11); --vert-fond: rgba(134, 239, 172, .10); --bleu-fond: rgba(56, 189, 248, .12);
  --gris-icone: #7A8BA0;
  --titre: "Playfair Display", Georgia, serif;
  --corps: "Work Sans", -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--fond); }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--corps); font-size: 15px; line-height: 1.5; }
a { color: var(--bleu-clair); text-decoration: none; }
a:hover { color: var(--bleu-pale); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 2px solid var(--bleu-clair); outline-offset: 2px; }
h1, h2 { font-family: var(--titre); margin: 0; }
h1 { font-size: 30px; line-height: 1.2; }
h2 { font-size: 22px; }
h3, h4, h5 { margin: 0; }
p { margin: 0; }
code { font-size: 13px; color: var(--bleu-pale); }
[hidden] { display: none !important; }
.visuel-masque { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Le cadre */
.cadre { min-height: 100vh; display: flex; }
.barre { flex: 0 0 248px; max-width: 100%; background: var(--alt); border-right: 1px solid var(--trait); padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; }
.marque-produit { font-family: var(--titre); font-size: 20px; font-weight: 700; padding: 0 12px; color: var(--texte); }
.cabinet { display: flex; gap: 10px; align-items: center; padding: 0 12px; font-size: 13px; line-height: 1.3; }
/* Le logo du cabinet sur une tuile claire, ses initiales sur une tuile pleine (plus de carre vide). */
.logo-tuile { width: 36px; height: 36px; border-radius: 8px; flex: none; background: #FFFFFF; padding: 3px; display: inline-flex; align-items: center; justify-content: center; }
.logo-tuile .logo { width: 100%; height: 100%; object-fit: contain; }
.logo-initiales { width: 36px; height: 36px; border-radius: 8px; flex: none; background: var(--bleu-nuit); color: var(--texte); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.logo-tuile.petit, .logo-initiales.petit { width: 32px; height: 32px; font-size: 12px; }
.cabinet .palier { color: var(--doux); }
.ic { width: 18px; height: 18px; flex: none; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .reglages > summary { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; color: var(--doux); font-size: 14px; min-height: 40px; }
.nav a[aria-current="page"] { background: var(--bleu-fond); color: var(--texte); box-shadow: inset 3px 0 0 var(--bleu); }
.nav a[aria-current="page"] .ic, .reglages > summary.actif .ic { color: var(--bleu-clair); }
.nav a:hover, .reglages > summary:hover { color: var(--texte); }
.reglages > summary { cursor: pointer; list-style: none; white-space: nowrap; }
.reglages > summary::-webkit-details-marker { display: none; }
.reglages > summary.actif { color: var(--texte); }
.reglages > summary .chevron { margin-left: auto; width: 16px; height: 16px; transition: transform .2s; }
.reglages[open] > summary .chevron { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .reglages > summary .chevron { transition: none; } }
.sous-nav { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 0 12px; padding-left: 10px; border-left: 1px solid var(--trait); }
.sous-nav a { font-size: 13px; min-height: 36px; padding: 8px 10px; }
.sous-nav a .ic { width: 16px; height: 16px; }
.evitement { position: absolute; left: 12px; top: -60px; z-index: 30; background: var(--bleu); color: var(--fond); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.evitement:focus { top: 12px; color: var(--fond); }
.barre .pied { margin: auto 12px 0; font-size: 12px; line-height: 1.5; color: var(--doux); }
.principal { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; }
.entete { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 14px 32px; border-bottom: 1px solid var(--trait); }
.entete form { display: flex; gap: 8px; align-items: center; }
.jauges { display: flex; gap: 24px; flex-wrap: wrap; align-items: center; }
.jauge { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--doux); }
.barre-jauge { height: 6px; border-radius: 3px; background: var(--trait); overflow: hidden; width: 120px; }
.barre-jauge.grande { height: 12px; border-radius: 6px; width: 100%; }
.barre-jauge span { display: block; height: 100%; background: var(--bleu); }
.moi { display: flex; gap: 10px; align-items: center; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--bleu-nuit); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; color: var(--texte); }
.contenu { padding: 32px; display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 1240px; }
.fil-ariane { font-size: 13px; color: var(--doux); }

/* Les briques */
.puce { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; border: 1px solid var(--trait); color: var(--doux); white-space: nowrap; }
.puce .ic { width: 14px; height: 14px; margin-left: -2px; }
.puce.bloque { color: var(--rouge); border-color: var(--rouge-bord); background: var(--rouge-fond); }
.puce.ok { color: var(--vert); border-color: var(--vert-bord); background: var(--vert-fond); }
.puce.alerte { color: var(--ambre); border-color: var(--ambre-bord); background: var(--ambre-fond); }
.puce.info { color: var(--bleu-pale); border-color: var(--bleu-bord); background: var(--bleu-fond); }
.puce.a-venir { border-style: dashed; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.etiquette { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--doux); font-weight: 500; }
.doux { color: var(--doux); }
.petit { font-size: 13px; }
.tres-petit { font-size: 12px; }
.alerte-texte { color: var(--ambre); }
.ok-texte { color: var(--vert); }
.bouton { font: inherit; font-size: 14px; font-weight: 500; padding: 10px 16px; border-radius: 8px; border: 1px solid var(--trait); background: var(--surface); color: var(--texte); min-height: 44px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bouton:hover { border-color: var(--bleu-bord); color: var(--texte); }
.bouton.principal-action { background: var(--bleu); border-color: var(--bleu); color: var(--fond); }
.bouton.principal-action:hover { background: var(--bleu-clair); }
.bouton:disabled { opacity: .5; cursor: not-allowed; }
.bouton.lien { background: none; border: none; color: var(--bleu-clair); padding: 0; min-height: 24px; }
.bouton.discret { background: none; color: var(--doux); }
.bouton.effacer { border-color: #7F1D1D; color: #FCA5A5; }
.bouton.effacer:hover { background: #2A0E0E; border-color: #B91C1C; color: #FECACA; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions.entre { justify-content: space-between; }
.pile { display: flex; flex-direction: column; gap: 14px; }
.carte { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 20px 24px; display: flex; flex-direction: column; gap: 12px; }
.carte.alerte { border-color: var(--ambre-bord); }
.carte.info { border-color: var(--bleu-bord); }
.carte.creuse { background: var(--fond); }
.carte-tete { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.carte-tete strong { font-size: 16px; }
.bandeau { background: var(--surface); border: 1px solid var(--ambre-bord); border-radius: 12px; padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.bandeau > :first-child { flex: 1 1 420px; }
.bandeau.info { border-color: var(--bleu-bord); }
.bandeau.ok { border-color: var(--vert-bord); }
.colonnes { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.colonnes > .large { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.colonnes > .etroite { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.colonnes > .moitie { flex: 1 1 360px; min-width: 0; }
.trois-colonnes { display: grid; grid-template-columns: 240px minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
.trois-colonnes > * { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1180px) { .trois-colonnes { grid-template-columns: minmax(0, 1fr); } }
.donnee { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.donnee:first-child { border-top: none; }
.donnee .valeur { font-weight: 600; white-space: nowrap; text-align: right; }
.montant { white-space: nowrap; }
.donnee .source { grid-column: 1 / -1; font-size: 12px; }
.valeur-forte { font-family: var(--titre); font-size: 26px; font-weight: 700; }
.texte-livrable hr { border: none; border-top: 1px solid var(--trait); width: 100%; margin: 4px 0; }
details.reponse-longue > summary { list-style: none; cursor: pointer; }
details.reponse-longue > summary::-webkit-details-marker { display: none; }
details.reponse-longue[open] .apercu { display: none; }
details.reponse-longue .deplier { display: inline-block; margin-top: 8px; color: var(--bleu-clair); font-size: 14px; }
details.reponse-longue[open] .deplier { display: none; }
.grille-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.liste { display: flex; flex-direction: column; }
.ligne { display: grid; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--trait); font-size: 14px; }
.ligne:first-child { border-top: none; }
.ligne.entetes { color: var(--doux); font-size: 12px; }
.l-affaires { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 2fr); }
.l-2 { grid-template-columns: minmax(0, 1fr) auto; }
.l-3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; }
.l-echeance { grid-template-columns: 110px minmax(0, 1fr); }
.l-acces { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); }
.cite { color: var(--bleu-pale); font-size: 13px; }
.non-sourcee, .marque-alerte { color: var(--ambre); font-size: 12px; border: 1px dashed var(--ambre-bord); border-radius: 4px; padding: 1px 6px; white-space: nowrap; }
.mention-ia { font-size: 12px; color: var(--doux); border-top: 1px solid var(--trait); padding-top: 10px; }

/* Les onglets d'une affaire */
.onglets { display: flex; gap: 24px; border-bottom: 1px solid var(--trait); flex-wrap: wrap; }
.onglets a { padding: 12px 4px; font-size: 14px; color: var(--doux); border-bottom: 2px solid transparent; }
.onglets a[aria-current="page"] { color: var(--texte); border-bottom-color: var(--bleu); }
.tete-affaire { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Les formulaires */
.champ { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--doux); }
.champ input, .champ select, .champ textarea { font: inherit; font-size: 15px; color: var(--texte); background: var(--fond); border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; min-height: 44px; width: 100%; }
.champ textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
/* Un groupe de cases a cocher dans une grille de champs : toute la largeur (le planning, lot 8). */
.champs > fieldset.groupe-choix { grid-column: 1 / -1; }
.erreur { color: #FCA5A5; font-size: 14px; }
.choix { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--trait); border-radius: 10px; cursor: pointer; font-size: 14px; }
.choix:has(input:checked) { border-color: var(--bleu); background: rgba(14, 165, 233, .08); }
.choix input { margin-top: 3px; accent-color: var(--bleu); }

/* Le texte d'un livrable ou d'une reponse */
.texte-livrable { font-size: 15px; line-height: 1.65; display: flex; flex-direction: column; gap: 10px; overflow-wrap: anywhere; overflow-x: auto; }
.texte-livrable h2 { font-size: 20px; margin-top: 8px; }
.texte-livrable h3 { font-size: 17px; margin-top: 8px; }
.texte-livrable h4, .texte-livrable h5 { font-size: 15px; }
.texte-livrable ul, .texte-livrable ol { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
/* Le cadre des libelles masques (position absolue) : sans lui, ils sortent du defilement et elargissent
   la page sur un telephone (ecran des droits, 2026-11-08). */
.tableau-defile { overflow-x: auto; position: relative; }
.texte-livrable table { border-collapse: collapse; font-size: 14px; min-width: 100%; }
/* Dans un tableau, un mot ne se coupe qu'a defaut : « anywhere » faisait tomber la largeur des
   colonnes a une lettre (« loge men t », un montant coupe en deux). */
.texte-livrable th, .texte-livrable td { border: 1px solid var(--trait); padding: 6px 10px; text-align: left; vertical-align: top; overflow-wrap: break-word; }
.texte-livrable th { color: var(--doux); font-weight: 500; }

/* Un registre a l'ecran : bordereau de diffusion, coffre-fort */
.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
.tableau th, .tableau td { border-bottom: 1px solid var(--trait); padding: 10px 12px; text-align: left; vertical-align: top; }
.tableau th { color: var(--doux); font-weight: 500; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.tableau td form { margin: 0; }
@media (max-width: 720px) { .tableau { display: block; overflow-x: auto; } }

/* La conversation */
.fil { display: flex; flex-direction: column; gap: 20px; }
.message { display: flex; flex-direction: column; gap: 8px; max-width: 860px; }
.message.personne { align-self: flex-end; background: var(--bleu-nuit); border-radius: 12px 12px 4px 12px; padding: 14px 18px; max-width: 640px; }
.message.personne .qui { color: #BAE6FD; }
.message.role { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 18px 20px; }
.message .qui { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--doux); flex-wrap: wrap; }
.mention { color: #E0F2FE; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.aiguillage { font-size: 13px; color: var(--doux); display: flex; align-items: center; gap: 8px; }
.pastille { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; background: #0B2A3D; color: var(--bleu-pale); flex: none; }
.pastille.noam { background: var(--bleu-nuit); color: var(--texte); }
.saisie { background: var(--surface); border: 1px solid var(--trait); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; position: relative; }
.saisie textarea { font: inherit; font-size: 15px; color: var(--texte); background: transparent; border: none; resize: vertical; min-height: 72px; width: 100%; }
.saisie textarea:focus { outline: none; }
.saisie:focus-within { border-color: var(--bleu-bord); }
.suggestions { position: absolute; bottom: 100%; left: 12px; margin-bottom: 6px; background: var(--alt); border: 1px solid var(--trait); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; min-width: 300px; z-index: 5; }
.suggestions[hidden] { display: none; }
.suggestions button { font: inherit; font-size: 14px; text-align: left; background: none; border: none; color: var(--texte); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.suggestions button[aria-selected="true"], .suggestions button:hover { background: var(--surface); }
.en-cours { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--doux); }
.en-cours::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--bleu); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .en-cours::before { animation: none; } }

/* Les roles */
.role-carte .tete { display: flex; gap: 12px; align-items: center; }
.role-carte .pastille { width: 44px; height: 44px; font-size: 14px; }
.role-carte .nom { font-size: 17px; font-weight: 600; }
.role-carte .fonction { font-size: 13px; color: var(--doux); }
.role-carte.inactif { opacity: .55; }

/* La fiche du cabinet guidee */
.etapes { display: flex; flex-direction: column; gap: 4px; }
.etapes a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; color: var(--doux); }
.etapes a[aria-current="step"] { background: var(--surface); color: var(--texte); }
.etapes b { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--trait); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex: none; }
.etapes a.faite b { background: var(--vert-bord); border-color: var(--vert-bord); color: var(--vert); }
.etapes a[aria-current="step"] b { border-color: var(--bleu); color: var(--bleu-clair); }

/* Les metiers */
.metier-carte.annonce { opacity: .7; }
.metier-carte.annonce .nom { color: var(--doux); }

/* La connexion */
.porte { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.porte .carte { width: 100%; max-width: 420px; padding: 32px; gap: 18px; }
.secret { font-family: ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .08em; background: var(--fond); border: 1px solid var(--trait); border-radius: 8px; padding: 10px 12px; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  .barre { display: none; }
  .entete { padding: 10px 16px 12px; gap: 10px; }
  .entete > .jauges { display: none; }
  .contenu { padding: 20px 16px; }
  .l-affaires, .l-acces { grid-template-columns: 1fr; gap: 4px; }
  .ligne.entetes { display: none; }
  .message.personne { max-width: 100%; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
  h1 { font-size: 26px; }
}

/* Signaler un probleme */
.signaler { color: var(--doux); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.signaler:hover { color: var(--texte); }
pre.contexte { margin: 0; max-height: 360px; overflow: auto; padding: 14px; border: 1px solid var(--trait); border-radius: 10px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; color: var(--doux); }
.signalement { padding: 16px 0; border-top: 1px solid var(--trait); display: flex; flex-direction: column; gap: 6px; }
.signalement:first-child { border-top: 0; padding-top: 0; }
.signalement p { margin: 0; white-space: pre-wrap; }
.reponse-acces-ia { margin-top: 6px; padding: 12px 14px; border-left: 3px solid var(--bleu-bord); background: rgba(14, 165, 233, .06); border-radius: 0 10px 10px 0; }
fieldset.groupe-choix { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
fieldset.groupe-choix legend { margin-bottom: 8px; }

/* Le circuit de validation */
.circuit { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; }
.pile { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.formulaire-ligne { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; align-items: end; }
.preuve { margin-top: 6px; }
.preuve summary { cursor: pointer; color: var(--bleu-clair); }
pre.commande { margin: 6px 0; padding: 8px 10px; border: 1px solid var(--trait); border-radius: 8px; white-space: pre-wrap; word-break: break-all; }

/* Les jauges du mois : la part consommee, par dixiemes */
.barre-jauge .n-0 { width: 0%; }
.barre-jauge .n-1 { width: 10%; }
.barre-jauge .n-2 { width: 20%; }
.barre-jauge .n-3 { width: 30%; }
.barre-jauge .n-4 { width: 40%; }
.barre-jauge .n-5 { width: 50%; }
.barre-jauge .n-6 { width: 60%; }
.barre-jauge .n-7 { width: 70%; }
.barre-jauge .n-8 { width: 80%; }
.barre-jauge .n-9 { width: 90%; }
.barre-jauge .n-10 { width: 100%; }
.jauge.alerte { color: var(--ambre); }
.jauge.alerte .barre-jauge span { background: var(--ambre); }
.alerte-solde { border-color: var(--ambre-bord); }

/* Clic'n Work (phase 7) : le depot de pieces, son avancee ; les sources publiques. */
.zone-depot { border: 1px dashed var(--bleu-bord); background: var(--alt); }
.trois-voies { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.voie { border: 1px solid var(--trait); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); cursor: pointer; }
.voie:focus-within { border-color: var(--bleu-bord); }
.voie strong { font-size: 14px; }
.voie input[type="file"] { font: inherit; font-size: 13px; color: var(--doux); max-width: 100%; }
.voie input[type="file"]::file-selector-button { font: inherit; font-size: 14px; font-weight: 500; padding: 8px 14px; margin-right: 10px; border-radius: 8px; border: 1px solid var(--trait); background: var(--alt); color: var(--texte); cursor: pointer; }
.mobile-seul { display: none; }
.avancee { display: flex; flex-direction: column; gap: 8px; }
.l-depot { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; }
.l-depot > :first-child, .l-depot > :nth-child(2) { overflow-wrap: anywhere; }
.l-source { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) minmax(0, 1fr) auto; }
@media (max-width: 640px) { .l-source { grid-template-columns: 1fr; } .l-depot { grid-template-columns: 1fr auto; } .l-depot > :nth-child(2) { display: none; } .mobile-seul { display: block; } }

/* Le memoire en trois temps (lot 4) : le plan a valider, puis la correction d'une section. */
.plan-memoire { display: flex; flex-direction: column; gap: 16px; padding-left: 22px; margin: 4px 0 0; }
.plan-memoire .champ { margin-top: 8px; }
.plan-memoire .champ textarea, .plan-groupe .champ textarea { min-height: 64px; }
fieldset.plan-groupe { border: 1px solid var(--trait); border-radius: 10px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
fieldset.plan-groupe legend { padding: 0 6px; color: var(--texte); }
.plan-groupe select { font: inherit; font-size: 14px; color: var(--texte); background: var(--fond); border: 1px solid var(--trait); border-radius: 8px; padding: 8px 10px; min-height: 40px; }
details.corriger { margin: 2px 0 20px; }
details.corriger > summary { cursor: pointer; color: var(--bleu-clair); font-size: 13px; }
details.corriger > form { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: 10px; background: var(--fond); }
p.corriger { margin: 2px 0 20px; }
.plan-libre { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 10px 12px; }
.plan-libre .entiere { grid-column: 1 / -1; }
.plan-libre + .plan-libre { border-top: 1px solid var(--trait); padding-top: 12px; }
@media (max-width: 640px) { .plan-libre { grid-template-columns: minmax(0, 1fr); } }

/* Le cadre impose de l'acheteur (lot 4) : les zones a choisir, puis le livrable zone par zone. */
.compteur-zones { padding: 10px 12px; border: 1px solid var(--trait); border-radius: 10px; background: var(--fond); }
.compteur-zones strong { color: var(--bleu-pale); }
.zones-cadre, .zones-livrable { list-style: none; padding: 0; margin: 4px 0 0; display: flex; flex-direction: column; gap: 14px; }
.zone-cadre { border: 1px solid var(--trait); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.zone-tete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.zone-libelle { overflow-wrap: anywhere; }
fieldset.choix-zones { border: 0; padding: 0; margin: 4px 0 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choix-zone { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border: 1px solid var(--trait); border-radius: 8px; font-size: 14px; cursor: pointer; }
.choix-zone:has(input:checked) { border-color: var(--bleu); background: rgba(14, 165, 233, .08); }
.choix-zone input { accent-color: var(--bleu); margin: 0; }
.annexe-zone { display: none; flex-basis: 100%; }
.choix-zones:has(input[value="annexe"]:checked) .annexe-zone { display: flex; }
.zone-livrable { border-top: 1px solid var(--trait); padding-top: 14px; }
.zone-livrable:first-child { border-top: 0; padding-top: 0; }
.zone-livrable > h3 { font-size: 16px; margin-bottom: 2px; overflow-wrap: anywhere; }
.zone-livrable.a-completer > h3 { color: var(--ambre); }
.texte-livrable .zones-livrable { padding-left: 0; gap: 14px; }
/* Une mention « [A completer ...] » est souvent longue : elle passe a la ligne au lieu de deborder
   de sa carte sur un ecran etroit (le memoire comme le cadre). */
.marque-alerte { white-space: normal; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* Le texte d'une zone, tel qu'il s'ecrit dans le fichier : sans mise en forme, ses retours a la ligne gardes. */
.zone-texte { white-space: pre-wrap; overflow-wrap: anywhere; }

/* La demande de pieces (lot 4, 0040). */
.pile-serree { display: flex; flex-direction: column; gap: 8px; }
fieldset.pile-serree { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.pile-serree legend { margin-bottom: 8px; }
.ligne-piece { grid-template-columns: minmax(0, 1fr) minmax(0, auto); }
.ligne-piece > span { text-align: right; }
@media (max-width: 640px) {
  .ligne-piece { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ligne-piece > span { text-align: left; }
}
.message-demande { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.55; background: var(--fond); border: 1px solid var(--trait); border-radius: 8px; padding: 12px 14px; margin: 0; max-height: 360px; overflow: auto; }

/* L'ecran des droits (lot 5) : une personne par ligne, ses droits en colonnes */
table.droits { border-collapse: collapse; font-size: 14px; min-width: 100%; }
table.droits th, table.droits td { border-bottom: 1px solid var(--trait); padding: 10px 12px; text-align: left; vertical-align: top; }
table.droits th { color: var(--doux); font-weight: 500; font-size: 13px; white-space: nowrap; }
table.droits tr.doux td { color: var(--doux); }
table.droits select { width: auto; min-width: 190px; }
fieldset.cases { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
label.case { display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
label.case input { accent-color: var(--bleu); }
label.case.long { white-space: normal; align-items: flex-start; }
label.case.long input { margin-top: 3px; }
.actions-ligne { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-top: 6px; }
.message.cachee { border-style: dashed; }
.message.personne.cachee { background: transparent; border: 1px dashed var(--bleu-bord); }
.message.personne.cachee .qui { color: var(--doux); }
/* L'acces par affaire (0042) : une personne par ligne, qui se replie sur un telephone. */
.acces-personne { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.acces-personne > .qui { flex: 1 1 240px; min-width: 0; }
.acces-personne > form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.acces-personne select { min-width: 170px; }
.ligne.doux { color: var(--doux); }
.demande-droit { grid-template-columns: minmax(0, 1fr) minmax(0, 340px); align-items: start; }
@media (max-width: 760px) {
  .demande-droit { grid-template-columns: 1fr; }
}

/* Les facons de faire du cabinet (lot 6, 0044). */
ul.facons { list-style: none; margin: 8px 0 0; padding: 0; }
ul.facons > li.facon { padding: 12px 0; border-top: 1px solid var(--trait); }
ul.facons > li.facon:first-child { border-top: none; padding-top: 4px; }
li.facon > p { margin: 6px 0 2px; }
.actions-facon { display: flex; flex-direction: row; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 6px; }
.actions-facon form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.actions-facon label { display: inline-flex; align-items: center; gap: 6px; }
/* Sur telephone, la liste des metiers (deux metiers ouverts) passe sous son libelle et prend la largeur :
   le nom d'un metier, plus long que l'ecran, faisait deborder « Ce matin » (474 px pour 375, 2026-11-21). */
@media (max-width: 600px) { .actions-facon label.choix-metier { flex-wrap: wrap; max-width: 100%; } .actions-facon label.choix-metier select { width: 100%; } }
.facon select { font: inherit; font-size: 13px; color: var(--texte); background: var(--fond); border: 1px solid var(--trait); border-radius: 6px; padding: 4px 8px; min-height: 32px; }
.question-facon { padding: 10px 12px; border: 1px solid var(--trait); border-left: 3px solid var(--bleu); border-radius: 8px; background: var(--fond); }
.question-facon p { margin: 0 0 6px; }
.question-facon .actions form { margin: 0; }
details.reprises { margin-top: 8px; }
/* Le matin du cabinet (lot 7) : un brouillon de Tom, a relire avant de l'envoyer de sa messagerie. */
pre.brouillon { white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.5; background: var(--fond); padding: 10px 12px; border: 1px solid var(--trait); border-radius: 8px; margin: 8px 0; max-height: 320px; overflow: auto; }

/* --- Planche du 2026-11-10, direction vivante : pictogrammes, cartes de chiffres, gravite, frise,
   avatars des agents, semaine en grille, carte de la tournee. */

/* L'en-tete : le compteur sur une ligne ; sur un telephone, la barre du haut et son menu */
.compteur { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--doux); white-space: nowrap; min-height: 24px; }
.signaler { display: inline-flex; align-items: center; min-height: 24px; }
/* Le filtre d'agences : un bouton par agence, celle qui s'affiche enfoncee. */
.segments { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--trait); border-radius: 10px; overflow: hidden; }
.segment { font: inherit; font-size: 13px; padding: 8px 14px; min-height: 40px; background: transparent; color: var(--doux); border: 0; border-left: 1px solid var(--trait); cursor: pointer; }
.segment:first-child { border-left: 0; }
.segment:hover { color: var(--texte); }
.segment[aria-pressed="true"] { background: var(--bleu-fond); color: var(--texte); font-weight: 600; }
.compteur strong { color: var(--texte); font-weight: 600; }
.compteur .ic { color: var(--vert); }
.compteur.alerte, .compteur.alerte strong, .compteur.alerte .ic { color: var(--ambre); }
.compteur:hover { color: var(--texte); }
.entete .jauges { margin-left: auto; }
.tete-mobile { display: none; align-items: center; gap: 10px; width: 100%; }
.tete-mobile .marque-produit { padding: 0; font-size: 18px; }
.menu-mobile { margin-left: auto; position: relative; }
.menu-mobile > summary { list-style: none; min-height: 44px; padding: 8px 12px; }
.menu-mobile > summary::-webkit-details-marker { display: none; }
.menu-mobile > summary .fermer, .menu-mobile[open] > summary .ouvrir { display: none; }
.menu-mobile[open] > summary .fermer { display: inline; }
.panneau-mobile { position: absolute; right: 0; top: calc(100% + 8px); z-index: 25; width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 160px); overflow-y: auto; background: var(--alt); border: 1px solid var(--trait); border-radius: 12px; padding: 14px 10px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); }
.panneau-mobile .pile-serree { padding: 10px 12px 2px; border-top: 1px solid var(--trait); }
.panneau-mobile .moi { flex-wrap: wrap; }
.onglets-bas { display: none; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--alt); border-top: 1px solid var(--trait); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
.onglets-bas a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; color: var(--doux); font-size: 11px; font-weight: 500; border-radius: 10px; }
.onglets-bas a .ic { width: 52px; height: 28px; padding: 3px 14px; border-radius: 999px; }
.onglets-bas a[aria-current="page"] { color: var(--bleu-clair); }
.onglets-bas a[aria-current="page"] .ic { background: var(--bleu-fond); }
.pied-page { padding: 16px 32px 24px; border-top: 1px solid var(--trait); }
.pied-page nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13px; }
.pied-page a { color: var(--doux); }
@media (max-width: 760px) {
  .tete-mobile { display: flex; }
  .onglets-bas { display: grid; }
  .pied-page { padding: 16px; }
  .filtre-agence { width: 100%; }
  .filtre-agence .champ { flex: 1; }
  .compteur { font-size: 13px; }
}

/* Un titre de carte avec son pictogramme */
.titre-icone { display: inline-flex; align-items: center; gap: 10px; }
.titre-icone > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: var(--bleu-fond); color: var(--bleu-clair); }

/* Les cartes de chiffres du tableau de bord : un clic filtre la liste */
.chiffres { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.chiffre { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--trait); color: var(--texte); background: linear-gradient(180deg, var(--teinte, transparent) 0%, rgba(22, 27, 34, 0) 70%), var(--surface); transition: border-color .2s, box-shadow .2s; }
.chiffre:hover { color: var(--texte); border-color: var(--bleu-bord); }
.chiffre[aria-current="true"] { box-shadow: 0 0 0 2px var(--bleu-clair); }
.chiffre-icone { width: 42px; height: 42px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.chiffre-icone .ic { width: 22px; height: 22px; }
.chiffre-nombre { font-family: var(--titre); font-size: 34px; font-weight: 700; line-height: 1.1; }
.chiffre-libelle { grid-column: 1 / -1; font-size: 14px; font-weight: 600; margin-top: 10px; }
.chiffre-detail { grid-column: 1 / -1; font-size: 12px; color: var(--doux); }
.chiffre.bloque { --teinte: rgba(248, 113, 113, .09); border-color: var(--rouge-bord); }
.chiffre.bloque .chiffre-icone { background: var(--rouge-fond); color: var(--rouge); }
.chiffre.alerte { --teinte: rgba(251, 191, 36, .08); border-color: var(--ambre-bord); }
.chiffre.alerte .chiffre-icone { background: var(--ambre-fond); color: var(--ambre); }
.chiffre.info { --teinte: rgba(56, 189, 248, .08); }
.chiffre.info .chiffre-icone { background: var(--bleu-fond); color: var(--bleu-clair); }
.chiffre.ok { --teinte: rgba(134, 239, 172, .07); }
.chiffre.ok .chiffre-icone { background: var(--vert-fond); color: var(--vert); }
.chiffre.calme .chiffre-icone { background: var(--alt); color: var(--doux); }
.filtre-actif { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--doux); }
@media (max-width: 1100px) { .chiffres { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .chiffres { gap: 10px; }
  .chiffre { padding: 14px; }
  .chiffre-icone { width: 36px; height: 36px; }
  .chiffre-nombre { font-size: 28px; }
  .chiffre-detail { display: none; }
}

/* La liste des affaires, avec leur frise ; les colonnes vides se cachent */
.l-affaires-4 { grid-template-columns: minmax(0, 2fr) 160px minmax(0, 1.1fr) minmax(0, 1.5fr); }
.l-affaires-3 { grid-template-columns: minmax(0, 2fr) 160px minmax(0, 1.5fr); }
.l-affaires-5 { grid-template-columns: minmax(0, 1.8fr) minmax(0, .8fr) 160px minmax(0, 1fr) minmax(0, 1.4fr); }
.l-affaires-4 > *, .l-affaires-3 > *, .l-affaires-5 > * { min-width: 0; }
.rouge-texte { color: var(--rouge); }
/* Sous 1 100 pixels (tablette, petit portable), une affaire se lit en une colonne : les pastilles ne debordent pas. */
@media (max-width: 1100px) { .l-affaires-3, .l-affaires-4, .l-affaires-5 { grid-template-columns: minmax(0, 1fr); gap: 8px; } .ligne.entetes.l-affaires-3, .ligne.entetes.l-affaires-4, .ligne.entetes.l-affaires-5 { display: none; } .l-affaires-3 .frise, .l-affaires-4 .frise, .l-affaires-5 .frise { flex-direction: row; align-items: center; gap: 10px; } }

/* La frise d'avancement : pieces, controle, calcul, livrable, visa */
.frise { display: flex; flex-direction: column; gap: 6px; }
.frise ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; }
.frise li { width: 27px; height: 27px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px dashed var(--trait); color: var(--gris-icone); flex: none; }
.frise li .ic { width: 15px; height: 15px; }
.frise li.e-fait { background: var(--vert-fond); border: 1px solid var(--vert-bord); color: var(--vert); }
.frise li.e-cours { background: var(--bleu-fond); border: 1px solid var(--bleu-bord); color: var(--bleu-pale); animation: respire 1.6s ease-in-out infinite; }
.frise li.e-bloque { background: var(--rouge-fond); border: 1px solid var(--rouge-bord); color: var(--rouge); }
.frise li.e-faire { background: var(--ambre-fond); border: 1px solid var(--ambre-bord); color: var(--ambre); }
.frise li.e-sans { border: 1px dotted var(--trait); color: var(--gris-icone); }
.frise-legende { font-size: 12px; font-weight: 500; color: var(--doux); }
.frise-legende.e-fait { color: var(--vert); }
.frise-legende.e-cours { color: var(--bleu-pale); }
.frise-legende.e-bloque { color: var(--rouge); }
.frise-legende.e-faire { color: var(--ambre); }
@keyframes respire { 50% { box-shadow: 0 0 0 4px rgba(56, 189, 248, .15); } }
@media (prefers-reduced-motion: reduce) { .frise li.e-cours { animation: none; } }
/* En tete d'une affaire : chaque etape nommee dans sa case */
.frise.grande ol { gap: 6px; flex-wrap: wrap; }
.frise.grande li { width: auto; height: auto; min-height: 34px; padding: 6px 12px 6px 10px; gap: 8px; font-size: 13px; font-weight: 500; border-radius: 999px; }
.frise.grande li.e-rien, .frise.grande li.e-sans { color: var(--doux); }

/* L'avatar de chaque agent : une couleur par role, ses initiales en clair (contraste AA) */
.pastille.agent-strategiste { background: #1E3A8A; color: #DBEAFE; }
.pastille.agent-createur-contenu { background: #4C1D95; color: #EDE9FE; }
.pastille.agent-presentateur { background: #831843; color: #FCE7F3; }
.pastille.agent-analyste { background: #134E4A; color: #CCFBF1; }
.pastille.agent-designer { background: #7C2D12; color: #FFEDD5; }
.pastille.agent-gmail { background: #164E63; color: #CFFAFE; }
.pastille.agent-fireflies { background: #365314; color: #ECFCCB; }
.pastille.agent-cv { background: #581C87; color: #F3E8FF; }
.pastille.agent-operat { background: #713F12; color: #FEF9C3; }
.pastille.agent-planning { background: #9F1239; color: #FFE4E6; }
.pastille.petite { width: 24px; height: 24px; font-size: 10px; }
.par-agent { display: inline-flex; align-items: center; gap: 6px; }

/* Un etat vide qui dit ce que fait l'agent */
.vide { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; color: var(--doux); font-size: 14px; }
.vide > .pastille, .vide > .ic { flex: none; }
.vide > .ic { width: 32px; height: 32px; padding: 6px; border-radius: 8px; background: var(--alt); }

/* Le planning : la semaine en grille, et la carte de la tournee */
table.semaine { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 860px; table-layout: fixed; font-size: 13px; }
table.semaine th, table.semaine td { border-bottom: 1px solid var(--trait); border-right: 1px solid var(--trait); padding: 8px; vertical-align: top; text-align: left; }
table.semaine th { color: var(--doux); font-weight: 500; font-size: 12px; }
table.semaine th.personne { width: 150px; color: var(--texte); font-size: 13px; }
table.semaine .aujourdhui { background: rgba(56, 189, 248, .05); }
table.semaine thead .aujourdhui { color: var(--bleu-clair); }
.creneau { display: flex; flex-direction: column; gap: 2px; padding: 6px 8px; border-radius: 8px; margin-bottom: 6px; border: 1px solid var(--bleu-bord); background: var(--bleu-fond); color: var(--texte); }
a.creneau:hover { color: var(--texte); border-color: var(--bleu-clair); }
.creneau.proposee { border-style: dashed; background: transparent; }
.creneau.absent { border-color: var(--trait); background: repeating-linear-gradient(135deg, var(--alt), var(--alt) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--doux); }
.creneau.pris { border-color: var(--trait); background: var(--alt); color: var(--doux); }
.creneau .heures { font-weight: 600; }
/* Le Gantt d'un chantier (lot 10) : une ligne par tache, une colonne par jour ouvre ; la barre est une
   cellule qui s'etend sur les jours de la tache. Les teintes sont les variables des deux modes. */
.gantt-table { border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 13px; }
.gantt-col-tache { width: 280px; }
.gantt-col-jour { width: 16px; }
.gantt-table th, .gantt-table td { border-bottom: 1px solid var(--trait); height: 40px; padding: 12px 0; background-clip: content-box; }
.gantt-table th.gantt-tache { text-align: left; font-weight: 500; color: var(--texte); padding: 6px 12px 6px 0; }
.gantt-table thead th.gantt-tache { color: var(--doux); font-size: 12px; }
.gantt-table th.gantt-semaine { text-align: left; font-size: 11px; font-weight: 500; color: var(--doux); border-left: 1px solid var(--trait); padding: 6px 0 6px 4px; white-space: nowrap; overflow: hidden; }
.gantt-barre { background-color: var(--bleu); }
.gantt-retard { background-color: var(--ambre); }
.gantt-faite { background-color: var(--gris-icone); }
.gantt-legende { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.gantt-cle { display: inline-block; width: 16px; height: 10px; border-radius: 3px; margin-left: 10px; }
.carte-tournee { position: relative; margin: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--trait); background: #E8E4DA; }
.carte-tournee svg { display: block; width: 100%; height: auto; }
.carte-tournee .trace { fill: none; stroke: #0369A1; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 8 6; }
.carte-tournee .point circle { fill: #0369A1; stroke: #FFFFFF; stroke-width: 2.5; }
.carte-tournee .point text, .carte-tournee .depart text { fill: #FFFFFF; font: 600 12px var(--corps); text-anchor: middle; dominant-baseline: central; }
.carte-tournee .depart rect { fill: #0D1117; stroke: #FFFFFF; stroke-width: 2.5; }
.carte-tournee figcaption { position: absolute; right: 0; bottom: 0; background: rgba(255, 255, 255, .88); color: #1F2937; font-size: 11px; padding: 2px 6px; border-top-left-radius: 6px; }
/* Le plan du jour : une couleur par tournee, trois au plus (palette validee deux a deux sur le fond du Plan IGN). */
.carte-tournee .trace.s1 { stroke: #3987E5; }
.carte-tournee .trace.s2 { stroke: #EB6834; }
.carte-tournee .trace.s3 { stroke: #1BAF7A; }
.carte-tournee .point.s1 circle { fill: #3987E5; }
.carte-tournee .point.s2 circle { fill: #EB6834; }
.carte-tournee .point.s3 circle { fill: #1BAF7A; }
/* Le numero d'une visite sur ces trois couleurs : en fonce (5,41:1 sur le bleu, 6,15 sur l'orange, 6,99 sur le vert) ; le blanc n'y tient pas 4,5:1. */
.carte-tournee .point.s1 text, .carte-tournee .point.s2 text, .carte-tournee .point.s3 text { fill: #0B0B0B; }
.legende-traces { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0 0; padding: 0; font-size: 13px; color: var(--texte); }
.legende-traces li { display: flex; align-items: center; gap: 8px; }
.legende-traces .pastille { display: inline-block; width: 22px; height: 4px; border-radius: 2px; }
.legende-traces .pastille.s1 { background: #3987E5; }
.legende-traces .pastille.s2 { background: #EB6834; }
.legende-traces .pastille.s3 { background: #1BAF7A; }
.onglets-vue { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.onglets-vue a[aria-current="page"] { border-color: var(--bleu-clair); background: var(--bleu-fond); font-weight: 600; }
.plan-du-jour { max-width: 760px; margin: 8px 0 16px; }

/* Les niveaux d'acces d'une affaire, qui s'emboitent */
.niveau { display: inline-flex; align-items: center; gap: 6px; }
.niveaux-legende { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--doux); }
.l-fil { grid-template-columns: auto minmax(0, 1fr); align-items: start; }
.avatar.petite { width: 24px; height: 24px; font-size: 10px; }
.puce.plus { cursor: pointer; list-style: none; }
.puce.plus::-webkit-details-marker { display: none; }
details.puces-plus { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
details.puces-plus[open] { flex-basis: 100%; }
details.puces-plus[open] > summary { border-color: var(--bleu-bord); color: var(--texte); }
table.semaine th.personne { position: sticky; left: 0; z-index: 1; background: var(--surface); }
/* La tournee : ses visites a gauche, sa carte a droite ; l'une sous l'autre sur un ecran etroit. */
.tournee-corps { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 440px); gap: 20px; align-items: start; }
@media (max-width: 1100px) { .tournee-corps { grid-template-columns: minmax(0, 1fr); } .carte-tournee { max-width: 560px; } }
ul.agents-liste { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 760px) {
  table.semaine { min-width: 640px; }
  table.semaine th.personne { width: 96px; }
  .carte-tournee figcaption { position: static; border-radius: 0; }
}
/* Sur un telephone : 44 pixels pour tout ce qui se touche. */
@media (max-width: 760px) {
  .nav a, .reglages > summary, .sous-nav a, .segment { min-height: 44px; }
  .compteur, .panneau-mobile .signaler, .panneau-mobile .bouton.lien, .tete-mobile .marque-produit { min-height: 44px; display: inline-flex; align-items: center; }
  .segments { width: 100%; }
}
/* Sur un telephone, rien de ce qui s'ecrit sur une seule ligne ne pousse la page : le compteur de
   l'en-tete, les agents d'une affaire et une puce au texte long (le nom d'un client, celui d'un
   fichier) passent a la ligne quand ils depassent leur bloc. Tant que la ligne tient, rien ne
   change : dans un tableau, qui defile, une puce reste sur une ligne, et son arrondi de 13 px est
   celui d'une puce d'une ligne (26 px de haut) ; sur plusieurs lignes, il ne fait plus un ovale.
   Mesure par acces-ia-site-web/scripts/verifier-telephone.mjs sur la demonstration figee. */
@media (max-width: 760px) {
  .compteur { white-space: normal; }
  .puce { white-space: normal; border-radius: 13px; }
  td .puce, th .puce { white-space: nowrap; }
  .colonnes-cases label.case { white-space: normal; }
}

/* Le lien d'evitement survole prenait la couleur de survol des liens, bleu pale sur bleu (1,66:1) :
   trouve par scripts/contrastes-rendu.ts le 2026-11-17. Seule retouche du mode sombre de ce jour. */
.evitement:hover { color: var(--fond); }

/* ==========================================================================
   MODE CLAIR (planche du 2026-11-17, barre de navigation claire)
   Les tons clairs sont ceux du site vitrine (acces-ia-site-web/src/assets/style.css, bloc MODE
   CLAIR) : papier presque blanc, zones bleu pale, texte bleu nuit, memes bleus et meme vert.
   test/mode-clair.test.ts compare les valeurs communes a celles du site.

   Le mode ne s'active que par l'attribut data-theme="clair", pose sur <html> par theme.js, charge
   dans <head> avant cette feuille. Aucune regle d'avant n'a ete retouchee : le mode sombre est
   celui d'avant (hors le lien d'evitement survole, juste au-dessus), et scripts/comparer-rendu.ts
   le prouve, couleur par couleur et boite par boite.

   Les noms de variables ne changent pas, seules leurs valeurs s'inversent. Trois roles que le
   sombre confondait se separent ici : le texte pose sur un aplat bleu profond (reste blanc), le
   texte du bouton principal (bleu nuit sur bleu ciel), le filet d'un champ (qui doit se voir).

   La gravite garde ses cinq tons, fonces pour tenir 4,5:1 sur le papier ; le « a faire » passe
   du jaune vif a un or fonce (un ambre fonce tire vers l'orange, quitte le 2026-10-29).

   Controles : test/mode-clair.test.ts, dans la suite ; et « npm run mode-clair », qui lance le
   service d'essai, fige ses ecrans et joue dans Chrome scripts/contrastes-rendu.ts (chaque texte,
   chaque pictogramme, chaque champ, les deux modes), scripts/comparer-rendu.ts (le sombre n'a pas
   bouge) et scripts/essai-bascule.ts (le bouton).
   ========================================================================== */
:root[data-theme="clair"] {
  color-scheme: light;
  --fond: #FBFCFD; --surface: #FFFFFF; --alt: #F0F5FA; --trait: #DCE4EE;
  --bleu: #0990D6; --bleu-clair: #0369A1; --bleu-pale: #075985; --bleu-nuit: #075985; --bleu-bord: #9CC8E6;
  --vert: #166534; --vert-bord: #9BD5AF; --ambre: #854D0E; --ambre-bord: #DDBE5A;
  --texte: #07182F; --doux: #55637A;
  --rouge: #B91C1C; --rouge-bord: #EFAFAF; --rouge-fond: rgba(220, 38, 38, .08);
  --ambre-fond: rgba(234, 179, 8, .16); --vert-fond: rgba(34, 197, 94, .12); --bleu-fond: rgba(9, 144, 214, .10);
  --gris-icone: #6B7C92;
  /* Propres au clair : le filet d'un champ (3:1 sur le papier), celui d'un bouton. */
  --trait-fort: #7F90A6; --trait-moyen: #B9C5D4;
}

/* Un texte pose sur un aplat bleu profond reste blanc. La bulle « cachee » n'a pas d'aplat. */
[data-theme="clair"] .avatar,
[data-theme="clair"] .logo-initiales,
[data-theme="clair"] .pastille.noam,
[data-theme="clair"] .message.personne { color: #FFFFFF; }
[data-theme="clair"] .message.personne.cachee { color: var(--texte); }
/* La mention d'un role (@Lea) est ecrite bleu tres pale, pour la bulle bleu profond ; or elle sert
   aussi sur le papier (la liste des roles, les suggestions) : la, elle prend le bleu profond. */
[data-theme="clair"] .mention { color: var(--bleu-pale); }
[data-theme="clair"] .message.personne:not(.cachee) .mention { color: #E0F2FE; }
/* Dans la bulle, un lien ou un bouton-lien prend le bleu pale de la bulle, pas le bleu des liens du papier. */
[data-theme="clair"] .message.personne:not(.cachee) a,
[data-theme="clair"] .message.personne:not(.cachee) .bouton.lien { color: #BAE6FD; }

/* Le bouton principal et le lien d'evitement : bleu ciel dense, texte bleu nuit (comme le site). */
[data-theme="clair"] .bouton.principal-action,
[data-theme="clair"] .evitement,
[data-theme="clair"] .evitement:focus { color: #07182F; }
[data-theme="clair"] .bouton.principal-action:hover { background: #38BDF8; border-color: #38BDF8; }

/* Champs et boutons : un filet qui se voit sur le papier. */
[data-theme="clair"] .champ input,
[data-theme="clair"] .champ select,
[data-theme="clair"] .champ textarea,
[data-theme="clair"] .plan-groupe select,
[data-theme="clair"] .facon select { border-color: var(--trait-fort); background: #FFFFFF; }
/* Le texte d'exemple d'un champ : le gris par defaut du navigateur tient de justesse dans Chrome
   (4,6:1 sur blanc) et pas dans les autres. */
[data-theme="clair"] ::placeholder { color: var(--doux); opacity: 1; }
[data-theme="clair"] .saisie { border-color: var(--trait-fort); }
[data-theme="clair"] .saisie:focus-within { border-color: var(--bleu-clair); }
[data-theme="clair"] .bouton,
[data-theme="clair"] .voie input[type="file"]::file-selector-button { border-color: var(--trait-moyen); }
[data-theme="clair"] .bouton:hover { border-color: var(--bleu-clair); }
[data-theme="clair"] .bouton.principal-action { border-color: var(--bleu); }
[data-theme="clair"] .bouton.effacer { border-color: var(--rouge-bord); color: var(--rouge); }
[data-theme="clair"] .bouton.effacer:hover { background: #FDECEC; border-color: #B91C1C; color: #991B1B; }
[data-theme="clair"] .erreur { color: var(--rouge); }
/* Une case, un bouton radio : leur contour natif est trop pale sur le papier. */
[data-theme="clair"] .choix,
[data-theme="clair"] .choix-zone { border-color: var(--trait-moyen); }
[data-theme="clair"] .choix:has(input:checked),
[data-theme="clair"] .choix-zone:has(input:checked) { border-color: var(--bleu); }
/* Le filtre d'agences : son cadre se voit, et l'agence affichee se dit par un aplat, pas par une
   teinte a peine posee (1,1:1 mesure). */
[data-theme="clair"] .segments { border-color: var(--trait-moyen); }
[data-theme="clair"] .segment { border-left-color: var(--trait-moyen); }
[data-theme="clair"] .segment[aria-pressed="true"] { background: var(--bleu-nuit); color: #FFFFFF; }

/* La pastille par defaut (une personne, une initiale, un role sans couleur a lui) : bleu pale,
   lettres bleu profond. Ecrite sous :where pour ne pas peser plus que la regle d'un agent : les dix
   agents colores et Noam gardent leur paire, qui porte son propre contraste ; un role sans couleur
   (le onzieme, stock et achats) retombe ici au lieu de garder le fond sombre sous une encre sombre. */
:where([data-theme="clair"]) .pastille { background: #E1E8F7; color: #075985; }
[data-theme="clair"] .etapes a.faite b { background: var(--vert-fond); }
[data-theme="clair"] .etapes a[aria-current="step"] { background: var(--bleu-fond); }
/* Le logo du cabinet reste sur sa tuile blanche : un filet la detache du papier. */
[data-theme="clair"] .logo-tuile { box-shadow: inset 0 0 0 1px var(--trait); }

/* Une carte en retrait (role inactif, metier annonce) : le sombre l'estompe par transparence. Sur le
   papier la transparence fait tomber ses textes sous le seuil (2,4:1 mesure) : en clair le retrait se
   dit par un nom en texte doux, et pour la carte d'un metier par un fond de zone et un filet en
   pointilles (un role inactif n'a pas de carte : son titre de section le dit). */
[data-theme="clair"] .role-carte.inactif { opacity: 1; }
[data-theme="clair"] .role-carte.inactif .nom { color: var(--doux); }
[data-theme="clair"] .metier-carte.annonce { opacity: 1; background: var(--alt); border-style: dashed; }

/* Le relief : en sombre les surfaces se detachent par leur teinte ; sur le papier, par une ombre legere. */
[data-theme="clair"] .carte,
[data-theme="clair"] .chiffre,
[data-theme="clair"] .bandeau { box-shadow: 0 1px 3px rgba(7, 24, 47, .05); }
[data-theme="clair"] .chiffre[aria-current="true"] { box-shadow: 0 0 0 2px var(--bleu-clair); }
[data-theme="clair"] .metier-carte.annonce { box-shadow: none; }
[data-theme="clair"] .panneau-mobile { box-shadow: 0 12px 32px rgba(7, 24, 47, .14); }
[data-theme="clair"] .chiffre.bloque { --teinte: rgba(220, 38, 38, .07); }
[data-theme="clair"] .chiffre.alerte { --teinte: rgba(234, 179, 8, .12); }
[data-theme="clair"] .chiffre.info { --teinte: rgba(9, 144, 214, .08); }
[data-theme="clair"] .chiffre.ok { --teinte: rgba(34, 197, 94, .08); }
[data-theme="clair"] table.semaine .aujourdhui { background: rgba(9, 144, 214, .06); }
[data-theme="clair"] .frise li.e-cours { animation-name: respire-clair; }
@keyframes respire-clair { 50% { box-shadow: 0 0 0 4px rgba(9, 144, 214, .18); } }

/* Le bouton de bascule, pose par theme.js : en haut de la barre de navigation sur un ordinateur
   (en absolu : il ne deplace rien), derniere ligne du menu sur un telephone, et dans un coin sur
   les pages sans barre (connexion, documents publics). theme.js lit « cursor: pointer » pour savoir
   que la feuille chargee est bien celle-ci, et pas une copie d'avant gardee par le navigateur. */
.bascule-theme { font: inherit; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 36px; height: 36px; flex: none; padding: 0; background: var(--surface); color: var(--texte); border: 1px solid var(--trait); border-radius: 999px; cursor: pointer; }
.bascule-theme:hover { border-color: var(--bleu-clair); color: var(--bleu-clair); }
[data-theme="clair"] .bascule-theme { border-color: var(--trait-fort); }
[data-theme="clair"] .bascule-theme:hover { border-color: var(--bleu-clair); }
.bascule-theme .ic { width: 18px; height: 18px; }
.bascule-theme .bascule-lune, [data-theme="clair"] .bascule-theme .bascule-soleil { display: none; }
[data-theme="clair"] .bascule-theme .bascule-lune { display: block; }
.bascule-theme .bascule-libelle { display: none; }
.bascule-ancre { position: relative; }
.bascule-theme--barre { position: absolute; top: 17px; right: 14px; }
.bascule-theme--menu { width: 100%; height: auto; min-height: 44px; justify-content: flex-start; padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 500; }
.bascule-theme--menu .ic { width: 20px; height: 20px; }
.bascule-theme--menu .bascule-libelle { display: inline; }
.bascule-theme--coin { position: fixed; right: 16px; bottom: 16px; z-index: 30; width: 44px; height: 44px; }
.bascule-theme--coin .ic { width: 20px; height: 20px; }
