/* 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;
}
* { 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(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; border-radius: 3px; padding: 6px 12px; }
input, textarea, select { border: 2px solid var(--line); border-radius: 3px; padding: 6px 12px; background: #fff; width: 100%; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { 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: #d0d4db; }
.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 #fff; }

/* ===== en-tête ===== */
.topbar { height: var(--header-h); display: flex; align-items: center; gap: 4px; padding: 0 8px; background: #fff; 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, .topbar.on-board .nav-btn { color: #fff; } .topbar .logo:hover { background: var(--hover); text-decoration: none; }
.topbar .logo svg, .topbar .logo img { width: 22px; height: 22px; object-fit: contain; }
.nav-btn { padding: 6px 10px; border-radius: 3px; color: var(--subtle); font-weight: 500; display: inline-flex; align-items: center; gap: 4px; }
.nav-btn:hover { background: var(--hover); } .topbar.on-board .nav-btn:hover { background: #ffffff33; }
.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: #f3f0ff; color: var(--bot); font-weight: 600; }
.chip-agent:hover { background: #dfd8fd; 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: #e9f2ff; 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; }
.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é, rien que l'image (le logo porte déjà le nom du projet). */
.tile.has-logo { background: none; box-shadow: none; height: 190px; padding: 0; }
.tile.has-logo:hover { box-shadow: none; }
.tile.has-logo:hover .logo { transform: scale(1.04); }
.tile .logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 2px; transition: transform .12s; }
.tile.has-logo .name { display: none; }
.tile.has-logo .foot { position: relative; z-index: 1; margin-top: auto; color: var(--muted); padding: 4px 8px; }
.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 ===== */
.board-page { flex: 1; 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; }
.lists { flex: 1; display: flex; gap: 12px; padding: 8px 12px 12px; overflow-x: auto; overflow-y: hidden; align-items: flex-start; }
.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; }
.cards.drop-target { background: #091e4214; border-radius: 8px; }
.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 .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; }
.card.has-cover .cnum { color: #ffffffbf; }
.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: #ffeceb; color: #ae2a19; } .due.done { background: #dcfff1; color: #216e4e; } .due.soon { background: #fff7d6; color: #7f5f01; }
.card .groom-flag { position: absolute; top: 6px; right: 8px; font-size: 12px; opacity: .8; z-index: 1; }
.card.has-cover .groom-flag { background: #fff; border-radius: 50%; padding: 2px; opacity: 1; }
.placeholder { height: 40px; border-radius: 8px; background: #091e4224; }
.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: #091e4214; 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 */
/* Fond image plein format : la carte entière porte l'image, un dégradé sombre garde le texte lisible. */
.card.has-cover { color: #fff; min-height: 168px; display: flex; flex-direction: column; justify-content: flex-end; background-size: cover; background-position: center; }
.card.has-cover::before { content: ''; position: absolute; inset: 0; border-radius: var(--radius); background: linear-gradient(180deg, rgba(9, 30, 66, .08) 0%, rgba(9, 30, 66, .35) 55%, rgba(9, 30, 66, .88) 100%); z-index: 0; }
.card.has-cover > * { position: relative; z-index: 1; }
.card.has-cover .title { color: #fff; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.card.has-cover .meta { color: #fff; }
.card.has-cover .meta .due:not(.late):not(.soon):not(.done) { background: rgba(255, 255, 255, .18); }
.cm-cover { height: 160px; margin: -16px -16px 16px; border-radius: 12px 12px 0 0; background: #091e4214 center / contain no-repeat; }
.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: #091e4214 center / cover no-repeat; display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--subtle); font-size: 14px; letter-spacing: .5px; }
.attach .thumb.doc { background: #091e4214; }
.attach .info { flex: 1; min-width: 0; padding-top: 4px; } .attach .info a { color: var(--text); }
.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: #fff; 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: #e9f2ff; }
.pop.wide { width: 380px; }
.menu-panel { position: fixed; top: var(--header-h); right: 0; bottom: 0; width: 340px; background: #fff; 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: #f1f2f4; border-radius: 12px; position: relative; padding: 16px 16px 24px; color: var(--text); }
.card-modal .close { position: absolute; right: 8px; top: 8px; }
.cm-head { display: flex; gap: 12px; padding-right: 40px; }
.cm-head .icon { margin-top: 6px; color: var(--subtle); }
.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-sub { margin: 4px 0 0 36px; color: var(--subtle); font-size: 12px; } .cm-sub b { text-decoration: underline; cursor: pointer; }
.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: #d0d4db; }
.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; gap: 8px; margin-bottom: 8px; } .section .head h3 { font-size: 16px; flex: 1; }
.desc-view { padding: 8px 12px; border-radius: 3px; background: #091e420a; cursor: pointer; min-height: 56px; }
.desc-view:hover { background: #091e4214; } .desc-view.empty { color: var(--muted); background: #091e4214; font-weight: 500; }
.md p { margin: 0 0 8px; } .md ol, .md ul { margin: 0 0 8px; padding-left: 24px; } .md code { background: #091e4214; 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: #e9f2ff; padding: 0 3px; border-radius: 3px; }
.md .sig { color: var(--bot); font-weight: 600; }
.editor textarea { min-height: 96px; background: #fff; }
.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: #091e4214; 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: #fff; 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: #fff; 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: #f3f0ff; color: var(--bot); } .tag.owner { background: #e9f2ff; color: #0055cc; } .tag.client { background: #f1f2f4; color: var(--subtle); }
.member { padding: 4px 0; } .member .access { margin: 2px 0 6px 32px; } .member .access .checkrow { padding: 1px 0; } .tag.pending { background: #fff7d6; color: #7f5f01; } .tag.asked { background: #e9f2ff; color: #0055cc; } .tag.ok { background: #dcfff1; color: #216e4e; } .tag.warn { background: #ffeceb; color: #ae2a19; }
.callout { border-radius: 8px; padding: 10px 12px; margin-bottom: 16px; background: #f3f0ff; 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: #fff; 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: #fff; 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: #ffeceb; color: var(--danger); } .btn.sm.danger:hover { background: #ffd5d2; }
.swatches div[data-color] { height: 28px; }

/* ===== connexion ===== */
.login-page { flex: 1; display: flex; align-items: center; justify-content: center; background: #fafbfc; padding: 24px; }
.login { width: 400px; max-width: 100%; background: #fff; 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, .topbar .nav-btn.opt { 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); }
.board-tabs .tab { color: #fff; opacity: .8; padding: 8px 12px; font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; }
.board-tabs .tab:hover { opacity: 1; text-decoration: none; background: #ffffff1f; }
.board-tabs .tab.on { opacity: 1; border-bottom-color: #fff; background: #ffffff1f; }

/* ===== tableaux blancs (façon Excalidraw) ===== */
.whiteboard-tab { flex: 1; display: flex; min-height: 0; background: #fff; }
.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: #eceafd; }
.wb-item-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-stage { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }
.wb-bar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 5; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.wb-island { pointer-events: auto; display: flex; align-items: center; gap: 2px; background: #fff; border: 1px solid #e9e9ed; border-radius: 10px; padding: 4px; box-shadow: 0 2px 12px #0000001f; }
.wb-island .sep { width: 1px; height: 20px; background: var(--line); margin: 0 6px; }
.wb-tool { position: relative; width: 36px; height: 36px; padding: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 16px; color: #1b1b1f; }
.wb-tool:hover { background: #f1f0ff; } .wb-tool.on { background: #e0dfff; color: #4a47b1; }
.wb-tool i { position: absolute; right: 3px; bottom: 1px; font-size: 8px; font-style: normal; color: var(--muted); }
.wb-tool.on i { color: #6965db; }
.wb-props { font-size: 12px; padding: 5px 8px; }
.wb-swatch { width: 20px; height: 20px; padding: 0; border-radius: 5px; border: 1px solid #0000001f; }
.wb-swatch.on { outline: 2px solid #6965db; outline-offset: 1px; }
.wb-swatch.none { background: repeating-linear-gradient(45deg, #fff 0 4px, #ddd 4px 8px); }
.wb-actions { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.wb-actions .spacer { flex: 1; }
.wb-canvas-wrap { flex: 1; min-height: 0; position: relative; background: #fff; }
.wb-canvas-wrap canvas { position: absolute; inset: 0; touch-action: none; }

/* ===== Projet (façon Jira) : vue d'ensemble, backlog, Gantt, calendrier, wiki ===== */
.projet-tab { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; overflow: auto; }
.projet-nav { display: flex; gap: 4px; padding: 10px 20px 0; background: #fff; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.projet-nav .pnav { padding: 8px 12px; font-weight: 600; font-size: 13px; color: var(--subtle); border-bottom: 2px solid transparent; }
.projet-nav .pnav:hover { text-decoration: none; color: var(--text); }
.projet-nav .pnav.on { color: var(--primary); border-bottom-color: var(--primary); }
.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: #ffeceb; } .ov-card.soon { background: #fff7d6; }
.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: 180px; border-right: 1px solid var(--line); position: sticky; left: 0; background: #fff; z-index: 1; }
.gantt-names-head { height: 28px; border-bottom: 1px solid var(--line); }
.gantt-names .gname { display: block; height: 32px; line-height: 32px; padding: 0 10px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid var(--line); }
.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 #f1f2f4; white-space: nowrap; overflow: hidden; }
.gantt-head .gday.we { background: #fafafa; } .gantt-head .gday.today { background: #e9f2ff; 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); }

.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: #e9f2ff; 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: #ffeceb; color: var(--danger); }
.cal-chip.done { background: #dcfff1; 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: #e9f2ff; }
.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-editor textarea { min-height: 320px; font-family: inherit; }
.md-preview { border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin-top: 10px; }
@media (max-width: 720px) { .wiki { flex-direction: column; } .wiki-list { width: auto; } .gantt-names { width: 120px; } }

/* ===== 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; }
.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: #f3f0ff; 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; }
.card.has-cover .spec-pill { background: #ffffffd9; }
.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: #ffffff99; padding: 1px 4px; border-radius: 3px; }
.spec-block { background: #ffffff99; 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: #fff7d6; }
.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-body { padding: 16px 20px 20px; overflow: auto; }
.sheet-body .tbl td:first-child { max-width: 520px; }

/* ===== 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, .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: #fff; 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: #e9f2ff; }
  .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; }
  .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; overflow-x: auto; }
  .board-tabs .tab { padding: 8px 10px; white-space: nowrap; }
  /* 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%; }
  .card-modal .close { right: 4px; top: 4px; background: #ffffffcc; }
  .cm-cover { margin: -12px -12px 12px; border-radius: 0; height: 140px; }
  .cm-head { gap: 8px; padding-right: 44px; } .cm-head h2 { font-size: 18px; }
  .cm-sub, .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; }
  .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-nav { padding: 6px 8px 0; flex-wrap: nowrap; overflow-x: auto; } .projet-nav .pnav { white-space: nowrap; padding: 8px 10px; }
  .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: 110px; } .gantt-names .gname { font-size: 12px; padding: 0 6px; }
  .wiki-editor textarea { min-height: 200px; }
  /* tableau blanc : liste au-dessus, outils en rangée, canvas en dessous */
  .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-bar { position: static; transform: none; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 6px; padding: 6px 6px 0; }
  .wb-island { flex-wrap: wrap; justify-content: center; }
  .wb-tool { width: 34px; height: 34px; } .wb-tool i { display: none; }
  .wb-actions { padding: 6px 8px; gap: 4px; }
  .wb-actions .btn { padding: 4px 6px; font-size: 12px; }
  /* 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)); }
}
