/* Barra.ci OS — design system. Neutre, calme, une seule couleur d'accent (lagune). */
:root {
  --bg: #F4F5F7;
  --bg-elev: #FFFFFF;
  --fill: #ECEEF1;
  --fill-2: #E3E6EA;
  --ink: #15171A;
  --ink-2: #5B616B;
  --ink-3: #8A9099;
  --line: rgba(17, 24, 39, .08);
  --line-2: rgba(17, 24, 39, .14);
  --accent: #0F7B6C;
  --accent-ink: #FFFFFF;
  --accent-soft: rgba(15, 123, 108, .10);
  --ok: #1E7D4F; --ok-soft: rgba(30, 125, 79, .11);
  --warn: #B4610F; --warn-soft: rgba(180, 97, 15, .12);
  --bad: #C2362B; --bad-soft: rgba(194, 54, 43, .10);
  --info: #3D5A80; --info-soft: rgba(61, 90, 128, .10);
  --side: rgba(246, 247, 249, .78);
  --shadow-1: 0 1px 2px rgba(17, 24, 39, .05);
  --shadow-2: 0 10px 30px -12px rgba(17, 24, 39, .18), 0 2px 6px rgba(17, 24, 39, .05);
  --r-s: 8px; --r-m: 12px; --r-l: 18px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable Display", "Segoe UI", Inter, Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1113; --bg-elev: #17191C; --fill: #202327; --fill-2: #2A2E33;
    --ink: #ECEDEF; --ink-2: #A5ABB3; --ink-3: #737A83;
    --line: rgba(255, 255, 255, .08); --line-2: rgba(255, 255, 255, .14);
    --accent: #2BA897; --accent-soft: rgba(43, 168, 151, .16);
    --ok: #4CC38A; --ok-soft: rgba(76, 195, 138, .14); --warn: #E2994A; --warn-soft: rgba(226, 153, 74, .15);
    --bad: #F07167; --bad-soft: rgba(240, 113, 103, .14); --info: #8FB0D8; --info-soft: rgba(143, 176, 216, .14);
    --side: rgba(23, 25, 28, .78);
    --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .6);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.47 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; letter-spacing: -.003em; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); text-decoration: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Structure ---------- */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 12px; background: var(--side); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font: 700 15px/1 var(--font-display); }
