/* ============================================================
   SpinOff — Régie du groupe
   Direction : « affiche de concert bretonne » — noir asphalte,
   blanc poster, rouge concert, grain de papier, Gwenn-ha-du.
   Oswald (display — condensée lisible, minuscules conservées) ·
   Barlow (interface) · Share Tech Mono (données musicales).
   ============================================================ */

/* ---------- Tokens ---------- */

:root {
  --noir: #0b0b0d;        /* asphalte — fond principal */
  --panneau: #141416;     /* cartes, panneaux */
  --panneau-2: #1a1a1d;   /* survol, éléments imbriqués */
  --ivoire: #f2efe8;      /* blanc poster — texte principal */
  --brume: #938e84;       /* texte secondaire */
  --or: #e02c2c;          /* rouge affiche — accent principal */
  --or-clair: #ff5a4d;    /* rouge vif — survols, valeurs */
  --braise: #e02c2c;      /* rouge — votes, alertes */
  --filet: rgba(242, 239, 232, 0.1);
  --filet-or: rgba(242, 239, 232, 0.22);
  --ombre: 0 18px 50px rgba(0, 0, 0, 0.6);

  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-ui: "Barlow", system-ui, "Segoe UI", sans-serif;
  --f-mono: "Share Tech Mono", ui-monospace, Consolas, monospace;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --sidebar-w: 236px;
}

/* ---------- Base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scrollbar-color: #2a2a2e var(--noir); }

body {
  font-family: var(--f-ui);
  font-weight: 400;
  background: var(--noir);
  color: var(--ivoire);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Grain de poster + lueur de scène rouge, presque imperceptibles */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% -20%, rgba(224, 44, 44, 0.09), transparent 55%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/><feColorMatrix type='saturate' values='0'/></filter><rect width='180' height='180' filter='url(%23n)' opacity='0.05'/></svg>");
  z-index: 0;
}

::selection { background: var(--or); color: #ffffff; }

a { color: var(--or-clair); text-decoration: none; }
a:hover { color: var(--ivoire); }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:focus-visible { outline: 2px solid var(--or); outline-offset: 2px; border-radius: 2px; }

svg { display: block; }
svg[aria-hidden] { flex: none; }
.nav-link svg, .ghost-btn svg, .btn svg {
  stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Shell ---------- */

#app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

#sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 26px 20px 20px;
  border-right: 1px solid var(--filet-or);
  /* DP-4 (parcours L7) : l'entrée « Le Local » a fait déborder la colonne
     sticky 100vh — le pied (Exporter / Importer / Déconnexion) passait
     sous la ligne de flottaison à 1440×900. La colonne défile en interne
     quand elle manque de hauteur. */
  overflow-y: auto;
  background: linear-gradient(180deg, rgba(22, 19, 13, 0.6), rgba(13, 11, 8, 0));
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ivoire); padding: 2px 4px 14px;
  border-bottom: 1px solid var(--filet);
}
.brand-stripe {
  width: 12px; height: 46px; border-radius: 3px; flex: none;
  background: repeating-linear-gradient(180deg, #f2efe8 0 7px, #0b0b0d 7px 14px);
  border: 1px solid rgba(242, 239, 232, 0.3);
}
.brand-block { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.brand-word {
  font-family: var(--f-display);
  font-size: 21px; font-weight: 400; letter-spacing: 0.02em;
  white-space: nowrap;
}
.brand-sub {
  font-family: var(--f-mono);
  font-size: 8.5px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--or); margin-top: 5px; white-space: nowrap;
}

#nav { display: flex; flex-direction: column; gap: 2px; }

.nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-s);
  color: var(--brume);
  font-weight: 400;
  font-size: 15px;
  letter-spacing: 0.02em;
  border-left: 1px solid transparent;
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--ivoire); background: rgba(239, 230, 212, 0.04); }
.nav-link[aria-current="page"] {
  color: var(--or-clair);
  background: linear-gradient(90deg, rgba(226, 44, 44, 0.12), rgba(226, 44, 44, 0.02));
  border-left-color: var(--or);
}
.nav-link svg { width: 19px; height: 19px; }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.sidebar-note { font-size: 11.5px; color: var(--brume); padding: 10px 6px 0; line-height: 1.5; }

.ghost-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--r-s);
  color: var(--brume); font-size: 13.5px; font-weight: 400;
  transition: color 0.18s ease, background 0.18s ease;
  text-align: left;
}
.ghost-btn:hover { color: var(--or-clair); background: rgba(239, 230, 212, 0.04); }
.ghost-btn svg { width: 16px; height: 16px; }

#main { flex: 1; min-width: 0; }

.view {
  max-width: 1160px;
  margin: 0 auto;
  padding: 44px 48px 90px;
}

/* ---------- Typographie ---------- */

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--or);
}

.page-head { margin-bottom: 34px; }
.page-head .eyebrow { display: block; margin-bottom: 10px; }
.page-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: 0.005em;
}
.page-title em { font-style: normal; color: var(--or-clair); }
.page-sub { color: var(--brume); margin-top: 10px; max-width: 60ch; font-size: 15.5px; }
.page-head-row {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}

.mono { font-family: var(--f-mono); }
.gold { color: var(--or-clair); }
.dim { color: var(--brume); }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 500; font-size: 14.5px; letter-spacing: 0.02em;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--or-clair), var(--or) 60%);
  color: #ffffff;
  box-shadow: 0 6px 22px rgba(226, 44, 44, 0.22);
}
.btn-primary:hover { filter: brightness(1.08); color: #ffffff; }

.btn-line { border: 1px solid var(--filet-or); color: var(--or-clair); }
.btn-line:hover { background: rgba(226, 44, 44, 0.1); color: var(--ivoire); }

.btn-quiet { color: var(--brume); padding: 8px 14px; }
.btn-quiet:hover { color: var(--ivoire); }

.btn-danger { color: #e08a6a; }
.btn-danger:hover { color: #f2b49a; background: rgba(224, 44, 44, 0.1); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  color: var(--brume);
  transition: color 0.15s ease, background 0.15s ease;
}
.icon-btn:hover { color: var(--ivoire); background: rgba(239, 230, 212, 0.07); }
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Cartes & grilles ---------- */

.grid { display: grid; gap: 18px; }
.grid-thirds { grid-template-columns: repeat(3, 1fr); }
.grid-half { grid-template-columns: repeat(2, 1fr); }

.card {
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.35));
  border: 1px solid var(--filet);
  border-radius: var(--r-l);
  padding: 22px 24px;
}

.stat-label {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brume);
}
.stat-value {
  font-family: var(--f-display); font-weight: 400;
  font-size: 40px; line-height: 1.1; margin-top: 6px;
}
.stat-value small { font-size: 18px; color: var(--brume); font-style: italic; }
.stat-hint { font-size: 13px; color: var(--brume); margin-top: 4px; }

/* ---------- Répertoire ---------- */

.rep-toolbar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 22px;
}
.search {
  flex: 1; min-width: 220px;
  display: flex; align-items: center; gap: 10px;
  background: var(--panneau);
  border: 1px solid var(--filet);
  border-radius: 999px;
  padding: 9px 18px;
}
.search:focus-within { border-color: var(--filet-or); }
.search svg { width: 16px; height: 16px; color: var(--brume); stroke: currentColor; fill: none; stroke-width: 1.5; }
.search input {
  flex: 1; background: none; border: none; color: var(--ivoire);
  font: inherit; font-size: 14.5px;
}
.search input:focus { outline: none; }
.search input::placeholder { color: var(--brume); }

.seg {
  display: inline-flex; border: 1px solid var(--filet); border-radius: 999px; overflow: hidden;
}
.seg button {
  padding: 8px 16px; font-size: 13.5px; color: var(--brume);
  transition: background 0.15s ease, color 0.15s ease;
}
.seg button + button { border-left: 1px solid var(--filet); }
.seg button[aria-pressed="true"] { color: #ffffff; background: var(--or); font-weight: 500; }
.seg button:not([aria-pressed="true"]):hover { color: var(--ivoire); }

.song-list { border-top: 1px solid var(--filet); }

.song-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.8fr) minmax(0, 1.2fr) 90px 76px 70px 108px;
  gap: 14px; align-items: center;
  padding: 13px 10px;
  border-bottom: 1px solid var(--filet);
  border-left: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.song-row:hover { background: rgba(239, 230, 212, 0.03); border-left-color: var(--or); }
.song-row.header {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
  border-left-color: transparent;
}
.song-row.header:hover { background: none; }

.song-num { font-family: var(--f-mono); font-size: 12.5px; color: var(--or); text-align: right; padding-right: 4px; }
.song-title { font-family: var(--f-display); font-size: 19px; font-weight: 400; line-height: 1.2; }
.song-artist { color: var(--brume); font-size: 13.5px; font-style: italic; font-family: var(--f-display); }
.song-key, .song-bpm, .song-dur { font-family: var(--f-mono); font-size: 13px; color: var(--or-clair); }
.song-dur, .song-bpm { color: var(--brume); }
.song-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.song-meta .song-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-meta .song-artist { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.song-actions { display: flex; gap: 2px; justify-content: flex-end; }

.level-dots { display: inline-flex; gap: 5px; align-items: center; }
.level-dot {
  width: 9px; height: 9px; border-radius: 50%;
  border: 1px solid var(--filet-or);
  background: transparent;
  transition: background 0.15s ease;
}
.level-dot.on { background: var(--or); border-color: var(--or); }
.level-empty { font-family: var(--f-mono); font-size: 11px; color: var(--brume); letter-spacing: 0.06em; }

/* ---------- Setlists ---------- */

.set-card {
  display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.35));
  border: 1px solid var(--filet);
  border-radius: var(--r-l);
  padding: 20px 22px;
  color: var(--ivoire);
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.set-card:hover { border-color: var(--filet-or); transform: translateY(-2px); box-shadow: var(--ombre); }
.set-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.set-card h3 { font-family: var(--f-display); font-weight: 400; font-size: 22px; line-height: 1.15; }
.set-card .date { font-family: var(--f-mono); font-size: 12px; color: var(--brume); white-space: nowrap; }
.set-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-card-foot .mono { font-size: 12.5px; color: var(--brume); }

