/* ─── AtlaS Panel — thème « lune bleue » ───────────────────────────────────── */
:root {
  --bg: #050914;
  --bg-2: #080b1c;
  --card: #12151e;
  --card-2: #1a1b2e;
  --inset: #0a0b27;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --line-violet: rgba(126, 114, 255, 0.28);
  --ink: #eceef8;
  --ink-2: #c3c5da;
  --muted: #8f93b0;
  --moon: #5b4cfd;
  --moon-2: #6c5dfe;
  --moon-3: #938af5;
  --moon-deep: #2a2568;
  --glow: #ffffff;
  --ok: #58d6a4;
  --warn: #f2b35c;
  --err: #ff7a8a;
  --r-xl: 34px;
  --r-lg: 24px;
  --r-md: 16px;
  --r-sm: 10px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--moon-3); text-decoration: none; }
a:hover { color: #fff; }
a.li, a.brand, a.btn, a.icon-btn, .nav a { color: inherit; }
a.li:hover .t div { color: #fff; }
a.li { border-radius: 12px; transition: background .15s; }
a.li:hover { background: rgba(255,255,255,.025); }
::selection { background: var(--moon); color: #fff; }

/* Titres : Archivo étendu, approche serrée — comme « Project Brief.txt » */
.display, h1, h2, h3 {
  font-family: var(--font);
  font-stretch: 125%;
  font-weight: 450;
  letter-spacing: -0.035em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.08; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.25; }
.meta { color: var(--muted); font-weight: 600; font-size: 14px; letter-spacing: -0.005em; }
.num { font-variant-numeric: tabular-nums; }

/* ─── Décor : grille fine + lune bleue qui dérive ───────────────────────────── */
.sky {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 120px),
    radial-gradient(120% 70% at 50% 110%, rgba(56, 44, 170, 0.35), transparent 60%),
    var(--bg);
  -webkit-mask-image: linear-gradient(#000, #000);
}
.sky::after { /* grain */
  content: ""; position: absolute; inset: -50%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.05'/></svg>");
  opacity: .6;
}
.moon-wrap {
  position: absolute; left: 50%; bottom: 0;
  width: min(150vmin, 1500px); aspect-ratio: 1;
  transform: translate(-50%, 58%);
  animation: moon-drift 22s ease-in-out infinite alternate;
}
.moon {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #04060f 0 62%, #070a1a 68%, transparent 71%);
  box-shadow:
    0 -2px 0 1px rgba(147, 138, 245, 0.55),
    0 -30px 120px 10px rgba(91, 76, 253, 0.55),
    0 -80px 260px 40px rgba(76, 60, 230, 0.35),
    inset 0 40px 90px -20px rgba(108, 93, 254, 0.75),
    inset 0 6px 18px -4px rgba(190, 184, 255, 0.9);
}
.moon::before { /* liseré lumineux qui tourne lentement autour du disque */
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  background: conic-gradient(from 200deg, rgba(160,150,255,0.0), rgba(160,150,255,0.95) 12%, rgba(120,105,255,0.5) 24%, rgba(160,150,255,0) 40%, rgba(147,138,245,0.8) 70%, rgba(160,150,255,0) 88%);
  -webkit-mask: radial-gradient(circle, transparent calc(70.5% - 4px), #000 calc(70.5% - 3px), #000 70.7%, transparent 71%);
          mask: radial-gradient(circle, transparent calc(70.5% - 4px), #000 calc(70.5% - 3px), #000 70.7%, transparent 71%);
  filter: blur(2px);
  animation: moon-spin 40s linear infinite;
}
.moon::after { /* halo respirant */
  content: ""; position: absolute; inset: -12%; border-radius: 50%;
  background: radial-gradient(circle, transparent 52%, rgba(91, 76, 253, 0.28) 60%, transparent 70%);
  animation: moon-breathe 7s ease-in-out infinite alternate;
}
@keyframes moon-drift {
  0%   { transform: translate(-50%, 58%) scale(1); }
  50%  { transform: translate(calc(-50% + 1.6vw), 56.5%) scale(1.012); }
  100% { transform: translate(calc(-50% - 1.2vw), 57.5%) scale(0.996); }
}
@keyframes moon-spin { to { transform: rotate(360deg); } }
@keyframes moon-breathe { from { opacity: .55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .moon-wrap, .moon::before, .moon::after { animation: none; }
}

/* ─── Cartes verre ─────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(91, 76, 253, 0.22), transparent 60%),
    linear-gradient(180deg, rgba(26, 28, 42, 0.86), rgba(15, 17, 30, 0.86));
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.inset {
  background: linear-gradient(180deg, rgba(20, 18, 60, 0.55), rgba(10, 11, 32, 0.7));
  border: 1px solid var(--line-violet);
  border-radius: var(--r-lg);
  box-shadow: 0 0 40px -10px rgba(91, 76, 253, 0.45), inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Barre de progression lumineuse */
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,0.08); overflow: visible; position: relative; }
.bar > i {
  display: block; height: 100%; border-radius: 99px; background: var(--glow);
  box-shadow: 0 0 6px #fff, 0 0 18px rgba(200, 195, 255, 0.9), 0 0 36px rgba(120, 105, 255, 0.8);
  transition: width .35s ease;
}
.bar.small { height: 5px; }

/* Spinner fin comme « Uploading… » */
.spin { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,0.18); border-top-color: #fff; border-right-color: #fff; animation: r 0.9s linear infinite; flex: none; }
@keyframes r { to { transform: rotate(360deg); } }

/* Badge « TEXT » à 4 points */
.tag {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 13px; border-radius: 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; font-stretch: 110%;
  color: #e8e9f5; background: rgba(40, 44, 58, 0.82); border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 0 0 4px rgba(20, 22, 32, 0.8), inset 0 1px 0 rgba(255,255,255,0.08);
  white-space: nowrap;
}
.tag::before, .tag::after {
  content: ""; position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.45);
  top: 4px; left: 4px; box-shadow: calc(100% - 0px) 0 0 transparent;
}
.tag::after { left: auto; right: 4px; }
.tag i { position: absolute; bottom: 4px; width: 3px; height: 3px; border-radius: 50%; background: rgba(255,255,255,0.45); }
.tag i:first-child { left: 4px; } .tag i:last-child { right: 4px; }

/* Pastilles d'état */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line-2); color: var(--ink-2); background: rgba(255,255,255,0.03); white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ready { color: #cfd0ff; border-color: rgba(147,138,245,.35); }
.pill.scheduled { color: var(--moon-3); border-color: rgba(147,138,245,.45); background: rgba(91,76,253,.12); }
.pill.publishing { color: #fff; border-color: rgba(255,255,255,.4); }
.pill.published { color: var(--ok); border-color: rgba(88,214,164,.35); }
.pill.failed { color: var(--err); border-color: rgba(255,122,138,.35); }
.pill.draft { color: var(--muted); }
.pill.off { color: var(--muted); }
.pill.on { color: var(--ok); border-color: rgba(88,214,164,.35); }

/* ─── Boutons & champs ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(255,255,255,0.04);
  font-weight: 600; font-size: 14px; letter-spacing: -0.005em; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.24); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .field:focus-visible, .icon-btn:focus-visible { outline: 2px solid var(--moon-3); outline-offset: 2px; }
.btn.primary {
  background: linear-gradient(180deg, #6f61ff, #5243f0); border-color: rgba(190,184,255,.55); color: #fff;
  box-shadow: 0 8px 30px -8px rgba(91, 76, 253, 0.8), inset 0 1px 0 rgba(255,255,255,0.3);
}
.btn.primary:hover { background: linear-gradient(180deg, #7b6eff, #5b4cfd); }
.btn.glow { background: #fff; color: #0a0b1e; border-color: #fff; box-shadow: 0 0 22px rgba(200,195,255,.7); }
.btn.danger { color: var(--err); border-color: rgba(255,122,138,.3); }
.btn.danger:hover { background: rgba(255,122,138,.08); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.icon-btn { /* le bouton rond « X » */
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: linear-gradient(180deg, #33363f, #24262e); border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 0 0 5px rgba(12,13,20,.7), inset 0 1px 0 rgba(255,255,255,.1); color: #fff;
}
.icon-btn.sm { width: 38px; height: 38px; box-shadow: 0 0 0 3px rgba(12,13,20,.7), inset 0 1px 0 rgba(255,255,255,.1); }
.icon-btn svg { width: 45%; height: 45%; }

.field {
  width: 100%; min-height: 44px; padding: 10px 15px; border-radius: var(--r-md);
  background: rgba(6, 8, 22, 0.7); border: 1px solid var(--line-2); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field:focus { border-color: rgba(147,138,245,.7); box-shadow: 0 0 0 4px rgba(91,76,253,.18); outline: none; }
textarea.field { min-height: 92px; resize: vertical; line-height: 1.45; }
select.field { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
label.lbl { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 0 0 6px 2px; }
.form-row { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--moon-2); }

/* ─── Mise en page ─────────────────────────────────────────────────────────── */
#app { position: relative; z-index: 1; }
.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; padding: 26px 16px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(5,9,20,.75), rgba(5,9,20,.45));
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; }
.brand-mark { width: 36px; height: 36px; border-radius: 50%; position: relative; background: radial-gradient(circle at 50% 50%, #04060f 58%, transparent 60%); box-shadow: inset 0 6px 10px -2px rgba(160,150,255,.95), 0 -4px 18px rgba(91,76,253,.8); }
.brand-name { font-stretch: 125%; letter-spacing: -0.04em; font-size: 21px; font-weight: 500; }
.brand-name b { font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; color: var(--ink-2);
  font-weight: 550; font-size: 14.5px; border: 1px solid transparent;
}
.nav a svg { width: 18px; height: 18px; opacity: .8; flex: none; }
.nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.nav a.on { color: #fff; background: linear-gradient(180deg, rgba(91,76,253,.22), rgba(91,76,253,.08)); border-color: rgba(147,138,245,.3); box-shadow: 0 0 24px -8px rgba(91,76,253,.7); }
.nav .sep { height: 1px; background: var(--line); margin: 10px 8px; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--moon-3); font-weight: 700; }
.side-foot { margin-top: auto; padding: 12px; border-radius: 18px; border: 1px solid var(--line); background: rgba(255,255,255,.02); display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: linear-gradient(180deg, #2c2a6e, #1a1845); border: 1px solid rgba(147,138,245,.4); flex: none; }
.side-foot .who { min-width: 0; flex: 1; }
.side-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; }
.side-foot .who small { color: var(--muted); font-size: 12px; }

.main { padding: 34px clamp(16px, 3.5vw, 48px) 120px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head p { margin: 8px 0 0; color: var(--muted); font-weight: 500; max-width: 60ch; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }
.grid { display: grid; gap: 18px; }
.g-stats { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.g-cards { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.g-media { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.g-2 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .g-2 { grid-template-columns: 1fr; } }
.pad { padding: 24px; }
.pad-lg { padding: 30px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 34px 0 14px; }

.stat { padding: 22px 24px; border-radius: var(--r-lg); }
.stat .v { font-stretch: 125%; font-size: 38px; letter-spacing: -0.04em; font-weight: 450; line-height: 1.05; margin-top: 10px; }
.stat .k { color: var(--muted); font-weight: 600; font-size: 13.5px; }

/* Carte de compte */
.acc { padding: 22px; border-radius: 28px; cursor: pointer; transition: transform .15s, border-color .15s; display: flex; flex-direction: column; gap: 16px; }
.acc:hover { transform: translateY(-2px); border-color: rgba(147,138,245,.35); }
.acc-top { display: flex; align-items: center; gap: 14px; }
.acc-ava { width: 50px; height: 50px; border-radius: 50%; flex: none; display: grid; place-items: center; font-stretch: 125%; font-weight: 600; font-size: 18px; background: radial-gradient(circle at 50% 120%, rgba(108,93,254,.9), #14123a 70%); border: 1px solid rgba(147,138,245,.45); overflow: hidden; }
.acc-ava img { width: 100%; height: 100%; object-fit: cover; }
.acc h3 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc-stats div { padding: 10px 12px; border-radius: 14px; background: rgba(6,8,22,.55); border: 1px solid var(--line); }
.acc-stats b { display: block; font-stretch: 120%; font-size: 20px; font-weight: 500; letter-spacing: -0.03em; }
.acc-stats span { color: var(--muted); font-size: 12px; font-weight: 600; }

/* Carte de contenu */
.media-card { border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; }
.media-thumb { position: relative; aspect-ratio: 4 / 5; background: #06071a; overflow: hidden; }
.media-thumb video, .media-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-thumb .tag { position: absolute; left: 14px; top: 14px; }
.media-thumb .pill { position: absolute; right: 12px; top: 14px; background: rgba(5,9,20,.75); backdrop-filter: blur(6px); }
.media-thumb .play { position: absolute; inset: auto 12px 12px auto; }
.media-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.media-body textarea { min-height: 76px; font-size: 14px; }
.media-body .err { color: var(--err); font-size: 13px; font-weight: 500; }
.media-name { font-size: 13px; color: var(--muted); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dépôt / upload — reprend la carte « Project Brief.txt » */
.drop {
  border: 1.5px dashed rgba(147,138,245,.35); border-radius: var(--r-lg); padding: 30px; text-align: center; cursor: pointer;
  background: radial-gradient(90% 120% at 50% 120%, rgba(91,76,253,.18), transparent 60%), rgba(6,8,22,.45);
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: rgba(190,184,255,.8); background: radial-gradient(90% 120% at 50% 120%, rgba(91,76,253,.32), transparent 60%), rgba(6,8,22,.55); }
.drop h3 { margin-bottom: 6px; }
.upload-card { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 22px 18px; border-radius: 30px; }
.file-ico { position: relative; width: 74px; height: 88px; }
.file-ico .sheet { position: absolute; right: 0; top: 0; width: 62px; height: 84px; border-radius: 10px 22px 10px 10px; background: linear-gradient(160deg, rgba(70,80,190,.55), rgba(24,26,52,.95) 55%); border: 1px solid rgba(255,255,255,.12); overflow: hidden; }
.file-ico .sheet::after { content: ""; position: absolute; right: -1px; top: -1px; width: 20px; height: 20px; background: linear-gradient(225deg, transparent 50%, #6b6d80 50%); border-bottom-left-radius: 6px; }
.file-ico .tag { position: absolute; left: -10px; bottom: 12px; padding: 3px 9px; font-size: 11px; }
.upload-card .fname { font-stretch: 125%; letter-spacing: -0.035em; font-size: 20px; font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upload-card .progress { grid-column: 1 / -1; padding: 16px 20px 18px; }
.upload-card .progress .row { margin-bottom: 12px; }

/* Démultiplicateur */
.variant { padding: 18px; border-radius: 22px; cursor: pointer; border: 1px solid var(--line); background: rgba(10, 12, 30, .6); transition: all .15s; position: relative; user-select: none; }
.variant:hover { border-color: rgba(147,138,245,.4); }
.variant.on { border-color: rgba(190,184,255,.75); background: linear-gradient(180deg, rgba(91,76,253,.25), rgba(91,76,253,.08)); box-shadow: 0 0 30px -10px rgba(91,76,253,.9); }
.variant .n { font-stretch: 125%; font-size: 13px; color: var(--moon-3); font-weight: 700; }
.variant h3 { margin: 6px 0 6px; font-size: 16px; }
.variant p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.variant .tick { position: absolute; top: 14px; right: 14px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.variant.on .tick { background: #fff; border-color: #fff; box-shadow: 0 0 14px rgba(200,195,255,.9); color: #0a0b1e; }
.g-variants { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.seg { display: inline-flex; padding: 4px; border-radius: 99px; background: rgba(6,8,22,.7); border: 1px solid var(--line-2); }
.seg button { border: 0; background: transparent; height: 34px; min-width: 40px; padding: 0 12px; border-radius: 99px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: #fff; color: #0a0b1e; box-shadow: 0 0 16px rgba(200,195,255,.7); }
.out { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); background: rgba(6,8,22,.6); position: relative; }
.out video { width: 100%; aspect-ratio: 9/14; object-fit: cover; display: block; background: #000; }
.out .cap { padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.out.sel { border-color: rgba(190,184,255,.8); box-shadow: 0 0 26px -8px rgba(91,76,253,.9); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: rgba(91,76,253,.16); color: #cfcaff; border: 1px solid rgba(147,138,245,.3); }

/* Onglets */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 5px; border-radius: 99px; background: rgba(6,8,22,.6); border: 1px solid var(--line); width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: none; cursor: pointer; padding: 8px 16px; border-radius: 99px; font-weight: 600; font-size: 13.5px; color: var(--ink-2); display: inline-flex; gap: 8px; align-items: center; }
.tabs button b { font-size: 12px; color: var(--moon-3); }
.tabs button.on { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 1px rgba(147,138,245,.35); }

/* Listes */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .thumb { width: 46px; height: 58px; border-radius: 10px; overflow: hidden; background: #06071a; flex: none; border: 1px solid var(--line); }
.li .thumb video, .li .thumb img { width: 100%; height: 100%; object-fit: cover; }
.li .t { min-width: 0; flex: 1; }
.li .t div { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li .t small { color: var(--muted); font-weight: 500; }
.day { font-stretch: 125%; letter-spacing: -0.03em; font-size: 15px; color: var(--ink-2); margin: 26px 0 8px; text-transform: capitalize; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

.instr { padding: 20px 22px; border-radius: 24px; }
.instr .body { white-space: pre-wrap; color: var(--ink-2); margin-top: 10px; font-size: 14.5px; }
.instr.pinned { border-color: rgba(147,138,245,.45); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.notice { padding: 14px 18px; border-radius: 18px; border: 1px solid rgba(242,179,92,.35); background: rgba(242,179,92,.07); color: #f6d3a3; font-size: 14px; font-weight: 500; }
.notice.info { border-color: rgba(147,138,245,.35); background: rgba(91,76,253,.08); color: #d6d3ff; }
.secret { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; letter-spacing: .04em; padding: 14px 16px; border-radius: 14px; background: #04060f; border: 1px solid rgba(147,138,245,.5); text-align: center; user-select: all; }

/* Modale */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(2, 4, 12, .7); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; animation: fade .15s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 28px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
@keyframes fade { from { opacity: 0; } }

/* Toasts */
.toasts { position: fixed; z-index: 60; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.toast { padding: 13px 18px; border-radius: 16px; background: rgba(20, 22, 40, .95); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -10px #000; font-weight: 600; font-size: 14px; animation: fade .2s; max-width: 380px; }
.toast.err { border-color: rgba(255,122,138,.5); color: #ffd0d6; }
.toast.ok { border-color: rgba(147,138,245,.6); }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .card { width: min(460px, 100%); padding: 34px; }
.login .brand { justify-content: center; padding-bottom: 8px; }
.login h1 { text-align: center; font-size: 30px; margin: 8px 0 6px; }
.login p.sub { text-align: center; color: var(--muted); margin: 0 0 26px; font-weight: 500; }

/* Mobile */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); gap: 4px; }
  .brand { padding: 0 8px 0 2px; }
  .brand-name, .brand-sub, .side-foot, .nav .sep, .nav .count { display: none; }
  .nav { display: flex; gap: 2px; }
  .nav a { padding: 9px 11px; font-size: 13px; white-space: nowrap; }
  .tabs { border-radius: 22px; }
  .nav a span { display: none; }
  .nav a.on span { display: inline; }
  .main { padding-top: 22px; }
  .upload-card { grid-template-columns: auto 1fr; }
  .upload-card .icon-btn { display: none; }
  .stat .v { font-size: 30px; }
}

/* ─── Avatars « lune » : bleu = Instagram lié, rouge = non lié ─────────────── */
:root { --blood: #ff4d62; --blood-2: #ff8a98; }
.moon-ava {
  --g: rgba(108, 93, 254, 0.95); --rim: #938af5; --rim-2: #e4e1ff;
  position: relative; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 85%, #1b1850 0%, #0a0b27 45%, #04060f 100%);
  isolation: isolate;
}
.moon-ava > img, .moon-ava > span { grid-area: 1 / 1; }
.moon-ava > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; position: relative; z-index: 2; }
.moon-ava > span { font-stretch: 125%; font-weight: 600; letter-spacing: -0.03em; color: var(--ink); z-index: 1; }
/* liseré lumineux qui tourne, comme la lune du fond */
.moon-ava::before {
  content: ""; position: absolute; inset: -4px; border-radius: 50%; z-index: 3; pointer-events: none;
  background: conic-gradient(from 200deg, color-mix(in srgb, var(--rim) 35%, transparent), var(--rim-2) 14%, var(--rim) 30%, color-mix(in srgb, var(--rim) 30%, transparent) 50%, var(--rim) 74%, color-mix(in srgb, var(--rim) 35%, transparent) 92%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2.6px), #000 calc(100% - 2px));
          mask: radial-gradient(closest-side, transparent calc(100% - 2.6px), #000 calc(100% - 2px));
  animation: moon-spin 14s linear infinite;
}
/* halo qui respire */
.moon-ava::after {
  content: ""; position: absolute; inset: -1px; border-radius: 50%; z-index: 0; pointer-events: none;
  box-shadow: 0 0 16px 3px var(--g), 0 0 40px 8px color-mix(in srgb, var(--g) 50%, transparent);
  animation: ava-breathe 3.8s ease-in-out infinite alternate;
}
@keyframes ava-breathe { from { opacity: .55; transform: scale(.98); } to { opacity: 1; transform: scale(1.03); } }
.moon-ava.unlinked {
  --g: rgba(255, 60, 85, 0.85); --rim: var(--blood); --rim-2: #ffd0d6;
  background: radial-gradient(circle at 50% 85%, #4a0f1c 0%, #1a0710 50%, #06030a 100%);
}
.moon-ava.unlinked > span { color: #ffd4da; font-weight: 500; text-shadow: 0 0 12px rgba(255, 77, 98, .8); }
.moon-ava.neutral { --g: rgba(143, 147, 176, 0.25); --rim: #8f93b0; --rim-2: #c3c5da; }
.moon-ava.neutral::before { animation: none; opacity: .5; }

/* la carte du compte prend une légère teinte de sa lune */
.acc.linked { border-color: rgba(147, 138, 245, .22); }
.acc.unlinked {
  border-color: rgba(255, 77, 98, .28);
  background:
    radial-gradient(120% 90% at 50% 120%, rgba(255, 60, 85, 0.16), transparent 60%),
    linear-gradient(180deg, rgba(26, 28, 42, 0.86), rgba(15, 17, 30, 0.86));
}
.acc.unlinked:hover { border-color: rgba(255, 77, 98, .5); }
.li .moon-ava { margin-right: 2px; }
@media (prefers-reduced-motion: reduce) { .moon-ava::before, .moon-ava::after { animation: none; } }

/* ─── Banque ───────────────────────────────────────────────────────────────── */
.bank-up { margin-bottom: 22px; }
.bank-up-row { gap: 12px; margin-bottom: 14px; }
.bank-filters { display: flex; flex-direction: column; gap: 14px; margin-bottom: 22px; }
.acc-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.acc-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 8px; border-radius: 99px; cursor: pointer;
  border: 1px solid var(--line-2); background: rgba(6, 8, 22, .6); color: var(--ink-2); font-weight: 600; font-size: 14px;
  transition: all .15s;
}
.acc-chip:hover { border-color: rgba(147, 138, 245, .45); color: #fff; }
.acc-chip b { color: var(--moon-3); font-size: 12.5px; }
.acc-chip.on { color: #fff; border-color: rgba(190, 184, 255, .7); background: linear-gradient(180deg, rgba(91, 76, 253, .28), rgba(91, 76, 253, .1)); box-shadow: 0 0 26px -8px rgba(91, 76, 253, .9); }
.acc-chip .moon-ava::after { box-shadow: 0 0 8px 1px var(--g); }
.acc-chip-all { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .06); }
.acc-chip-all svg { width: 14px; height: 14px; }
.bank-section { margin-bottom: 34px; }
.bank-section-head { display: flex; align-items: center; gap: 14px; margin: 6px 0 16px; }
.bank-section-head h2 { font-size: 19px; }
.thumb-acc {
  position: absolute; left: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 8px; padding: 3px 12px 3px 3px;
  border-radius: 99px; background: rgba(5, 9, 20, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .1); color: #fff; font-size: 12.5px; font-weight: 600; max-width: calc(100% - 24px);
}
.thumb-acc span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb-acc .moon-ava::after { box-shadow: 0 0 8px 1px var(--g); }
.field.sm-field { min-height: 38px; padding: 6px 34px 6px 12px; font-size: 13.5px; }
.bank-card .btn.danger svg { width: 14px; height: 14px; }
.slot-pop {
  position: fixed; z-index: 70; width: 270px; padding: 10px; border-radius: 22px; display: flex; flex-direction: column; gap: 4px;
  animation: fade .12s; box-shadow: 0 30px 80px -20px #000, 0 0 40px -12px rgba(91, 76, 253, .7);
}
.slot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; background: none; cursor: pointer; text-align: left; font-weight: 600; font-size: 14px; color: var(--ink); }
.slot small { color: var(--muted); font-weight: 500; font-size: 12px; white-space: nowrap; }
.slot:hover { background: rgba(255, 255, 255, .06); border-color: rgba(147, 138, 245, .3); }
.slot.best { background: linear-gradient(180deg, rgba(91, 76, 253, .3), rgba(91, 76, 253, .12)); border-color: rgba(190, 184, 255, .55); }
.slot.best small { color: #d6d3ff; }
.slot-custom { display: flex; gap: 8px; padding: 8px 2px 2px; border-top: 1px solid var(--line); margin-top: 4px; }
.slot-custom .field { min-height: 36px; padding: 6px 10px; font-size: 13px; }
.bank-card .row > .field.sm-field { width: auto; flex: 0 0 auto; }
.bank-card .row > .field.sm-field.grow { flex: 1 1 0; min-width: 0; }
.slot-pop { background: linear-gradient(180deg, #1a1c2c, #10121f); backdrop-filter: none; }
