/* Jarvis LN Media : charte LN Media (bleu nuit #0B0C1A, accent #5457EA, Lora + Poppins).
   Principe : un espace de travail clair et calme, le bleu nuit pour la structure, l'accent seulement pour agir. */
:root {
  --nuit: #0B0C1A;
  --nuit-2: #15172B;
  --nuit-3: #22253F;
  --encre: #14152A;
  --encre-2: #555874;
  --encre-3: #8B8EA6;
  --papier: #F7F7FB;
  --blanc: #FFFFFF;
  --brume: #EDEEF6;
  --trait: #E3E4EF;
  --accent: #5457EA;
  --accent-2: #4144D1;
  --accent-voile: #EEEEFD;
  --vert: #1F9D6B;  --vert-voile: #E5F5EE;
  --ambre: #B7700F; --ambre-voile: #FBF1E1;
  --rouge: #D0384A; --rouge-voile: #FCE9EB;
  --r-s: 8px; --r-m: 12px; --r-l: 16px;
  --ombre: 0 1px 2px rgba(11, 12, 26, .05), 0 8px 24px -12px rgba(11, 12, 26, .12);
  --ombre-haute: 0 24px 64px -16px rgba(11, 12, 26, .35);
  --titre: 'Lora', Georgia, serif;
  --corps: 'Poppins', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 13.5px/1.55 var(--corps); color: var(--encre); background: var(--papier); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; color: inherit; }
a { color: var(--accent); text-decoration: none; }
[hidden] { display: none !important; }
::selection { background: var(--accent-voile); }