/* ---------- La courbe du set (signature) ---------- */

.set-arc { position: relative; width: 100%; }
.set-arc svg { width: 100%; height: 64px; display: block; overflow: visible; }
.set-arc.mini svg { height: 30px; }
.arc-seg { fill: url(#arcGrad); }
.arc-vote { fill: var(--braise); }
.arc-gap { fill: rgba(239, 230, 212, 0.13); }
.arc-target { stroke: var(--ivoire); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: 0.8; }
.arc-label {
  font-family: var(--f-mono); font-size: 10.5px;
  fill: var(--brume); letter-spacing: 0.08em;
}

.arc-legend {
  display: flex; gap: 18px; margin-top: 10px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 11px; color: var(--brume); letter-spacing: 0.06em;
}
.arc-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.arc-legend .or i { background: var(--or); }
.arc-legend .braise i { background: var(--braise); }
.arc-legend .cible i { background: repeating-linear-gradient(90deg, var(--ivoire) 0 3px, transparent 3px 6px); }

/* ---------- Éditeur de setlist ---------- */

.set-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 18px; flex-wrap: wrap; margin-bottom: 26px;
}
.set-head-info { display: flex; gap: 26px; align-items: baseline; flex-wrap: wrap; margin-top: 12px; }
.set-head-info .field-inline label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume); display: block; margin-bottom: 4px;
}
.set-head-info input {
  background: none; border: none; border-bottom: 1px solid var(--filet-or);
  color: var(--ivoire); font: inherit; font-size: 15px; padding: 2px 0;
  font-family: var(--f-mono);
}
.set-head-info input:focus { outline: none; border-bottom-color: var(--or); }

.gauge { margin: 6px 0 26px; }
.gauge-bar {
  height: 5px; border-radius: 999px; background: rgba(239, 230, 212, 0.09);
  position: relative; overflow: visible;
}
.gauge-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--or), var(--or-clair));
  transition: width 0.4s ease;
}
.gauge-fill.over { background: linear-gradient(90deg, var(--braise), #ff6b5e); }
.gauge-target {
  position: absolute; top: -4px; bottom: -4px; width: 2px;
  background: var(--ivoire); border-radius: 1px;
}
.gauge-read {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: var(--f-mono); font-size: 12px; color: var(--brume);
}

.set-items { border-top: 1px solid var(--filet); }

.set-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 76px 92px 118px;
  gap: 14px; align-items: center;
  padding: 11px 10px;
  border-bottom: 1px solid var(--filet);
  border-left: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, opacity 0.2s ease;
}
.set-item:hover { background: rgba(239, 230, 212, 0.03); border-left-color: var(--or); }
.set-item.dragging { opacity: 0.35; }
.set-item.drop-before { box-shadow: inset 0 3px 0 var(--or); }
.set-item.current { background: rgba(226, 44, 44, 0.1); border-left-color: var(--or); }

.set-item-num { font-family: var(--f-mono); font-size: 12px; color: var(--or); text-align: right; }
.set-item-main { min-width: 0; }
.set-item-title { font-family: var(--f-display); font-size: 18.5px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-item-artist { color: var(--brume); font-size: 13px; font-style: italic; font-family: var(--f-display); }
.set-item-key { font-family: var(--f-mono); font-size: 12.5px; color: var(--or-clair); }
.set-item-dur { font-family: var(--f-mono); font-size: 12.5px; color: var(--brume); text-align: right; }
.set-item-actions { display: flex; gap: 2px; justify-content: flex-end; align-items: center; }

.drag-handle { cursor: grab; color: var(--brume); }
.drag-handle:active { cursor: grabbing; }

.set-item.vote-item {
  background: linear-gradient(90deg, rgba(224, 44, 44, 0.1), transparent 70%);
  border-left: 2px solid var(--braise);
}
.vote-badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.18em;
  text-transform: uppercase; color: #ff6b5e; margin-bottom: 3px;
}
.vote-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--braise); }
.vote-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 5px; }
.vote-chip {
  font-family: var(--f-mono); font-size: 12px; color: var(--ivoire);
  border: 1px solid rgba(224, 44, 44, 0.45); border-radius: 999px;
  padding: 3px 12px; background: rgba(224, 44, 44, 0.08);
}
.set-item .vote-kicker { color: var(--brume); font-size: 12.5px; }

/* ---------- Concerts ---------- */

.timeline { position: relative; padding-left: 26px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px;
  width: 1px; background: linear-gradient(180deg, var(--filet-or), var(--filet));
}
.tl-item { position: relative; padding: 0 0 26px; }
.tl-item::before {
  content: ""; position: absolute; left: -25px; top: 9px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--noir); border: 1.5px solid var(--or);
}
.tl-item.past::before { background: var(--brume); border-color: var(--brume); }
.tl-item.past .tl-title { color: var(--brume); }
.tl-date { font-family: var(--f-mono); font-size: 12px; color: var(--or); letter-spacing: 0.1em; }
.tl-title { font-family: var(--f-display); font-size: 22px; font-weight: 400; }
.tl-sub { color: var(--brume); font-size: 14px; }
.tl-actions { margin-top: 8px; display: flex; gap: 4px; }

/* ---------- Live ---------- */

/* Le lecteur de répète (phase 4, D-UI-09) réutilise la scène du live :
   mêmes classes et ids live-*, racine #repeter — jamais co-affichés. */
#live,
#repeter {
  position: fixed; inset: 0; z-index: 60;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(224, 44, 44, 0.1), transparent 55%),
    var(--noir);
  display: flex; flex-direction: column;
  padding: 34px clamp(24px, 6vw, 80px) 30px;
  overflow-y: auto;
}
body::before { z-index: 0; }

.live-top {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
}
.live-exit {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--brume); font-family: var(--f-mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 8px 14px; border: 1px solid var(--filet); border-radius: 999px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.live-exit:hover { color: var(--ivoire); border-color: var(--filet-or); }
.live-exit svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.live-stage { flex: 1; display: flex; flex-direction: column; justify-content: center; min-height: 0; padding: 24px 0; }

.live-now-label {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--braise); margin-bottom: 14px;
}
.live-title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(40px, 7.5vw, 96px);
  line-height: 1.02; letter-spacing: 0.005em;
  max-width: 18ch;
}
.live-artist {
  font-family: var(--f-display); font-style: italic;
  font-size: clamp(18px, 2.4vw, 30px); color: var(--brume); margin-top: 10px;
}
.live-meta {
  display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap;
  font-family: var(--f-mono);
}
.live-meta > div > span {
  display: block; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--brume); margin-bottom: 4px;
}
.live-meta > div > b { font-size: 22px; font-weight: 500; color: var(--or-clair); }

.live-vote {
  border: 1px solid rgba(224, 44, 44, 0.4); border-radius: var(--r-l);
  background: rgba(224, 44, 44, 0.06);
  padding: 26px 28px; max-width: 860px;
}
.live-vote .live-now-label { color: var(--or); }
.live-vote-grid { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }
.live-vote-choice {
  font-family: var(--f-display); font-size: clamp(20px, 3vw, 34px); font-weight: 400;
  border: 1px solid var(--filet-or); border-radius: var(--r-m);
  padding: 18px 26px; color: var(--ivoire);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.live-vote-choice:hover { border-color: var(--or); background: rgba(226, 44, 44, 0.12); transform: translateY(-2px); }
.live-vote-choice small { display: block; font-family: var(--f-mono); font-style: normal; font-size: 11.5px; color: var(--brume); margin-top: 4px; }

.live-bottom { display: flex; align-items: center; gap: 22px; justify-content: space-between; flex-wrap: wrap; }
.live-chrono { font-family: var(--f-mono); font-size: clamp(34px, 4.5vw, 52px); font-weight: 300; letter-spacing: 0.04em; }
.live-chrono.run { color: var(--or-clair); }
.live-nav { display: flex; gap: 10px; align-items: center; }
.live-hint { font-family: var(--f-mono); font-size: 11px; color: var(--brume); letter-spacing: 0.08em; }

.live-progress { display: flex; gap: 5px; margin-top: 26px; }
.live-progress i { flex: 1; height: 3px; border-radius: 2px; background: rgba(239, 230, 212, 0.14); }
.live-progress i.done { background: var(--or); }
.live-progress i.now { background: var(--or-clair); box-shadow: 0 0 8px rgba(242, 239, 232, 0.6); }
.live-progress i.vote { background: rgba(224, 44, 44, 0.55); }

/* ---------- Formulaires ---------- */

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
}
.field input, .field select, .field textarea {
  background: rgba(13, 11, 8, 0.5);
  border: 1px solid var(--filet);
  border-radius: var(--r-s);
  color: var(--ivoire); font: inherit; font-size: 15px;
  padding: 9px 12px;
  transition: border-color 0.15s ease;
  width: 100%;
}
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--or);
}
.field .hint { font-size: 12px; color: var(--brume); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row-3 { display: grid; grid-template-columns: 1.2fr 0.8fr 1fr; gap: 14px; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }

/* ---------- Drawer ---------- */

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(6, 5, 3, 0.6);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41;
  width: min(440px, 94vw);
  background: linear-gradient(200deg, var(--panneau-2), var(--panneau) 40%);
  border-left: 1px solid var(--filet-or);
  padding: 28px 28px 34px;
  overflow-y: auto;
  box-shadow: var(--ombre);
  animation: slideIn 0.24s cubic-bezier(.2,.8,.2,1);
}
.drawer h2 {
  font-family: var(--f-display); font-weight: 400; font-size: 26px; margin-bottom: 4px;
}
.drawer .drawer-sub { color: var(--brume); font-size: 13.5px; margin-bottom: 22px; }

