/* espace/assets/espace.css — Espace client Line'up : charte bleu nuit, sable et or rose, mode clair par défaut et mode foncé (html[data-theme="dark"]). Mobile d'abord. */
:root {
  /* Fonds, surfaces, textes — mode clair */
  --bg: #FAFAFA;
  --bg-top: #1E293B;
  --surface: #F5EBE0;
  --surface-2: #FFFFFF;
  --surface-3: #EFE2D3;
  --card: #FFFFFF;
  --card-2: #F8F3EC;
  --card-line: #E7DCCF;
  --line: #E2E8F0;
  --line-2: #D9CDBF;
  --dot-line: #94A3B8;
  --text: #0F172A;
  --text-2: #334155;
  --muted: #64748B;
  --faint: #7B8798;
  --input-bg: #FFFFFF;
  /* Accent or rose (actions) */
  --gold: #E0A96D;
  --gold-hover: #C89358;
  --gold-active: #B07C43;
  --gold-off: #E2D2C1;
  --gold-ink: #0F172A;
  --gold-line: #E6C9A5;
  --gold-tint: rgba(224, 169, 109, .14);
  --link: #9A6A35;
  --gold-text: #9A6A35;
  /* États système */
  --ok: #047857;     --ok-bg: #E7F8F1;   --ok-line: #A7E3CB;   --ok-strong: #10B981;
  --warn: #B45309;   --warn-bg: #FEF3E2; --warn-line: #F8CF8A; --live: #F59E0B; --warn-tint: rgba(245, 158, 11, .10);
  --info: #1D4ED8;   --info-bg: #EAF2FE; --info-line: #BFD5FB; --info-tint: rgba(59, 130, 246, .05);
  --bad: #B91C1C;    --bad-bg: #FDECEC;  --bad-line: #F5B5B5;  --bad-strong: #EF4444;
  --danger: #DC2626; --danger-hover: #B91C1C; --on-strong: #FFFFFF;
  /* Profils (DJ = surprises et équipe) */
  --purple: #6C5CE7; --purple-hover: #5A4BD1; --purple-text: #5B4BD6; --purple-bg: #F0EEFE;
  --dj: #6C5CE7; --dj-bg: #F0EEFE; --planner: #84A59D; --planner-bg: #F0F5F4; --maries: #E89980; --maries-bg: #FDF3F0;
  --client: #3B82F6;
  /* Divers */
  --chat-mine: #F8E6D0; --chat-mine-text: #0F172A;
  --tip-bg: #1E293B; --tip-text: #F8FAFC;
  --shadow-c: rgba(15, 23, 42, .18);
  --backdrop: rgba(15, 23, 42, .45);
  --radius: 14px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: Outfit, "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}

/* Mode foncé (bleu nuit) — et barre du haut / pied de page dans les deux modes */
html[data-theme="dark"], .esp-top {
  --bg: #0B1120;
  --bg-top: #1E293B;
  --surface: #131C2E;
  --surface-2: #1B2638;
  --surface-3: #233049;
  --card: #172133;
  --card-2: #1F2B40;
  --card-line: #2A3850;
  --line: #243149;
  --line-2: #314058;
  --dot-line: #64748B;
  --text: #F1F5F9;
  --text-2: #CBD5E1;
  --muted: #94A3B8;
  --faint: #7C8BA1;
  --input-bg: rgba(2, 6, 23, .25);
  --gold: #E0A96D;
  --gold-hover: #EBBC86;
  --gold-active: #C89358;
  --gold-off: #5A4A3A;
  --gold-ink: #0F172A;
  --gold-line: #6B5235;
  --gold-tint: rgba(224, 169, 109, .10);
  --link: #E0A96D;
  --gold-text: #E0A96D;
  --ok: #34D399;     --ok-bg: #0F2E26;   --ok-line: #1F5C48;   --ok-strong: #10B981;
  --warn: #FBBF24;   --warn-bg: #33270F; --warn-line: #6B4E16; --live: #F59E0B; --warn-tint: rgba(245, 158, 11, .08);
  --info: #93C5FD;   --info-bg: #172A46; --info-line: #2A4A7A; --info-tint: rgba(59, 130, 246, .06);
  --bad: #F87171;    --bad-bg: #3A1A1F;  --bad-line: #6E2C33;  --bad-strong: #EF4444;
  --purple: #8B7CF0; --purple-hover: #9D90F4; --purple-text: #C9C1FF; --purple-bg: #2A2550;
  --dj-bg: #2A2550; --planner-bg: #1F3330; --maries-bg: #3A2620;
  --client: #60A5FA;
  --chat-mine: #4A3A27; --chat-mine-text: #FBEBD5;
  --tip-bg: #F1F5F9; --tip-text: #0F172A;
  --shadow-c: rgba(0, 0, 0, .5);
  --backdrop: rgba(2, 6, 23, .72);
  color-scheme: dark;
}

/* Noms historiques de l'espace client */
:root, html[data-theme="dark"], .esp-top { --top: var(--bg-top); --gold-2: var(--gold-hover); --gold-soft: var(--gold-tint); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--gold-text); }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); } .small { font-size: 13px; } .strong { font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface-2); color: var(--text); font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--gold); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.btn-primary:hover { background: var(--gold-2); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-text); cursor: pointer; font-weight: 600; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.field input, .field select, .field textarea, .inp {
  height: 46px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font-size: 16px; width: 100%; }
