/* Wingleet Project — reprise de la charte Trello : Atlassian Design, 14 px, #172b4d */
:root {
  --text: #172b4d; --subtle: #44546f; --muted: #626f86; --line: #dcdfe4;
  --surface: #fff; --surface-2: #f1f2f4; --surface-3: #e4e6ea; --hover: #091e420f;
  --primary: #0c66e4; --primary-h: #0055cc; --danger: #c9372c; --success: #1f845a; --warn: #e56910;
  --list: #f1f2f4; --card-shadow: 0 1px 1px #091e4240, 0 0 1px #091e424f;
  --radius: 8px; --header-h: 48px;
  --bot: #6554c0;
  /* Couleurs nommées par leur rôle : le thème sombre (css/dark.css) ne redéfinit que ces variables. */
  color-scheme: light;
  --link: var(--primary); --surface-sunken: #f7f8f9; --surface-4: #d0d4db; --glass: #ffffff99;
  --ink-04: #091e420a; --ink-06: #091e420f; --ink-08: #091e4214; --ink-14: #091e4224; --ink-20: #091e4233;
  --tint-blue: #e9f2ff; --tint-blue-2: #cce0ff; --tint-yellow: #fff7d6; --tint-yellow-2: #fff2b3; --tint-orange: #fff4e5;
  --tint-red: #ffeceb; --tint-red-2: #ffd5d2; --tint-green: #dcfff1; --tint-purple: #f3f0ff; --tint-purple-2: #dfd8fd; --tint-teal: #e3fafc;
  --text-blue: #0055cc; --text-red: #ae2a19; --text-yellow: #7f5f01; --text-orange: #a54800; --text-green: #216e4e; --text-purple: #5e4db2; --text-teal: #0b7285;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { font: 14px/20px -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif; color: var(--text); background: var(--surface); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; } a:hover { text-decoration: underline; }
/* Boutons et champs de l'app ; ceux d'Excalidraw (.excalidraw : le dessin et ses fenêtres, posées
   à part dans <body>) gardent le style de la bibliothèque (interrupteurs et boutons radio de
   l'export). :where() n'ajoute rien à la priorité : ces règles pèsent ce qu'elles pesaient. */
button:where(:not(.excalidraw *)), input:where(:not(.excalidraw *)), textarea:where(:not(.excalidraw *)), select:where(:not(.excalidraw *)) { font: inherit; color: inherit; }
button:where(:not(.excalidraw *)) { cursor: pointer; border: 0; background: none; border-radius: 3px; padding: 6px 12px; }
input:where(:not(.excalidraw *)), textarea:where(:not(.excalidraw *)), select:where(:not(.excalidraw *)) { border: 2px solid var(--line); border-radius: 3px; padding: 6px 12px; background: var(--surface); width: 100%; outline: none; }
input:focus:where(:not(.excalidraw *)), textarea:focus:where(:not(.excalidraw *)), select:focus:where(:not(.excalidraw *)) { border-color: var(--primary); }
textarea:where(:not(.excalidraw *)) { resize: vertical; min-height: 56px; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }
.hidden, [hidden] { display: none !important; }
#app { min-height: 100%; display: flex; flex-direction: column; }
.muted { color: var(--muted); } .small { font-size: 12px; line-height: 16px; }

/* boutons */
.btn { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-3); color: var(--text); font-weight: 500; padding: 6px 12px; border-radius: 3px; white-space: nowrap; }
.btn:hover { background: var(--surface-4); }
.btn.primary { background: var(--primary); color: #fff; } .btn.primary:hover { background: var(--primary-h); }
.btn.danger { background: var(--danger); color: #fff; } .btn.danger:hover { background: #ae2a19; }
.btn.subtle { background: transparent; } .btn.subtle:hover { background: var(--hover); }
.btn.ghost { background: #ffffff3d; color: #fff; } .btn.ghost:hover { background: #ffffff52; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { padding: 4px 8px; font-size: 13px; }
.icon { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* avatars */
.avatar { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: #fff; background: #5e6c84; flex: none; text-transform: uppercase; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; } .avatar.lg { width: 32px; height: 32px; font-size: 12px; }
.avatar.bot { background: var(--bot); font-size: 15px; }
.avatars { display: flex; } .avatars .avatar { margin-left: -4px; border: 2px solid var(--surface); }

/* ===== en-tête ===== */
.topbar { height: var(--header-h); display: flex; align-items: center; gap: 4px; padding: 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar.on-board { background: #0000003d; border-bottom: 0; color: #fff; backdrop-filter: blur(6px); }
.topbar .logo { display: flex; align-items: center; gap: 6px; font-weight: 800; font-size: 18px; padding: 4px 8px; color: var(--subtle); border-radius: 3px; }
.topbar.on-board .logo { color: #fff; } .topbar .logo:hover { background: var(--hover); text-decoration: none; }
.topbar .logo svg, .topbar .logo img { width: 22px; height: 22px; object-fit: contain; }
.topbar .spacer { flex: 1; }
.topbar .search { position: relative; width: 220px; }
.topbar .search input { padding: 5px 10px 5px 30px; border-width: 1px; border-radius: 4px; height: 32px; }
.topbar.on-board .search input { background: #ffffff33; border-color: #ffffff52; color: #fff; } .topbar.on-board .search input::placeholder { color: #ffffffcc; }
.topbar .search .icon { position: absolute; left: 9px; top: 8px; color: var(--muted); } .topbar.on-board .search .icon { color: #fff; }
.iconbtn { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; position: relative; color: var(--subtle); }
.iconbtn:hover { background: var(--hover); } .topbar.on-board .iconbtn { color: #fff; } .topbar.on-board .iconbtn:hover { background: #ffffff33; }
.badge-dot { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.chip-agent { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 3px; background: var(--tint-purple); color: var(--bot); font-weight: 600; }
.chip-agent:hover { background: var(--tint-purple-2); text-decoration: none; } .topbar.on-board .chip-agent { background: #ffffff33; color: #fff; }

/* ===== accueil ===== */
/* Pleine largeur : la colonne de gauche reste collée au bord, les tuiles prennent tout le reste. */
.home { display: flex; gap: 32px; margin: 28px 0; padding: 0 20px; width: 100%; }
.home nav { width: 240px; flex: none; }
.home nav a { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 6px; color: var(--text); font-weight: 500; }
.home nav a:hover { background: var(--hover); text-decoration: none; } .home nav a.active { background: var(--tint-blue); color: var(--primary); }
.home nav .ws { margin-top: 20px; padding: 6px 12px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; }
.home nav .ws:first-child { margin-top: 0; }
.home main { flex: 1; min-width: 0; }
.home h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 24px 0 12px; }
.ws-icon-img { width: 16px; height: 16px; object-fit: cover; border-radius: 3px; flex: none; }
.ws-icon-btn { display: flex; cursor: pointer; border-radius: 4px; padding: 2px; margin: -2px; }
.ws-icon-btn:hover { background: var(--hover); }
/* Accueil : depuis votre dernière visite */
.digest { margin-bottom: 8px; }
.dg-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.dg-head h3 { margin: 0; }
.dg-head .btn { margin-left: auto; }
.dg-empty { margin: -4px 0 8px; }
.dg-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; align-items: start; }
.dg-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px 12px; background: var(--surface); min-width: 0; }
.dg-box h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--subtle); margin: 0 0 8px; }
.dg-n { min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); color: var(--text); font-size: 12px; line-height: 20px; text-align: center; }
.dg-box p { margin: 0; }
.dg-board + .dg-board { margin-top: 10px; }
.dg-bname { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.dg-bname span:nth-child(2) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-bname b { color: var(--primary); }
.dg-dot { width: 12px; height: 12px; border-radius: 3px; flex: none; }
.dg-board ul { list-style: none; margin: 4px 0 0 20px; padding: 0; }
.dg-board li { padding: 2px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dg-card { color: var(--text); font-weight: 500; } .dg-card .cnum { margin-right: 2px; }
.dg-item { display: flex; gap: 8px; padding: 6px; margin: 0 -6px; border-radius: 6px; }
.dg-item > div { min-width: 0; }
.dg-item.unread { background: var(--tint-blue); }
.dg-quote { margin: 2px 0; padding-left: 8px; border-left: 3px solid var(--line); color: var(--subtle); overflow-wrap: anywhere; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.tile { position: relative; height: 190px; border-radius: 6px; padding: 8px 10px; color: #fff; font-weight: 700; display: flex; flex-direction: column; justify-content: space-between; box-shadow: inset 0 0 0 100vmax #00000014; text-decoration: none !important; overflow: hidden; }
.tile:hover { box-shadow: inset 0 0 0 100vmax #00000040; }
.tile .foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 500; opacity: .95; }
.tile .star { opacity: 0; transition: .1s; } .tile:hover .star, .tile .star.on { opacity: 1; }
.tile.new { background: var(--surface-2); color: var(--subtle); align-items: center; justify-content: center; box-shadow: none; font-weight: 500; }
.tile.new:hover { background: var(--surface-3); }
.tile.agent { outline: 2px solid var(--bot); outline-offset: -2px; }
/* Tuile avec logo : pas de fond coloré, nom au-dessus de l'image. */
.tile.has-logo { background: var(--surface-2); box-shadow: none; height: 190px; padding: 10px 10px 8px; align-items: center; }
.tile.has-logo:hover { box-shadow: none; }
.tile.has-logo:hover .logo { transform: scale(1.04); }
.tile.has-logo .name { display: block; color: var(--muted); font-size: 12px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tile .logo { width: auto; max-width: 65%; height: auto; max-height: 100px; object-fit: contain; margin: auto 0; transition: transform .12s; }
.tile.has-logo .foot { width: 100%; color: var(--muted); }
.tile.has-logo .star { color: var(--muted); }

/* fonds */
.bg-blue { background: #0079bf; } .bg-indigo { background: linear-gradient(135deg, #0747a6, #403294); }
.bg-ocean { background: linear-gradient(135deg, #0052cc 0%, #00b8d9 100%); } .bg-sunset { background: linear-gradient(135deg, #ff5630 0%, #ffab00 100%); }
.bg-forest { background: linear-gradient(135deg, #006644, #57d9a3); } .bg-grape { background: linear-gradient(135deg, #5243aa, #c0b6f2); }
.bg-rose { background: linear-gradient(135deg, #bf2600, #ff7452); } .bg-slate { background: linear-gradient(135deg, #42526e, #8993a4); }
.bg-peach { background: linear-gradient(135deg, #e56910, #fea362); } .bg-night { background: linear-gradient(135deg, #172b4d, #253858); }

/* ===== board ===== */
/* `flex: 1 1 auto`, pas `flex: 1` : avec une base à 0 %, la hauteur ci-dessous était ignorée et une
   longue colonne allongeait toute la page — la barre de défilement des colonnes passait sous l'écran. */
.board-page { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; height: calc(100vh - var(--header-h)); }
.board-hdr { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: #0000003d; color: #fff; backdrop-filter: blur(6px); flex-wrap: wrap; }
.board-hdr h1 { font-size: 18px; font-weight: 700; padding: 4px 10px; border-radius: 3px; cursor: pointer; }
.board-hdr h1:hover { background: #ffffff33; }
.board-hdr input.title { width: auto; min-width: 200px; font-size: 18px; font-weight: 700; padding: 3px 10px; border-color: #fff; color: var(--text); }
.board-hdr .sep { width: 1px; height: 16px; background: #ffffff52; margin: 0 4px; }
.board-hdr .spacer { flex: 1; }
.board-hdr .avatar { border: 0; }
.board-hdr .board-logo { height: 32px; width: auto; max-width: 120px; object-fit: contain; border-radius: 4px; background: #ffffff2e; padding: 2px 4px; }
.logo-box { height: 90px; border-radius: 6px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; padding: 8px; }
.logo-box img { max-height: 100%; max-width: 100%; object-fit: contain; }
.board-hdr .iconbtn { color: #fff; } .board-hdr .iconbtn:hover { background: #ffffff33; }
/* Ampoule du module Innovation & R&D : allumée comme l'étoile des favoris. */
.iconbtn.rd-flag.on .icon { stroke: #f5cd47; } .iconbtn.rd-flag.on .icon path:last-child { fill: #f5cd47; }
/* Dans la barre du haut : l'en-tete prend la place libre entre le logo et la recherche, sur une ligne.
   Le titre garde sa largeur ; quand la place manque, les elements secondaires disparaissent par paliers. */
.topbar .board-hdr { flex: 1; min-width: 0; padding: 0 4px; background: none; backdrop-filter: none; flex-wrap: nowrap; gap: 6px; }
.topbar .board-hdr h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; max-width: 260px; }
.topbar .board-hdr .board-logo { height: 30px; }
.topbar .board-hdr > * { flex-shrink: 0; }
.topbar .board-hdr input.title { width: 220px; min-width: 100px; flex-shrink: 1; padding: 2px 8px; font-size: 16px; }
.board-tabs .filter-chip, .board-tabs .filter-caption, .board-tabs .filter-count { white-space: nowrap; }
@media (max-width: 1366px) { .topbar .board-hdr .avatars { display: none; } }
@media (max-width: 1180px) { .topbar.on-board .logo .lbl, .topbar .board-hdr #visib .lbl { display: none; } .topbar.on-board .search { width: 170px; } }
@media (max-width: 960px) { .topbar .board-hdr .opt, .topbar .board-hdr .sep { display: none; } }
@media (max-width: 720px) {
  .topbar.on-board .logo { font-size: 0; gap: 0; }
  .topbar .board-hdr h1 { flex: 1; flex-shrink: 1; min-width: 0; max-width: none; }
}
.lists { flex: 1; display: flex; gap: 12px; padding: 8px 12px 12px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; }
/* Une vraie barre de défilement sous les colonnes (macOS la cache sinon), à la souris seulement. */
@media (pointer: fine) {
  .lists::-webkit-scrollbar { height: 14px; }
  .lists::-webkit-scrollbar-track { background: #00000029; border-radius: 7px; margin: 0 12px; }
  .lists::-webkit-scrollbar-thumb { background: #ffffffa6; border: 3px solid transparent; border-radius: 7px; background-clip: padding-box; }
  .lists::-webkit-scrollbar-thumb:hover { background-color: #ffffffe0; }
  @supports not selector(::-webkit-scrollbar) { .lists { scrollbar-color: #ffffffa6 #00000029; } }
}
body.panning, body.panning * { cursor: grabbing !important; user-select: none; }
.list { width: 272px; flex: none; background: var(--list); border-radius: 12px; display: flex; flex-direction: column; max-height: 100%; box-shadow: var(--card-shadow); color: var(--text); }
.list.dragging { opacity: .4; }
.list-hdr { display: flex; align-items: center; gap: 4px; padding: 10px 8px 6px 12px; cursor: grab; }
.list-hdr h2 { flex: 1; font-size: 14px; font-weight: 600; padding: 4px 8px; margin-left: -8px; border-radius: 3px; cursor: pointer; }
.list-hdr h2:hover { background: var(--hover); }
.list-hdr input { font-weight: 600; padding: 3px 8px; margin-left: -8px; }
.list-hdr .iconbtn { color: var(--subtle); width: 28px; height: 28px; border-radius: 6px; }
.list-hdr .count { font-size: 12px; color: var(--muted); }
.cards { flex: 1; overflow-y: auto; padding: 0 8px; display: flex; flex-direction: column; gap: 8px; min-height: 8px; scrollbar-width: thin; }
/* Glisser une carte : les colonnes qui peuvent la recevoir se signalent, celle visée ressort
   et l'emplacement dit où la carte va tomber (« Déposer dans « TO TEST » »). */
body.dnd-card .list:not([data-ro="1"]) { box-shadow: 0 0 0 2px #ffffff80, var(--card-shadow); }
body.dnd-card .list.drop-target { box-shadow: 0 0 0 3px var(--primary), 0 6px 18px #091e4240; background: var(--tint-blue); }
body.dnd-card, body.dnd-card * { cursor: grabbing; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 8px 12px 6px; cursor: pointer; position: relative; outline: 2px solid transparent; outline-offset: -2px; }
.card:hover { outline-color: var(--primary); }
.card.dragging { opacity: .35; transform: rotate(2deg); }
.card-origin { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; padding: 1px 6px; border-radius: 3px; margin-bottom: 4px; }
.card .labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.card .title { overflow-wrap: anywhere; }
/* Numero de carte, devant le titre : discret, jamais coupe. */
.cnum { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; margin-right: 6px; white-space: nowrap; }
.cnum.big { font-size: 16px; line-height: 24px; margin: 0; color: var(--subtle); }
.tbl .cnum { font-size: 12px; }
.card .meta { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; margin-top: 6px; color: var(--muted); font-size: 12px; }
.card .meta span { display: inline-flex; align-items: center; gap: 3px; }
.card .meta .icon { width: 14px; height: 14px; }
.card .meta .avatars { margin-left: auto; }
.card .due { padding: 1px 4px; border-radius: 3px; } .due.late { background: var(--tint-red); color: var(--text-red); } .due.done { background: var(--tint-green); color: var(--text-green); } .due.soon { background: var(--tint-yellow); color: var(--text-yellow); }
.card .groom-flag { position: absolute; top: 6px; right: 8px; font-size: 12px; opacity: .8; z-index: 1; }
.placeholder { min-height: 40px; border-radius: 8px; border: 2px dashed var(--primary); background: var(--glass); color: var(--primary); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; padding: 0 8px; text-align: center; overflow: hidden; flex-shrink: 0; }
.pill { height: 8px; min-width: 40px; border-radius: 4px; } .pill.named { height: 16px; padding: 0 8px; font-size: 12px; line-height: 16px; font-weight: 500; color: #164b35; }
.lbl-green { background: #4bce97; } .lbl-yellow { background: #f5cd47; } .lbl-orange { background: #fea362; } .lbl-red { background: #f87168; } .lbl-purple { background: #9f8fef; } .lbl-blue { background: #579dff; } .lbl-sky { background: #6cc3e0; } .lbl-lime { background: #94c748; } .lbl-pink { background: #e774bb; } .lbl-black { background: #8590a2; }
.lbl-red.named, .lbl-purple.named, .lbl-blue.named, .lbl-black.named, .lbl-pink.named { color: #fff; }
.list-foot { padding: 8px; }
.add-card-btn { width: 100%; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 8px; color: var(--subtle); font-weight: 500; text-align: left; }
.add-card-btn:hover { background: var(--ink-08); color: var(--text); }
.composer textarea { min-height: 56px; box-shadow: var(--card-shadow); border: 0; border-radius: 8px; padding: 8px 12px; }
.composer .row { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.add-list { width: 272px; flex: none; }
.add-list > button { width: 100%; justify-content: flex-start; background: #ffffff3d; color: #fff; border-radius: 12px; padding: 12px; font-weight: 500; }
.add-list > button:hover { background: #ffffff52; }
.add-list .composer { background: var(--list); border-radius: 12px; padding: 8px; }
.add-list .composer input { border-width: 2px; }

/* pieces jointes */
.card-modal.dropping { outline: 3px dashed var(--primary); outline-offset: -6px; }
.attach { display: flex; gap: 12px; margin-bottom: 12px; align-items: flex-start; }
.attach .thumb { width: 112px; height: 80px; flex: none; border-radius: 6px; background: var(--ink-08) center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--subtle); font-size: 14px; letter-spacing: .5px; cursor: pointer; }
.attach .thumb.doc { background: var(--ink-08); }
.attach .info { flex: 1; min-width: 0; padding-top: 4px; } .attach .info a { color: var(--text); } .attach .info b[data-imgview] { color: var(--text); cursor: pointer; }
.attach .info b[data-imgview]:hover { text-decoration: underline; }
.attach .acts button { padding: 0; color: var(--muted); text-decoration: underline; }

/* ===== popover ===== */
#pop:empty { display: none; }
.pop { position: fixed; z-index: 60; width: 304px; background: var(--surface); border-radius: 8px; box-shadow: 0 8px 12px #091e4226, 0 0 1px #091e424f; padding: 12px; color: var(--text); max-height: 80vh; overflow-y: auto; }
.pop .pop-hdr { display: grid; grid-template-columns: 32px 1fr 32px; align-items: center; margin-bottom: 8px; }
.pop .pop-hdr h4 { text-align: center; font-size: 14px; color: var(--subtle); grid-column: 2; }
.pop .pop-hdr .iconbtn { grid-column: 3; }
.pop .item { display: flex; align-items: center; gap: 8px; padding: 6px 12px; margin: 0 -12px; cursor: pointer; }
.pop .item:hover { background: var(--hover); } .pop .item.danger { color: var(--danger); }
.pop label.small { display: block; margin: 12px 0 4px; font-weight: 600; color: var(--subtle); }
.pop .lbl-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.pop .lbl-row .swatch { flex: 1; height: 32px; border-radius: 3px; padding: 6px 12px; font-weight: 500; cursor: pointer; }
.pop .lbl-row input[type=checkbox] { width: 16px; height: 16px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0; }
.swatches div { height: 32px; border-radius: 4px; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; } .swatches div.on { outline-color: var(--primary); }
.pop .notif { display: block; padding: 8px 12px; margin: 0 -12px; border-top: 1px solid var(--line); color: var(--text); }
.pop .notif:hover { background: var(--hover); text-decoration: none; } .pop .notif.unread { background: var(--tint-blue); }
.pop.wide { width: 380px; }
.pop .theme-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; margin-top: 4px; border-top: 1px solid var(--line); font-weight: 500; }
.menu-panel { position: fixed; top: var(--header-h); right: 0; bottom: 0; width: 340px; background: var(--surface); box-shadow: -2px 0 8px #091e4226; z-index: 30; overflow-y: auto; padding: 12px 16px; color: var(--text); }
.menu-panel h4 { text-align: center; margin: 4px 0 12px; color: var(--subtle); }
.menu-panel .close { position: absolute; right: 8px; top: 6px; }
.menu-panel section { border-top: 1px solid var(--line); padding: 12px 0; }
.menu-panel section h5 { font-size: 12px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; font-weight: 600; letter-spacing: .3px; }
.menu-panel .act { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; }
.menu-panel .act .avatar { width: 24px; height: 24px; font-size: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.toggle input { width: 40px; height: 22px; appearance: none; background: #8590a2; border-radius: 11px; position: relative; padding: 0; border: 0; cursor: pointer; }
.toggle input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .15s; }
.toggle input:checked { background: var(--success); } .toggle input:checked::after { left: 21px; }
.checkrow { display: flex; align-items: center; gap: 8px; padding: 4px 0; } .checkrow input { width: 16px; height: 16px; }

.sep-or { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; color: var(--muted); font-size: 12px; }
.sep-or::before, .sep-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* ===== modale carte ===== */
#modal:empty { display: none; }
.overlay { position: fixed; inset: 0; background: #091e427a; z-index: 50; overflow-y: auto; padding: 48px 8px; }
.card-modal { width: 768px; max-width: 100%; margin: 0 auto; background: var(--surface-2); border-radius: 12px; position: relative; padding: 16px 16px 24px; color: var(--text); }
.card-modal .close { position: absolute; right: 8px; top: 8px; }
.card-modal .cm-mode { position: absolute; right: 44px; top: 8px; }
/* Fiche en panneau à droite (façon Plane) : le tableau reste visible et cliquable à gauche,
   et se décale pour qu'aucune colonne ne passe sous le panneau. « Agrandir » revient à la fenêtre centrée. */
:root { --peek-w: min(760px, 56vw); }
.overlay.peek { left: auto; top: var(--header-h); width: var(--peek-w); padding: 0; background: none; overflow: visible; }
.overlay.peek .card-modal { width: 100%; height: 100%; overflow-y: auto; border-radius: 0; margin: 0; padding: 16px 20px 32px; box-shadow: -10px 0 30px #091e4233; border-left: 1px solid var(--line); }
body.peek-open .board-page { margin-right: var(--peek-w); }
.cm-head { display: flex; gap: 12px; padding-right: 40px; }
.cm-head .icon { margin-top: 6px; color: var(--subtle); }
.cm-id { display: flex; flex-direction: column; align-items: center; flex: none; }
.cm-ref { display: flex; gap: 12px; }
.cm-title { flex: 1; min-width: 0; }
.cm-created { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--subtle); }
.cm-created b { font-weight: 600; color: var(--text); }
.avatar.xs { width: 18px; height: 18px; font-size: 8px; } .avatar.xs.bot { font-size: 11px; }
.cm-head h2 { font-size: 20px; line-height: 24px; padding: 4px 8px; margin: -4px -8px; border-radius: 3px; cursor: pointer; flex: 1; }
.cm-head h2:hover { background: var(--hover); }
.cm-head input { font-size: 20px; font-weight: 600; padding: 3px 8px; margin: -4px -8px; width: calc(100% + 16px); }
.cm-body { display: flex; gap: 16px; margin-top: 16px; }
.cm-main { flex: 1; min-width: 0; } .cm-side { width: 168px; flex: none; }
.cm-side h5 { font-size: 12px; color: var(--subtle); margin: 12px 0 6px; font-weight: 600; }
.cm-side .btn { width: 100%; justify-content: flex-start; margin-bottom: 8px; background: var(--surface-3); }
.cm-side .btn:hover { background: var(--surface-4); }
.cm-chips { display: flex; flex-wrap: wrap; gap: 16px; margin: 0 0 16px 36px; }
.cm-chips h5 { font-size: 12px; color: var(--subtle); margin-bottom: 4px; font-weight: 600; }
.cm-chips .row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.cm-chips .pill.named { height: 32px; line-height: 32px; padding: 0 12px; border-radius: 3px; font-size: 14px; }
.cm-chips .add { width: 32px; height: 32px; border-radius: 3px; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; }
.cm-chips .due-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--surface-3); padding: 0 12px; height: 32px; border-radius: 3px; cursor: pointer; }
.cm-chips .due-chip input { width: 16px; height: 16px; }
.section { display: flex; gap: 12px; margin-bottom: 24px; }
.section > .icon { margin-top: 4px; color: var(--subtle); width: 24px; height: 24px; stroke-width: 1.8; }
.section .body { flex: 1; min-width: 0; }
.section .head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; } .section .head h3 { font-size: 16px; flex: 1 1 auto; }
/* Hiérarchie et Relations côte à côte ; elles se replient l'une sous l'autre si la place manque. */
.section-row { display: flex; flex-wrap: wrap; gap: 0 24px; }
.section-row > .section { flex: 1 1 260px; min-width: 0; }
/* Modules et Work items (façon Plane) : étiquette Module, fil d'Ariane, sous-éléments avec saisie rapide. */
.type-pill { display: inline-block; font-size: 11px; font-weight: 700; line-height: 16px; padding: 0 6px; border-radius: 3px; margin-right: 6px; vertical-align: 1px; }
.type-pill.module { background: var(--tint-purple-2); color: var(--text-purple); }
.cm-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; margin: 0 40px 8px 36px; color: var(--subtle); }
.cm-crumbs a { color: var(--subtle); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-crumbs a:hover { color: var(--primary); }
.cm-crumbs .sep { color: var(--muted); }
.subitems { display: flex; flex-direction: column; gap: 2px; margin-bottom: 6px; }
.subitem { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 4px; font-size: 13px; }
.subitem:hover { background: var(--ink-06); }
.subitem a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.subitem .iconbtn { opacity: 0; } .subitem:hover .iconbtn { opacity: 1; }
.sub-status { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; padding: 1px 6px; border-radius: 3px; background: var(--ink-08); color: var(--subtle); max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-status.done { background: var(--tint-green); color: var(--text-green); }
.sub-add { width: 100%; padding: 6px 8px; border: 1px dashed var(--ink-20); background: transparent; border-radius: 4px; font-size: 13px; }
.sub-add:focus { border-style: solid; background: var(--surface); }
/* Éditeur riche (Tiptap) : description des cartes et wiki. Blanc, sans bordure tant qu'on ne s'en sert pas. */
.desc-editor { min-height: 56px; }
.tt-editor .ProseMirror { min-height: 96px; padding: 8px 12px; border-radius: 6px; background: var(--surface); border: 1px solid transparent; outline: none; font-size: 14px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
.tt-editor .ProseMirror:hover { border-color: var(--ink-14); }
.tt-editor .ProseMirror-focused { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.tt-editor .ProseMirror[contenteditable="false"] { background: transparent; padding-left: 0; min-height: 0; } .tt-editor .ProseMirror[contenteditable="false"]:hover { border-color: transparent; }
.tt-editor .ProseMirror > * + * { margin-top: .5em; }
.tt-editor h1 { font-size: 22px; font-weight: 700; margin-top: .8em; } .tt-editor h2 { font-size: 18px; font-weight: 700; margin-top: .7em; } .tt-editor h3 { font-size: 15px; font-weight: 700; margin-top: .6em; }
.tt-editor ul, .tt-editor ol { padding-left: 22px; } .tt-editor ul { list-style: disc; } .tt-editor ol { list-style: decimal; } .tt-editor li > p { margin: 0; }
.tt-editor ul[data-type="taskList"] { list-style: none; padding-left: 2px; }
.tt-editor ul[data-type="taskList"] li { display: flex; gap: 8px; align-items: flex-start; }
.tt-editor ul[data-type="taskList"] li > label { flex: none; margin-top: 3px; } .tt-editor ul[data-type="taskList"] li > label input { width: 15px; height: 15px; }
.tt-editor ul[data-type="taskList"] li > div { flex: 1; min-width: 0; }
.tt-editor ul[data-type="taskList"] li[data-checked="true"] > div { color: var(--muted); text-decoration: line-through; }
.tt-editor blockquote { border-left: 3px solid var(--ink-14); padding-left: 12px; color: var(--subtle); }
.tt-editor code { background: var(--ink-06); border-radius: 3px; padding: 1px 4px; font-size: 12.5px; }
.tt-editor pre { background: #172b4d; color: #f1f2f4; border-radius: 6px; padding: 10px 12px; overflow-x: auto; } .tt-editor pre code { background: none; color: inherit; padding: 0; }
.tt-editor hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
.tt-editor a { color: var(--link); text-decoration: underline; }
.tt-editor img { max-width: 100%; height: auto; border-radius: 6px; display: block; } .tt-editor img.ProseMirror-selectednode { outline: 2px solid var(--primary); }
.tt-editor .tableWrapper { overflow-x: auto; }
.tt-editor table { border-collapse: collapse; width: 100%; table-layout: fixed; }
.tt-editor th, .tt-editor td { border: 1px solid var(--ink-14); padding: 4px 8px; vertical-align: top; position: relative; min-width: 60px; }
.tt-editor th { background: var(--surface-sunken); font-weight: 600; text-align: left; }
.tt-editor td > *, .tt-editor th > * { margin: 0 !important; } .tt-editor p { margin: 0; }
.tt-editor .selectedCell::after { content: ''; position: absolute; inset: 0; background: #0c66e41f; pointer-events: none; }
.tt-editor p.is-editor-empty:first-child::before { content: attr(data-placeholder); color: var(--muted); float: left; height: 0; pointer-events: none; }
.slash-menu { position: fixed; z-index: 90; width: 240px; max-height: 300px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px #091e4240; padding: 4px; }
.slash-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border: 0; background: none; border-radius: 4px; font-size: 13px; color: var(--text); text-align: left; cursor: pointer; }
.slash-item.on, .slash-item:hover { background: var(--tint-blue); }
.slash-ico { flex: none; width: 28px; height: 24px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 4px; font-size: 11px; font-weight: 700; color: var(--subtle); background: var(--surface); }
.slash-empty { padding: 8px; font-size: 13px; color: var(--muted); }
.desc-view { padding: 8px 12px; border-radius: 3px; background: var(--ink-04); cursor: pointer; min-height: 56px; }
.desc-view:hover { background: var(--ink-08); } .desc-view.empty { color: var(--muted); background: var(--ink-08); font-weight: 500; }
.md p { margin: 0 0 8px; } .md ol, .md ul { margin: 0 0 8px; padding-left: 24px; } .md code { background: var(--ink-08); padding: 1px 4px; border-radius: 3px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.md .mention { color: var(--primary); font-weight: 600; background: var(--tint-blue); padding: 0 3px; border-radius: 3px; }
.md .sig { color: var(--bot); font-weight: 600; }
.editor textarea { min-height: 96px; background: var(--surface); }
.editor .row { display: flex; gap: 4px; margin-top: 8px; }
.progress { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; color: var(--muted); }
.progress .bar { flex: 1; height: 8px; border-radius: 4px; background: var(--ink-08); overflow: hidden; }
.progress .bar div { height: 100%; background: var(--primary); } .progress .bar div.full { background: var(--success); }
.chk-item { display: flex; align-items: center; gap: 8px; padding: 4px 8px; margin: 0 -8px; border-radius: 3px; }
.chk-item:hover { background: var(--hover); } .chk-item input { width: 16px; height: 16px; flex: none; }
.chk-item span { flex: 1; } .chk-item span.done { text-decoration: line-through; color: var(--muted); }
.chk-item .iconbtn { width: 24px; height: 24px; opacity: 0; } .chk-item:hover .iconbtn { opacity: 1; }
.comment-box { display: flex; gap: 8px; margin-bottom: 16px; }
.comment-box textarea { background: var(--surface); box-shadow: var(--card-shadow); border: 0; border-radius: 8px; }
.comment { display: flex; gap: 8px; margin-bottom: 12px; }
.comment .who { font-weight: 600; } .comment .when { color: var(--muted); font-size: 12px; margin-left: 6px; }
.comment .bubble { background: var(--surface); border-radius: 8px; padding: 8px 12px; box-shadow: var(--card-shadow); margin-top: 4px; overflow-wrap: anywhere; }
.comment.agent .bubble { border-left: 3px solid var(--bot); }
.comment .acts { font-size: 12px; margin-top: 4px; } .comment .acts button { padding: 0; color: var(--muted); text-decoration: underline; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 3px; line-height: 18px; text-transform: uppercase; letter-spacing: .3px; }
.tag.bot { background: var(--tint-purple); color: var(--bot); } .tag.owner { background: var(--tint-blue); color: var(--text-blue); } .tag.client { background: var(--surface-2); color: var(--subtle); } .tag.dev { background: var(--tint-teal); color: var(--text-teal); }
.member { padding: 4px 0; } .member .access { margin: 2px 0 6px 32px; } .member .access .checkrow { padding: 1px 0; } .tag.pending { background: var(--tint-yellow); color: var(--text-yellow); } .tag.asked { background: var(--tint-blue); color: var(--text-blue); } .tag.ok { background: var(--tint-green); color: var(--text-green); } .tag.warn { background: var(--tint-red); color: var(--text-red); }
.callout { border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; background: var(--tint-purple); border-left: 3px solid var(--bot); }
.callout .row { display: flex; gap: 6px; margin-top: 8px; }
.activity .act { display: flex; gap: 8px; margin-bottom: 8px; font-size: 13px; } .activity .act .when { color: var(--muted); font-size: 12px; }

/* ===== page agent ===== */
.agent-page { max-width: 1100px; margin: 24px auto; padding: 0 16px; width: 100%; }
.agent-page .hero { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.agent-page .hero .avatar { width: 48px; height: 48px; font-size: 26px; }
.agent-page .hero h1 { font-size: 24px; } .agent-page .hero .spacer { flex: 1; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { background: var(--surface-2); border-radius: 8px; padding: 12px; } .stat .k { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; } .stat .v { font-size: 16px; font-weight: 600; margin-top: 4px; overflow-wrap: anywhere; }
.agent-page h3 { font-size: 16px; margin: 24px 0 12px; display: flex; align-items: center; gap: 8px; }
.proposal { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--bot); border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.proposal .hd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; } .proposal .hd b { font-size: 15px; }
.proposal textarea { min-height: 140px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 18px; }
.proposal .row { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.log { background: #172b4d; color: #dfe1e6; border-radius: 8px; padding: 12px; font: 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace; max-height: 320px; overflow: auto; white-space: pre-wrap; }
.log .warn { color: #ffab00; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; } .tbl th, .tbl td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; } .tbl th { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.run { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; } .run summary { cursor: pointer; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .run summary::-webkit-details-marker { display: none; }
.empty { padding: 24px; text-align: center; color: var(--muted); background: var(--surface-2); border-radius: 8px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-bottom: 8px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.panel h3 { font-size: 15px; margin: 0 0 8px; display: flex; align-items: center; gap: 6px; }
.panel label.small { display: block; margin: 10px 0 4px; font-weight: 600; color: var(--subtle); }
.panel .btn { margin-top: 12px; }
.panel input:disabled { background: var(--surface-2); color: var(--muted); }
.tbl.users td { vertical-align: middle; } .tbl tr.off { opacity: .55; }
.btn.sm.danger { background: var(--tint-red); color: var(--danger); } .btn.sm.danger:hover { background: var(--tint-red-2); }
.swatches div[data-color] { height: 28px; }

/* ===== connexion ===== */
.login-page { flex: 1; display: flex; align-items: center; justify-content: center; background: var(--surface-sunken); padding: 24px; }
.login { width: 400px; max-width: 100%; background: var(--surface); border-radius: 3px; box-shadow: 0 0 10px #091e4226; padding: 32px 40px; }
.login .logo { display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; color: var(--primary); margin-bottom: 16px; } .login .logo svg, .login .logo img { width: 32px; height: 32px; object-fit: contain; }
.login h2 { text-align: center; font-size: 16px; color: var(--subtle); margin-bottom: 20px; }
.login input { margin-bottom: 12px; } .login .btn { width: 100%; justify-content: center; }
.login .alt { text-align: center; margin-top: 16px; font-size: 13px; } .login .err { color: var(--danger); font-size: 13px; margin-bottom: 8px; }

#toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; }
#toast div { background: #172b4d; color: #fff; padding: 10px 16px; border-radius: 6px; box-shadow: 0 4px 12px #091e4240; animation: up .2s; } #toast div.err { background: var(--danger); }
@keyframes up { from { transform: translateY(8px); opacity: 0; } }
@media (max-width: 720px) { .home { flex-direction: column; gap: 8px; } .home nav { width: auto; display: flex; flex-wrap: wrap; } .cm-body { flex-direction: column; } .cm-side { width: auto; } .topbar .search { display: none; } .menu-panel { width: 100%; } }

/* ===== onglets de board : Tableau / Tableau blanc / Projet ===== */
.board-tabs { display: flex; gap: 2px; padding: 0 16px; background: #0000002e; backdrop-filter: blur(6px); }
/* Les 7 vues défilent si la place manque ; la barre de filtres du kanban, elle, reste visible. */
.board-tabs .tabs-scroll { display: flex; gap: 2px; min-width: 0; flex: 0 1 auto; overflow-x: auto; scrollbar-width: none; }
.board-tabs .board-filters { flex: none; }
/* Trop étroit pour les 7 vues et les filtres sur une ligne : les filtres passent dessous. */
@media (max-width: 1260px) {
  .board-tabs { flex-wrap: wrap; }
  .board-tabs .tabs-scroll { flex: 1 1 100%; }
  .board-tabs .board-filters { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
}
.board-tabs .tab { color: #fff; opacity: .8; padding: 8px 12px; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; white-space: nowrap; flex-shrink: 0; }
.board-tabs .tab:hover { opacity: 1; text-decoration: none; background: #ffffff1f; }
.board-tabs .tab.on { opacity: 1; border-bottom-color: #fff; background: #ffffff1f; }
/* Bouton dans la barre d'onglets (passage manuel de Leeter AI) : l'aspect d'un onglet. */
.board-tabs button.tab { background: none; border: 0; border-bottom: 2px solid transparent; font-family: inherit; cursor: pointer; }
.board-tabs button.tab:disabled { opacity: .5; cursor: progress; }
/* Filtres des cartes logés tout à droite de la barre d'onglets : fond sombre, texte clair. */
.board-tabs .board-filters { margin-left: auto; padding: 4px 0; gap: 5px; background: none; border-bottom: 0; flex-wrap: nowrap; }
.board-tabs .filter-caption, .board-tabs .filter-count { color: #ffffffcc; margin: 0; }
.board-tabs .filter-chip { padding: 4px 9px; color: #fff; background: #ffffff1f; border-color: #ffffff59; }
.board-tabs .filter-chip:hover { background: #ffffff33; }
.board-tabs .filter-chip[aria-pressed="true"] { color: #172b4d; background: #fff; border-color: #fff; }
.board-tabs .filter-reset { color: #fff; }

/* ===== tableaux blancs (façon Excalidraw) ===== */
.whiteboard-tab { flex: 1; display: flex; min-height: 0; background: var(--surface); }
.wb-list { width: 220px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 8px; }
.wb-list-hdr { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 4px 6px 8px; }
.wb-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.wb-item:hover { background: var(--surface-2); } .wb-item.on { background: var(--tint-purple); }
.wb-item-row { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.wb-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-item-acts { display: flex; gap: 2px; }
.wb-item .iconbtn { opacity: 0; flex: none; }
.wb-item:hover .iconbtn, .wb-item.on .iconbtn { opacity: 1; }
.wb-item-row .iconbtn, .wb-item-acts .iconbtn { width: 24px; height: 24px; }
.wb-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.wb-head { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-bottom: 1px solid var(--line); min-height: 44px; flex-wrap: wrap; }
.wb-head .wb-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.wb-head .wb-card { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
.wb-head .spacer { flex: 1; }
.wb-head #wbStatus { min-width: 80px; text-align: right; }
/* Excalidraw (web/vendor/excalidraw) remplit la zone ; ses boutons et champs gardent leur propre style. */
.wb-ex, .wb-slot { flex: 1; min-height: 0; position: relative; }
.wb-ex > .excalidraw-container, .wb-ex > .excalidraw { position: absolute; inset: 0; }

/* ===== Projet (façon Jira) : vue d'ensemble, backlog, Gantt, calendrier, wiki ===== */
.projet-tab { flex: 1; display: flex; flex-direction: column; min-height: 0; background: var(--surface); overflow: auto; }
.projet-view { padding: 20px; max-width: 1200px; width: 100%; margin: 0 auto; }

.ov-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 8px; }
.ov-card { background: var(--surface-2); border-radius: 8px; padding: 14px; }
.ov-card.warn { background: var(--tint-red); } .ov-card.soon { background: var(--tint-yellow); }
.ov-num { font-size: 26px; font-weight: 700; }
.section-title { font-size: 15px; font-weight: 700; margin: 20px 0 10px; }
.ov-bars { display: flex; flex-direction: column; gap: 6px; }
.ov-bar-row { display: grid; grid-template-columns: 140px 1fr 32px; align-items: center; gap: 8px; }
.ov-bar { height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.ov-bar > div { height: 100%; background: var(--primary); }

table.tbl.backlog td { vertical-align: middle; }
td.due.late, td.late { color: var(--danger); font-weight: 600; }
td.due.soon, td.soon { color: var(--warn); font-weight: 600; }
td.due.done, td.done { color: var(--success); }

.gantt { display: flex; align-items: flex-start; overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.gantt-names { flex: none; width: 260px; border-right: 1px solid var(--line); position: sticky; left: 0; background: var(--surface); z-index: 1; }
.gantt-names-head { height: 28px; border-bottom: 1px solid var(--line); }
.gantt-names .gname { display: flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px 0 6px; font-size: 13px; border-bottom: 1px solid var(--line); }
.gantt-names .gname a { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.gtoggle { flex: none; width: 18px; height: 18px; padding: 0; border: 0; background: none; color: var(--subtle); font-size: 14px; line-height: 18px; text-align: center; border-radius: 3px; cursor: pointer; }
button.gtoggle:hover { background: var(--hover); }
.gantt-tools { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; } .gantt-tools select { width: auto; }
.gtoday { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #0c66e4; opacity: .35; pointer-events: none; }
.gantt-scroll { position: relative; }
.gantt-head { display: flex; height: 28px; border-bottom: 1px solid var(--line); }
.gantt-head .gday { flex: none; text-align: center; font-size: 11px; color: var(--muted); line-height: 28px; border-right: 1px solid var(--surface-2); white-space: nowrap; overflow: hidden; }
.gantt-head .gday.we { background: var(--surface-sunken); } .gantt-head .gday.today { background: var(--tint-blue); color: var(--primary); font-weight: 700; }
.gantt-body { position: relative; }
.gbar { position: absolute; height: 24px; border-radius: 5px; background: var(--primary); display: block; }
.gbar:hover { filter: brightness(.92); }
.gbar.late { background: var(--danger); } .gbar.done { background: var(--success); }
.gbar.module { background: #8270db; }
/* Barre de synthèse : la période couverte par les sous-éléments d'une carte sans échéance propre. */
.gbar.sum { height: 10px; border-radius: 2px; background: #44546f; opacity: .7; }
.gbar.sum.module { background: #6e5dc6; }

.cal-hdr { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 12px; text-transform: capitalize; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-dow { font-size: 11px; color: var(--muted); text-transform: uppercase; text-align: center; padding-bottom: 4px; }
.cal-cell { min-height: 90px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.cal-cell.empty { border-color: transparent; }
.cal-cell.today { background: var(--tint-blue); border-color: var(--primary); }
.cal-daynum { font-size: 12px; font-weight: 700; color: var(--subtle); }
.cal-chip { display: block; font-size: 11px; background: var(--surface-2); border-radius: 3px; padding: 1px 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.cal-chip:hover { text-decoration: none; background: var(--surface-3); }
.cal-chip.late { background: var(--tint-red); color: var(--danger); }
.cal-chip.done { background: var(--tint-green); color: var(--success); }

.wiki { display: flex; gap: 16px; align-items: flex-start; }
.wiki-list { width: 240px; flex: none; display: flex; flex-direction: column; gap: 2px; }
.wiki-item { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.wiki-item:hover { background: var(--surface-2); } .wiki-item.on { background: var(--tint-blue); }
.wiki-editor { flex: 1; min-width: 0; }
.wiki-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.wiki-head input { flex: 1; min-width: 160px; font-size: 16px; font-weight: 700; }
.wiki-head select { width: auto; max-width: 220px; }
.wiki-body .ProseMirror { min-height: 360px; border-color: var(--line); }
@media (max-width: 720px) { .wiki { flex-direction: column; } .wiki-list { width: auto; } .gantt-names { width: 120px; } }

/* ---- wiki façon Notion (web/wiki.js) : onglet Wiki d'un tableau et module Wingleet WIKI ---- */
.wk { display: flex; gap: 0; align-items: stretch; min-height: 0; }
.wk-side { width: 270px; flex: none; display: flex; flex-direction: column; gap: 1px; padding: 8px; background: var(--surface-2); border-radius: var(--radius); overflow-y: auto; }
.wk-main { flex: 1; min-width: 0; padding: 8px 0 40px 32px; }
.wk-board { align-items: flex-start; }
.wk-board .wk-side { position: sticky; top: 0; max-height: calc(100vh - var(--header-h) - 120px); }
.wk-sidehead { display: flex; align-items: center; gap: 6px; padding: 4px 4px 8px; border-radius: 6px; } .wk-sidehead .spacer { flex: 1; }
.wk-row { display: flex; align-items: center; gap: 2px; padding: 0 2px 0 calc(var(--d, 0) * 14px); border-radius: 5px; min-height: 28px; position: relative; }
.wk-row:hover { background: var(--hover); } .wk-row.on { background: var(--tint-blue); } .wk-row.on .wk-t { color: var(--primary); font-weight: 600; }
.wk-row.dragging { opacity: .45; }
.wk-row.drop-in { background: var(--tint-blue-2); box-shadow: inset 0 0 0 1px var(--primary); }
.wk-row.drop-before::before, .wk-row.drop-after::after { content: ''; position: absolute; left: calc(var(--d, 0) * 14px + 22px); right: 4px; height: 2px; background: var(--primary); border-radius: 2px; }
.wk-row.drop-before::before { top: -1px; } .wk-row.drop-after::after { bottom: -1px; }
.wk-tog { width: 20px; height: 20px; flex: none; padding: 0; display: grid; place-items: center; border-radius: 4px; color: var(--muted); }
.wk-tog:hover { background: var(--hover); } .wk-tog.none { pointer-events: none; }
.wk-tog span { display: grid; transform: rotate(-90deg); transition: transform .12s; } .wk-tog span.open { transform: none; }
.wk-tog .icon { width: 14px; height: 14px; }
.wk-lbl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 4px 2px; color: var(--text); }
.wk-lbl:hover { text-decoration: none; }
.wk-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-ico { flex: none; width: 20px; text-align: center; font-size: 15px; line-height: 20px; } .wk-doc { opacity: .55; }
.wk-plus { width: 22px; height: 22px; flex: none; padding: 0; display: grid; place-items: center; border-radius: 4px; color: var(--muted); visibility: hidden; }
.wk-row:hover .wk-plus { visibility: visible; } .wk-plus:hover { background: var(--hover); color: var(--text); } .wk-plus .icon { width: 14px; height: 14px; }
.wk-row .tag { flex: none; }
.wk-page, .wk-root, .wk-search { max-width: 860px; }
.wk-bar { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 8px; } .wk-bar .spacer { flex: 1; }
.wk-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; min-width: 0; font-size: 13px; color: var(--muted); }
.wk-crumbs a { color: var(--muted); padding: 1px 4px; border-radius: 4px; } .wk-crumbs a:hover { background: var(--hover); color: var(--text); text-decoration: none; }
.wk-crumbs .sep { opacity: .6; } .wk-crumbs .cur { color: var(--text); padding: 1px 4px; }
.wk-draft { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; margin-bottom: 12px; border-radius: 6px; background: var(--tint-yellow); color: var(--text-yellow); font-size: 13px; }
.wk-cover { margin: 12px 0 8px; }
.wk-bigicon { font-size: 52px; line-height: 64px; padding: 0 6px; border-radius: 8px; margin-left: -6px; }
.wk-bigicon:hover:not(:disabled) { background: var(--hover); } .wk-bigicon:disabled { cursor: default; }
.wk-biglogo { width: 64px; height: 64px; object-fit: contain; border-radius: 10px; }
.wk-addicon { font-size: 13px; color: var(--muted); padding: 3px 6px; border-radius: 4px; margin-left: -6px; opacity: 0; transition: opacity .12s; }
.wk-cover:hover .wk-addicon, .wk-addicon:focus { opacity: 1; } .wk-addicon:hover { background: var(--hover); }
.wk-title { display: block; width: 100%; min-height: 0; resize: none; overflow: hidden; border: 0; padding: 4px 0; margin: 4px 0 6px; font-family: inherit; font-size: 32px; font-weight: 700; line-height: 1.25; color: var(--text); background: transparent; }
.wk-title:focus { box-shadow: none; outline: none; } .wk-title[readonly] { cursor: default; }
.wk-title-ro { font-size: 32px; line-height: 1.25; margin: 4px 0 6px; }
.wk-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; } .wk-meta .avatar { margin-right: 2px; }
.wk-cardsel { width: auto; max-width: 260px; padding: 1px 6px; font-size: 12px; }
.wk-body .ProseMirror { min-height: 320px; padding: 8px 0; border: 0; background: transparent; font-size: 15px; line-height: 1.65; }
.wk-body .ProseMirror:hover, .wk-body .ProseMirror-focused { border-color: transparent; box-shadow: none; }
.wk-body .ProseMirror h1 { font-size: 26px; } .wk-body .ProseMirror h2 { font-size: 20px; margin-top: 1.1em; } .wk-body .ProseMirror h3 { font-size: 16px; }
.wk-kids { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; }
.wk-kids h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); margin-bottom: 4px; }
.wk-kids > .btn { align-self: flex-start; margin-top: 6px; }
.wk-kid { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.wk-kid:hover { background: var(--hover); text-decoration: none; } .wk-kid .spacer { flex: 1; }
.wk-root .wk-kids { border-top: 0; margin-top: 8px; padding-top: 0; }
.wk-rootbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 12px; }
.pop .wk-tpl { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.wk-tpl-ico { width: 22px; text-align: center; font-size: 16px; }
.wk-move { max-height: 50vh; overflow-y: auto; margin: 0 -4px; } .wk-move .item { display: block; width: 100%; text-align: left; } .wk-move .item.on { background: var(--tint-blue); }
.wk-emojis { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.wk-emojis button { padding: 0; font-size: 20px; line-height: 32px; border-radius: 4px; } .wk-emojis button:hover { background: var(--hover); } .wk-emojis button.on { background: var(--tint-blue); }
/* module : barre latérale pleine hauteur, page qui défile à droite */
.wk-mod { height: calc(100vh - var(--header-h)); }
.wk-mod .wk-side { border-radius: 0; border-right: 1px solid var(--line); padding: 10px 8px 24px; }
.wk-mod .wk-main { overflow-y: auto; padding: 20px 40px 60px; }
.wk-mod .wk-main > * { margin: 0 auto; }
.wk-home { display: block; padding: 6px 8px; border-radius: 5px; color: var(--text); font-weight: 600; }
.wk-home:hover { background: var(--hover); text-decoration: none; } .wk-home.on { background: var(--tint-blue); color: var(--primary); }
.wk-sec { display: flex; align-items: center; justify-content: space-between; margin: 16px 0 2px; padding: 0 4px 0 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.wk-sec .iconbtn { width: 24px; height: 24px; } .wk-sec .icon { width: 14px; height: 14px; }
.wk-hint { padding: 4px 8px; }
.wk-srow .wk-lbl { font-weight: 500; }
.wk-sico { width: 20px; text-align: center; font-size: 15px; flex: none; color: var(--subtle); } .wk-sico .icon { vertical-align: -3px; }
.wk-n { margin-left: auto; flex: none; padding-left: 6px; font-size: 11px; font-weight: 600; color: var(--muted); }
.wk-slogo { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; flex: none; }
.wk-sdot { width: 14px; height: 14px; border-radius: 4px; flex: none; margin: 0 3px; }
/* page d'un espace de travail : une carte par app */
.wk-wide { max-width: 1180px; }
.wk-wscover { display: flex; align-items: center; gap: 16px; }
.wk-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin-top: 16px; }
.wk-app { display: flex; flex-direction: column; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wk-app-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 15px; color: var(--text); }
.wk-app-hd:hover { text-decoration: none; } .wk-app-hd:hover b { color: var(--primary); }
.wk-app-hd .wk-slogo { width: 28px; height: 28px; } .wk-app-hd .wk-sdot { width: 22px; height: 22px; }
.wk-app-pages { display: flex; flex-direction: column; gap: 1px; flex: 1; }
.wk-app-pg { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 6px; margin: 0 -6px; border-radius: 5px; color: var(--text); }
.wk-app-pg:hover { background: var(--hover); text-decoration: none; } .wk-app-pg.more { font-size: 12px; color: var(--muted); }
.wk-app-empty { flex: 1; padding: 4px 0 8px; }
.wk-app-ft { display: flex; align-items: center; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); } .wk-app-ft .spacer { flex: 1; }
/* tableau de bord du module */
.wk-dash-hd { margin-bottom: 16px; } .wk-dash-hd h1 { font-size: 24px; margin-bottom: 2px; }
.wk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wk-kpi { min-width: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); } .wk-kpi.warn { background: var(--tint-yellow); }
.wk-kpi-k { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.wk-kpi-v { margin: 2px 0; font-size: 28px; font-weight: 700; line-height: 36px; } .wk-kpi-v small { font-size: 15px; font-weight: 600; color: var(--muted); }
.wk-meter { display: block; height: 6px; margin: 2px 0 4px; border-radius: 3px; background: var(--ink-08); overflow: hidden; }
.wk-meter > span { display: block; height: 100%; background: var(--primary); } .wk-meter > span.full { background: var(--success); }
.wk-dash-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.wk-dash-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.wk-panel { min-width: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.wk-panel h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 14px; } .wk-panel h3 .wk-n { margin-left: 0; } .wk-panel h3 .spacer { flex: 1; }
.wk-cap { margin: -6px 0 8px; }
.wk-chart { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
.wk-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-stack { display: flex; flex-direction: column; justify-content: flex-end; height: 140px; border-bottom: 1px solid var(--line); }
.wk-stack b { font-size: 11px; line-height: 14px; text-align: center; color: var(--subtle); }
.wk-bars { display: flex; flex-direction: column; min-height: 0; border-radius: 3px 3px 0 0; overflow: hidden; }
.wk-bars .cr, .wk-legend i.cr { background: var(--primary); } .wk-bars .ed, .wk-legend i.ed { background: #85b8ff; }
.wk-x { overflow: hidden; font-size: 10px; text-align: center; white-space: nowrap; color: var(--muted); }
.wk-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; } .wk-legend span { display: inline-flex; align-items: center; gap: 5px; } .wk-legend i { width: 10px; height: 10px; border-radius: 2px; }
.wk-cov { display: grid; grid-template-columns: 22px minmax(0, 1fr) 90px 40px 64px; align-items: center; gap: 8px; padding: 5px 6px; margin: 0 -6px; border-radius: 5px; color: var(--text); }
.wk-cov:hover { background: var(--hover); text-decoration: none; } .wk-cov .wk-meter { margin: 0; } .wk-cov-v { font-size: 13px; font-weight: 600; text-align: right; } .wk-cov-p { text-align: right; }
.wk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wk-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; }
.wk-chip:hover { background: var(--surface-3); text-decoration: none; } .wk-chip .wk-slogo { width: 18px; height: 18px; } .wk-chip .wk-sdot { width: 12px; height: 12px; margin: 0 2px; }
@media (max-width: 1000px) { .wk-dash-grid { grid-template-columns: minmax(0, 1fr); } }
.wk-recent { display: flex; flex-direction: column; gap: 1px; }
.wk-rec { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; color: var(--text); }
.wk-rec:hover { background: var(--hover); text-decoration: none; } .wk-rec .wk-t { flex: 1; min-width: 0; }
.wk-search h3 { font-size: 16px; margin-bottom: 10px; }
.wk-hit { display: block; padding: 10px 12px; border-radius: 6px; color: var(--text); border-bottom: 1px solid var(--line); }
.wk-hit:hover { background: var(--surface-2); text-decoration: none; } .wk-hit mark { background: var(--tint-yellow-2); color: inherit; border-radius: 2px; }
@media (max-width: 720px) {
  .wk, .wk-mod { flex-direction: column; height: auto; }
  .wk-side, .wk-board .wk-side { width: auto; position: static; max-height: 40vh; }
  .wk-main, .wk-mod .wk-main { padding: 12px 0 40px; overflow: visible; }
  .wk-mod .wk-main { padding: 12px 16px 40px; }
  .wk-title, .wk-title-ro { font-size: 26px; }
  .wk-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wk-cov { grid-template-columns: 22px minmax(0, 1fr) 60px 40px; } .wk-cov-p { display: none; }
}

/* ===== espaces de travail (colonne de l'accueil) ===== */
.home nav .ws { display: flex; align-items: center; justify-content: space-between; }
.ws-add { width: 22px; height: 22px; padding: 0; border-radius: 4px; font-size: 17px; line-height: 1; color: var(--subtle); background: var(--surface-2); }
.ws-add:hover { background: var(--surface-3); color: var(--text); }
.home nav .ws-n { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.ws-row { display: flex; align-items: center; gap: 2px; }
.ws-row a:first-child { flex: 1; min-width: 0; }
.ws-board-btn { flex: none; width: 28px; height: 28px; color: var(--subtle); }
.ws-board-btn:hover { color: var(--text); }
.home h3 .btn { margin-left: 8px; font-weight: 500; }
.linkrow { display: flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 0; }
.linkrow .iconbtn { width: 22px; height: 22px; opacity: 0; }
.linkrow:hover .iconbtn { opacity: .7; } .linkrow .iconbtn:hover { opacity: 1; }

/* Pipeline Leeter AI : cahiers des charges sur le board de l'agent. */
.spec-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; }
.spec-pill { background: var(--tint-purple); color: var(--bot); border-radius: 3px; padding: 1px 6px; font-size: 11px; font-weight: 600; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.validate-btn { margin-left: auto; padding: 2px 8px; }
.spec-callout { border-left-width: 4px; }
.spec-callout .spec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spec-callout .spec-head b { font-size: 14px; }
.spec-callout .spec-head code { background: var(--glass); padding: 1px 4px; border-radius: 3px; }
.spec-block { background: var(--glass); border-radius: 6px; padding: 8px 10px; margin-top: 8px; }
.spec-block pre { font: 11px/15px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--subtle); }
.spec-callout textarea { width: 100%; }
.pipe-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.pipe-col { display: block; background: var(--surface-2); border-radius: 8px; padding: 10px 12px; color: inherit; text-decoration: none; min-height: 72px; border-top: 3px solid var(--line); }
.pipe-col:hover { background: var(--hover); text-decoration: none; }
.pipe-col.empty { opacity: .65; }
.pipe-col.attn { border-top-color: var(--warn); background: var(--tint-yellow); }
.pipe-col .k { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
.pipe-col .v { font-size: 22px; font-weight: 700; margin: 2px 0 4px; }
.pipe-card { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Panneau pleine page (registre de l'agent). */
.sheet-ov { position: fixed; inset: 0; z-index: 70; background: #091e4266; display: flex; padding: 24px; overflow: auto; }
.sheet { background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px #091e4240; width: min(1100px, 100%); max-height: 100%; margin: auto; display: flex; flex-direction: column; }
.sheet-hdr { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); border-radius: 10px 10px 0 0; }
.sheet-hdr h3 { font-size: 16px; flex: 1; }
.sheet.narrow { width: min(560px, 100%); }
.sheet-body .act { display: flex; gap: 8px; padding: 6px 0; font-size: 13px; }
.sheet-body .act .avatar { width: 24px; height: 24px; font-size: 10px; }
.sheet-body { padding: 16px 20px 20px; overflow: auto; }
.sheet-body .tbl td:first-child { max-width: 520px; }
/* formulaire de demande (clients) : « + Ajouter une carte », une seule page */
.request-form label.small { display: block; margin: 12px 0 4px; font-weight: 600; color: var(--subtle); }
.request-form .sheet-body > label.small:first-child { margin-top: 0; }
.request-form .req { color: var(--danger); margin-left: 2px; }
.request-form .invalid { border-color: var(--danger); }
.rq-desc-hdr { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin: 12px 0 4px; }
.request-form .rq-desc-hdr label.small { margin: 0; }
.rq-mic.recording { background: var(--danger); color: #fff; }
.rq-mic.recording .icon { animation: rq-pulse 1s ease-in-out infinite; }
@keyframes rq-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .rq-mic.recording .icon { animation: none; } }
.rq-sub { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.rq-drop { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; padding: 12px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }
.rq-drop.dropping { border-color: var(--primary); background: var(--tint-blue); }
.rq-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.rq-thumbs:empty { display: none; }
.rq-thumb { position: relative; width: 96px; height: 72px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.rq-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rq-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: #091e42cc; color: #fff; display: flex; align-items: center; justify-content: center; }
.rq-thumb .icon { width: 13px; height: 13px; }
.rq-sep { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin: 20px 0 0; padding-top: 14px; border-top: 1px solid var(--line); }
.rq-sep > span:first-child { font-weight: 600; }
.rq-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 12px; }
.rq-row > [hidden] { display: none !important; }
.rq-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); }
.rq-foot .spacer { flex: 1; }
.rq-err { color: var(--danger); font-size: 13px; margin: 0; }

/* ===== Responsive : smartphone (l'application est beaucoup utilisée au téléphone) ===== */
/* Fantôme d'une carte déplacée au doigt (appui long puis glisser). */
.card.ghost { position: fixed; z-index: 90; pointer-events: none; opacity: .92; transform: rotate(2deg); box-shadow: 0 8px 24px #091e4259; }
/* Cibles tactiles : au doigt, pas de survol — les actions cachées jusqu'au hover restent visibles. */
@media (pointer: coarse) {
  .iconbtn { width: 40px; height: 40px; }
  .btn { min-height: 36px; }
  .btn.sm { min-height: 32px; }
  .list-hdr .iconbtn { width: 36px; height: 36px; }
  .chk-item .iconbtn, .linkrow .iconbtn, .wb-item .iconbtn, .tile .star { opacity: 1; }
  .chk-item .iconbtn { width: 32px; height: 32px; }
  .card { padding: 10px 12px 8px; }
  .add-card-btn { padding: 10px 8px; }
  .pop .item { padding: 10px 12px; }
  .cards { scrollbar-width: none; } .lists { scrollbar-width: none; }
}
@media (max-width: 720px) {
  /* Pas de zoom automatique d'iOS sur les champs : 16 px minimum. */
  input, textarea, select { font-size: 16px; }
  /* barre du haut : le logo seul, l'agent en icône, recherche dépliable par la loupe du tableau */
  .topbar { padding: 0 4px; gap: 2px; }
  .topbar .logo { font-size: 16px; padding: 4px 6px; } .topbar .logo .lbl { display: none; }
  .chip-agent .lbl { display: none; } .chip-agent { padding: 4px 8px; }
  .topbar .search { display: none; }
  .topbar.search-open .search { display: block; position: absolute; left: 8px; right: 96px; top: 8px; width: auto; z-index: 2; }
  .topbar.search-open .search input { background: var(--surface); color: var(--text); }
  /* accueil : la colonne des espaces devient une rangée de puces, tuiles plus petites */
  .home { margin: 12px 0; padding: 0 12px; gap: 4px; }
  .home nav { gap: 4px; overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .home nav .ws { margin: 0; white-space: nowrap; align-self: center; }
  .home nav a { white-space: nowrap; flex: none; padding: 6px 10px; background: var(--surface-2); }
  .home nav a.active { background: var(--tint-blue); }
  .home h3 { font-size: 15px; margin: 16px 0 8px; flex-wrap: wrap; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tile, .tile.has-logo { height: 120px; }
  .dg-head .btn { margin-left: 0; }
  .tile .name { font-size: 14px; overflow-wrap: anywhere; }
  /* en-tête du tableau : titre + menu, le reste disparaît */
  .board-page { height: calc(100dvh - var(--header-h)); }
  .board-hdr { padding: 6px 8px; gap: 4px; flex-wrap: nowrap; }
  .board-hdr h1 { font-size: 16px; padding: 4px 6px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .board-hdr .spacer { display: none; }
  .board-hdr .opt, .board-hdr .sep, .board-hdr .board-logo { display: none; }
  .board-hdr .btn .lbl { display: none; }
  .board-hdr #share { padding: 6px; }
  .board-tabs { padding: 0 4px; flex-wrap: wrap; }
  .board-tabs .tabs-scroll { flex: 1 1 100%; }
  .board-tabs .tab { padding: 8px 10px; white-space: nowrap; }
  .board-tabs .board-filters { margin-left: 0; width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
  /* colonnes : une par écran, défilement horizontal avec accroche */
  .lists { gap: 8px; padding: 8px 8px 12px; scroll-snap-type: x mandatory; scroll-padding: 8px; -webkit-overflow-scrolling: touch; }
  .list, .add-list { width: min(86vw, 320px); scroll-snap-align: start; }
  .cards { padding: 0 6px; }
  .menu-panel { width: 100%; top: 0; z-index: 60; }
  /* fiche de carte : plein écran, actions en grille sous le contenu */
  .overlay { padding: 0; }
  .card-modal { border-radius: 0; min-height: 100%; padding: 12px 12px 32px; width: 100%; }
  .overlay.peek { top: 0; width: 100%; } .overlay.peek .card-modal { box-shadow: none; border-left: 0; }
  body.peek-open .board-page { margin-right: 0; } .card-modal .cm-mode { display: none; }
  .card-modal .close { right: 4px; top: 4px; background: var(--surface); }
  .cm-head { gap: 8px; padding-right: 44px; } .cm-ref { gap: 8px; } .cm-head h2 { font-size: 18px; }
  .cm-chips { margin-left: 0; }
  .cm-body { flex-direction: column; gap: 8px; }
  .cm-side { width: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .cm-side h5 { grid-column: 1 / -1; margin: 8px 0 0; }
  .cm-side .btn { margin: 0; overflow: hidden; text-overflow: ellipsis; }
  .cm-side input[type=file] { display: none; }
  .section { gap: 8px; margin-bottom: 18px; } .section > .icon { width: 20px; height: 20px; }
  /* Trop étroit pour deux colonnes : Hiérarchie et Relations reprennent toute la largeur. */
  .section-row { display: block; }
  .attach .thumb { width: 80px; height: 60px; }
  /* popover : feuille ancrée en bas de l'écran */
  .pop, .pop.wide { left: 0 !important; right: 0; top: auto !important; bottom: 0; width: 100%; max-height: 82vh; border-radius: 14px 14px 0 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px #091e4240; }
  /* panneau pleine page */
  .sheet-ov { padding: 0; } .sheet { border-radius: 0; width: 100%; height: 100%; max-height: none; }
  .sheet-hdr { padding: 10px 12px; border-radius: 0; } .sheet-body { padding: 12px; }
  .sheet-body .tbl td:first-child { max-width: none; }
  /* page Leeter AI */
  .agent-page { margin: 12px auto; padding: 0 12px; }
  .agent-page .hero { gap: 10px; } .agent-page .hero h1 { font-size: 20px; } .agent-page .hero .avatar { width: 40px; height: 40px; font-size: 22px; }
  .agent-page .hero > .btn, .agent-page .hero > select, .agent-page .hero > #runNow { flex: 1 1 45%; justify-content: center; }
  .pipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats { grid-template-columns: 1fr; }
  .agent-page table.tbl, .projet-view table.tbl, .sheet-body table.tbl { display: block; overflow-x: auto; white-space: nowrap; }
  .agent-page table.tbl td, .projet-view table.tbl td { white-space: normal; min-width: 120px; }
  .proposal { padding: 10px 12px; } .proposal .row { flex-wrap: wrap; }
  .log { font-size: 11px; line-height: 16px; padding: 8px; }
  .run summary { gap: 6px 10px; }
  /* onglet Projet */
  .projet-view { padding: 12px; }
  .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov-bar-row { grid-template-columns: 96px 1fr 28px; } .ov-bar-row .small:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-cell { min-height: 52px; padding: 2px; } .cal-chip { font-size: 10px; padding: 0 2px; }
  .gantt-names { width: 150px; } .gantt-names .gname { font-size: 12px; padding: 0 6px 0 2px; }
  .wiki-body .ProseMirror { min-height: 220px; }
  /* tableau blanc : liste au-dessus, Excalidraw en dessous (il a sa propre mise en page mobile) */
  .whiteboard-tab { flex-direction: column; }
  .wb-list { width: auto; max-height: 112px; border-right: 0; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; align-content: flex-start; }
  .wb-list-hdr { width: 100%; padding: 2px 4px 4px; }
  .wb-item { padding: 6px 8px; background: var(--surface-2); max-width: 60vw; } .wb-item .small { display: none; }
  .wb-head { padding: 4px 8px; min-height: 0; } .wb-head .wb-title { max-width: 50%; } .wb-head #wbStatus { min-width: 0; }
  /* connexion */
  .login { padding: 24px 20px; }
  /* divers */
  #toast { left: 12px; right: 12px; transform: none; } #toast div { text-align: center; }
  .callout .row { flex-wrap: wrap; }
  .spec-callout .spec-head { gap: 6px; }
}
@media (max-width: 1024px) and (min-width: 721px) {
  .home nav { width: 200px; }
  .cm-side { width: 150px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Filtres du Kanban : état visible, accessibles au clavier et sur mobile. */
.board-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 9px 12px; background: var(--surface); color: var(--text); border-bottom: 1px solid var(--line); }
.filter-caption { font-size: 12px; color: var(--subtle); margin-right: 4px; }
.filter-chip, .filter-reset { font: inherit; font-size: 12px; cursor: pointer; border-radius: 16px; padding: 6px 11px; border: 1px solid var(--line); color: var(--subtle); background: var(--surface); }
.filter-chip:hover { background: var(--tint-blue); }
.filter-chip[aria-pressed="true"] { color: #fff; background: var(--primary); border-color: var(--primary); }
.filter-chip:focus-visible, .filter-reset:focus-visible { outline: 3px solid #75adff; outline-offset: 2px; }
.filter-count { font-size: 12px; color: var(--subtle); margin-left: auto; white-space: nowrap; }
.filter-reset { color: var(--text-blue); border-color: transparent; background: transparent; text-decoration: underline; }
.filter-empty { padding: 10px 16px; color: var(--subtle); background: var(--tint-blue); font-size: 13px; }
@media (max-width: 720px) {
  .board-filters { gap: 5px; padding: 8px; }
  .filter-caption { display: none; }
  .filter-chip { min-height: 36px; padding: 7px 10px; }
}

/* ---- Leeter AI : les deux agents en direct, la chaîne des demandes, ce qui vous attend ---- */
.lt .lt-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.lt .lt-head h1 { font-size: 24px; } .lt .lt-head .spacer { flex: 1; }
.lt-live-txt { color: var(--success); }
.lt-orb { position: relative; width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--bot); color: #fff; font-size: 26px; flex: none; }
.lt-orb > span { position: relative; z-index: 1; }
.lt-orb.on::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(from 0deg, var(--bot), #36b37e, #0c66e4, var(--bot)); animation: lt-spin 2.4s linear infinite; z-index: 0; }
.lt-orb.on::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--bot); z-index: 0; }
@keyframes lt-spin { to { transform: rotate(360deg); } }
@keyframes lt-pulse { 0%, 100% { box-shadow: 0 0 0 0 #36b37e66; } 50% { box-shadow: 0 0 0 6px #36b37e00; } }
@keyframes lt-flow { to { background-position: 24px 0; } }

.lt-workers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lt-worker { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.lt-worker.live { border-color: #36b37e; box-shadow: 0 0 0 3px #36b37e1f; }
.lt-w-head { display: flex; align-items: center; gap: 10px; }
.lt-w-head .spacer { flex: 1; }
.lt-w-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; font-size: 20px; flex: none; }
.lt-pill { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; padding: 2px 8px; border-radius: 10px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.lt-pill.on { background: var(--tint-green); color: var(--text-green); animation: lt-pulse 1.6s ease-in-out infinite; }
.lt-now { display: flex; gap: 12px; align-items: flex-start; margin-top: 12px; padding: 12px; border-radius: 10px; background: linear-gradient(135deg, var(--tint-purple), var(--tint-blue)); }
.lt-now-ico { font-size: 26px; line-height: 30px; flex: none; }
.lt-now-text { font-size: 16px; font-weight: 600; line-height: 22px; overflow-wrap: anywhere; }
.lt-idle { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--surface-2); color: var(--subtle); }
.lt-trail { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.lt-trail li { position: relative; display: flex; gap: 8px; align-items: baseline; padding: 3px 0; font-size: 13px; line-height: 18px; }
.lt-trail li::before { content: ''; position: absolute; left: -19px; top: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.lt-trail li.cur::before { background: #36b37e; animation: lt-pulse 1.6s ease-in-out infinite; }
.lt-trail li.cur .x { font-weight: 600; }
.lt-trail li.warn .x { color: var(--danger); }
.lt-trail .t { color: var(--muted); font-size: 11px; width: 34px; flex: none; font-variant-numeric: tabular-nums; }
.lt-trail .i { width: 18px; flex: none; text-align: center; }
.lt-trail .x { min-width: 0; overflow-wrap: anywhere; }
.lt-trail.past { opacity: .7; }

.lt-chain { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.lt-station { position: relative; background: var(--surface-2); border-radius: 12px; padding: 12px; min-height: 120px; border-top: 4px solid var(--line); }
.lt-station.live { border-top-color: #36b37e; }
.lt-station.empty { opacity: .7; }
.lt-st-head { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.lt-st-dot { font-size: 20px; line-height: 24px; }
.lt-count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-3); font-size: 12px; font-weight: 700; text-align: center; color: var(--subtle); }
.lt-count.attn { background: var(--tint-yellow); color: var(--text-yellow); }
.lt-chips { display: flex; flex-direction: column; gap: 6px; }
.lt-chip { background: var(--surface); border-radius: 8px; padding: 6px 8px; box-shadow: var(--card-shadow); font-size: 13px; line-height: 17px; min-width: 0; }
.lt-chip a { color: var(--text); }
.lt-chip-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lt-chip-note { display: block; font-size: 11px; color: var(--muted); }
.lt-chip.live { box-shadow: 0 0 0 2px #36b37e; }
.lt-chip.live .lt-chip-note { color: var(--text-green); font-weight: 600; }
.lt-chip.attn { box-shadow: 0 0 0 2px #f5cd47; }
.lt-none { padding: 4px 2px; }
/* La flèche entre deux étapes : elle « coule » quand l'étape d'avant travaille. */
.lt-arrow { position: absolute; right: -12px; top: 22px; width: 12px; height: 4px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); z-index: 1; }
.lt-station.live .lt-arrow { background: repeating-linear-gradient(90deg, #36b37e 0 6px, transparent 6px 12px); background-size: 24px 4px; animation: lt-flow .8s linear infinite; }

.lt-todo { display: flex; flex-direction: column; gap: 8px; }
.lt-todo-item { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); }
.lt-todo-item.warn { border-color: #f87168; background: var(--tint-red); }
.lt-todo-item > .btn { align-self: center; }
.lt-todo-item textarea { margin-top: 6px; min-height: 70px; }
.lt-todo-ico { font-size: 20px; line-height: 24px; flex: none; }
.lt-empty { padding: 16px; border-radius: 10px; background: var(--surface-2); color: var(--muted); text-align: center; }

.lt-backstage { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 12px; }
.lt-backstage > summary { cursor: pointer; font-weight: 600; font-size: 15px; padding: 6px 0; }
.lt-settings { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.lt-facts { display: flex; flex-direction: column; gap: 4px; color: var(--subtle); margin-bottom: 10px; }
.lt-hist { padding: 4px 0; border-bottom: 1px solid var(--surface-2); }

@media (max-width: 1024px) { .lt-chain { grid-template-columns: repeat(3, minmax(0, 1fr)); } .lt-arrow { display: none; } }
@media (max-width: 720px) {
  .lt-workers, .lt-chain { grid-template-columns: 1fr; }
  .lt .lt-head > .btn { flex: 1 1 45%; justify-content: center; }
  .lt-todo-item { flex-wrap: wrap; } .lt-todo-item > .btn { width: 100%; justify-content: center; }
  .lt-station { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { .lt-orb.on::before, .lt-pill.on, .lt-trail li.cur::before, .lt-station.live .lt-arrow { animation: none; } }
.lt h3 { flex-wrap: wrap; row-gap: 2px; }
/* Schémas Excalidraw de la carte (application Excalidraw de wingleet-srv) */
.xd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.xd-sheet { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: var(--text); text-decoration: none; }
.xd-sheet:hover .xd-name { text-decoration: underline; }
.xd-thumb { height: 96px; border-radius: 6px; border: 1px solid var(--line); background: var(--surface); display: flex; align-items: center; justify-content: center; overflow: hidden; font-size: 24px; }
.xd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.xd-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* modules (owners) : menu à droite du logo, et la page Serveurs */
.topbar .mod-switch { width: 24px; height: 28px; border-radius: 4px; margin-left: -6px; }
.pop .mod-item { color: var(--text); align-items: flex-start; }
.pop .mod-item:hover { text-decoration: none; }
.pop .mod-item > span { flex: 1; display: flex; flex-direction: column; }
.pop .mod-item .icon { margin-top: 2px; } .pop .mod-item.on { background: var(--tint-blue); } .pop .mod-item.on > .icon:last-child { color: var(--primary); }
.servers-page .hero .avatar .icon { width: 24px; height: 24px; }
.agent-page.servers-page { max-width: 1320px; }
.srv-table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 24px; }
.srv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.srv-table > thead th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; padding: 10px 12px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.srv-table > tbody > tr > td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.srv-table > tbody > tr:last-child > td { border-bottom: 0; }
.srv-row code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; }
@media (min-width: 721px) { .srv-row code { white-space: nowrap; } }
.srv-row { cursor: pointer; } .srv-row:hover > td { background: var(--surface-sunken); }
.srv-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.srv-name { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; } .srv-name a { color: inherit; }
.srv-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--success); flex: none; }
.is-alert .srv-dot { background: var(--warn); } .is-down .srv-dot { background: var(--danger); } .is-pending .srv-dot { background: var(--surface-3); }
.tag.ext { background: var(--tint-orange); color: var(--text-orange); }
/* page d'une machine */
.srv-back { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 12px; font-weight: 500; }
.srv-back .icon { transform: rotate(90deg); }
.srv-hero { margin-bottom: 8px; } .srv-hero h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .srv-hero h1 .srv-dot { width: 12px; height: 12px; }
.servers-page > .srv-role { margin: 0 0 16px; font-size: 14px; }
.srv-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px 24px; margin: 0 0 16px; padding: 16px; background: var(--surface-2); border-radius: 8px; }
.srv-facts dt { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; }
.srv-facts dd { margin: 0; overflow-wrap: anywhere; } .srv-facts code { font-size: 12px; background: var(--surface); padding: 1px 5px; border-radius: 3px; }
.agent-page h3.srv-h3 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .srv-h3 .spacer { flex: 1; }
.panel.srv-lists > .srv-list:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; font-size: 12px; font-weight: 500; }
.seg button { padding: 4px 10px; border-radius: 0; color: var(--subtle); } .seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--tint-blue); color: var(--primary); }
/* URLs des apps */
.tbl.urls { font-size: 13px; } .tbl.urls th { background: var(--surface-2); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; }
.tbl.urls td { vertical-align: middle; } .tbl.urls td:first-child a { font-weight: 500; overflow-wrap: anywhere; }
.tbl.urls tr.bad td { background: var(--tint-red); }
/* En-têtes à menu (web/table-menu.js) : URLs des apps, liste des API */
table.colmenu > thead > tr > th { padding: 0; } .srv-table .th-btn { padding: 10px 12px; }
.th-btn { display: flex; align-items: center; gap: 4px; width: 100%; padding: 8px; background: none; border: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; text-align: left; cursor: pointer; white-space: nowrap; }
.th-btn:hover { color: var(--text); background: var(--hover); } .th-btn.on { color: var(--primary); } .th-btn .icon { width: 12px; height: 12px; }
.tbl.urls td.url-desc { min-width: 220px; max-width: 380px; } .tbl.urls td.url-desc .tag { margin-left: 2px; vertical-align: 1px; }
.http { display: inline-block; min-width: 34px; text-align: center; font-weight: 700; font-size: 12px; border-radius: 3px; padding: 0 6px; cursor: help; }
.http.ok { background: var(--tint-green); color: var(--text-green); } .http.warn { background: var(--surface-3); color: var(--subtle); } .http.bad { background: var(--tint-red); color: var(--text-red); }
.srv-role { margin: 6px 0 10px; color: var(--subtle); font-size: 13px; }
.srv-alerts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; } .srv-alerts .tag { text-transform: none; letter-spacing: 0; }
.srv-err { color: var(--danger); font-size: 13px; margin-bottom: 8px; overflow-wrap: anywhere; }
.srv-apps { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.srv-app { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--subtle); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 1px 10px 1px 8px; }
.srv-app i { width: 8px; height: 8px; border-radius: 50%; background: var(--success); } .srv-app.down { background: var(--tint-red); border-color: var(--tint-red-2); color: var(--text-red); } .srv-app.down i { background: var(--danger); }
.meters { display: grid; gap: 6px; }
.meter { display: grid; grid-template-columns: 112px 1fr 172px; align-items: center; gap: 8px; font-size: 12px; }
.meter .k { color: var(--subtle); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meter .bar { height: 8px; border-radius: 4px; background: var(--ink-08); overflow: hidden; }
.meter .bar span { display: block; height: 100%; background: var(--primary); }
.meter.warn .bar span { background: var(--warn); } .meter.crit .bar span { background: var(--danger); }
.meter .v { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.srv-list { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 8px; }
.srv-list summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--subtle); }
.srv-list .scroll { max-height: 280px; overflow-y: auto; margin-top: 6px; background: var(--surface); border-radius: 6px; }
.srv-list .tbl td { padding: 4px 8px; font-size: 12px; }
.srv-list .tbl td:first-child { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.srv-list tr.off td { color: var(--muted); } .srv-list tr.bad td { color: var(--danger); font-weight: 600; }
/* Téléphone : chaque serveur devient un bloc, une ligne par champ. */
@media (max-width: 720px) {
  .srv-table > thead { display: none; }
  .srv-table, .srv-table > tbody, .srv-table > tbody > tr, .srv-table > tbody > tr > td { display: block; width: 100%; }
  .srv-table > tbody > .srv-row > td { border-bottom: 0; padding: 3px 12px; }
  .srv-table > tbody > .srv-row > td:first-child { padding-top: 12px; }
  .srv-table > tbody > .srv-row > td:last-child { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .srv-row > td:not(:first-child) { display: grid; grid-template-columns: 110px 1fr; }
  .srv-row > td:not(:first-child)::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; }
  .srv-row code { overflow-wrap: anywhere; }
  table.colmenu > thead { display: block; } table.colmenu > thead > tr { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; }
  table.colmenu > thead > tr > th { display: block; width: auto; border: 0; background: none; padding: 0; } table.colmenu .th-btn { border-radius: 3px; background: var(--surface-3); padding: 4px 8px; }
  .tbl.urls, .tbl.urls tbody, .tbl.urls tbody tr, .tbl.urls td { display: block; width: 100%; }
  .tbl.urls tbody tr { padding: 8px 4px; border-bottom: 1px solid var(--line); } .tbl.urls td { border: 0; padding: 2px 8px; }
  .tbl.urls td:not(:first-child) { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
  .tbl.urls td:not(:first-child)::before { content: attr(data-label); flex: 0 0 72px; color: var(--muted); font-size: 12px; font-weight: 600; }
  .tbl.urls td.url-desc > div { flex: 1 1 0; min-width: 0; }
}
@media (max-width: 560px) { .meter { grid-template-columns: 88px 1fr; row-gap: 0; } .meter .v { grid-column: 2; text-align: left; } .servers-page .stats { grid-template-columns: repeat(2, 1fr); } }

/* Module API (owners) : catalogue des API (liste, puis fiche : URL, clés, routes, console). Reprend les tableaux du module Serveurs. */
.api-page .hero .avatar .icon { width: 24px; height: 24px; }
.api-filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.api-table td:nth-child(3) { width: 28%; }
.api-table .tag { white-space: nowrap; }
/* La liste a 8 colonnes : une URL trop longue est coupée (« … », l'adresse entière au survol) plutôt que de pousser « Utilisée par » hors du cadre. */
.api-page .srv-table-wrap { overflow-x: auto; }
.api-table td[data-label="URL"] code { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.api-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--subtle); }
.api-used { display: flex; flex-wrap: wrap; gap: 4px; }
.api-chip-s { font-size: 11px; line-height: 18px; padding: 0 6px; border-radius: 9px; background: var(--surface-2); color: var(--subtle); white-space: nowrap; }
a.api-host { display: inline-flex; align-items: center; gap: 3px; background: var(--tint-blue); color: var(--text-blue); } a.api-host:hover { background: var(--tint-blue-2); text-decoration: none; } a.api-host .icon { width: 11px; height: 11px; }
.api-page .srv-row code { font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.servers-page > .api-role { white-space: pre-line; max-width: 900px; }
.api-auth { white-space: pre-wrap; overflow-wrap: anywhere; }
.api-urls td:first-child { width: 160px; } .api-urls td { vertical-align: middle; }
.api-urls td.api-urls-host { width: 1%; white-space: nowrap; text-align: right; }
.m { flex: none; display: inline-block; font: 700 10px/16px ui-monospace, SFMono-Regular, Menlo, monospace; padding: 0 4px; border-radius: 3px; background: var(--surface-3); color: var(--subtle); }
.m-GET { background: var(--tint-green); color: var(--text-green); } .m-POST { background: var(--tint-yellow); color: var(--text-yellow); } .m-PUT, .m-PATCH { background: var(--tint-blue); color: var(--text-blue); } .m-DELETE { background: var(--tint-red); color: var(--text-red); } .m-MCP, .m-WS { background: var(--tint-purple); color: var(--bot); }
.api-routes-wrap { max-height: 560px; overflow: auto; }
.api-routes thead th { position: sticky; top: 0; background: var(--surface-2); z-index: 1; }
.api-routes td { vertical-align: middle; padding: 5px 8px; } .api-routes td:nth-child(2) code { font-size: 12px; overflow-wrap: anywhere; }
.api-routes td:last-child { text-align: right; white-space: nowrap; } .api-routes .btn { padding: 2px 8px; }
.api-sync { margin: -4px 0 6px; }
.api-vars th:nth-child(1) { width: 26%; } .api-vars th:nth-child(3) { width: 64px; } .api-vars th:nth-child(4) { width: 112px; }
.api-vars td { vertical-align: top; padding: 5px 6px; } .api-vars td.c { text-align: center; padding-top: 10px; } .api-vars input[type="checkbox"] { width: auto; }
.api-vars input:not([type="checkbox"]) { padding: 4px 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.api-vars .acts { white-space: nowrap; text-align: right; } .api-vars .acts .btn { padding: 4px 6px; margin: 0; }
.api-vars tr.missing td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.api-ref { margin-top: 3px; color: var(--muted); overflow-wrap: anywhere; } .api-ref.missing { color: var(--text-orange); } .api-ref code { font-size: 11px; }
.api-vars-foot, .api-console-foot { display: flex; align-items: center; gap: 8px; margin: 8px 0; flex-wrap: wrap; } .api-vars-foot .spacer { flex: 1; }
.panel .api-vars-foot .btn, .panel .api-line .btn, .panel .api-status .btn { margin-top: 0; }
.api-page .panel code { font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 3px; }
.api-line { display: flex; gap: 8px; margin-bottom: 8px; } .api-line select { width: auto; max-width: 100%; flex: none; font-weight: 600; } .api-line select#apiBase { flex: 1; min-width: 0; font-weight: 400; }
.api-line input { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.api-chips { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 4px; }
.api-chip { padding: 1px 8px !important; border-radius: 10px !important; background: var(--surface-2) !important; font: 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--subtle); } .api-chip:hover { background: var(--surface-3) !important; }
.api-mono { font: 12.5px/18px ui-monospace, SFMono-Regular, Menlo, monospace; }
.api-res { border-top: 1px solid var(--line); padding-top: 12px; }
.api-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; } .api-status .spacer { flex: 1; }
.api-pre { margin: 6px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 6px; font: 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow: auto; }
.api-res .srv-list .tbl td:first-child { white-space: nowrap; }
@media (min-width: 721px) { .pop.wide:has(.api-form) { width: min(560px, calc(100vw - 16px)); } }
.api-form label.small { display: block; margin: 8px 0 3px; font-weight: 600; color: var(--subtle); }
.api-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (max-width: 720px) {
  .api-table td:nth-child(3) { width: auto; }
  .api-routes thead { display: none; }
  .api-routes, .api-routes tbody, .api-routes tr { display: block; width: 100%; }
  .api-routes tr { display: grid; grid-template-columns: auto 1fr auto; gap: 2px 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
  .api-routes td { border: 0; padding: 0; } .api-routes td:nth-child(3) { grid-column: 1 / -1; } .api-routes td:nth-child(4) { display: none; }
}
@media (max-width: 560px) {
  .api-vars thead { display: none; }
  .api-vars, .api-vars tbody, .api-vars tr { display: block; width: 100%; }
  .api-vars tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .api-vars td { border: 0; padding: 0; } .api-vars td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; }
  .api-vars td.c { grid-column: 2; grid-row: 1; padding-top: 6px; } .api-vars td.acts { grid-column: 1 / -1; grid-row: 3; text-align: left; }
  .api-line { flex-wrap: wrap; } .api-line input, .api-line select#apiBase { flex-basis: 100%; }
  .api-form-row { grid-template-columns: 1fr; }
}

/* ---------- module Innovation & R&D (web/rd.js) ---------- */
.rd-page .hero .avatar .icon { width: 24px; height: 24px; }
.rd-tabs { display: flex; align-items: flex-end; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; flex-wrap: wrap; }
.rd-tabs a { padding: 8px 14px; font-weight: 600; color: var(--subtle); border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; align-items: center; gap: 6px; }
.rd-tabs a:hover { text-decoration: none; color: var(--text); background: var(--hover); border-radius: 6px 6px 0 0; }
.rd-tabs a.on { color: var(--primary); border-bottom-color: var(--primary); }
.rd-tabs .spacer { flex: 1; } .rd-tabs-note { padding-bottom: 8px; }
.rd-n { font-size: 11px; font-weight: 600; min-width: 18px; padding: 0 6px; line-height: 18px; border-radius: 9px; background: var(--surface-2); color: var(--subtle); text-align: center; }
.rd-tabs a.on .rd-n { background: var(--tint-blue); color: var(--primary); }
.rd-intro { margin: 0 0 12px; }
/* L’ampoule dans le texte : à la taille de la ligne. */
.rd-intro .icon, .rd-hint .icon, .rd-hint-e .icon { width: 13px; height: 13px; vertical-align: -2px; }
.rd-hint { margin: 10px 0 0; }
.rd-bar { display: flex; align-items: flex-end; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 16px; }
.rd-bar .spacer { flex: 1; } .rd-bar select { width: auto; max-width: 100%; }
.rd-field { display: flex; flex-direction: column; gap: 2px; }
.rd-kinds { flex-wrap: wrap; } .rd-kinds button { white-space: nowrap; }
.tag.rd-scheme { background: var(--tint-purple); color: var(--text-purple); margin-right: 4px; }
.tag.rd-k { background: var(--surface-2); color: var(--subtle); }
/* Veille : une carte par lien, vignette à gauche (au-dessus sur téléphone). */
.rd-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 12px; margin-bottom: 24px; }
.rd-link { display: grid; grid-template-columns: 148px 1fr; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; min-width: 0; }
.rd-thumb { position: relative; background: var(--surface-2); display: flex; align-items: center; justify-content: center; min-height: 110px; overflow: hidden; }
.rd-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-ph { font-size: 34px; opacity: .7; }
.rd-link-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rd-link-top { display: flex; align-items: center; gap: 8px; min-width: 0; } .rd-link-top .spacer { flex: 1; }
.rd-site { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.rd-link-title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; } .rd-link-title:hover { color: var(--primary); }
.rd-note { font-size: 13px; white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.rd-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.rd-chip { font-size: 12px; line-height: 20px; padding: 0 8px; border-radius: 10px; background: var(--surface-2); color: var(--subtle); border: 0; cursor: pointer; font-family: inherit; }
.rd-chip:hover { background: var(--surface-3); text-decoration: none; }
.rd-chip-p { background: var(--tint-purple); color: var(--text-purple); } .rd-chip-p:hover { background: var(--tint-purple-2); }
.rd-by { margin-top: auto; }
/* Interne : projets, tableaux de l'espace */
.rd-meter { display: inline-block; width: 56px; height: 6px; border-radius: 3px; background: var(--surface-3); vertical-align: middle; overflow: hidden; }
.rd-meter > span { display: block; height: 100%; background: #7f5af0; }
.rd-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 12px; margin-bottom: 24px; }
.rd-board { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.rd-board-hd { display: flex; align-items: center; gap: 8px; color: var(--text); } .rd-board-hd img { width: 24px; height: 24px; object-fit: contain; border-radius: 4px; }
.rd-bg { width: 24px; height: 24px; border-radius: 4px; flex: none; }
.rd-prog { display: flex; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.rd-prog .done { background: var(--success); } .rd-prog .doing { background: var(--primary); }
.rd-board .rd-chips .btn { margin-left: auto; }
/* Fiche d'un projet */
.rd-page .avatar.rd-icon { background: var(--tint-purple); font-size: 26px; }
.rd-page .srv-hero .tag { font-size: 12px; }
.rd-sec { margin: 0 0 20px; } .rd-sec h4 { font-size: 15px; margin: 0 0 2px; }
.rd-ed { margin-top: 8px; } .rd-ed.tt-editor .ProseMirror { min-height: 88px; border-color: var(--line); } .rd-ed.tt-editor .ProseMirror:hover { border-color: #091e4240; }
.rd-ed.tt-editor .ProseMirror-focused { border-color: var(--primary); }
.rd-ed-st { min-height: 16px; margin-top: 2px; }
.rd-sources { margin-top: 8px; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; }
.rd-sources-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; } .rd-sources-hd .spacer { flex: 1; }
.rd-src { display: flex; align-items: baseline; gap: 8px; padding: 2px 0; min-width: 0; } .rd-src a { overflow-wrap: anywhere; }
.rd-ev { margin-bottom: 12px; display: flex; flex-direction: column; gap: 8px; }
.rd-ev-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .rd-ev-hd .spacer { flex: 1; }
.rd-people { display: flex; flex-wrap: wrap; gap: 6px 14px; } .rd-person { display: inline-flex; align-items: center; gap: 6px; }
.rd-cards td { padding: 4px 8px; font-size: 13px; vertical-align: middle; }
.rd-wiki { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.rd-rows { margin-bottom: 24px; } .rd-rows .scroll { overflow-x: auto; }
.rd-rows-t td { padding: 4px 6px; vertical-align: middle; } .rd-rows-t th { padding: 4px 6px; }
.rd-rows-t input, .rd-rows-t select { width: 100%; min-width: 90px; }
.rd-rows-t input[type=number] { min-width: 80px; max-width: 120px; }
.rd-rows-t td.acts { width: 1%; }
.panel .rd-rows-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; } .panel .rd-rows-foot .btn { margin-top: 0; } .rd-rows-foot .spacer { flex: 1; }
/* Formulaires */
@media (min-width: 721px) { .pop.wide:has(.rd-form), .pop.wide:has(.rd-guide), .pop.wide:has(.rd-attach) { width: min(560px, calc(100vw - 16px)); } }
.rd-form .rd-name-row { display: grid; grid-template-columns: 72px 1fr; gap: 8px; }
.rd-checks { display: flex; flex-direction: column; max-height: 180px; overflow-y: auto; }
.rd-checks.rd-inline { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 0 14px; max-height: none; } .rd-checks.rd-inline input:not([type=checkbox]) { flex: 1 1 180px; }
.rd-attach { max-height: 320px; }
.rd-topic-pick { margin-top: 6px; }
.rd-preview { display: flex; gap: 10px; align-items: flex-start; margin-top: 6px; } .rd-preview:empty { display: none; }
.rd-preview img { width: 96px; height: 60px; object-fit: cover; border-radius: 4px; flex: none; background: var(--surface-2); }
.rd-guide p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; }
@media (max-width: 720px) {
  .rd-link { grid-template-columns: 1fr; } .rd-thumb { min-height: 140px; }
  .rd-bar > .btn { flex: 1 1 45%; justify-content: center; }
  .rd-tabs-note { display: none; }
}
@media print {
  .topbar, .rd-page .btn, .rd-page .srv-back, .rd-tabs { display: none !important; }
  .rd-page details { display: block; } .rd-page details > * { display: block; }
}
.rd-form .row { display: flex; align-items: center; } .rd-form .row .spacer { flex: 1; }
.rd-ul { margin: 0 0 10px 18px; padding: 0; line-height: 1.5; } .rd-ul li { margin-bottom: 4px; }
/* Personnel */
.rd-people-t td > div { min-width: 0; }
.rd-alerts { margin: 12px 0 24px; background: var(--tint-yellow); border-color: #f5cd47; } .rd-alerts ul { margin: 6px 0 0 18px; padding: 0; } .rd-alerts li { margin-bottom: 4px; }
.rd-cost-row { display: grid; grid-template-columns: 90px 1fr 90px auto; gap: 6px; margin-top: 6px; align-items: center; }
/* État de l'art */
.rd-soa { margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.rd-soa-text { color: var(--subtle); overflow-wrap: anywhere; }
.rd-soa-t { width: 100%; } .rd-soa-t th { text-align: left; font-size: 12px; color: var(--subtle); padding: 4px 8px; white-space: nowrap; }
.rd-soa-t td { padding: 6px 8px; vertical-align: top; border-top: 1px solid var(--line); } .rd-soa-t td.acts { width: 1%; }
.rd-soa-t td:first-child { min-width: 200px; } .rd-cell { min-width: 180px; white-space: pre-line; overflow-wrap: anywhere; }
/* Entreprise */
.rd-co { margin-bottom: 24px; }
.rd-co-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 10px 14px; }
.rd-co-grid label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rd-years-t input[type=date] { min-width: 130px; }
.rd-calc { margin-bottom: 24px; display: flex; flex-direction: column; gap: 12px; }
.rd-verdicts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.rd-verdict { padding: 10px 12px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.rd-verdict.ok { background: var(--tint-green); border-color: #4bce97; } .rd-verdict.ko { background: var(--tint-red); border-color: #f87168; }
.rd-calc-t { width: 100%; } .rd-calc-t th { text-align: left; font-weight: 500; padding: 5px 8px; width: 38%; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); border-top: 1px solid var(--line); background: none; }
.rd-board .icon, .rd-ev-hd .icon { width: 13px; height: 13px; vertical-align: -2px; } .rd-calc-t td { padding: 5px 8px; border-top: 1px solid var(--line); }
.rd-calc-t tr:first-child td, .rd-calc-t tr:first-child th { border-top: 0; }
/* Temps passé sur les cartes (web/app.js) */
.time-rows { display: flex; flex-direction: column; gap: 4px; }
.time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 8px; border-radius: 6px; background: var(--surface); box-shadow: var(--card-shadow); }
.time-row .spacer { flex: 1; } .time-row .acts { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; margin-left: auto; } .time-row.est { background: var(--surface-sunken); } .time-row.est b { color: var(--subtle); }
.time-hint { margin-top: 6px; }
.card .meta .time-badge { font-size: 12px; } .card .meta .time-badge.est { opacity: .75; }

/* Module Aides à l'innovation (web/fiscal.js) : le reste vient des modules Serveurs et Innovation & R&D. */
.fi-legacy { margin-bottom: 16px; line-height: 1.5; }
.fi-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 12px; }
.fi-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; width: 100%; }
.fi-wide { overflow-x: auto; }
.fi-months th, .fi-months td { padding: 8px 6px !important; text-align: right; white-space: nowrap; }
.fi-months th:first-child, .fi-months td:first-child { text-align: left; }
.fi-year-row { display: grid; grid-template-columns: 70px 1fr 1fr 70px 1fr 1fr 1fr 110px auto; gap: 4px; margin-bottom: 4px; }
.fi-year-row input, .fi-year-row select { min-width: 0; }
.fi-status { max-width: 130px; }
@media (max-width: 720px) { .fi-year-row { grid-template-columns: 1fr 1fr 1fr; } }
.fi-stale { border-color: #f5cd47; background: var(--tint-yellow); }
.fi-acts { white-space: nowrap; } .fi-acts .btn { margin-left: 2px; }
.fi-sec-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .fi-sec-hd h3, .fi-sec-hd h4 { margin: 0; } .fi-sec-hd .spacer { flex: 1; }
.fi-sec { padding-bottom: 8px; } .fi-q { margin: 4px 0 6px; color: var(--subtle); }
.fi-dtext { width: 100%; font: inherit; line-height: 1.5; padding: 8px; border: 1px solid var(--line); border-radius: 6px; resize: vertical; }
.fi-dsaved { min-height: 16px; }
.fi-comments { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.fi-comment { padding: 10px 12px; } .fi-comment.done { opacity: .65; } .fi-comment .fi-text { margin: 4px 0; }
.fi-comment-new textarea { width: 100%; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.fi-on > td { background: var(--tint-blue); } .fi-neg { color: var(--text-red); } .fi-pos { color: var(--text-green); }
.fi-jei { margin-bottom: 16px; } .fi-benefit { margin-top: 10px; padding: 8px 10px; background: var(--surface-2); border-radius: 6px; }
.fi-benefit .srv-table-wrap { margin: 8px 0; } .fi-benefit-tbl td, .fi-benefit-tbl th { white-space: nowrap; }
.fi-diag { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 16px; align-items: start; }
.fi-diag-q label { display: block; margin: 10px 0 4px; } .fi-diag-q select { width: 100%; }
.fi-diag-r { display: flex; flex-direction: column; gap: 10px; } .fi-diag-aid h4 { margin: 0; }
.fi-meter { width: 100%; display: block; margin: 6px 0; }
@media (max-width: 860px) { .fi-diag { grid-template-columns: 1fr; } }
.fi-sec-hd select, .fi-comment-new select { width: auto; max-width: 220px; }