.pick-list { display: flex; flex-direction: column; }
.pick-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px; border-bottom: 1px solid var(--filet);
  border-radius: var(--r-s);
  text-align: left; width: 100%;
  transition: background 0.13s ease;
}
.pick-row:hover { background: rgba(239, 230, 212, 0.04); }
.pick-row input[type="checkbox"] { accent-color: var(--or); width: 16px; height: 16px; }
.pick-row .t { font-family: var(--f-display); font-size: 16.5px; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-row .t small { font-style: italic; color: var(--brume); margin-left: 8px; font-size: 13px; }
.pick-row .k { font-family: var(--f-mono); font-size: 11.5px; color: var(--or-clair); white-space: nowrap; }

/* ---------- Modale & toasts ---------- */

.modal-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(6, 5, 3, 0.7); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.18s ease;
  padding: 20px;
}
.modal {
  background: var(--panneau-2);
  border: 1px solid var(--filet-or);
  border-radius: var(--r-l);
  padding: 28px 30px;
  max-width: 460px; width: 100%;
  box-shadow: var(--ombre);
  animation: popIn 0.18s cubic-bezier(.2,.8,.2,1);
}
.modal h3 { font-family: var(--f-display); font-weight: 400; font-size: 23px; margin-bottom: 10px; }
.modal p { color: var(--brume); font-size: 14.5px; margin-bottom: 22px; }

#toast-root {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 70;
  align-items: center; pointer-events: none;
}
.toast {
  background: #241f15;
  border: 1px solid var(--filet-or);
  color: var(--ivoire);
  border-radius: 999px;
  padding: 10px 22px;
  font-size: 14px;
  box-shadow: var(--ombre);
  animation: toastIn 0.22s cubic-bezier(.2,.8,.2,1);
}
.toast.err { border-color: rgba(224, 44, 44, 0.6); }

/* ---------- États vides ---------- */

.empty {
  border: 1px dashed var(--filet-or);
  border-radius: var(--r-l);
  padding: 44px 30px;
  text-align: center;
}
.empty .empty-title { font-family: var(--f-display); font-size: 24px; font-weight: 400; }
.empty p { color: var(--brume); font-size: 14.5px; max-width: 46ch; margin: 8px auto 20px; }

/* ---------- Animations ---------- */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popIn { from { transform: scale(0.97); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

.view-enter { animation: viewIn 0.3s ease both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .grid-thirds { grid-template-columns: 1fr 1fr; }
  .song-row { grid-template-columns: 34px minmax(0, 1.6fr) minmax(0, 1.1fr) 70px 62px 96px; }
  .song-row .song-dur { display: none; }
  .set-item { grid-template-columns: 28px minmax(0, 1fr) 62px 100px; }
  .set-item .set-item-dur { display: none; }
}

@media (max-width: 960px) {
  #app { flex-direction: column; }
  #sidebar {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto;
    height: auto; width: 100%;
    flex-direction: row; align-items: center;
    gap: 6px; padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-right: none; border-top: 1px solid var(--filet-or);
    background: rgba(13, 11, 8, 0.92);
    backdrop-filter: blur(10px);
    z-index: 30;
  }
  .brand { display: none; }
  #nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav-link { flex-direction: column; gap: 3px; font-size: 10.5px; padding: 6px 8px; letter-spacing: 0.04em; }
  .nav-link svg { width: 21px; height: 21px; }
  .sidebar-foot { margin: 0; flex-direction: row; }
  .ghost-btn span { display: none; }
  .sidebar-note { display: none; }
  .view { padding: 30px 20px 120px; }
  .grid-thirds, .grid-half { grid-template-columns: 1fr; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .song-row { grid-template-columns: 28px minmax(0, 1fr) 96px; }
  .song-row .song-key, .song-row .song-bpm, .song-row.header .song-key, .song-row.header .song-bpm { display: none; }
  .set-item { grid-template-columns: 24px minmax(0, 1fr) 92px; }
  .set-item .set-item-key { display: none; }
  .page-head-row { align-items: flex-start; flex-direction: column; }
}

/* ---------- V2 : badges, bannière, titres de section ---------- */

.mini-badge {
  display: inline-block;
  color: var(--or);
  font-size: 12px;
  margin-left: 4px;
}
.live-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--braise);
  border: 1px solid rgba(224, 44, 44, 0.5);
  border-radius: 999px; padding: 2px 10px;
  vertical-align: middle;
}
.live-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--braise); animation: pulse 1.6s ease infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.section-title {
  font-family: var(--f-display); font-weight: 400; font-size: 26px;
  margin: 6px 0 18px;
}

.banner {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: 26px; z-index: 45;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #241f15; border: 1px solid var(--filet-or);
  border-radius: var(--r-m); padding: 12px 18px;
  box-shadow: var(--ombre); font-size: 14px;
  max-width: min(720px, 92vw);
}

/* ---------- V2 : connexion & 404 ---------- */

.login-body {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    repeating-radial-gradient(circle at 50% -10%,
      rgba(226, 44, 44, 0.04) 0 1px, transparent 1px 9px),
    var(--noir);
}
.login-card {
  width: min(420px, 100%);
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.4));
  border: 1px solid var(--filet-or);
  border-radius: var(--r-l);
  padding: 38px 36px 34px;
  box-shadow: var(--ombre);
  text-align: center;
}
.login-disc { color: var(--or); margin: 0 auto 14px; }
.login-card h1 {
  font-family: var(--f-display); font-weight: 400; font-size: 34px;
}
.login-card h1 span { font-style: italic; color: var(--or); }
.login-sub { color: var(--brume); font-size: 14px; margin: 8px 0 24px; }
.login-card form { text-align: left; }
.login-error { color: #ff6b5e; font-size: 13.5px; min-height: 20px; margin: 2px 0 10px; }
.login-card .btn { width: 100%; justify-content: center; margin-top: 6px; }

/* ---------- V2 : répètes ---------- */

.rep-list { border-top: 1px solid var(--filet); max-width: 760px; }
.rep-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 70px;
  gap: 14px; align-items: center;
  padding: 12px 10px;
  border-bottom: 1px solid var(--filet);
  transition: opacity 0.2s ease, background 0.15s ease;
}
.rep-row:hover { background: rgba(239, 230, 212, 0.03); }
.rep-row.done .song-title { color: var(--brume); text-decoration: line-through; text-decoration-color: var(--or); }
.rep-row.done { opacity: 0.75; }
.rep-check {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--filet-or);
  display: inline-flex; align-items: center; justify-content: center;
  color: transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rep-check svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rep-check:hover { border-color: var(--or); color: rgba(226, 44, 44, 0.5); }
.rep-row.done .rep-check { background: var(--or); border-color: var(--or); color: #ffffff; }

/* ---------- V2 : stats de votes ---------- */

.vote-stat-card .set-card-top h3 { font-size: 20px; }
.vote-stat-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(60px, 160px) 40px;
  gap: 12px; align-items: center;
  padding: 7px 0;
}
.vote-stat-title {
  font-family: var(--f-display); font-size: 16px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vote-stat-title svg { display: inline-block; width: 14px; height: 14px; stroke: var(--or); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: -2px; margin-right: 5px; }
.vote-stat-row.winner .vote-stat-title { color: var(--or-clair); }
.vote-stat-bar {
  height: 6px; border-radius: 999px;
  background: rgba(239, 230, 212, 0.08);
  overflow: hidden;
}
.vote-stat-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--or), var(--or-clair));
}
.vote-stat-row.winner .vote-stat-bar i { background: linear-gradient(90deg, var(--braise), #ff6b5e); }
.vote-stat-n { font-size: 12.5px; color: var(--brume); text-align: right; }
.vote-stat-winner { margin-top: 12px; font-size: 14px; color: var(--ivoire); }
.vote-stat-winner b { color: var(--or-clair); font-weight: 500; }

/* ---------- V2 : fans ---------- */

.fan-row { grid-template-columns: 44px minmax(0, 1.4fr) minmax(0, 1fr) 90px 60px; }

/* ---------- V2 : live — décompte des votes & paroles ---------- */

.live-vote-choice { position: relative; }
.vote-n {
  position: absolute; top: -10px; right: -10px;
  min-width: 26px; height: 26px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--braise); color: #fff7ee;
  font-family: var(--f-mono); font-size: 13px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(224, 44, 44, 0.4);
}
.live-lyrics-wrap {
  margin-top: 26px;
  max-width: 760px;
  max-height: 34vh;
  overflow-y: auto;
  border: 1px solid var(--filet);
  border-radius: var(--r-m);
  background: rgba(22, 19, 13, 0.6);
  padding: 18px 22px;
}
.live-lyrics {
  font-family: var(--f-display);
  font-size: 17px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word;
  color: var(--ivoire);
}

/* ---------- V2 : page de vote publique ---------- */

.vote-body {
  min-height: 100vh;
  background:
    repeating-radial-gradient(circle at 50% -14%,
      rgba(226, 44, 44, 0.045) 0 1px, transparent 1px 10px),
    var(--noir);
}
#vote-app {
  max-width: 720px;
  margin: 0 auto;
  padding: 30px 22px 40px;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
.vote-head {
  display: flex; align-items: center; gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--filet);
}
.vote-disc { color: var(--or); flex: none; animation: spinSlow 14s linear infinite; }
@keyframes spinSlow { to { transform: rotate(360deg); } }
.vote-setname {
  font-family: var(--f-display); font-size: 19px;
  margin-top: 2px;
}
#vote-stage { flex: 1; padding: 34px 0 20px; }
.vote-title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(32px, 7vw, 52px); line-height: 1.05;
  margin-bottom: 8px;
}
.vote-title em { font-style: italic; color: var(--or-clair); }
.vote-hint { color: var(--brume); font-size: 15px; margin-bottom: 24px; }
.vote-cards { display: flex; flex-direction: column; gap: 14px; }
.vote-card {
  position: relative;
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.4));
  border: 1px solid var(--filet-or);
  border-radius: var(--r-l);
  padding: 20px 22px;
  color: var(--ivoire);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.vote-card:active { transform: scale(0.985); }
