/* AO-SCAN — feuille de style V2 (21/09/2026) : refonte visuelle uniquement (sidebar sombre, cartes, badges, tableaux).
   Toutes les classes de la V1 sont conservées (templates + app.js s'y réfèrent) ; aucune classe n'a changé de sens.
   Aucune dépendance externe : polices système, icônes = sprite SVG inline de base.html. */

/* ---------- 1. Jetons ---------- */
:root {
  --fond: #eef2f7; --carte: #ffffff; --texte: #0f172a; --texte-2: #334155; --discret: #64748b; --bord: #e3e8f0; --bord-fort: #cbd5e1;
  --lien: #1d4ed8; --principal: #2563eb; --principal-fonce: #1d4ed8; --principal-txt: #ffffff; --principal-fond: #eff4ff;
  --ok: #15803d; --ok-fond: #e7f6ec; --attention: #b45309; --attention-fond: #fdf3e1; --erreur: #b91c1c; --erreur-fond: #fdecec;
  --encours: #1d4ed8; --encours-fond: #e8eefc; --neutre: #4b5563; --neutre-fond: #eef1f5; --nouveau: #0f766e; --nouveau-fond: #dff5f1;
  --modifie: #7c3aed; --modifie-fond: #efe9fd; --cloture: #6b7280; --cloture-fond: #eef1f5; --disparu: #b45309; --disparu-fond: #fdf3e1;
  --sidebar: #0b1633; --sidebar-2: #14224a; --sidebar-txt: #c7d2e6; --sidebar-txt-2: #8b9bbd; --sidebar-actif: #3b82f6;
  --rayon: 12px; --rayon-s: 8px; --ombre: 0 1px 2px rgba(15, 23, 42, .05), 0 6px 16px -8px rgba(15, 23, 42, .12);
  --ombre-2: 0 2px 4px rgba(15, 23, 42, .06), 0 12px 28px -12px rgba(15, 23, 42, .18);
  --sidebar-l: 224px; --focus: 0 0 0 3px rgba(37, 99, 235, .28);
  /* mode de la sidebar : ouverte par défaut ; « compacte » = icônes seules (variables redéfinies plus bas) */
  --sb-texte: inline; --sb-bloc: flex; --sb-justif: flex-start; --sb-pad-x: 14px; --sb-chevron: 0deg; --sb-haut-dir: row; --sb-bt-pos: absolute;
}
/* Sidebar compacte : automatiquement sous 1700 px (sauf préférence « ouverte »), ou forcée par le bouton (préférence « compacte »).
   Seule la présentation change : mêmes liens, mêmes formulaires. */
html.sidebar-compacte { --sidebar-l: 68px; --sb-texte: none; --sb-bloc: none; --sb-justif: center; --sb-pad-x: 10px; --sb-chevron: 180deg; --sb-haut-dir: column; --sb-bt-pos: static; }
@media (max-width: 1699px) { html:not(.sidebar-ouverte) { --sidebar-l: 68px; --sb-texte: none; --sb-bloc: none; --sb-justif: center; --sb-pad-x: 10px; --sb-chevron: 180deg; --sb-haut-dir: column; --sb-bt-pos: static; } }

