/* cleodata — interface de pilotage de la forge */
:root {
  --fond: #F6F6F3; --carte: #FFFFFF; --bord: #E4E4DF; --bord-fort: #D8D8D2;
  --texte: #17181A; --texte-2: #4A4D52; --texte-3: #5B5E63;
  --accent: #2350C8; --accent-fonce: #1A3D9C; --accent-pale: #EEF1FB;
  --ok: #17643A; --ok-fond: #E7F4EC; --cours: #1A3D9C; --cours-fond: #EEF1FB;
  --attention: #8A4A00; --attention-fond: #FFF3E0; --erreur: #A12A1F; --erreur-fond: #FDECEA;
  --noir: #17181A; --rayon: 14px;
  --police: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --police-titre: "Space Grotesk", var(--police);
  --police-code: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: var(--police); font-size: 15px; line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-fonce); }
h1, h2, h3 { font-family: var(--police-titre); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 34px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
code, pre, .code { font-family: var(--police-code); font-size: 13px; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #A9BDF2; outline-offset: 2px; }

.logo { width: 34px; height: 34px; border-radius: 9px; background: var(--noir); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; }
/* Barre de navigation : une seule barre flottante, qui s'allonge dans un projet */
.dock { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 30; max-width: calc(100vw - 24px);
  transition: transform .25s ease, opacity .25s ease; }
.dock.rangee { transform: translate(-50%, calc(100% + 24px)); opacity: 0; pointer-events: none; }
.barre { display: flex; align-items: center; gap: 2px; padding: 6px; border-radius: 20px; max-width: 100%;
  background: rgba(20,21,23,.94); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4);
  box-shadow: 0 14px 44px rgba(0,0,0,.28), 0 2px 6px rgba(0,0,0,.18), inset 0 0 0 1px rgba(255,255,255,.07); }
.dock svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.menu-logo { display: flex; padding: 2px 4px 2px 2px; text-decoration: none; flex: none; }
.menu-logo .logo { background: #fff; color: var(--noir); width: 36px; height: 36px; border-radius: 11px; }
.menu-liens, .dock-sections, .dock-actions, .segment-projet { display: flex; align-items: center; gap: 2px; }
.segment-projet[hidden], .dock-actions:empty { display: none; }
.menu-liens a, .menu-bouton, .dock-sections a, .dock-action, .dock-nom { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 13px;
  border-radius: 13px; font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; background: none; border: 0; cursor: pointer; white-space: nowrap; color: #BDC0C6;
  transition: background .15s, color .15s; }
.menu-liens a:hover, .menu-bouton:hover, .dock-sections a:hover, .dock-nom:hover { color: #fff; background: rgba(255,255,255,.08); }
.menu-liens a[aria-current="page"], .dock-sections a[aria-current="page"] { color: var(--noir); background: #fff; font-weight: 600; }
.menu-liens a[aria-current="page"] svg, .dock-sections a[aria-current="page"] svg { color: var(--accent); }
.menu-sep { width: 1px; height: 24px; background: rgba(255,255,255,.13); margin: 0 6px; flex: none; }
/* Dans un projet : la navigation générale se réduit à des icônes, le projet prend la place */
.avec-projet .menu-liens .libelle { display: none; }
.avec-projet .menu-liens a { padding: 0 11px; }
.dock-nom { color: #fff; font-family: var(--police-titre); font-weight: 600; font-size: 15px; padding: 0 8px 0 10px; gap: 7px; }
.pastille-projet { width: 10px; height: 10px; border-radius: 3px; background: linear-gradient(135deg, #7FA2FF, #B98CFF); flex: none; }
#dock-nom-texte { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.dock-nom svg { width: 16px; height: 16px; color: #8E9198; }
.dock-actions { margin-left: 4px; }
.dock-action:nth-child(n+3) { padding: 0 11px; } .dock-action:nth-child(n+3) span { display: none; }
.avec-projet .menu-liens a[aria-current="page"] { background: rgba(255,255,255,.1); color: #fff; font-weight: 500; }
.avec-projet .menu-liens a[aria-current="page"] svg { color: inherit; }
.dock-action { color: #fff; background: rgba(255,255,255,.1); font-weight: 600; }
.dock-action:hover { background: rgba(255,255,255,.16); }
.dock-action.principal { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(37,99,235,.45); }
.dock-action.principal:hover { background: #2F5EDB; }
.dock-action.noir { background: #fff; color: var(--noir); }
.dock-action.vert { background: #1F8A4C; color: #fff; box-shadow: 0 4px 14px rgba(31,138,76,.4); }
.menu-recherche kbd { font: 600 11px var(--police); color: #8E9198; border: 1px solid rgba(255,255,255,.16); border-radius: 6px; padding: 2px 6px; }
.avec-projet .menu-recherche .libelle, .avec-projet .menu-recherche kbd { display: none; }
.badge { min-width: 19px; height: 19px; padding: 0 6px; border-radius: 10px; background: #FF8A3D; color: #1B0E00; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.avec-projet .menu-liens .badge, .dock-sections .badge { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px rgba(20,21,23,.94); }
.point-vie { width: 9px; height: 9px; border-radius: 50%; background: #6B6E74; flex: none; }
.point-vie.actif { background: #7FA2FF; animation: pouls 1.6s ease-out infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(127,162,255,.7); } 100% { box-shadow: 0 0 0 10px rgba(127,162,255,0); } }
.menu-plus { padding: 0 11px; }
.menu-plus .etat-forge { position: absolute; top: 9px; right: 7px; display: block; padding: 0; }
.etat-forge .point, .plus-etat .point { display: block; width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 2px rgba(20,21,23,.94); }
.etat-forge.hors .point, .plus-etat.hors .point { background: #FF6B5B; }
@keyframes monter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Menu « ⋯ » */
.menu-plus-liste { position: absolute; bottom: calc(100% + 10px); right: 0; width: 280px; background: var(--carte); border: 1px solid var(--bord); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.22); padding: 6px; display: flex; flex-direction: column; animation: monter .15s ease-out; }
.menu-plus-liste[hidden] { display: none; }
.menu-plus-liste [role="menuitem"] { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 12px; border-radius: 10px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--texte); text-decoration: none; cursor: pointer; text-align: left; }
.menu-plus-liste [role="menuitem"]:hover, .menu-plus-liste [role="menuitem"]:focus-visible { background: #F2F2EE; outline: none; }
.menu-plus-liste [role="menuitem"] > span { flex: 1; }
.menu-plus-liste [role="menuitem"][hidden] { display: none; }
.menu-plus-liste svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--texte-3); }
.menu-plus-liste kbd { font: 600 11px var(--police); border: 1px solid var(--bord-fort); border-radius: 6px; padding: 1px 6px; color: var(--texte-3); }
.menu-plus-liste hr { border: 0; border-top: 1px solid var(--bord); margin: 4px 6px; }
.menu-plus-liste #deconnexion { color: var(--erreur); } .menu-plus-liste #deconnexion svg { color: var(--erreur); }
.plus-etat { display: flex; align-items: center; gap: 10px; padding: 10px 12px; font-size: 13px; color: var(--texte-2); border-bottom: 1px solid var(--bord); margin-bottom: 4px; }
.plus-etat .point { box-shadow: none; }
.seul-tel { display: none !important; }

/* Panneau d'activité */
.panneau-activite { position: absolute; bottom: calc(100% + 10px); right: 0; width: min(420px, calc(100vw - 20px)); max-height: 60vh; overflow: auto;
  background: var(--carte); border: 1px solid var(--bord); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,.2); padding: 14px; display: flex; flex-direction: column; gap: 14px; animation: monter .15s ease-out; }
.avec-projet .panneau-activite { bottom: calc(100% + 10px); }
.activite-bloc h3 { font-size: 14px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.activite-bloc .compte { font-family: var(--police); font-size: 12px; background: #F0F0EC; border-radius: 10px; padding: 1px 8px; }
.activite-bloc p { margin: 0; font-size: 13px; }
.activite-ligne { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 10px; color: var(--texte); text-decoration: none; font-size: 14px; font-weight: 500; }
.activite-ligne:hover { background: #F6F6F3; color: var(--texte); }
.activite-ligne .urgent { color: var(--erreur); }

/* Palette de commandes */
.palette-fond { position: fixed; inset: 0; z-index: 50; background: rgba(23,24,26,.35); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 12px 12px; }
.palette { width: min(640px, 100%); background: var(--carte); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.3); overflow: hidden; display: flex; flex-direction: column; max-height: 70vh; animation: monter .15s ease-out; }
.palette svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; color: var(--texte-3); }
.palette-tete { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--bord); }
.palette-tete input { border: 0; outline: 0; font: inherit; font-size: 17px; flex: 1; background: none; padding: 4px 0; }
#palette-liste { list-style: none; margin: 0; padding: 6px; overflow: auto; }
.palette-groupe { font-size: 12px; font-weight: 600; color: var(--texte-3); padding: 10px 12px 4px; }
.palette-element { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.palette-element.choisi { background: var(--accent-pale); }
.palette-element.choisi svg { color: var(--accent); }
.palette-element.inerte { cursor: default; }
.palette-libelle { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-detail { color: var(--texte-3); font-size: 13px; white-space: nowrap; }
.palette kbd, .palette-pied kbd { font: 600 11px var(--police); border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px; color: var(--texte-2); background: #FAFAF8; }
.palette-vide { padding: 18px 12px; color: var(--texte-3); font-size: 14px; }
.palette-pied { display: flex; flex-wrap: wrap; gap: 14px; padding: 10px 18px; border-top: 1px solid var(--bord); font-size: 12px; color: var(--texte-3); background: #FAFAF8; }
.avec-projet .contenu { padding-bottom: 120px; }
.lisible-seul { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.contenu { max-width: 1400px; margin: 0 auto; padding: 28px 24px 120px; display: flex; flex-direction: column; gap: 22px; }
.chargement { color: var(--texte-3); }
.tete-page { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; padding-bottom: 4px; }
.tete-texte { display: flex; flex-direction: column; min-width: 0; flex: 1 1 420px; }
.tete-page h1 { line-height: 1.15; overflow-wrap: anywhere; }
.tete-page .description { margin: 8px 0 0; color: var(--texte-2); max-width: 760px; line-height: 1.5; }
.tete-page .pastilles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tete-page .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fil-ariane ol { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; list-style: none; margin: 0 0 8px; padding: 0; font-size: 13px; }
.fil-ariane li + li::before { content: "›"; margin: 0 6px 0 2px; color: var(--texte-3); }
.fil-ariane a { color: var(--texte-2); text-decoration: none; font-weight: 500; border-radius: 6px; padding: 2px 2px; }
.fil-ariane a:hover { color: var(--accent); }
.surtitre { font-size: 13px; font-weight: 600; color: var(--texte-3); margin-bottom: 4px; }
.groupe-publier { display: inline-flex; align-items: stretch; }
.groupe-publier select { width: auto; border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
.groupe-publier .bouton { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.adresse-git { font-size: 13px; background: var(--carte); border: 1px solid var(--bord); border-radius: 10px; padding: 9px 12px; color: var(--texte-2); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revue-avancement { display: flex; flex-direction: column; gap: 6px; min-width: 220px; align-items: flex-end; }
.revue-avancement .jauge { width: 100%; }
.fil { display: inline-flex; gap: 6px; align-items: center; font-weight: 600; font-size: 14px; text-decoration: none; min-height: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.carte { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 20px; }
.carte.sombre { background: var(--noir); color: #fff; border-color: var(--noir); }
/* Carte mise en avant : une seule forme dans toute l'application, claire et teintée */
.carte.mise-en-avant { background: linear-gradient(180deg, #F3F6FF, #FAFBFF); border-color: #D6E0FF; }
.carte.mise-en-avant h2 { color: var(--accent-fonce); }
/* Tuiles de chiffres : même allure partout */
a.tuile { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.tuile:hover { border-color: var(--bord-fort); box-shadow: 0 4px 16px rgba(0,0,0,.05); }
.tuile.a-traiter { border-color: #FFC9A3; background: linear-gradient(180deg, #FFF6EF, #FFFFFF); }
.tuile.a-traiter .chiffre { color: #C2410C; }
.vide-carte { text-align: center; padding: 36px; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.carte.sombre .discret-texte { color: #C9CCD1; }
.grille { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min, 300px)), 1fr)); }
.pile { display: flex; flex-direction: column; gap: var(--gap, 12px); }
.ligne { display: flex; flex-wrap: wrap; gap: var(--gap, 12px); align-items: var(--aligne, center); }
.ecarte { justify-content: space-between; }
.discret-texte { color: var(--texte-3); font-size: 13px; }
.chiffre { font-family: var(--police-titre); font-size: 26px; font-weight: 700; }
.vide { color: var(--texte-3); padding: 18px; text-align: center; }

.bouton { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px;
  border-radius: 10px; border: 1px solid var(--bord-fort); background: var(--carte); color: var(--texte);
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; }
.bouton:hover { border-color: #B9BBC0; color: var(--texte); }
.bouton.principal { background: var(--accent); border-color: var(--accent); color: #fff; }
.bouton.principal:hover { background: var(--accent-fonce); color: #fff; }
.bouton.noir { background: var(--noir); border-color: var(--noir); color: #fff; }
.bouton.vert { background: #2E9E5B; border-color: #2E9E5B; color: #fff; }
.bouton.danger { color: var(--erreur); border-color: #E8B4AE; }
.bouton.discret { border-color: transparent; background: transparent; color: var(--texte-2); min-height: 40px; }
.bouton.petit { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.bouton[disabled] { opacity: .55; cursor: wait; }

.pastille { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pastille.ok { background: var(--ok-fond); color: var(--ok); }
.pastille.cours { background: var(--cours-fond); color: var(--cours); }
.pastille.attention { background: var(--attention-fond); color: var(--attention); }
.pastille.erreur { background: var(--erreur-fond); color: var(--erreur); }
.pastille.neutre { background: #F1F1EC; color: #3E4146; }

label.champ { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input[type=text], input[type=password], input[type=search], textarea, select {
  font: inherit; font-weight: 400; font-size: 15px; color: var(--texte); background: #fff;
  border: 1px solid #C9C9C2; border-radius: 10px; padding: 10px 12px; min-height: 44px; width: 100%; }
textarea { resize: vertical; line-height: 1.55; }
.aide { font-size: 13px; color: var(--texte-3); font-weight: 400; }

.onglets { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--bord); }
.onglets a, .onglets button { padding: 10px 14px; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--texte-2); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer; }
.onglets [aria-current="page"], .onglets [aria-selected="true"] { color: var(--texte); border-bottom-color: var(--accent); }

.colonnes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
.colonne { background: #EDEDE8; border-radius: 16px; padding: 12px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.colonne h3 { font-family: var(--police); font-size: 14px; display: flex; justify-content: space-between; padding: 2px 4px; }
.fiche { display: flex; flex-direction: column; gap: 6px; background: #fff; border: 1px solid #E0E0DA; border-radius: 12px; padding: 12px; color: var(--texte); text-decoration: none; }
.fiche:hover { border-color: #B9BBC0; color: var(--texte); }
.fiche .surtitre { font-size: 12px; font-weight: 600; color: var(--texte-3); text-transform: uppercase; letter-spacing: .04em; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste > li { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid #ECECE7; }
.liste > li:last-child { border-bottom: 0; }

.code-zone { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); overflow: hidden; }
.code-entete { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px 14px; background: #FAFAF8; border-bottom: 1px solid var(--bord); font-size: 13px; }
.code-lignes { margin: 0; padding: 10px 0; overflow-x: auto; counter-reset: ligne; }
.code-lignes span.l { display: block; white-space: pre; padding-right: 16px; line-height: 1.7; }
.code-lignes span.l::before { counter-increment: ligne; content: counter(ligne); display: inline-block; width: 48px; padding-right: 14px; text-align: right; color: #8A8D92; user-select: none; }
.arbre { list-style: none; margin: 0; padding: 6px; max-height: 620px; overflow: auto; }
.arbre button { width: 100%; display: flex; gap: 8px; align-items: center; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px;
  background: none; font-family: var(--police-code); font-size: 13px; color: var(--texte); cursor: pointer; text-align: left; }
.arbre button[aria-current="true"] { background: var(--accent-pale); color: var(--accent-fonce); }
.arbre .dossier { color: #8A6D1F; font-weight: 500; cursor: default; }
.diff span.l { display: block; white-space: pre; padding: 0 16px; line-height: 1.65; }
.diff .plus { background: #E9F6EE; color: #17482B; } .diff .moins { background: #FCEDEB; color: #6E1E16; }
.diff .entete-fichier { background: #F1F1EC; font-weight: 600; padding: 6px 16px; margin-top: 8px; }
.journal { background: var(--noir); color: #E8EAED; border-radius: var(--rayon); padding: 14px 16px; margin: 0; max-height: 520px; overflow: auto; white-space: pre-wrap; word-break: break-word; line-height: 1.6; }

.echange { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; max-width: 88%; }
.echange.ia { align-self: flex-start; background: #F1F3F9; }
.echange.moi { align-self: flex-end; background: var(--fond); border: 1px solid var(--bord); }
.echange .texte { white-space: pre-wrap; word-break: break-word; }

.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.connexion form { width: 100%; max-width: 380px; }
.annonces { position: fixed; top: 16px; right: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 20; }
.annonce { background: var(--noir); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 14px; max-width: 380px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.annonce.erreur { background: var(--erreur); }
.commande { display: flex; flex-wrap: wrap; gap: 8px; }
.commande code { flex: 1 1 320px; background: var(--noir); color: #E8EAED; padding: 12px 14px; border-radius: 10px; word-break: break-all; }
.jauge { display: block; height: 8px; border-radius: 4px; background: #ECECE7; overflow: hidden; }
.jauge > span { display: block; height: 100%; border-radius: 4px; background: #1F8A4C; }
table.tableau { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tableau th { text-align: left; color: var(--texte-2); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--bord); background: #FAFAF8; }
table.tableau td { padding: 12px; border-bottom: 1px solid #ECECE7; vertical-align: top; }
.defile { overflow-x: auto; }
@media (max-width: 700px) {
  h1 { font-size: 28px; } .contenu { padding: 20px 14px 120px; }
  /* Téléphone : une barre d'onglets pleine largeur */
  .dock { left: 8px; right: 8px; bottom: 8px; transform: none; max-width: none; }
  .dock.rangee { transform: translateY(calc(100% + 16px)); }
  .barre { justify-content: space-between; gap: 0; padding: 5px; border-radius: 18px; }
  .menu-logo, .menu-sep, .menu-recherche kbd, .dock-nom { display: none; }
  .menu-liens, .dock-sections { flex: 1; justify-content: space-around; }
  .avec-projet .menu-liens { flex: none; }
  .avec-projet .menu-liens .secondaire, .avec-projet #ouvrir-activite { display: none; }
  .seul-tel { display: flex !important; }
  .menu-liens a, .menu-bouton, .dock-sections a { flex-direction: column; gap: 3px; min-height: 52px; padding: 5px 7px; font-size: 10.5px; border-radius: 12px; }
  .menu-liens .libelle, .menu-bouton .libelle, .dock-sections .libelle { display: block !important; }
  .menu-liens a[aria-current="page"], .dock-sections a[aria-current="page"] { background: rgba(255,255,255,.12); color: #fff; }
  .menu-liens a[aria-current="page"] svg, .dock-sections a[aria-current="page"] svg { color: #7FA2FF; }
  .badge, .avec-projet .menu-liens .badge, .dock-sections .badge { position: absolute; top: 2px; right: 50%; margin-right: -22px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; }
  .menu-activite .point-vie { margin: 5px 0; }
  .dock-actions { margin-left: 2px; }
  .dock-action { padding: 0; width: 46px; min-height: 46px; justify-content: center; border-radius: 14px; }
  .dock-action span { display: none; }
  .dock-action:not(.cle) { display: none; }
  .avec-projet #ouvrir-palette { display: none; }
  .avec-projet .menu-liens a { padding: 5px 6px; }
  .dock-sections a { flex: 1 1 auto; min-width: 0; padding: 5px 3px; }
  .menu-liens a, .menu-bouton, .dock-sections a { font-size: 10px; letter-spacing: -.1px; }
  .menu-plus { min-width: 44px; }
  .menu-plus .etat-forge { top: 7px; right: 6px; }
  .menu-plus-liste { width: auto; left: 0; }
  .panneau-activite { right: 0; left: 0; width: auto; }
  .palette-fond { padding-top: 10px; }
  .annonces { left: 10px; right: 10px; top: 10px; }
}
.contenu:focus { outline: none; }

/* Fil « À faire maintenant » */
.fil-attention { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px 20px; }
.fil-attention h2 { font-size: 16px; margin-bottom: 8px; }
.fil-attention ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fil-attention li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--bord); }
.fil-attention li:first-child { border-top: 0; }
.fil-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fil-point { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--texte-3); }
.niveau-action .fil-point { background: #FF8A3D; box-shadow: 0 0 0 4px rgba(255,138,61,.18); }
.niveau-alerte .fil-point { background: var(--erreur); box-shadow: 0 0 0 4px rgba(200,40,40,.15); }
.niveau-info .fil-point { background: var(--accent); }
.fil-attention.calme { display: flex; align-items: center; gap: 12px; background: #EEF8F1; border-color: #CDEBD7; }
.fil-icone { width: 32px; height: 32px; border-radius: 50%; background: #1F8A4C; color: #fff; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.fil-icone svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fil-icone.grand { width: 64px; height: 64px; align-self: center; } .fil-icone.grand svg { width: 34px; height: 34px; }

/* Mode revue */
.revue-avancement { width: min(260px, 100%); }
.revue-grille { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.revue-message { font-size: 15px; line-height: 1.6; white-space: pre-wrap; }
.revue-demande { white-space: pre-wrap; margin: 8px 0 0; }
.revue-apercu { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.cadre-apercu { border: 1px solid var(--bord); border-radius: 12px; overflow: hidden; background: #fff; height: min(62vh, 640px); }
.cadre-apercu iframe { width: 100%; height: 100%; border: 0; display: block; }
.liste-fichiers { list-style: none; margin: 0; padding: 0; }
.liste-fichiers li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--bord); font-size: 13px; }
.liste-fichiers li:first-child { border-top: 0; }
.liste-fichiers .code:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.revue-barre { display: flex; align-items: center; gap: 14px; margin: -8px 0 18px; flex-wrap: wrap; }
kbd.touche { font: 600 11px var(--police); border: 1px solid var(--bord-fort); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--carte); }
.bouton kbd { font: 600 11px var(--police); border: 1px solid var(--bord-fort); border-radius: 5px; padding: 0 5px; margin-left: 4px; color: var(--texte-3); }
.revue-fin { max-width: 560px; margin: 8vh auto 0; text-align: center; align-items: center; --gap: 12px; padding: 36px; }
.revue-fin p { color: var(--texte-2); }
details summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--texte-2); }

/* Dictée */
.avec-dictee { position: relative; }
.avec-dictee textarea { padding-right: 52px; width: 100%; }
.bouton-dictee { position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--bord); background: var(--carte); color: var(--texte-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.bouton-dictee svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bouton-dictee:hover { color: var(--accent); border-color: var(--accent); }
.bouton-dictee.ecoute { background: var(--erreur); border-color: var(--erreur); color: #fff; animation: pouls-rouge 1.4s ease-out infinite; }
@keyframes pouls-rouge { 0% { box-shadow: 0 0 0 0 rgba(200,40,40,.5); } 100% { box-shadow: 0 0 0 12px rgba(200,40,40,0); } }
.activite-notif { border-top: 1px solid var(--bord); padding-top: 12px; }
.panneau-activite > .bouton { align-self: stretch; text-align: center; }

@media (max-width: 900px) {
  .revue-grille { grid-template-columns: 1fr; }
  .revue-apercu { position: static; order: -1; }
  .cadre-apercu { height: 46vh; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Retouches : lignes commentables, repères sur l'aperçu, plateau */
.diff .l.commentable { cursor: pointer; position: relative; }
.diff .l.commentable:hover { box-shadow: inset 3px 0 0 var(--accent); background-color: rgba(37,99,235,.06); }
.diff .l.commentee { box-shadow: inset 3px 0 0 #FF8A3D; }
.diff .l .num { display: inline-block; width: 3.2em; color: var(--texte-3); user-select: none; text-align: right; margin-right: 1em; }
.diff .l.bloc { color: var(--texte-3); background: #F0F0EC; font-style: italic; }
.bulle-edition, .bulle-retouche { white-space: normal; font-family: var(--police); font-size: 14px; margin: 6px 12px 8px 4.2em; border-radius: 12px; }
.bulle-edition { background: var(--carte); border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 10px; display: flex; flex-direction: column; gap: 8px; color: var(--texte); }
.bulle-edition textarea { width: 100%; }
.bulle-edition.flottante { position: absolute; width: min(320px, 90%); margin: 0; z-index: 3; }
.bulle-titre { font-size: 13px; color: var(--texte-2); }
.bulle-retouche { background: #FFF6EE; border: 1px solid #FFD8B5; padding: 8px 10px; display: flex; gap: 8px; align-items: flex-start; color: var(--texte); }
.numero-retouche { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #FF8A3D; color: #1B0E00; font: 700 12px var(--police); display: inline-flex; align-items: center; justify-content: center; }
.liste-retouches, .notes-recette { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.liste-retouches li, .notes-recette li { display: flex; gap: 10px; align-items: flex-start; background: #F6F6F3; border-radius: 12px; padding: 10px; }
.retouche-texte { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.bouton-icone { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--texte-3); cursor: pointer; padding: 2px 6px; border-radius: 8px; }
.bouton-icone:hover { background: #E8E8E2; color: var(--texte); }
.vignette { flex: none; width: 96px; height: 60px; border-radius: 8px; overflow: hidden; border: 1px solid var(--bord); background: #fff; display: flex; align-items: center; justify-content: center; color: var(--texte-3); }
.vignette img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.cadre-apercu { position: relative; }
.calque-annotation { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.annotation .calque-annotation { pointer-events: auto; cursor: crosshair; background: rgba(37,99,235,.05); outline: 2px dashed var(--accent); outline-offset: -2px; }
.repere { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%; background: #FF8A3D; color: #1B0E00; font: 700 13px var(--police);
  display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 3px #fff, 0 4px 14px rgba(0,0,0,.3); pointer-events: auto; }
.repere.provisoire { background: var(--accent); color: #fff; }
.bouton-annoter[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }
.petit-champ input { min-height: 34px; }

/* Récapitulatif de recette */
.recap-recette { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; margin-top: 20px; }
.fiche-recette { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.fiche-recette img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--bord); background: #fff; }
.sans-capture { aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center; color: var(--texte-3); background: #F6F6F3; border-bottom: 1px solid var(--bord); }
@media print {
  .dock, .annonces, .palette-fond, .actions, .fil { display: none !important; }
  body { background: #fff; } .contenu { padding: 0 !important; max-width: none; }
  .carte { box-shadow: none; break-inside: avoid; }
  .recap-recette { grid-template-columns: 1fr 1fr; }
  .fiche-recette img { aspect-ratio: auto; object-fit: contain; }
}
/* Modifications commentables : on montre les vrais numéros de ligne du fichier, pas un compteur */
.diff span.l.commentable::before, .diff span.l.entete-fichier::before, .diff span.l.bloc::before { content: none; }
.diff .l.entete-fichier, .diff .l.bloc { padding-left: 14px; }
.diff .l .num { width: 48px; padding-right: 14px; margin-right: 0; color: #8A8D92; }
.lignes-cliquables .l { cursor: pointer; }
.lignes-cliquables .l:hover { background: rgba(37,99,235,.06); box-shadow: inset 3px 0 0 var(--accent); }

/* Modules et couverture de recette */
.module-note { align-self: flex-start; font-size: 12px; color: #5B21B6; background: #F3EEFF; border-radius: 8px; padding: 3px 8px; }
.module-note code { font-size: 11px; }
.couverture { margin-top: 20px; }
.couverture-page h3 { font-size: 14px; margin: 8px 0 4px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.couverture-page ul { list-style: none; margin: 0; padding: 0; }
.couverture-page li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--bord); flex-wrap: wrap; }
.module-nom { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.etat-module { width: 12px; height: 12px; border-radius: 50%; flex: none; background: transparent; border: 2px dashed var(--bord-fort); }
.etat-module.panne { background: var(--erreur); border: 0; } .etat-module.faux { background: #E65100; border: 0; }
.etat-module.idee { background: var(--accent); border: 0; } .etat-module.ok { background: var(--ok); border: 0; }
.pistes-note { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.pistes-note li { background: var(--attention-fond); color: var(--attention); border-radius: 8px; padding: 4px 8px; }
.zoom-recette { display: block; align-self: flex-start; max-width: 100%; border: 1px solid var(--bord); border-radius: 10px; overflow: hidden; }
.zoom-recette img { display: block; max-width: 100%; max-height: 180px; }
.fiche-recette pre.code-lignes .l { white-space: pre-wrap; word-break: break-all; }
.verif-ia { border: 1px solid var(--bord); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; background: #FAFAF8; margin-top: 6px; }
.verif-ia ul { margin: 0; padding-left: 18px; font-size: 13px; }
.verif-etapes { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.verif-etapes a { flex: none; width: 150px; display: flex; flex-direction: column; gap: 4px; color: var(--texte-2); text-decoration: none; font-size: 12px; }
.verif-etapes img { width: 150px; height: 96px; object-fit: cover; object-position: top left; border: 1px solid var(--bord); border-radius: 8px; background: #fff; }
.pastille.externe { background: #F3EEFF; color: #5B21B6; }
.ou-ia { margin: 0; font-size: 13px; background: #F7F5FF; border: 1px solid #E6DEFF; border-radius: 10px; padding: 8px 12px; color: var(--texte-2); }
.onglets-ia { display: flex; gap: 4px; flex-wrap: wrap; background: #F2F2EE; border-radius: 12px; padding: 4px; align-self: flex-start; }
.onglets-ia button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 500; padding: 8px 12px; border-radius: 9px; cursor: pointer; color: var(--texte-2); }
.onglets-ia button[aria-selected="true"] { background: var(--carte); color: var(--texte); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.config-ia .l { white-space: pre-wrap; word-break: break-all; }
.config-ia span.l::before { content: none; } .config-ia { padding: 12px 16px; }

@media (max-width: 700px) {
  .tete-page { align-items: stretch; }
  .tete-page .actions { width: 100%; }
  .revue-avancement { align-items: flex-start; min-width: 0; width: 100%; }
}
