:root {
  color-scheme: light;
  --bg: #f6f6f3;
  --panel: #ffffff;
  --panel-2: #f0f0ec;
  --line: #e4e4de;
  --text: #16181d;
  --muted: #6b6f78;
  --accent: #3f6212;
  --accent-bg: #ecfccb;
  --accent-strong: #d9f99d;
  --danger: #b42318;
  --danger-bg: #fee4e2;
  --warn: #b54708;
  --warn-bg: #fef0c7;
  --ok: #067647;
  --ok-bg: #dcfae6;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --radius: 14px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
/* Thème sombre : suit l'appareil (Auto), ou forcé via data-theme sur <html>. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1115;
    --panel: #171a20;
    --panel-2: #1f232b;
    --line: #2a2f38;
    --text: #eceef2;
    --muted: #9298a3;
    --accent: #d9f99d;
    --accent-bg: #26331a;
    --accent-strong: #d9f99d;
    --danger: #fda29b;
    --danger-bg: #3b1d1b;
    --warn: #fec84b;
    --warn-bg: #3a2c12;
    --ok: #75e0a7;
    --ok-bg: #133325;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1115;
  --panel: #171a20;
  --panel-2: #1f232b;
  --line: #2a2f38;
  --text: #eceef2;
  --muted: #9298a3;
  --accent: #d9f99d;
  --accent-bg: #26331a;
  --accent-strong: #d9f99d;
  --danger: #fda29b;
  --danger-bg: #3b1d1b;
  --warn: #fec84b;
  --warn-bg: #3a2c12;
  --ok: #75e0a7;
  --ok-bg: #133325;
  --shadow: none;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
h1 { font-size: 26px; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 15px; margin: 0 0 12px; }
a { color: inherit; }
input, textarea, select, button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); min-height: 1.2em; margin: 0; }

/* Boutons et champs */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); padding: 9px 14px; border-radius: 10px; cursor: pointer; text-decoration: none; font-weight: 550; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 13px; }
.btn.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.btn.no { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--muted); text-decoration: none; }
.link:hover { color: var(--text); }
input, textarea, select { width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--text); }
textarea { resize: vertical; }

/* Connexion */
.login { min-height: 100%; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px; display: grid; gap: 14px; box-shadow: var(--shadow); }

/* Coque */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--panel); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; letter-spacing: -.01em; padding: 0 8px; }
.brand.big { font-size: 20px; padding: 0; }
img.logo { object-fit: cover; }
.logo { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: radial-gradient(circle at 50% 40%, #e6fbff, #40dcff 55%, #0b3a5a); color: #010409; font-size: 14px; font-weight: 850; box-shadow: 0 0 12px rgba(64,220,255,.45); }
nav { display: grid; gap: 2px; }
nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 550; }
nav a i { font-style: normal; width: 18px; text-align: center; }
nav a:hover { background: var(--panel-2); color: var(--text); }
nav a.active { background: var(--panel-2); color: var(--text); }
.badge { margin-left: auto; background: var(--danger); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; padding: 0 8px; flex-wrap: wrap; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }
#logout { margin-left: auto; }

main { padding: 28px 32px 48px; min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; display: grid; gap: 18px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.page-head.compact { align-items: center; }

/* Cartes */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; box-shadow: var(--shadow); }
.kpi .n { font-size: 28px; font-weight: 750; letter-spacing: -.02em; }
.kpi .l { color: var(--muted); font-size: 13px; }
.kpi.hot { background: var(--accent-bg); border-color: transparent; }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item .t { font-weight: 600; }
.item .s { color: var(--muted); font-size: 13px; }

.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.warn { background: var(--warn-bg); color: var(--warn); }
.pill.no { background: var(--danger-bg); color: var(--danger); }
.pill.acc { background: var(--accent-bg); color: var(--accent); }

/* Tableaux */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px; background: var(--panel-2); }
.table td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.table td .s { color: var(--muted); font-size: 13px; }
.table select { width: auto; padding: 4px 8px; font-size: 13px; }