/* ---------- Coquille ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
.side { background: var(--nuit); color: #C9CBE0; display: flex; flex-direction: column; overflow-y: auto; }
.side-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; }
.side-brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 13px; letter-spacing: .02em; }
.side-brand .nom { font-family: var(--titre); font-size: 19px; color: #fff; line-height: 1.1; }
.side-brand .sous { font-size: 11.5px; color: #8285A6; }
.nav-groupe { padding: 6px 12px 10px; }
.nav-groupe h6 { margin: 10px 10px 6px; font: 500 11.5px var(--corps); color: #6E7194; }
.nav-lien { display: flex; align-items: center; gap: 11px; padding: 7px 10px; border-radius: var(--r-s); color: #C9CBE0; font-size: 13.5px; }
.nav-lien svg { width: 17px; height: 17px; flex: none; opacity: .75; }
.nav-lien:hover { background: var(--nuit-2); color: #fff; }
.nav-lien.actif { background: var(--nuit-3); color: #fff; }
.nav-lien.actif svg { opacity: 1; color: #A9ABFF; }
.nav-lien .compte { margin-left: auto; font-size: 11px; background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; min-width: 19px; text-align: center; line-height: 18px; }
.side-pied { margin-top: auto; padding: 14px 20px 18px; font-size: 11.5px; color: #6E7194; border-top: 1px solid var(--nuit-2); }
.side-pied .ok { color: #7BD8B3; }

.principal { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.barre-haut { display: flex; align-items: center; gap: 14px; padding: 12px 28px; border-bottom: 1px solid var(--trait); background: rgba(247, 247, 251, .85); backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 5; }
.fil-ariane { color: var(--encre-3); font-size: 13px; }
.fil-ariane b { color: var(--encre); font-weight: 500; }
.recherche { margin-left: auto; display: flex; align-items: center; gap: 10px; width: 340px; padding: 7px 12px; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-s); color: var(--encre-3); cursor: pointer; }
.recherche:hover { border-color: #C9CBE0; }
.recherche kbd, kbd { margin-left: auto; font: 11px var(--corps); background: var(--brume); border-radius: 5px; padding: 1px 6px; color: var(--encre-2); }
.btn-jarvis { display: flex; align-items: center; gap: 9px; padding: 7px 14px 7px 8px; border-radius: 99px; border: 0; background: var(--nuit); color: #fff; font-weight: 500; }
.btn-jarvis .orbe { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #B9BBFF, var(--accent) 55%, #2A2C9E); box-shadow: 0 0 0 3px rgba(84, 87, 234, .25); }
.btn-jarvis:hover { background: var(--nuit-3); }
.contenu { flex: 1; overflow-y: auto; padding: 30px 36px 80px; }
.page { max-width: 1240px; margin: 0 auto; }

/* ---------- En-tete de page ---------- */
.entete { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.entete h1 { font: 500 30px/1.15 var(--titre); margin: 0; letter-spacing: -.01em; }
.entete p { margin: 6px 0 0; color: var(--encre-2); max-width: 62ch; }
.entete .droite { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.onglets { display: flex; gap: 2px; border-bottom: 1px solid var(--trait); margin: -6px 0 22px; }
.onglets a { padding: 9px 14px; color: var(--encre-2); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.onglets a:hover { color: var(--encre); }
.onglets a.actif { color: var(--encre); border-color: var(--accent); font-weight: 500; }
h2 { font: 500 18px var(--titre); margin: 32px 0 12px; }
h3 { font: 600 13.5px var(--corps); margin: 0 0 8px; }
.muet { color: var(--encre-3); }
.petit { font-size: 12px; }

/* ---------- Boutons et champs ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: var(--r-s); padding: 7px 14px; font-weight: 500; background: var(--accent); color: #fff; white-space: nowrap; }
.btn:hover { background: var(--accent-2); }
.btn.sec { background: var(--blanc); color: var(--encre); border-color: var(--trait); }
.btn.sec:hover { border-color: #C9CBE0; background: var(--blanc); }
.btn.nu { background: none; color: var(--encre-2); padding: 7px 10px; }
.btn.nu:hover { background: var(--brume); color: var(--encre); }
.btn.danger { background: var(--blanc); color: var(--rouge); border-color: #F2C7CC; }
.btn.ok { background: var(--vert); } .btn.ok:hover { background: #188459; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn svg { width: 15px; height: 15px; }
.lien-ext::after { content: ''; display: inline-block; width: 9px; height: 9px; margin-left: 6px; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M4 2h6v6M10 2 3 9' stroke='black' stroke-width='1.6' fill='none'/%3E%3C/svg%3E") center/contain no-repeat; opacity: .6; }
input, select, textarea { font: inherit; color: var(--encre); background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-s); padding: 8px 11px; width: 100%; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
textarea { resize: vertical; min-height: 80px; line-height: 1.55; }
label.champ { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--encre-2); font-weight: 500; }
label.champ .aide { font-weight: 400; color: var(--encre-3); font-size: 11.5px; }
label.champ.requis > span:first-child::after { content: ' *'; color: var(--rouge); }
.grille-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.grille-form .large { grid-column: 1 / -1; }
.coche { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--encre); }
.coche input { width: auto; accent-color: var(--accent); }
.choix { display: flex; gap: 8px; flex-wrap: wrap; }
.choix label { border: 1px solid var(--trait); border-radius: var(--r-s); padding: 8px 12px; cursor: pointer; background: var(--blanc); font-size: 13px; }
.choix input { display: none; }
.choix label:has(input:checked) { border-color: var(--accent); background: var(--accent-voile); color: var(--accent-2); font-weight: 500; }

/* ---------- Surfaces ---------- */
.panneau { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); padding: 20px 22px; }
.panneau + .panneau { margin-top: 14px; }
.panneau-tete { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.panneau-tete h3 { margin: 0; }
.panneau-tete .droite { margin-left: auto; display: flex; gap: 6px; }
.colonnes { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.colonnes.egales { grid-template-columns: 1fr 1fr; }

/* Chiffres du cockpit : une bande, pas des cartes empilees */
.bande { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); margin-bottom: 18px; }
.bande > * { padding: 16px 20px; border-right: 1px solid var(--trait); }
.bande > *:last-child { border-right: 0; }
.bande .v { font: 500 26px/1.1 var(--titre); }
.bande .k { color: var(--encre-2); font-size: 12.5px; margin-top: 4px; }
.bande a { color: inherit; display: block; }
.bande a:hover .v { color: var(--accent); }

/* Listes */
.lignes { display: flex; flex-direction: column; }
.ligne { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--brume); }
.ligne:last-child { border-bottom: 0; }
.ligne .t { font-weight: 500; }
.ligne .s { color: var(--encre-3); font-size: 12.5px; }
.ligne .fin { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.ligne.clic { cursor: pointer; border-radius: var(--r-s); padding-left: 8px; padding-right: 8px; margin: 0 -8px; }
.ligne.clic:hover { background: var(--papier); }
.puce { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--encre-3); }
.puce.urgent { background: var(--rouge); } .puce.important { background: var(--ambre); } .puce.ok { background: var(--vert); } .puce.info { background: var(--accent); }
.vide { padding: 26px; text-align: center; color: var(--encre-3); border: 1px dashed var(--trait); border-radius: var(--r-m); background: var(--blanc); }

/* Etiquettes */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 2px 9px; border-radius: 99px; background: var(--brume); color: var(--encre-2); white-space: nowrap; }
.tag.accent { background: var(--accent-voile); color: var(--accent-2); }
.tag.ok { background: var(--vert-voile); color: var(--vert); }
.tag.important { background: var(--ambre-voile); color: var(--ambre); }
.tag.urgent { background: var(--rouge-voile); color: var(--rouge); }
.tag.demo { background: var(--accent-voile); color: var(--accent-2); font-weight: 400; }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--brume); color: var(--encre-2); display: inline-grid; place-items: center; font-size: 10.5px; font-weight: 600; flex: none; }

