/* Design du studio (ivoire, encre, filets fins, Inter et Instrument Serif). La couleur des actions (--brand) est celle de
   l'agence, posée par app.js depuis /api/site ; sans couleur, celle d'origine. Thème clair uniquement, comme le studio. */
:root {
  --bg: #fffdfa; --sidebar: #f9f4ee; --soft: #f3eee6; --white: #ffffff; --active: #ede7dd; --media: #f0eeea;
  --ink: #131a2b; --fg: #0c121a; --muted: #4f5661; --meta: #626977; --line: #e2ddd5; --card-line: #e5e2dc;
  --brand: #0A4751; --brand-hover: #0d5c69; --turquoise: #38CCC8; --raspberry: #FB3C69; --on-brand: #fdfaf4;
  --focus: #117780;
  --green: #166353; --green-soft: #e4f1ec; --amber: #855210; --amber-soft: #fbf0dd; --correction: #924126; --correction-soft: #fae8df;
  --error: #8a2f2b; --error-soft: #fceae7;
  --client: var(--brand);
  --sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --r-s: 6px; --r-m: 9px; --r-l: 12px; --gap: 40px; --unread: #2b7bd6;
  color-scheme: light;
}

/* Esthétique de l'agence (24 novembre 2026) : une ambiance de départ, puis la couleur des actions, l'accent, les polices,
   les angles et la densité, posés par app.js depuis /api/site. Sans réglage, l'ambiance Ivoire éditorial ci-dessus. */
:root[data-ambiance="blanc"] { --raspberry: #a35f00; --bg: #ffffff; --sidebar: #f6f7f9; --soft: #eef0f3; --active: #e8ebf0; --line: #e1e5eb; --card-line: #e4e7ec; --brand: #1f3fbf; --brand-hover: #2a4fd6; --focus: #1f3fbf; }
:root[data-ambiance="mineral"] { --raspberry: #1f7a76; --bg: #f6f8f9; --sidebar: #e9eef1; --soft: #e2e9ed; --active: #dbe4e9; --line: #d3dce2; --card-line: #d8e0e5; --brand: #2c5466; --brand-hover: #356679; --focus: #2c5466; }
:root[data-ambiance="chaleureux"] { --raspberry: #9a5a12; --bg: #fbf6ef; --sidebar: #f3e8da; --soft: #efe2d1; --active: #ead9c4; --line: #e3d2bd; --card-line: #e6d6c2; --brand: #9b3d22; --brand-hover: #b0472a; --focus: #9b3d22; }
:root[data-ambiance="contraste"] { --raspberry: #c4001f; --bg: #ffffff; --sidebar: #ffffff; --soft: #f2f2f2; --active: #ebebeb; --line: #111111; --card-line: #111111; --ink: #000000; --fg: #000000; --muted: #2f2f2f; --meta: #3d3d3d; --brand: #000000; --brand-hover: #2a2a2a; --focus: #e4002b; }
:root[data-ambiance="nuit"] { --raspberry: #ff7a9a; --bg: #12161f; --sidebar: #0c0f15; --soft: #1d2330; --white: #1a1f2b; --active: #252c3a; --media: #0f131a; --line: #2b3241; --card-line: #2b3241;
  --ink: #f1f3f7; --fg: #e8ebf0; --muted: #b3b9c4; --meta: #a0a7b3; --brand: #7fd6cf; --brand-hover: #9be2dc; --on-brand: #0c1117; --focus: #9be2dc;
  --green: #7fd3b0; --green-soft: #173229; --amber: #f0c27a; --amber-soft: #33281a; --correction: #f2a58a; --correction-soft: #3a221a; --error: #ff9a92; --error-soft: #3a1c1a; --unread: #7fb4ff; color-scheme: dark; }
:root[data-corners="nets"] { --r-s: 0px; --r-m: 2px; --r-l: 3px; }
:root[data-corners="ronds"] { --r-s: 10px; --r-m: 14px; --r-l: 20px; }
:root[data-density="compacte"] { --gap: 26px; }
:root[data-density="compacte"] body { font-size: 14px; }

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sans); font-size: 15px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) 80px max(16px, env(safe-area-inset-left, 0px)); display: grid; gap: var(--gap); }
h1, h2, h3 { margin: 0; color: var(--ink); text-wrap: balance; }
h1 { font-weight: 600; font-size: clamp(1.5rem, 3vw, 1.75rem); line-height: 1.25; letter-spacing: -0.01em; }
h2 { font-weight: 600; font-size: 1.125rem; line-height: 1.4; letter-spacing: -0.01em; }
h3 { font-weight: 600; font-size: 0.8125rem; color: var(--meta); letter-spacing: 0; }
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--brand); }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.muted { color: var(--muted); }
.meta { color: var(--meta); font-size: 0.8125rem; }
.eyebrow { font-size: 0.8125rem; font-weight: 500; color: var(--meta); }
.lead { font-size: 1rem; max-width: 66ch; color: var(--muted); }