.field input:focus, .inp:focus, textarea:focus { border-color: var(--gold); outline: none; }
.msg { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin: 0; }
.msg-error { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }
.msg-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }

/* Pages de connexion */
.esp-auth { min-height: 100vh; min-height: 100dvh; background: radial-gradient(ellipse at top, var(--gold-tint) 0%, var(--bg) 60%); }
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 48px 20px calc(30px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 22px; }
.auth-brand { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.brand { font-family: var(--display); font-size: 26px; color: var(--gold-text); letter-spacing: 3px; text-transform: uppercase; }
.brand-sub { font-size: 12px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted); }
.auth-card { background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius); padding: 26px 22px; display: flex; flex-direction: column; gap: 14px; }
.auth-card h1 { font-family: var(--display); font-weight: 600; font-size: 24px; margin: 0; }
.auth-card p { margin: 0; }
.auth-link { text-align: center; font-size: 14px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--faint); }
.pwd-wrap { position: relative; display: block; }
.pwd-wrap input { padding-right: 50px; }
.pwd-eye { position: absolute; right: 4px; top: 4px; width: 40px; height: 38px; border: 0; background: none; cursor: pointer; font-size: 18px; opacity: .7; }

/* Application */
.esp-top { position: sticky; top: 0; z-index: 20; background: var(--top); border-bottom: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top)) 16px 0; }
.esp-top-row { display: flex; align-items: center; gap: 10px; max-width: 1100px; margin: 0 auto; }
.esp-top .brand { font-size: 17px; letter-spacing: 2px; }
.esp-grow { flex-grow: 1; }
.esp-event { max-width: 1100px; margin: 8px auto 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.esp-event h1 { font-family: var(--display); font-weight: 600; font-size: 20px; margin: 0; }
.esp-event select { height: 34px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 0 8px; }
.countdown { font-size: 13px; font-weight: 700; color: var(--gold-text); background: var(--gold-soft); border: 1px solid var(--gold-line); padding: 2px 10px; border-radius: 999px; }
.acc-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); cursor: pointer; font-weight: 700; color: var(--gold-text); }
.acc-menu { position: absolute; right: 16px; top: 58px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; min-width: 210px; box-shadow: 0 16px 40px var(--shadow-c); z-index: 30; }
.acc-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); text-decoration: none; }
.acc-menu a:hover { background: var(--surface-3); }
.acc-menu .muted { padding: 8px 12px; display: block; font-size: 12px; }
.tabs { display: flex; gap: 4px; max-width: 1100px; margin: 10px auto 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; flex-shrink: 0; height: 44px; padding: 0 14px; border: 0; background: none; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; }
.tab[aria-selected="true"] { color: var(--text); border-bottom-color: var(--gold); }
.tab .badge { position: absolute; top: 6px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad-strong); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.esp-main { max-width: 1100px; margin: 0 auto; padding: 18px 16px calc(110px + env(safe-area-inset-bottom)); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.panel h2 { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 0 0 4px; }
.panel h3 { font-size: 15px; margin: 0; }
.panel-intro { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.grid-2 { display: grid; gap: 14px; }
@media (min-width: 820px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* Accueil */
.hello { font-family: var(--display); font-size: 24px; font-weight: 600; margin: 0 0 6px; }
.hello-sub { color: var(--text-2); margin: 0 0 16px; }
.big-count { display: flex; align-items: center; gap: 16px; }
.big-count .n { font-family: var(--display); font-size: 44px; color: var(--gold-text); line-height: 1; }
.todo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-list li { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface-2); border-radius: 10px; }
.todo-list .c { min-width: 30px; height: 30px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-weight: 700; background: var(--bad-bg); color: var(--bad); }
.todo-list li.done .c { background: var(--ok-bg); color: var(--ok); }
.todo-list .t { flex-grow: 1; display: flex; flex-direction: column; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0; font-size: 14px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; }
.rich p { margin: 0 0 8px; } .rich ul, .rich ol { margin: 0 0 8px; padding-left: 22px; }

/* Cases de validation */
.valid { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--muted); user-select: none; flex-shrink: 0; }
.valid input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.valid .box { width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--dot-line); display: flex; align-items: center; justify-content: center; color: transparent; font-weight: 800; transition: .15s; }
.valid:hover .box { border-color: var(--ok); }
.valid.is-ok { color: var(--ok); }
.valid.is-ok .box { background: var(--ok); border-color: var(--ok); color: var(--on-strong); }
.valid input:focus-visible + .box { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Planning */
.tl { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 12px; }
.tl li { position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.tl li::before { content: ''; position: absolute; left: -27px; top: 18px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--line-2); }
.tl li.is-ok { border-color: var(--ok-line); }
.tl li.is-ok::before { background: var(--ok); border-color: var(--ok); }
.tl-head { display: flex; align-items: flex-start; gap: 12px; }
.tl-time { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gold-text); min-width: 46px; }
.tl-body { flex-grow: 1; min-width: 0; }
.tl-title { font-weight: 600; }
.tl-desc { color: var(--text-2); font-size: 14px; }
.tl-music { font-size: 13px; color: var(--gold-text); margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }

