/* ==========================================================================
   Nakari v6 — Clair Architectural & Sombre Mat
   Ajouts v6 :
   - 3 propositions interactives pour Aujourd'hui (Timeline Jour / 3 Temps / Focus)
   - Études complet (épreuves iPhone, pré-révision, flashcards & maîtrise, Concentration)
   - Contenu : Planning en 1er, Projets plein écran, Monter, Stats Réseau -> Comptes
   - Sportif : Écosystème Alipto animé (anneaux, courbe, mini-iPhone vitrine animé)
   - Mon QG : Plateau 2D en 1er + Revue rapide plein écran sans distraction
   - Mode Nouvel utilisateur : vrai 1er lancement vierge & guidé
   ========================================================================== */

:root {
  color-scheme: light;
  --bg-outer: #E8E6E0;
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-2: #F0EFEA;
  --surface-3: #E6E4DD;
  --border: rgba(20, 21, 25, .085);
  --border-strong: rgba(20, 21, 25, .16);
  --ink: #141519;
  --ink-2: #575A66;
  --ink-3: #888B97;
  --accent: #B86B0C;
  --accent-bg: rgba(184, 107, 12, .095);
  --accent-border: rgba(184, 107, 12, .28);
  --signal: #0D8568;
  --signal-bg: rgba(13, 133, 104, .10);
  --study: #4C6F58;
  --content: #8B5C70;
  --system: #4F607D;
  --sport: #2F7D6E;
  --biz: #7D6242;
  --danger: #B83B2B;
  --danger-bg: rgba(184, 59, 43, .09);
  --shadow-sm: 0 1px 2px rgba(20, 21, 25, .04);
  --shadow-md: 0 1px 2px rgba(20, 21, 25, .04), 0 10px 28px -14px rgba(20, 21, 25, .11);
  --shadow-lg: 0 24px 64px -18px rgba(20, 21, 25, .20), 0 2px 6px rgba(20, 21, 25, .05);
  --notch-bg: #141519;
  --notch-ink: #F6F5F1;
  --notch-muted: #989BA6;
  --kbd-bg: #FFFFFF;
  --kbd-border: #D9D7D0;
  --v0: linear-gradient(160deg, #323A4C, #1B202C);
  --v1: linear-gradient(160deg, #4B4031, #262018);
  --v2: linear-gradient(160deg, #35473D, #1B241F);
  --v3: linear-gradient(160deg, #493842, #241B21);
  --v4: linear-gradient(160deg, #3B3B4E, #1D1D28);
  --v5: linear-gradient(160deg, #32464D, #192327);
  --font-display: 'Jost', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  /* Étiquettes : Inter comme le texte (Alix, 29/11 : la police « machine à écrire » en majuscules ne lui plaît pas) */
  --font-mono: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --ease-pose: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

body.theme-dark {
  color-scheme: dark;
  --bg-outer: #07080A; --bg: #0D0E12; --surface: #14161C; --surface-2: #1B1E26; --surface-3: #232732;
  --border: rgba(255, 255, 255, .085); --border-strong: rgba(255, 255, 255, .16);
  --ink: #F1EFEA; --ink-2: #9B9FA9; --ink-3: #6C707C;
  --accent: #E6A340; --accent-bg: rgba(230, 163, 64, .12); --accent-border: rgba(230, 163, 64, .32);
  --signal: #52D1B3; --signal-bg: rgba(82, 209, 179, .12);
  --study: #82AA8F; --content: #C493A7; --system: #8FA2BF; --sport: #69C2B0; --biz: #C7A47D;
  --danger: #E67565; --danger-bg: rgba(230, 117, 101, .12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .28);
  --shadow-md: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 28px -12px rgba(0, 0, 0, .48);
  --shadow-lg: 0 28px 72px -16px rgba(0, 0, 0, .75);
  --notch-bg: #1F222B; --notch-ink: #F1EFEA; --notch-muted: #9296A3;
  --kbd-bg: #1B1E26; --kbd-border: rgba(255, 255, 255, .14);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; width: 100%; margin: 0; overflow: hidden; background: var(--bg-outer); color: var(--ink); font: 400 14px/1.48 var(--font-sans); font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased; transition: background-color .28s ease, color .22s ease; }
h1, h2, h3, p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { display: block; flex: none; }

.mono { font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -.02em; }

.theme-sweep { position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: 0; background: linear-gradient(125deg, transparent 36%, rgba(230, 163, 64, .14) 50%, transparent 64%); transform: translateX(-100%); }
.theme-sweep.run { animation: sweepDiag .55s var(--ease-pose) forwards; }
@keyframes sweepDiag { 0% { opacity: 0; transform: translateX(-80%); } 35% { opacity: 1; } 100% { opacity: 0; transform: translateX(85%); } }

/* ---------- BARRE HAUTE ---------- */
.preview-bar { height: 40px; padding: 0 14px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--ink-2); user-select: none; overflow-x: auto; }
.preview-group { display: flex; align-items: center; gap: 4px; flex: none; }
.preview-sep { width: 1px; height: 14px; background: var(--border); margin: 0 4px; }
.preview-btn { height: 26px; padding: 0 10px; border-radius: 7px; font-size: 11.5px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.preview-btn:hover { background: var(--surface-2); color: var(--ink); }
.preview-btn.active { background: var(--ink); color: var(--surface); }

.stage { height: calc(100% - 40px); width: 100%; padding: 10px 12px 12px; display: flex; align-items: stretch; justify-content: center; overflow: hidden; }
.window { flex: 1; max-width: 1620px; min-width: 0; height: 100%; border-radius: 16px; overflow: hidden; background: var(--bg); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; position: relative; }
body.mode-iphone .window { display: none; }

/* ---------- TITLEBAR : MAC NOTCH vs PC/WEB BULLE FLOTTANTE ---------- */
.titlebar { height: 48px; padding: 0 14px; flex: none; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background: var(--surface); border-bottom: 1px solid var(--border); position: relative; z-index: 12; }
.tb-left { display: flex; align-items: center; gap: 10px; }
.traffic { display: flex; gap: 7px; }
.traffic span { width: 11px; height: 11px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .08); }
.traffic .r { background: #FF5F56; } .traffic .y { background: #FFBD2E; } .traffic .g { background: #27C93F; }
.win-os-label { display: none; font-size: 12px; color: var(--ink-2); font-weight: 500; }
body.os-pc .traffic { display: none; } body.os-pc .win-os-label { display: inline-flex; align-items: center; gap: 6px; }
.tb-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.win-pc-ctl { display: none; gap: 14px; margin-left: 8px; color: var(--ink-2); font-size: 12px; }
body.os-pc .win-pc-ctl { display: inline-flex; }

.cue072-wrap { position: relative; height: 100%; display: flex; align-items: flex-start; justify-content: center; }
.cue072-notch { height: 38px; min-width: 248px; padding: 0 16px; border-radius: 0 0 15px 15px; background: var(--notch-bg); color: var(--notch-ink); display: inline-flex; align-items: center; gap: 10px; box-shadow: 0 8px 22px -8px rgba(20, 21, 25, .28); transition: transform .2s var(--ease-pose), border-radius .25s ease, background .25s ease; cursor: pointer; position: relative; }
.cue072-notch:hover { transform: translateY(1px); }
.cue072-notch::before, .cue072-notch::after { content: ""; position: absolute; top: 0; width: 11px; height: 11px; pointer-events: none; }
.cue072-notch::before { left: -11px; background: radial-gradient(circle at 0 100%, transparent 11px, var(--notch-bg) 11.5px); }
.cue072-notch::after { right: -11px; background: radial-gradient(circle at 100% 100%, transparent 11px, var(--notch-bg) 11.5px); }
body.os-pc .cue072-wrap { align-items: center; }
body.os-pc .cue072-notch { height: 33px; border-radius: 999px; padding: 0 14px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
body.os-pc .cue072-notch:hover { transform: none; border-color: var(--accent-border); background: var(--surface); }
body.os-pc .cue072-notch::before, body.os-pc .cue072-notch::after { display: none; }
body.os-pc .cue072-top { color: var(--ink-3); }

.cue072-matrix { width: 13px; height: 13px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8px; flex: none; color: var(--accent); }
.cue072-matrix.ready { color: var(--signal); }
.cue072-matrix i { display: block; border-radius: 1px; background: currentColor; animation: dnFlicker 1.1s ease-in-out infinite alternate; }
.cue072-matrix i:nth-child(5) { opacity: .12; animation: none; }
.cue072-matrix i:nth-child(2) { animation-delay: .2s; } .cue072-matrix i:nth-child(3) { animation-delay: .45s; }
.cue072-matrix i:nth-child(4) { animation-delay: .7s; } .cue072-matrix i:nth-child(6) { animation-delay: .35s; }
.cue072-matrix i:nth-child(7) { animation-delay: .6s; } .cue072-matrix i:nth-child(8) { animation-delay: .15s; }
.cue072-matrix i:nth-child(9) { animation-delay: .85s; }
@keyframes dnFlicker { from { opacity: .2; } to { opacity: 1; } }
.cue072-copy { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; transition: opacity .16s ease; }
.cue072-copy.fading { opacity: 0; }
.cue072-top { font-size: 9.5px; color: var(--notch-muted); font-family: var(--font-mono); font-weight: 500; letter-spacing: 0; }
.cue072-bot { font-size: 12px; font-weight: 500; white-space: nowrap; }

.cmdk-btn { height: 30px; padding: 0 9px 0 11px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 9px; font-size: 12px; color: var(--ink-2); }
.cmdk-btn:hover { border-color: var(--border-strong); color: var(--ink); }
.kbd { font-family: var(--font-mono); font-size: 10px; line-height: 1; padding: 3px 5px; border-radius: 5px; background: var(--kbd-bg); border: 1px solid var(--kbd-border); color: var(--ink-2); }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn.active { border-color: var(--accent-border); color: var(--accent); background: var(--accent-bg); }

/* ---------- SHELL & SIDEBAR PLIABLE ---------- */
.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); transition: grid-template-columns .28s var(--ease-pose); }
.shell.sb-collapsed { grid-template-columns: 62px minmax(0, 1fr); }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 12px 10px 10px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 0; }
.shell.sb-collapsed .sb-text { display: none !important; }
.shell.sb-collapsed .brand-head { justify-content: center; padding: 2px 0 12px; gap: 6px; flex-direction: column; }
.shell.sb-collapsed .nav-link, .shell.sb-collapsed .nav-more-btn { justify-content: center; padding: 0; }
.shell.sb-collapsed .cue186-trigger { justify-content: center; padding: 8px 0; }
.sidebar-scroll { overflow-y: auto; min-height: 0; }
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

.brand-head { display: flex; align-items: center; justify-content: space-between; padding: 2px 8px 12px; }
.brand-mark { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-display); font-size: 19px; font-weight: 400; letter-spacing: .02em; }
.sb-collapse-btn { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: var(--ink-3); border: 1px solid transparent; transition: background .15s, color .15s; }
.sb-collapse-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--border); }

.nav-block { display: flex; flex-direction: column; gap: 2px; margin-bottom: 14px; }
.nav-cap { padding: 0 8px 4px; }
.nav-cap-row { display: flex; align-items: center; justify-content: space-between; padding: 0 8px 4px; }
.nav-manage { font-family: var(--font-mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0; color: var(--accent); padding: 2px 6px; border-radius: 6px; background: var(--accent-bg); }
.nav-link { width: 100%; height: 34px; padding: 0 9px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink-2); text-align: left; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.nav-link-left { display: flex; align-items: center; gap: 9px; min-width: 0; }
.nav-link-left svg { width: 16px; height: 16px; stroke-width: 1.75; color: var(--ink-3); }
.nav-link.active .nav-link-left svg { color: var(--ink); }
.nav-meta { font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); }
.nav-more-btn { width: 100%; height: 28px; padding: 0 9px; margin-top: 2px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }
.nav-more-btn:hover { color: var(--ink); background: var(--surface-2); }

.cue186-card { border-radius: 13px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; flex: none; }
.cue186-expand { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .36s var(--ease-pose); }
.cue186-card.open .cue186-expand { grid-template-rows: 1fr; }
.cue186-inner { overflow: hidden; opacity: 0; transform: translateY(6px); transition: opacity .24s ease, transform .34s var(--ease-pose); }
.cue186-card.open .cue186-inner { opacity: 1; transform: none; }
.cue186-body { padding: 7px 7px 4px; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); }
.cue186-row { width: 100%; height: 32px; padding: 0 8px; border-radius: 7px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-2); }
.cue186-row:hover { background: var(--surface); color: var(--ink); }
.cue186-theme-seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; padding: 3px; margin: 5px 0 3px; border-radius: 8px; background: var(--surface-3); }
.cue186-theme-seg button { height: 26px; border-radius: 6px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.cue186-theme-seg button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }
.cue186-trigger { width: 100%; padding: 8px 9px; display: flex; align-items: center; gap: 9px; text-align: left; }
.avatar { width: 30px; height: 30px; border-radius: 50%; flex: none; background: var(--ink); color: var(--surface); display: grid; place-items: center; font-size: 12.5px; font-weight: 600; }