.vote-card.lock { cursor: default; opacity: 0.88; }
.vote-card.mine { border-color: var(--or); background: rgba(226, 44, 44, 0.1); opacity: 1; }
.vote-card-title { font-family: var(--f-display); font-size: 24px; line-height: 1.15; }
.vote-card-sub { font-family: var(--f-mono); font-size: 12px; color: var(--brume); }
.vote-card-bar {
  display: block; height: 7px; border-radius: 999px;
  background: rgba(239, 230, 212, 0.09);
  overflow: hidden; margin-top: 6px;
}
.vote-card-bar i {
  display: block; height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--braise), #ff6b5e);
  transition: width 0.6s ease;
}
.vote-card-count { font-family: var(--f-mono); font-size: 12px; color: var(--or-clair); }
.vote-idle {
  text-align: center;
  padding: 60px 20px;
  color: var(--brume);
  font-size: 15px;
}
.vote-idle-title {
  font-family: var(--f-display); font-size: 28px; font-weight: 400;
  color: var(--ivoire);
  margin-bottom: 10px;
}
.vote-foot {
  border-top: 1px solid var(--filet);
  padding-top: 16px;
  color: var(--brume);
  font-size: 12.5px;
  text-align: center;
}

@media (max-width: 620px) {
  .fan-row { grid-template-columns: 28px minmax(0, 1fr) 60px; }
  .fan-row .dim, .fan-row .mono.dim { display: none; }
  .vote-stat-row { grid-template-columns: minmax(0, 1fr) minmax(50px, 90px) 34px; }
}

/* ---------- V3 : navigation groupée ---------- */

.nav-group {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brume);
  padding: 16px 12px 4px;
  opacity: 0.75;
}

/* ---------- V3 : agenda ---------- */

.ag-list { border-top: 1px solid var(--filet); }
.ag-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 16px; align-items: center;
  padding: 13px 10px;
  border-bottom: 1px solid var(--filet);
  border-left: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.ag-row:hover { background: rgba(239, 230, 212, 0.03); border-left-color: var(--or); }
.ag-row.past { opacity: 0.5; }
.ag-date {
  display: flex; flex-direction: column; align-items: center; line-height: 1.1;
  font-family: var(--f-mono); text-align: center;
}
.ag-date b { font-size: 21px; font-weight: 500; color: var(--or-clair); }
.ag-date span { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brume); }
.ag-badge {
  display: inline-block;
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px; padding: 2px 10px; margin-bottom: 4px;
}
.ag-badge.concert { color: #ffffff; background: var(--or); }
.ag-badge.repete { color: #f3e2d2; background: rgba(224, 44, 44, 0.75); }
.ag-badge.event { color: var(--ivoire); border: 1px solid var(--filet-or); }
.ag-badge.indispo { color: var(--brume); border: 1px solid var(--filet); }
.ag-label { font-family: var(--f-display); font-size: 19px; line-height: 1.2; }
.ag-sub { color: var(--brume); font-size: 13px; }
.ag-actions { display: flex; gap: 4px; align-items: center; }

.cal-head {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  margin-bottom: 12px;
}
.cal-month { font-family: var(--f-display); font-size: 21px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
  margin-bottom: 30px;
}
.cal-dow {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--brume);
  text-align: center; padding: 4px 0;
}
.cal-cell {
  min-height: 52px;
  border: 1px solid var(--filet);
  border-radius: var(--r-s);
  padding: 5px 7px;
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--f-mono); font-size: 12px; color: var(--brume);
}
.cal-cell.empty { border-color: transparent; }
.cal-cell.today { border-color: var(--or); }
.cal-cell.today i { color: var(--or-clair); }
.cal-cell em { width: 7px; height: 7px; border-radius: 50%; }
.cal-cell em.concert { background: var(--or); }
.cal-cell em.repete { background: var(--braise); }
.cal-cell em.event { background: var(--ivoire); }
.cal-cell em.indispo { background: transparent; border: 1.5px solid var(--brume); }

/* ---------- V3 : finances ---------- */

.fin-row {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 4px;
  border-bottom: 1px solid var(--filet);
}
.fin-kind {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 999px; padding: 2px 10px;
}
.fin-kind.entree { color: var(--or-clair); border: 1px solid var(--filet-or); }
.fin-kind.depense { color: #ff6b5e; border: 1px solid rgba(224, 44, 44, 0.5); }
.fin-kind.reglement { color: var(--brume); border: 1px solid var(--filet); }
.fin-amount { margin-left: auto; font-family: var(--f-mono); font-size: 14.5px; font-weight: 500; }
.fin-amount.plus { color: var(--or-clair); }
.fin-amount.moins { color: #ff6b5e; }
.fin-members { display: flex; gap: 8px; flex-wrap: wrap; min-height: 30px; }
.member-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px;
  border: 1px solid var(--filet-or);
  border-radius: 999px; padding: 4px 12px;
  background: rgba(226, 44, 44, 0.07);
}
.member-chip button { color: var(--brume); font-size: 15px; line-height: 1; }
.member-chip button:hover { color: var(--ivoire); }
.fin-balances { display: flex; flex-direction: column; gap: 6px; }
.fin-balance {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 14.5px;
  border-bottom: 1px dashed var(--filet);
  padding-bottom: 5px;
}
.fin-balance b { font-family: var(--f-mono); font-weight: 500; }
/* Bandeau « Tes comptes » : avatar + pile stat (07-03, delta fermé L5). */
.fin-perso { display: flex; gap: 12px; align-items: flex-start; }
/* Équilibre « Les comptes sont bons 🤘 » — métriques .cp-sec-name. */
.fin-ok { font-family: var(--f-display); font-weight: 400; font-size: 19px; line-height: 1.2; }

/* ---------- V3 : pistes (kanban) ---------- */

.kanban {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px;
  align-items: start;
}
.kanban-col {
  border: 1px solid var(--filet);
  border-radius: var(--r-l);
  background: rgba(22, 19, 13, 0.4);
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  min-height: 120px;
}
.kanban-head {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
}
.kanban-head i { font-style: normal; margin-left: auto; color: var(--or); }
.kanban-head .dot { width: 8px; height: 8px; border-radius: 50%; }
.kanban-head .dot.a_contacter { background: var(--brume); }
.kanban-head .dot.contacte { background: #6a8fd8; }
.kanban-head .dot.relance { background: #a886d8; }
.kanban-head .dot.discussion { background: var(--or); }
.kanban-empty {
  color: var(--brume); font-size: 13px; font-style: italic;
  border: 1px dashed var(--filet);
  border-radius: var(--r-m);
  padding: 16px 12px; text-align: center;
}
.piste-card {
  border: 1px solid var(--filet);
  border-radius: var(--r-m);
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.4));
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 5px;
  cursor: grab; touch-action: none; user-select: none;
}
.piste-venue { font-family: var(--f-display); font-size: 17.5px; line-height: 1.2; }
.piste-sub { color: var(--brume); font-size: 13px; }
.piste-relance {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--or-clair);
  align-self: flex-start;
}
.piste-relance.late { color: #ff6b5e; }
.piste-status {
  background: rgba(13, 11, 8, 0.6);
  border: 1px solid var(--filet);
  border-radius: var(--r-s);
  color: var(--ivoire);
  font: inherit; font-size: 13px;
  padding: 5px 8px;
  margin-top: 4px;
  width: 100%;
}
/* --- 08-02 : delta kanban 6 colonnes + drag (liste fermée UI-SPEC,
       11 règles nouvelles — les 2 modifications sont ci-dessus) --- */
/* Colonne survolée pendant le geste (miroir .scene-cell.over). */
.kanban-col.over { border-color: var(--or); background: rgba(224, 44, 44, 0.08); }
/* Carte en geste (copie .scene-card.drag). */
.piste-card.drag { border-color: var(--or); box-shadow: var(--ombre); cursor: grabbing; }
/* Dots des 2 colonnes nouvelles : la victoire = rouge le plus vif,
   le refus = dot éteinte (miroir .cal-cell em.indispo). */
.kanban-head .dot.confirme { background: var(--or-clair); }
.kanban-head .dot.refuse { background: transparent; border: 1.5px solid var(--brume); }
/* Cartes refusées : le refus se lit, il ne hurle pas (D-UI-08). */
.kanban-col[data-status="refuse"] .piste-venue { color: var(--brume); }
/* Rangée d'outils carte : select + trash alignés. */
.piste-tools { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.piste-tools .piste-status { flex: 1; min-width: 0; margin-top: 0; }
/* État du concert lié (métriques .piste-relance). */
.piste-concert { font-family: var(--f-mono); font-size: 11px; color: var(--or-clair); }
/* Petit bouton compact : EXCEPTION nominative du scale — copie exacte
   des inline « padding:5px 12px;font-size:13px » remplacés. */
.btn-sm { padding: 5px 12px; font-size: 13px; }
/* Bandeau relances dues (nomme les inline du conteneur :1507/:1511). */
.relance-band {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  border: 1px solid rgba(224, 44, 44, 0.4);
  background: rgba(224, 44, 44, 0.07);
  border-radius: var(--r-m);
  padding: 12px 16px;
  margin-bottom: 20px;
}
.relance-band.vide { border: none; background: none; padding: 4px 0 20px; font-size: 14px; }

/* ---------- V3 : contacts & lieux ---------- */

.contact-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1.6fr) 110px auto;
  gap: 14px; align-items: center;
  padding: 11px 10px;
  border-bottom: 1px solid var(--filet);
  transition: background 0.15s ease;
}
.contact-row:hover { background: rgba(239, 230, 212, 0.03); }
.contact-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-size: 15px;
  color: var(--or-clair);
  border: 1px solid var(--filet-or);
  background: rgba(226, 44, 44, 0.08);
}
.contact-avatar.venue svg { width: 17px; height: 17px; stroke: var(--or-clair); fill: none; stroke-width: 1.5; }
.role-badge {
  font-family: var(--f-mono); font-size: 9.5px; letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--or-clair);
  border: 1px solid var(--filet-or);
  border-radius: 999px;
  padding: 3px 10px;
  text-align: center;
}
.contact-actions { display: flex; gap: 4px; justify-content: flex-end; }
.contact-actions .icon-btn svg { width: 15px; height: 15px; }