/* Validations */
.approval { display: grid; gap: 12px; }
.approval pre { margin: 0; white-space: pre-wrap; word-break: break-word; font: 14px/1.55 var(--font); background: var(--panel-2); padding: 14px; border-radius: 10px; max-height: 420px; overflow: auto; }
.approval .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.approval .actions input { flex: 1; min-width: 180px; }

/* Chat */
.chat-page { height: calc(100vh - 76px); grid-template-rows: auto 1fr auto auto; }
.chat-log { overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 4px 2px 12px; }
.msg { max-width: 760px; padding: 12px 16px; border-radius: 16px; line-height: 1.55; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: var(--text); color: var(--bg); border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.msg.assistant p { margin: 0 0 8px; } .msg.assistant p:last-child { margin: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 4px 0 8px; padding-left: 20px; }
.msg.assistant code { font-family: var(--mono); font-size: 13px; background: var(--panel-2); padding: 1px 5px; border-radius: 5px; }
.msg.assistant pre { background: var(--panel-2); padding: 10px; border-radius: 8px; overflow-x: auto; }
.msg.assistant pre code { background: none; padding: 0; }
.msg.tool { align-self: flex-start; font-size: 12px; color: var(--muted); padding: 0 6px; }
.msg.thinking { align-self: flex-start; color: var(--muted); font-size: 14px; }
.thinking::after { content: "…"; animation: blink 1s steps(3) infinite; }
@keyframes blink { 50% { opacity: .3; } }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { resize: none; max-height: 200px; min-height: 46px; padding: 12px 14px; border-radius: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }
.chips button:hover { color: var(--text); border-color: var(--muted); }

/* Prospects */
.toolbar { display: flex; gap: 10px; }
.toolbar select { max-width: 200px; }
.pipeline { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.stage { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; }
.stage.on { border-color: var(--text); }
.stage .n { font-size: 20px; font-weight: 700; }
.stage .l { font-size: 12px; color: var(--muted); text-transform: capitalize; }

/* Veille */
.topics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.topic { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: 14px; }
.topic.off { opacity: .5; }
.topic button { border: 0; background: var(--panel-2); border-radius: 999px; width: 22px; height: 22px; cursor: pointer; font-size: 12px; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 200px; }
.inline-form.small { padding: 12px; border-top: 1px solid var(--line); }
.inline-form.small input { min-width: 0; font-size: 13px; padding: 6px 10px; }
.feed { display: grid; gap: 12px; }
.news .meta { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.news h3 { margin: 0 0 6px; font-size: 16px; }
.news h3 a { text-decoration: none; } .news h3 a:hover { text-decoration: underline; }
.news p { margin: 0; color: var(--muted); }

/* Tâches */
.jobs { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.job { display: grid; gap: 10px; }
.job .top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.job h3 { margin: 0; font-size: 16px; }
.job p { margin: 0; }
.job .cron { display: flex; gap: 8px; align-items: center; }
.job .cron input { font-family: var(--mono); font-size: 13px; padding: 6px 10px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: var(--line); border-radius: 999px; cursor: pointer; transition: .2s; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: #22c55e; }
.switch input:checked + span::before { transform: translateX(16px); }
details.run { border-top: 1px solid var(--line); padding: 10px 0; }
details.run summary { cursor: pointer; display: flex; gap: 10px; align-items: center; list-style: none; }
details.run summary::-webkit-details-marker { display: none; }
details.run .body { white-space: pre-wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Mémoire */
.memory { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.memory-files ul { list-style: none; margin: 0; padding: 6px; max-height: 70vh; overflow: auto; }
.memory-files li { padding: 7px 10px; border-radius: 8px; cursor: pointer; font-family: var(--mono); font-size: 13px; word-break: break-all; }
.memory-files li:hover, .memory-files li.on { background: var(--panel-2); }
.memory-editor textarea { min-height: 60vh; font-family: var(--mono); font-size: 13px; line-height: 1.6; margin-top: 8px; }

/* Dialogues */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; background: var(--panel); color: var(--text); width: min(560px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .45); }
.form { display: grid; gap: 12px; padding: 22px; }
.form label { display: grid; gap: 5px; font-size: 13px; color: var(--muted); font-weight: 550; }
.form .row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.form .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 50; max-width: calc(100vw - 32px); }

/* Mobile */
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 20; flex-direction: row; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); }
  .sidebar .brand, .sidebar-foot { display: none; }
  nav { grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; overflow-x: auto; }
  nav a { flex-direction: column; gap: 2px; font-size: 10px; padding: 6px 4px; position: relative; }
  nav a i { font-size: 16px; }
  .badge { position: absolute; top: 2px; right: 8px; margin: 0; }
  main { padding: 18px 16px 96px; }
  .grid-2, .memory { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-page { height: calc(100vh - 150px); }
  .table th:nth-child(n+4), .table td:nth-child(n+4) { display: none; }
  .table .keep { display: table-cell !important; }
  h1 { font-size: 22px; }
}

/* Lien vers l'écran vocal Jarvis */
nav a.jarvis-link { color: #0b6f8f; background: linear-gradient(90deg, rgba(64, 220, 255, .16), transparent); }
nav a.jarvis-link:hover { color: #075a75; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) nav a.jarvis-link { color: #40dcff; }
  :root:not([data-theme="light"]) nav a.jarvis-link:hover { color: #9eeeff; }
}
:root[data-theme="dark"] nav a.jarvis-link { color: #40dcff; }
:root[data-theme="dark"] nav a.jarvis-link:hover { color: #9eeeff; }

/* Aperçu HTML (signature) dans l'onglet Mémoire */
.preview-title { margin: 16px 0 8px; }
#memory-preview { width: 100%; min-height: 320px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }

.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#import-summary { display: grid; gap: 8px; font-size: 14px; }
#import-summary table { width: 100%; border-collapse: collapse; font-size: 12px; }
#import-summary td, #import-summary th { border-top: 1px solid var(--line); padding: 4px 6px; text-align: left; }

/* Campagnes */
.campaigns { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.campaign { display: grid; gap: 10px; cursor: pointer; }
.campaign:hover { border-color: var(--muted); }
.campaign .top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.campaign h3 { margin: 0; font-size: 16px; }
.progress { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: #22c55e; }
.cstats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.cstats b { color: var(--text); }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mail-preview { white-space: pre-wrap; background: var(--panel-2); border-radius: 10px; padding: 12px; font-size: 14px; }

/* Sélecteur de thème */
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; width: 100%; margin-bottom: 6px; }
.theme-switch button { flex: 1; border: 0; background: transparent; color: var(--muted); font-size: 12px; padding: 5px 0; cursor: pointer; }
.theme-switch button.on { background: var(--panel-2); color: var(--text); font-weight: 600; }

/* Agenda */
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-nav strong { margin-left: 6px; }
.cap::first-letter, .week-nav strong::first-letter { text-transform: uppercase; }
.legend { margin-left: auto; display: flex; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 3px; vertical-align: -1px; }
.lg-jarvis, .ev.jarvis { background: #2563eb; }
.lg-icloud, .ev.icloud { background: #8b5cf6; }
.lg-free { background: var(--accent-bg); border: 1px solid var(--line); }
.agenda-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.agenda-side { display: grid; gap: 14px; }
.week-wrap { overflow-x: auto; }
.week { --hour: 44px; display: grid; grid-template-columns: 48px repeat(7, minmax(92px, 1fr)); min-width: 700px; }
.week .head { padding: 10px 6px; text-align: center; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); text-transform: capitalize; }
.week .head b { display: block; font-size: 18px; color: var(--text); }
.week .head.today b { color: #fff; background: #2563eb; border-radius: 999px; width: 30px; height: 30px; line-height: 30px; margin: 2px auto 0; }
.week .allday { min-height: 26px; border-bottom: 1px solid var(--line); padding: 3px; display: grid; gap: 2px; }
.week .gutter { font-size: 11px; color: var(--muted); text-align: right; padding-right: 6px; }
.week .col { position: relative; border-left: 1px solid var(--line); cursor: copy; }
.week .slot-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); opacity: .6; pointer-events: none; }
.week .avail { position: absolute; left: 0; right: 0; background: var(--accent-bg); opacity: .55; pointer-events: none; }
.week .now { position: absolute; left: 0; right: 0; border-top: 2px solid #ef4444; z-index: 3; pointer-events: none; }
.ev { position: absolute; left: 3px; right: 3px; border-radius: 6px; color: #fff; font-size: 11.5px; line-height: 1.25; padding: 3px 5px; overflow: hidden; cursor: pointer; z-index: 2; box-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ev.free { opacity: .55; }
.ev b { display: block; font-weight: 600; }
.allday .ev { position: static; }
#slots .item { cursor: pointer; }
.mini { width: auto; padding: 3px 6px; font-size: 12px; }
.avail { display: grid; gap: 10px; }
.avail .days { display: flex; gap: 4px; flex-wrap: wrap; }
.avail .days label { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 3px 7px; cursor: pointer; }
.avail .days input { width: auto; }
.avail .ranges { display: grid; gap: 6px; }
.avail .ranges label { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.avail .ranges input { width: 92px; padding: 4px 6px; }
#subscribe-out { word-break: break-all; background: var(--panel-2); padding: 8px; border-radius: 8px; }
.form .check { display: flex; flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-weight: 500; }
.form .check input { width: auto; }
@media (max-width: 1000px) { .agenda-layout { grid-template-columns: 1fr; } .legend { margin-left: 0; } }

/* LinkedIn */
.li-tabs, .li-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.li-tabs .on, .li-steps .on { background: var(--text); color: var(--bg); border-color: var(--text); }
.li-tabs .badge { margin-left: 6px; }
.li-composer { display: grid; gap: 10px; }
.li-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.li-row input[type=datetime-local] { width: auto; padding: 6px 8px; font-size: 13px; margin-left: auto; }
.li-list { display: grid; gap: 12px; }
.li-post { display: grid; gap: 10px; }
.li-post .top, .li-card .top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.li-post textarea { min-height: 150px; font-size: 14px; line-height: 1.5; }
.li-post .actions, .li-card .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.li-post .actions input { width: auto; padding: 6px 8px; font-size: 13px; }
.li-post img { max-width: 220px; border-radius: 8px; border: 1px solid var(--line); }
.li-card { display: grid; gap: 8px; }
.li-card .msg { white-space: pre-wrap; background: var(--panel-2); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.li-card .why { font-size: 13px; color: var(--muted); }
.setup ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; font-size: 14px; }
.setup code { background: var(--panel-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; word-break: break-all; }

/* Visuels LinkedIn */
.li-post .img-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.visual-preview { display: grid; place-items: center; background: var(--panel-2); border-radius: 12px; min-height: 120px; padding: 10px; }
.visual-preview img { max-width: 100%; max-height: 52vh; border-radius: 8px; }
#visual-dialog { width: min(640px, calc(100vw - 32px)); }

.job-model { display: flex; align-items: center; gap: 8px; }
.job-model select { width: auto; padding: 4px 8px; font-size: 13px; }

/* Ventes */
.board { display: grid; grid-template-columns: repeat(6, minmax(170px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--panel-2); border-radius: 12px; padding: 10px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; }
.lane h3 { margin: 0 0 4px; font-size: 13px; display: flex; justify-content: space-between; gap: 6px; }
.lane h3 span { color: var(--muted); font-weight: 500; }
.lane.drop { outline: 2px dashed var(--muted); }
.opp { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; cursor: grab; font-size: 13px; display: grid; gap: 4px; }
.opp b { font-size: 13.5px; }
.opp .amt { font-weight: 700; }
.opp .na { color: var(--muted); font-size: 12px; }
.opp .na.late { color: var(--danger); }
@media (max-width: 820px) { .board { grid-template-columns: repeat(6, 78vw); } }

.carousel-box { display: flex; gap: 14px; align-items: flex-start; }
.carousel-box img { width: 140px !important; border-radius: 8px; }
.carousel-box > div { display: grid; gap: 6px; justify-items: start; }

/* Vidéos */
.form.flat { padding: 18px; align-content: start; }
.vid-drop input[type=file] { padding: 14px; border-style: dashed; }
.vid-progress { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; }
.vid-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.vid-h { margin: 26px 0 12px; }
.vid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.vid { display: grid; gap: 10px; align-content: start; padding: 14px; }
.vid .screen { aspect-ratio: 9 / 16; width: 100%; border-radius: 10px; background: #0b1220; overflow: hidden; display: grid; place-items: center; color: #9fb3d1; font-size: 13px; text-align: center; }
.vid .screen video, .vid .screen img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.vid .meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vid .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.vid details { font-size: 13px; color: var(--muted); }
.vid details p { margin: 6px 0 0; white-space: pre-wrap; }
.spin { width: 26px; height: 26px; border: 3px solid #2a3a55; border-top-color: #4d8dff; border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 8px; }
@keyframes spin { to { transform: rotate(360deg); } }
.li-post video { max-width: 200px; aspect-ratio: 9 / 16; border-radius: 8px; background: #0b1220; }

/* Présentations */
.deck-form .row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.deck-opts { display: flex; flex-wrap: wrap; gap: 18px; }
.deck-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.deck { display: grid; gap: 10px; align-content: start; padding: 14px; }
.deck .cover { aspect-ratio: 16 / 9; width: 100%; border-radius: 8px; background: #0a0d14; overflow: hidden; display: grid; place-items: center; color: #9fb3d1; font-size: 13px; text-align: center; border: 1px solid var(--line); cursor: zoom-in; }
.deck .cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deck .strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.deck .strip img { height: 46px; border-radius: 4px; border: 1px solid var(--line); cursor: zoom-in; }
.deck h3 { margin: 0; font-size: 15px; }
.deck .meta, .deck .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.deck .revise { display: flex; gap: 6px; }
.deck .revise input { flex: 1; min-width: 0; }
.deck-dialog { width: min(1100px, 96vw); padding: 0; }
.deck-viewer { display: grid; gap: 10px; padding: 14px; }
.deck-viewer-head { display: flex; gap: 10px; align-items: center; }
.deck-viewer-head strong { flex: 1; }
.deck-viewer img { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.deck-viewer-nav { display: flex; justify-content: space-between; }

/* Fixalu */
.fx-status { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; }
.fx-status .big { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.fx-status .warn-box { flex-basis: 100%; }
.fx-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.fx-filters input { flex: 1; min-width: 180px; }
#fx-table td .s { display: block; }
#fx-table tr[data-id] { cursor: pointer; }
#fx-table tr[data-id]:hover td { background: var(--soft, rgba(0,0,0,.02)); }
.fx-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.fx-dept { display: grid; gap: 6px; padding: 12px; }
.fx-dept.pourvu, .fx-dept.exclu { opacity: .55; }
.fx-dept.en_cours { border-color: var(--accent); }
.fx-dept .row2 { display: flex; gap: 6px; }
.fx-dept .row2 select { flex: 1; }
.fx-dept .row2 input { width: 64px; }
.fx-tests { display: grid; gap: 10px; margin-top: 14px; }
.fx-mail { white-space: pre-wrap; border: 1px solid var(--line); border-radius: 8px; padding: 12px; font-size: 13px; margin: 6px 0 14px; background: var(--panel); }
#fx-dialog { width: min(760px, 96vw); }
#fx-dialog .form { max-height: 86vh; overflow: auto; }
