/* RR Social — habillage « régie » : la charte des lives et de la chaîne YouTube.
 * Encre, papier, un rouge d'antenne, du jaune au feutre. Étiquettes de travers en
 * détourage « sticker » (liseré + ombre portée dure), accolades machine à écrire.
 * Rien de lisse, rien de dégradé — sauf le grain du fond. */

@font-face { font-family: 'Anton'; src: url('/static/fonts/Anton-Regular.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/static/fonts/SpaceGrotesk-Var.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url('/static/fonts/SpaceMono-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Mono'; src: url('/static/fonts/SpaceMono-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Permanent Marker'; src: url('/static/fonts/PermanentMarker-Regular.woff2') format('woff2'); font-display: swap; }

:root {
  --ink: #14100a;
  --ink-2: #1c160f;
  --ink-3: #261e15;
  --ink-4: #33291d;
  --line: #3d3224;
  --line-2: #54452f;
  --paper: #f3e9d6;
  --paper-2: #d9cdb6;
  --muted: #a99f8c;
  --faint: #7a6f5c;
  --red: #e3261b;
  --red-2: #ff4434;
  --red-ink: #ff6b5e;
  --yellow: #ffc61a;
  --green: #4cbb5c;
  --orange: #f0902a;
  --fb: #3f7fe0; --ig: #c94a8c; --yt: #c87418; --x: #2b9a8a;
  --display: 'Anton', 'Arial Narrow', sans-serif;
  --text: 'Space Grotesk', system-ui, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --marker: 'Permanent Marker', 'Comic Sans MS', cursive;
  --hard: 4px 4px 0 #000;
  --hard-s: 3px 3px 0 #000;
  --side: 248px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background-color: var(--ink);
  /* Grain de papier carbone : un bruit SVG très bas, fixe. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 .93 0 0 0 0 .84 0 0 0 .05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color: var(--paper);
  font: 15px/1.5 var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--red); color: var(--paper); }
code { font-family: var(--mono); font-size: .86em; background: var(--ink-4); padding: 1px 6px; border-radius: 3px; color: var(--yellow); }
.rough-s { filter: url(#rr-rough-s); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* ── Signatures de la charte ─────────────────────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 7px; font-family: var(--display); text-transform: uppercase; line-height: 1; font-size: var(--logo, 21px); text-decoration: none; white-space: nowrap; }
.logo b { font-weight: 400; }
.logo b + b { background: var(--red); color: var(--paper); padding: .1em .32em .14em; box-shadow: 3px 3px 0 #000; transform: rotate(-1.4deg); }
.kicker { display: inline-block; font: 700 11.5px/1 var(--mono); letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.kicker::before { content: '[ '; color: var(--red-ink); }
.kicker::after { content: ' ]'; color: var(--red-ink); }
.sticker { display: inline-block; background: var(--paper); color: var(--ink); font: 700 12px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; padding: 6px 10px 7px; box-shadow: var(--hard-s); transform: rotate(var(--tilt, -1.5deg)); white-space: nowrap; }
.sticker.red { background: var(--red); color: var(--paper); }
.sticker.yellow { background: var(--yellow); }
.marker { font-family: var(--marker); color: var(--yellow); font-size: 18px; line-height: 1.1; transform: rotate(-2deg); display: inline-block; }
h1, .h1 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 4.2vw, 48px); line-height: 1; letter-spacing: .01em; margin: 6px 0 0; }
h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; letter-spacing: .02em; margin: 0 0 12px; line-height: 1.1; }
h3 { font: 700 11.5px/1.2 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px; }
.h-red { color: var(--red-2); }

/* ── Habillage : barre latérale + zone de travail ────────────────────── */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 16px; border-right: 1px solid var(--line); background: rgba(10, 8, 5, .55); }
.side .logo { --logo: 19px; padding: 0 6px; }
.side .tag-app { margin: -6px 0 0 8px; font: 400 15px/1 var(--marker); color: var(--yellow); transform: rotate(-3deg); width: max-content; }
.create { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--red); color: var(--paper); text-decoration: none; font: 400 18px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; padding: 12px 14px 13px; box-shadow: var(--hard); transition: transform .12s, box-shadow .12s; }
.create:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #000; background: var(--red-2); }
.create:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.create[aria-current] { outline: 2px solid var(--paper); outline-offset: 3px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 6px; text-decoration: none; color: var(--paper-2); font-weight: 600; font-size: 14.5px; }
.nav a svg { width: 19px; height: 19px; flex: none; opacity: .8; }
.nav a:hover { background: var(--ink-3); color: var(--paper); }
.nav a[aria-current="page"] { background: var(--ink-3); color: var(--paper); }
.nav a[aria-current="page"]::before { content: ''; position: absolute; left: -14px; top: 7px; bottom: 7px; width: 4px; background: var(--red); }
.nav .count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--red); color: var(--paper); font: 700 11px/20px var(--mono); text-align: center; }
.nav .count.warn { background: var(--yellow); color: var(--ink); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 6px 0; border-top: 1px solid var(--line); }
.me .av { width: 32px; height: 32px; border-radius: 50%; background: var(--ink-4); display: grid; place-items: center; font: 400 15px/1 var(--display); color: var(--yellow); flex: none; }
.me .who { min-width: 0; flex: 1; }
.me .who strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me .who small { color: var(--faint); font-size: 12px; }
.me form { margin: 0; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--paper-2); cursor: pointer; }
.icon-btn:hover { background: var(--ink-3); color: var(--paper); border-color: var(--line-2); }
.icon-btn svg { width: 17px; height: 17px; }
.ticker { overflow: hidden; white-space: nowrap; font: 700 10.5px/1 var(--mono); letter-spacing: .2em; color: var(--faint); text-transform: uppercase; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.ticker > span { display: inline-block; animation: tick 40s linear infinite; }
.ticker em { font-style: normal; color: var(--red-ink); }
@keyframes tick { to { transform: translateX(-50%); } }

.work { min-width: 0; padding: 26px clamp(16px, 3vw, 40px) 120px; }
/* Un seul en-tête de page partout : bandeau sur fond illustré (Studio garde son grand visuel animé). */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px 16px; flex-wrap: wrap; margin-bottom: 20px; position: relative; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); padding: 22px 22px 18px; background: linear-gradient(90deg, rgba(20,16,10,.95), rgba(20,16,10,.62)), var(--bg, url('/static/img/fond-2.webp')) center/cover; }
.page-head h1 { margin-top: 4px; }
.page-head .lead { color: var(--paper-2); max-width: 680px; margin: 8px 0 0; }

/* Mobile : barre d'onglets en bas, la latérale disparaît. Réglé pour iPhone 15 Pro Max (430 px) et
   Galaxy S25 Ultra (412 px) : encoche, île dynamique et barre de gestes via les env(safe-area-inset-*). */