/* Tableaux */
.tableau { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); overflow: hidden; }
.tableau th { text-align: left; font-weight: 500; color: var(--encre-3); font-size: 12px; padding: 11px 14px; border-bottom: 1px solid var(--trait); background: var(--blanc); }
.tableau td { padding: 12px 14px; border-bottom: 1px solid var(--brume); vertical-align: middle; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tbody tr.clic { cursor: pointer; }
.tableau tbody tr.clic:hover td { background: var(--papier); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(205px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 6px; align-items: start; }
.col { background: var(--brume); border-radius: var(--r-l); padding: 10px; min-height: 120px; }
.col-tete { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 500; font-size: 13px; }
.col-tete .n { color: var(--encre-3); font-weight: 400; }
.col.survol { outline: 2px dashed var(--accent); outline-offset: -2px; }
.carte { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-m); padding: 11px 12px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 1px rgba(11, 12, 26, .03); }
.carte:hover { border-color: #C9CBE0; }
.carte.tire { opacity: .45; }
.carte .t { font-weight: 500; line-height: 1.35; }
.carte .s { color: var(--encre-3); font-size: 12px; margin-top: 3px; }
.carte .pied { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.carte .pied .avatar { margin-left: auto; }
.col-ajout { width: 100%; text-align: left; border: 0; background: none; color: var(--encre-3); padding: 6px 8px; border-radius: var(--r-s); }
.col-ajout:hover { background: rgba(255,255,255,.7); color: var(--encre); }

/* Graphique en barres simple */
.barres { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.barres .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.barres .b span { width: 100%; max-width: 46px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.barres .b span.sec { background: #C8C9F7; }
.barres .b small { color: var(--encre-3); font-size: 11px; }
.barres .b em { font-style: normal; font-size: 11.5px; font-weight: 500; }

/* ---------- Onboarding ---------- */
.parcours { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 22px; align-items: start; }
.etapes { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); padding: 8px; position: sticky; top: 8px; }
.etape { color: var(--encre); display: flex; gap: 12px; padding: 11px 12px; border-radius: var(--r-m); cursor: pointer; align-items: flex-start; }
.etape:hover { background: var(--papier); }
.etape.actif { background: var(--accent-voile); }
.etape .rond { width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--trait); display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: var(--encre-3); flex: none; background: var(--blanc); margin-top: 1px; }
.etape.fait .rond { background: var(--vert); border-color: var(--vert); color: #fff; }
.etape.attente .rond { border-color: var(--ambre); color: var(--ambre); }
.etape.cours .rond { border-color: var(--accent); color: var(--accent); }
.etape.erreur .rond { border-color: var(--rouge); color: var(--rouge); }
.etape .t { font-weight: 500; line-height: 1.3; }
.etape .s { font-size: 12px; color: var(--encre-3); }
.etape.actif .t { color: var(--accent-2); }
.progression { height: 4px; background: var(--brume); border-radius: 99px; margin: 8px 12px 10px; overflow: hidden; }
.progression span { display: block; height: 100%; background: var(--vert); border-radius: 99px; transition: width .4s; }
.encart { border-radius: var(--r-m); padding: 12px 14px; background: var(--papier); border: 1px solid var(--trait); color: var(--encre-2); }
.encart.info { background: var(--accent-voile); border-color: #D9DAFB; color: var(--accent-2); }
.encart.ok { background: var(--vert-voile); border-color: #BFE6D4; color: var(--vert); }
.encart.alerte { background: var(--ambre-voile); border-color: #F1D9B0; color: var(--ambre); }
.encart.erreur { background: var(--rouge-voile); border-color: #F2C7CC; color: var(--rouge); }
.sections-page { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.section-page { border: 1px solid var(--trait); border-radius: var(--r-m); padding: 14px; }
.section-page ol { margin: 8px 0 0; padding-left: 18px; color: var(--encre-2); }
.section-page li { margin: 3px 0; }
.section-page li b { color: var(--encre); font-weight: 500; }
.apercu-cadre { border: 1px solid var(--trait); border-radius: var(--r-m); overflow: hidden; background: #fff; }
.apercu-barre { display: flex; gap: 6px; padding: 8px 10px; background: var(--brume); border-bottom: 1px solid var(--trait); align-items: center; flex-wrap: wrap; }
.apercu-barre .btn { padding: 4px 10px; font-size: 12.5px; }
.apercu-barre .actif { background: var(--nuit); color: #fff; border-color: var(--nuit); }
.apercu-cadre iframe { width: 100%; height: 640px; border: 0; display: block; margin: 0 auto; transition: width .3s; }
.tourne { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--accent-voile); border-top-color: var(--accent); animation: tourne .8s linear infinite; display: inline-block; vertical-align: -3px; }
@keyframes tourne { to { transform: rotate(360deg); } }

/* ---------- Validation ---------- */
.validation { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); padding: 18px 20px; margin-bottom: 12px; }
.validation .tete { display: flex; gap: 12px; align-items: flex-start; }
.validation .tete .t { font-weight: 600; font-size: 14px; }
.validation .tete .quand { margin-left: auto; color: var(--encre-3); font-size: 12px; white-space: nowrap; }
.mail { margin-top: 12px; border: 1px solid var(--trait); border-radius: var(--r-m); overflow: hidden; }
.mail .entetes { padding: 10px 14px; background: var(--papier); border-bottom: 1px solid var(--trait); font-size: 12.5px; color: var(--encre-2); display: grid; gap: 2px; }
.mail .entetes b { color: var(--encre); font-weight: 500; }
.mail .corps { padding: 16px 18px; white-space: pre-wrap; font: 14px/1.65 Arial, Helvetica, sans-serif; color: #1D1D29; }
.mail textarea { border: 0; border-radius: 0; min-height: 260px; font: 14px/1.65 Arial, Helvetica, sans-serif; padding: 16px 18px; }
.mail .pj { padding: 10px 14px; border-top: 1px solid var(--trait); display: flex; gap: 6px; flex-wrap: wrap; }
.validation .actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.erreur-texte { color: var(--rouge); font-size: 12.5px; margin-top: 8px; }

/* ---------- Jarvis (tiroir) ---------- */
.jarvis { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw; background: var(--blanc); border-left: 1px solid var(--trait); box-shadow: var(--ombre-haute); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); z-index: 30; }
.jarvis.ouvert { transform: none; }
.jarvis-tete { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--trait); }
.jarvis-tete .orbe { width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #B9BBFF, var(--accent) 55%, #2A2C9E); }
.jarvis-tete .orbe.parle { animation: respire 1.4s ease-in-out infinite; }
@keyframes respire { 50% { box-shadow: 0 0 0 8px rgba(84, 87, 234, .15); } }
.jarvis-tete .nom { font: 500 17px var(--titre); }
.jarvis-tete .etat { font-size: 11.5px; color: var(--encre-3); }
.jarvis-tete .droite { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.fil { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 92%; line-height: 1.6; }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin: 0; }
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 20px; }
.msg.moi { align-self: flex-end; background: var(--nuit); color: #fff; padding: 9px 13px; border-radius: 14px 14px 4px 14px; }
.msg.lui { align-self: flex-start; }
.msg .outils { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.suggestions { display: flex; flex-direction: column; gap: 6px; }
.suggestions button { text-align: left; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-m); padding: 9px 12px; color: var(--encre); }
.suggestions button:hover { border-color: var(--accent); }
.saisie { padding: 12px 14px 14px; border-top: 1px solid var(--trait); }
.saisie .boite { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--trait); border-radius: var(--r-l); padding: 6px 6px 6px 12px; background: var(--blanc); }
.saisie .boite:focus-within { border-color: var(--accent); }
.saisie textarea { border: 0; padding: 7px 0; min-height: 22px; max-height: 160px; resize: none; }
.saisie textarea:focus { outline: none; }
.micro { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--brume); display: grid; place-items: center; flex: none; color: var(--encre); }
.micro svg { width: 18px; height: 18px; }
.micro.ecoute { background: var(--rouge); color: #fff; animation: respire 1.2s infinite; }
.envoi { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; flex: none; }
.envoi svg { width: 16px; height: 16px; }
.saisie .options { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11.5px; color: var(--encre-3); }

/* ---------- Fenetres ---------- */
.voile { position: fixed; inset: 0; background: rgba(11, 12, 26, .35); z-index: 40; display: grid; place-items: start center; padding: 8vh 16px; overflow-y: auto; animation: apparait .15s; }
@keyframes apparait { from { opacity: 0; } }
.fenetre { background: var(--blanc); border-radius: var(--r-l); box-shadow: var(--ombre-haute); width: 100%; max-width: 640px; animation: monte .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes monte { from { transform: translateY(8px); opacity: 0; } }
.fenetre-tete { display: flex; align-items: center; padding: 18px 22px 0; }
.fenetre-tete h3 { font: 500 19px var(--titre); margin: 0; }
.fenetre-tete .btn { margin-left: auto; }
.fenetre-corps { padding: 18px 22px; }
.fenetre-pied { display: flex; gap: 8px; justify-content: flex-end; padding: 0 22px 20px; }
.fenetre-pied .gauche { margin-right: auto; }

/* Palette de commandes */
.palette { max-width: 600px; overflow: hidden; }
.palette input { border: 0; border-bottom: 1px solid var(--trait); border-radius: 0; padding: 16px 20px; font-size: 15px; }
.palette input:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 380px; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--r-s); cursor: pointer; }
.palette li .type { margin-left: auto; color: var(--encre-3); font-size: 12px; }
.palette li.sel { background: var(--accent-voile); }

/* Notifications */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; }
.toast { background: var(--nuit); color: #fff; padding: 10px 16px; border-radius: 99px; font-size: 13px; box-shadow: var(--ombre-haute); animation: monte .2s; }
.toast.erreur { background: var(--rouge); }

/* Agents */
.agents { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.agent { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.agent .t { font-weight: 600; }
.agent p { margin: 0; color: var(--encre-2); font-size: 12.5px; flex: 1; }
.agent .actions { display: flex; gap: 6px; margin-top: 8px; }

@media (max-width: 1100px) {
  .colonnes, .colonnes.egales, .parcours { grid-template-columns: 1fr; }
  .etapes { position: static; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .contenu { padding: 20px 16px 80px; }
  .recherche { width: auto; }
  .grille-form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Process, apprentissage, historique ---------- */
.diff { font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; border: 1px solid var(--trait); border-radius: var(--r-m); overflow: auto; max-height: 420px; background: var(--blanc); }
.diff div { padding: 0 12px; white-space: pre-wrap; word-break: break-word; }
.diff .plus { background: var(--vert-voile); color: #14623F; }
.diff .plus::before { content: '+ '; opacity: .6; }
.diff .moins { background: var(--rouge-voile); color: #8E1F2C; text-decoration: line-through; text-decoration-color: rgba(142, 31, 44, .35); }
.diff .moins::before { content: '- '; opacity: .6; }
.diff .egal { color: var(--encre-3); }
.diff .saut { color: var(--encre-3); text-align: center; background: var(--papier); }
.remarque { border-left: 3px solid var(--accent); padding: 6px 12px; margin: 10px 0; color: var(--encre-2); background: var(--accent-voile); border-radius: 0 var(--r-s) var(--r-s) 0; }
.processus-mise { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 18px; align-items: start; }
.processus-liste { background: var(--blanc); border: 1px solid var(--trait); border-radius: var(--r-l); padding: 6px; position: sticky; top: 8px; }
.processus-liste a { display: block; padding: 10px 12px; border-radius: var(--r-m); color: var(--encre); }
.processus-liste a:hover { background: var(--papier); }
.processus-liste a.actif { background: var(--accent-voile); }
.processus-liste .t { font-weight: 500; }
.processus-liste .s { font-size: 12px; color: var(--encre-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-md { line-height: 1.7; max-width: 78ch; }
.doc-md p { margin: 0 0 10px; }
.doc-md code { background: var(--brume); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.interrupteur { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 13px; }
.interrupteur input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--trait); position: relative; cursor: pointer; transition: background .2s; border: 0; padding: 0; margin: 0; }
.interrupteur input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.interrupteur input:checked { background: var(--accent); }
.interrupteur input:checked::after { transform: translateX(16px); }
.filtres { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filtre { border: 1px solid var(--trait); background: var(--blanc); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; color: var(--encre-2); }
.filtre .n { color: var(--encre-3); margin-left: 4px; }
.filtre.actif { background: var(--nuit); border-color: var(--nuit); color: #fff; }
.filtre.actif .n { color: #A9ABC8; }
.jour { font: 500 13px var(--corps); color: var(--encre-3); margin: 20px 0 6px; }
.entree { display: grid; grid-template-columns: 52px 22px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 9px 10px; border-radius: var(--r-s); cursor: pointer; }
.entree:hover { background: var(--blanc); }
.entree .h { color: var(--encre-3); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.entree .qui { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 600; }
.entree .qui.ia { background: radial-gradient(circle at 35% 30%, #B9BBFF, var(--accent) 60%, #2A2C9E); color: #fff; }
.entree .qui.nicolas { background: var(--nuit); color: #fff; }
.entree .qui.systeme { background: var(--brume); color: var(--encre-2); }
.entree .d { min-width: 0; }
.entree .d .t { font-weight: 500; }
.entree .d .s { font-size: 12px; color: var(--encre-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entree.err { background: var(--rouge-voile); }
.json { font: 12px/1.55 ui-monospace, Menlo, monospace; background: var(--papier); border: 1px solid var(--trait); border-radius: var(--r-m); padding: 12px; white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; margin: 6px 0 0; }
.msg .corriger { margin-top: 6px; font-size: 12px; color: var(--encre-3); background: none; border: 0; padding: 0; }
.msg .corriger:hover { color: var(--accent); }
.msg .boite-corr { margin-top: 8px; display: flex; gap: 6px; }
.msg .boite-corr input { padding: 6px 10px; }
@media (max-width: 1100px) { .processus-mise { grid-template-columns: 1fr; } .processus-liste { position: static; } }

/* --- Outils de LN Media integres dans le Hub ------------------------------------- */
.cadre-outil { border: 1px solid var(--trait); border-radius: var(--r-m); background: var(--blanc); overflow: hidden; box-shadow: var(--ombre); }
.cadre-barre { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-bottom: 1px solid var(--trait); background: var(--papier); font-size: 12px; font-weight: 500; }
.cadre-barre .point { width: 7px; height: 7px; border-radius: 50%; background: var(--vert); }
.cadre-barre .muet { margin-left: auto; font-weight: 400; }
.cadre-outil iframe { display: block; width: 100%; height: calc(100vh - 250px); min-height: 520px; border: 0; background: var(--blanc); }
.onglets + .cadre-outil { margin-top: 0; }
.outil-externe { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 22px 24px; border: 1px solid var(--trait); border-radius: var(--r-m); background: var(--blanc); margin-bottom: 16px; }
.outil-externe > div:first-child { flex: 1; min-width: 260px; }
.outil-externe h3 { margin: 0 0 4px; font: 500 18px/1.3 var(--titre); }
.outil-externe p { margin: 0; max-width: 62ch; }
.outil-externe .boutons { display: flex; gap: 8px; flex-wrap: wrap; }
.ligne-form { display: flex; gap: 8px; }
.ligne-form input { flex: 1; }
.grille-outils { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.tuile-outil { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--trait); border-radius: var(--r-s); background: var(--papier); color: var(--encre); transition: border-color .15s, background .15s; }
.tuile-outil:hover { border-color: var(--accent); background: var(--accent-voile); }
.tuile-outil b { font-weight: 500; }
.tuile-outil span { font-size: 11.5px; color: var(--encre-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tuile-outil i { position: absolute; top: 10px; right: 12px; font-style: normal; color: var(--encre-3); }
.cadre-demo { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; min-height: 420px; padding: 32px; color: var(--encre-2);
  background: repeating-linear-gradient(135deg, var(--papier) 0 14px, var(--blanc) 14px 28px); }
.cadre-demo b { font: 500 18px/1.3 var(--titre); color: var(--encre); }
.cadre-demo p { margin: 0 0 6px; max-width: 52ch; }