/* ---------- WORKSPACE & EN-TÊTE COMPACT ---------- */
.workspace-col { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.main { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 26px 86px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.main.tight { padding: 12px 18px 80px; gap: 10px; }
.main.chat-mode { padding: 18px 30px 22px; gap: 0; }
.main::-webkit-scrollbar { width: 6px; }
.main::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }

.compact-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); min-height: 42px; }
.compact-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compact-title { font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.05; letter-spacing: -.02em; }
.compact-right { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

/* ---------- BULLE FLOTTANTE NAKARI EN BAS ---------- */
.nakari-dock-wrap { position: absolute; left: 0; right: 0; bottom: 14px; z-index: 25; display: flex; justify-content: center; pointer-events: none; transition: opacity .22s ease, transform .25s var(--ease-pose); }
.nakari-dock-wrap.hidden { opacity: 0; transform: translateY(18px); }
.nakari-dock { pointer-events: auto; height: 46px; width: 188px; max-width: calc(100% - 40px); padding: 4px 13px 4px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; overflow: hidden; transition: width .4s var(--ease-spring), border-radius .32s var(--ease-pose), padding .28s ease, border-color .2s; }
.nakari-dock:hover, .nakari-dock.expanded { width: 520px; border-radius: 14px; padding: 5px 6px 5px 7px; border-color: var(--accent-border); }
.nakari-dock-orb { width: 34px; height: 34px; border-radius: 50%; flex: none; background: var(--surface-2); border: 1px solid var(--border); display: grid; place-items: center; }
.nakari-dock-hint { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.nakari-dock:hover .nakari-dock-hint, .nakari-dock.expanded .nakari-dock-hint { display: none; }
.nakari-dock-form { flex: 1; min-width: 0; display: none; align-items: center; gap: 8px; }
.nakari-dock:hover .nakari-dock-form, .nakari-dock.expanded .nakari-dock-form { display: flex; }
.nakari-dock-form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13px; color: var(--ink); }
.dock-send { height: 32px; padding: 0 13px; font-size: 12px; border-radius: 9px; }

/* ---------- REVUE RAPIDE PLEIN ÉCRAN (ZÉRO DISTRACTION) ---------- */
.review-fullscreen {
  position: absolute; inset: 48px 0 0 0; z-index: 45;
  background: var(--bg); display: none; flex-direction: column;
  padding: 20px 32px 28px; overflow-y: auto;
}
.review-fullscreen.open { display: flex; animation: fadeIn .22s var(--ease-pose); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.review-center {
  flex: 1; max-width: 560px; width: 100%; margin: 16px auto 0;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
}
.swipe-stage-full { position: relative; min-height: 410px; padding-top: 12px; }
.swipe-ghost { position: absolute; left: 18px; right: 18px; top: 0; height: 386px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border); transform: scale(.96); }
.swipe-card-main {
  position: relative; z-index: 3; min-height: 386px; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1.5px solid var(--border-strong); box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; cursor: grab; user-select: none; touch-action: none;
  transition: transform .26s var(--ease-pose), opacity .22s ease;
}
.swipe-card-main.dragging { transition: none; cursor: grabbing; }
.swipe-stamp { position: absolute; top: 20px; z-index: 5; padding: 6px 12px; border-radius: 8px; font-family: var(--font-mono); font-size: 12px; font-weight: 600; opacity: 0; pointer-events: none; }
.swipe-stamp.ok { left: 18px; border: 2px solid var(--signal); color: var(--signal); background: var(--surface); transform: rotate(-6deg); }
.swipe-stamp.no { right: 18px; border: 2px solid var(--danger); color: var(--danger); background: var(--surface); transform: rotate(6deg); }

/* ---------- AUJOURD'HUI : 3 VARIANTES DE PLANNING JOURNALIER ---------- */
.today-timeline-grid {
  display: grid; grid-template-columns: minmax(0, 1.45fr) 310px; gap: 22px; align-items: start;
}
@media (max-width: 1080px) { .today-timeline-grid { grid-template-columns: 1fr; } }
.day-board {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 14px 18px; position: relative; box-shadow: var(--shadow-sm);
}
/* ---------- ACCUEIL : CHRONOLOGIE PLEINE HAUTEUR À GAUCHE + WIDGETS PERSONNALISABLES À DROITE ---------- */
.accueil-grid {
  display: grid; grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr); gap: 16px;
  align-items: stretch; min-height: calc(100vh - 165px);
}
@media (max-width: 1080px) { .accueil-grid { grid-template-columns: 1fr; min-height: auto; } }
.day-board {
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 15px 16px;
  box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 6px; height: 100%;
}
.day-board-scroll {
  flex: 1; overflow-y: auto; padding-right: 4px; display: flex; flex-direction: column;
}
/* Réglages complets (layout 2 colonnes style macOS / iOS Settings) */
.settings-shell {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 16px; align-items: start;
}
@media (max-width: 960px) { .settings-shell { grid-template-columns: 1fr; } }
.settings-nav {
  background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 8px;
  display: flex; flex-direction: column; gap: 3px; box-shadow: var(--shadow-sm);
}
.settings-nav-btn {
  width: 100%; text-align: left; padding: 9px 11px; border-radius: 10px; font-size: 13px;
  font-weight: 500; color: var(--ink-2); display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.settings-nav-btn:hover { background: var(--surface-2); color: var(--ink); }
.settings-nav-btn.active { background: var(--ink); color: var(--surface); font-weight: 600; }
.toggle-pill {
  width: 40px; height: 22px; border-radius: 999px; background: var(--surface-3); position: relative;
  border: 1px solid var(--border); flex: none; transition: background .2s;
}
.toggle-pill::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s var(--ease-pose);
}
.toggle-pill.on { background: var(--signal); border-color: transparent; }
.toggle-pill.on::after { transform: translateX(18px); background: #FFFFFF; }
/* Animation douce du nouveau logo Étoile de Convergence dans le dock flottant */
.nakari-dock:hover .nk-app-logo-core { transform-box: fill-box; transform-origin: center; animation: nkDockPulse 1.6s ease-in-out infinite; }
@keyframes nkDockPulse { 0%,100%{transform:scale(0.92)} 50%{transform:scale(1.12)} }
.day-slot-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; align-items: stretch;
  padding: 5px 0; border-top: 1px solid var(--border); position: relative;
}
.day-slot-row:first-child { border-top: 0; }
.day-block-item {
  padding: 7px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  border-left: 3px solid var(--accent); display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.day-block-item.task-inline { background: var(--surface); border-left-style: dashed; }
.day-now-pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px;
  background: var(--accent-bg); color: var(--accent); font-family: var(--font-mono); font-size: 9.5px;
}

