/* Polaryz Hub : feuille unique. Sombre, dense, lisible. Couleurs d'univers prises sur les sites officiels
   (EVA : eva.gg ; Bomb Squad : nimes.bombsquad.games) ; Nemausus : provisoire (rouge et vert de Nîmes). */
@font-face { font-family: "Geist"; src: url("fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0b0d; --barre: #0d0e11; --surface: #121418; --surface-2: #171a1f; --surface-3: #1d2127;
  --bord: rgba(255,255,255,.07); --bord-fort: rgba(255,255,255,.12);
  --texte: #ececef; --texte-2: #a3a6ad; --texte-3: #6f737b;
  --ok: #3ecf8e; --attention: #f5a524; --danger: #f2555a; --info: #6ea8fe;
  --sunny: #f5b83d;
  --rayon: 8px; --rayon-s: 6px;
  --accent: #7fb0ff; --accent-plein: #2f6fe4; --accent-sur: #fff; --accent-doux: rgba(47,111,228,.14); --accent-2: #7fb0ff;
  --police: "Geist", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}
[data-univers="eva"] { --accent: #a585ff; --accent-plein: #4b11e2; --accent-sur: #fff; --accent-doux: rgba(75,17,226,.18); --accent-2: #fff997; }
[data-univers="bombsquad"] { --accent: #f3d045; --accent-plein: #f3d045; --accent-sur: #070707; --accent-doux: rgba(243,208,69,.12); --accent-2: #d42a6a; }
[data-univers="nemausus"] { --accent: #ff6b6b; --accent-plein: #c8102e; --accent-sur: #fff; --accent-doux: rgba(200,16,46,.16); --accent-2: #3fbf75; }
[data-univers="polaryz"] { --accent: #7fb0ff; --accent-plein: #2f6fe4; --accent-sur: #fff; --accent-doux: rgba(47,111,228,.14); --accent-2: #7fb0ff; }
[data-univers="perso"] { --accent: #f0c27a; --accent-plein: #c98a2e; --accent-sur: #111; --accent-doux: rgba(201,138,46,.14); --accent-2: #f0c27a; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--texte); font: 14px/1.5 var(--police); -webkit-font-smoothing: antialiased; font-feature-settings: "ss01", "cv11"; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent-doux); }
.icone { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icone.g { width: 18px; height: 18px; }
.icone.p { width: 14px; height: 14px; }
.chiffres, .num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.discret { color: var(--texte-2); }
.tres-discret { color: var(--texte-3); }
.cache { display: none !important; }

/* ---------- cadre ---------- */
.app { display: grid; grid-template-columns: 252px 1fr; height: 100vh; height: 100dvh; }
.barre { background: var(--barre); border-right: 1px solid var(--bord); display: flex; flex-direction: column; min-height: 0; }
.marque { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; font-weight: 600; letter-spacing: -.01em; }
.marque img, .marque svg { width: 22px; height: 22px; color: #e8edf7; }
.marque .hub { color: var(--texte-3); font-weight: 500; }
.nav { flex: 1; overflow-y: auto; padding: 4px 8px 12px; }
.nav-groupe { margin-top: 14px; }
.nav-groupe h3 { margin: 0 0 4px; padding: 0 10px; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--texte-3); }
.nav a.item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: var(--rayon-s); color: var(--texte-2); text-decoration: none; position: relative; }
.nav a.item:hover { background: rgba(255,255,255,.04); color: var(--texte); }
.nav a.item.actif { background: rgba(255,255,255,.07); color: var(--texte); }
.nav a.item .icone { color: var(--texte-3); }
.nav a.item.actif .icone, .nav a.item:hover .icone { color: var(--item-accent, var(--texte)); }
.nav a.item .titre { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav a.item .marqueur { width: 6px; height: 6px; border-radius: 50%; background: var(--sunny); }
.nav a.item .verrou { color: var(--texte-3); width: 13px; height: 13px; }
.item[data-univers="eva"] { --item-accent: #a585ff; } .item[data-univers="bombsquad"] { --item-accent: #f3d045; }
.item[data-univers="nemausus"] { --item-accent: #ff6b6b; } .item[data-univers="polaryz"] { --item-accent: #7fb0ff; }
.item[data-univers="perso"] { --item-accent: #f0c27a; }
.moi { border-top: 1px solid var(--bord); padding: 10px; position: relative; }
.moi button.qui { width: 100%; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px; border-radius: var(--rayon-s); cursor: pointer; text-align: left; }
.moi button.qui:hover { background: rgba(255,255,255,.04); }
.moi .nom { font-weight: 500; line-height: 1.2; } .moi .role { font-size: 12px; color: var(--texte-3); }
.menu { position: absolute; bottom: 58px; left: 10px; right: 10px; background: var(--surface-2); border: 1px solid var(--bord-fort); border-radius: var(--rayon); padding: 4px; box-shadow: 0 12px 32px rgba(0,0,0,.45); z-index: 30; }
.menu button { width: 100%; display: flex; gap: 10px; align-items: center; background: none; border: 0; padding: 8px 10px; border-radius: var(--rayon-s); cursor: pointer; color: var(--texte-2); }
.menu button:hover { background: rgba(255,255,255,.06); color: var(--texte); }

.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; background: var(--surface-3); color: var(--texte); border: 1px solid var(--bord-fort); }
.avatar.anis { background: #1d2a44; color: #9cc0ff; border-color: #2b3f66; }
.avatar.shark { background: #183329; color: #7fe0b4; border-color: #22493a; }
.avatar.jose { background: #33241a; color: #f2b98a; border-color: #4a3424; }
.avatar.sunny { background: #2c2210; color: var(--sunny); border-color: #4a3812; }
.avatar.systeme { background: #2a1416; color: var(--danger); border-color: #4a2126; }
.avatar.p { width: 22px; height: 22px; font-size: 10.5px; }

/* ---------- scène d'un onglet ---------- */
.scene { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: var(--bg); }
.fond { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(14px) saturate(1.1) brightness(.72); opacity: .7; transform: scale(1.04); pointer-events: none; }
.voile { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10,11,13,.18) 0%, rgba(10,11,13,.7) 150px, rgba(10,11,13,.93) 320px, var(--bg) 520px); }
.entete { position: relative; display: flex; align-items: center; gap: 14px; padding: 18px 28px 10px; }
.entete .bouton-menu { display: none; }
.entete .sigle { height: 30px; display: grid; place-items: center; color: var(--accent); }
.entete .sigle img { height: 26px; width: auto; display: block; }
.entete .sigle svg { height: 22px; width: auto; }
.entete .sigle.eva svg { color: #fff; height: 18px; }
.sigle-texte { font-weight: 700; letter-spacing: .14em; font-size: 12px; color: var(--accent); border: 1px solid var(--accent); padding: 3px 7px; border-radius: 3px; }
.entete h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.entete .sous { color: var(--texte-2); font-size: 13px; margin-top: 2px; }
.entete .droite { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.membres { display: flex; } .membres .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--bg); }
.vues { position: relative; display: flex; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--bord); overflow-x: auto; scrollbar-width: none; }
.vues::-webkit-scrollbar { display: none; }
.vues a { display: flex; align-items: center; gap: 7px; padding: 9px 10px 10px; color: var(--texte-2); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-size: 13.5px; }
.vues a:hover { color: var(--texte); }
.vues a.actif { color: var(--texte); border-bottom-color: var(--accent); }
.vues a.actif .icone { color: var(--accent); }
.vues a.sunny-vue { margin-left: auto; }
.contenu { position: relative; flex: 1; overflow-y: auto; min-height: 0; }
.page { padding: 22px 28px 48px; max-width: 1180px; }
.page.large { max-width: none; }

/* ---------- éléments ---------- */
.carte { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon); }
.carte + .carte, .bloc + .bloc { margin-top: 16px; }
.grille > .carte, .grille > .brancher { margin-top: 0; }
.carte-tete { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--bord); }
.carte-tete h2 { font-size: 14px; font-weight: 600; margin: 0; }
.carte-tete .discret { font-size: 12.5px; }
.carte-tete .droite { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.carte-corps { padding: 14px 16px; }
.grille { display: grid; gap: 16px; }
.grille.deux { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grille.trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grille.quatre { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.chiffre { padding: 14px 16px; }
.chiffre .etiquette { color: var(--texte-2); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.chiffre .valeur { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.chiffre .note { color: var(--texte-3); font-size: 12px; margin-top: 2px; }
h2.section { font-size: 13px; font-weight: 500; color: var(--texte-2); margin: 26px 0 10px; display: flex; align-items: center; gap: 8px; }
h2.section:first-child { margin-top: 0; }

.bouton { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--rayon-s); border: 1px solid var(--bord-fort); background: var(--surface-2); color: var(--texte); cursor: pointer; font-size: 13px; font-weight: 500; white-space: nowrap; }
.bouton:hover { background: var(--surface-3); }
.bouton.principal { background: var(--accent-plein); border-color: transparent; color: var(--accent-sur); }
.bouton.principal:hover { filter: brightness(1.1); }
.bouton.fantome { background: none; border-color: transparent; color: var(--texte-2); }
.bouton.fantome:hover { background: rgba(255,255,255,.05); color: var(--texte); }
.bouton.petit { height: 28px; padding: 0 10px; font-size: 12.5px; }
.bouton:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.bouton-icone { width: 32px; padding: 0; justify-content: center; }

.pastille { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 2px 8px 2px 7px; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--texte-2); border: 1px solid var(--bord); white-space: nowrap; }
.pastille::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pastille.ok { color: var(--ok); } .pastille.attention { color: var(--attention); } .pastille.danger { color: var(--danger); }
.pastille.info { color: var(--info); } .pastille.neutre { color: var(--texte-2); } .pastille.accent { color: var(--accent); }
.pastille.sans-point::before { display: none; }
.etiquette-chip { font-size: 11.5px; color: var(--texte-2); background: rgba(255,255,255,.05); border: 1px solid var(--bord); padding: 1px 7px; border-radius: 4px; white-space: nowrap; }

.brancher { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px dashed var(--bord-fort); border-radius: var(--rayon); color: var(--texte-2); background: rgba(255,255,255,.015); }
.brancher .icone { color: var(--texte-3); margin-top: 2px; }
.brancher b { color: var(--texte); font-weight: 600; }
.vide { text-align: center; padding: 48px 16px; color: var(--texte-2); }
.vide .icone { width: 28px; height: 28px; color: var(--texte-3); margin-bottom: 8px; }
.vide h3 { color: var(--texte); font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.erreur-bloc { border: 1px solid rgba(242,85,90,.35); background: rgba(242,85,90,.06); color: #ffb3b5; border-radius: var(--rayon); padding: 12px 14px; display: flex; gap: 10px; }
.chargement { padding: 28px; color: var(--texte-3); display: flex; align-items: center; gap: 10px; }
.tourne { animation: tourne 1s linear infinite; } @keyframes tourne { to { transform: rotate(360deg); } }

table.tableau { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tableau th { text-align: left; font-weight: 500; color: var(--texte-3); font-size: 12px; padding: 8px 12px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.tableau td { padding: 8px 12px; border-bottom: 1px solid var(--bord); vertical-align: top; }
.tableau tr:last-child td { border-bottom: 0; }
.tableau tr:hover td { background: rgba(255,255,255,.015); }
.tableau .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tableau td.nom { font-weight: 500; }
.defile { overflow-x: auto; }
.tableau input, .tableau select { width: 100%; min-width: 64px; height: 28px; background: transparent; border: 1px solid transparent; border-radius: 5px; padding: 0 8px; transition: border-color .12s, background .12s; }
.tableau tr:hover input, .tableau tr:hover select { border-color: var(--bord-fort); background: var(--bg); }
.tableau input::placeholder { color: var(--attention); opacity: .8; }
.tableau input.num { text-align: right; }
.champ { display: grid; gap: 6px; }
.champ label { font-size: 12.5px; color: var(--texte-2); }
input.saisie, textarea.saisie, select.saisie { width: 100%; background: var(--bg); border: 1px solid var(--bord-fort); border-radius: var(--rayon-s); padding: 8px 10px; }
textarea.saisie { min-height: 140px; resize: vertical; font-family: var(--mono); font-size: 12.5px; line-height: 1.55; }
input.saisie:focus, textarea.saisie:focus, select.saisie:focus, .tableau input:focus, .tableau select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
details.repli { border-top: 1px solid var(--bord); }
details.repli > summary { cursor: pointer; padding: 10px 16px; color: var(--texte-2); list-style: none; display: flex; gap: 8px; align-items: center; font-size: 13px; }
details.repli > summary::-webkit-details-marker { display: none; }
details.repli[open] > summary .icone { transform: rotate(90deg); }
details.repli > summary .icone { transition: transform .15s; }

/* ---------- texte mis en forme ---------- */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .6em; }
.md ul, .md ol { margin: 0 0 .6em; padding-left: 1.3em; }
.md li { margin: .15em 0; }
.md li::marker { color: var(--texte-3); }
.md h1, .md h2, .md h3, .md h4 { margin: 1.2em 0 .5em; line-height: 1.3; letter-spacing: -.01em; }
.md h1 { font-size: 18px; } .md h2 { font-size: 15.5px; } .md h3 { font-size: 14px; } .md h4 { font-size: 13px; color: var(--texte-2); }
.md code { font-family: var(--mono); font-size: 12.5px; background: rgba(255,255,255,.06); padding: 1px 5px; border-radius: 4px; }
.md pre { background: var(--bg); border: 1px solid var(--bord); padding: 10px 12px; border-radius: var(--rayon-s); overflow-x: auto; }
.md pre code { background: none; padding: 0; }
.md blockquote { margin: 0 0 .6em; padding-left: 12px; border-left: 2px solid var(--bord-fort); color: var(--texte-2); }
.md table { border-collapse: collapse; margin: 0 0 .8em; font-size: 13px; display: block; overflow-x: auto; }
.md th, .md td { border: 1px solid var(--bord); padding: 5px 9px; text-align: left; }
.md th { color: var(--texte-2); font-weight: 500; }
.md hr { border: 0; border-top: 1px solid var(--bord); margin: 1em 0; }
.md strong { font-weight: 600; color: #fff; }
.doc .md { max-width: 760px; }
.lettre { white-space: pre-wrap; font-size: 14px; line-height: 1.6; background: #f6f5f2; color: #1c1c1f; padding: 22px 26px; border-radius: var(--rayon-s); max-width: 680px; }
.lettre .objet { font-weight: 600; display: block; margin-bottom: 10px; }

/* ---------- fil de discussion ---------- */
.fil { display: flex; flex-direction: column; height: 100%; }
.fil-messages { flex: 1; overflow-y: auto; padding: 18px 28px 8px; }
.fil-interieur { max-width: 860px; }
.msg { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; padding: 6px 8px; border-radius: var(--rayon-s); margin: 0 -8px; }
.msg:hover { background: rgba(255,255,255,.02); }
.msg.suite { padding-top: 1px; }
.msg.suite .avatar { visibility: hidden; height: 0; }
.msg .tete { display: flex; align-items: baseline; gap: 8px; }
.msg .auteur { font-weight: 600; font-size: 13.5px; }
.msg .heure { font-size: 11.5px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.msg .corps { margin-top: 1px; }
.msg.sunny .auteur { color: var(--sunny); }
.msg .outils { font-size: 12px; color: var(--texte-3); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.msg.erreur .corps { color: #ffb3b5; }
.jour-sep { display: flex; align-items: center; gap: 12px; color: var(--texte-3); font-size: 12px; margin: 18px 0 8px; }
.jour-sep::before, .jour-sep::after { content: ""; flex: 1; border-top: 1px solid var(--bord); }
.ecrit { color: var(--texte-3); font-size: 12.5px; display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.points span { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--sunny); margin-right: 3px; animation: point 1.2s infinite; }
.points span:nth-child(2) { animation-delay: .2s; } .points span:nth-child(3) { animation-delay: .4s; }
@keyframes point { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.composeur { padding: 8px 28px 18px; }
.composeur .boite { max-width: 860px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 10px; padding: 8px 8px 8px 12px; display: flex; gap: 8px; align-items: flex-end; }
.composeur .boite:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-doux); }
.composeur textarea { flex: 1; border: 0; background: none; resize: none; outline: none; min-height: 24px; max-height: 220px; padding: 5px 0; line-height: 1.5; }
.composeur .aide { max-width: 860px; font-size: 11.5px; color: var(--texte-3); margin-top: 6px; display: flex; gap: 10px; }
.composeur .envoyer { width: 34px; height: 34px; border-radius: 8px; border: 0; background: var(--accent-plein); color: var(--accent-sur); display: grid; place-items: center; cursor: pointer; flex: none; }
.composeur .envoyer:disabled { opacity: .35; cursor: default; }
.fil-vide { max-width: 560px; margin: 8vh auto 0; text-align: center; color: var(--texte-2); }
.fil-vide .soleil { width: 44px; height: 44px; border-radius: 12px; background: #2c2210; color: var(--sunny); display: inline-grid; place-items: center; border: 1px solid #4a3812; margin-bottom: 12px; }
.fil-vide h3 { color: var(--texte); margin: 0 0 6px; font-size: 16px; font-weight: 600; }

/* ---------- vues métier ---------- */
.jour { margin-bottom: 18px; }
.jour-titre { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; }
.jour-titre h3 { margin: 0; font-size: 14px; font-weight: 600; text-transform: capitalize; }
.creneaux { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.creneau { background: var(--surface); border: 1px solid var(--bord); border-left: 2px solid var(--accent); border-radius: var(--rayon-s); padding: 8px 10px; }
.creneau.fermeture { border-left-color: var(--texte-3); opacity: .7; }
.creneau.anis { border-left-color: var(--accent-2); }
.creneau .h { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 13px; }
.creneau .q { color: var(--texte-2); font-size: 12.5px; }
.planning { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.planning th { color: var(--texte-3); font-weight: 500; padding: 8px; text-align: left; border-bottom: 1px solid var(--bord); white-space: nowrap; }
.planning th.auj { color: var(--accent); }
.planning td { padding: 5px; border-bottom: 1px solid var(--bord); vertical-align: top; min-width: 92px; }
.planning td.qui { font-weight: 500; font-size: 13px; padding-left: 8px; white-space: nowrap; min-width: 0; }
.shift { display: block; border-radius: 5px; padding: 3px 6px; margin-bottom: 3px; font-variant-numeric: tabular-nums; background: var(--accent-doux); color: var(--texte); border: 1px solid transparent; white-space: nowrap; }
.shift.option { background: none; border: 1px dashed var(--accent); color: var(--accent); }
.shift.off { background: rgba(255,255,255,.04); color: var(--texte-3); }
.shift.ecole { background: rgba(110,168,254,.08); color: #9cc0ff; }
.shift.journee { background: rgba(245,165,36,.08); color: #f3c06b; }
.media-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.media { background: var(--surface); border: 1px solid var(--bord); border-radius: var(--rayon-s); overflow: hidden; }
.media .vignette { aspect-ratio: 9 / 12; background: #000; display: grid; place-items: center; color: var(--texte-3); }
.media .vignette img, .media .vignette video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .legende { padding: 7px 9px; font-size: 12px; color: var(--texte-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barre-progres { height: 6px; border-radius: 3px; background: rgba(255,255,255,.06); overflow: hidden; }
.barre-progres > div { height: 100%; background: var(--accent); border-radius: 3px; }
.ligne-statut { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--bord); }
.ligne-statut:last-child { border-bottom: 0; }
.journal-ligne { font-family: var(--mono); font-size: 12px; color: var(--texte-2); padding: 3px 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.journal-ligne:hover { background: rgba(255,255,255,.02); color: var(--texte); }
.attente { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--bord); color: var(--texte); text-decoration: none; }
.attente:hover { background: rgba(255,255,255,.02); text-decoration: none; }
.attente:last-child { border-bottom: 0; }
button.attente { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--bord); cursor: pointer; text-align: left; font: inherit; }
button.attente:last-child { border-bottom: 0; }
.bandeau { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: var(--rayon); background: var(--accent-doux); border: 1px solid var(--bord); color: var(--texte); margin-bottom: 16px; font-size: 13px; }
.bandeau .icone { color: var(--accent); }
.segment { display: inline-flex; background: var(--bg); border: 1px solid var(--bord-fort); border-radius: 7px; padding: 2px; }
.segment button { border: 0; background: none; padding: 4px 10px; border-radius: 5px; cursor: pointer; color: var(--texte-2); font-size: 12.5px; display: inline-flex; gap: 6px; align-items: center; }
.segment button.actif { background: var(--surface-3); color: var(--texte); }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--surface-3); border: 1px solid var(--bord-fort); padding: 9px 14px; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.5); z-index: 50; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.toast.erreur { border-color: rgba(242,85,90,.5); color: #ffb3b5; }

/* ---------- connexion ---------- */
.connexion { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; position: relative; overflow: hidden; padding: 20px; }
.connexion .fond { opacity: .45; }
.connexion form { position: relative; width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 12px; padding: 28px; display: grid; gap: 16px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.connexion .logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.connexion .logo svg { width: 28px; height: 28px; color: #e8edf7; }
.connexion p { margin: 0; color: var(--texte-2); font-size: 13px; }
.connexion .bouton { height: 38px; justify-content: center; }
.connexion .message { color: #ffb3b5; font-size: 13px; min-height: 18px; }

.dialogue-fond { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 40; padding: 16px; }
.dialogue { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 12px; padding: 22px; display: grid; gap: 14px; }
.dialogue h2 { margin: 0; font-size: 16px; }
.dialogue .actions { display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- petits écrans (tel d'Anis) ---------- */
.rideau { display: none; }
@media (max-width: 1100px) { .grille.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grille.trois { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .barre { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 35; transform: translateX(-100%); transition: transform .2s ease; }
  .app.menu-ouvert .barre { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.6); }
  .app.menu-ouvert .rideau { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 34; }
  .entete { padding: 12px 16px 8px; gap: 10px; }
  .entete .bouton-menu { display: inline-flex; }
  .entete .sigle { display: none; }
  .entete h1 { font-size: 17px; }
  .entete .sous { display: none; }
  .membres { display: none; }
  .vues { padding: 0 10px; }
  .page { padding: 16px 16px 40px; }
  .fil-messages { padding: 14px 16px 6px; }
  .composeur { padding: 6px 12px 12px; }
  .composeur .aide { display: none; }
  .grille.deux, .grille.trois { grid-template-columns: 1fr; }
  .grille.quatre { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lettre { padding: 16px; font-size: 13.5px; }
  .vues a.sunny-vue { margin-left: 0; }
  .carte-tete { flex-wrap: wrap; row-gap: 8px; }
  .carte-tete > div:not(.droite) { flex: 1 1 0; min-width: 0; }
  .carte-tete .droite { margin-left: 0; flex-basis: 100%; flex-wrap: wrap; }
  .carte-tete .droite .bouton { margin-left: auto; }
}

.note-jointe { display: flex; gap: 8px; align-items: flex-start; color: var(--texte-2); font-size: 13px; margin-bottom: 10px; white-space: pre-wrap; max-width: 680px; }
.note-jointe .icone { margin-top: 3px; color: var(--texte-3); }

.tableau tr.rubrique td { padding-top: 16px; font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--texte-3); border-bottom: 1px solid var(--bord); }

/* Vue gérant : la Suite (planning) en cadre ; à valider : ce que Sunny a préparé, en tête du fil */
.cadre-suite { flex: 1; width: 100%; min-height: 560px; border: 1px solid var(--bord); border-radius: var(--rayon); background: var(--surface); }
.a-valider { margin: 10px 16px 0; border: 1px solid var(--bord-fort); border-radius: var(--rayon); background: var(--surface); flex: none; max-height: 42vh; overflow: auto; }
.a-valider summary { padding: 9px 12px; font-size: 13px; font-weight: 600; }
.a-valider-liste { display: grid; }
.a-valider-el { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-top: 1px solid var(--bord); }
.a-valider-el .titre { font-size: 13.5px; }
.a-valider-el .detail { font-size: 12.5px; white-space: pre-wrap; max-height: 4.8em; overflow: hidden; }
.a-valider-el .actions { display: flex; gap: 6px; flex: none; }
.dialogue.large { max-width: 640px; max-height: calc(100vh - 32px); overflow: auto; }

/* File « À approuver » */
.nav-file { margin-top: 10px; }
.nav a.item .badge { min-width: 20px; height: 18px; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.08); color: var(--texte-2); font-size: 11.5px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav a.item .badge.pour-moi { background: var(--attention); color: #1a1205; }
.vues a .compte { font-size: 11.5px; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.vues a .compte:empty { display: none; }
.liste-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.segment.filtres { flex-wrap: wrap; max-width: 100%; }
.mobile-seul { display: none; }
.action-carte { border-left: 3px solid var(--bord-fort); }
.action-carte[data-etat="en_attente"] { border-left-color: var(--attention); }
.action-carte[data-etat="approuvee"] { border-left-color: var(--info); }
.action-carte[data-etat="faite"] { border-left-color: var(--ok); }
.action-carte[data-etat="refusee"] { border-left-color: var(--danger); }
.action-carte.en-vue { box-shadow: 0 0 0 2px var(--accent-doux), 0 0 0 1px var(--accent); }
.action-carte .resume-action { font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.action-carte .lettre, .action-carte .bulle-wa { overflow-wrap: anywhere; }
.meta-action { display: grid; gap: 3px; font-size: 13.5px; margin-bottom: 10px; }
.alerte-texte { color: var(--attention); }
.bulle-wa { background: #173a2a; color: #e6f5ec; border-radius: 10px 10px 10px 2px; padding: 10px 14px; white-space: pre-wrap; font-size: 14px; line-height: 1.5; max-width: 520px; }
.bulle-wa.petite { font-size: 12.5px; padding: 8px 12px; margin: 0 16px 6px; }
.carte-corps.decision { border-top: 1px solid var(--bord); display: grid; gap: 4px; font-size: 13px; color: var(--texte-2); }
.carte-corps.decision .icone { vertical-align: -2px; }
.carte-pied { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; border-top: 1px solid var(--bord); padding: 4px 12px 4px 0; flex-wrap: wrap; }
.carte-pied .pied-gauche { flex: 1; min-width: 240px; }
.carte-pied .actions { display: flex; gap: 8px; align-items: center; padding: 8px 0 6px; flex-wrap: wrap; }
details.repli.sans-bord { border-top: 0; }
details.repli.sans-bord > summary { padding: 8px 16px; font-size: 12.5px; }
.carte-corps details.repli.sans-bord > summary { padding: 10px 0 4px; }
.historique .journal-ligne { padding: 3px 16px; font-size: 12px; }
.tableau tr.total td { font-weight: 600; border-top: 1px solid var(--bord-fort); }
pre.donnees { margin: 0 16px 10px; white-space: pre-wrap; font-size: 12px; color: var(--texte-2); }
.carte-corps pre.donnees { margin: 0 0 6px; }
@media (max-width: 720px) {
  .mobile-seul { display: inline; }
  .action-carte .carte-tete { flex-wrap: wrap; }
  .segment.filtres button { padding: 4px 8px; }
  .carte-pied { padding-right: 0; }
  .carte-pied .actions { padding: 8px 12px; width: 100%; justify-content: flex-end; }
}

/* ---------- Onglets libres (créés par l'équipe) : six couleurs au choix, mêmes réglages que les univers ---------- */
[data-univers="libre-ambre"] { --accent: #f0c27a; --accent-plein: #c98a2e; --accent-sur: #111; --accent-doux: rgba(201,138,46,.14); --accent-2: #f0c27a; }
[data-univers="libre-bleu"] { --accent: #7fb0ff; --accent-plein: #2f6fe4; --accent-sur: #fff; --accent-doux: rgba(47,111,228,.14); --accent-2: #7fb0ff; }
[data-univers="libre-vert"] { --accent: #5fd3a0; --accent-plein: #1f9d6a; --accent-sur: #fff; --accent-doux: rgba(31,157,106,.15); --accent-2: #5fd3a0; }
[data-univers="libre-violet"] { --accent: #b69cff; --accent-plein: #6d3fe0; --accent-sur: #fff; --accent-doux: rgba(109,63,224,.18); --accent-2: #b69cff; }
[data-univers="libre-rose"] { --accent: #ff8fb8; --accent-plein: #c2306b; --accent-sur: #fff; --accent-doux: rgba(194,48,107,.16); --accent-2: #ff8fb8; }
[data-univers="libre-cyan"] { --accent: #6fd8f0; --accent-plein: #1590b0; --accent-sur: #fff; --accent-doux: rgba(21,144,176,.16); --accent-2: #6fd8f0; }
.item[data-univers="libre-ambre"] { --item-accent: #f0c27a; } .item[data-univers="libre-bleu"] { --item-accent: #7fb0ff; }
.item[data-univers="libre-vert"] { --item-accent: #5fd3a0; } .item[data-univers="libre-violet"] { --item-accent: #b69cff; }
.item[data-univers="libre-rose"] { --item-accent: #ff8fb8; } .item[data-univers="libre-cyan"] { --item-accent: #6fd8f0; }
.nav a.item[data-univers^="libre-"] .icone:first-child { color: var(--item-accent); opacity: .8; }
.nav a.item[data-univers^="libre-"].actif .icone:first-child { opacity: 1; }
.entete .sigle.libre { width: 30px; border-radius: 8px; background: var(--accent-doux); border: 1px solid var(--bord-fort); }
.entete .sigle.libre .icone { width: 17px; height: 17px; color: var(--accent); }
.entete .sous.libre { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 760px; }
.nav-nouvel { margin-top: 18px; display: grid; gap: 2px; }
.nav .nouvel-onglet { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 10px; border-radius: var(--rayon-s);
  border: 1px dashed var(--bord-fort); background: none; color: var(--texte-2); cursor: pointer; font: inherit; text-align: left; }
.nav .nouvel-onglet:hover { color: var(--texte); border-color: rgba(255,255,255,.22); background: rgba(255,255,255,.03); }
.nav .lien-archives { display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--texte-3); cursor: pointer; font: inherit; font-size: 12px; padding: 4px 10px; }
.nav .lien-archives:hover { color: var(--texte-2); }
.pastille-libre { width: 30px; height: 30px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--accent-doux); border: 1px solid var(--bord-fort); color: var(--accent); }
.pastille-libre.petite { width: 26px; height: 26px; border-radius: 7px; }
.vues a.memoire-vue { margin-left: auto; }

/* dialogue « Nouvel onglet » / « Modifier l'onglet » */
.dialogue-titre { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.dialogue-onglet { gap: 16px; }
.dialogue-onglet .saisie { width: 100%; }
.apercu-onglet { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--rayon); background: var(--bg); border: 1px solid var(--bord); }
.apercu-onglet .titre { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aide-champ { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--texte-3); }
.aide-champ .compteur { white-space: nowrap; font-variant-numeric: tabular-nums; }
.aide-champ .compteur.manque { color: var(--attention); }
.deux-colonnes { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.choix-icones { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.choix-icones button { aspect-ratio: 1; display: grid; place-items: center; border-radius: 6px; border: 1px solid transparent; background: rgba(255,255,255,.03); color: var(--texte-2); cursor: pointer; min-width: 30px; }
.choix-icones button:hover { color: var(--texte); background: rgba(255,255,255,.07); }
.choix-icones button.actif { border-color: var(--accent); color: var(--accent); background: var(--accent-doux); }
.choix-couleurs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.choix-couleurs button { width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; background: var(--c); cursor: pointer; margin: 3px; }
.choix-couleurs button.actif { outline: 2px solid var(--c); outline-offset: 3px; }
.choix-membres { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 10px 12px; border-radius: var(--rayon); background: rgba(255,255,255,.02); border: 1px solid var(--bord); }
.choix-membres label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; }
.message-erreur { color: #ffb3b5; font-size: 13px; }
.message-erreur:empty { display: none; }

/* ---------- Mémoire de Sunny (vue « Mémoire ») ---------- */
.barre-outils { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.liste-souvenirs { display: grid; gap: 10px; }
.ajout-souvenir { margin-bottom: 14px; border-color: var(--accent); }
.souvenir { background: var(--surface); border: 1px solid var(--bord); border-left: 3px solid var(--bord-fort); border-radius: var(--rayon); padding: 12px 14px; display: grid; gap: 8px; }
.souvenir[data-portee="societe"] { border-left-color: var(--accent); }
.souvenir-tete { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.souvenir-tete .etiquette-chip { display: inline-flex; align-items: center; gap: 3px; }
.souvenir-tete .etiquette-chip .icone { width: 12px; height: 12px; }
.souvenir-tete .meta { font-size: 12px; }
.souvenir-texte { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.souvenir-actions { display: flex; gap: 4px; justify-content: flex-end; margin: -4px -6px -6px 0; }
.pastille.personne { color: #d7a6ff; }
.bouton.danger:hover { color: var(--danger); }

/* ---------- En direct : le bandeau qui défile en haut de toutes les pages ---------- */
.colonne-principale { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.colonne-principale > .scene { flex: 1; }
.direct { display: flex; align-items: center; height: 34px; flex: none; border-bottom: 1px solid var(--bord); background: #0c0d10; font-size: 12.5px; position: relative; z-index: 2; }
.direct-etiquette { display: flex; align-items: center; gap: 8px; padding: 0 14px 0 16px; height: 100%; color: var(--texte-2); text-decoration: none; border-right: 1px solid var(--bord); flex: none; font-weight: 500; letter-spacing: .01em; }
.direct-etiquette:hover { color: var(--texte); background: rgba(255,255,255,.03); text-decoration: none; }
.direct-etiquette .compte { min-width: 18px; height: 17px; padding: 0 5px; border-radius: 999px; background: rgba(62,207,142,.16); color: var(--ok); font-size: 11px; font-weight: 600; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.direct-etiquette .compte:empty { display: none; }
.pouls { width: 8px; height: 8px; border-radius: 50%; background: var(--texte-3); flex: none; }
.direct[data-etat="actif"] .pouls { background: var(--ok); box-shadow: 0 0 0 0 rgba(62,207,142,.6); animation: pouls 1.6s ease-out infinite; }
@keyframes pouls { 0% { box-shadow: 0 0 0 0 rgba(62,207,142,.55); } 80%, 100% { box-shadow: 0 0 0 7px rgba(62,207,142,0); } }
.direct-piste { flex: 1; min-width: 0; overflow: hidden; height: 100%; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 18px, #000 calc(100% - 28px), transparent); }
.direct-defile { display: flex; align-items: center; white-space: nowrap; padding-left: 14px; width: max-content; }
.direct-defile.defile { animation: defile var(--duree, 30s) linear infinite; }
.direct-piste:hover .direct-defile.defile, .direct-piste:focus-within .direct-defile.defile { animation-play-state: paused; }
@keyframes defile { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.direct-el { display: inline-flex; align-items: center; gap: 6px; padding-right: 28px; color: var(--texte-2); text-decoration: none; }
a.direct-el:hover { color: var(--texte); text-decoration: none; }
.direct-el b { color: var(--texte); font-weight: 500; }
.direct-el .ctx { color: var(--texte-3); }
.direct-el .quoi::before { content: ":"; margin-right: 6px; color: var(--texte-3); }
.direct-el .duree { color: var(--texte-3); font-variant-numeric: tabular-nums; font-size: 11.5px; padding-left: 2px; }
.direct-el.calme { color: var(--texte-3); padding-right: 8px; }
.direct-el.prive .quoi { font-style: italic; }
.direct-el.erreur .quoi { color: #ffb3b5; }
.direct-ic { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; background: rgba(255,255,255,.05); color: var(--texte-2); }
.direct-ic .icone { width: 12px; height: 12px; }
.direct-ic.sunny { background: #2c2210; color: var(--sunny); }
.direct-ic.action { background: rgba(110,168,254,.14); color: var(--info); }
.direct-ic.agent { background: rgba(182,156,255,.14); color: #b69cff; }
.direct-ic.tache { background: rgba(62,207,142,.12); color: var(--ok); }
.direct-ic.decision { background: rgba(245,165,36,.12); color: var(--attention); }
/* vue « En direct » de Supervision */
.liste-direct { display: grid; }
.ligne-direct { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--bord); color: var(--texte); text-decoration: none; }
.ligne-direct:last-child { border-bottom: 0; }
a.ligne-direct:hover { background: rgba(255,255,255,.02); text-decoration: none; }
.ligne-direct .direct-ic { width: 28px; height: 28px; border-radius: 8px; }
.ligne-direct .direct-ic .icone { width: 15px; height: 15px; }
.ligne-direct .quoi { font-size: 13px; overflow-wrap: anywhere; }
.ligne-direct.prive .quoi { font-style: italic; }
.ligne-direct.erreur .quoi { color: #ffb3b5; }
.ligne-direct .quand { font-size: 12px; white-space: nowrap; text-align: right; }
@media (prefers-reduced-motion: reduce) {
  .direct-piste { overflow-x: auto; scrollbar-width: none; }
  .direct[data-etat="actif"] .pouls { animation: none; }
}
@media (max-width: 860px) {
  .direct { height: 30px; font-size: 12px; }
  .direct-etiquette { padding: 0 10px 0 12px; gap: 6px; }
  .direct-etiquette .mot { display: none; }
  .direct-el { padding-right: 22px; }
  .vues a.memoire-vue { margin-left: 0; }
  .large-seul { display: none; }
  .deux-colonnes { grid-template-columns: 1fr; }
  .choix-icones { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .ligne-direct { grid-template-columns: 28px minmax(0, 1fr); padding: 10px 12px; }
  .ligne-direct .quand { grid-column: 2; text-align: left; }
  .entete .sous.libre { display: none; }
}
.dialogue-onglet textarea.saisie, .liste-souvenirs textarea.saisie, .ajout-souvenir textarea.saisie { font-family: var(--police); font-size: 13.5px; line-height: 1.5; min-height: 0; }
.barre-outils > .bouton { flex: none; }
.barre-outils > input.saisie { flex: 1 1 220px; width: auto; }
.dialogue-onglet .champ > .segment { justify-self: start; }

/* ---------- Clarté (retours du 05/12 au soir) : moins de décor, une hiérarchie nette sur chaque écran ----------
   Titre de page + une ligne qui dit à quoi sert l'écran ; ce qui demande une action d'abord ; pas de fond flouté ni de
   dégradé ni de lueur ; menu en sections → onglets ; espacements sur une grille de 4 px. */
.scene > .fond, .scene > .voile { display: none; }
.entete { padding: 16px 28px 12px; border-bottom: 1px solid var(--bord); background: var(--bg); }
.entete .sous { max-width: 760px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entete .sous.libre { white-space: normal; }
.vues { padding: 0 20px; background: var(--bg); }
.page { padding: 20px 28px 48px; }
.brancher { padding: 8px 12px; border: 1px solid var(--bord); border-left: 2px solid var(--attention); background: var(--surface); font-size: 13px; align-items: center; border-radius: var(--rayon-s); }
.brancher + .brancher { margin-top: 6px; }
.grille > .brancher + .brancher { margin-top: 0; }
.brancher .icone { margin-top: 0; color: var(--attention); }
.direct[data-etat="actif"] .pouls { box-shadow: none; animation: pouls-doux 1.6s ease-in-out infinite; }
@keyframes pouls-doux { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.composeur .boite:focus-within, input.saisie:focus, textarea.saisie:focus, select.saisie:focus { box-shadow: none; }
.app.menu-ouvert .barre { box-shadow: none; border-right-color: var(--bord-fort); }

/* Menu : sections → onglets */
.nav-groupe { margin-top: 16px; }
.nav-groupe h3 { margin: 0 0 4px; }
.nav-file { margin-top: 8px; }
.nav a.item-traiter { font-weight: 500; color: var(--texte); }
.nav a.item-traiter .icone { color: var(--texte-2); }
.nav-section-tete { display: flex; align-items: center; gap: 4px; padding-right: 4px; }
.nav-section-tete h3 { flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-section-tete .verrou { width: 12px; height: 12px; color: var(--texte-3); }
.nav-section-tete + * { margin-top: 4px; }
.nav-mini { width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 5px; background: none; color: var(--texte-3); cursor: pointer; padding: 0; }
.nav-mini:hover { background: rgba(255,255,255,.06); color: var(--texte); }
.nav-vide { padding: 4px 10px 2px; font-size: 12px; color: var(--texte-3); }
.nav .nouvelle-section { display: flex; align-items: center; gap: 10px; width: 100%; height: 30px; padding: 0 10px; margin-top: 4px; border-radius: var(--rayon-s);
  border: 0; background: none; color: var(--texte-3); cursor: pointer; font: inherit; font-size: 13px; text-align: left; }
.nav .nouvelle-section:hover { color: var(--texte); background: rgba(255,255,255,.03); }

/* « À traiter » */
.barre-filtres { margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.barre-filtres .segment { flex-wrap: nowrap; }
.titre-section { margin: 28px 0 10px; }
.a-traiter > .titre-section:first-child { margin-top: 4px; }
.titre-section h2 { margin: 0; font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--texte); }
.titre-section h2 .icone { color: var(--texte-3); }
.titre-section p { margin: 2px 0 0; font-size: 12.5px; color: var(--texte-2); max-width: 760px; }
.compte-section { font-size: 12px; font-weight: 500; color: var(--texte-3); font-variant-numeric: tabular-nums; }
.liste-actions { display: grid; gap: 12px; }
.question-carte .carte-corps .md p:first-child { margin-top: 0; }
.question-carte .carte-tete > .icone { color: var(--attention); }
details.prets { margin-top: 28px; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 10px 14px; }
details.prets > summary { cursor: pointer; font-size: 13.5px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
details.prets[open] > summary { margin-bottom: 12px; }
details.prets[open] > summary .icone { transform: rotate(90deg); }

/* Bulle « Sunny » (toutes les pages) */
.bulle-sunny { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 12px;
  border-radius: 22px; border: 1px solid var(--bord-fort); background: var(--surface-3); color: var(--texte); cursor: pointer; font-weight: 500; }
.bulle-sunny .icone { color: var(--sunny); }
.bulle-sunny:hover { background: #242932; }
.bulle-sunny.ouverte { background: var(--surface-2); }
body.vue-fil .bulle-sunny { bottom: 96px; }
.panneau-sunny { position: fixed; right: 20px; bottom: 76px; z-index: 41; width: 400px; height: min(620px, calc(100vh - 120px)); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--bord-fort); border-radius: 12px; overflow: hidden; }
body.vue-fil .panneau-sunny { bottom: 152px; height: min(560px, calc(100vh - 176px)); }
.panneau-tete { display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--bord); }
.panneau-titre { display: flex; align-items: baseline; gap: 2px; white-space: nowrap; font-size: 13.5px; }
.panneau-tete .choix-onglet { margin-left: auto; width: auto; max-width: 170px; height: 30px; padding: 0 8px; font-size: 12.5px; }
.lien-suivre { display: flex; align-items: center; gap: 6px; border: 0; border-bottom: 1px solid var(--bord); background: var(--surface-2); color: var(--texte-2);
  font: inherit; font-size: 12px; padding: 6px 12px; cursor: pointer; text-align: left; }
.lien-suivre:hover { color: var(--texte); }
.panneau-sunny .fil { min-height: 0; flex: 1; }
.fil.compact .fil-messages { padding: 12px 14px 6px; }
.fil.compact .composeur { padding: 8px 12px 12px; }
.fil.compact .fil-vide { padding: 24px 8px; }
.fil.compact .fil-vide p { font-size: 12.5px; }
.fil.compact .msg { gap: 10px; }

/* Appli Nemausus dans le hub */
.page-nemausus { max-width: none; display: flex; flex-direction: column; height: 100%; padding-bottom: 20px; }
.page-nemausus .barre-outils { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.boite-nemausus { flex: 1; min-height: 560px; border: 1px solid var(--bord-fort); border-radius: var(--rayon); overflow: hidden; background: #000; }
.boite-nemausus:fullscreen { border: 0; border-radius: 0; }
.cadre-nemausus { width: 100%; height: 100%; border: 0; display: block; background: #000; }

@media (max-width: 760px) {
  .entete { padding: 12px 16px 10px; }
  .entete .sous { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .page { padding: 16px 16px 96px; }
  .bulle-sunny { right: 14px; bottom: 14px; height: 48px; width: 48px; padding: 0; justify-content: center; border-radius: 50%; }
  .bulle-sunny .bulle-texte { display: none; }
  body.vue-fil .bulle-sunny { bottom: 92px; }
  .panneau-sunny, body.vue-fil .panneau-sunny { right: 0; left: 0; bottom: 0; top: 0; width: auto; height: auto; border-radius: 0; border: 0; z-index: 60; }
  body.chat-ouvert .bulle-sunny { display: none; }
  .panneau-tete .choix-onglet { max-width: 150px; }
  .boite-nemausus { min-height: 70vh; }
}
@media (prefers-reduced-motion: reduce) { .direct[data-etat="actif"] .pouls { animation: none; } }

/* ---------- Journal des changements (05/12/2026) ---------- */
.journal-version { display: flex; gap: 8px; align-items: flex-start; color: var(--texte-2); font-size: 12.5px; margin-bottom: 14px; }
.journal-version .icone { color: var(--texte-3); margin-top: 2px; flex: none; }
.journal-outils { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.journal-outils .barre-filtres { margin-bottom: 0; min-width: 0; max-width: 100%; }
.journal-outils input.saisie { width: auto; flex: 1 1 220px; max-width: 320px; height: 32px; padding: 0 10px; }
.case-ligne { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13px; color: var(--texte-2); }
.entree-journal[data-fil="envoye"] { border-left-color: var(--ok); }
.entree-journal[data-fil="a_partager"], .entree-journal[data-fil="a_envoyer"] { border-left-color: var(--attention); }
.entree-journal.retiree { opacity: .62; }
.entree-journal.retiree .resume-action { text-decoration: line-through; text-decoration-color: var(--texte-3); }
.entree-journal .carte-tete .droite { flex-wrap: wrap; justify-content: flex-end; }
.entree-journal .carte-corps { display: grid; gap: 10px; }
.changement { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; font-size: 14.5px; overflow-wrap: anywhere; }
.changement .avant { color: var(--texte-2); text-decoration: line-through; text-decoration-color: var(--texte-3); }
.changement .fleche { color: var(--texte-3); }
.changement .apres { color: var(--texte); font-weight: 600; }
.pour-salaries { display: grid; gap: 6px; }
.pour-salaries-tete { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; color: var(--texte-2); }
.pour-salaries-tete .icone { margin-top: 2px; flex: none; }
.bulle-info { background: rgba(255,255,255,.04); border: 1px solid var(--bord); border-left: 3px solid var(--accent); border-radius: var(--rayon-s); padding: 10px 14px; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 1.5; max-width: 620px; color: var(--texte); }
.entree-journal .source-id { font-size: 11.5px; padding: 0 16px 6px; overflow-wrap: anywhere; }
.entree-journal .source-ligne { font-size: 12.5px; padding: 10px 16px 2px; }
.dialogue .champ > .segment { justify-self: start; }
textarea.saisie.texte-info { font-family: var(--police); font-size: 13.5px; line-height: 1.5; min-height: 0; }
@media (max-width: 760px) {
  .journal-outils input.saisie { max-width: none; }
}