/* Musique */
.moment { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.moment-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.moment-head .when { font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; }
.moment-head h3 { color: var(--gold-text); font-size: 16px; }
.songs { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.songs li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--surface); border-radius: 9px; }
.songs .s-text { flex-grow: 1; min-width: 0; font-size: 14px; }
.songs .s-text .by { color: var(--muted); }
.tag-me { font-size: 10px; font-weight: 700; color: var(--info); border: 1px solid var(--info-line); padding: 0 6px; border-radius: 999px; margin-left: 6px; }
.add-song { display: grid; grid-template-columns: 1fr; gap: 8px; }
.add-song .inp { height: 42px; font-size: 15px; }
@media (min-width: 700px) { .add-song { grid-template-columns: 1.3fr 1fr 1.3fr auto; } }
.list-white { border-color: var(--ok-line); background: var(--ok-bg); }
.list-white h3 { color: var(--ok); }
.list-black { border-color: var(--bad-line); background: var(--bad-bg); }
.list-black h3 { color: var(--bad); }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); }
.icon-btn:hover { border-color: var(--gold); color: var(--gold-text); }
.play { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--bad-bg); color: var(--bad-strong); cursor: pointer; font-size: 11px; flex-shrink: 0; }
.play.is-playing { background: var(--bad-strong); color: #fff; }

/* Fichiers */
.drop { border: 2px dashed var(--line-2); border-radius: 12px; padding: 22px; text-align: center; cursor: pointer; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.drop:hover, .drop.is-drag { border-color: var(--gold); background: var(--gold-tint); }
.drop strong { color: var(--text); }
.up-row { display: grid; grid-template-columns: minmax(0, 1fr) 90px 50px; gap: 10px; align-items: center; font-size: 13px; margin-top: 8px; }
.up-row .bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.up-row .bar div { height: 6px; width: 0; background: var(--gold); transition: width .2s; }
.up-row.is-error { color: var(--bad); }
.files { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.files li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--surface-2); border-radius: 10px; }
.files .f-name { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: none; border: 0; text-align: left; cursor: pointer; padding: 0; color: var(--text); font-weight: 500; }
.files .f-meta { font-size: 12px; color: var(--muted); white-space: nowrap; }

/* Messages */
.chat { display: flex; flex-direction: column; height: calc(100vh - 290px); height: calc(100dvh - 290px); min-height: 360px; }
.chat-list { flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 10px; }
.bubble-row { display: flex; flex-direction: column; max-width: 84%; }
.bubble-row.me { align-self: flex-end; align-items: flex-end; }
.bubble-row.them { align-self: flex-start; align-items: flex-start; }
.bubble { padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.me .bubble { background: var(--chat-mine); color: var(--chat-mine-text); border-bottom-right-radius: 4px; }
.them .bubble { background: var(--surface-3); border-bottom-left-radius: 4px; }
.bubble-meta { font-size: 11px; color: var(--faint); margin-top: 3px; display: flex; gap: 5px; align-items: center; }
.ticks { letter-spacing: -3px; font-weight: 700; color: var(--faint); }
.ticks.read { color: #53BDEB; }
.b-file { display: block; margin-top: 6px; background: var(--input-bg); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; font-size: 13px; color: inherit; cursor: pointer; text-align: left; }
.chat-form { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.chat-form textarea { flex-grow: 1; min-height: 46px; max-height: 140px; resize: none; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); font-size: 16px; }

/* Contrat */
.contrat-row { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface-2); border-radius: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.st { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.st-ok { background: var(--ok-bg); color: var(--ok); } .st-sent { background: var(--warn-bg); color: var(--warn); }

/* Lecteur et aperçu */
.player { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; width: min(380px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid #5A2A2A; border-radius: 14px; padding: 10px; box-shadow: 0 18px 50px rgba(0,0,0,.6); }
.player-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.player-head strong { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.player iframe, .player video { display: block; width: 100%; border: 0; border-radius: 10px; background: #000; }
.player .yt { aspect-ratio: 16 / 9; }
.player .sp { height: 152px; } .player .dz { height: 150px; }
.player audio { width: 100%; }
dialog.preview { width: min(96vw, 1000px); max-height: 92vh; padding: 0; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--text); }
dialog.preview::backdrop { background: var(--backdrop); }
.preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.preview-head strong { flex-grow: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-body { display: flex; justify-content: center; background: #000; }
.preview-body img { max-width: 100%; max-height: 78vh; object-fit: contain; }
.preview-body iframe { width: 100%; height: 78vh; border: 0; background: #fff; }
.toast-zone { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 50; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 460px); }
.toast { padding: 12px 16px; border-radius: 12px; font-size: 14px; box-shadow: 0 10px 30px var(--shadow-c); }
.toast.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid var(--ok-line); }
.toast.err { background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); }
.empty { text-align: center; color: var(--muted); padding: 24px 10px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ─── Disposition en 3 colonnes (ordinateur), comme le CRM ─────────────── */
.tabs-center { display: none; margin: 0 0 14px; border-bottom: 1px solid var(--line); }
.panel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.panel-row h2 { margin: 0; }
.panel-todo { border-color: var(--bad-line); }
.pill-todo { min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--bad-bg); color: var(--bad); border: 1px solid var(--bad-line); font-weight: 700; display: flex; align-items: center; justify-content: center; }
.flash { animation: esp-flash 1.6s ease-out; }
@keyframes esp-flash { 0% { box-shadow: 0 0 0 3px var(--gold); } 100% { box-shadow: 0 0 0 3px transparent; } }
@media (min-width: 1100px) {
  .tabs-mobile { display: none; }
  .tabs-center { display: flex; }
  .esp-top { padding-bottom: 12px; }
  .esp-top-row, .esp-event { max-width: none; }
  .esp-main { max-width: none; padding: 18px 20px 20px; }
  .esp-grid { display: grid; grid-template-columns: 380px minmax(0, 1fr) 380px; gap: 18px; align-items: start; }
  .col { position: sticky; top: calc(var(--top-h, 100px) + 18px); max-height: calc(100vh - var(--top-h, 100px) - 36px); overflow-y: auto; scrollbar-width: thin; }
  .col-center { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px 4px; }
  .col-center .panel { background: transparent; border: 0; border-radius: 0; padding: 12px 0; margin: 0; border-bottom: 1px solid var(--line); }
  .col-center .panel:last-child { border-bottom: 0; }
  .col-center .moment.panel, .col-center .list-white, .col-center .list-black { border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
  .col-center .list-white { border-color: var(--ok-line); } .col-center .list-black { border-color: var(--bad-line); }
  .col-center .grid-2 { margin-top: 12px; }
  .col-right .chat { height: 470px; min-height: 0; }
  .player.player-inline { position: static; width: auto; box-shadow: none; margin: 0 0 14px; right: auto; bottom: auto; }
  .col-left .tl { padding-left: 16px; }
}
.tl-music-mom { font-weight: 700; margin-bottom: 2px; }
.tl-song { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0 2px 12px; color: var(--text-2); }
.tl-song .play { width: 26px; height: 26px; font-size: 10px; }

/* ─── Contrat non signé : espace flouté, signature ─────────────────────── */
.lock-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 16px;
  background: var(--warn-bg); border: 1px solid var(--gold-line); border-radius: 12px; color: var(--gold-text); font-weight: 600; font-size: 14px; }
.lock-banner[hidden] { display: none; }
body.is-locked .col-left, body.is-locked #p-evenement, body.is-locked #p-avalider, body.is-locked #p-messages,
body.is-locked .tabs-center .tab:not([data-ctab="contrat"]), body.is-locked .tabs-mobile .tab:not([data-tab="contrat"]) {
  filter: blur(5px) grayscale(.4); opacity: .55; pointer-events: none; user-select: none;
}
body.is-locked .player { display: none; }
.sign-panel { border-color: var(--gold-line); }
.sign-doc { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; }
.sign-doc iframe { display: block; width: 100%; height: 60vh; min-height: 380px; border: 0; }
.sign-block { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sign-check { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; font-weight: 600; cursor: pointer; }
.sign-check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--gold); flex-shrink: 0; }
.sign-pad { display: block; width: 100%; max-width: 600px; aspect-ratio: 3 / 1; height: auto; background: #fff; border-radius: 10px; border: 2px dashed #B9B2A2; touch-action: none; cursor: crosshair; }
.sign-clear { align-self: flex-start; font-size: 13px; margin-top: 4px; }
.sign-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.sign-steps li.ok { color: var(--ok); font-weight: 600; }
.sign-btn { height: 52px; font-size: 16px; }
.sign-wait .hello-sub { margin-bottom: 14px; }
.sign-read { height: 56px; font-size: 16px; border-color: var(--gold); color: var(--gold-text); margin-bottom: 4px; }
.sign-ask { height: 50px; font-size: 15px; border-color: var(--gold); color: var(--gold-text); }
.sign-ask:disabled { border-color: var(--line-2); color: var(--muted); }
.sign-step2 { display: flex; flex-direction: column; gap: 12px; }
.sign-step2[hidden] { display: none; }
.sign-code { font-family: Consolas, 'IBM Plex Mono', monospace; font-size: 28px; letter-spacing: 12px; text-align: center; height: 60px; max-width: 280px; }
.sign-num { width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ─── Line'up by La Night Event ─────────────────────────────────────────── */
.brand-lu { display: inline-flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.lu-logo { font-family: var(--display); font-weight: 600; font-size: 21px; color: var(--gold-text); letter-spacing: .5px; }
.lu-by { font-family: 'Dancing Script', 'Brush Script MT', cursive; font-size: 20px; color: var(--text-2); }
.lu-lne { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); }
.brand-lu-xl .lu-logo { font-size: 38px; } .brand-lu-xl .lu-by { font-size: 30px; }
.auth-brand .lu-lne { font-size: 13px; letter-spacing: 3px; }
@media (max-width: 520px) { .esp-top .lu-lne { display: none; } }
.lock-banner.is-avenant { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }

/* En-tête : événement au centre, messages, contact connecté */
.top-event { font-family: var(--display); font-weight: 600; font-size: 18px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-top { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.chat-top:hover { color: var(--gold-text); border-color: var(--gold); }
.chat-top-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--bad-strong); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.chat-top-badge[hidden] { display: none; }
.me-name { font-size: 13px; color: var(--text-2); white-space: nowrap; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.esp-event h1 { display: none; }
@media (max-width: 760px) { .top-event { display: none; } .esp-event h1 { display: block; } .me-name { display: none; } }
.b-author { font-weight: 600; color: var(--text-2); }
.bubble-row.is-unread .bubble { box-shadow: 0 0 0 2px var(--bad-strong); }
.bubble-row.is-unread .bubble-meta::after { content: " · nouveau"; color: var(--bad-strong); font-weight: 700; }

/* Prestataire à gauche, signature Line'up à droite, pied de page légal */
.presta-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.presta-logo { height: 34px; width: auto; max-width: 110px; object-fit: contain; }
.presta-nom { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--gold-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.lu-sign { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap; padding-left: 12px; border-left: 1px solid var(--line-2); }
.lu-sign .lu-logo { font-size: 14px; } .lu-sign .lu-by { font-size: 14px; } .lu-sign .lu-lne { font-size: 9px; letter-spacing: 1px; }
@media (max-width: 900px) { .lu-sign .lu-lne, .lu-sign .lu-by { display: none; } }
@media (max-width: 520px) { .lu-sign { display: none; } .presta-nom { max-width: 140px; } }
.esp-legal { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); font-size: 12px; color: var(--faint); border-top: 1px solid var(--line); }
.esp-legal nav { display: flex; gap: 14px; flex-wrap: wrap; } .esp-legal a, .auth-foot a { color: var(--muted); }
.esp-legal .lu-logo, .esp-legal .lu-by { font-size: 12px; }

/* Plan de salle (lecture seule) */
.plan-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 8px; }
.plan-svg { display: block; width: 100%; height: auto; max-height: 70vh; }
.plan-svg text { font-family: 'IBM Plex Sans', Arial, sans-serif; pointer-events: none; }
.tab[hidden] { display: none; }

/* Plan de table */
.tb-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.tb-carte { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: var(--surface-2); display: flex; flex-direction: column; gap: 8px; }
.tb-carte.is-alerte { border-color: var(--gold); }
.tb-tete { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-num { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.tb-nom { flex-grow: 1; min-width: 140px; }
.tb-inv { width: 100%; resize: vertical; }
.tb-pied { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tb-etat { font-size: 12.5px; font-weight: 600; } .tb-etat.is-ok { color: var(--ok); } .tb-etat.is-wait { color: var(--muted); }
.tb-nom, .tb-inv { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }
.tb-nom { height: 38px; font-weight: 600; }
.tb-places { display: grid; grid-template-columns: 1fr; gap: 4px; }
.tb-places.is-2col { grid-template-columns: 1fr 1fr; }
.tb-place { display: flex; align-items: center; gap: 6px; }
.tb-place span { width: 18px; flex-shrink: 0; text-align: right; font-size: 11px; font-weight: 700; color: var(--muted); }
.tb-place input { flex-grow: 1; min-width: 0; height: 30px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; }

/* Placement des invités sur le plan */
.placement { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .placement { grid-template-columns: 1fr; } }
.chaise-clic { cursor: pointer; outline: none; }
.chaise-clic:hover, .chaise-clic:focus { fill: rgba(212, 175, 55, .25); }
.inv-cote { display: flex; flex-direction: column; gap: 10px; }
.inv-titre { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.inv-puces { display: flex; flex-wrap: wrap; gap: 6px; max-height: 50vh; overflow-y: auto; }
.inv-puce { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text); font: inherit; font-size: 13.5px; cursor: pointer; }
.inv-puce:hover { border-color: var(--gold); }
.inv-puce.is-sel { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 700; }
.inv-edit summary { cursor: pointer; font-size: 13.5px; color: var(--gold-text); margin-bottom: 6px; }
.inv-zone { width: 100%; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; resize: vertical; margin-bottom: 6px; }
.tb-histo { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 6px; }
.tb-histo summary { cursor: pointer; color: var(--text-2); font-weight: 600; }
.tb-histo-l { display: flex; flex-direction: column; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.tb-histo-q { font-weight: 600; color: var(--text-2); }

/* Plan modifiable : bandeau de validation et versions */
.plan-alerte, .plan-info { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; margin-bottom: 10px; font-size: 14px; }
.plan-alerte { border: 1px solid var(--gold); background: var(--warn-bg); } .plan-info { border: 1px solid var(--line-2); color: var(--muted); }
.plan-vers { margin-top: 12px; font-size: 13.5px; } .plan-vers summary { cursor: pointer; color: var(--gold-text); font-weight: 600; }
.pv-ligne { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.pv-ligne.is-ref strong { color: var(--gold-text); } .pv-ref { font-size: 12px; font-weight: 700; color: var(--gold-text); }

/* Vos animations : une petite carte par module (QR code + lien) */
.mod-grille { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mod-carte { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; }
.mod-tete { display: flex; align-items: center; gap: 8px; font-size: 15px; } .mod-ico { font-size: 20px; }
.mod-desc { margin: 0; min-height: 2.6em; }
.mod-qr { width: 148px; height: 148px; padding: 8px; background: #fff; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 11px; color: #555; }
.mod-qr img, .mod-qr canvas { width: 132px !important; height: 132px !important; }
.mod-lien { color: var(--gold-text); word-break: break-all; line-height: 1.3; }
.mod-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }

/* Matériel à apporter (jeux) */
.mc-tete { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.mc-liste { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mc-groupe { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--surface-2); }
.mc-groupe h3 { margin: 0 0 6px; font-size: 14.5px; color: var(--gold-text); }
.mc-groupe ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.mc-groupe li { display: flex; gap: 8px; } .mc-qte { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 28px; }

/* Espace de stockage de l'événement */
.jauge-sto { margin-bottom: 10px; } .jauge-sto .small { color: var(--muted); }
.jauge-barre { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.jauge-barre div { height: 100%; background: var(--gold); } .jauge-sto.is-haut .jauge-barre div { background: var(--live); }
.jauge-sto.is-plein .small { color: var(--bad); } .jauge-sto.is-plein .jauge-barre div { background: var(--bad-strong); }

/* ─── Identité Line'up : logo long dans la barre bleu nuit, bascule clair / foncé ─── */
.lu-marque { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.lu-marque.lu-sign { align-items: center; }
.lu-marque-img { height: 26px; width: auto; display: block; }
.lu-marque-sig { font-size: 10px; color: var(--muted); }
.lu-marque-sig .lu-by { font-size: 14px; margin-right: 2px; }
@media (max-width: 900px) { .lu-marque-sig { display: none; } }
.theme-btn { line-height: 0; }
.theme-btn svg { display: block; }
.auth-logo img { width: 64px; height: 64px; display: block; margin: 0 auto 6px; }
h1, h2, h3 { font-family: var(--display); }

.esp-top { --surface: #1E293B; --surface-2: #253247; --surface-3: #2D3B52; --line: #2D3B52; --line-2: #3B4A62; --card: #1A2436; color: var(--text); }