/* Bandeau */
.bar { background: var(--sidebar); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.bar-in { margin: 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; gap: 12px; min-height: 51px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); flex: none; max-width: 100%; }
.brand img { height: 30px; width: auto; display: block; flex: none; }
.partner { display: flex; align-items: center; gap: 12px; flex: none; }
.partner[hidden] { display: none; }
.amp { font-family: var(--serif); font-size: 2rem; line-height: 1; color: var(--muted); }
.brand .space { font-size: 0.875rem; font-weight: 500; color: var(--muted); padding-left: 12px; border-left: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { display: flex; align-items: center; gap: 14px; font-size: 0.875rem; color: var(--muted); justify-content: flex-end; margin-left: auto; min-width: 0; white-space: nowrap; }
.who a { color: var(--ink); text-decoration: none; font-weight: 500; }
.who a:hover { text-decoration: underline; }
.who select { font: inherit; font-size: 0.875rem; padding: 6px 8px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.linkish { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; font-size: 0.875rem; }
.nav-more { position: relative; }
.nav-more-btn { background: none; border: 0; padding: 0; color: var(--ink); font-size: 0.875rem; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.nav-more-btn:hover { text-decoration: underline; }
.nav-menu { position: absolute; top: calc(100% + 10px); left: 0; z-index: 20; display: grid; min-width: 170px; padding: 6px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 8px 24px rgba(19, 26, 43, 0.12); }
.nav-menu[hidden] { display: none; }
.nav-menu.flip { left: auto; right: 0; }
.who .nav-menu a { padding: 8px 10px; border-radius: var(--r-s); }
.who .nav-menu a:hover { background: var(--active); text-decoration: none; }
@media (max-width: 560px) { .who .who-name { display: none; } }
@media (max-width: 620px) { .brand img { height: 24px; } .brand .space { display: none; } .who { gap: 10px; } .partner, .brand { gap: 8px; } .amp { font-size: 1.6rem; } }

/* Boutons */
.btn { font-weight: 500; font-size: 0.875rem; color: var(--ink); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); padding: 9px 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.btn:hover { border-color: var(--meta); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primary { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.btn.primary:hover { background: var(--brand-hover); }
.btn.ok { background: var(--green); color: #fff; border-color: var(--green); }

/* Cartes et états */
.card { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 20px 22px; display: grid; gap: 12px; align-content: start; min-width: 0; }
.tag { font-size: 0.75rem; font-weight: 500; border-radius: var(--r-s); padding: 3px 8px; background: var(--soft); color: var(--muted); white-space: nowrap; }
.tag.pending { background: var(--amber-soft); color: var(--amber); }
.tag.ok { background: var(--green-soft); color: var(--green); }
.tag.rework { background: var(--correction-soft); color: var(--correction); }
.tag.date { background: var(--brand); color: var(--on-brand); font-family: var(--mono); font-weight: 500; }
.empty { color: var(--meta); font-size: 0.875rem; }

/* Tableau de bord */
.hello { display: grid; gap: 6px; }
.hello h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.5vw, 2.6rem); line-height: 1.05; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: start; }
.span-12 { grid-column: span 12; } .span-8 { grid-column: span 8; } .span-7 { grid-column: span 7; } .span-5 { grid-column: span 5; } .span-4 { grid-column: span 4; }
@media (max-width: 900px) { .span-8, .span-7, .span-5, .span-4 { grid-column: span 12; } }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.todo { border-left: 3px solid var(--raspberry); }
.todo.calm { border-left-color: var(--turquoise); }
.todo .big { font-size: 1.25rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.todo .when { font-family: var(--mono); font-size: 0.8125rem; color: var(--raspberry); }
.progress { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--turquoise); border-radius: 99px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.steps li { font-size: 0.75rem; color: var(--meta); border-top: 2px solid var(--line); padding-top: 6px; }
.steps li.on { border-color: var(--raspberry); color: var(--ink); font-weight: 600; }
.steps li.done { border-color: var(--turquoise); }
@media (max-width: 520px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rows { list-style: none; margin: 0; padding: 0; display: grid; }
.rows li + li { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; text-decoration: none; color: var(--fg); }
.row:hover .row-title { text-decoration: underline; }
.thumb { width: 44px; height: 55px; border-radius: var(--r-s); background: var(--media); object-fit: cover; display: block; }
.thumb.v916 { height: 64px; width: 36px; margin: 0 4px; }
.row-title { font-weight: 600; font-size: 0.875rem; color: var(--ink); line-height: 1.4; }
.row-sub { font-size: 0.8125rem; color: var(--meta); }
.row-state { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 520px) { .row { grid-template-columns: 44px minmax(0, 1fr); } .row-state { grid-column: 2; justify-content: flex-start; } }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.kpi { background: var(--sidebar); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 2px; }
.kpi b { font-size: 1.5rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.kpi .delta { font-size: 0.75rem; font-weight: 500; }
.kpi .delta.up { color: var(--green); } .kpi .delta.down { color: var(--correction); }
.awaiting { background: var(--sidebar); border: 1px dashed var(--line); border-radius: var(--r-m); padding: 18px; color: var(--muted); font-size: 0.875rem; display: grid; gap: 4px; }
.kpis.ghost .kpi b { color: var(--line); }
.top { display: grid; grid-template-columns: 28px 44px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 0; }
.top .rank { font-family: var(--serif); font-size: 1.6rem; color: var(--turquoise); text-align: center; }
.week { list-style: none; margin: 0; padding: 0; display: grid; }
.week li { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 12px; padding: 9px 0; align-items: baseline; font-size: 0.875rem; }
.week li + li { border-top: 1px solid var(--line); }
.week .d { font-family: var(--mono); font-size: 0.8125rem; color: var(--meta); }
.week .t { color: var(--ink); font-weight: 500; min-width: 0; }
.cycles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.cycle-card { display: grid; gap: 4px; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 14px 16px; text-decoration: none; color: var(--fg); }
.cycle-card:hover { border-color: var(--meta); }
.cycle-card b { color: var(--ink); font-weight: 600; font-size: 0.9375rem; }

/* En-tête de cycle */
header.cycle { display: grid; gap: 16px; }
header.cycle h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 4.5vw, 2.6rem); line-height: 1.05; }
.back { justify-self: start; font-size: 0.875rem; font-weight: 500; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); text-decoration: underline; }
.promise { border-left: 3px solid var(--raspberry); padding: 4px 0 4px 16px; font-family: var(--serif); font-size: 1.45rem; line-height: 1.25; color: var(--ink); max-width: 46ch; }
.status { border-radius: var(--r-m); padding: 14px 18px; background: var(--soft); display: grid; gap: 2px; max-width: 76ch; font-size: 0.875rem; }
.status.open { background: var(--amber-soft); }
.status.open b { color: var(--amber); }
.status b { color: var(--ink); font-weight: 600; }
.common { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 10px; font-size: 0.875rem; }
.common div { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 12px 14px; display: grid; gap: 4px; align-content: start; min-width: 0; color: var(--muted); }
.common b { font-size: 0.75rem; font-weight: 600; color: var(--ink); }
.toc { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 16px 20px; display: grid; gap: 6px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; }
.toc li a { display: grid; grid-template-columns: 9rem minmax(0, 1fr) auto; gap: 14px; align-items: baseline; padding: 9px 4px; border-top: 1px solid var(--line); text-decoration: none; color: var(--fg); border-radius: var(--r-s); }
.toc li:first-child a { border-top: 0; }
.toc li a:hover { background: var(--sidebar); }
.toc .d { font-family: var(--mono); font-size: 0.8125rem; color: var(--meta); }
.toc .t { font-weight: 600; font-size: 0.875rem; color: var(--ink); min-width: 0; }
.toc .t small { display: block; font-weight: 400; font-size: 0.8125rem; color: var(--meta); }
.toc .f { font-size: 0.8125rem; color: var(--meta); white-space: nowrap; text-align: right; }
@media (max-width: 620px) { .toc li a { grid-template-columns: minmax(0, 1fr); gap: 2px; } .toc .f { white-space: normal; text-align: left; } }

/* Bande de créa */
.crea { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 40px; align-items: start; padding-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 68px; }
.crea:first-of-type { border-top: 0; padding-top: 0; }
@media (max-width: 820px) { .crea { grid-template-columns: minmax(0, 1fr); gap: 20px; } .player { max-width: 360px; margin: 0 auto; width: 100%; } }
.player { display: grid; gap: 10px; min-width: 0; position: sticky; top: 68px; }
@media (max-width: 820px) { .player { position: static; } }
.frame { position: relative; width: 100%; border-radius: var(--r-l); overflow: hidden; background: var(--media); border: 1px solid var(--card-line); }
.frame.v916 { aspect-ratio: 9 / 16; max-height: 76vh; margin: 0 auto; }
.frame.v45 { aspect-ratio: 4 / 5; }
.frame.v11 { aspect-ratio: 1 / 1; }
.frame.v169 { aspect-ratio: 16 / 9; }
.frame video, .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.track { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; scroll-snap-align: center; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.count { font-family: var(--mono); font-size: 0.8125rem; color: var(--meta); font-variant-numeric: tabular-nums; }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.dots i.on { background: var(--brand); }
.hint { font-size: 0.75rem; color: var(--meta); text-align: center; }

.sheet { display: grid; gap: 18px; min-width: 0; }
.sheet > h2 { font-family: var(--serif); font-weight: 400; font-size: 2rem; line-height: 1.1; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.angle { background: var(--sidebar); border-radius: var(--r-m); padding: 16px 18px; display: grid; gap: 6px; }
.angle p { max-width: 68ch; }
dl.choices { display: grid; grid-template-columns: minmax(110px, max-content) minmax(0, 1fr); margin: 0; font-size: 0.875rem; }
dl.choices dt, dl.choices dd { padding: 10px 0; border-bottom: 1px solid var(--line); margin: 0; }
dl.choices dt { font-weight: 600; color: var(--ink); padding-right: 18px; }
dl.choices dd { max-width: 70ch; color: var(--muted); }
dl.choices dd q { font-style: normal; color: var(--ink); font-weight: 500; }
@media (max-width: 520px) { dl.choices { grid-template-columns: minmax(0, 1fr); } dl.choices dt { border-bottom: 0; padding-bottom: 0; } }
details.captions { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 0 18px; }
details.captions summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 0.875rem; color: var(--ink); }
details.captions .cap { padding: 0 0 14px; display: grid; gap: 6px; }
details.captions .cap + .cap { border-top: 1px solid var(--line); padding-top: 14px; }
details.captions pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 0.875rem; margin: 0; max-width: 70ch; color: var(--muted); }
.history { font-size: 0.875rem; color: var(--correction); background: var(--correction-soft); border-radius: var(--r-m); padding: 10px 14px; }

/* Retours */
.feedback { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 18px 20px; display: grid; gap: 14px; }
.feedback-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.comments li { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.comments li:last-child { border-bottom: 0; padding-bottom: 0; }
.comments .by { font-size: 0.8125rem; color: var(--meta); display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.comments .by b { color: var(--ink); font-weight: 600; }
.comments .old { opacity: 0.7; }
.comments p { white-space: pre-wrap; word-break: break-word; font-size: 0.875rem; }
.anchor { font-family: var(--mono); font-size: 0.75rem; color: var(--brand); background: var(--soft); border: 0; border-radius: var(--r-s); padding: 2px 7px; cursor: pointer; }
.anchor:hover { background: var(--active); }
form.add { display: grid; gap: 10px; }
form.add label.title { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
form.add textarea { font: inherit; font-size: 0.875rem; width: 100%; min-height: 84px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); resize: vertical; }
form.add textarea:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: transparent; }
.add-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.add-row label { font-size: 0.8125rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.validation { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
/* Décision en haut de la fiche, à part des commentaires (26 novembre 2026) ; garde-fou d'un commentaire non envoyé. */
.decision { background: var(--white); border: 1px solid var(--card-line); border-left: 3px solid var(--green); border-radius: var(--r-m); padding: 16px 20px; display: grid; gap: 10px; justify-items: start; }
.decision[hidden] { display: none; }
.decision h3 { color: var(--ink); font-size: 0.9375rem; }
.decision .muted { font-size: 0.875rem; }
.decision-guard { display: grid; gap: 10px; background: var(--amber-soft); color: var(--amber); border-radius: var(--r-s); padding: 12px 14px; font-size: 0.875rem; justify-self: stretch; }
.decision-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.validated-by { font-size: 0.875rem; color: var(--green); }
.validated-before { font-size: 0.875rem; color: var(--ink-soft, #5a6070); }
.error { color: var(--error); font-size: 0.875rem; }

/* Administration */
table.members { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
table.members th, table.members td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.members th { font-size: 0.75rem; font-weight: 600; color: var(--meta); }
.table-scroll { overflow-x: auto; }
form.member { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); align-items: end; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 18px 20px; }
form.member label { display: grid; gap: 4px; font-size: 0.8125rem; color: var(--muted); }
form.member input, form.member select { font: inherit; font-size: 0.875rem; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); min-width: 0; }
.newlink { background: var(--green-soft); border-radius: var(--r-m); padding: 12px 14px; display: grid; gap: 6px; word-break: break-all; font-size: 0.875rem; }
.newlink code { font-family: var(--mono); font-size: 0.8125rem; }

footer.site { border-top: 1px solid var(--line); padding-top: 20px; display: grid; gap: 6px; color: var(--meta); font-size: 0.8125rem; }
@media (prefers-reduced-motion: reduce) { .track { scroll-behavior: auto; } }

/* Semaine : une ligne par publication, titre tronqué. Chiffres : quatre colonnes quand la carte est large. */
.week li { grid-template-columns: 88px minmax(0, 1fr) auto; }
.week .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 901px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

@media (max-width: 620px) { .week li { grid-template-columns: 64px minmax(0, 1fr); } .week li > :last-child { grid-column: 2; justify-self: start; } .week .t { white-space: normal; } }

/* Calendrier : grille du mois (lundi en premier) ; sur téléphone, une liste des seuls jours qui ont des publications. */
.tag.late { background: var(--error-soft); color: var(--error); }
.tag.ghost { background: transparent; color: var(--meta); border: 1px dashed var(--line); }
.late-note { font-size: 0.8125rem; font-weight: 600; color: var(--error); }
.week .t a { color: var(--ink); text-decoration: none; }
.week .t a:hover { text-decoration: underline; }
.cal-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-title { font-size: 1.9rem; min-width: 10ch; text-align: center; text-transform: capitalize; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--card-line); border-radius: var(--r-m); overflow: hidden; background: var(--line); gap: 1px; }
.cal-wd { background: var(--sidebar); font-size: 0.75rem; font-weight: 600; color: var(--meta); padding: 8px 10px; }
.cal-day { background: var(--white); min-height: 118px; padding: 8px; display: grid; gap: 6px; align-content: start; min-width: 0; }
.cal-day.out { background: var(--bg); }
.cal-day.out .cal-num { color: var(--line); }
.cal-num { font-size: 0.75rem; color: var(--meta); }
.cal-day.today .cal-num { color: var(--on-brand); background: var(--brand); border-radius: var(--r-s); padding: 1px 6px; justify-self: start; font-weight: 600; }
.cal-post { display: grid; gap: 3px; padding: 6px 7px; border-radius: var(--r-s); background: var(--sidebar); border-left: 3px solid var(--line); text-decoration: none; color: var(--fg); min-width: 0; }
.cal-post:hover { background: var(--active); }
.cal-post .tag { justify-self: start; font-size: 0.6875rem; padding: 1px 6px; }
.cal-time { font-size: 0.6875rem; color: var(--meta); font-variant-numeric: tabular-nums; }
.cal-name { font-size: 0.75rem; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cal-post.s-publiee { border-left-color: var(--green); }
.cal-post.s-prevue { border-left-color: var(--turquoise); }
.cal-post.s-a-programmer { border-left-color: var(--amber); }
.cal-post.s-retard, .cal-post.s-erreur { border-left-color: var(--raspberry); background: var(--error-soft); }
.cal-post.s-non-suivie { border-left-style: dashed; }
@media (max-width: 760px) {
  .cal { grid-template-columns: minmax(0, 1fr); background: transparent; border: 0; gap: 10px; }
  .cal-wd, .cal-day.empty-day, .cal-day.out { display: none; }
  .cal-day { min-height: 0; border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 12px; }
  .cal-num { font-size: 0.875rem; font-weight: 600; color: var(--ink); text-transform: capitalize; }
  .cal-name { -webkit-line-clamp: 3; font-size: 0.875rem; }
}

.next { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.next li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--turquoise); }
.next b { font-weight: 600; color: var(--ink); font-size: 0.9375rem; }
.cal-post.s-neutre { border-left-color: var(--brand); }

/* Cycles : une page de cycle légère (grille des créas), puis une page par créa. */
.cycle-sub { font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; color: var(--muted); max-width: 52ch; }
p.status { display: block; }
.crea-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.crea-card { display: grid; gap: 8px; align-content: start; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 10px 10px 14px; text-decoration: none; color: var(--fg); }
.crea-card:hover { border-color: var(--meta); }
.crea-card b { font-size: 0.9375rem; font-weight: 600; color: var(--ink); line-height: 1.35; }
.crea-thumb { display: block; aspect-ratio: 4 / 5; border-radius: var(--r-s); overflow: hidden; background: var(--media); }
.crea-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
details.line { background: var(--sidebar); border-radius: var(--r-m); padding: 0 18px; }
details.line summary { cursor: pointer; padding: 14px 0; font-weight: 600; font-size: 0.875rem; color: var(--ink); }
details.line > :not(summary) { margin-bottom: 16px; }
.crea-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.crea-nav-btns { display: flex; gap: 8px; }
.crea { border-top: 0; padding-top: 0; }
details.captions dl.choices { margin-bottom: 14px; }
.row.two { grid-template-columns: 44px minmax(0, 1fr); }
@media (max-width: 520px) { .crea-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }

/* Quatre colonnes du tableau de bord ; deux par ligne sur tablette, une sur téléphone. */
.span-3 { grid-column: span 3; }
@media (max-width: 1100px) { .span-3 { grid-column: span 6; } }
@media (max-width: 620px) { .span-3 { grid-column: span 12; } }
.span-3 .row { grid-template-columns: 44px minmax(0, 1fr); }
.span-6 { grid-column: span 6; }
@media (max-width: 620px) { .span-6 { grid-column: span 12; } }
.span-6 .row { grid-template-columns: 44px minmax(0, 1fr); }

.resolve { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; padding-top: 12px; border-top: 1px solid var(--line); }

/* Accueil : message sur le cycle et frise de la semaine (relecture, corrections, validation). */
.band { display: grid; gap: 14px; }
.welcome { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; background: var(--sidebar); border-radius: var(--r-m); padding: 14px 18px; font-size: 0.9375rem; color: var(--muted); }
.welcome b { color: var(--ink); font-weight: 600; }
.welcome.alert { background: var(--white); border: 1px solid var(--card-line); border-left: 3px solid var(--brand); }
.frieze { display: grid; gap: 6px; }
.frieze-days, .frieze-phases { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.frieze-days span { font-size: 0.75rem; color: var(--meta); padding: 0 4px; }
.frieze-days span.today { color: var(--brand); font-weight: 700; }
.frieze-days span.today::after { content: " · aujourd'hui"; font-weight: 500; }
.phase { font-size: 0.8125rem; font-weight: 500; color: var(--muted); background: var(--soft); border-radius: var(--r-s); padding: 8px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.phase.on { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.phase.idle { background: var(--sidebar); color: var(--meta); }
.frieze-next { padding: 0 4px; }
@media (max-width: 620px) {
  .frieze-days span.today::after { content: ""; }
  .frieze-days span { font-size: 0.6875rem; padding: 0; text-align: center; }
  .phase { font-size: 0.6875rem; padding: 6px; white-space: normal; text-align: center; }
}
/* Point bleu : un cycle attend une relecture ou une validation. */
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-right: 8px; vertical-align: middle; box-shadow: 0 0 0 3px rgba(56, 204, 200, 0.35); }
#nav-cycles.has-dot::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--unread); margin-left: 5px; vertical-align: 2px; }
.cycle-card .dot { background: var(--unread); box-shadow: none; }

/* Programme : la semaine en un coup d'œil (une colonne par jour, aperçu du bandeau dans la charte du client),
   puis une fiche par rubrique (format, formule, bandeau, rotation des profils, résultats, épisodes). */
.pweek { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pday { display: grid; gap: 8px; align-content: start; background: var(--sidebar); border-radius: var(--r-m); padding: 10px; min-width: 0; }
.pday.today { background: var(--white); box-shadow: 0 0 0 1px var(--brand) inset; }
.pday-name { font-size: 0.8125rem; font-weight: 600; color: var(--ink); }
.pday.today .pday-name { color: var(--brand); }
.pchip { display: grid; gap: 4px; text-decoration: none; color: var(--fg); min-width: 0; }
.pchip:hover .pchip-name { text-decoration: underline; }
.pchip-name { font-weight: 600; font-size: 0.875rem; color: var(--ink); }
.band-frame { position: relative; display: block; aspect-ratio: 9 / 16; border-radius: var(--r-m); overflow: hidden; background: var(--band-bg); border: 1px solid var(--card-line); }
.band-frame .band { position: absolute; top: 8%; left: 8%; max-width: 84%; background: var(--band); color: #fff; font-weight: 900; letter-spacing: -0.01em; border-radius: var(--r-s); padding: 0.35em 0.6em; line-height: 1.1; }
.band-frame.small .band { font-size: 0.625rem; }
.band-frame.large .band { font-size: 1rem; }
.band-lines { position: absolute; left: 8%; right: 8%; bottom: 14%; display: grid; gap: 6%; }
.band-lines i { display: block; height: 6px; border-radius: var(--r-s); background: color-mix(in srgb, var(--band) 22%, transparent); }
.band-lines i + i { width: 70%; }
.rubric-detail { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 20px; scroll-margin-top: 68px; }
.rubric-detail.today { box-shadow: 0 0 0 1px var(--brand) inset; border-color: var(--brand); }
.rubric-body { display: grid; gap: 12px; min-width: 0; align-content: start; }
.rubric-title { font-size: 2.1rem; line-height: 1.05; }
.rubric-promise { font-size: 1rem; color: var(--ink); max-width: 62ch; }
.rubric-day { font-size: 0.8125rem; font-weight: 600; color: var(--raspberry); }
.rotation { display: flex; flex-wrap: wrap; gap: 6px; }
.rotation span { font-size: 0.75rem; border-radius: var(--r-s); padding: 3px 8px; background: var(--soft); color: var(--muted); }
.rotation span.next { background: var(--brand); color: var(--on-brand); font-weight: 600; }
.episode-now, .episodes { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 900px) { .pweek { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .pweek { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rubric-detail { grid-template-columns: 90px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .rubric-title { font-size: 1.6rem; }
  .band-frame.large .band { font-size: 0.6875rem; }
}
.tag.rubric { background: var(--brand); color: var(--on-brand); }
.band-frame.small { aspect-ratio: 3 / 4; }

/* Votre espace : le paramétrage du client, en lecture seule, un bloc à la fois. */
.espace-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.espace-nav a { font-size: 0.875rem; font-weight: 500; color: var(--ink); text-decoration: none; background: var(--sidebar); border-radius: var(--r-m); padding: 8px 12px; display: inline-flex; align-items: center; gap: 6px; }
.espace-nav a:hover { background: var(--active); }
.espace-nav a.on { background: var(--brand); color: var(--on-brand); }
.espace-nav .dot { margin: 0; width: 7px; height: 7px; background: var(--unread); box-shadow: none; }
.espace-section { display: grid; gap: 20px; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 24px 26px; }
.espace-title { font-size: 2.2rem; line-height: 1.05; }
.espace-dl dd p + p { margin-top: 8px; }
.espace-dl dd { color: var(--ink); }
.espace-part { display: grid; gap: 8px; }
.espace-part h3 { font-size: 0.9375rem; color: var(--ink); }
.verbatims { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.verbatim { margin: 0; background: var(--sidebar); border-radius: var(--r-m); padding: 14px 16px; display: grid; gap: 8px; }
.verbatim blockquote { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; color: var(--ink); }
.verbatim a { color: var(--meta); }
.presenter { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: 24px; align-items: start; }
.presenter-photo { width: 100%; border-radius: var(--r-m); border: 1px solid var(--card-line); background: var(--media); display: block; }
.presenter-body { display: grid; gap: 12px; min-width: 0; }
.presenter-name { font-size: 2rem; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: grid; gap: 4px; font-family: var(--mono); font-size: 0.75rem; color: var(--meta); }
.swatch i { display: block; width: 72px; height: 48px; border-radius: var(--r-s); border: 1px solid var(--card-line); }
.charte-sheet { width: 100%; max-width: 900px; border-radius: var(--r-m); border: 1px solid var(--card-line); display: block; }
.doors { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
@media (max-width: 720px) { .presenter { grid-template-columns: minmax(0, 1fr); } .presenter-photo { max-width: 320px; } .espace-section { padding: 18px; } }
.gallery { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.gallery figure { margin: 0; display: grid; gap: 4px; }
.gallery img { width: 100%; border-radius: var(--r-m); border: 1px solid var(--card-line); display: block; background: var(--media); }

/* Bibliothèque : recherche et filtres, puis une carte par publication ; fiche avec les chiffres réseau par réseau. */
.library-filters { display: grid; gap: 10px; grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(140px, 1fr)); align-items: end; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 14px 16px; }
.library-filters label { display: grid; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--meta); }
.library-filters input, .library-filters select { font: inherit; font-size: 0.875rem; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); min-width: 0; }
@media (max-width: 760px) { .library-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } .lib-search { grid-column: 1 / -1; } }
.library { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.lib-card { display: grid; grid-template-rows: auto 1fr; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); overflow: hidden; text-decoration: none; color: var(--fg); }
.lib-card:hover { border-color: var(--meta); }
.lib-thumb { display: block; aspect-ratio: 4 / 3; background: var(--media); overflow: hidden; }
.lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lib-thumb.empty { display: grid; place-items: center; background: var(--sidebar); color: var(--meta); font-size: 0.8125rem; font-weight: 600; }
.lib-body { display: grid; gap: 8px; padding: 12px 14px 14px; align-content: start; }
.lib-body b { font-size: 0.9375rem; color: var(--ink); line-height: 1.35; }
.lib-metrics { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.8125rem; color: var(--muted); }
.lib-metrics b { color: var(--ink); font-size: 0.875rem; }
.lib-item { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 28px; align-items: start; }
.lib-item-thumb { width: 100%; border-radius: var(--r-m); border: 1px solid var(--card-line); display: block; }
.lib-item-body { display: grid; gap: 14px; min-width: 0; }
@media (max-width: 760px) { .lib-item { grid-template-columns: minmax(0, 1fr); } .lib-item-thumb { max-width: 280px; } }
.lib-item.no-thumb { grid-template-columns: minmax(0, 1fr); }

/* Courbe de tendance et chiffres, en tête de l'accueil */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 1fr); gap: 20px; align-items: stretch; }
.hero .kpis { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.hero .kpi { padding: 10px 14px; }
.trend { display: flex; flex-direction: column; gap: 12px; position: relative; }
.trend-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.trend-key { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 4px 11px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); font-size: 0.8125rem; cursor: pointer; }
.trend-key i { width: 10px; height: 10px; border-radius: 50%; }
.trend-key[aria-pressed="false"] { color: var(--meta); background: var(--soft); }
.trend-key[aria-pressed="false"] i { background: var(--line) !important; }
.trend-plot { position: relative; flex: 1; min-height: 300px; touch-action: pan-y; }
.trend-plot svg { position: absolute; inset: 0; display: block; }
.trend-grid { stroke: var(--line); stroke-width: 1; }
.trend-axis { fill: var(--meta); font-size: 12px; font-variant-numeric: tabular-nums; }
.trend-gap { fill: var(--soft); }
.trend-gap-text { fill: var(--meta); font-size: 12px; }
.trend-end { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.trend-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend-dot { stroke: var(--white); stroke-width: 2; }
.trend-cross { stroke: var(--meta); stroke-width: 1; }
.trend-tip { position: absolute; top: 12px; display: grid; gap: 3px; min-width: 170px; padding: 9px 11px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: 0 4px 16px rgba(19, 26, 43, 0.1); font-size: 0.8125rem; pointer-events: none; }
.trend-tip[hidden] { display: none; }
.trend-tip span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.trend-tip i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.trend-tip em { margin-left: auto; padding-left: 12px; font-style: normal; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.tops { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 24px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero .kpis { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
  .trend-plot { min-height: 240px; }
  .tops { grid-template-columns: minmax(0, 1fr); }
}

/* Fins par réseau */
.endings { display: grid; gap: 6px; margin-bottom: 10px; }
.endings-choices { display: flex; gap: 6px; }
.ending { flex: 1 1 0; min-width: 0; display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--white); color: var(--ink); cursor: pointer; font-size: 0.8125rem; line-height: 1.3; }
.ending span { color: var(--meta); }
.ending:hover { border-color: var(--meta); }
.ending[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.ending[aria-pressed="true"] span { color: var(--on-brand); }

/* Veille */
.watch-summary p { max-width: 72ch; }
.watch-section { display: grid; gap: 14px; }
.watch-points { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); align-items: start; }
.watch-text { font-size: 1rem; color: var(--ink); font-weight: 500; line-height: 1.45; }
.tag.ghost { background: var(--soft); color: var(--meta); }
.watch-linked { display: flex; flex-wrap: wrap; gap: 6px; }
.watch-linked a { width: 44px; height: 56px; border-radius: var(--r-s); overflow: hidden; background: var(--sidebar); border: 1px solid var(--card-line); display: grid; place-items: center; font-size: 0.625rem; color: var(--meta); text-decoration: none; text-align: center; line-height: 1.1; }
.watch-linked a:hover { border-color: var(--meta); }
.watch-linked img { width: 100%; height: 100%; object-fit: cover; display: block; }
.watch-form { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.watch-by { font-size: 0.8125rem; color: var(--muted); }
.watch-by b { color: var(--ink); font-weight: 600; }
.watch-choice { display: flex; gap: 6px; }
.watch-decide { flex: 1 1 0; text-align: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--white); color: var(--ink); font-size: 0.875rem; font-weight: 500; cursor: pointer; }
.watch-decide:hover { border-color: var(--meta); }
.watch-decide[data-decision="kept"][aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.watch-decide[data-decision="dropped"][aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--on-brand); }
.watch-reason { display: grid; gap: 4px; font-size: 0.75rem; font-weight: 600; color: var(--meta); }
.watch-reason input { font: inherit; font-size: 0.875rem; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--white); color: var(--ink); min-width: 0; }
.watch-history { font-size: 0.8125rem; color: var(--muted); }
.watch-history summary { cursor: pointer; color: var(--meta); }
.watch-history ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.watch-accounts { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.watch-account-head { display: flex; align-items: center; gap: 12px; }
.watch-account-head img, .watch-account-head > span { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sidebar); }
.watch-name { font-size: 1rem; color: var(--ink); }
.watch-networks { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 0.875rem; }
.watch-thumb { aspect-ratio: 4 / 5; }
.watch-cited { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 0.875rem; }

/* Marque de l'agence sans logo : son nom */
.brand-name { font-weight: 600; font-size: 1rem; color: var(--ink); }
.brand-name[hidden], #brand-logo[hidden] { display: none; }

/* Storyboard : une scène par ligne, image clé à gauche */
.crea.storyboard { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.scenes { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.scene { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 10px; }
.scene-img { display: grid; place-items: center; background: var(--media); border-radius: var(--r-s); overflow: hidden; aspect-ratio: 9 / 16; color: var(--meta); font-weight: 600; }
.scene-img.v45 { aspect-ratio: 4 / 5; } .scene-img.v11 { aspect-ratio: 1; } .scene-img.v169 { aspect-ratio: 16 / 9; }
.scene-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scene-text { display: grid; gap: 4px; font-size: 0.9375rem; min-width: 0; }
.scene-text b { color: var(--ink); font-weight: 600; }
@media (max-width: 520px) { .scene { grid-template-columns: 72px minmax(0, 1fr); } }

/* Page cycle : le parti pris de la semaine d'abord, les créas ensuite (15 nov. 2026). */
.to-creas { justify-self: start; font-size: 0.875rem; font-weight: 500; color: var(--brand); }
.construction, .creas { display: grid; gap: 18px; }
.construction-title { font-size: 1.75rem; line-height: 1.1; color: var(--ink); }
.construction .thread { max-width: 70ch; color: var(--fg); font-size: 0.9375rem; line-height: 1.6; border-left: 3px solid var(--raspberry); padding-left: 14px; }
.k-block { display: grid; gap: 10px; }
.k-block h3, .k-text dt { font-size: 0.75rem; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: 0.04em; }
.objectives { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); gap: 10px; }
.objective { background: var(--white); border: 1px solid var(--card-line); border-radius: var(--r-m); padding: 12px 14px; display: grid; gap: 2px; align-content: start; min-width: 0; }
.objective .fn { font-size: 0.75rem; font-weight: 500; color: var(--meta); }
.objective b { font-size: 1.6rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.15; }
.objective .metric { font-size: 0.8125rem; color: var(--fg); }
.objective small { font-size: 0.75rem; color: var(--meta); line-height: 1.45; margin-top: 4px; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.role { background: var(--sidebar); border-radius: var(--r-m); padding: 12px 14px; display: grid; gap: 1px; min-width: 0; }
.role b { font-size: 1.6rem; font-weight: 600; color: var(--ink); line-height: 1.15; }
.role span { font-size: 0.875rem; color: var(--fg); }
.role small { font-size: 0.75rem; color: var(--meta); }
.role-why { font-size: 0.875rem; color: var(--muted); max-width: 70ch; }
.role-why b { color: var(--ink); font-weight: 600; }
.k-text { display: grid; gap: 16px; margin: 0; }
.k-text div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.k-text dt { padding-top: 3px; }
.k-text dd { margin: 0; font-size: 0.9375rem; line-height: 1.6; color: var(--fg); max-width: 70ch; }
.creas { border-top: 1px solid var(--line); padding-top: 28px; }
@media (max-width: 640px) { .k-text div { grid-template-columns: 1fr; gap: 6px; } .role b, .objective b { font-size: 1.35rem; } }

/* Ce qui ressort des 30 derniers jours (bibliothèque) */
.insights { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.talk li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr); gap: 10px; align-items: start; }
.talk-n { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--ink); font-weight: 400; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; align-items: center; font-size: 0.875rem; }
.bars-l { grid-column: 1 / -1; }
.bars-t { height: 8px; background: var(--soft); border-radius: var(--r-s); overflow: hidden; }
.bars-t i { display: block; height: 100%; background: var(--brand); border-radius: var(--r-s); }

/* Veille : trois onglets, faits datés et sourcés */
.watch-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.watch-tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 0.9375rem; border-bottom: 2px solid transparent; white-space: nowrap; }
.watch-tabs a.on { color: var(--ink); border-color: var(--brand); }
.watch-rhythm { margin-top: -24px; }
.watch-topics { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); align-items: start; }
.watch-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.watch-facts li { display: grid; gap: 3px; }
.watch-facts p { color: var(--muted); }
.watch-words { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.watch-words q { color: var(--ink); }

/* Menu à gauche, par module (24 novembre 2026). Sous 900 px, il se replie derrière « Menu » et s'ouvre par-dessus la page. */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); align-items: start; min-height: calc(100vh - 51px); }
.side { position: sticky; top: 51px; align-self: start; max-height: calc(100vh - 51px); overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--line); padding: 16px 10px 20px; display: flex; flex-direction: column; gap: 2px; min-height: calc(100vh - 51px); }
.side a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: var(--r-s); color: var(--ink); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.side a:hover { background: var(--active); }
.side a[aria-current="page"] { background: var(--active); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.side-group { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--meta); padding: 16px 10px 4px; }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.side-foot .side-pick { padding: 4px 10px 8px; display: grid; gap: 4px; font-size: 0.75rem; color: var(--meta); font-weight: 600; }
.side-foot select { font: inherit; font-size: 0.875rem; padding: 6px 8px; border-radius: var(--r-s); border: 1px solid var(--line); background: var(--white); color: var(--ink); }
.menu-btn { display: none; font: inherit; font-size: 0.875rem; font-weight: 500; border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: var(--r-s); padding: 6px 11px; cursor: pointer; flex: none; }
.shell > .wrap { width: 100%; }
@media (max-width: 900px) {
  .menu-btn { display: inline-block; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; position: fixed; left: 0; top: 51px; bottom: 0; height: calc(100dvh - 51px); width: min(290px, 86vw); z-index: 30; max-height: none; min-height: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); }
  body.menu-open .side { display: flex; }
}
.side[hidden], .menu-btn[hidden] { display: none !important; }
.shell:has(> .side[hidden]) { grid-template-columns: minmax(0, 1fr); }