/* ---------- 2. Base ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scrollbar-gutter: stable; }   /* gouttière réservée : pas de décalage horizontal du contenu quand la barre de défilement apparaît (page courte ↔ longue) */
body { font: 14px/1.5 Inter, "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; color: var(--texte); background: var(--fond); -webkit-font-smoothing: antialiased; }
a { color: var(--lien); text-decoration: none; } a:hover { text-decoration: underline; }
code { background: var(--neutre-fond); padding: 1px 5px; border-radius: 4px; font-size: 12px; color: var(--texte-2); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 14px; line-height: 1.2; color: var(--texte); }
h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; letter-spacing: -.005em; }
.carte > h2:first-child { padding-left: 12px; border-left: 3px solid var(--principal); line-height: 1.3; margin-bottom: 14px; }
h3 { font-size: 11.5px; margin: 18px 0 8px; color: var(--discret); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
h1 .discret, h2 .discret { font-weight: 500; font-size: .8em; }
h1 code, h2 code { font-size: .7em; vertical-align: middle; }
p { margin: 0 0 10px; }
ul { margin: 6px 0 10px; padding-left: 20px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -4px; }

/* ---------- 3. Layout : sidebar + contenu ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-l); flex: none; transition: width .18s ease; background: linear-gradient(180deg, #0c1a3d 0%, var(--sidebar) 40%, #091128 100%); color: var(--sidebar-txt); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; box-shadow: 1px 0 0 rgba(255, 255, 255, .04), 4px 0 24px -12px rgba(2, 6, 23, .6); }
.sidebar-haut { padding: 18px var(--sb-pad-x) 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); display: flex; flex-direction: var(--sb-haut-dir); align-items: center; justify-content: space-between; gap: 10px; position: relative; min-height: 72px; }
.marque { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 18px; letter-spacing: .02em; min-width: 0; }
.sidebar .marque span { display: var(--sb-texte); }
.sidebar .marque { margin: 0 auto 0 0; } html.sidebar-compacte .sidebar .marque { margin: 0 auto; }
@media (max-width: 1699px) { html:not(.sidebar-ouverte) .sidebar .marque { margin: 0 auto; } }
.marque .logo { height: 30px; width: auto; max-width: 100%; display: block; filter: drop-shadow(0 2px 6px rgba(59, 130, 246, .45)); flex: none; }
/* bouton réduire / développer : discret, posé sur le bord droit de la sidebar */
.sidebar-basculer { position: var(--sb-bt-pos); right: -13px; top: 24px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #2b3d6b; background: #14224a; color: #c7d2e6; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 2px 6px rgba(2, 6, 23, .5); z-index: 2; transition: background .12s, color .12s; }
.sidebar-basculer .ico { width: 15px; height: 15px; transform: rotate(var(--sb-chevron)); transition: transform .18s; }
.sidebar-basculer:hover { background: #2563eb; color: #fff; border-color: #2563eb; } .marque span { line-height: 1; }
.marque, .marque:hover { text-decoration: none; cursor: pointer; color: #fff; }
.nav { display: flex; flex-direction: column; gap: 4px; padding: 18px var(--sb-pad-x); }
.nav a { display: flex; align-items: center; justify-content: var(--sb-justif); gap: 12px; padding: 11px 13px; border-radius: 9px; color: var(--sidebar-txt); font-weight: 500; font-size: 14px; transition: background .12s, color .12s; }
.nav a .ico { width: 20px; height: 20px; opacity: .9; stroke-width: 2; }
.nav a > span { display: var(--sb-texte); white-space: nowrap; }
.nav a:hover { background: var(--sidebar-2); color: #fff; text-decoration: none; }
.nav a.actif { background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-weight: 600; box-shadow: 0 4px 14px -4px rgba(59, 130, 246, .7), inset 0 1px 0 rgba(255, 255, 255, .15); } .nav a.actif .ico { opacity: 1; }
.session { margin-top: auto; padding: 16px var(--sb-pad-x) 18px; align-items: var(--sb-justif); border-top: 1px solid rgba(255, 255, 255, .07); background: rgba(0, 0, 0, .18); display: flex; flex-direction: column; gap: 10px; color: var(--sidebar-txt-2); font-size: 12.5px; }
.session-identite { display: var(--sb-bloc); flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.session .entreprise { color: #fff; font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .session .entreprise .ico { width: 16px; height: 16px; opacity: .7; }
.session .sep { display: none; }
.session .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pastille > span { display: var(--sb-texte); }
.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: rgba(59, 130, 246, .22); border: 1px solid rgba(96, 165, 250, .45); color: #dbeafe; font-size: 12px; font-weight: 600; }
.pastille .ico { width: 10px; height: 10px; fill: #93c5fd; stroke: none; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.pastille:hover { text-decoration: none; background: #1e40af; }
button.lien { background: none; border: 0; color: var(--sidebar-txt); cursor: pointer; font: inherit; font-size: 13px; padding: 6px 0; display: inline-flex; align-items: center; gap: 8px; border-radius: 6px; }
button.lien > span { display: var(--sb-texte); }
button.lien:hover { color: #fff; text-decoration: underline; }
form.inline { display: inline; }

.contenu { flex: 1; min-width: 0; display: flex; flex-direction: column; }
main.principal { width: 100%; max-width: 1900px; margin: 0 auto; padding: 24px 24px 12px; flex: 1; }
.pied { max-width: 1800px; margin: 0 auto; padding: 14px 24px 24px; color: var(--discret); font-size: 12px; width: 100%; }

/* Bandeau minimal (pages sans session : connexion) */
.entete { background: var(--sidebar); color: #e5e7eb; }
.entete-int { max-width: 1560px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; height: 56px; }
body.sans-sidebar .app { flex-direction: column; }
body.sans-sidebar .contenu { min-height: calc(100vh - 56px); }

/* ---------- 4. En-tête de page, cartes, utilitaires ---------- */
.page-entete { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-entete h1 { margin: 0; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-entete .sous-titre { margin: 4px 0 0; color: var(--discret); max-width: 900px; }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.compteur-titre { display: inline-block; padding: 4px 11px; border-radius: 999px; background: #dbe7ff; color: var(--principal-fonce); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 22px 24px; margin-bottom: 20px; box-shadow: var(--ombre); }
.carte > h1:first-child, .carte > h2:first-child { margin-top: 0; }
.grille-accueil { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .grille-accueil { grid-template-columns: 1fr; } }
.colonnes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; } @media (max-width: 1100px) { .colonnes { grid-template-columns: 1fr; } }
.discret { color: var(--discret); } .petit { font-size: 12px; } .alerte { color: var(--erreur); font-weight: 600; } .attention-txt { color: var(--attention); font-weight: 600; } .ok-txt { color: var(--ok); }
.vide { color: var(--discret); padding: 44px 20px; text-align: center; background: var(--carte); border: 1px dashed var(--bord-fort); border-radius: var(--rayon); font-weight: 500; }
.ligne-titre { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.ligne-titre h1, .ligne-titre h2 { margin-bottom: 0; }
.ligne-titre > span:last-child { margin-left: auto; display: inline-flex; gap: 8px; flex-wrap: wrap; }
/* lien « ← retour » en tête de page (premier paragraphe du contenu) */
main.principal > p:first-child > a:first-child { display: inline-flex; align-items: center; color: var(--discret); font-weight: 500; font-size: 13px; }
main.principal > p:first-child > a:first-child:hover { color: var(--lien); }

.message { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; border: 1px solid transparent; font-weight: 500; box-shadow: var(--ombre); }
.message.ok { background: var(--ok-fond); color: var(--ok); border-color: #bfe6cc; }
.message.erreur { background: var(--erreur-fond); color: var(--erreur); border-color: #f5c2c2; }
.message.attention { background: var(--attention-fond); color: var(--attention); border-color: #f3d9a8; }
.message ul { margin: 6px 0 0; }

/* ---------- 5. Boutons ---------- */
.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 8px 15px; border-radius: var(--rayon-s); border: 1px solid var(--bord-fort); background: #fff; color: var(--texte-2); cursor: pointer; font: inherit; font-weight: 600; line-height: 1.2; white-space: nowrap; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); transition: background .12s, border-color .12s, color .12s, box-shadow .12s, transform .06s; }
.bouton:active { transform: translateY(1px); box-shadow: none; }
.bouton:hover { background: #f8fafc; border-color: #94a3b8; color: var(--texte); text-decoration: none; }
.bouton.principal { background: linear-gradient(180deg, #3b82f6, #2563eb); color: var(--principal-txt); border-color: #2563eb; font-weight: 600; box-shadow: 0 1px 2px rgba(37, 99, 235, .3), 0 4px 12px -4px rgba(37, 99, 235, .6); }
.bouton.principal:hover { background: linear-gradient(180deg, #2f76f0, #1d4ed8); border-color: #1d4ed8; }
.bouton.grand { font-size: 16px; padding: 12px 26px; min-height: 48px; border-radius: 10px; }
.bouton.secondaire { color: var(--principal-fonce); background: var(--principal-fond); border-color: #c7d7fe; }
.bouton.secondaire:hover { background: #e0e9ff; border-color: #a5bcf7; }
.bouton.danger { background: #fff; color: var(--erreur); border-color: #f0b4b4; font-weight: 600; } .bouton.danger:hover { background: var(--erreur); color: #fff; border-color: var(--erreur); }
.bouton.danger:disabled { background: #fff; color: #e59a9a; border-color: #f6d3d3; }
.bouton.actif { background: #1f2937; color: #fff; border-color: #1f2937; }
.bouton:disabled { opacity: .55; cursor: not-allowed; }
.bouton .ico { width: 16px; height: 16px; }
.bouton.export { color: var(--principal-fonce); border-color: #93b4fd; background: #fff; }
.bouton.export:hover { background: var(--principal-fond); border-color: #60a5fa; color: var(--principal-fonce); }

/* ---------- 6. Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; border: 1px solid transparent; }
.badge.ok::before, .badge.attention::before, .badge.erreur::before, .badge.encours::before, .badge.nouveau::before, .badge.modifie::before, .badge.cloture::before, .badge.disparu::before, .badge.telecharge::before, .badge.decision::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; opacity: .9; }
.badge.ok { background: #dcfce7; color: #15803d; } .badge.attention { background: #fef3c7; color: #b45309; }
.badge.erreur { background: #fee2e2; color: #b91c1c; } .badge.encours { background: #dbeafe; color: #1d4ed8; }
.badge.neutre { background: #eef1f5; color: #475569; } .badge.nouveau { background: #dbeafe; color: #1d4ed8; }
.badge.modifie { background: #ffedd5; color: #c2410c; } .badge.cloture { background: #e2e8f0; color: #475569; }
.badge.disparu { background: var(--disparu-fond); color: var(--disparu); }
.badge.na, .badge.decision.na { background: #e2e8f0; color: #334155; }
.badge.decision.a_repondre { background: #ffe4e6; color: #be123c; }
.badge.decision.depose { background: #ede9fe; color: #6d28d9; }
.badge.telecharge { background: #d1fae5; color: #047857; }
/* signal métier (affichage seulement, 22/09/2026) : terme réellement retrouvé vs résultat de recherche plateforme */
mark.signal { background: #fde68a; color: inherit; padding: 0 2px; border-radius: 3px; font-weight: 600; }
.signal-ligne { font-size: 12px; font-weight: 600; margin-top: 2px; }
.signal-ligne.confirme { color: #15803d; }
.signal-ligne.serveur { color: #b45309; }
.resume-signal { margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--bordure, #e2e8f0); }
.badge.doublon { background: #ffe4e6; color: #be123c; margin-bottom: 3px; }
.badge.note { border-color: #9ca3af; background: #fff; color: var(--texte); }
.badge.note.jaune { background: #facc15; border-color: #ca8a04; }
.badge.note.rouge { background: #ef4444; border-color: #b91c1c; color: #fff; }
.badge.note.vert { background: #22c55e; border-color: #15803d; color: #fff; }
.badge.note.bleu { background: #3b82f6; border-color: #1d4ed8; color: #fff; }

/* ---------- 7. Tableaux ---------- */
.tableau-conteneur { overflow-x: auto; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); margin-bottom: 18px; }
.carte .tableau-conteneur { border: 1px solid var(--bord); box-shadow: none; margin: 10px 0 6px; }
.tableau { width: 100%; border-collapse: collapse; background: #fff; }
.tableau th, .tableau td { padding: 12px 12px; border-bottom: 1px solid #edf1f6; vertical-align: top; text-align: left; }
.tableau th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 700; background: #f6f8fb; border-bottom: 1px solid var(--bord); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.tableau tbody tr:last-child td { border-bottom: 0; }
.tableau tbody tr:hover td { background: #f3f7fd; }
.tableau .num, .tableau td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tableau td.date { white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Liste des AO (13 colonnes + case en vue Clôturés) — table-layout: fixed : les largeurs de colonnes sont fixées par le <colgroup>
   (colonnes courtes en px, colonnes de texte en %), jamais par le contenu → « Tous », « Téléchargés », « Clôturés » ont exactement
   la même géométrie ; le texte revient à la ligne dans sa colonne (coupure de mot seulement si un mot dépasse la colonne).
   En dessous de la largeur minimale, défilement horizontal dans le conteneur seulement. Typographie confortable conservée. */
.tableau.ao { table-layout: fixed; width: 100%; min-width: 1440px; font-size: 13.5px; line-height: 1.45; }
.tableau.ao th, .tableau.ao td { padding: 12px 8px; }
.tableau.ao th { white-space: normal; line-height: 1.2; }
.tableau.ao td { white-space: normal; overflow-wrap: anywhere; min-width: 0; max-width: none; }
.tableau.ao td.date, .tableau.ao td.cloture { white-space: nowrap; }
.tableau.ao td.objet > a { font-size: 14px; }
.tableau.ao td.lots { font-size: 13px; }
.tableau.ao td.doublon { white-space: normal; }
.tableau.ao .marques { flex-wrap: wrap; } .tableau.ao .marques .badge { white-space: normal; overflow-wrap: normal; text-align: center; }   /* pilules : retour à la ligne à l'espace seulement */
.tableau.ao .decisions { min-width: 0; gap: 4px; }
.tableau.ao .decisions .lien-action { padding: 4px 6px; font-size: 12px; }
/* barre de défilement horizontale collante (tableau.js) : remplace la barre native du conteneur quand le tableau déborde */
.tableau-conteneur.defilement-delegue { scrollbar-width: none; }
.tableau-conteneur.defilement-delegue::-webkit-scrollbar { display: none; }
.defilement-h { position: sticky; bottom: 0; z-index: 3; overflow-x: auto; overflow-y: hidden; height: 18px; margin: -18px 0 18px; background: rgba(255, 255, 255, .92); border: 1px solid var(--bord); border-top: 0; border-radius: 0 0 var(--rayon) var(--rayon); }
.defilement-h > div { height: 1px; }
.tableau td.objet { min-width: 230px; max-width: 420px; }
.tableau td.objet > a { font-weight: 600; color: #1d4ed8; } .tableau td.objet > a:hover { color: #1e3a8a; }
.tableau td.lieu { max-width: 180px; min-width: 110px; }
.tableau td.lots { max-width: 260px; font-size: 12.5px; }
.tableau tr.non-retenu td { color: var(--discret); }
.tableau tr.pertinent td { background: var(--nouveau-fond); }
.tableau.progression td.nom { font-weight: 600; }
.tableau.progression tr.etat-en_cours td { background: var(--encours-fond); }
.tableau.progression td.detail { max-width: 320px; font-size: 12px; }
.tableau .marques { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.message-ev { max-width: 460px; word-break: break-word; }
.tableau td.acheteur { font-weight: 700; color: var(--texte); }
.tableau td.cloture b { font-weight: 800; color: var(--texte); font-size: 14px; letter-spacing: -.01em; }
.tableau td.cloture .alerte, .tableau td.cloture .attention-txt { font-weight: 700; }
.tableau tr.na td, .tableau tr.na td.acheteur, .tableau tr.na td.cloture b, .tableau tr.non-retenu td.acheteur, .tableau tr.non-retenu td.cloture b { color: var(--discret); font-weight: 500; }
.tableau td.doublon { font-size: 12.5px; white-space: nowrap; }
/* doublons probables : lignes surlignées et groupées (aucune fusion) */
.tableau tr.doublon td { background: #fff7f8; }
.tableau tr.doublon:hover td { background: #ffeef0; }
.tableau tr.groupe-doublon td:first-child { border-left: 3px solid #fb7185; }
.tableau tr.groupe-debut td { border-top: 2px solid #fda4af; }
.tableau tr.groupe-suite td { border-top: 1px dashed #fecdd3; }
.pastille-doublon { display: inline-block; width: 12px; height: 12px; background: #fff7f8; border: 1px solid #fb7185; border-radius: 3px; vertical-align: middle; margin-right: 4px; }
.filtre-info { margin: -6px 0 12px; }
td.actions { white-space: nowrap; } td.actions .bouton { margin: 2px 6px 2px 0; }

/* actions compactes par ligne (décisions) */
.lien-action { background: #fff; border: 1px solid #d5dce8; border-radius: 6px; padding: 3px 8px; font: inherit; font-size: 12px; font-weight: 600; color: #475569; cursor: pointer; white-space: nowrap; box-shadow: 0 1px 1px rgba(15, 23, 42, .04); transition: background .12s, border-color .12s; }
.lien-action:hover { color: var(--texte); border-color: #94a3b8; background: #f8fafc; }
.actions-ligne { width: 1%; white-space: nowrap; } .actions-ligne .lien-action { margin-right: 4px; } .actions-ligne .lien-action[disabled] { opacity: .5; cursor: wait; }
.decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; min-width: 156px; }
.decisions .lien-action { margin: 0; padding: 3px 6px; font-size: 11.5px; text-align: center; }
.decisions .lien-action.actif { background: #334155; color: #fff; border-color: #334155; }
.decisions .lien-action.actif[data-statut="a_repondre"] { background: #e11d48; border-color: #e11d48; }
.decisions .lien-action.actif[data-statut="depose"] { background: #7c3aed; border-color: #7c3aed; }
.decisions .lien-action.actif[data-statut="telecharge"] { background: #059669; border-color: #059669; }
.decisions .lien-action.actif:hover { opacity: .88; color: #fff; }
.erreur-action { display: block; margin-top: 3px; white-space: normal; }
.a-confirmer { color: var(--attention); font-weight: 600; }
.barre-selection .bouton { gap: 0; }
.barre-selection { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; flex-wrap: wrap; padding: 12px 16px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }

/* ---------- 8. Onglets = tuiles-compteurs (icône + couleur sémantique = présentation seulement ; liens et compteurs inchangés) ---------- */
.onglets { display: grid; grid-template-columns: repeat(auto-fit, minmax(136px, 1fr)); gap: 12px; margin: 0 0 18px; }
.onglets a { --teinte: #475569; --teinte-fond: #eef1f5; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; min-width: 0; padding: 12px 13px; border-radius: var(--rayon); background: var(--carte); border: 1px solid var(--bord); color: var(--discret); font-size: 12.5px; font-weight: 600; box-shadow: var(--ombre); transition: border-color .12s, box-shadow .12s, transform .12s; }
.onglets a:hover { text-decoration: none; border-color: var(--teinte); box-shadow: var(--ombre-2); transform: translateY(-1px); color: var(--texte-2); }
.onglets a .ico { grid-row: 1 / 3; width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--teinte-fond); color: var(--teinte); stroke-width: 2; }
.onglets a .compte { grid-column: 2; grid-row: 1; color: var(--texte); font-weight: 800; font-size: 22px; line-height: 1.1; letter-spacing: -.02em; }
.onglets a .libelle { grid-column: 2; grid-row: 2; line-height: 1.15; font-size: 12.5px; }
.onglets a.onglet-actifs { --teinte: #16a34a; --teinte-fond: #dcfce7; }
.onglets a.onglet-nouveaux { --teinte: #2563eb; --teinte-fond: #dbeafe; }
.onglets a.onglet-modifies { --teinte: #ea580c; --teinte-fond: #ffedd5; }
.onglets a.onglet-clotures { --teinte: #64748b; --teinte-fond: #e2e8f0; }
.onglets a.onglet-na { --teinte: #475569; --teinte-fond: #e2e8f0; }
.onglets a.onglet-a_repondre { --teinte: #e11d48; --teinte-fond: #ffe4e6; }
.onglets a.onglet-deposes { --teinte: #7c3aed; --teinte-fond: #ede9fe; }
.onglets a.onglet-telecharges { --teinte: #0891b2; --teinte-fond: #cffafe; }
.onglets a.onglet-marches_uniques { --teinte: #0284c7; --teinte-fond: #e0f2fe; }
.onglets a.onglet-tous { --teinte: #1e3a8a; --teinte-fond: #e0e7ff; }
.onglets a.actif { background: linear-gradient(160deg, #14224a, #0b1633); border-color: #0b1633; color: #c7d2e6; box-shadow: 0 8px 20px -10px rgba(11, 22, 51, .8); }
.onglets a.actif .compte { color: #fff; }
.onglets a.actif .ico { background: rgba(255, 255, 255, .12); color: #fff; }
.onglets a.actif:hover { border-color: #0b1633; color: #e2e8f0; }

/* ---------- 9. Formulaires et filtres ---------- */
input, select, textarea { font: inherit; padding: 9px 12px; border: 1px solid #d5dce8; border-radius: var(--rayon-s); background: #fff; color: var(--texte); min-height: 40px; box-shadow: inset 0 1px 2px rgba(15, 23, 42, .03); transition: border-color .12s, box-shadow .12s; }
select { cursor: pointer; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--principal); box-shadow: var(--focus); }
input[type=checkbox], input[type=radio] { min-height: 0; width: 16px; height: 16px; padding: 0; accent-color: var(--principal); margin: 0; box-shadow: none; }
input::placeholder { color: #94a3b8; }
input.court { width: 84px; }
.filtres { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: end; margin: 0 0 18px; padding: 20px 22px; background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); box-shadow: var(--ombre); }
.filtres label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
.filtres label select, .filtres label input { font-weight: 400; min-width: 160px; }
.filtres label input[type=search] { min-width: 240px; }
.filtres label.case input, .barre-selection label.case input { min-width: 0; width: 16px; height: 16px; }
.filtres label.case, .barre-selection label.case { flex-direction: row; align-items: center; gap: 8px; color: var(--texte-2); font-size: 13px; font-weight: 500; min-height: 40px; padding: 0 12px; background: #f6f8fb; border: 1px solid var(--bord); border-radius: var(--rayon-s); cursor: pointer; }
.filtres label.case:hover, .barre-selection label.case:hover { border-color: var(--bord-fort); }
.filtres > a.discret { min-height: 40px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--principal-fonce); padding: 0 4px; border-radius: 6px; }
.filtres > a.discret .ico { width: 15px; height: 15px; }
.filtres > a.discret:hover { text-decoration: none; color: #1e3a8a; }
.formulaire { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; align-items: end; }
.formulaire label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--texte-2); }
.formulaire label input, .formulaire label select { width: 100%; font-weight: 400; }
.formulaire > div, .formulaire > button { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.formulaire > button { display: inline-flex; justify-self: start; }
@media (max-width: 800px) { .formulaire { grid-template-columns: 1fr; } }
/* formulaire compte plateforme : une colonne, largeur limitée */
.formulaire.compte-form { grid-template-columns: 1fr; max-width: 520px; }
.formulaire label br { display: none; }
details summary { cursor: pointer; color: var(--discret); font-weight: 500; }
ul.journal { max-height: 300px; overflow: auto; }

/* ---------- 10. Connexion ---------- */
.connexion { max-width: 420px; margin: 56px auto; padding: 28px 30px; }
.connexion h1 { text-align: center; margin-bottom: 20px; }
.connexion form { display: flex; flex-direction: column; gap: 14px; }
.connexion label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--texte-2); }
.connexion label input { font-weight: 400; }
.connexion .bouton { margin-top: 4px; min-height: 42px; }
.note { color: var(--discret); font-size: 12px; margin-top: 12px; }

/* ---------- 11. Accueil / Recherche ---------- */
.profil-bloc { padding: 18px 20px; background: linear-gradient(180deg, #f5f8ff, #eef3fd); border: 1px solid #d6e2fb; border-radius: 10px; margin-bottom: 20px; }
.profil-titre { font-size: 11.5px; text-transform: uppercase; color: var(--principal-fonce); letter-spacing: .08em; font-weight: 700; }
.profil-entreprise { font-size: 15px; font-weight: 700; color: var(--principal-fonce); margin: 2px 0; }
.profil-nom { font-size: 18px; font-weight: 700; margin: 2px 0 10px; }
dl.resume-profil, dl.fiche { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
dl dt { color: var(--discret); font-weight: 500; } dl dd { margin: 0; }
dl.fiche { gap: 9px 18px; }
dl.fiche dt { padding-top: 1px; }
.lancement { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.tuiles { list-style: none; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.tuiles a { display: block; padding: 16px 18px; background: #f6f8fb; border: 1px solid var(--bord); border-radius: 10px; color: var(--texte); transition: border-color .12s, background .12s, box-shadow .12s; border-left: 4px solid var(--principal); }
.tuiles li:nth-child(1) a { border-left-color: #16a34a; } .tuiles li:nth-child(2) a { border-left-color: #2563eb; } .tuiles li:nth-child(3) a { border-left-color: #ea580c; } .tuiles li:nth-child(4) a { border-left-color: #1e3a8a; }
.tuiles a:hover { background: #fff; text-decoration: none; box-shadow: var(--ombre); }
.tuiles b { display: block; font-size: 28px; font-weight: 800; line-height: 1.1; letter-spacing: -.02em; } .tuiles span { color: var(--discret); font-size: 12px; }
.resume { margin-top: 16px; padding: 16px 18px; border-radius: 10px; border: 1px solid transparent; }
.resume.ok { background: #ecfdf3; border-color: #a7f3c4; border-left: 4px solid #16a34a; } .resume.attention { background: #fffbeb; border-color: #fde68a; border-left: 4px solid #d97706; }
.chiffres { list-style: none; padding: 0; margin: 10px 0; display: flex; gap: 22px; flex-wrap: wrap; }
.chiffres b { font-size: 22px; margin-right: 5px; font-weight: 800; letter-spacing: -.01em; }

/* ---------- 12. Fiche AO ---------- */
.entete-fiche { margin-bottom: 20px; padding: 22px 24px; background: var(--carte); border: 1px solid var(--bord); border-top: 4px solid var(--principal); border-radius: var(--rayon); box-shadow: var(--ombre-2); }
.entete-fiche h1 { font-size: 24px; margin-bottom: 10px; }
.entete-fiche .badges { margin: 6px 0 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.entete-fiche > .discret { font-size: 13px; }
.entete-fiche .actions { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--bord); display: flex; gap: 8px; flex-wrap: wrap; }
.entete-fiche > p.discret.petit { margin: 10px 0 0; }
.note-ao textarea { width: 100%; max-width: 900px; padding: 10px 12px; resize: vertical; display: block; }
.note-couleurs { display: flex; gap: 16px; margin: 12px 0; flex-wrap: wrap; }
.note-couleurs .couleur { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 500; color: var(--texte-2); }
.note-couleurs .pastille { display: inline-block; width: 15px; height: 15px; border-radius: 50%; border: 1px solid #9ca3af; background: #fff; }
.note-couleurs .couleur.jaune .pastille { background: #facc15; border-color: #ca8a04; }
.note-couleurs .couleur.rouge .pastille { background: #ef4444; border-color: #b91c1c; }
.note-couleurs .couleur.vert .pastille { background: #22c55e; border-color: #15803d; }
.note-couleurs .couleur.bleu .pastille { background: #3b82f6; border-color: #1d4ed8; }
.note-ao .actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.note-pastille { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 6px; vertical-align: middle; border: 1px solid #9ca3af; background: #fff; }
.note-pastille.jaune { background: #facc15; border-color: #ca8a04; }
.note-pastille.rouge { background: #ef4444; border-color: #b91c1c; }
.note-pastille.vert { background: #22c55e; border-color: #15803d; }
.note-pastille.bleu { background: #3b82f6; border-color: #1d4ed8; }
/* nom de répertoire proposé : lecture seule + copie en un clic, aucune persistance */
.nom-repertoire { margin: 0 0 18px; padding: 16px 18px; background: linear-gradient(180deg, #f5f8ff, #eef3fd); border: 1px solid #d6e2fb; border-radius: 10px; }
.nom-repertoire label { display: block; margin-bottom: 8px; }
.nom-repertoire-ligne { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 900px; }
.nom-repertoire-ligne input { flex: 1 1 420px; min-width: 240px; background: #fff; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.nom-repertoire-ligne input:focus { outline: none; border-color: var(--principal); box-shadow: var(--focus); }

/* ---------- 13. Responsive ---------- */
@media (max-width: 1200px) { main.principal, .pied { padding-left: 22px; padding-right: 22px; } }
@media (max-width: 700px) {
  html, html.sidebar-compacte { --sidebar-l: 100%; --sb-texte: inline; --sb-bloc: flex; --sb-justif: flex-start; --sb-pad-x: 12px; }
  .sidebar-basculer { display: none; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 0 12px; }
  .sidebar-haut { padding: 10px 6px; border: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; padding: 6px 0; gap: 4px; }
  .nav a { padding: 8px 10px; font-size: 13px; }
  .session { margin-left: auto; flex-direction: row; align-items: center; gap: 14px; border: 0; padding: 8px 6px; }
  .session .email { display: none; }
  main.principal { padding: 18px 16px 8px; } .pied { padding: 10px 16px 18px; }
}
@media (max-width: 600px) {
  .session .entreprise { max-width: 140px; }
  .filtres label, .filtres label select, .filtres label input, .filtres label input[type=search] { min-width: 0; width: 100%; }
  .filtres label { flex: 1 1 100%; }
  .page-entete { flex-direction: column; }
}