/* ---------- V3 : matos & rider ---------- */

.gear-cat { font-family: var(--f-display); font-weight: 400; font-size: 20px; margin: 6px 0 10px; }
.rider-cat { margin-bottom: 14px; }
.rider-cat-label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
  display: block; margin-bottom: 6px;
}
.rider-cat-label i { font-style: normal; color: var(--or); }
.chip-x {
  margin-left: 8px; color: var(--brume);
  font-size: 14px; line-height: 1;
}
.chip-x:hover { color: #ff6b5e; }

/* ---------- Phase 6 : plan de scène & rider public (delta fermé
   UI-SPEC § Delta CSS — classes partagées régie S1 / page publique S3 ;
   les définitions de l'éditeur régie complèteront ce socle au plan 06-03,
   le bloc d'impression scoppé body.rider-pub ferme la section) ---------- */

/* Grille de scène : 3 colonnes égales (jardin / fond / cour — la
   sémantique de scène), elle ne s'effondre jamais en dessous. */
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.scene-col-head {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
  text-align: center; padding-bottom: 8px;
}
.scene-cell {
  display: flex; flex-direction: column; gap: 8px;
  min-height: 96px;
  border: 1px dashed var(--filet-or); border-radius: var(--r-m);
  padding: 8px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.scene-cell.over { border-color: var(--or); background: rgba(224, 44, 44, 0.08); }
/* Carte musicien : métriques .piste-card (padding exception nominative) ;
   le vocabulaire drag (grab / touch-action) vit en régie seule, la page
   publique le désactive via .rp .scene-card plus bas. */
.scene-card {
  position: relative;
  display: flex; flex-direction: column; gap: 4px;
  background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.4));
  border: 1px solid var(--filet); border-radius: var(--r-m);
  padding: 12px 14px;
  cursor: grab; touch-action: none; user-select: none;
}
.scene-card.drag { border-color: var(--or); box-shadow: var(--ombre); cursor: grabbing; }
.scene-card-name { font-family: var(--f-display); font-size: 17.5px; line-height: 1.2; }
.scene-card-inst { color: var(--brume); font-size: 13px; }
.scene-card-wedge { font-family: var(--f-mono); font-size: 11px; color: var(--or-clair); }
/* Compteurs dérivés : bandeau sous la grille, valeurs mono or-clair
   (convention « donnée dérivée » du système). */
.scene-counters { display: flex; gap: 32px; flex-wrap: wrap; margin-top: 16px; }
.scene-counter { font-family: var(--f-mono); font-size: 15.5px; color: var(--or-clair); margin-top: 4px; }
/* Patch : canal mono or (convention .piste-sub) et groupes par musicien. */
.patch-group {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
  padding: 12px 0 4px;
}
.patch-ch { font-family: var(--f-mono); font-size: 13px; color: var(--or); }
/* Éditeur régie (06-04) : ligne de patch = canal + libellé + qui (motif
   .song-row) ; inputs aux métriques de .field input — sélecteur
   descendant, pattern .cp-edit-head input (padding exception nominative
   9px 12px, copie exacte). Le trash vit dans la piste libellé pour que
   .patch-who reste un ENFANT DIRECT de la grille (le repli ≤ 620 px le
   repositionne via grid-column). */
.patch-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px; align-items: center; padding: 8px 0;
  border-bottom: 1px solid var(--filet);
}
.patch-row input {
  background: rgba(13, 11, 8, 0.5);
  border: 1px solid var(--filet); border-radius: var(--r-s);
  color: var(--ivoire); font: inherit; font-size: 15px;
  padding: 9px 12px; width: 100%;
  transition: border-color 0.15s ease;
}
.patch-row input:focus { outline: none; border-color: var(--or); }
/* Mobile ≤ 620 px (breakpoint existant repris, aucun nouveau) : la
   ligne de patch se replie en 2 pistes — canal + libellé en ligne, le
   champ « qui » passe sous le libellé. */
@media (max-width: 620px) {
  .patch-row { grid-template-columns: 44px minmax(0, 1fr); }
  .patch-row .patch-who { grid-column: 2; }
}
/* Quantités ×N : données numériques dérivées (inventaire, cumuls rider). */
.gear-qty { font-family: var(--f-mono); font-size: 12px; color: var(--or-clair); margin-left: 8px; }
/* Masquage « pas montré à la salle » (régie 06-04, SCEN-04) : œil 24px
   (rythme des chips, idiome .chip-x) ; état caché = chip pointillé
   brume + œil allumé — la fiche régie montre TOUT, l'absence vit dans
   la projection serveur et la page publique. */
.chip-eye {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  margin-left: 4px; color: var(--brume);
  transition: color 0.15s ease;
}
.chip-eye:hover { color: var(--ivoire); }
.chip-eye.on { color: var(--or-clair); }
.chip-eye svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.vote-chip.hidden {
  border-style: dashed; border-color: var(--filet);
  color: var(--brume); background: transparent;
}
/* Document salle (page publique /rider/:id?t=) : sections dans l'ordre
   Culte, listes compactes, actions masquées à l'impression. */
.rp-sec { margin-top: 32px; }
.rp-list { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.6; }
.rp-list li { margin: 2px 0; } /* exception nominative : micro-rythme des listes salle */
.rp-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.rp .scene-card { cursor: default; touch-action: auto; user-select: auto; }
.rp-patch-row {
  display: grid; grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--filet);
  font-size: 14px;
}

/* Impression (S3, D-06-7) : la page publique est l'UNIQUE chemin papier
   du projet — monochrome strict, dimensionné pour une page, scoppé
   body.rider-pub (le SPA régie n'a aucune impression prévue). */
