/* Balise · admin — identité Sharpa : crème, encre et un seul accent prune (aplats avec texte blanc) ;
   titres en grotesque très grasse, condensée, en capitales ; filets d'encre, cadres arrondis, boutons en pilule. */
:root {
  color-scheme: light;
  --bg: #F2EEE3;
  --bg-2: #E9E3D5;
  --card: #F7F4EC;
  --paper: #FFFDF8;
  --fg: #121212;
  --ink: #121212;
  --muted: #55504A;
  --line: rgba(18, 18, 18, .12);
  --line-mid: rgba(18, 18, 18, .24);  /* contours des champs et boutons secondaires */
  --line-strong: rgba(18, 18, 18, .14); /* cadres et séparations : filet fin, l'encre est réservée à l'action */
  --soft: #E9E3D5;
  --accent: #4A1236;       /* prune, comme la page d'accueil */
  --accent-dark: #3A0D2A;
  --accent-pale: #F1E1EA;
  --accent-ink: #FFFFFF;   /* texte posé sur l'accent */
  --blue: #121212;
  --ok: #1A7F4B;
  --ok-bg: #DCEFE3;
  --warn: #B4530C;
  --warn-bg: #F8E3CF;
  --danger: #C8102E;
  --danger-bg: #F6DADA;
  --radius: 2px;
  --head: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --nav-w: 264px;
}
/* L'admin reste en clair : les couleurs de statut de shared.css sont figées en version claire */
html:root { --st-pending: #6D3FD6; --st-changes: #C2570C; --st-approved: #1A7F4B; --st-published: #77716A; --late: #C8102E; --late-bg: #F6DADA; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 400 15px/1.5 var(--font); font-stretch: 100%; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--head); }
h1 { font-weight: 800; font-stretch: 82%; text-transform: uppercase; font-size: 34px; line-height: .95; letter-spacing: -.01em; }
h2 { font-weight: 800; font-stretch: 85%; text-transform: uppercase; font-size: 19px; line-height: 1; letter-spacing: .005em; margin-bottom: 14px; }
h3 { font-size: 14px; font-weight: 700; margin: 18px 0 8px; }
p { margin: 0; }
code { background: var(--soft); padding: 1px 6px; border-radius: 2px; font-size: .9em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.warn { color: var(--warn); }
.late { color: var(--danger); }
.link { text-decoration: underline; }
.ico { display: inline-block; vertical-align: -2px; }

/* ---------------------------------------------------------------- Structure */
.has-nav .a-main { margin-left: var(--nav-w); max-width: 1320px; padding: 36px 40px 64px; }
.is-guest .a-main { padding: 24px; }

.side-nav {
  position: fixed; inset: 0 auto 0 0; width: var(--nav-w); z-index: 30;
  display: flex; flex-direction: column; gap: 6px; padding: 22px 16px 18px;
  background: var(--bg-2); border-right: 1px solid var(--line-strong); overflow-y: auto;
}
.brand { display: inline-flex; text-decoration: none; }
.side-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 18px 8px; }
.side-collapse { width: 32px; height: 32px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; border-radius: 2px; }
.side-collapse:hover { color: var(--fg); border-color: rgba(18,18,18,.25); }
.has-nav .a-main, .side-nav { transition: margin-left .2s ease, width .2s ease; }
.side-out { display: none; }
.logo { display: inline-flex; align-items: center; gap: 10px; }
.logo-mark { width: 34px; height: 34px; flex: 0 0 auto; }
/* Même dessin que le logo du site : minuscules, très large, très gras ; le carré ne sert qu'en barre repliée */
.logo-mark { display: none; }
.nav-collapsed .logo-mark, .empty-mark .logo-mark { display: block; }
.logo-text { display: flex; flex-direction: column; font: 900 30px/.9 var(--head); font-stretch: 125%; letter-spacing: -.05em; }
.logo-text small { font: 600 10.5px/1.2 var(--font); font-stretch: 100%; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 6px; }
.side-main, .side-clients { display: flex; flex-direction: column; gap: 2px; }
/* Agence courante (sélecteur si plusieurs agences) */
.side-agency { margin: 0 2px 10px; }
.side-agency select { width: 100%; font-weight: 700; font-size: 13px; padding: 8px 10px; background: var(--paper); }
.side-agency-name { margin: 0 10px 12px; font: 700 12px/1.2 var(--font); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.nav-collapsed .side-agency, .nav-collapsed .side-agency-name, .nav-collapsed .side-search { display: none; }
.side-me { display: flex; align-items: center; gap: 8px; }
.side-main a, .side-clients a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 2px;
  text-decoration: none; font-weight: 600; font-size: 14px; color: var(--fg);
}
.side-main a:hover, .side-clients a:hover { background: rgba(18, 18, 18, .06); }
.side-main a.on, .side-clients a.on { background: var(--accent); color: var(--accent-ink); }
.side-main a.on .n, .side-clients a.on .n { background: var(--accent-ink); color: var(--accent); }
.side-main a span, .side-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-label { margin: 18px 10px 6px; font: 700 11px/1 var(--font); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.side-av { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; font-size: 11px; }
.n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.n-late { background: var(--danger); }
.side-new { color: var(--muted) !important; font-weight: 600; }
.side-new:hover { color: var(--fg) !important; }
.side-foot { margin-top: auto; padding: 18px 10px 0; display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.side-foot a { font-weight: 600; color: var(--fg); text-decoration: none; }
.mobile-bar, .nav-scrim { display: none; }

/* ---------------------------------------------------------------- Titres de page */
.page-head { display: grid; gap: 10px; margin-bottom: 26px; max-width: 900px; }
.page-head h1 { font-size: clamp(40px, 5vw, 64px); line-height: .88; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 13px/1.2 var(--font); color: var(--fg); }
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.lead { font-size: 17px; color: var(--muted); max-width: 64ch; }
.lead b { color: var(--fg); }
.sec-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.sec-title h2 { margin: 0; }
.crumbs { font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.crumbs a { text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.crumbs a:hover { text-decoration: underline; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.a-head h1 { margin-bottom: 6px; }
.a-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tab-intro { margin: -8px 0 16px; }
.foot-note { margin-top: 12px; }

/* En-tête d'une fiche client */
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.p-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.p-id h1 { font-size: clamp(28px, 3.4vw, 42px); }
.p-sub { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; color: var(--muted); font-size: 14px; }
.p-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line-strong); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.p-tabs a { position: relative; padding: 10px 14px 12px; text-decoration: none; font-weight: 700; font-size: 14px; color: var(--muted); white-space: nowrap; }
.p-tabs a:hover { color: var(--fg); }
.p-tabs a.on { color: var(--fg); }
.p-tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px; background: var(--ink); }
.p-tabs b { font-size: 11px; background: var(--soft); color: var(--fg); border-radius: 2px; padding: 1px 7px; margin-left: 2px; }

/* ---------------------------------------------------------------- Colonnes et cartes */
.a-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.a-col-main, .a-col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.card { background: var(--card); border: 1px solid var(--line-strong); border-radius: 2px; padding: 22px; }
.card-flush { padding: 6px 14px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.empty-card { color: var(--muted); text-align: center; padding: 40px; }
.empty-line { color: var(--muted); font-size: 14px; padding: 6px 0; }
.empty-state { border: 1px dashed rgba(18,18,18,.35); border-radius: 2px; padding: 48px 24px; text-align: center; display: grid; justify-items: center; gap: 12px; }
.empty-state h2 { margin: 0; font-size: 28px; }
.empty-state p { color: var(--muted); max-width: 52ch; }
.small-state { padding: 28px 20px; }
.empty-mark .logo-text { display: none; }
.empty-mark .logo-mark { width: 48px; height: 48px; }

/* ---------------------------------------------------------------- Formulaires */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-foot { display: flex; justify-content: flex-end; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 13px; }
label .muted { font-weight: 400; }
input[type=text], input[type=password], input:not([type]), input[type=email], input[type=date], input[type=time], textarea, select {
  font: inherit; font-size: 14px; font-weight: 400; color: var(--fg); background: var(--paper);
  border: 1px solid rgba(18,18,18,.22); border-radius: 2px; padding: 10px 12px; width: 100%;
}
textarea { resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: rgba(18,18,18,.45); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-pale); }
input[type=file] { font: inherit; font-weight: 400; font-size: 13px; }
label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; }
input[type=checkbox], input[type=radio] { accent-color: var(--ink); }
.help { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.help.warn { color: var(--warn); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.count { font-weight: 400; font-size: 12px; color: var(--muted); align-self: flex-end; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid rgba(18,18,18,.18); border-radius: 2px; padding: 3px; gap: 2px; }
.seg label, .seg a { flex: 1 0 auto; white-space: nowrap; flex-direction: row; justify-content: center; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 2px; cursor: pointer; text-decoration: none; font-weight: 600; font-size: 13px; color: var(--muted); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked), .seg a.on { background: var(--ink); color: var(--bg); }
.seg-type { display: flex; }
.seg-sm label, .seg-sm a { padding: 4px 11px; font-size: 12.5px; white-space: nowrap; }

/* ---------------------------------------------------------------- Boutons */
.a-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  background: var(--paper); color: var(--fg); border: 1px solid var(--line-mid); border-radius: 2px; padding: 11px 18px;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.a-btn:hover { border-color: var(--ink); }
.a-btn.primary { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.a-btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.a-btn.ghost { background: transparent; }
.a-btn.small { padding: 7px 12px; font-size: 12.5px; }
.a-btn.ok-on { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.a-btn:disabled { opacity: .55; cursor: progress; }
.danger .danger-btn, .danger-btn { border-color: var(--danger); color: var(--danger); }
.danger-btn:hover { background: var(--danger) !important; color: #fff !important; }
.danger-text { color: var(--danger) !important; }
.icon-btn { border: 1px solid rgba(18,18,18,.22); background: var(--paper); color: var(--fg); border-radius: 2px; width: 32px; height: 32px; display: inline-grid; place-items: center; cursor: pointer; padding: 0; font-size: 16px; line-height: 1; }
.icon-btn:hover { border-color: var(--ink); }
.icon-btn .ico { vertical-align: 0; }

/* Menu « ⋯ » */
.more-menu { position: relative; }
.more-menu summary { list-style: none; }
.more-menu summary::-webkit-details-marker { display: none; }
.more-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; min-width: 220px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 2px; padding: 6px; box-shadow: 0 10px 30px rgba(18,18,18,.15); }
.more-pop button { width: 100%; text-align: left; border: 0; background: none; font: 600 13.5px/1.2 var(--font); padding: 9px 10px; border-radius: 2px; cursor: pointer; color: var(--fg); }
.more-pop button:hover { background: var(--bg-2); }

/* ---------------------------------------------------------------- Pastilles et statuts */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 2px; background: var(--bg-2); color: var(--muted); white-space: nowrap; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn, .pill-changes { background: var(--warn-bg); color: var(--st-changes); }
.pill-pending { background: #EEE4FE; color: var(--st-pending); }
.pill-late { background: var(--danger-bg); color: var(--danger); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: 0 0 auto; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.sch-soon { color: var(--warn); font-weight: 700; }
.sch-late { color: var(--danger); font-weight: 700; }
.kpi-of { font-size: 20px; color: var(--muted); font-weight: 700; }

/* ---------------------------------------------------------------- Notifications */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(440px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; background: var(--ink); color: var(--bg); padding: 12px 12px 12px 16px; border-radius: 2px; font-size: 14px; font-weight: 500; box-shadow: 0 10px 30px rgba(18,18,18,.25); animation: toast-in .25s ease-out; }
.toast span { flex: 1; }
.toast::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; margin-top: 6px; flex: 0 0 auto; }
.toast-error::before { background: #FF6B6B; }
.toast button { border: 0; background: none; color: inherit; opacity: .6; cursor: pointer; font-size: 13px; padding: 2px 4px; }
.toast button:hover { opacity: 1; }
.toast.is-out { opacity: 0; transform: translateY(8px); transition: all .3s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------------------------------------------------------------- Panneau latéral (nouveau contenu) */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100dvh; max-height: none; width: min(560px, 100vw); padding: 0; border: 0; border-left: 1px solid var(--line-strong); background: var(--bg); color: var(--fg); }
.drawer[open] { display: flex; animation: drawer-in .25s ease-out; }
.drawer::backdrop { background: rgba(18,18,18,.4); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer > form { display: flex; flex-direction: column; width: 100%; height: 100%; gap: 0; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 24px 16px; border-bottom: 1px solid var(--line-strong); }
.drawer-head h2 { margin: 0; font-size: 26px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line-strong); background: var(--bg-2); }

/* ---------------------------------------------------------------- Accueil « À faire » */
.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 28px; }
.kpi-tile { border: 1px solid var(--line-strong); border-radius: 2px; padding: 16px 18px; background: var(--card); display: grid; gap: 4px; }
.kpi-tile b { font: 800 46px/.9 var(--head); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.kpi-tile span { font-weight: 600; font-size: 13.5px; color: var(--muted); }
.kpi-tile.is-hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.kpi-tile.is-hot span { color: var(--accent-ink); opacity: .85; }
.kpi-tile.is-late b { color: var(--danger); }

.ti-list { display: flex; flex-direction: column; gap: 10px; }
.ti { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; background: var(--card); border: 1px solid rgba(18,18,18,.18); border-radius: 2px; }
.ti.is-waiting { box-shadow: inset 4px 0 0 var(--accent); }
.ti-thumb { display: block; width: 56px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--bg-2); }
.ti-thumb img, .ti-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ti-body { min-width: 0; display: grid; gap: 4px; }
.ti-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.ti-meta a { text-decoration: none; }
.ti-meta a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ti-client { color: var(--fg); }
.ti-text { text-decoration: none; font-size: 14.5px; line-height: 1.4; overflow-wrap: anywhere; }
.ti-text:hover { text-decoration: underline; text-underline-offset: 3px; }
.ti-foot { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--muted); }
.ti-state { font-weight: 700; }
.ti-you { background: var(--accent); color: var(--accent-ink); padding: 1px 7px; border-radius: 2px; }
.ti-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.ti-actions form { display: contents; }

.mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mini-list li + li { border-top: 1px solid var(--line); }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; text-decoration: none; }
.mini-list a:hover .mini-name b { text-decoration: underline; text-underline-offset: 3px; }
.mini-date { flex: 0 0 auto; width: 54px; font: 800 14px/1.05 var(--head); font-stretch: 85%; text-transform: uppercase; }
.mini-list li.sch-late .mini-date { color: var(--danger); }
.mini-list li.sch-soon .mini-date { color: var(--warn); }
.mini-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-name b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-name small { font-size: 12px; color: var(--muted); font-weight: 500; }
.mini-check { width: 26px; height: 26px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; flex: 0 0 auto; }

/* ---------------------------------------------------------------- Connexion */
/* Connexion : fond prune et grand « Balise » au bas de l'écran, comme la page d'accueil */
body:has(.login) { background: #4A1236; overflow: hidden; }
.is-guest .a-main:has(.login) { padding: 0; }
.login { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; overflow: hidden; }
.login-giant { position: absolute; left: 2vw; right: 2vw; bottom: 0; margin: 0; font: 900 25.5vw/.74 var(--head); font-stretch: 125%; letter-spacing: -.05em; color: rgba(0, 0, 0, .3); white-space: nowrap; transform: translateY(14%); pointer-events: none; user-select: none; }
.login .card { position: relative; z-index: 1; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); border-color: transparent; }
.login-links { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; }
.login-links a { color: var(--muted); text-decoration: none; }
.login-links a:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.login .card { max-height: calc(100dvh - 48px); overflow-y: auto; }
.login-back { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; text-align: center; }
.login-back:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.login .card { width: min(380px, 100%); display: flex; flex-direction: column; gap: 18px; padding: 30px; }
.login h1 { display: flex; align-items: center; gap: 10px; font-size: 32px; }
.a-logo { display: none; }

/* ---------------------------------------------------------------- Clients */
.project-list { display: flex; flex-direction: column; gap: 10px; }
.project-card { display: flex; align-items: center; gap: 16px; text-decoration: none; padding: 16px 20px; transition: border-color .15s, transform .15s; }
.project-card:hover { border-color: var(--ink); }
.p-av { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; border: 1px solid var(--line-strong); }
.avatar-ph { display: grid; place-items: center; background: var(--bg-2); color: var(--fg); font-weight: 800; font-size: 20px; }
.p-info { flex: 1; min-width: 0; }
.p-name { font: 800 20px/1 var(--head); font-stretch: 85%; text-transform: uppercase; }
.p-stats { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; font-size: 12.5px; }
.p-last { font-size: 12px; white-space: nowrap; }
.p-kpis { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.p-kpis b { color: var(--fg); font-weight: 700; }

.share { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.share-label { margin-bottom: 8px; }
.share-row { display: flex; gap: 8px; align-items: center; }
.share-row input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }
.avatar-edit { display: flex; align-items: center; gap: 14px; }
.avatar-edit label { flex: 1; }
.link-list { display: flex; flex-direction: column; gap: 8px; }
.link-list a { font-weight: 600; text-decoration: none; }
.link-list a::before { content: "↓ "; }
.link-list a:hover { text-decoration: underline; text-underline-offset: 3px; }
.danger { border-color: var(--danger); background: transparent; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.danger h2 { color: var(--danger); margin: 0; }

/* ---------------------------------------------------------------- Contenus */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.toolbar .filters { margin: 0; }
.toolbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select { width: auto; padding: 8px 32px 8px 12px; font-size: 13.5px; border-radius: 2px; font-weight: 600; }
.order-form { display: flex; align-items: center; gap: 8px; }

.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.ccard { display: flex; flex-direction: column; text-decoration: none; background: var(--card); border: 1px solid rgba(18,18,18,.18); border-radius: 2px; overflow: hidden; transition: border-color .15s, transform .15s; }
.ccard:hover { border-color: var(--ink); transform: translateY(-2px); }
.ccard-media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--bg-2); }
.ccard-media img, .ccard-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.ccard-date { position: absolute; top: 8px; left: 8px; background: rgba(18,18,18,.78); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 2px; }
.ccard-date.sch-soon { background: var(--warn); color: #fff; }
.ccard-date.sch-late { background: var(--danger); color: #fff; }
.ccard-type { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 2px; background: rgba(255,253,248,.9); display: grid; place-items: center; }
.ccard-open { position: absolute; bottom: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; background: var(--st-changes); color: #fff; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 2px; }
.ccard-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.ccard-body b { font-size: 14px; line-height: 1.25; }
.ccard.st-published { opacity: .8; }

.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 10px 8px; border-bottom: 1px solid var(--line-strong); }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: rgba(18,18,18,.025); }
.t-thumb { width: 64px; }
.thumb { display: block; width: 48px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--bg-2); }
.thumb-reel, .thumb-story { aspect-ratio: 9 / 16; width: 40px; }
.thumb img, .thumb video, .strip-item img, .strip-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.t-name { font-weight: 700; text-decoration: none; }
.t-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.t-actions form { display: flex; gap: 4px; justify-content: flex-end; }
.t-date { white-space: nowrap; font-size: 13.5px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-scroll { overflow-x: auto; margin: 0 -4px; }

.activity { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.activity li { display: flex; flex-direction: column; font-size: 13.5px; }

/* ---------------------------------------------------------------- Page d'un contenu : versions et fils */
.version.is-current { border-color: var(--ink); box-shadow: 0 0 0 3px var(--accent-pale); }
.v-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-head h2 { margin: 0; font-size: 28px; }
.v-date { margin-left: auto; }
.v-count { margin: 8px 0 14px; color: var(--muted); }
.v-note { background: var(--bg-2); border-radius: 2px; padding: 10px 14px; margin-bottom: 14px; }
.strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.strip-item { position: relative; flex: 0 0 auto; width: 104px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--bg-2); }
.strip-item span { position: absolute; top: 4px; left: 4px; background: rgba(18,18,18,.7); color: #fff; font-size: 11px; font-weight: 700; border-radius: 2px; padding: 0 6px; }
.caption { margin-bottom: 14px; }
.caption summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.caption div { padding: 8px 0 0; }
.tag-link { color: var(--fg); font-weight: 600; }

.comments { display: flex; flex-direction: column; gap: 10px; }
.comment { border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; background: var(--paper); }
.comment:target { animation: target-flash 2.2s ease-out; }
@keyframes target-flash { 0%, 30% { background: var(--accent-pale); box-shadow: inset 3px 0 0 var(--accent); } 100% { box-shadow: inset 3px 0 0 transparent; } }
.comment.is-resolved { opacity: .6; }
.comment.is-withdrawn .c-text { color: var(--muted); text-decoration: line-through; }
.comment.is-agency { background: var(--bg-2); border-color: transparent; }
.c-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.c-text { margin: 6px 0 8px; overflow-wrap: anywhere; }
.c-actions { display: flex; gap: 6px; }
.c-history { margin: 0 0 8px; font-size: 12.5px; }
.c-history summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.c-history ul { margin: 6px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.comment .cm-files { margin: 4px 0 10px; }
.reply { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.reply textarea { flex: 1; }
.approval-marker { display: flex; align-items: center; gap: 8px; color: var(--ok); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.approval-marker::before, .approval-marker::after { content: ""; flex: 1; height: 1px; background: var(--ok); opacity: .4; }
.thread { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 2px; padding: 10px; background: var(--card); }
.thread .comment { border: 0; padding: 4px 4px 0; background: transparent; }
.thread .comment.is-reply { margin-left: 20px; padding: 8px 12px; border-left: 2px solid rgba(18,18,18,.2); border-radius: 2px; }
.thread .comment.is-agency.is-reply { background: var(--bg-2); border-radius: 2px; }
.thread-reply summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; padding: 0 4px; list-style: none; }
.thread-reply summary::-webkit-details-marker { display: none; }
.thread-reply[open] summary { margin-bottom: 6px; }
.thread-reply .reply { flex-direction: column; align-items: stretch; margin-top: 0; }
.reply-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.file-pick { flex-direction: row; align-items: center; gap: 4px; cursor: pointer; color: var(--muted); font-size: 12.5px; font-weight: 700; white-space: nowrap; margin-right: auto; }
.file-pick input { display: none; }
.file-pick:hover { color: var(--fg); }
.file-pick.has-files { color: var(--fg); }
.reply > .file-pick { margin-right: 0; align-self: center; }

/* Éditeur de slides */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-weight: 600; font-size: 13px; }
.slides { border: 1px dashed rgba(18,18,18,.35); border-radius: 2px; padding: 10px; transition: background .15s, border-color .15s; background: var(--paper); }
.slides.is-drop { border-color: var(--ink); background: var(--accent-pale); }
.slides .help { display: block; margin-top: 8px; }
.slides-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.slide-item, .slide-add { position: relative; width: 84px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--bg-2); }
.slides[data-type=reel] .slide-item, .slides[data-type=story] .slide-item,
.slides[data-type=reel] .slide-add, .slides[data-type=story] .slide-add { aspect-ratio: 9 / 16; width: 70px; }
.slide-item { cursor: grab; touch-action: none; box-shadow: 0 0 0 1.5px rgba(18,18,18,.2) inset; }
.slide-item:active { cursor: grabbing; }
.slide-item.is-ghost { opacity: .35; }
.slide-thumb, .slide-thumb img, .slide-thumb video { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.slide-num { position: absolute; top: 4px; left: 4px; background: rgba(18,18,18,.75); color: #fff; font-size: 11px; font-weight: 700; border-radius: 2px; padding: 0 6px; }
.slide-new { position: absolute; bottom: 4px; left: 4px; right: 4px; text-align: center; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; border-radius: 2px; }
.slide-remove { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 2px; border: 0; padding: 0; display: grid; place-items: center; background: rgba(18,18,18,.75); color: #fff; cursor: pointer; font-size: 11px; }
.slide-remove .ico { vertical-align: 0; }
.slide-add button { width: 100%; height: 100%; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.slide-add button span { font-size: 26px; line-height: 1; }
.slide-add button:hover { text-decoration: underline; text-underline-offset: 3px; }
.slides.is-empty .slide-add { width: 100%; max-width: 100%; aspect-ratio: auto; height: 132px; }
.slides.is-empty .slide-add button::after { content: "ou déposez vos fichiers ici"; font-weight: 500; font-size: 12px; margin-top: 4px; }
label.inplace { background: var(--bg-2); padding: 10px 12px; border-radius: 2px; align-items: flex-start; }
label.inplace input { margin-top: 3px; }

/* ---------------------------------------------------------------- Calendrier (admin) */
.cal-card { padding: 14px 22px; }
.cal-editable .cal-item { cursor: grab; }
.cal-editable .cal-items.is-saving { opacity: .5; }
.cal-ghost { opacity: .35; }
.cal-help { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.cal-editable .cal-items-row { min-height: 56px; border: 1px dashed rgba(18,18,18,.3); border-radius: 2px; padding: 6px; }
.cal-grid { border-color: rgba(18,18,18,.2) !important; }
.cal-day, .cal-dow { border-color: rgba(18,18,18,.14) !important; }
.cal-day.is-out { background: var(--bg-2) !important; }
.cal-nav { border-color: rgba(18,18,18,.3) !important; }
.cal-head h2 { font-size: 24px; }

/* ---------------------------------------------------------------- Contacts */
.contacts { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.contact { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; border: 1px solid var(--line); border-radius: 2px; padding: 12px 14px; background: var(--paper); }
.contact.is-off { opacity: .6; }
.contact-main { display: flex; gap: 12px; align-items: center; min-width: 0; }
.c-av { width: 38px; height: 38px; border-radius: 50%; font-size: 15px; flex: 0 0 auto; }
.contact-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.contact-add { display: grid; grid-template-columns: 1fr 1fr 1.4fr auto; gap: 8px; margin-top: 14px; }

/* ---------------------------------------------------------------- Statistiques */
:root { --series-1: #2a78d6; --series-2: #eb6834; --chart-ink: #55504A; --chart-grid: rgba(18,18,18,.1); }
.stats-filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.stats-filters .seg-links, .stats-filters .filters { margin: 0; }
.scope-note { margin: -10px 0 16px; }
.seg-links { display: inline-flex; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.kpi-value { font: 800 36px/1 var(--head); font-stretch: 82%; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12.5px; }
.chart-card { margin: 8px 0 20px; }
.chart-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-head h2 { margin-bottom: 4px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart { position: relative; min-height: 260px; outline: none; }
.chart:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 2px; }
.chart svg { display: block; overflow: visible; }
.chart .grid { stroke: var(--chart-grid); stroke-width: 1; }
.chart .axis { stroke: rgba(18,18,18,.4); stroke-width: 1; }
.chart .tick { fill: var(--chart-ink); font-size: 11px; font-variant-numeric: tabular-nums; font-family: var(--font); }
.chart .end-label { fill: var(--muted); font-size: 12px; font-weight: 700; font-family: var(--font); }
.chart .crosshair { stroke: var(--chart-ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot-ring { stroke: var(--card); stroke-width: 2; }
.chart-tip { position: absolute; top: 12px; z-index: 2; pointer-events: none; min-width: 190px; background: var(--paper); border: 1px solid var(--line-strong); border-radius: 2px; padding: 8px 10px; box-shadow: 0 6px 20px rgba(18,18,18,.12); font-size: 12.5px; }
.tip-head { font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 6px; }
.tip-row i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.tip-row b { font-size: 13px; min-width: 44px; font-variant-numeric: tabular-nums; }
.tip-row span { color: var(--muted); }
.chart-empty { padding: 100px 0; text-align: center; }
.chart-table summary { cursor: pointer; font-weight: 700; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.stats-table { min-width: 760px; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1100px) {
  .a-cols { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .has-nav .a-main { margin-left: 0; padding: 20px 16px 56px; }
  .mobile-bar { display: flex; position: sticky; top: 0; z-index: 25; align-items: center; gap: 12px; padding: 10px 16px; background: var(--bg); border-bottom: 1px solid var(--line-strong); }
  .mobile-bar .logo-mark { width: 28px; height: 28px; }
  .mobile-bar .logo-text { font-size: 22px; }
  .mobile-bar .logo-text small { display: none; }
  .nav-toggle { width: 38px; height: 38px; border: 1px solid var(--line-strong); border-radius: 2px; background: none; display: grid; place-content: center; gap: 4px; cursor: pointer; padding: 0; }
  .nav-toggle span { display: block; width: 16px; height: 2px; background: var(--ink); border-radius: 2px; }
  .side-nav { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 0 0 40px rgba(18,18,18,.2); }
  body.nav-open .side-nav { transform: none; }
  body.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 29; background: rgba(18,18,18,.35); }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .ti { grid-template-columns: 48px minmax(0, 1fr); }
  .ti-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
@media (max-width: 600px) {
  h1 { font-size: 28px; }
  .p-head .a-actions { width: 100%; }
  .share-row { flex-wrap: wrap; }
  .share-row input { flex-basis: 100%; }
  .table th:nth-child(5), .table td:nth-child(5) { display: none; }
  .row { grid-template-columns: 1fr; }
  .contact-add { grid-template-columns: 1fr 1fr; }
  .contact-add input[type=email] { grid-column: 1 / -1; }
  .cgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi-tile b { font-size: 38px; }
  .toolbar { align-items: flex-start; }
}

/* Angles droits aussi sur les composants partagés, dans l'admin uniquement */
.has-nav .cal-item, .has-nav .cal-thumb, .has-nav .cal-nav, .has-nav .cm-file, .has-nav .cm-pdf, .has-nav .cm-file-tag,
.has-nav .pdf-ico, .has-nav .cal-legend i, .has-nav .att, .has-nav .lb img, .has-nav .lb button { border-radius: 2px; }
.has-nav .cal-num { border-radius: 2px; }
/* Les seuls ronds : avatars, points de statut, compteurs */
.has-nav .avatar-ph.side-av, .has-nav .avatar-ph.p-av, .has-nav .avatar-ph.c-av { border-radius: 50%; }

/* ---------------------------------------------------------------- Page d'un contenu */
.post-admin { display: grid; grid-template-columns: minmax(320px, 440px) minmax(0, 1fr); gap: 28px; align-items: start; }
.pa-preview { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }
.pa-versions { align-self: flex-start; }
.pa-version { border-top: 1px solid var(--line-strong); padding-top: 12px; display: grid; gap: 8px; }
.pa-version-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pa-version-head b { font: 800 22px/1 var(--head); font-stretch: 85%; }
.pa-note { background: var(--bg-2); padding: 10px 12px; font-size: 14px; }
.pa-files { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.pa-files a { color: var(--muted); text-decoration: none; }
.pa-files a:hover { text-decoration: underline; text-underline-offset: 3px; }
.pa-panel { min-width: 0; }
.pa-tabs { margin-bottom: 18px; }
.pa-intro { color: var(--muted); font-size: 14px; margin-bottom: 14px; }
.pa-intro b { color: var(--fg); }
.pa-intro a { font-weight: 700; color: var(--fg); }
.pa-intro-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.pa-new-comment { flex-direction: column; align-items: stretch; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-strong); }
.pa-danger { margin-top: 28px; }
.pill-link { border: 0; cursor: pointer; font-family: inherit; }
.pill-link:hover { background: var(--accent); color: var(--accent-ink); }

/* Carrousel de l'aperçu */
.carousel { position: relative; width: 100%; height: 100%; }
.track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; height: 100%; scroll-snap-align: start; }
.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.cnav { position: absolute; top: 50%; transform: translateY(-50%); width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center; background: rgba(255,255,255,.88); color: #000; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.cnav.prev { left: 10px; } .cnav.next { right: 10px; }
.dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 4px; pointer-events: none; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.dots i.on { background: #fff; }
.slide-count { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,.6); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

/* Frise d'historique */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 13px; top: 6px; bottom: 6px; width: 1.5px; background: rgba(18,18,18,.18); }
.timeline li { position: relative; display: flex; gap: 14px; padding: 8px 0; }
.tl-ico { position: relative; z-index: 1; flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--bg); border: 1px solid rgba(18,18,18,.3); color: var(--muted); }
.tl-comment .tl-ico { border-color: var(--st-changes); color: var(--st-changes); }
.tl-reply .tl-ico { border-color: var(--muted); }
.tl-version .tl-ico, .tl-create .tl-ico { border-color: var(--ink); background: var(--accent); color: var(--accent-ink); }
.tl-approve .tl-ico { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.tl-status .tl-ico { border-color: var(--ok); color: var(--ok); }
.tl-seen .tl-ico { border-style: dashed; }
.tl-schedule .tl-ico { border-color: var(--st-pending); color: var(--st-pending); }
.tl-body { min-width: 0; padding-top: 3px; font-size: 14px; }
.tl-detail { margin-top: 3px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; border-left: 2px solid rgba(18,18,18,.15); padding-left: 8px; }
.tl-meta { margin-top: 3px; font-size: 12px; color: var(--muted); }

@media (max-width: 1100px) {
  .post-admin { grid-template-columns: 1fr; }
  .pa-preview { position: static; max-width: 480px; }
}

/* Commentaires supprimés (masqués, conservés) */
.comment.is-deleted { border-style: dashed; background: transparent; }
.comment.is-deleted .c-text { color: var(--muted); }
.c-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.pa-warn { display: grid; gap: 2px; padding: 10px 12px; background: var(--warn-bg); color: var(--warn); font-size: 13px; border-left: 3px solid var(--warn); }
.deleted-list { margin-top: 18px; border-top: 1px dashed rgba(18,18,18,.3); padding-top: 12px; }
.deleted-list > summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.deleted-list .comment { margin-top: 10px; opacity: .75; background: transparent; border-style: dashed; }
.deleted-list .c-text { color: var(--muted); }

/* Menu réduit : une colonne d'icônes et d'avatars, compteurs en pastille */
body.nav-collapsed { --nav-w: 72px; }
.nav-collapsed .side-nav { padding: 18px 10px; align-items: center; overflow-x: hidden; }
.nav-collapsed .side-top { flex-direction: column; padding: 0 0 14px; gap: 12px; }
.nav-collapsed .logo-text, .nav-collapsed .side-label, .nav-collapsed .side-name, .nav-collapsed .side-main a span,
.nav-collapsed .side-new span, .nav-collapsed .side-foot > span, .nav-collapsed .side-out-label { display: none; }
.nav-collapsed .side-collapse svg { transform: scaleX(-1); }
.nav-collapsed .side-main, .nav-collapsed .side-clients { width: 100%; align-items: center; }
.nav-collapsed .side-main a, .nav-collapsed .side-clients a { position: relative; justify-content: center; width: 44px; height: 44px; padding: 0; }
.nav-collapsed .side-clients { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.nav-collapsed .side-av { width: 30px; height: 30px; }
.nav-collapsed .n { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; box-shadow: 0 0 0 2px var(--bg-2); }
.nav-collapsed .n-late { top: auto; bottom: 1px; }
.nav-collapsed .side-new b { font-size: 20px; }
.nav-collapsed .side-foot { align-items: center; padding: 14px 0 0; width: 100%; }
.nav-collapsed .side-out { display: inline; font-size: 18px; }
@media (max-width: 900px) {
  body.nav-collapsed { --nav-w: 264px; }
  .side-collapse { display: none; }
}

/* Onglets de réseau de l'aperçu */
.net-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.net-tabs button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(18,18,18,.2); background: var(--paper); padding: 6px 10px; border-radius: 2px; font: 600 13px/1 var(--font); cursor: pointer; color: var(--muted); }
.net-tabs button.on { border-color: var(--ink); color: var(--fg); }
.net-ok { color: var(--ok); font-weight: 800; }
.net-approvals { display: flex; flex-direction: column; gap: 4px; font-size: 13px; padding: 10px 12px; background: var(--bg-2); }
.net-approvals span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.net-approvals span.is-ok { color: var(--ok); font-weight: 600; }

/* Réseaux et textes adaptés dans les formulaires */
.nets-pick { border: 1px solid rgba(18,18,18,.18); padding: 10px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.nets-pick legend { font-weight: 700; font-size: 13px; padding: 0 4px; }
.nets-pick .help { flex-basis: 100%; }
.adapt summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.adapt[open] summary { margin-bottom: 10px; }
.adapt label + label { margin-top: 12px; }
.slide-pdf { display: grid; place-items: center; width: 100%; height: 100%; background: #b4232c; color: #fff; font-weight: 800; font-size: 14px; }
.ccard-nets { display: flex; gap: 3px; }

.acc-block { border: 0; border-top: 1px solid var(--line); padding: 14px 0 4px; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.acc-block legend { font-weight: 800; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; padding-right: 8px; }
.p-av-sq { border-radius: 4px !important; }

/* Pastille d'un client sans photo : cercle visible sur le fond de la barre latérale */
.side-av.avatar-ph { background: var(--paper); box-shadow: 0 0 0 1px var(--line-mid); font-size: 11px; font-weight: 800; }
.nav-collapsed .side-av.avatar-ph { font-size: 13px; }
.ccard:hover { border-color: var(--line-mid); box-shadow: 0 6px 18px rgba(18,18,18,.08); }

/* Sélecteur de fichier maison (remplace « Choose file / No file chosen ») */
.fpick { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 400; }
.fpick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.fpick .a-btn { flex: 0 0 auto; }
.fpick-name { font-size: 13px; color: var(--muted); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fpick-name.is-set { color: var(--fg); font-weight: 600; }
.fpick-thumb { width: 32px; height: 32px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px var(--line-strong); flex: 0 0 auto; }

/* Calendrier admin : aujourd'hui en jaune balise */
.has-nav .cal-day.is-today .cal-num { background: var(--accent); color: var(--accent-ink); }
.has-nav .cal-today { color: var(--fg); text-decoration: underline; }

/* Aperçu des e-mails */
.mail-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 620px), 1fr)); gap: 20px; }
.mail-card { display: flex; flex-direction: column; gap: 10px; }
.mail-card h2 { margin: 0; }
.mail-subject { font-weight: 600; font-size: 14px; }
.mail-frame { width: 100%; height: 640px; border: 1px solid var(--line); background: #F2EEE3; }
.mail-text { white-space: pre-wrap; font-size: 12px; background: var(--bg-2); padding: 12px; margin: 8px 0 0; }

/* Équipe, plateforme et e-mails : en bas du menu, au-dessus du compte */
.side-admin { margin-top: auto; padding-top: 14px; }
.side-admin:not(:has(a)) { display: none; }
.side-admin:has(a) + .side-foot { margin-top: 10px; }
.invite-link { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.invite-link h2 { margin: 0; }

/* Déconnexion : un bouton de formulaire présenté comme les liens du pied de menu */
.side-logout { margin: 0; }
.side-logout button { border: 0; background: none; padding: 0; font: 600 12px/1.5 var(--font); color: var(--fg); cursor: pointer; display: flex; align-items: center; gap: 8px; }
.side-logout button:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Journal */
.journal-filters { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; align-items: end; margin-bottom: 20px; }
.journal-actions { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.journal-table td { vertical-align: top; }
.journal-table .pill { margin-right: 6px; }
.nowrap { white-space: nowrap; }
@media (max-width: 900px) { .journal-filters { grid-template-columns: 1fr 1fr; } }
.proof-form { gap: 10px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }

/* Assigner un retour */
.assign-form { margin: 0; }
.assign select { width: auto; max-width: 190px; padding: 6px 28px 6px 10px; font-size: 12.5px; font-weight: 600; }
.pill-assign { background: var(--accent-pale); color: var(--accent); }
.ti-actions { align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Réglages de l'agence */
.logo-field { display: grid; grid-template-columns: 180px 1fr; gap: 18px; align-items: start; margin: 4px 0 18px; }
.logo-preview { height: 96px; display: grid; place-items: center; border: 1px solid var(--line); background: repeating-conic-gradient(#f1ede5 0 25%, #fff 0 50%) 0 0 / 16px 16px; padding: 12px; }
.logo-preview img { max-width: 100%; max-height: 72px; object-fit: contain; }
.logo-preview.is-empty { background: var(--bg-soft, #f6f2ea); color: var(--muted); font-size: 13px; }
.agency-preview { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; font-size: 14px; margin-bottom: 8px; }
.agency-preview img { height: 26px; width: auto; max-width: 110px; object-fit: contain; padding-right: 10px; border-right: 1px solid var(--line); }
@media (max-width: 640px) { .logo-field { grid-template-columns: 1fr; } }

/* Double authentification, sessions */
.qr-box { display: flex; gap: 22px; align-items: center; margin: 6px 0 20px; flex-wrap: wrap; }
.qr { width: 200px; height: 200px; padding: 8px; background: #fff; border: 1px solid var(--line); flex: none; }
.qr svg { display: block; width: 100%; height: 100%; }
.secret { display: inline-block; font-size: 15px; letter-spacing: .08em; padding: 8px 10px; background: var(--bg-soft, #f6f2ea); border: 1px solid var(--line); word-break: break-all; }
.code-input { font-size: 20px; letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.backup-codes { border: 1px solid var(--accent); background: var(--accent-pale); padding: 14px 16px; margin-bottom: 16px; }
.backup-codes p { margin: 0 0 10px; }
.backup-codes ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.backup-codes code { font-size: 14px; letter-spacing: .05em; }
.twofa-actions { display: grid; gap: 14px; }
.inline-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.inline-row label { margin: 0; }
.twofa-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; border: 1px solid var(--line); border-left: 3px solid var(--accent); background: var(--paper, #fff); padding: 12px 16px; margin: 0 0 20px; }
.twofa-banner p { margin: 0; }
.twofa-banner .acts { display: flex; gap: 8px; align-items: center; }
#securite, #sessions { margin-top: 20px; }
@media (max-width: 640px) { .backup-codes ul { grid-template-columns: repeat(2, 1fr); } }
.ics-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
#calendrier .share-row { display: flex; gap: 8px; margin: 10px 0 8px; }
#calendrier .share-row input { flex: 1; min-width: 0; font-size: 12.5px; }

/* Recherche */
.side-search { position: relative; margin: 0 12px 10px; }
.side-search input { width: 100%; padding: 8px 10px 8px 32px; font-size: 13.5px; }
.side-search-ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; pointer-events: none; }
.search-big { display: flex; gap: 8px; margin: 14px 0 6px; max-width: 640px; }
.search-big input { flex: 1; font-size: 16px; }
.search-group { margin: 0 0 28px; }
.search-group h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
.search-list { border-top: 1px solid var(--line); }
.search-row { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; line-height: 1.4; }
.search-row:hover { background: var(--accent-pale); }
.search-thumb { width: 44px; height: 44px; flex: none; overflow: hidden; background: var(--line); }
.search-thumb img, .search-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.search-row mark { background: #F6E3A8; color: inherit; padding: 0 1px; }
.twofa-actions form.inline-row { display: flex; flex-direction: row; justify-content: flex-start; align-items: flex-end; gap: 10px; }
.twofa-actions form.inline-row label { width: 170px; flex: none; }
details.acc-block { display: block; }
details.acc-block > summary { font-weight: 800; font-size: 14px; display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 2px 0 10px; }
details.acc-block[open] > summary ~ * { margin-bottom: 12px; }
.pin-fields { border: 1px solid var(--line); padding: 12px 14px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.pin-fields legend { font-weight: 700; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; padding: 0 6px; }
.pin-fields[hidden] { display: none; }

/* Clients archivés */
.archived-banner { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 16px; background: var(--ink); color: var(--bg); font-size: 14px; }
.archived-banner .a-btn { background: var(--bg); color: var(--ink); }
.archived-list { margin-top: 28px; }
.archived-list > summary { cursor: pointer; font-weight: 700; margin-bottom: 10px; }
.project-card.is-archived { display: flex; align-items: center; gap: 14px; opacity: .85; margin-bottom: 8px; }
.project-card.is-archived .p-info { flex: 1; }
.more-pop a { display: block; font: 600 13.5px/1.2 var(--font); padding: 9px 10px; color: var(--fg); text-decoration: none; }
.more-pop a:hover { background: var(--bg-2); }
.erase-dialog { width: min(520px, calc(100% - 32px)); border: 1px solid var(--line-strong); padding: 0; background: var(--card); color: var(--fg); }
.erase-dialog::backdrop { background: rgba(18,18,18,.5); }
.erase-dialog form { padding: 22px 24px; }
.erase-dialog h2 { margin: 0 0 10px; }
.erase-dialog ul { margin: 0 0 10px; padding-left: 18px; line-height: 1.5; }

/* Publication directe */
.pub-list { border-top: 1px solid var(--line); }
.pub-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 6px 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.pub-net { display: inline-flex; gap: 8px; align-items: center; }
.pub-acc { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pub-acts { display: flex; gap: 6px; }
.pub-board { grid-column: 2 / -1; }
.pub-board label { font-size: 13px; }
.pub-board select { width: auto; max-width: 100%; }
@media (max-width: 760px) { .pub-row { grid-template-columns: 1fr; } .pub-board { grid-column: 1; } }
.pub-post { border: 1px solid var(--line); background: var(--card); padding: 12px 14px; margin: 12px 0; }
.pub-post-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.pub-auto { margin: 0; }
.pub-line { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.pub-line .pub-net { width: 112px; flex: none; }
.pub-state { flex: 1; min-width: 160px; }
.pub-toggle { font-size: 12.5px; margin: 0; }
.pub-post > p { margin: 8px 0 0; }
.pick-form fieldset { border: 1px solid var(--line); padding: 12px 14px; margin: 0 0 12px; display: flex; flex-direction: column; gap: 8px; }
.pick-form legend { display: inline-flex; gap: 6px; align-items: center; font-weight: 700; padding: 0 6px; }
.cover-edit { flex: 1.4; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cover-thumb { width: 100%; max-width: 360px; aspect-ratio: 1640 / 624; object-fit: cover; border: 1px solid var(--line); display: block; }
.avatar-edit { align-items: flex-start; flex-wrap: wrap; }