.tabbar, .sheet { display: none; }
@media (max-width: 900px) {
  :root { --tabbar-h: 62px; }
  html { -webkit-text-size-adjust: 100%; }
  body { min-height: 100dvh; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .work { padding: 16px max(14px, env(safe-area-inset-right)) calc(var(--tabbar-h) + 34px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(20, 16, 10, .96); }
  .tabbar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); background: rgba(14, 11, 7, .98); border-top: 1px solid var(--line); padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left)); }
  .tabbar > a, .tabbar > button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: var(--tabbar-h); min-width: 0; text-decoration: none; color: var(--muted); font: 600 11px/1 var(--text); background: none; border: 0; padding: 0; position: relative; cursor: pointer; }
  .tabbar svg { width: 23px; height: 23px; }
  .tabbar [aria-current="page"] { color: var(--paper); }
  .tabbar [aria-current="page"]::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; background: var(--red); }
  .tabbar a.plus::before { display: none; }
  .tabbar a.plus span:first-child { width: 50px; height: 50px; margin-top: -24px; background: var(--red); color: var(--paper); display: grid; place-items: center; box-shadow: var(--hard-s); transform: rotate(-3deg); }
  .tabbar a.plus svg { width: 26px; height: 26px; }
  .tabbar .count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--red); color: var(--paper); font: 700 10px/17px var(--mono); text-align: center; padding: 0 4px; }
  .tabbar .count.warn { background: var(--yellow); color: var(--ink); }
  .sheet[open] { display: block; position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; border: 0; border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; background: var(--ink-2); color: var(--paper); padding: 8px max(16px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); animation: sheet-up .18s ease-out; }
  .sheet::backdrop { background: rgba(0, 0, 0, .55); }
  .sheet-grip { width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 12px; }
  .sheet-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
  .sheet-nav a { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; font-weight: 600; position: relative; }
  .sheet-nav a svg { width: 22px; height: 22px; flex: none; }
  .sheet-nav a[aria-current="page"] { border-color: var(--red); background: var(--ink-3); }
  .sheet-nav .count { margin-left: auto; min-width: 20px; height: 20px; border-radius: 10px; background: var(--yellow); color: var(--ink); font: 700 11px/20px var(--mono); text-align: center; padding: 0 6px; }
  .sheet .me { padding-top: 12px; }
  .sheet .me .btn svg { margin-right: 2px; }
  /* iOS zoome sur tout champ dont le texte fait moins de 16 px. */
  input, select, textarea, [contenteditable="true"] { font-size: 16px !important; }
  .btn { min-height: 42px; }
  .btn-small { min-height: 38px; }
  .icon-btn { width: 40px; height: 40px; }
  .seg { overflow-x: auto; scrollbar-width: none; max-width: 100%; }
  .seg::-webkit-scrollbar { display: none; }
  .page-banner, .page-head { padding: 16px 14px 14px; margin-bottom: 14px; }
  .page-head .lead, .page-banner .lead { font-size: 14px; }
  dialog:not(.sheet) { max-height: calc(100dvh - env(safe-area-inset-top) - 16px); }
  .tabs-line, .fmt-tabs { scrollbar-width: none; }
  .tabs-line::-webkit-scrollbar, .fmt-tabs::-webkit-scrollbar { display: none; }
  .panel { padding: 14px; }
}
@media (max-width: 600px) {
  /* L'intro des bandeaux redit le menu : on la garde pour l'écran large. */
  .page-head .lead, .page-banner .lead { display: none; }
  .page-head h1, .page-banner h1 { font-size: 34px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@media (min-width: 901px) { .mobile-top { display: none; } }

/* ── Boutons et champs ───────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1.5px solid var(--paper-2); background: transparent; color: var(--paper); padding: 8px 14px; font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer; text-decoration: none; border-radius: 3px; transition: background .12s, transform .12s, box-shadow .12s; white-space: nowrap; }
.btn:hover { background: var(--ink-3); }
.btn svg { width: 16px; height: 16px; }
.btn-red { background: var(--red); border-color: var(--red); box-shadow: var(--hard-s); }
.btn-red:hover { background: var(--red-2); border-color: var(--red-2); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 #000; }
.btn-red:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: var(--hard-s); }
.btn-paper:hover { background: #fff; }
.btn-ghost { border-color: var(--line-2); color: var(--paper-2); }
.btn-small { padding: 5px 10px; font-size: 13px; }
.btn[disabled], .btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
button.link { background: none; border: 0; padding: 0; cursor: pointer; color: var(--yellow); text-decoration: underline; font-weight: 600; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13.5px; margin-bottom: 14px; color: var(--paper-2); }
label small { font-weight: 400; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), textarea, select {
  width: 100%; background: var(--ink-2); border: 1.5px solid var(--line); color: var(--paper); padding: 10px 12px; border-radius: 4px; font-weight: 400; transition: border-color .12s, box-shadow .12s;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--paper-2); box-shadow: 0 0 0 3px rgba(227, 38, 27, .25); }
input::placeholder, textarea::placeholder { color: var(--faint); }
textarea { resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23a99f8c' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--red); }
label.check { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; }
label.inline { flex-direction: row; align-items: center; gap: 10px; }
label.inline select { width: auto; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 0 14px; }
.stack { display: flex; flex-direction: column; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* Interrupteurs et contrôles segmentés */
.switch { display: flex; flex-direction: row; align-items: center; gap: 10px; font-weight: 500; cursor: pointer; margin: 10px 0 0; position: relative; color: var(--paper-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { flex: none; width: 38px; height: 22px; border-radius: 22px; background: var(--ink-4); border: 1px solid var(--line-2); position: relative; transition: background .2s; }
.switch .slider::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper-2); transition: transform .2s cubic-bezier(.3, 1.4, .5, 1); }
.switch input:checked + .slider { background: var(--red); border-color: var(--red); }
.switch input:checked + .slider::after { transform: translateX(16px); background: var(--paper); }
.switch input:focus-visible + .slider { outline: 2px solid var(--yellow); outline-offset: 2px; }
.seg { display: inline-flex; flex-wrap: wrap; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 3px; gap: 2px; }
.seg button, .seg a { border: 0; background: none; padding: 7px 12px; border-radius: 4px; cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; }
.seg button:hover, .seg a:hover { color: var(--paper); }
.seg button[aria-checked="true"], .seg button[aria-selected="true"], .seg a[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: 2px 2px 0 #000; }
.field { margin: 12px 0 0; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; accent-color: var(--red); }
.range-row output { font: 400 24px/1 var(--display); min-width: 2ch; text-align: right; color: var(--yellow); }
input.num { width: 130px !important; font-family: var(--mono); }
.hint { font-size: 12.5px; color: var(--muted); margin: 7px 0 0; line-height: 1.45; }
kbd { font-family: var(--mono); font-size: 11px; border: 1px solid currentColor; border-radius: 3px; padding: 0 4px; opacity: .75; margin-left: 4px; }

/* ── Cartes, listes, états ───────────────────────────────────────────── */
.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.panel-head a { font-size: 13px; color: var(--muted); text-decoration: none; }
.panel-head a:hover { color: var(--paper); }
.alert, .warn, .success, .note { padding: 9px 12px; border-radius: 4px; margin: 8px 0; font-size: 14px; }
.alert { background: rgba(227, 38, 27, .14); border-left: 3px solid var(--red); }
.warn { background: rgba(255, 198, 26, .1); border-left: 3px solid var(--yellow); }
.success { background: rgba(76, 187, 92, .12); border-left: 3px solid var(--green); }
.note { background: var(--ink-3); border-left: 3px solid var(--line-2); }
.note.live { animation: blink 1.6s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .6; } }
.empty { color: var(--muted); padding: 18px 4px; text-align: center; }
.empty .marker { display: block; margin-bottom: 6px; }
.pill { display: inline-flex; align-items: center; gap: 6px; font: 700 10.5px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; background: var(--ink-4); color: var(--paper-2); white-space: nowrap; flex: none; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.p-published { color: var(--green); background: rgba(76, 187, 92, .12); }
.p-scheduled, .p-queued, .p-publishing, .p-pending { color: var(--yellow); background: rgba(255, 198, 26, .1); }
.p-failed { color: var(--red-ink); background: rgba(227, 38, 27, .14); }
.p-partial { color: var(--orange); background: rgba(240, 144, 42, .12); }
.p-draft { color: var(--muted); }
.net { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font: 700 12px/1 var(--text); flex: none; }
.net-facebook { background: var(--fb); } .net-instagram { background: var(--ig); } .net-youtube { background: var(--yt); } .net-x { background: var(--x); }
.net svg { width: 13px; height: 13px; }
.dots { display: inline-flex; gap: 4px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); display: inline-block; }
.dot.ok { background: var(--green); } .dot.ko { background: var(--red); } .dot.wait { background: var(--yellow); }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 4px; text-decoration: none; border-radius: 4px; }
a.row:hover { background: var(--ink-3); }
.row-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.row-main strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.row-main small { color: var(--muted); font-size: 12.5px; }
.thumb { width: 46px; height: 46px; object-fit: cover; flex: none; border-radius: 3px; background: var(--ink-4); }
.thumb-empty { display: grid; place-items: center; font: 400 15px/1 var(--display); color: var(--faint); }
.badges { display: flex; gap: 4px; flex: none; }
.tbadge { position: relative; opacity: .35; }
.tbadge.s-published, .tbadge.s-publishing, .tbadge.s-failed { opacity: 1; }
.tbadge.s-pending { opacity: .65; }
.tbadge.s-failed::after { content: '!'; position: absolute; right: -4px; top: -6px; background: var(--red); color: #fff; border-radius: 50%; width: 14px; height: 14px; font-size: 10px; display: grid; place-items: center; font-weight: 700; }
@media (max-width: 560px) { .row .badges { display: none; } }

/* ── Studio (accueil) ────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; padding: 24px 24px 20px; background: radial-gradient(120% 140% at 100% 0, rgba(227, 38, 27, .22), transparent 55%), var(--ink-2); margin-bottom: 18px; }
.hero::after { content: 'RR'; position: absolute; right: -10px; bottom: -48px; font: 400 220px/1 var(--display); color: transparent; -webkit-text-stroke: 2px rgba(243, 233, 214, .07); pointer-events: none; }
.hero h1 { font-size: clamp(30px, 4vw, 46px); }
.hero .marker { margin-top: 8px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.kpi { background: rgba(20, 16, 10, .6); border: 1px solid var(--line); border-radius: 5px; padding: 12px 14px; text-decoration: none; display: block; }
a.kpi:hover { border-color: var(--line-2); }
.kpi .v { font: 400 32px/1 var(--display); letter-spacing: .01em; display: block; margin-top: 6px; }
.kpi .d { font: 700 11.5px/1 var(--mono); margin-top: 6px; display: block; color: var(--muted); }
.kpi .d.up { color: var(--green); } .kpi .d.down { color: var(--red-ink); }
.kpi.alertk .v { color: var(--red-2); }
.studio { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1100px) { .studio { grid-template-columns: minmax(0, 1fr); } }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.week .day { background: var(--ink); border: 1px solid var(--line); border-radius: 4px; min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 5px; }
.week .day.today { border-color: var(--red); box-shadow: inset 0 3px 0 var(--red); }
.week .day header { display: flex; justify-content: space-between; font: 700 10.5px/1 var(--mono); letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.week .day header b { font: 400 17px/1 var(--display); color: var(--paper); }
/* Sur téléphone, la semaine défile à l'horizontale au lieu de s'empiler sur sept écrans. */
@media (max-width: 700px) { .week { grid-template-columns: repeat(7, 132px); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; margin: 0 -4px; padding: 0 4px 4px; } .week::-webkit-scrollbar { display: none; } .week .day { min-height: 96px; scroll-snap-align: start; } }
.chip-post { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 3px; background: var(--ink-3); border-left: 3px solid var(--yellow); font-size: 12px; text-decoration: none; overflow: hidden; }
.chip-post span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chip-post.published { border-left-color: var(--green); }
.chip-post.failed, .chip-post.partial { border-left-color: var(--red); }
.chip-post.draft { border-left-color: var(--faint); }
.chip-post.remote { opacity: .65; border-left-style: dashed; border-left-color: var(--muted); }
.chip-post time { font: 700 10px/1 var(--mono); color: var(--muted); }
.chip-post:hover { background: var(--ink-4); }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 10px; }
.acct { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.acct img.av, .acct .av { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; background: var(--ink-4); }
.acct .meta { min-width: 0; flex: 1; }
.acct .meta strong { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct .meta small { color: var(--muted); font-size: 12px; }
.acct.off { opacity: .6; border-style: dashed; }
.todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo li a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 5px; text-decoration: none; }
.todo li a:hover { border-color: var(--line-2); }
.todo .n { font: 400 22px/1 var(--display); min-width: 28px; text-align: center; }
.todo .n.red { color: var(--red-2); } .todo .n.yellow { color: var(--yellow); }

/* ── Sources (articles, vidéos) ──────────────────────────────────────── */
.sources { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 12px; }
.src { background: var(--ink); border: 1px solid var(--line); border-radius: 5px; overflow: hidden; display: flex; flex-direction: column; }
.src img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--ink-4); display: block; }
.src .b { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.src .b strong { font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.src .b small { color: var(--muted); font-size: 12px; }
.src .b .btn { margin-top: auto; align-self: flex-start; }

/* ── Calendrier ──────────────────────────────────────────────────────── */
.cal-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-bar .title { font: 400 26px/1 var(--display); text-transform: uppercase; min-width: 220px; }
.cal-bar .spacer { flex: 1; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.month .dow { padding: 8px; font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: var(--ink-2); border-bottom: 1px solid var(--line); }
.month .cell { min-height: 118px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; background: rgba(20, 16, 10, .5); transition: background .12s; }
.month .cell:nth-child(7n) { border-right: 0; }
.month .cell.other { opacity: .45; }
.month .cell.today .num { background: var(--red); color: var(--paper); padding: 2px 6px; }
.month .cell .num { font: 400 15px/1 var(--display); align-self: flex-start; }
.month .cell.drop { background: rgba(255, 198, 26, .08); outline: 2px dashed var(--yellow); outline-offset: -3px; }
.month .cell .add { opacity: 0; margin-left: auto; font-size: 16px; line-height: 1; color: var(--muted); text-decoration: none; }
.month .cell:hover .add { opacity: 1; }
.month .cell .top { display: flex; align-items: center; }
.chip-post[draggable="true"] { cursor: grab; }
@media (max-width: 760px) {
  .month { grid-template-columns: 1fr; }
  .month .dow { display: none; }
  .month .cell { min-height: 0; border-right: 0; }
  .month .cell.other, .month .cell.empty-day { display: none; }
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 4px; display: inline-block; }

/* ── Analytics ───────────────────────────────────────────────────────── */
.an-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 14px; }
.an-card { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 16px 16px 12px; position: relative; }
.an-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.an-card header h2 { margin: 0; font-size: 19px; }
.an-big { font: 400 40px/1 var(--display); display: flex; align-items: baseline; gap: 10px; margin: 8px 0 2px; }
.an-big small { font: 700 12px/1 var(--mono); color: var(--muted); }
.delta { font: 700 12px/1 var(--mono); }
.delta.up { color: var(--green); } .delta.down { color: var(--red-ink); } .delta.flat { color: var(--muted); }
.an-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-top: 10px; }
.an-metric { border-top: 1px solid var(--line); padding-top: 8px; }
.an-metric .l { font-size: 12px; color: var(--muted); }
.an-metric .v { font: 400 21px/1.1 var(--display); }
.spark { width: 100%; height: 64px; display: block; margin-top: 8px; overflow: visible; }
.chart { width: 100%; height: 220px; display: block; overflow: visible; }
.chart text, .spark text { font: 11px var(--mono); fill: var(--muted); }
.chart .grid line { stroke: var(--line); stroke-width: 1; }
.chart-wrap { position: relative; }
.tip { position: absolute; pointer-events: none; background: var(--paper); color: var(--ink); padding: 6px 9px; font: 12px/1.35 var(--text); box-shadow: var(--hard-s); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); z-index: 5; }
.tip b { font-family: var(--mono); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font: 700 10.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 9px 8px; border-bottom: 1px solid var(--line-2); white-space: nowrap; cursor: default; }
.table th button { all: unset; cursor: pointer; }
.table th button:hover { color: var(--paper); }
.table th[aria-sort] button::after { content: ' ↓'; color: var(--red-ink); }
.table th[aria-sort="ascending"] button::after { content: ' ↑'; }
.table td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table td.num { font-family: var(--mono); text-align: right; white-space: nowrap; }
.table th.num { text-align: right; }
.table tr:hover td { background: rgba(255, 255, 255, .02); }
.table .post { display: flex; align-items: center; gap: 10px; min-width: 240px; max-width: 420px; }
.table .post span { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell i { display: inline-block; height: 6px; border-radius: 0 3px 3px 0; background: var(--red); min-width: 2px; }
.heat { display: grid; grid-template-columns: 34px repeat(8, minmax(0, 1fr)); gap: 3px; font: 10.5px var(--mono); color: var(--muted); }
.heat .c { aspect-ratio: 1.6; border-radius: 2px; background: var(--ink-3); position: relative; }
.heat .c[data-v]:hover { outline: 1px solid var(--paper); }
.heat .h { text-align: center; }
.heat .d { align-self: center; }
.tabs-line { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs-line a, .tabs-line button { all: unset; cursor: pointer; padding: 10px 14px; font-weight: 700; font-size: 14px; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs-line a:hover, .tabs-line button:hover { color: var(--paper); }
.tabs-line [aria-current="page"], .tabs-line [aria-selected="true"] { color: var(--paper); border-bottom-color: var(--red); }

/* ── Boîte de réception ──────────────────────────────────────────────── */
.inbox { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.cmt { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 12px; padding: 14px; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; position: relative; }
.cmt.unread { border-left: 4px solid var(--red); }
.cmt.hidden-c { opacity: .55; }
.cmt .pthumb { width: 56px; height: 56px; object-fit: cover; border-radius: 3px; background: var(--ink-4); }
.cmt .top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.cmt .top strong { color: var(--paper); font-size: 14px; }
.cmt .txt { margin: 6px 0 8px; white-space: pre-wrap; word-break: break-word; font-size: 15px; }
.cmt .ctx { font-size: 12.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmt .ctx a { color: var(--muted); }
.cmt .reps { margin: 8px 0 0; padding: 0 0 0 12px; border-left: 2px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.cmt .reps div { font-size: 13.5px; }
.cmt .reps .mine b { color: var(--red-ink); }
.cmt .reply { display: flex; gap: 8px; margin-top: 10px; }
.cmt .reply textarea { min-height: 42px; height: 42px; }
.quick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick button { border: 1px dashed var(--line-2); background: none; color: var(--muted); padding: 4px 9px; border-radius: 14px; cursor: pointer; font-size: 12.5px; }
.quick button:hover { color: var(--paper); border-color: var(--paper-2); }
.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }

/* ── Compositeur ─────────────────────────────────────────────────────── */
.composer { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .95fr); gap: 18px; align-items: start; }
@media (max-width: 1050px) { .composer { grid-template-columns: 1fr; } }
.previews { position: sticky; top: 20px; max-height: calc(100vh - 140px); overflow: auto; }
@media (max-width: 1050px) { .previews { position: static; max-height: none; } }
.starter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.starter .btn { font-size: 13px; }
.drawer-pick { display: none; margin-bottom: 16px; }
.drawer-pick.open { display: block; }
.gab-list { display: flex; gap: 8px; flex-wrap: wrap; }
.gab { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--ink); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--paper); }
.gab:hover { border-color: var(--paper-2); }
.tagsets { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.tagsets button { border: 1px solid var(--line); background: var(--ink); color: var(--muted); border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 12.5px; }
.tagsets button:hover { color: var(--paper); border-color: var(--line-2); }
.drop { border: 2px dashed var(--line-2); padding: 14px; border-radius: 5px; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--yellow); background: rgba(255, 198, 26, .06); }
.drop p { margin: 0; }
.media-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.media-item { position: relative; background: var(--ink); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.media-item img, .media-item video { width: 100%; aspect-ratio: 1; object-fit: cover; background: #000; }
.media-item.uploading { padding: 10px; justify-content: center; gap: 8px; }
.media-item progress { width: 100%; accent-color: var(--red); }
.media-meta { font-size: 11.5px; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.media-meta .kind { font-weight: 700; color: var(--paper-2); }
.media-btns { display: flex; justify-content: space-between; padding: 0 4px 4px; }
.icon { background: var(--ink-3); border: 1px solid var(--line); width: 28px; height: 26px; cursor: pointer; border-radius: 3px; color: var(--paper-2); }
.icon:disabled { opacity: .3; cursor: default; }
.icon.danger:hover { background: var(--red); color: var(--paper); }
.nets { display: flex; flex-direction: column; gap: 8px; }
.net-card { border: 1px solid var(--line); border-radius: 5px; background: var(--ink); }
.net-card.on { border-color: var(--line-2); background: var(--ink-3); }
.net-toggle { flex-direction: row; align-items: center; gap: 10px; padding: 10px 12px; margin: 0; cursor: pointer; color: var(--paper); }
.net-opts { padding: 2px 12px 12px 41px; }
.net-opts label { margin-bottom: 10px; }
.pick-media { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.chip { flex-direction: row; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 14px; padding: 2px 10px; margin: 0; font-weight: 500; font-size: 12.5px; }
h2.sub { font: 700 11.5px/1 var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin: 22px 0 10px; }
.pv-nets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pv-net { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--ink); border-radius: 20px; padding: 4px 12px 4px 4px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--paper-2); }
.pv-net[aria-selected="true"] { border-color: var(--paper-2); background: var(--ink-3); color: var(--paper); }
.state { width: 8px; height: 8px; border-radius: 50%; }
.state-ok { background: var(--green); } .state-warn { background: var(--yellow); } .state-err { background: var(--red); }
.actionbar { position: fixed; left: var(--side); right: 0; bottom: 0; background: rgba(14, 11, 7, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--line); z-index: 35; }
@media (max-width: 900px) { .actionbar { left: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); } }
.actionbar-in { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; padding: 10px clamp(16px, 3vw, 40px); }
.actionbar .status { margin: 0 auto 0 0; font-size: 14px; min-width: 0; color: var(--muted); }
.actionbar .status.err { color: var(--red-ink); font-weight: 600; }
.actionbar .status.ok { color: var(--green); font-weight: 600; }
.schedule { display: inline-flex; gap: 6px; align-items: center; }
.schedule input { width: auto; color-scheme: dark; }
@media (max-width: 640px) {
  .actionbar-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; padding: 8px 12px; }
  .actionbar .status { grid-column: 1 / -1; margin: 0; font-size: 13px; order: -2; }
  .actionbar .status:empty { display: none; }
  .schedule { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; order: -1; }
  .schedule input { width: 100%; min-width: 0; }
  .actionbar .btn { width: 100%; }
}

/* Éditeur riche */
.rte { border: 1.5px solid var(--line); border-radius: 5px; background: var(--ink-2); position: relative; transition: border-color .12s, box-shadow .12s; }
.rte:focus-within { border-color: var(--paper-2); box-shadow: 0 0 0 3px rgba(227, 38, 27, .2); }
.rte textarea { border: 0 !important; background: transparent !important; box-shadow: none !important; border-radius: 0 0 5px 5px; font-size: 15px; padding: 12px 14px; min-height: 120px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--ink-3); border-radius: 5px 5px 0 0; }
.tb { min-width: 32px; height: 30px; padding: 0 8px; border: 1px solid transparent; background: none; border-radius: 4px; cursor: pointer; font-size: 14px; line-height: 1; color: var(--paper-2); display: inline-grid; place-items: center; }
.tb:hover { background: var(--ink-4); border-color: var(--line-2); color: var(--paper); }
.tb-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 4px; }
.vars { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.tb.var { font-family: var(--mono); font-size: 12px; background: rgba(255, 198, 26, .1); border-color: rgba(255, 198, 26, .35); color: var(--yellow); }
.tb-count { margin-left: auto; font: 11px var(--mono); color: var(--faint); padding: 0 6px; }
.tb-hint { position: absolute; right: 8px; top: 44px; font-size: 12px; background: var(--paper); color: var(--ink); padding: 3px 8px; box-shadow: var(--hard-s); pointer-events: none; z-index: 6; }
.tb-hint:empty { display: none; }
.emoji-pop { position: absolute; z-index: 30; top: 42px; left: 6px; width: min(340px, calc(100vw - 48px)); max-height: 330px; overflow: auto; background: var(--ink-2); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 6px 6px 0 #000; padding: 10px; }
.emoji-group { font: 700 10.5px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 10px 0 4px; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.tb.emoji { font-size: 19px; height: 34px; padding: 0; }

/* Détail d'une publication */
.media-strip { display: flex; gap: 10px; overflow-x: auto; margin-bottom: 18px; padding-bottom: 4px; }
.media-strip img, .media-strip video { height: 180px; border-radius: 4px; border: 1px solid var(--line); flex: none; max-width: 100%; }
.targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.target { background: var(--ink-2); border: 1px solid var(--line); padding: 14px 16px; border-radius: 6px; }
.target header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.target.s-failed { border-color: var(--red); }
pre.rendered { white-space: pre-wrap; word-break: break-word; font: 14px/1.5 var(--text); background: var(--ink); border: 1px solid var(--line); padding: 10px 12px; margin: 8px 0; max-height: 360px; overflow: auto; border-radius: 4px; }
.crumb { margin: 0 0 6px; font: 700 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.crumb a { text-decoration: none; color: var(--muted); }
.crumb a:hover { color: var(--paper); }

/* Réglages / formats */
.fmt { display: grid; grid-template-columns: 196px minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
@media (max-width: 1280px) { .fmt { grid-template-columns: minmax(0, 1fr) 380px; } .fmt-tabs { grid-column: 1 / -1; flex-direction: row !important; overflow-x: auto; position: static !important; } }
@media (max-width: 900px) { .fmt { grid-template-columns: 1fr; } }
.fmt-tabs { display: flex; flex-direction: column; gap: 6px; position: sticky; top: 20px; }
.fmt-tab { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; text-align: left; padding: 10px 12px; border: 1px solid var(--line); background: var(--ink-2); border-radius: 5px; cursor: pointer; position: relative; min-width: 160px; color: var(--paper); }
.fmt-tab .net { grid-row: 1 / 3; }
.fmt-tab-l { font-weight: 700; }
.fmt-tab-meta { grid-column: 2; font: 11px var(--mono); color: var(--muted); }
.fmt-tab[aria-selected="true"] { border-color: var(--paper-2); box-shadow: inset 4px 0 0 var(--red); background: var(--ink-3); }
.dirty-dot { position: absolute; right: 10px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.fmt-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.fmt-editor-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.fmt-editor-head .switch { margin: 0; }
.fsec { padding: 16px 0; border-top: 1px solid var(--line); }
.fmt-preview { position: sticky; top: 20px; display: flex; flex-direction: column; gap: 12px; max-height: calc(100vh - 130px); overflow: auto; padding-bottom: 8px; }
@media (max-width: 900px) { .fmt-preview { position: static; max-height: none; } }
.sample { padding: 0; }
.sample-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; background: none; border: 0; padding: 12px 14px; cursor: pointer; text-align: left; color: var(--paper); }
.sample-fields { padding: 0 14px 14px; }
.pv-tabs { display: flex; gap: 4px; }
.pv-tabs button { flex: 1; border: 1px solid var(--line); background: var(--ink-2); padding: 7px; border-radius: 4px; cursor: pointer; font-weight: 700; font-size: 13px; color: var(--paper-2); }
.pv-tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
pre.raw { max-height: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 12px; }
.card-edit { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 14px; }
.card-edit header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.card-edit header input { font-weight: 700; }
.acct-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; }
@media (max-width: 640px) { .acct-row { grid-template-columns: auto 1fr; } .acct-row .actions { grid-column: 1 / -1; } }
.acct-list { display: flex; flex-direction: column; gap: 12px; }
.invite-link .copy { display: flex; gap: 8px; }

/* Diagnostic et maquettes (ces dernières restent claires : c'est l'appli du réseau) */
.pv-diag { margin-top: 10px; }
.pv-meter { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.pv-meter-bar { height: 100%; background: var(--green); transition: width .2s; }
.pv-meter-bar.near { background: var(--yellow); } .pv-meter-bar.over { background: var(--red); }
.pv-count { font: 12px var(--mono); color: var(--muted); margin: 6px 0; }
.pv-count.over { color: var(--red-ink); font-weight: 700; }
.phone { width: 100%; max-width: 380px; margin: 0 auto; background: #fff; color: #050505; border-radius: 22px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 8px 8px 0 #000; overflow: hidden; font: 14.5px/1.38 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color-scheme: light; }
.phone button { font-family: inherit; }
.phone input, .phone textarea { color: #000; }
.mock { position: relative; }
.pv-text { white-space: pre-wrap; word-break: break-word; }
.pv-more { background: none; border: 0; padding: 0; color: #65676b; font-weight: 600; cursor: pointer; font-size: inherit; margin-left: 2px; }
.tok-link { color: #0064d1; }
.pv-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.pv-avatar-sm { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; }
.pv-avatar-rr { display: grid; place-items: center; background: #e3261b; color: #f3e9d6; font: 400 13px var(--display); }
.pv-vid { position: relative; background: #000; cursor: pointer; }
.pv-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; font-size: 22px; pointer-events: none; }
.pv-ph { background: repeating-linear-gradient(45deg, #eee, #eee 10px, #f6f6f6 10px, #f6f6f6 20px); }
.pv-card { display: flex; border-top: 1px solid #e4e6eb; border-bottom: 1px solid #e4e6eb; background: #f0f2f5; }
.pv-card-img { width: 96px; flex: none; background: #e3261b; color: #f3e9d6; display: grid; place-items: center; font: 30px var(--display); }
.pv-card-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-card-body small { color: #65676b; font-size: 12px; }
.pv-card-body strong { font-size: 15px; line-height: 1.25; }
.mock-fb .fb-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; }
.fb-who { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.fb-who strong { font-size: 15px; } .fb-who small { color: #65676b; font-size: 12.5px; }
.fb-dots { color: #65676b; font-weight: 700; letter-spacing: 1px; }
.mock-fb > .pv-text { padding: 0 12px 10px; font-size: 15px; }
.mock-fb .tok-tag { color: #0064d1; }
.fb-grid { display: grid; gap: 2px; background: #fff; }
.fb-m { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1; }
.fb-n1 .fb-m { aspect-ratio: auto; max-height: 470px; }
.fb-n2, .fb-n3, .fb-n4 { grid-template-columns: 1fr 1fr; }
.fb-n3 > :first-child { grid-column: 1 / 3; aspect-ratio: 16 / 10; }
.fb-n5 { grid-template-columns: repeat(6, 1fr); } .fb-n5 > :nth-child(-n+2) { grid-column: span 3; } .fb-n5 > :nth-child(n+3) { grid-column: span 2; }
.fb-more { position: relative; } .fb-more span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; font-size: 28px; font-weight: 700; }
.fb-stats { display: flex; justify-content: space-between; padding: 8px 12px; color: #65676b; font-size: 13px; }
.fb-actions { display: flex; justify-content: space-around; border-top: 1px solid #e4e6eb; margin: 0 12px; padding: 6px 0; color: #65676b; font-weight: 600; font-size: 14px; }
.fb-comment { display: flex; gap: 6px; padding: 8px 12px 12px; border-top: 1px solid #e4e6eb; }
.fb-bubble { background: #f0f2f5; border-radius: 16px; padding: 7px 12px; font-size: 14px; min-width: 0; }
.fb-bubble strong { display: block; font-size: 13px; }
.mock-ig .ig-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.mock-ig .ig-head strong { flex: 1; font-size: 14px; }
.ig-ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d62976; }
.ig-frame { position: relative; aspect-ratio: 4 / 5; background: #efefef; }
.ig-m { width: 100%; height: 100%; object-fit: cover; display: block; }
.ig-count { position: absolute; right: 10px; top: 10px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 12px; }
.ig-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); cursor: pointer; font-size: 18px; line-height: 1; color: #000; }
.ig-prev { left: 8px; } .ig-next { right: 8px; }
.ig-actions { display: flex; align-items: center; gap: 14px; padding: 8px 12px 4px; font-size: 22px; position: relative; }
.ig-dots { position: absolute; left: 50%; transform: translateX(-50%); display: flex; gap: 4px; }
.ig-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; } .ig-dots i.on { background: #0095f6; }
.ig-save { margin-left: auto; }
.ig-likes { margin: 0; padding: 0 12px; font-weight: 600; font-size: 14px; }
.mock-ig .pv-text { padding: 2px 12px; font-size: 14px; }
.mock-ig .tok-tag, .mock-ig .tok-at { color: #00376b; }
.mock-ig .tok-link { color: inherit; }
.ig-comments { margin: 4px 12px 0; color: #737373; font-size: 14px; }
.ig-first { padding: 2px 12px; font-size: 14px; white-space: pre-wrap; }
.ig-time { margin: 6px 12px 12px; font-size: 10.5px; color: #737373; letter-spacing: .02em; }
.mock-ig-story, .mock-ig-reel { aspect-ratio: 9 / 16; background: #111; color: #fff; overflow: hidden; }
.igs-m, .igr-m { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.igs-bars { position: absolute; top: 8px; left: 8px; right: 8px; height: 2px; background: rgba(255, 255, 255, .35); border-radius: 2px; }
.igs-bars span { display: block; width: 35%; height: 100%; background: #fff; }
.igs-head { position: absolute; top: 18px; left: 10px; right: 10px; display: flex; align-items: center; gap: 8px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.igs-head small { opacity: .8; }
.igs-foot { position: absolute; bottom: 12px; left: 10px; right: 10px; display: flex; align-items: center; gap: 14px; font-size: 20px; }
.igs-reply { flex: 1; border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; padding: 8px 14px; font-size: 13px; }
.igs-note { position: absolute; left: 10px; right: 10px; bottom: 62px; font-size: 12px; background: rgba(0, 0, 0, .55); padding: 6px 10px; border-radius: 8px; margin: 0; }
.igr-side { position: absolute; right: 10px; bottom: 90px; display: flex; flex-direction: column; gap: 16px; align-items: center; font-size: 24px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.igr-side small { display: block; font-size: 11px; text-align: center; }
.igr-foot { position: absolute; left: 12px; right: 60px; bottom: 16px; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.igr-who { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.igr-follow { border: 1px solid #fff; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.mock-ig-reel .pv-text { font-size: 13.5px; } .mock-ig-reel .pv-more { color: #fff; }
.mock-x { padding: 12px 14px 6px; }
.x-row { display: flex; gap: 10px; } .x-main { flex: 1; min-width: 0; }
.x-names { display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; }
.x-names strong { font-size: 15px; } .x-names small { color: #536471; font-size: 14px; }
.mock-x .pv-text { font-size: 15px; margin: 2px 0 10px; }
.mock-x .tok-link, .mock-x .tok-tag, .mock-x .tok-at { color: #1d9bf0; }
.x-grid { display: grid; gap: 2px; border-radius: 16px; overflow: hidden; border: 1px solid #cfd9de; margin-bottom: 10px; }
.x-n2, .x-n3, .x-n4 { grid-template-columns: 1fr 1fr; }
.x-n3 > :first-child { grid-row: 1 / 3; }
.x-m { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16 / 9; }
.x-n1 .x-m { aspect-ratio: auto; max-height: 420px; }
.x-n3 .x-m, .x-n4 .x-m { aspect-ratio: 1; }
.pv-card-x { border: 1px solid #cfd9de; border-radius: 16px; overflow: hidden; background: #fff; margin-bottom: 10px; }
.x-actions { display: flex; justify-content: space-between; color: #536471; font-size: 13px; padding: 2px 0 8px; }
.x-reply { display: flex; gap: 10px; border-top: 1px solid #eff3f4; padding: 10px 0 8px; }
.x-reply .pv-text { margin: 0; }
.yt-player { aspect-ratio: 16 / 9; background: #000; position: relative; }
.yt-m { width: 100%; height: 100%; } .yt-m video { object-fit: contain; }
.yt-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; color: #aaa; font-size: 30px; gap: 4px; }
.yt-empty small { font-size: 12px; }
.yt-body { padding: 12px; }
.yt-title { font-size: 17px; line-height: 1.3; margin: 0 0 4px; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yt-meta { color: #606060; font-size: 12.5px; margin: 0 0 10px; }
.yt-channel { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.yt-channel strong { flex: 1; font-size: 14px; }
.yt-sub { background: #0f0f0f; color: #fff; border-radius: 18px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.yt-desc { background: #f2f2f2; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.mock-yt .tok-link, .mock-yt .tok-tag { color: #065fd4; }
.yt-tags { font-size: 12px; color: #606060; margin: 8px 0 0; }

/* Connexion */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth-wrap::before { content: 'RR'; position: absolute; right: -4vw; bottom: -14vw; font: 400 46vw/1 var(--display); color: transparent; -webkit-text-stroke: 3px rgba(227, 38, 27, .16); pointer-events: none; }
.auth { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.auth .logo { --logo: 30px; }
.auth h1 { margin: 22px 0 6px; }
.auth .marker { margin-bottom: 18px; }
.auth form { background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; padding: 20px; box-shadow: 8px 8px 0 #000; }

dialog.confirm { border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper); padding: 20px; max-width: min(92vw, 440px); border-radius: 6px; box-shadow: 8px 8px 0 #000; }
dialog.confirm::backdrop { background: rgba(0, 0, 0, .6); }
dialog.confirm p { margin: 0 0 16px; font-weight: 600; }
.toast { position: fixed; right: 20px; bottom: 84px; z-index: 60; background: var(--paper); color: var(--ink); padding: 10px 14px; font-weight: 700; box-shadow: var(--hard); transform: rotate(-1deg); animation: toast-in .2s ease-out; }
@keyframes toast-in { from { transform: translateY(10px) rotate(-1deg); opacity: 0; } }
.skeleton { background: linear-gradient(90deg, var(--ink-3), var(--ink-4), var(--ink-3)); background-size: 200% 100%; animation: sk 1.2s linear infinite; border-radius: 4px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── Illustrations ───────────────────────────────────────────────────── */
.hero { min-height: 250px; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,16,10,.92) 0%, rgba(20,16,10,.7) 45%, rgba(20,16,10,.25) 100%); z-index: 0; }
.hero-in { position: relative; z-index: 1; }
.hero::after { z-index: 0; }
.add-day { margin-top: auto; align-self: center; color: var(--faint); text-decoration: none; font-size: 18px; opacity: 0; transition: opacity .15s; }
.day:hover .add-day, .add-day:focus-visible { opacity: 1; }
.tip-card { position: relative; overflow: hidden; }
.tip-card p { margin: 10px 0 0; position: relative; z-index: 1; }
.tip-card .splat { position: absolute; right: -40px; top: -40px; width: 170px; opacity: .22; pointer-events: none; transform: rotate(18deg); }
.mini-nets { display: inline-flex; gap: 2px; flex: none; }
.mn { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.mn-facebook { background: var(--fb); } .mn-instagram { background: var(--ig); } .mn-youtube { background: var(--yt); } .mn-x { background: var(--x); }
.empty-ill { text-align: center; padding: 26px 12px; position: relative; }
.empty-ill img { width: 120px; opacity: .35; display: block; margin: 0 auto -54px; }
.empty-ill .marker { font-size: 22px; position: relative; }
.empty-ill .muted { margin: 6px 0 12px; }
.page-banner { position: relative; overflow: hidden; border-radius: 6px; border: 1px solid var(--line); margin-bottom: 20px; padding: 22px 22px 18px; background: linear-gradient(90deg, rgba(20,16,10,.95), rgba(20,16,10,.6)), var(--bg, url('/static/img/fond-2.webp')) center/cover; }
.page-banner h1 { margin-top: 4px; }
.page-banner .lead { color: var(--paper-2); margin: 8px 0 0; max-width: 640px; }
.page-banner .actions { margin-top: 14px; }
.src .play { position: relative; display: block; }
.src .play::after { content: '▶'; position: absolute; left: 10px; bottom: 10px; background: var(--red); color: var(--paper); font-size: 12px; padding: 4px 8px; box-shadow: var(--hard-s); }
.src .stat { font: 700 11px/1 var(--mono); color: var(--yellow); letter-spacing: .06em; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.starter .btn[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.table a.post { text-decoration: none; } .table a.post:hover span:last-child { text-decoration: underline; }
.panel-head { flex-wrap: wrap; } .heat { min-width: 0; } .heat .c { aspect-ratio: auto; min-height: 18px; }

/* ── Pastilles de réseau : logos officiels sur la couleur de la marque ── */
.net { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; flex: none; }
.net svg { width: 56%; height: 56%; display: block; }
.net-facebook { background: #0866ff; }
.net-instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%); }
.net-youtube { background: #ff0033; }
.net-youtube svg { width: 62%; height: 62%; }
.net-x { background: #000; box-shadow: inset 0 0 0 1px #3d3224; }
.net-x svg { width: 48%; height: 48%; }
.net-twitch { background: #9146ff; }
.net-kick { background: #53fc18; color: #000; }
.net-bluesky { background: #1185fe; }
.net-discord { background: #5865f2; }
.fmt-tab .net, .an-card header .net { width: 30px; height: 30px; }
.acct .net { width: 22px; height: 22px; }
.mini-nets .net { width: 16px; height: 16px; } .mini-nets { gap: 3px; }
.legal { max-width: 760px; margin: 0 auto; padding: 32px 18px 80px; }
.legal h2 { margin-top: 28px; }
.legal a { color: var(--yellow); }
.legal li { margin-bottom: 6px; }

/* ── Vidéos YouTube ──────────────────────────────────────────────────── */
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.vcard { all: unset; cursor: pointer; display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: border-color .15s, transform .15s; }
.vcard:hover { border-color: var(--paper-2); transform: translateY(-2px); }
.vcard:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.vc-thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: #000; }
.vc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vc-dur { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.8); color: #fff; font: 700 11.5px/1 var(--mono); padding: 3px 5px; border-radius: 3px; }
.vc-live { position: absolute; left: 8px; top: 8px; background: var(--red); color: var(--paper); font: 700 11px/1 var(--mono); padding: 4px 7px; box-shadow: var(--hard-s); text-transform: uppercase; letter-spacing: .08em; }
.vc-body { display: flex; flex-direction: column; gap: 7px; padding: 12px 14px 14px; }
.vc-body strong { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vc-meta small { color: var(--muted); font: 11.5px var(--mono); }
dialog.vedit { width: min(1000px, 96vw); max-height: 92vh; padding: 0; border: 1px solid var(--line-2); background: var(--ink-2); color: var(--paper); border-radius: 8px; box-shadow: 10px 10px 0 #000; }
dialog.vedit::backdrop { background: rgba(0,0,0,.65); }
.vedit-in { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.vedit-in header { display: flex; justify-content: space-between; align-items: center; }
.vedit-in header h2 { margin: 0; }
.vedit-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; }
@media (max-width: 760px) { .vedit-grid { grid-template-columns: 1fr; } }
.vthumb { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 4px; overflow: hidden; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; }
.vthumb-btn { position: absolute; left: 10px; bottom: 10px; margin: 0; flex-direction: row; }
.vstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.vedit-in .status { margin-right: auto; color: var(--muted); font-size: 13.5px; }

/* Messagerie */
.mail-layout [hidden], .mail-compose [hidden], #mail-settings [hidden], #mail-choice [hidden], a[href="/mails"] [hidden] { display: none !important; }
.mail-layout { display: grid; grid-template-columns: minmax(160px, .65fr) minmax(250px, 1.15fr) minmax(300px, 1.7fr); gap: 12px; align-items: start; }
.mail-layout > *, .mail-compose *, #mail-settings * { min-width: 0; box-sizing: border-box; }
.mail-layout .panel { padding: 14px; overflow-wrap: anywhere; }
.mail-layout h2 { font-size: 18px; }
.mail-folders nav { display: flex; flex-direction: column; gap: 4px; margin: 16px 0; }
.mail-folder { display: flex; justify-content: space-between; gap: 8px; text-align: left; padding: 10px 8px; background: transparent; color: var(--paper); border: 1px solid transparent; border-radius: 4px; cursor: pointer; }
.mail-folder[aria-current="page"] { background: var(--ink-3); border-color: var(--yellow); }
.mail-folder .muted { font: 11px var(--mono); white-space: nowrap; }
.mail-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin: 12px 0; }
.mail-search details { grid-column: 1 / -1; }
.mail-search summary { cursor: pointer; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.mail-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.mail-toolbar button { font: 12px var(--mono); padding: 6px 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--ink-2); color: var(--paper); cursor: pointer; }
.mail-toolbar button:hover { border-color: var(--yellow); }
.mail-toolbar label { display: flex; flex-direction: row; align-items: center; gap: 5px; margin: 0; font-size: 12px; }
.mail-layout input[type="checkbox"], .mail-toolbar input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.mail-toolbar input[type="color"] { width: 30px; height: 26px; padding: 2px; }
.mail-row { display: grid; grid-template-columns: 18px minmax(0, 1fr) 26px; gap: 7px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.mail-row.unread { border-left: 3px solid var(--yellow); padding-left: 6px; }
.mail-row.active { background: rgba(244,205,96,.08); }
.mail-open { all: unset; min-width: 0; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.mail-open:focus-visible, .mail-folder:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.mail-row-meta { display: flex; gap: 6px; justify-content: space-between; font-size: 12px; }
.mail-row-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row-meta time { flex: none; color: var(--muted); font-size: 10px; }
.mail-subject { font-size: 13px; font-weight: 600; }
.mail-preview { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.mail-star { background: none; color: var(--yellow); border: 0; font-size: 23px; cursor: pointer; padding: 0; }
.mail-headers { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; font-size: 12px; }
.mail-headers dt { color: var(--muted); }.mail-headers dd { margin: 0; }
.mail-frame { width: 100%; min-height: 300px; border: 0; background: #fff; border-radius: 4px; }
.mail-image-banner { font-size: 12px; background: var(--ink-3); padding: 8px; margin: 10px 0; border: 1px dashed var(--line); }
.mail-attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mail-attachment { display: flex; flex-direction: column; gap: 5px; padding: 8px; border: 1px solid var(--line); border-radius: 4px; max-width: 100%; font-size: 12px; color: var(--paper); }
.mail-attachment img { width: 100px; height: 70px; object-fit: contain; background: #fff; }
.mail-back { display: none; }
dialog.mail-compose { width: min(1000px, 96vw); }
.mail-chips { display: flex; flex-wrap: wrap; gap: 5px; border: 1px solid var(--line); padding: 6px; border-radius: 4px; }
.mail-chips > span { display: contents; }.mail-chips input { flex: 1; min-width: 140px; border: 0; padding: 4px; }
.mail-chip { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; overflow-wrap: anywhere; background: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 3px 6px; font-size: 12px; }
.mail-chip-remove { background: transparent; border: 0; color: var(--paper); cursor: pointer; font-size: 18px; flex: none; }
.mail-body { min-height: 240px; padding: 16px; background: #fff; color: #222; border: 1px solid var(--line); border-radius: 4px; overflow-wrap: anywhere; outline-color: var(--yellow); }
.mail-body img { max-width: 100%; }.mail-body blockquote { border-left: 3px solid #bbb; margin: 12px 0; padding-left: 12px; color: #555; }.mail-quote { white-space: pre-wrap; }
#mail-drop { border: 1px dashed var(--line); padding: 12px; border-radius: 4px; }#mail-drop.dragging { border-color: var(--yellow); }
#mail-progress { width: 100%; height: 8px; margin: 8px 0; }#mail-uploads { margin-top: 8px; }
#mail-draft-status { margin-right: auto; color: var(--muted); font-size: 12px; }
.mail-measure { position: fixed; left: -10000px; top: 0; visibility: hidden; font: 15px/1.6 system-ui,sans-serif; overflow-wrap: anywhere; }.mail-measure pre { white-space: pre-wrap; }.mail-image-placeholder { height: 180px; }
.mail-measure img { max-width: 100%; height: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 1250px) { .mail-layout { grid-template-columns: 160px minmax(220px, 1fr) minmax(260px, 1.2fr); gap: 8px; }.mail-layout .panel { padding: 10px; } }
@media (max-width: 1000px) {
  .mail-layout { display: block; }.mail-layout > * { display: none; }
  .mail-layout[data-pane="folders"] > .mail-folders, .mail-layout[data-pane="list"] > .mail-list-panel, .mail-layout[data-pane="reading"] > .mail-reading { display: block; }
  .mail-back { display: inline-flex; }
}
@media (max-width: 760px) {
  dialog.mail-compose { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }.mail-compose .vedit-in { padding: 12px; }
  .mail-compose header h2 { font-size: 20px; }.mail-compose .mail-body { min-height: 220px; }.mail-layout .mail-toolbar button { padding: 7px; }
  #mail-settings .vedit { max-width: 100%; }.mail-reading h2 { overflow-wrap: anywhere; }
}

.mail-account-head{display:flex;flex-direction:column;gap:2px;margin:14px 0 6px;padding-bottom:6px;border-bottom:1px solid var(--line)}
.mail-account-head:first-child{margin-top:0}
.mail-account-head strong{font-family:'Anton',sans-serif;font-weight:400;letter-spacing:.02em;text-transform:uppercase}

.btn-google { gap: 12px; min-height: 48px; font-size: 15px; width: 100%; }
.btn-google svg { flex: none; }

/* Site — compta */
.site-compta{min-width:0;max-width:100%;overflow-wrap:anywhere}
.site-compta .panel,.site-compta .kpis,.site-compta .seg,.site-compta>.actions,.site-compta .table-wrap{margin-bottom:18px}
.site-compta .seg{display:flex;flex-wrap:wrap;gap:8px}
.site-compta .seg a{padding:8px 12px}
.site-compta .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
.site-compta .table{min-width:760px;width:100%}
.site-compta .table td{vertical-align:top;max-width:300px}
.site-compta .table .actions{min-width:170px}
.site-compta .actions,.site-compta .actions form{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.site-compta .actions select{max-width:230px}
.site-form{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr));gap:14px;align-items:end;margin:16px 0}
.site-form label{display:flex;flex-direction:column;gap:6px;min-width:0;font-size:13px}
.site-compta input,.site-compta select{min-width:0;max-width:100%;box-sizing:border-box}
.site-form input:not([type=checkbox]),.site-form select{width:100%}
.site-form .site-check{flex-direction:row;align-items:center}
.site-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.site-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.site-details dt{font-size:12px;opacity:.7}.site-details dd{margin:4px 0 0;font-weight:600}
.site-axis{display:grid;grid-template-columns:1fr 80px 65px;gap:8px;align-items:center;margin:12px 0;font-size:13px}
.site-axis progress{width:80px}.site-pre{white-space:pre-wrap}
.site-compta details{padding:12px 0;border-top:1px solid var(--line)}.site-compta summary{cursor:pointer}
@media(max-width:650px){.site-columns{grid-template-columns:minmax(0,1fr)}.site-compta .kpis{grid-template-columns:minmax(0,1fr)}.site-compta .v{font-size:28px}.site-details{grid-template-columns:minmax(0,1fr)}}

/* ── Site — scrutins ── */
.sc-ordo { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.sc-ordo dt { color: var(--muted); }
.sc-ordo dd { margin: 0; }
.sc-crit { margin: 0; padding-left: 18px; font-size: 13.5px; display: grid; gap: 6px; }
.sc-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 16px; }
.sc-filters label { flex: 1 1 160px; }
.sc-card { margin-bottom: 14px; scroll-margin-top: 80px; }
.sc-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.sc-titre { font-size: 17px; line-height: 1.3; margin: 0 0 6px; text-transform: none; font-family: var(--text); font-weight: 700; }
.sc-contenu { border-left: 3px solid var(--line-2); padding-left: 12px; margin: 10px 0; }
.sc-texte { font-size: 14px; line-height: 1.6; color: var(--paper-2); }
.sc-texte p { margin: 0 0 10px; }
.sc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; overflow-wrap: anywhere; }
.sc-pos-head { margin: 10px 0 6px; color: var(--muted); }
.sc-ok { color: var(--green); font-weight: 700; } .sc-ko { color: var(--red-ink); font-weight: 700; }
.sc-pos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.sc-p { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 4px; font-size: 13px; }
.sc-p small { color: var(--muted); font-size: 11px; }
.sc-p.ok { border-color: var(--green); background: rgba(76, 187, 92, .1); }
.sc-p.ko { border-color: var(--red); background: rgba(227, 38, 27, .1); }
.sc-qual { margin-top: 10px; }
.sc-qual > summary { list-style: none; display: inline-flex; }
.sc-qual > summary::-webkit-details-marker { display: none; }
.sc-qual[open] > summary { margin-bottom: 10px; }
.sc-sens { border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; display: grid; gap: 6px; }
.sc-sens legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