.brand-name { font: 650 16px/1.1 var(--font-display); letter-spacing: -.01em; }
.brand-sub { font-size: 12px; color: var(--ink-3); }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: var(--r-s); color: var(--ink-2); font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; transition: background .15s, color .15s; }
.nav-item:hover { background: var(--fill); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1); }
.nav-item[aria-current="page"] svg { color: var(--accent); }
.nav-item .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav-sep { height: 1px; background: var(--line); margin: 10px 10px; }
.side-status { margin-top: auto; padding: 12px 10px 0; font-size: 12.5px; color: var(--ink-3); display: grid; gap: 6px; }
.status-row { display: flex; align-items: center; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.on { background: var(--ok); } .dot.warn { background: var(--warn); } .dot.bad { background: var(--bad); }

main { min-width: 0; padding: 34px clamp(18px, 4vw, 48px) 120px; }
.page { max-width: 1120px; margin: 0 auto; animation: enter .28s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.title { font: 700 32px/1.12 var(--font-display); letter-spacing: -.022em; margin: 0; }
.subtitle { color: var(--ink-2); margin: 6px 0 0; font-size: 15px; max-width: 64ch; }
h2 { font: 650 17px/1.3 var(--font-display); letter-spacing: -.01em; margin: 0 0 12px; }
h3 { font: 600 15px/1.35 var(--font); margin: 0; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.hide { display: none !important; }

/* ---------- Surfaces ---------- */
.panel { background: var(--bg-elev); border-radius: var(--r-l); box-shadow: var(--shadow-1); border: 1px solid var(--line); }
.panel-pad { padding: 20px 22px; }
.group { background: var(--bg-elev); border-radius: var(--r-m); border: 1px solid var(--line); overflow: hidden; }
.group > .cell + .cell { border-top: 1px solid var(--line); }
.cell { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 48px; }
.cell-label { flex: 1; min-width: 0; }
.cell-label small { display: block; color: var(--ink-3); font-size: 12.5px; }
.section-label { font-size: 13px; color: var(--ink-3); font-weight: 500; margin: 26px 4px 8px; }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-elev); color: var(--ink); font-weight: 550; font-size: 14px; cursor: pointer; white-space: nowrap; transition: background .15s, transform .08s, opacity .15s; }
.btn:hover { background: var(--fill); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn.plain { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn.plain:hover { background: var(--accent-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 13px; }
.btn.icon { width: 34px; padding: 0; }
.btn .i { width: 16px; height: 16px; }

.seg { display: inline-flex; padding: 2px; border-radius: 10px; background: var(--fill); gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px; font-size: 13.5px; font-weight: 550; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--bg-elev); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg .n { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 600; background: var(--fill); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--ok-soft); color: var(--ok); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.info { background: var(--info-soft); color: var(--info); }

/* ---------- Formulaires ---------- */
.field { display: grid; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.input, select.input, textarea.input { width: 100%; min-height: 36px; padding: 7px 11px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg-elev); font-size: 14.5px; transition: border-color .15s, box-shadow .15s; }
textarea.input { resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.switch { position: relative; width: 44px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--fill-2); transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------- Accueil / copilote ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.hello { font: 700 40px/1.08 var(--font-display); letter-spacing: -.028em; margin: 0; }
.hello-sub { font: 400 22px/1.3 var(--font-display); color: var(--ink-2); margin: 8px 0 26px; letter-spacing: -.01em; }
.insights { display: grid; gap: 2px; }
.insight { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: var(--r-m); transition: background .15s; }
.insight:hover { background: var(--bg-elev); }
.insight .dot { margin-top: 8px; }
.insight.urgent .dot { background: var(--bad); } .insight.todo .dot { background: var(--accent); } .insight.good .dot { background: var(--ok); } .insight.info .dot { background: var(--ink-3); }
.insight p { margin: 0; flex: 1; }
.composer { position: sticky; bottom: 18px; margin-top: 26px; display: flex; align-items: flex-end; gap: 8px; padding: 8px 8px 8px 16px; border-radius: 22px; background: var(--bg-elev); border: 1px solid var(--line-2); box-shadow: var(--shadow-2); }
.composer textarea { flex: 1; border: 0; background: transparent; resize: none; padding: 8px 0; max-height: 160px; min-height: 22px; line-height: 1.45; outline: none; }
.composer .btn { flex: none; }
.mic.rec { background: var(--bad); color: #fff; border-color: transparent; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px var(--bad-soft); } }
.thread { display: grid; gap: 14px; margin-top: 24px; }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 18px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.msg.assistant { justify-self: start; background: var(--bg-elev); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg .acts { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border-radius: var(--r-m); overflow: hidden; border: 1px solid var(--line); }
.stat { background: var(--bg-elev); padding: 14px 14px 12px; }
.stat b { display: block; font: 650 26px/1.1 var(--font-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--ink-2); }
.upnext .cell { align-items: flex-start; }
.time { font-weight: 600; font-variant-numeric: tabular-nums; min-width: 46px; }
.time small { display: block; font-weight: 400; color: var(--ink-3); font-size: 11.5px; }

/* ---------- Offres (liste + détail) ---------- */
.split { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 18px; align-items: start; }
.list { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-l); overflow: hidden; }
.list-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .12s; }
.list-item:last-child { border-bottom: 0; }
.list-item:hover { background: var(--fill); }
.list-item[aria-selected="true"] { background: var(--accent-soft); }
.list-item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .s { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.score.hi { background: var(--ok-soft); color: var(--ok); } .score.mid { background: var(--warn-soft); color: var(--warn); } .score.lo { background: var(--bad-soft); color: var(--bad); }
.detail { position: sticky; top: 20px; }
.detail-head { padding: 22px 24px 16px; border-bottom: 1px solid var(--line); }
.detail-body { padding: 18px 24px 24px; }
.detail .title { font-size: 24px; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px 18px; margin: 4px 0 4px; }
.fact span { display: block; font-size: 12px; color: var(--ink-3); }
.fact b { font-weight: 550; word-break: break-word; }
.notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.notes li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); }
.notes li .dot { margin-top: 8px; }
.notes li.block { color: var(--bad); } .notes li.block .dot { background: var(--bad); }
.notes li.warn .dot { background: var(--warn); } .notes li.good .dot { background: var(--ok); }
.preview { white-space: pre-wrap; font-size: 14px; line-height: 1.5; padding: 16px; background: var(--bg); border-radius: var(--r-m); border: 1px solid var(--line); max-height: 420px; overflow: auto; }
.preview[contenteditable="true"] { background: var(--bg-elev); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }
.meter { height: 4px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.meter.warn > i { background: var(--warn); } .meter.bad > i { background: var(--bad); }
.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty h3 { color: var(--ink); margin-bottom: 6px; font-size: 17px; }
.empty .btn { margin-top: 14px; }

/* ---------- Calendrier ---------- */
.week { display: grid; grid-template-columns: repeat(var(--days, 6), minmax(0, 1fr)); gap: 10px; }
.day { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-m); min-height: 220px; display: flex; flex-direction: column; }
.day-head { padding: 10px 12px 8px; border-bottom: 1px solid var(--line); display: flex; align-items: baseline; gap: 6px; }
.day-head b { font: 650 20px/1 var(--font-display); font-variant-numeric: tabular-nums; }
.day-head span { font-size: 12.5px; color: var(--ink-2); text-transform: capitalize; }
.day-head em { margin-left: auto; font-style: normal; font-size: 12px; color: var(--ink-3); }
.day.today .day-head b { color: var(--accent); }
.day.past { background: transparent; border-style: dashed; }
.day.past .day-head b, .day.past .day-head span { color: var(--ink-3); }
.day-body { padding: 8px; display: grid; gap: 6px; align-content: start; }
.slot { display: block; width: 100%; text-align: left; border: 0; padding: 8px 9px; border-radius: 9px; background: var(--fill); cursor: pointer; border-left: 3px solid var(--accent); transition: background .12s; }
.slot:hover { background: var(--fill-2); }
.slot .h { font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.slot .h small { font-weight: 400; color: var(--ink-3); }
.slot .t { font-size: 13px; font-weight: 550; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slot.queued { border-left-color: var(--info); } .slot.sent { border-left-color: var(--ok); opacity: .75; } .slot.failed { border-left-color: var(--bad); } .slot.locked .h::after { content: ' · fixé'; color: var(--ink-3); font-weight: 400; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- Vidéo ---------- */
.studio { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; align-items: start; }
.phone { width: 100%; aspect-ratio: 9 / 16; border-radius: 34px; padding: 9px; background: #0c0d0f; box-shadow: var(--shadow-2); }
.phone video, .phone .ph { width: 100%; height: 100%; border-radius: 26px; object-fit: cover; display: block; background: #1b1e22; }
.phone .ph { display: grid; place-items: center; color: #8A9099; text-align: center; padding: 24px; font-size: 14px; }
.reel-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px; }
.reel-row img { width: 54px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--fill); }

/* ---------- Divers ---------- */
.ideas-week { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.idea-day { padding: 14px; border-radius: var(--r-m); background: var(--bg-elev); border: 1px solid var(--line); }
.idea-day.today { border-color: var(--accent); }
.idea-day .d { font-size: 12.5px; color: var(--ink-3); text-transform: capitalize; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.card { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-m); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.hook { color: var(--accent); font-weight: 550; }
.jobs { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 40; width: min(520px, calc(100vw - 32px)); }
.job { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); backdrop-filter: blur(12px); box-shadow: var(--shadow-2); font-size: 14px; animation: enter .25s var(--ease); }
.job .bar { flex: 1; height: 4px; background: rgba(255, 255, 255, .2); border-radius: 4px; overflow: hidden; min-width: 60px; }
.job .bar i { display: block; height: 100%; background: var(--accent); transition: width .4s; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); border-top-color: currentColor; animation: spin .8s linear infinite; flex: none; }
.spin.dark { border-color: var(--line-2); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 12px; background: color-mix(in srgb, var(--ink) 92%, transparent); color: var(--bg); font-weight: 550; box-shadow: var(--shadow-2); animation: enter .2s var(--ease); max-width: calc(100vw - 32px); }
.toast.err { background: var(--bad); color: #fff; }

/* Feuille modale (ajout d'offres, déplacement) */
.sheet-back { position: fixed; inset: 0; background: rgba(15, 17, 19, .32); backdrop-filter: blur(2px); z-index: 50; display: grid; place-items: center; padding: 20px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--bg-elev); border-radius: 20px; box-shadow: var(--shadow-2); padding: 22px 24px; animation: rise .28s var(--ease); }
@keyframes rise { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h2 { margin: 0; font-size: 19px; }

/* Onglets du bas (téléphone) */
.tabbar { display: none; }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  main { padding: 22px 16px 110px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); background: var(--side); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: 1px solid var(--line); }
  .tabbar button { border: 0; background: none; display: grid; justify-items: center; gap: 2px; font-size: 10.5px; font-weight: 550; color: var(--ink-3); padding: 4px 0; cursor: pointer; }
  .tabbar button svg { width: 23px; height: 23px; }
  .tabbar button[aria-current="page"] { color: var(--accent); }
  .home, .split, .studio { grid-template-columns: 1fr; }
  .detail { position: static; }
  .split.has-detail .list { display: none; }
  .split:not(.has-detail) .detail { display: none; }
  .title { font-size: 28px; } .hello { font-size: 32px; } .hello-sub { font-size: 19px; }
  .week { grid-template-columns: 1fr; }
  .day.past { display: none; }
  .insight { flex-wrap: wrap; }
  .insight p { flex-basis: calc(100% - 24px); }
  .insight .btn { margin-left: 19px; }
  .composer { position: fixed; left: 12px; right: 12px; bottom: calc(70px + env(safe-area-inset-bottom)); margin: 0; z-index: 20; }
  .home section { padding-bottom: 70px; }
  .day { min-height: 0; }
  .ideas-week { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .jobs { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .msg { max-width: 90%; }
  .phone { max-width: 300px; margin: 0 auto; }
}
@media (min-width: 901px) { .only-mobile { display: none !important; } }

/* ---------- V0.3 : publication, glisser-déposer, LinkedIn enregistrés ---------- */
.chip-toggle { height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-elev); color: var(--ink-2); font: 600 13.5px/1 var(--font); cursor: pointer; }
.chip-toggle[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip-toggle:disabled { opacity: .5; cursor: not-allowed; }
.choices { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-m); cursor: pointer; background: var(--bg-elev); }
.choice:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice input { margin-top: 3px; accent-color: var(--accent); }
.choice b { display: block; font-size: 14px; } .choice small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.btn.danger-solid { background: var(--bad); color: #fff; border-color: transparent; }
.week .slot[data-move="1"] { cursor: grab; }
.week .slot.dragging { opacity: .35; }
.slot.ghost { position: fixed; z-index: 90; pointer-events: none; cursor: grabbing; box-shadow: 0 18px 40px rgba(0,0,0,.25); transform: rotate(-1.5deg) scale(1.03); background: var(--bg-elev); }
.day.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
body.is-dragging, body.is-dragging * { user-select: none; -webkit-user-select: none; cursor: grabbing; }
.week .slot { -webkit-touch-callout: none; }
.saved-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.saved { padding: 16px 18px; display: flex; flex-direction: column; }
.saved-text { white-space: pre-wrap; font-size: 13.5px; line-height: 1.5; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 9; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }

/* ---------- V0.4 : portes de qualité, statistiques ---------- */
.notes li.gate { color: var(--warn); } .notes li.gate .dot { background: var(--warn); }
.gates { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 8px; }
.gate { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line); background: var(--bg-elev); }
.gate b { display: block; font-size: 13px; } .gate small { display: block; font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.gdot { width: 10px; height: 10px; border-radius: 50%; margin-top: 4px; flex: none; background: var(--ink-3); }
.gate.ok .gdot { background: var(--ok); } .gate.warn .gdot { background: var(--warn); } .gate.bad { border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); } .gate.bad .gdot { background: var(--bad); } .gate.bad small { color: var(--bad); }
.gate.wait .gdot { background: transparent; border: 2px solid var(--ink-3); width: 8px; height: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-bottom: 14px; }
.kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px; }
.kpi span { display: block; font-size: 12px; color: var(--ink-3); }
.kpi b { font: 650 22px/1.2 var(--font-display); font-variant-numeric: tabular-nums; }
.delta { font-size: 12px; font-weight: 600; margin-left: 6px; } .delta.up { color: var(--ok); } .delta.down { color: var(--bad); }
.stats-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-bottom: 12px; }
@media (max-width: 900px) { .stats-two { grid-template-columns: 1fr; } }
.toprow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.toprow:first-child { border-top: 0; }
.rank { width: 22px; text-align: center; font-weight: 700; color: var(--ink-3); }
.hours { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 18px; }
.hour { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.hour i { width: 100%; max-width: 28px; background: var(--accent); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.hour span { font-size: 11px; color: var(--ink-3); margin-top: 4px; }
.hour em { position: absolute; top: 0; font-style: normal; font-size: 10px; color: var(--ink-3); }
.banner { margin: 16px 24px 0; padding: 12px 16px; border-radius: var(--r-m); background: var(--warn-soft); color: var(--ink); font-size: 14px; }

/* ---------- Images ---------- */
.dropzone { margin-top: 10px; padding: 14px; border: 1.5px dashed var(--line); border-radius: var(--r-m); display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.thumb { position: relative; width: 112px; border: 1px solid var(--line); border-radius: 10px; padding: 6px; background: var(--bg-elev); display: grid; gap: 4px; }
.thumb.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.thumb img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; display: block; }
.thumb label { display: flex; gap: 4px; align-items: center; color: var(--ink-2); }
.thumb .x { position: absolute; top: 2px; right: 2px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.thumb .x svg { width: 14px; height: 14px; }
.thumb .spin { position: absolute; top: 40px; left: 46px; }