.widgets-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch;
}
@media (max-width: 760px) { .widgets-grid { grid-template-columns: 1fr; } }
.widget-card {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 15px;
  padding: 14px 16px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 8px;
  transition: transform .2s var(--ease-pose), border-color .2s;
}
.widget-card.wide { grid-column: span 2; }
@media (max-width: 760px) { .widget-card.wide { grid-column: span 1; } }
.widget-card.editing {
  border-style: dashed; border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-bg), var(--shadow-md);
}
.widget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.widget-space-pill {
  display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 9.5px;
  padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2);
}
.widget-edit-bar {
  display: flex; align-items: center; gap: 4px;
}
.widget-edit-btn {
  height: 22px; min-width: 22px; padding: 0 6px; border-radius: 6px; font-size: 11px;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2);
}
.widget-edit-btn:hover { background: var(--surface-3); color: var(--ink); }
.widget-edit-btn.del { color: var(--danger); }
.widget-add-tile {
  border: 1.5px dashed var(--border-strong); border-radius: 15px; padding: 16px;
  background: transparent; color: var(--ink-2); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; min-height: 112px;
  transition: background .15s, border-color .15s, color .15s;
}
.widget-add-tile:hover { background: var(--surface-2); border-color: var(--accent); color: var(--ink); }
.plat-chip {
  display: inline-flex; align-items: center; padding: 1px 5px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 8.5px; font-weight: 600; letter-spacing: .04em;
}
.plat-chip.ig { background: rgba(225, 48, 108, .22); color: #FFD1E1; }
.plat-chip.tt { background: rgba(37, 244, 238, .2); color: #C2FFFD; }
.plat-chip.both { background: rgba(255, 181, 71, .26); color: #FFE6B8; }

/* ---------- ÉCOSYSTÈME ALIPTO ANIMÉ (100 % ADAPTÉ AU THÈME CLAIR & SOMBRE) ---------- */
.alipto-hero {
  border-radius: 20px; overflow: hidden; padding: 22px 24px;
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F7FC 100%);
  color: var(--ink); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  display: grid; grid-template-columns: 1.2fr .85fr; gap: 22px; align-items: center;
  position: relative;
}
body.theme-dark .alipto-hero {
  background: linear-gradient(135deg, #131822 0%, #0E121A 100%);
  color: #EFF2F6; border-color: rgba(134, 162, 255, .24);
}
@media (max-width: 1020px) { .alipto-hero { grid-template-columns: 1fr; } }
.alipto-sub {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px;
}
body.theme-dark .alipto-sub {
  background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.1);
}
.alipto-accent-strip {
  background: var(--accent-bg); border: 1px solid var(--accent-border); border-radius: 12px;
  padding: 11px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
.alipto-ring-track { stroke: var(--border-strong); }
body.theme-dark .alipto-ring-track { stroke: rgba(255,255,255,.12); }
.alipto-phone-demo {
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 24px; padding: 16px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; color: var(--ink);
}
body.theme-dark .alipto-phone-demo {
  background: #0D1117; border-color: rgba(255,255,255,.14); color: #EFF2F6;
  box-shadow: 0 22px 54px rgba(0,0,0,.55);
}
@keyframes ringDraw { from { stroke-dashoffset: 220; } to { stroke-dashoffset: var(--target-off, 40); } }
@keyframes curveDraw { from { stroke-dashoffset: 380; } to { stroke-dashoffset: 0; } }
@keyframes barGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes floatSlide { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.anim-ring { stroke-dasharray: 220; stroke-dashoffset: 220; animation: ringDraw 1.2s var(--ease-pose) forwards; }
.anim-curve { stroke-dasharray: 380; stroke-dashoffset: 380; animation: curveDraw 1.5s var(--ease-pose) forwards; }
.anim-bar { transform-origin: left; animation: barGrow .9s var(--ease-pose) both; }
.anim-float { animation: floatSlide 3.4s ease-in-out infinite; }

/* ---------- ÉTUDES : MODE CONCENTRATION ACTIF ---------- */
.focus-shield {
  padding: 26px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--border-strong);
  display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center;
}
.focus-shield.locked { border-color: var(--accent); background: #0E1015; color: #F1EFEA; }

/* ---------- BOUTONS & SURFACES COMMUNES ---------- */
.btn-primary { height: 34px; padding: 0 13px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 12.5px; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn-primary:hover { opacity: .9; }
.btn-secondary { height: 34px; padding: 0 12px; border-radius: 9px; background: var(--surface); border: 1px solid var(--border); color: var(--ink); font-size: 12.5px; font-weight: 500; box-shadow: var(--shadow-sm); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 16px 18px; box-shadow: var(--shadow-md); }
.card-flat { background: var(--surface); border: 1px solid var(--border); border-radius: 13px; padding: 13px 15px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1120px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.cue096-seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); gap: 2px; }
.cue096-seg button { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.cue096-seg button.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.cue350-bar { position: relative; display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); }
.cue350-pill { position: absolute; top: 3px; bottom: 3px; left: 0; border-radius: 7px; background: var(--surface-2); pointer-events: none; opacity: 0; will-change: transform, width, opacity; }
.cue350-underline { position: absolute; bottom: 0; left: 0; height: 2px; border-radius: 2px; background: var(--accent); pointer-events: none; transition: transform .32s var(--ease-pose), width .32s var(--ease-pose); }
.cue350-tab { position: relative; z-index: 2; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.cue350-tab:hover, .cue350-tab.active { color: var(--ink); } .cue350-tab.active { font-weight: 600; }

/* CALENDRIER, PROJETS, NLE, PLANNING, QG, MODALES, IPHONE */
.cal-shell { display: grid; grid-template-columns: minmax(0, 1fr) 268px; gap: 14px; align-items: start; }
@media (max-width: 1120px) { .cal-shell { grid-template-columns: 1fr; } }
.cal-week-board { background: var(--surface); border: 1px solid var(--border); border-radius: 15px; overflow: hidden; box-shadow: var(--shadow-md); }
.cal-week-head { display: grid; grid-template-columns: 50px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--border); }
.cal-wh-cell { padding: 8px 6px; text-align: center; border-left: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; }
.cal-wh-num { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13.5px; font-weight: 500; }
.cal-wh-cell.today .cal-wh-num { background: var(--accent); color: #FFF; font-weight: 600; }
.cal-wh-cell.sel:not(.today) .cal-wh-num { background: var(--ink); color: var(--surface); }
.cal-week-scroll { max-height: 550px; overflow-y: auto; position: relative; }
.cal-week-grid { display: grid; grid-template-columns: 50px repeat(7, minmax(0, 1fr)); position: relative; }
.cal-hour-lbl { height: 46px; padding-right: 7px; text-align: right; font-family: var(--font-mono); font-size: 10px; color: var(--ink-3); transform: translateY(-6px); }
.cal-day-col { position: relative; border-left: 1px solid var(--border); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 45px, var(--border) 45px, var(--border) 46px); }
.cal-day-col.today-col { background-color: var(--accent-bg); }
.cal-ev-block { position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 4px 6px; background: var(--surface); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); box-shadow: var(--shadow-sm); text-align: left; overflow: hidden; z-index: 3; }
.cal-ev-block.selected { outline: 2px solid var(--accent); outline-offset: 1px; z-index: 7; }
.cal-now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 5; pointer-events: none; }
.cal-now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { min-height: 82px; padding: 7px; border-radius: 11px; text-align: left; background: var(--surface-2); border: 1px solid transparent; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.today { border-color: var(--accent); background: var(--surface); }
.cal-chip { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-bar { width: 2.5px; height: 10px; border-radius: 2px; flex: none; }

.proj-table { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.proj-row { width: 100%; padding: 11px 16px; border-top: 1px solid var(--border); display: grid; grid-template-columns: minmax(0, 1.3fr) 110px 110px 100px 64px 104px; align-items: center; gap: 12px; text-align: left; transition: background .12s; cursor: pointer; }
.proj-row:first-child, .proj-vide { cursor: default; }
.proj-vide { display: block; color: var(--ink-3); font-size: 13px; }
.proj-acts { display: flex; justify-content: flex-end; }
.proj-act { height: 26px; padding: 0 9px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-2); font-size: 11.5px; font-weight: 500; opacity: 0; transition: opacity .12s; }
.proj-row:hover .proj-act, .proj-row:focus-within .proj-act, .proj-act:focus-visible { opacity: 1; }
.proj-act:hover { color: var(--ink); background: var(--surface-2); }
@media (hover: none) { .proj-act { opacity: 1; } }
/* Petit écran (iPhone) : titre, puis étape (ou date dans Programmé, Publié, Corbeille), puis le bouton */
@media (max-width: 700px) {
  .proj-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; padding: 10px 12px; }
  .proj-row > :nth-child(3), .proj-row > :nth-child(5), .proj-table:not(.est-range) .proj-row > :nth-child(4), .proj-table.est-range .proj-row > :nth-child(2) { display: none; }
}
.proj-sep { width: 1px; height: 18px; margin: 0 4px; background: var(--border); }
.proj-passe { margin-left: 4px; padding: 1px 6px; border-radius: 5px; background: var(--accent-bg); color: var(--accent); font-size: 10.5px; }
.proj-row:first-child { border-top: 0; } .proj-row:hover { background: var(--surface-2); }
.stage-pill { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 9px; border-radius: 6px; font-family: var(--font-mono); font-size: 11.5px; font-weight: 500; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.proj-kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1060px) { .proj-kanban { grid-template-columns: repeat(2, 1fr); } }
.kanban-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: 13px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }

.nle-grid { display: grid; grid-template-columns: 205px 258px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 1180px) { .nle-grid { grid-template-columns: 248px minmax(0, 1fr); } .nle-left-col { grid-column: 1 / -1; order: 3; align-items: stretch !important; } .nle-left-col .cue096-seg { align-self: flex-start; } .plan-list { width: 100%; flex-direction: row; overflow-x: auto; max-height: none; } .plan-row { flex: none; width: 172px; } }
.phone-preview { width: 248px; aspect-ratio: 9 / 16; margin: 0 auto; border-radius: 16px; overflow: hidden; position: relative; background: #141720; border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.phone-preview.mini { width: 196px; opacity: .92; }
.phone-preview video { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-pin { position: absolute; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #141519; font-family: var(--font-mono); font-size: 10px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 4px 12px rgba(0,0,0,.45); transform: translate(-50%, -50%); }
.script-word { display: inline-block; padding: 2px 4px; margin: 1px; border-radius: 5px; cursor: pointer; }
.script-word:hover { background: var(--surface-2); }
.script-word.selected { background: var(--accent); color: #141519; font-weight: 600; }
.script-word.strong { font-weight: 700; color: var(--accent); }
.script-word.hl { background: var(--accent-bg); border-bottom: 1.5px solid var(--accent); }
.script-word.cut { text-decoration: line-through; opacity: .4; }
.nle-timeline { border-radius: 14px; background: var(--surface); border: 1px solid var(--border); padding: 10px 14px 12px; display: flex; flex-direction: column; gap: 7px; position: relative; }
.nle-track { display: grid; grid-template-columns: 96px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 30px; }
.nle-lane { position: relative; height: 30px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; display: flex; align-items: center; gap: 3px; padding: 2px 4px; cursor: pointer; }
.nle-clip { height: 100%; border-radius: 5px; padding: 0 7px; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: clip; flex: none; }
.nle-playhead-line { position: absolute; top: 44px; bottom: 10px; width: 2px; background: var(--accent); z-index: 6; pointer-events: none; }

.cue180-wrap { display: inline-flex; align-items: center; gap: 0; height: 48px; transition: gap .44s var(--ease-pose); }
.cue180-wrap.editing { gap: 10px; }
.cue180-part { height: 48px; background: var(--surface-2); border: 1px solid var(--border); display: inline-flex; align-items: center; gap: 5px; padding: 0 13px; transition: border-radius .44s var(--ease-pose), padding .44s var(--ease-pose); }
.cue180-part:first-child { border-radius: 13px 0 0 13px; border-right: 0; padding-right: 6px; }
.cue180-part:nth-child(2) { border-radius: 0; border-left: 0; border-right: 0; padding-left: 6px; padding-right: 8px; }
.cue180-part:last-child { border-radius: 0 13px 13px 0; border-left: 0; width: 46px; justify-content: center; padding: 0; position: relative; overflow: hidden; }
.cue180-wrap.editing .cue180-part { border-radius: 13px; border: 1px solid var(--border-strong); padding: 0 15px; }
.cue180-wrap.editing .cue180-part:last-child { padding: 0; width: 48px; background: var(--ink); color: var(--surface); border-color: var(--ink); }
.cue180-num { width: 28px; border: 0; background: transparent; outline: none; text-align: right; font-family: var(--font-mono); font-size: 18px; font-weight: 500; color: var(--ink); }
.cue180-unit { font-size: 14px; color: var(--ink-3); }
.cue180-ico { position: absolute; left: 50%; top: 50%; transition: transform .42s var(--ease-pose), opacity .3s ease; }
.cue180-ico.pen { transform: translate(-50%, -50%); opacity: 1; } .cue180-ico.chk { transform: translate(-50%, -170%); opacity: 0; }
.cue180-wrap.editing .cue180-ico.pen { transform: translate(-50%, 150%); opacity: 0; } .cue180-wrap.editing .cue180-ico.chk { transform: translate(-50%, -50%); opacity: 1; }

.hold-btn { position: relative; overflow: hidden; height: 32px; padding: 0 14px; border-radius: 9px; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 500; user-select: none; display: inline-flex; align-items: center; gap: 7px; }
.hold-fill { position: absolute; inset: 0 auto 0 0; width: 0%; background: var(--accent); opacity: .92; pointer-events: none; transition: width 1.15s linear; }
.hold-btn.holding .hold-fill { width: 100%; } .hold-btn.done { background: var(--signal); }
.hold-btn span.hold-txt { position: relative; z-index: 2; }

.cue220-panel { border-radius: 12px; padding: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.cue220-row { position: relative; height: 34px; border-radius: 8px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 11px; cursor: ew-resize; user-select: none; }
.cue220-bar { position: absolute; inset: 0 auto 0 0; background: var(--accent-bg); pointer-events: none; }
.cue220-row span { position: relative; z-index: 2; font-size: 12px; }
/* Monter · réels du 29/11 : polices, palette de marque, groupes de mots, fins de musique, ambiances */
.font-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.font-btn, .end-btn { min-height: 52px; padding: 8px 6px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; }
.font-btn span { font-size: 14px; line-height: 1.1; color: var(--ink); }
.font-btn small { font-size: 10.5px; color: var(--ink-3); }
.font-btn.active, .end-btn.active, .word-group.active { background: var(--accent-bg); border-color: var(--accent-border); }
.pol { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pol-recherche { height: 30px; padding: 0 10px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--ink); width: 100%; }
.pol-recherche:focus { outline: none; border-color: var(--accent-border); }
.pol-onglets { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.pol-onglets::-webkit-scrollbar { display: none; }
.pol-onglets button { flex: none; height: 26px; padding: 0 10px; border-radius: 7px; font-size: 11px; font-weight: 500; white-space: nowrap; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--border); }
.pol-onglets button.active { background: var(--ink); color: var(--surface); border-color: var(--ink); font-weight: 600; }
.pol-grille { max-height: 236px; overflow-y: auto; align-content: start; padding-right: 2px; }
.pol-tuile { min-height: 64px; gap: 2px; min-width: 0; }
.pol-tuile .pol-aa { font-size: 21px; line-height: 1.05; }
.pol-tuile small { max-width: 100%; font-size: 10.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pol-tuile em { font-style: normal; font-size: 9.5px; color: var(--ink-3); }
.pol-tuile .pol-aa, .pol-tuile small { opacity: .3; transition: opacity .2s ease-out; }
.pol-tuile.pret .pol-aa, .pol-tuile.pret small { opacity: 1; }
.pol-vide { grid-column: 1 / -1; padding: 14px 4px; font-size: 12px; color: var(--ink-3); text-align: center; }
.mont-pal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.swatches { display: flex; gap: 7px; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong); }
.swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.word-groups { display: flex; flex-wrap: wrap; gap: 6px; }
.word-group { padding: 7px 10px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12.5px; cursor: pointer; }
.word-group span { cursor: pointer; }
.word-group span.on { color: var(--accent); font-weight: 700; }
.inout { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.inout > div:not(.dir-row) { display: flex; flex-direction: column; gap: 4px; }
.dir-row { display: flex; gap: 4px; }
.dir-row button { width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); font-size: 14px; }
.dir-row button.active { background: var(--ink); color: var(--surface); }
.end-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.end-btn span { font-size: 11.5px; font-weight: 600; }
.amb-chip { width: 64px; height: 26px; border-radius: 6px; background: linear-gradient(90deg, #2E3442, #8A6A48 55%, #E8C9A0); }
.reglages { display: flex; flex-wrap: wrap; gap: 6px; }
.reglages span { padding: 5px 9px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--border); font-size: 11.5px; color: var(--ink-2); }
@media (max-width: 760px) { .nle-grid { grid-template-columns: minmax(0, 1fr); justify-items: center; } .nle-grid > section { justify-self: stretch; } .nle-track { grid-template-columns: 52px minmax(0, 1fr); gap: 6px; } .nle-timeline { --nle-lab: 72px; --nle-lab2: 58px; } }
@media (max-width: 560px) { .font-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mont-sub.dir-haut { --dx: 0px; --dy: 18px; } .mont-sub.dir-bas { --dx: 0px; --dy: -18px; } .mont-sub.dir-gauche { --dx: 30px; --dy: 0px; } .mont-sub.dir-droite { --dx: -30px; --dy: 0px; }
.mont-sub.sub-in-glisser { animation: subIn .45s cubic-bezier(.22, 1, .36, 1); }
.mont-sub.sub-in-rebond { animation: subIn .6s cubic-bezier(.34, 1.56, .64, 1); }
.mont-sub.sub-in-clignoter, .mont-sub.sub-out-clignoter { animation: subBlink .6s steps(2, jump-none) 2; }
.mont-sub.sub-out-glisser { animation: subOut .5s cubic-bezier(.64, 0, .78, 0); }
.mont-sub.sub-out-rebond { animation: subOut .6s cubic-bezier(.36, 0, .66, -.56); }
@keyframes subIn { from { opacity: 0; transform: translate(var(--dx), var(--dy)); } }
@keyframes subOut { 80% { opacity: 0; transform: translate(calc(var(--dx) * -1), calc(var(--dy) * -1)); } 100% { opacity: 0; } }
@keyframes subBlink { 0% { opacity: 1; } 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .mont-sub { animation: none !important; } }

.cue328-pop { position: fixed; z-index: 90; display: none; align-items: flex-start; gap: 8px; }
.cue328-pop.open { display: flex; }
.cue328-preview { width: 142px; padding: 11px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 7px; }
.cue328-stage { height: 70px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.cue328-menu { width: 216px; padding: 5px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; }
.cue328-item { width: 100%; height: 34px; padding: 0 10px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--ink); text-align: left; }
.cue328-item:hover { background: var(--surface-2); }
@keyframes cueShift { 0%, 15% { transform: translateX(-16px); } 50%, 75% { transform: translateX(16px); } 100% { transform: translateX(-16px); } }
@keyframes cueSplit { 0%, 15% { transform: scale(.86); opacity: .65; } 55%, 75% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(.86); opacity: .65; } }
.anim-shift { animation: cueShift 2.1s ease-in-out infinite; } .anim-split { animation: cueSplit 2.1s ease-in-out infinite; }

.prog-track { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.prog-fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width .35s var(--ease-pose); }
.prog-fill.signal { background: var(--signal); }

.list-row { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 0; text-align: left; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.check-box { width: 18px; height: 18px; border-radius: 5px; flex: none; border: 1.5px solid var(--border-strong); display: grid; place-items: center; }
.check-box.done { background: var(--ink); border-color: var(--ink); color: var(--surface); }

.slot { aspect-ratio: 9 / 14; min-height: 76px; width: 100%; border-radius: 10px; border: 1px dashed var(--border-strong); background: var(--surface-2); position: relative; overflow: hidden; }
.slot.filled { border: 0; background: transparent; }
.vig { position: absolute; inset: 0; border-radius: 9px; padding: 6px; display: flex; flex-direction: column; justify-content: space-between; text-align: left; color: #F6F5F1; }
.vig.sel { outline: 2px solid var(--accent); outline-offset: -2px; } .vig.pub { opacity: .48; }
.ig-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.ig-tile { aspect-ratio: 3 / 4; padding: 8px; display: flex; flex-direction: column; justify-content: space-between; color: #F6F5F1; }
.ig-tile strong { font-family: var(--font-display); font-weight: 400; font-size: 14px; line-height: 1.12; }

.hq-stage-shell { position: relative; height: 520px; min-height: 440px; border-radius: 15px; overflow: hidden; border: 1px solid var(--border-strong); background: linear-gradient(180deg, #b89ce8 0%, #cfb6f0 48%, #f0c9dd 86%, #f4d6df 100%); box-shadow: var(--shadow-md); }
.hq-stage-shell canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#hqStage { cursor: grab; image-rendering: pixelated; } #hqStage.grabbing { cursor: grabbing; } #hqStage.hovering { cursor: pointer; }
#hqOverlay { pointer-events: none; }
.hq-hud { position: absolute; top: 12px; left: 12px; right: 12px; z-index: 6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; pointer-events: none; }
.hq-bar-pill { pointer-events: auto; display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 10px; background: rgba(255, 255, 255, .94); color: #141519; border: 1px solid rgba(20, 21, 25, .12); box-shadow: 0 8px 24px rgba(20, 21, 25, .14); font-size: 12px; }
.hq-bar-pill button { padding: 4px 8px; border-radius: 7px; font-size: 11.5px; color: #575A66; }
.hq-bar-pill button.active { background: #141519; color: #FFF; font-weight: 600; }
.hq-drawer { position: absolute; top: 52px; right: 12px; bottom: 64px; width: 274px; z-index: 8; border-radius: 13px; padding: 13px; overflow-y: auto; background: rgba(255, 255, 255, .97); color: #141519; border: 1px solid rgba(20, 21, 25, .14); box-shadow: 0 18px 42px rgba(20, 21, 25, .20); display: none; flex-direction: column; gap: 9px; }
.hq-drawer.open { display: flex; }
.hq-cmd { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 7; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px; background: rgba(255, 255, 255, .96); color: #141519; border: 1px solid rgba(20, 21, 25, .14); box-shadow: 0 14px 36px rgba(20, 21, 25, .18); }
.hq-cmd select { height: 32px; padding: 0 10px; border-radius: 8px; background: #F0EFEA; border: 1px solid rgba(20, 21, 25, .1); color: #141519; font-size: 12px; }
.hq-cmd input { flex: 1; min-width: 180px; height: 32px; border: 0; background: transparent; outline: none; font-size: 13px; color: #141519; }
.hq-stage-shell.cinema .hq-hud, .hq-stage-shell.cinema .hq-cmd, .hq-stage-shell.cinema .hq-drawer { opacity: 0; pointer-events: none; }
.hq-exit-cinema { position: absolute; top: 12px; right: 12px; z-index: 12; display: none; padding: 6px 12px; border-radius: 9px; background: #141519; color: #fff; font-size: 12px; }
.hq-stage-shell.cinema .hq-exit-cinema { display: inline-flex; }

.fullchat-wrap { flex: 1; min-height: 0; max-width: 820px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.fullchat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.fullchat-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px; }
.msg { padding: 11px 14px; border-radius: 13px; font-size: 13.5px; line-height: 1.5; max-width: 82%; }
.msg.ai { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; box-shadow: var(--shadow-sm); }
.msg.me { background: var(--ink); color: var(--surface); align-self: flex-end; }
.fullchat-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-chip { height: 28px; padding: 0 11px; border-radius: 999px; font-size: 12px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--border); }
.fullchat-composer { display: flex; align-items: center; gap: 8px; padding: 6px 7px 6px 14px; border-radius: 13px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); }
.fullchat-composer input { flex: 1; border: 0; background: transparent; outline: none; font-size: 13.5px; }

.iphone-stage { display: none; align-items: center; justify-content: center; width: 100%; height: 100%; }
body.mode-iphone .iphone-stage { display: flex; }
.iphone { width: 390px; height: min(844px, 100%); border-radius: 46px; overflow: hidden; background: var(--bg); border: 2px solid var(--border-strong); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; position: relative; }
.island { min-width: 148px; height: 30px; padding: 0 14px; border-radius: 999px; background: #111216; color: #F6F5F1; margin: 10px auto 6px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-family: var(--font-mono); font-size: 9.5px; }
.island-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.iphone-body { flex: 1; overflow-y: auto; padding: 8px 16px 96px; display: flex; flex-direction: column; gap: 12px; }
.iphone-body::-webkit-scrollbar { display: none; }
.iphone-dock { position: absolute; left: 16px; right: 16px; bottom: 16px; padding: 6px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-md); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
.iphone-dock button { height: 42px; border-radius: 12px; font-size: 13px; font-weight: 500; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; }
.iphone-dock button.active { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.iphone-dock .orb-mid { width: 46px; height: 46px; border-radius: 50%; background: var(--ink); color: var(--surface); }

.backdrop { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(20, 21, 25, .42); backdrop-filter: blur(6px); padding: 20px; }
.backdrop.open { display: grid; }
.modal-shell { width: min(600px, 100%); max-height: 88vh; overflow-y: auto; padding: 8px; border-radius: 20px; background: var(--surface-2); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
.modal-inner { border-radius: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); }
.cmdk-row { width: 100%; height: 38px; padding: 0 11px; border-radius: 8px; display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--ink); text-align: left; }
.cmdk-row.active, .cmdk-row:hover { background: var(--surface-2); }
.space-pick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.space-pick-item { padding: 10px 12px; border-radius: 11px; text-align: left; background: var(--surface-2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.space-pick-item.on { background: var(--surface); border-color: var(--accent-border); }

.prompter { position: fixed; inset: 0; z-index: 110; display: none; flex-direction: column; background: #0D0E12; color: #F6F5F1; }
.prompter.open { display: flex; }
.prompter-text { flex: 1; overflow-y: auto; padding: 18vh min(14vw, 180px) 40vh; font-family: var(--font-display); font-size: 40px; line-height: 1.38; }
.prompter-text.mirror { transform: scaleX(-1); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translate(-50%, 14px); z-index: 130; padding: 10px 16px; border-radius: 11px; background: var(--ink); color: var(--surface); font-size: 13px; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Monter · repris des maquettes Claude du 24–25/11 : plans, frise graduée, Nakari propose */
.plan-list { width: 196px; max-height: 410px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.plan-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 10px; border: 1px solid transparent; text-align: left; }
.plan-row:hover { background: var(--surface-2); }
.plan-row.active { background: var(--accent-bg); border-color: var(--accent-border); }
.plan-row strong { display: block; font-size: 12.5px; }
.plan-row small { display: block; font-size: 11px; color: var(--ink-3); }
.plan-row .mono { font-size: 10.5px; }
.plan-thumb { width: 34px; height: 42px; border-radius: 6px; }
.plan-row.active .plan-thumb { box-shadow: 0 0 0 1.5px var(--accent); }
.propose { width: 248px; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.propose-head { display: flex; justify-content: space-between; padding: 0 2px 4px; }
.propose-row { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 2px; text-align: left; font-size: 12px; line-height: 1.25; }
.propose-row .mono { font-size: 10px; }
.nle-ruler-row { min-height: 16px; }
.nle-ruler { position: relative; height: 16px; }
.nle-ruler span { position: absolute; top: 0; transform: translateX(-50%); font-family: 'DM Mono', monospace; font-size: 9.5px; color: var(--ink-3); }
.nle-ruler span:first-child { transform: none; }
.nle-ruler span:last-child { transform: translateX(-100%); }
.mont-icon-btn { width: 28px; padding: 0; justify-content: center; font-size: 14px; }
.mont-icon-btn:disabled { opacity: .35; cursor: default; }
@media (max-width: 560px) { .nle-ruler span:not(:nth-child(4n+1)) { display: none; } }
.seg-row { display: flex; flex-wrap: wrap; gap: 8px; }
.script-word.selected.strong { color: #141519; } /* le mot fort sélectionné restait invisible (ambre sur ambre) */
/* Préparer et Nouveau projet · repris des maquettes Claude du 24–25/11 */
.bloc-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.bloc-chip { padding: 3px 8px; border-radius: 6px; background: var(--accent-bg); color: var(--accent); font-size: 11.5px; }
.bloc-rewrite { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2); padding: 4px 6px; border-radius: 6px; }
.bloc-rewrite:hover { background: var(--surface); color: var(--ink); }
.new-pub { display: flex; flex-direction: column; gap: 7px; }
.new-pub > .mono { margin-top: 4px; }
.new-pub input { height: 38px; padding: 0 11px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--border); }
.new-pub .cue096-seg { align-self: flex-start; }
/* Accueil · phrase du jour et prochain rendez-vous (maquette Claude du 24/11) */
.day-brief { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 4px 2px 2px; }
.day-brief p { margin: 0; font-size: 22px; line-height: 1.25; max-width: 640px; }
.day-urgent { display: grid; grid-template-columns: auto auto; column-gap: 12px; align-items: baseline; padding: 10px 14px; border-radius: 12px; background: var(--accent-bg); border: 1px solid var(--accent-border); text-align: left; }
.day-urgent .mono { grid-row: span 2; color: var(--accent); font-size: 12px; }
.day-urgent strong { font-size: 13.5px; }
.day-urgent span:last-child { font-size: 11.5px; color: var(--ink-2); }
@media (max-width: 560px) { .day-brief p { font-size: 18px; } }
.compact-bar, .day-brief { flex-shrink: 0; } /* sur écran étroit, la barre était écrasée à 42 px et ses boutons débordaient sur le contenu */
.nle-tracks { position: relative; display: flex; flex-direction: column; gap: 7px; }
.nle-tracks .nle-playhead-line { top: 0; bottom: 0; }
.word-group { font: inherit; color: inherit; text-align: left; }
@media (max-width: 1180px) { .plan-list { width: 100%; flex-direction: row; max-height: none; overflow-x: auto; } .plan-row { flex: none; width: 172px; } }
@media (max-width: 1180px) { .nle-left-col { min-width: 0; justify-self: stretch; } }

.studio-defile { min-width: 0; overflow-x: auto; }
.studio-defile .nle-tracks { touch-action: pan-y; user-select: none; cursor: crosshair; }
.studio-outils, .studio-rush { display: flex; align-items: center; gap: 4px; }
.studio-outils strong { flex: 1; font-size: 12px; }
.studio-rush { height: 18px; gap: 1px; }
.studio-rush span { position: relative; height: 100%; background: var(--surface-2); overflow: hidden; }
.studio-rush i { position: absolute; height: 100%; }
#montApercu:fullscreen { background: black; width: 100%; height: 100%; border: 0; border-radius: 0; }
#montApercu:fullscreen video { object-fit: contain; }
.studio-import { margin: auto; padding: 20px; color: var(--ink); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.studio-import::backdrop { background: rgba(0,0,0,.35); }
.studio-import ol { display: grid; gap: 10px; list-style: none; margin: 0; padding: 0; }
.studio-import li::before { content: '○'; display: inline-block; width: 1.5em; }
.studio-import .faite::before { content: '✓'; color: var(--signal); }
.studio-import .active::before { color: var(--accent); animation: studio-attente 1s ease-in-out infinite alternate; }
@keyframes studio-attente { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .studio-import .active::before { animation: none; } }
body.studio-agrandi #montApercu { position: fixed; inset: 0; z-index: 1000; width: auto; height: auto; max-width: none; aspect-ratio: auto; border-radius: 0; background: black; }
body.studio-agrandi #montApercu video { object-fit: contain; }
.studio-fermer { position: fixed; top: max(14px, env(safe-area-inset-top)); right: 16px; z-index: 1001; }

.studio-defile .nle-lane:has(.studio-plan) { gap: 0; padding: 0; }
.studio-plan { position: relative; padding: 0 5px; gap: 4px; min-width: 0; background: var(--surface); }
.studio-plan[aria-pressed=true] { outline: 2px solid var(--accent); outline-offset: -2px; }
.studio-plan img { height: 100%; max-width: 48px; object-fit: cover; }
.studio-plan [data-bord] { position: absolute; top: 0; bottom: 0; width: min(7px,25%); cursor: ew-resize; background: var(--border-strong); touch-action: none; }
.studio-plan [data-bord=debut] { left: 0; }
.studio-plan [data-bord=fin] { right: 0; }
.studio-rush button { position: absolute; top: 0; bottom: 0; padding: 0; border: 0; border-radius: 0; background: var(--danger); }
.studio-onde { width: 100%; height: 24px; color: var(--accent); }
.studio-outils { flex-wrap: wrap; }