@media print {
  @page { margin: 1.5cm; } /* règle @page globale par nature : effet neutre
                              ailleurs — aucun autre écran n'est imprimé */
  body.rider-pub { background: #fff; color: #1a1611; }
  body.rider-pub::before { content: none; }        /* grain + lueur écran */
  .rider-pub .vote-disc, .rider-pub .rp-actions,
  .rider-pub .vote-foot { display: none; }
  .rider-pub a { color: #1a1611; }
  .rider-pub .vote-setname, .rider-pub .gear-cat,
  .rider-pub .scene-card-name, .rider-pub .scene-counter { color: #1a1611; }
  .rider-pub .stat-label, .rider-pub .scene-col-head, .rider-pub .scene-card-inst,
  .rider-pub .scene-card-wedge, .rider-pub .patch-ch, .rider-pub .patch-group,
  .rider-pub .vote-hint, .rider-pub .dim { color: #444; }
  .rider-pub .scene-cell { min-height: auto; border-color: #bbb; }
  .rider-pub .scene-card { background: #fff; border-color: #999; box-shadow: none; }
  .rider-pub .rp-sec { margin-top: 16px; break-inside: avoid; }
  .rider-pub .scene-grid, .rider-pub .scene-cell,
  .rider-pub .scene-card { break-inside: avoid; }
  .rider-pub .rp-list { font-size: 12.5px; line-height: 1.5; }
}

/* ---------- V3 : responsive spécifique ---------- */

@media (max-width: 1100px) {
  .kanban { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 960px) {
  #nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  #nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: none; }
  .nav-group {
    flex: none; padding: 6px 2px 6px 14px;
    border-left: 1px solid var(--filet);
    writing-mode: initial;
  }
  .kanban { grid-template-columns: 1fr; }
  .cal-cell { min-height: 40px; padding: 3px 4px; }
  .contact-row { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .contact-row .role-badge { display: none; }
}
@media (max-width: 620px) {
  .ag-row { grid-template-columns: 46px minmax(0, 1fr); }
  .ag-actions { grid-column: 2; justify-content: flex-start; }
  .fin-row { flex-wrap: wrap; }
}

/* ---------- Mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Phase 2 — Membres & présence ---------- */

/* Fiche membre inactive : atténuée (pattern .ag-row.past), le badge
   « Inactif » reste lisible dessus. */
.member-card.off { opacity: 0.55; }

/* Variante brume du role-badge (même gabarit, couleurs muettes). */
.role-badge.off {
  color: var(--brume);
  border-color: var(--filet);
}

/* Sélecteur « qui je suis » (S2, pied de sidebar — D-UI-01). Gap 6px :
   EXCEPTION NOMINATIVE de l'échelle d'espacement, alignée au rythme de
   .field et .sidebar-foot (gap 6px) pour ne pas décoller des autres
   champs de formulaire ; tout le reste de la phase reste multiple de 4. */
.whoami {
  display: flex; flex-direction: column; gap: 6px;
}
.whoami > label {
  font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--brume);
}
.whoami select {
  background: rgba(13, 11, 8, 0.5);
  border: 1px solid var(--filet);
  border-radius: var(--r-s);
  color: var(--ivoire); font: inherit; font-size: 15px;
  padding: 9px 12px;
}

/* D-UI-12 : le sélecteur RESTE visible sur mobile (barre du bas), capé —
   répondre en répète depuis le téléphone est l'usage mobile n°1. */
@media (max-width: 960px) {
  .whoami select { max-width: 140px; font-size: 12.5px; }
}

/* Bloc présence de la ligne d'agenda répète (S3) : décompte + boutons
   binaires + non-répondants. Le passage sous la ligne en mobile (≤ 620 px)
   est NATIF (flex-wrap) — aucune règle supplémentaire. */
.ag-presence {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center;
}

/* Pill de réponse — métriques EXACTES de .seg button (padding 8px 16px,
   font-size 13.5px) en pill autonome. « Je viens » sélectionné = fond --or
   texte blanc (D-UI-06, pattern .seg [aria-pressed=true]) ; « Je peux pas »
   = rouge dépense (pattern .fin-kind.depense). AUCUN vert : la palette
   reste noir/ivoire/rouge (D-UI-06). */
.presence-btn {
  padding: 8px 16px; font-size: 13.5px;
  border-radius: 999px; border: 1px solid var(--filet-or);
  background: transparent; color: var(--ivoire);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.presence-btn.on { background: var(--or); color: #ffffff; border-color: var(--or); }
.presence-btn.non {
  border-color: rgba(224, 44, 44, 0.5);
  color: #ff6b5e;
  background: rgba(224, 44, 44, 0.08);
}

/* Aperçu des occurrences du drawer « Nouvelle répète » (S4) : phrase Culte
   + 3 premières dates en mono. SEULE nouvelle règle du plan 02-03 (liste
   fermée du Delta CSS). */
.preview-box {
  border: 1px dashed var(--filet-or);
  border-radius: var(--r-m);
  padding: 12px 16px;
  font-family: var(--f-mono);
  font-size: 13px;
  margin-top: 4px;
}

/* Étoiles de maîtrise de la fiche répète (S5, D-UI-10) : mono 12px,
   letter-spacing 2px ; pleines --or-clair (span .on), vides --filet-or
   (couleur de base du conteneur). SEULES règles nouvelles du plan 02-04
   (liste fermée) — le Répertoire garde ses .level-dots. */
.star-row {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--filet-or);
}
.star-row .on { color: var(--or-clair); }

/* ---------- Phase 3 — Fiche morceau ChordPro (L2, plan 03-01) ----------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS, l.414-435) : lecture
   de la feuille de chant. L'alignement accord/syllabe est STRUCTUREL :
   chaque .cp-unit est un inline-block accord-haut/fragment-bas — tout
   calage par espaces, padStart ou recomposition de deux lignes texte
   est interdit (Pitfall 3, D-RENDU). */

/* Entête de la fiche : pochette (fallback initiales) + colonne infos. */
.song-head {
  display: flex; gap: 20px; align-items: flex-start;
}
/* La colonne d'infos doit pouvoir rétrécir (ellipsis du sous-titre). */
.song-head > div:last-child { min-width: 0; }

/* Fallback pochette — initiales du titre (l'image arrive au plan 03-05 ;
   cette valeur par défaut RESTE le repli). flex:none : miroir structurel
   de .cover-box, la vignette ne rétrécit jamais. */
.cover-none {
  width: 96px; height: 96px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 24px;
  background: var(--panneau-2);
  border: 1px solid var(--filet);
  color: var(--brume);
}

/* Sections « ## Nom » (D-MOD) : la première ne décolle pas de l'entête. */
.cp-sec { margin-top: 24px; }
.cp-sec:first-child { margin-top: 0; }
.cp-sec-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
.cp-sec-name {
  font-family: var(--f-display); font-size: 19px; font-weight: 400;
  line-height: 1.2;
}

/* Ligne de paroles : bloc d'unités, écart xs entre lignes. */
.cp-line { display: block; margin-bottom: 4px; }

/* Unité accord+fragment : l'accord SOUDÉ à sa syllabe — le retour à la
   ligne navigateur ne peut JAMAIS les séparer. */
.cp-unit { display: inline-block; vertical-align: bottom; }

/* Accord : donnée musicale en mono or-clair (convention .song-key) ;
   min-height pour maintenir la ligne de base des lignes sans accord. */
.cp-chord {
  display: block; font-family: var(--f-mono); font-size: 13px;
  color: var(--or-clair); min-height: 16px; white-space: pre;
}

/* Fragment de paroles : Barlow (police d'interface, héritée), ivoire ;
   white-space:pre préserve les espaces portés par le fragment. */
.cp-word {
  display: block; font-size: 16px; line-height: 1.6;
  color: var(--ivoire); white-space: pre;
}

/* ---------- Phase 3 — transposeur & STRUCTURE (plan 03-01, tâche 2) ----
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS). Le transposeur est un
   état transient client : aucun appel réseau, aucune écriture (D-TRANSPO). */

/* Toolbar au-dessus de la feuille (le bouton « ✎ Éditer » du mode édition
   rejoindra ce rang au plan 03-04). */
.cp-toolbar {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin: 16px 0;
}

/* Groupe « TRANSPOSER : − 0 + ↺ ». */
.cp-transpose {
  display: inline-flex; align-items: center; gap: 8px;
}
.cp-trans-label {
  font-family: var(--f-mono); font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--brume);
}
/* Offset : « 0 » en brume, « +2 »/« −3 » en or-clair (data-on). */
.cp-trans {
  font-family: var(--f-mono); font-size: 13px;
  min-width: 24px; text-align: center; color: var(--brume);
}
.cp-trans[data-on="1"] { color: var(--or-clair); }
/* Boutons ± : carré 34px (métriques .icon-btn), mono 16px, bord or. */
.cp-trans-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--r-s);
  border: 1px solid var(--filet-or);
  font-family: var(--f-mono); font-size: 16px;
  color: var(--ivoire); background: transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.cp-trans-btn:hover { color: var(--or-clair); background: rgba(239, 230, 212, 0.07); }

/* Bandeau STRUCTURE (SONG-04) : séquence des libellés dérivée des
   marqueurs « ## » — valeurs en ivoire, séparateur « · » en brume. */
.cp-structure {
  font-family: var(--f-mono); font-size: 12.5px; color: var(--brume);
  letter-spacing: 0.04em; margin: 8px 0 16px;
}
.cp-structure span { color: var(--ivoire); }

/* ---------- Phase 3 — répertoire enrichi (plan 03-04, tâche 1) ----------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : la vignette vit DANS
   la cellule Morceau (.song-meta-row), la grille .song-row existante est
   inchangée — la vignette ne devient pas une colonne. */

/* Vignette + colonne titre/artiste : gap 10px (exception nominative
   UI-SPEC § Spacing, alignée aux associations icône+texte existantes). */
.song-meta-row {
  display: flex; gap: 10px; align-items: center; min-width: 0;
}

/* Vignette pochette 36 px — multiple de 4 (UI-SPEC § Spacing). */
.song-thumb {
  width: 36px; height: 36px; flex: none;
  border-radius: var(--r-s); border: 1px solid var(--filet);
  object-fit: cover;
}
/* Repli sans pochette : initiales du titre, mono 11 px sur panneau. */
.song-thumb.none {
  background: var(--panneau-2);
  font-family: var(--f-mono); font-size: 11px; color: var(--brume);
  display: inline-flex; align-items: center; justify-content: center;
}

/* Badge ⟳ « À retravailler » : l'icône SVG du registre doit être calée à
   12 px (plan 03-04 : « ⟳ = icon("reset") 12 px ») — sélecteur descendant
   sur la classe existante .mini-badge (pattern .vote-stat-title svg),
   aucune classe nouvelle. */
.mini-badge svg {
  width: 12px; height: 12px;
  display: inline-block; vertical-align: middle;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Phase 3 — mode édition des paroles (plan 03-04, tâche 2) ----
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : cartes section S4. */

.cp-edit {
  background: var(--panneau);
  border: 1px solid var(--filet);
  border-radius: var(--r-m);
  padding: 16px;
  margin-bottom: 16px;
}
.cp-edit-head {
  display: flex; gap: 8px; align-items: center;
  margin-bottom: 8px;
}
/* Cluster d'icon-btn ↑/↓/🗑 : gap 2px (exception nominative UI-SPEC
   § Spacing, rythme des clusters .song-actions existants). */
.cp-edit-actions {
  display: flex; gap: 2px;
  margin-left: auto;
}
/* Champs de la carte : métriques .field input/.field textarea (le plan
   exige un « textarea .field textarea ») — sélecteurs descendants sur la
   classe nouvelle .cp-edit, aucune classe nouvelle. L'input nom remplit
   la ligne (les actions restent à droite via margin-left:auto). */
.cp-edit-head input,
.cp-edit textarea {
  background: rgba(13, 11, 8, 0.5);
  border: 1px solid var(--filet);
  border-radius: var(--r-s);
  color: var(--ivoire); font: inherit; font-size: 15px;
  padding: 9px 12px;
  transition: border-color 0.15s ease;
  width: 100%;
}
.cp-edit-head input { flex: 1; min-width: 0; }
.cp-edit textarea { resize: vertical; min-height: 72px; }
.cp-edit-head input:focus, .cp-edit textarea:focus {
  outline: none; border-color: var(--or);
}

/* ---------- Phase 3 — bandeau réglages fiche (plan 03-04, tâche 3) ------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : SONG-05/SONG-06 « se
   règlent sur la fiche ». */

.song-opts {
  display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
  margin: 16px 0 24px;
}
/* Le .field du bandeau reste SUR la ligne de base commune (son
   margin-bottom par défaut le décollerait de 16 px du reste du bandeau) —
   sélecteur descendant, pattern .vote-stat-title svg. */
.song-opts .field { margin-bottom: 0; }
/* Pill « À retravailler » : métriques .presence-btn (phase 2). OFF =
   contour --filet-or, texte ivoire ; ON = fond --or, texte blanc. */
.rework-btn {
  padding: 8px 16px; font-size: 13.5px;
  border-radius: 999px; border: 1px solid var(--filet-or);
  background: transparent; color: var(--ivoire);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.rework-btn.on { background: var(--or); color: #ffffff; border-color: var(--or); }

/* ---------- Phase 3 — pochette fiche (plan 03-05, tâche 1) --------------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : .cover-box 96 px,
   relative pour la surimpression 🗑, + l'ajust responsive ≤ 620 px
   (deferred-items n° 1 — .song-opts/.cp-toolbar wrap déjà natif). */

.cover-box {
  width: 96px; height: 96px; flex: none; position: relative;
  border-radius: var(--r-m); border: 1px solid var(--filet);
  overflow: hidden; /* clip de l'image aux coins arrondis de la boîte */
}
/* L'image remplit la boîte — object-fit cover du contrat ; sélecteur
   descendant, pattern .mini-badge svg (aucune classe nouvelle). */
.cover-box img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* Surimpression bas-droite (🗑 sur pochette, « + » sur fallback) : fond
   sombre pour rester lisible sur l'image — sélecteurs descendants sur
   classes du delta/phase 3. .cover-none devient relative pour accueillir
   son « + » (extension de la classe 03-01, repli éditable). */
.cover-none { position: relative; }
.cover-box .icon-btn,
.cover-none .icon-btn {
  position: absolute; right: 4px; bottom: 4px;
  background: rgba(11, 11, 13, 0.72);
}

/* Fiche ≤ 620 px : entête en colonne, pochette 64 px (UI-SPEC
   § Responsive — fin du delta fermé de la phase). */
@media (max-width: 620px) {
  .song-head { flex-direction: column; }
  .cover-box, .cover-none { width: 64px; height: 64px; }
  .cover-none { font-size: 18px; }
}

/* ---------- Phase 3 — import en masse (plan 03-05, tâche 2) -------------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : lignes de l'aperçu
   local du drawer S6. */

.import-list {
  display: block;
  font-family: var(--f-mono); font-size: 12.5px;
  margin-top: 4px;
}
/* Doublon connu du répertoire : brume + italique — marquage INDICATIF,
   la réponse serveur {created, ignored} fait seule foi (D-UI-07). */
.import-list.dup { color: var(--brume); font-style: italic; }

/* ---------- Phase 3 — assistant paroles (plan 03-05, tâche 3) -----------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS) : aperçu du drawer S7.
   Barlow 14 px = police d'interface héritée du corps. */

.lyrics-preview {
  max-height: 40vh; overflow-y: auto; white-space: pre-wrap;
  font-size: 14px;
  background: rgba(22, 19, 13, 0.6);
  border: 1px solid var(--filet);
  border-radius: var(--r-m);
  padding: 12px 16px;
}

/* ---------- Phase 4 — Jouer (L3, plan 04-01) ------------------------------
   Liste fermée du Delta CSS (UI-SPEC § Delta CSS, 1re moitié) : tuiles du
   lanceur + badge répète du lecteur. Tokens existants uniquement, espacements
   multiples de 4 — exception nominative .rep-mode : padding 2px 10px, copie
   exacte des métriques de .live-chip pour la parité visuelle du badge (SANS
   puce pulsante : le mode répète n'est jamais un état public). */

.tile {
  display: flex; flex-direction: column; gap: 12px;
  min-height: 264px;
}
.tile-title {
  font-family: var(--f-display); font-weight: 400;
  font-size: 22px; line-height: 1.15;
}
.tile-sub { font-size: 13.5px; color: var(--brume); margin-top: 4px; }
.tile-body {
  flex: 1; margin-top: 12px;
  display: flex; flex-direction: column; gap: 12px;
  min-height: 0;
}
.tile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

.tile-prog { font-size: 13.5px; line-height: 1.6; color: var(--ivoire); }
.tile-prog .more {
  font-family: var(--f-mono); font-size: 12px; color: var(--brume);
  white-space: nowrap;
}
.tile-star { font-family: var(--f-mono); font-size: 11px; color: var(--or-clair); }

.tile-empty { display: flex; flex-direction: column; gap: 4px; }
.tile-empty b { font-family: var(--f-display); font-weight: 400; font-size: 19px; }
.tile-empty p { font-size: 13.5px; color: var(--brume); margin: 4px 0 12px; }

/* Checklist de la tuile scène (plan 04-02, 2e moitié du delta fermé —
   définitions EXACTES UI-SPEC § Delta CSS) : marqueur mono en tête,
   l'actionnable domine le muet (.ok/.miss --or-clair, .mute --brume). */
.tile-check { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.tile-check-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.tile-check .mark {
  font-family: var(--f-mono); font-size: 13px;
  width: 16px; flex: none; text-align: center;
}
.tile-check .mark.ok,
.tile-check .mark.miss { color: var(--or-clair); }
.tile-check .mark.mute { color: var(--brume); }
.tile-link { font-size: 13.5px; color: var(--or-clair); }
.tile-link:hover { color: var(--ivoire); }

.rep-mode {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--or-clair);
  border: 1px solid var(--filet-or);
  border-radius: 999px; padding: 2px 10px;
  vertical-align: middle;
}

@media (max-width: 620px) {
  .tile { min-height: auto; padding: 16px 20px; }
}

/* ---------- Régie vote (L4) ---------- */
/* Liste fermée UI-SPEC § Delta CSS, partie régie uniquement (les
   surcharges de l'écran TV sont le périmètre du plan 05-04).
   Espacements multiples de 4 SAUF exceptions nominatives déclarées
   au UI-SPEC : gap 18px (copie .grid) et font-size 22px (copie
   .live-meta > div > b). Tokens existants uniquement. */
.reg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.reg-col { display: flex; flex-direction: column; gap: 18px; }
.reg-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.reg-total {
  font-family: var(--f-mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--or-clair);
  line-height: 1.1;
  margin-top: 8px;
}

/* Breakpoint EXISTANT des grilles repris (aucun nouveau point de
   coupure) : une colonne sur tablette/téléphone — la régie reste
   pilotable depuis un téléphone (contrat responsive UI-SPEC). */
@media (max-width: 1020px) {
  .reg-grid { grid-template-columns: 1fr; }
}

/* ---------- Écran TV (L4 — plan 05-04) ---------- */

/* Delta FERMÉ (UI-SPEC § Delta CSS) : surcharges .tv qui re-dimensionnent
   le vocabulaire vote existant + les quatre classes nouvelles .tv-wait,
   .tv-url, .tv-total, .tv-winner. Bornes clamp multiples de 4, tokens
   existants uniquement, AUCUNE animation nouvelle — l'anti-burn-in est
   le disque spinSlow existant (D-UI-04). */
.tv #vote-app {
  max-width: 1280px;
  /* Correctif blocker TV : le padding bas passe de 48 à 24 px — en phase
     RÉVÉLÉ (3 cartes complètes : titre + sous-titre + barre + compte), le
     contenu poussait le pied de page sous la ligne de flottaison 1080p
     (docH 1139) ; 24 px suffisent sous un pied déjà espacé par son
     padding-top, et tout l'écran tient (mesuré 1095). */
  padding: 40px 48px 24px;
}
.tv .vote-disc { width: 56px; height: 56px; }
.tv .live-now-label {
  font-size: clamp(16px, 1.8vw, 24px);
  margin-bottom: 20px;
}
.tv .vote-title { font-size: clamp(48px, 7vw, 96px); }
.tv .vote-hint { font-size: clamp(16px, 2.2vw, 28px); }
.tv .vote-cards { gap: 12px; }
.tv .vote-card { padding: 22px 32px; gap: 8px; }
.tv .vote-card-title {
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.1;
}
.tv .vote-card-sub { font-size: clamp(16px, 1.6vw, 24px); }
.tv .vote-card-bar { height: 12px; }
.tv .vote-card-count { font-size: clamp(16px, 2vw, 28px); }
.tv .vote-idle-title { font-size: clamp(40px, 6vw, 88px); }
.tv-wait {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
  padding: 48px 0;
}
.tv-url {
  font-family: var(--f-mono);
  font-size: clamp(24px, 3.2vw, 48px);
  color: var(--or-clair);
  word-break: break-all;
  text-align: center;
}
.tv-total {
  font-family: var(--f-mono);
  font-size: clamp(20px, 2.4vw, 32px);
  color: var(--or-clair);
  margin-top: 16px;
}
/* Carte leader : inspirée de .vote-card.mine, fond porté à .12 pour la
   visibilité en projection TV (UI-SPEC). */
.tv-winner {
  border-color: var(--or);
  background: rgba(226, 44, 44, 0.12);
}
.tv-winner .vote-card-title { color: var(--or-clair); }
/* Icône du leader (correctif du bloqueur TV, vérification 05) : le SVG de
   icon("check") ne porte ni width ni height — sans règle, dans la carte
   flex column il prenait la largeur interne (~1216 px) pour HAUTEUR
   (viewBox 1:1) et poussait tout l'écran RÉVÉLÉ sous le viewport 1080p
   (seul usage d'icône du projet non dimensionné : .vote-stat-title svg,
   .icon-btn svg… ont tous un sélecteur). Dimensionnée au vocabulaire clamp
   du delta TV (bornes multiples de 4) et sortie du flux (absolute dans la
   carte déjà relative) : elle ne consomme aucune hauteur de carte. Le
   delta CSS L4 étant fermé, cet ajout borné au périmètre TV est documenté
   dans 05-FIX-SUMMARY.md. */
.tv-winner svg {
  position: absolute;
  top: 28px;
  right: 32px;
  width: clamp(24px, 3vw, 48px);
  height: clamp(24px, 3vw, 48px);
  stroke: var(--or);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* Stats #/votes (S4) : filtre « Concert » aligné dans l'entête —
   dernier sélecteur du delta fermé L4 (UI-SPEC). */
.page-head-row .field { margin-bottom: 0; min-width: 260px; }
/* Finances #/finances : les .field du toolbar ne décollent pas la
   barre (motif .page-head-row .field) — dernier sélecteur du delta
   fermé L5 (UI-SPEC 07). */
.rep-toolbar .field { margin-bottom: 0; }

/* ---------- Le Local (phase 9) — delta fermé (contrat UI-SPEC § Delta CSS) ---------- */
.kanban.taches { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .kanban.taches { grid-template-columns: 1fr 1fr; } }
@media (max-width: 960px) { .kanban.taches { grid-template-columns: 1fr; } }
.kanban-head .dot.afaire { background: var(--brume); }
.kanban-head .dot.encours { background: var(--or); }
.kanban-head .dot.fait { background: var(--or-clair); }
.task-card { border: 1px solid var(--filet); border-radius: var(--r-m); background: linear-gradient(170deg, var(--panneau), rgba(22, 19, 13, 0.4)); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; cursor: grab; touch-action: none; user-select: none; }
.task-card.drag { border-color: var(--or); box-shadow: var(--ombre); cursor: grabbing; }
.task-title { font-family: var(--f-display); font-size: 17.5px; line-height: 1.2; }
.task-done .task-title { color: var(--brume); text-decoration: line-through; }
.task-who { display: flex; flex-wrap: wrap; gap: 4px; }
.task-who .member-chip.inactif { color: var(--brume); border-style: dashed; background: transparent; }
.task-meta { font-family: var(--f-mono); font-size: 11px; color: var(--brume); align-self: flex-start; }
.task-due.late { color: #ff6b5e; }
.task-concert { color: var(--or-clair); }
.task-tools { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.task-tools .task-status { flex: 1; min-width: 0; margin-top: 0; }
.task-status { background: rgba(13, 11, 8, 0.6); border: 1px solid var(--filet); border-radius: var(--r-s); color: var(--ivoire); font: inherit; font-size: 13px; padding: 5px 8px; margin-top: 4px; width: 100%; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--filet); flex-wrap: wrap; }
.task-check { accent-color: var(--or); width: 16px; height: 16px; margin-top: 2px; flex: none; cursor: pointer; }
.task-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.local-group { margin-bottom: 24px; }
.local-group-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.local-group-head b { font-family: var(--f-display); font-weight: 400; font-size: 20px; }
.local-group-head i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--or); }
.local-group-head.archived b, .local-group-head.archived i { color: var(--brume); }
.quickbar { position: relative; display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.quickbar .field { flex: 1; min-width: 0; margin-bottom: 0; }
.ac { position: absolute; top: 100%; left: 0; right: 0; z-index: 20; margin-top: 4px; background: var(--panneau-2); border: 1px solid var(--filet-or); border-radius: var(--r-m); box-shadow: var(--ombre); overflow: hidden; }
.ac-item { display: flex; align-items: baseline; gap: 8px; padding: 8px 12px; font-size: 14px; color: var(--brume); cursor: pointer; }
.ac-item.on { background: rgba(226, 44, 44, 0.1); color: var(--ivoire); }
.ac-key { font-family: var(--f-mono); color: var(--or-clair); }
.chantier-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--filet); }
.chantier-name { font-family: var(--f-display); font-size: 17.5px; flex: 1; min-width: 0; }
.chantier-row i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--or); }
.chantier-row.archived .chantier-name { color: var(--brume); }
.chantier-row.editing { flex-wrap: wrap; }
.chantier-row input { flex: 1; min-width: 0; background: rgba(13, 11, 8, 0.5); border: 1px solid var(--filet); border-radius: var(--r-s); color: var(--ivoire); font: inherit; font-size: 15px; padding: 9px 12px; width: 100%; transition: border-color 0.15s ease; }
/* Fin du delta : aucune règle existante modifiée, aucune keyframe, aucun breakpoint nouveau (1100/960 repris) ; style= inline interdit au module hors la largeur de jauge et le transform du drag. */

/* ============================================================
   Delta phase 10 (Rayonner) — liste FERMÉE 10-UI-SPEC.md:572-593 :
   overlay ⌘K (.cmdk-*, z 65 — au-dessus du lecteur z 60, sous les
   toasts z 70), carte Adoption (.adoption-*) et message fan
   (.fan-msg*) préexistent à leur usage du plan 10-03 (motif DP-5 :
   une seule écriture CSS pour la phase). AUCUNE règle existante
   modifiée, AUCUNE keyframe nouvelle (fadeIn/popIn réutilisées),
   AUCUN breakpoint nouveau (1100/960/620 inchangés — le repli mobile
   du bouton vient de la règle existante .ghost-btn span). Exceptions
   nominatives déclarées : .cmdk-kbd padding 2px 10px (copie .live-chip),
   .fan-msg margin 2px 0 10px (copie .login-error), backdrop 14vh.
   ============================================================ */
.cmdk-backdrop { position: fixed; inset: 0; z-index: 65; background: rgba(6, 5, 3, 0.7); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 14vh 20px 20px; animation: fadeIn 0.18s ease; }
.cmdk { background: var(--panneau-2); border: 1px solid var(--filet-or); border-radius: var(--r-l); width: min(560px, 100%); box-shadow: var(--ombre); overflow: hidden; animation: popIn 0.18s cubic-bezier(.2,.8,.2,1); }
.cmdk-input { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--filet); color: var(--ivoire); font: inherit; font-size: 15px; padding: 12px 16px; outline: none; }
.cmdk-input:focus { border-bottom-color: var(--or); }
.cmdk-list { max-height: 380px; overflow-y: auto; padding: 8px 0; }
.cmdk-group-label { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brume); padding: 8px 16px 4px; }
.cmdk .ac-item { padding: 8px 16px; }
.cmdk-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 16px; border-top: 1px solid var(--filet); font-family: var(--f-mono); font-size: 11px; color: var(--brume); }
.cmdk-empty { padding: 28px 16px; text-align: center; color: var(--brume); font-size: 14px; }
.cmdk-kbd { font-family: var(--f-mono); font-size: 11px; color: var(--brume); border: 1px solid var(--filet); border-radius: var(--r-s); padding: 2px 10px; }
.adoption-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--filet); flex-wrap: wrap; }
.adoption-row:last-child { border-bottom: none; }
.adoption-row svg { width: 16px; height: 16px; flex: none; color: var(--or-clair); align-self: center; }
.adoption-pending { flex: none; width: 16px; text-align: center; font-family: var(--f-mono); font-size: 12px; color: var(--brume); }
.adoption-row b { font-family: var(--f-display); font-weight: 400; font-size: 16.5px; flex: 1; min-width: 0; }
.adoption-row i { font-style: normal; font-family: var(--f-mono); font-size: 12px; color: var(--brume); }
.vote-card.fan-form { cursor: default; }
.vote-card.fan-form:active { transform: none; }
.fan-msg { font-size: 13.5px; min-height: 20px; margin: 2px 0 10px; }
.fan-msg.ok { color: var(--or-clair); }

/* Phase 12 — lecture Spotify */
.spot { margin: 0 0 24px; max-width: 640px; }
.spot > .stat-label { display: block; margin-bottom: 8px; }
.spot-embed { display: block; width: 100%; height: 152px; border: 0; border-radius: 12px; background: var(--panneau-2); }
.spot-embed.compact { height: 80px; }
.spot-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.spot-hint { font-size: 12px; color: var(--brume); margin-top: 8px; max-width: 60ch; }
.song-meta-row .icon-btn { margin-left: auto; flex: none; }
.live-spot { margin-top: 24px; max-width: 760px; }
#repeter .live-nav { flex-wrap: wrap; }
/* Audit UI 12 (UI-02) : sur téléphone, le lecteur compact ouvert faisait
   déborder la scène sur la barre du chrono (20 px mesurés à 375×812) ;
   la scène garde sa hauteur de contenu et #repeter défile. */
#repeter .live-stage { min-height: auto; }
