/* Studio (NAMUN Media OS) — calme, lumineux, aéré. Mêmes jetons « AYA · Theme V1 » que NAMUN Media OS et Booking OS
   (Figma « SARAN OS — Design System V1 · AYA ») ; Inter et Cormorant Garamond hébergées chez nous. */
@font-face { font-family: "Inter"; src: url("/ui/polices/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("/ui/polices/cormorant-garamond-latin.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
/* Palette SARAN OS V1 — à modifier ici seulement. Ces noms ne s'affichent jamais dans l'interface. */
:root {
  --ivoire: #F7F3E9; --charbon: #29251C; --or: #D6B25E; --royal: #1000C8;
  --ok: #2E8B57; --ko: #C0392B; --warn: #C27C0E; --wait: #6E6AA8; --urgent: #D9690F;
  --radius: 16px; font-size: 16px;
}
/* Clair : ivoire et charbon */
html[data-theme="light"] {
  --bg: #F7F3E9; --panel: #FFFFFF; --raised: #FFFFFF; --ink: #252321; --muted: #665E55; --line: #DED7CB; --soft: #F1EBDD;
  --accent: #9B7425; --accent-ink: #FFFFFF; --accent-text: #9B7425; --brand: #9B7425; --bar: #C9A34A;
  --ok-bg: #E4F1E8; --ko-bg: #F8E3E0; --stage: #15130E; --ok-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(41,37,28,.05), 0 8px 28px rgba(41,37,28,.07); color-scheme: light;
}
/* Sombre : famille de charbons, surfaces légèrement différenciées */
html[data-theme="dark"] {
  --bg: #252321; --panel: #34312E; --raised: #3C3935; --ink: #F7F3E9; --muted: #CFC8BE; --line: #504B45; --soft: #2E2B28;
  --accent: #C9A34A; --accent-ink: #252321; --accent-text: #C9A34A; --brand: #C9A34A; --bar: #C9A34A;
  --ok: #5FBF85; --ko: #E8746A; --warn: #E3A447; --ok-bg: #1F3326; --ko-bg: #3B221E; --stage: #0F0D09; --ok-ink: #0E1A12;
  --shadow: 0 1px 2px rgba(0,0,0,.25), 0 10px 30px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Inter", -apple-system, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; line-height: 1.5; -webkit-font-smoothing: antialiased; }
select, input, textarea, button { font: inherit; color: inherit; }
select, input, textarea { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
textarea { width: 100%; min-height: 80px; resize: vertical; }
a { color: var(--accent-text); }
h1 { font-family: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif; font-size: 2.2rem; font-weight: 500; letter-spacing: 0; line-height: 1.1; margin: 6px 0 18px; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 28px 0 12px; }
h3 { font-size: 1rem; font-weight: 600; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.center { text-align: center; }
.big { font-size: 1.35rem; font-weight: 600; margin: 4px 0; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.link { color: var(--accent-text); cursor: pointer; font-weight: 500; }

/* Coque : barre latérale + contenu */
body.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--panel); border-right: 1px solid var(--line); padding: 24px 14px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 0; height: 100vh; }
.brand { font-weight: 700; display: flex; align-items: center; gap: 9px; padding: 0 10px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--brand); display: inline-block; }
.side-client { display: flex; flex-direction: column; gap: 4px; padding: 0 6px; font-size: .78rem; color: var(--muted); }
.side-client select { font-size: .92rem; color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 10px; cursor: pointer; font-size: .95rem; display: flex; justify-content: space-between; align-items: center; color: var(--ink); }
.nav button:hover { background: var(--soft); }
.nav button.on { background: var(--accent); color: var(--accent-ink); }
.nav.secondary { margin-top: auto; border-top: 1px solid var(--line); padding-top: 10px; }
.nav .count { background: var(--urgent); color: #fff; border-radius: 999px; font-size: .72rem; padding: 0 7px; line-height: 1.6; }
.nav .count:empty { display: none; }
.side .who { font-size: .8rem; color: var(--muted); padding: 0 10px; display: flex; gap: 6px; align-items: center; }
.content { min-width: 0; }
main { padding: 26px 40px 70px; max-width: 1240px; margin: 0 auto; }

/* Composants */
.card { background: var(--panel); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card.wide { grid-column: 1 / -1; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); border-radius: 10px; padding: 8px 16px; cursor: pointer; font-weight: 500; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: var(--soft); }
.btn.good { background: var(--ok); border-color: var(--ok); color: var(--ok-ink); font-weight: 600; }
.btn.bad { background: transparent; border-color: var(--ko); color: var(--ko); }
.btn.small { padding: 4px 10px; font-size: .85rem; }
.btn.big { padding: 12px 18px; font-size: 1rem; flex: 1; }
.btn.round { border-radius: 999px; width: 40px; height: 40px; padding: 0; font-size: 1.2rem; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.pill { border-radius: 999px; padding: 2px 10px; border: 1px solid var(--line); white-space: nowrap; font-size: .82rem; }
.pill.ok { color: var(--ok); border-color: var(--ok); } .pill.ko { color: var(--ko); border-color: var(--ko); } .pill.wait { color: var(--wait); border-color: var(--wait); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td textarea { width: 100%; min-width: 280px; min-height: 0; }
.status { font-weight: 600; font-size: .86rem; }
.status.brief, .status.en_production { color: var(--muted); }
.status.a_controler, .status.a_valider { color: var(--urgent); }
.status.controle_ko, .status.a_corriger { color: var(--ko); }
.status.valide, .status.pret_a_programmer { color: var(--accent-text); }
.status.programme, .status.publie, .status.mesure { color: var(--ok); }
.banner { background: var(--soft); padding: 10px 14px; border-radius: 10px; margin: 10px 0; }
.banner.ok { background: var(--ok-bg); } .banner.ko { background: var(--ko-bg); }
.checks { padding-left: 0; } .checks li { list-style: none; margin: 2px 0; }
.checks li::before { content: "✓ "; color: var(--ok); } .checks li.bad::before { content: "✗ "; color: var(--ko); } .checks li.soft::before { content: "• "; color: var(--warn); }
.ok-text { color: var(--ok); }
.preview { width: 100%; max-height: 420px; background: #000; border-radius: 10px; object-fit: contain; }
.preview.v { max-height: 520px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: .9rem; } .kv dt { color: var(--muted); } .kv dd { margin: 0; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 10px; max-width: 90vw; z-index: 20; }
pre { white-space: pre-wrap; background: var(--soft); padding: 12px; border-radius: 10px; font-size: .84rem; max-height: 340px; overflow: auto; }
.bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; margin: 8px 0 6px; }
.bar > span { display: block; height: 100%; background: var(--bar); border-radius: 4px; }
details summary { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
.field > span { font-size: .82rem; color: var(--muted); font-weight: 500; }
.field input, .field textarea { width: 100%; }
.drop { border: 2px dashed var(--line); border-radius: 12px; padding: 20px; text-align: center; margin-bottom: 12px; }
.drop.over { border-color: var(--brand); background: var(--soft); }
.msg { padding: 11px 14px; border-radius: 14px; max-width: 88%; }
.msg.assistant { background: var(--soft); align-self: flex-start; }
.msg.user { background: var(--accent); color: var(--accent-ink); align-self: flex-end; }
.msgs { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; padding: 4px 2px 10px; }
.act { font-size: .84rem; margin-top: 4px; } .act.ok { color: var(--ok); } .act.ko { color: var(--ko); }
.swatches { display: flex; gap: 5px; flex-wrap: wrap; } .swatches span { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); }
.swatches.big span { width: 38px; height: 38px; }
.pal { margin: 4px 0; } .pal input[type=color] { width: 42px; height: 36px; padding: 2px; }

/* Aujourd'hui */
.today { max-width: 900px; margin: 0 auto; }
.hero { margin: 7vh auto 36px; }
.hero h1 { font-size: 2.3rem; text-align: center; margin-bottom: 4px; }
.hero h1::after { content: ''; display: block; width: 44px; height: 3px; background: var(--brand); border-radius: 2px; margin: 12px auto 0; }
.hero .lead { text-align: center; color: var(--muted); font-size: 1.15rem; margin: 0 0 26px; }
.pilot { background: var(--panel); border-radius: 22px; box-shadow: var(--shadow); padding: 16px 18px 12px; border: 1px solid var(--line); }
.pilot textarea { border: 0; background: transparent; font-size: 1.08rem; min-height: 64px; outline: none; padding: 6px 4px; }
.pilot-bar { display: flex; align-items: center; gap: 10px; }
.attach { cursor: pointer; font-size: 1.2rem; opacity: .7; padding: 4px 8px; border-radius: 8px; } .attach:hover { background: var(--soft); opacity: 1; }
.shortcuts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.pillbtn { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 7px 15px; cursor: pointer; color: var(--muted); }
.pillbtn:hover { color: var(--ink); border-color: var(--brand); }
.below { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.panel { background: var(--panel); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s; }
.panel:hover { transform: translateY(-2px); }
.panel p { margin: 6px 0; }
.panel-h { display: flex; justify-content: space-between; align-items: center; font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.badge { background: var(--urgent); color: #fff; border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.thumbs { display: flex; gap: 6px; margin: 10px 0 4px; } .thumbs img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }

/* Clients et projets */
.clients { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.ccard, .chip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 10px 16px; cursor: pointer; text-align: left; }
.ccard.on, .chip.on { border-color: var(--accent-text); box-shadow: 0 0 0 2px var(--accent-text) inset; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 18px; }
.fiche .fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; } .fiche .field.wide { grid-column: 1 / -1; }

/* Résumés (Identité, Stratégie) */
.summary { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; background: var(--panel); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.summary .quote { font-size: 1.12rem; margin: 6px 0; }
.summary .target { font-size: 1.1rem; font-weight: 600; }
.sum-side { border-left: 1px solid var(--line); padding-left: 20px; }
.sec { background: var(--panel); border-radius: var(--radius); padding: 14px 20px; box-shadow: var(--shadow); margin: 12px 0; }
.sec > summary { font-weight: 600; padding: 4px 0; }
.sec[open] > summary { margin-bottom: 10px; }
.ogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.ocard { background: var(--panel); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.ocard .code { display: inline-block; background: var(--soft); border-radius: 6px; padding: 0 7px; font-size: .78rem; margin-right: 6px; color: var(--muted); }
.docs { display: flex; flex-direction: column; gap: 6px; } .doc { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); } .doc a { flex: 1; text-decoration: none; }

/* À valider */
.review { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 22px; align-items: start; }
.stage { background: var(--stage); border-radius: var(--radius); min-height: 60vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.stage img, .stage video { max-width: 100%; max-height: 72vh; object-fit: contain; }
.stage-text { background: var(--panel); color: var(--ink); white-space: pre-wrap; padding: 26px 30px; max-height: 72vh; overflow: auto; width: 100%; font-size: .95rem; align-self: stretch; }
.rpanel { background: var(--panel); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; position: sticky; top: 20px; }
.rpanel h2 { margin: 0; }
.caption { background: var(--soft); border-radius: 12px; padding: 10px 12px; font-size: .9rem; white-space: pre-wrap; max-height: 220px; overflow: auto; }
.decide { display: flex; gap: 10px; margin-top: 6px; }
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 18px 2px 6px; }
.sthumb { flex: 0 0 auto; width: 74px; height: 74px; border-radius: 12px; border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--soft); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .78rem; color: var(--muted); }
.sthumb img { width: 100%; height: 100%; object-fit: cover; }
.sthumb.on { border-color: var(--brand); }
.empty { text-align: center; padding: 12vh 0; }

/* Calendrier */
.month { text-transform: capitalize; min-width: 150px; text-align: center; }
.legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--muted); margin-bottom: 12px; }
.lg { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.calwrap { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.dow { font-size: .78rem; color: var(--muted); text-align: center; padding: 4px 0; }
.day { background: var(--panel); border-radius: 12px; min-height: 108px; padding: 6px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.day.out { background: transparent; box-shadow: none; }
.day.is-today { outline: 2px solid var(--brand); }
.day.other { background: var(--soft); box-shadow: none; }
.dnum { font-size: .8rem; color: var(--muted); }
.ev { border: 0; border-left: 4px solid var(--muted); background: var(--soft); border-radius: 6px; padding: 3px 6px; font-size: .74rem; text-align: left; cursor: pointer; line-height: 1.25; overflow: hidden; }
.ev .t { font-weight: 600; }
.st-a_valider { border-left-color: var(--urgent); } .lg.st-a_valider { background: var(--urgent); }
.st-valide { border-left-color: var(--accent-text); } .lg.st-valide { background: var(--accent-text); }
.st-pret_a_programmer { border-left-color: var(--or); } .lg.st-pret_a_programmer { background: var(--or); }
.st-programme { border-left-color: var(--ok); } .lg.st-programme { background: var(--ok); }
.st-publie, .st-mesure { border-left-color: #0b5d34; } .lg.st-publie { background: #0b5d34; }
.pf { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.pf-youtube { background: #e62117; } .pf-facebook { background: #1877f2; } .pf-instagram { background: #c13584; }
.evpanel { width: 320px; position: sticky; top: 20px; }
.evimg { width: 100%; border-radius: 10px; margin: 6px 0; }

@media (max-width: 900px) {
  body.shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; }
  .nav { flex-direction: row; flex-wrap: wrap; } .nav.secondary { margin-top: 0; border: 0; padding: 0; }
  main { padding: 18px 16px 50px; }
  .review, .summary, .calwrap, .fiche .fgrid { grid-template-columns: 1fr; }
  .sum-side { border: 0; padding: 0; }
  .cal { grid-template-columns: repeat(7, minmax(42px, 1fr)); overflow-x: auto; }
}
.sthumb { position: relative; }
.sthumb .play { position: absolute; color: #fff; font-size: 1rem; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.stage-text h3 { font-size: 1.02rem; margin: 18px 0 6px; color: var(--brand); }
.stage-text h3:first-child { margin-top: 0; font-size: 1.15rem; }
.stage-text h4 { font-size: .95rem; margin: 14px 0 4px; }
.stage-text p { margin: 3px 0; }
.stage-text { white-space: normal; }

/* Réglages d'affichage */
.seg { display: inline-flex; background: var(--soft); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 16px; border-radius: 9px; cursor: pointer; color: var(--ink); }
.seg button.on { background: var(--accent); color: var(--accent-ink); }
.conn { display: grid; grid-template-columns: 22px 220px 1fr; gap: 6px 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.conn .s { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; }
.conn .s { background: transparent; border: 2px solid var(--muted); box-sizing: border-box; } .conn .s.ok { background: var(--ok); border: 0; } .conn .s.ko { background: var(--muted); opacity: .5; border: 0; }
.sk-state { font-size: .8rem; padding: 2px 9px; border-radius: 999px; background: var(--soft); white-space: nowrap; }
.sk-state.ok { color: var(--ok); } .sk-state.fix { color: var(--ko); } .sk-state.run { color: var(--accent-text); }
.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: var(--bg); }
.login form { width: min(380px, 100%); display: flex; flex-direction: column; gap: 6px; }
.login .brand { padding: 0 0 10px; }
.side .me { font-size: .82rem; color: var(--muted); padding: 0 10px; }

/* En ligne : vignette envoyée par l'atelier + bouton Dropbox */
.webmedia { position: relative; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; }
.webmedia img, .webmedia video { max-width: 100%; max-height: 62vh; border-radius: 8px; display: block; }
.webmedia video { background: #000; }
.webmedia.v img, .webmedia.v video { max-height: 70vh; }
.webmedia .play { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%); font-size: 2.4rem; color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,.6); pointer-events: none; }
.webmedia .noprev { padding: 48px 16px; border: 1px dashed var(--line, rgba(127,127,127,.35)); border-radius: 8px; color: var(--muted, #888); width: 100%; text-align: center; }
.webmedia-bar { display: flex; gap: 8px; justify-content: center; }
.btn.dbx { text-decoration: none; }

.newkey { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--or); border-radius: 8px; }
.newkey code { word-break: break-all; font-size: .9rem; }
.ko-text { color: var(--ko, #c0392b); }

/* ---------- Téléphone d'abord, puis tablette et ordinateur (lot 5 du 28/10) : mêmes couleurs, mêmes polices ;
   menu repliable, cibles tactiles d'au moins 44 px, rien ne déborde de l'écran, encoches respectées. */
.menu-btn { display: none; }
.side { height: 100dvh; }
.grid { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.below { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.ogrid { grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); }
input, select, textarea { max-width: 100%; }
img, video { max-width: 100%; }
.banner.warn { border-left: 4px solid var(--warn); }
.msg.failed { opacity: .85; }
.msg.partial { opacity: .8; border: 1px dashed var(--line); }
.engine { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.msg .etapes { margin-top: 6px; color: var(--muted); } .msg .etapes summary { cursor: pointer; } .msg .etapes ul { margin: 4px 0 0 18px; padding: 0; }
.pilot .pour { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; } .pilot .pour select { max-width: 70vw; }
.reqstate { align-self: flex-end; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; justify-content: flex-end; color: var(--muted); max-width: 94%; text-align: right; }
.reqstate.wait > span::before { content: "● "; color: var(--wait); }
.reqstate.ko > span { color: var(--ko); }
.reqstate details { width: 100%; text-align: right; } .reqstate .trace { text-align: left; }
.trace { margin: 4px 0; padding-left: 16px; font-size: .8rem; max-height: 180px; overflow-y: auto; }
.prop { margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; gap: 4px; }
.prop.appliquee { border-color: var(--ok); } .prop.refusee { opacity: .75; }
.msg.user .prop { color: var(--ink); }
@media (hover: none) {
  .panel:hover { transform: none; }
  .nav button:not(.on):hover, .btn.ghost:hover { background: transparent; }
}
@media (pointer: coarse) {
  .btn, .pillbtn, .seg button, .chip, .ccard, select, input:not([type=checkbox]):not([type=radio]):not([type=color]) { min-height: 44px; }
  .btn.small { padding: 9px 14px; font-size: .92rem; }
  .btn.round { width: 48px; height: 48px; }
  .attach { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .nav button { min-height: 44px; }
  details > summary { padding: 10px 0; }
  .small { font-size: .9rem; }
  input[type=checkbox] { width: 22px; height: 22px; }
}
@media (max-width: 900px) {
  body.shell { grid-template-rows: auto 1fr; }
  .side { align-content: flex-start; position: sticky; top: 0; z-index: 10; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    padding: calc(10px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 10px calc(12px + env(safe-area-inset-left)); border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { flex: 1; padding: 0; }
  .menu-btn { display: inline-flex; align-items: center; }
  .side-client { flex-direction: row; align-items: center; gap: 8px; width: 100%; padding: 0; }
  .side-client select { flex: 1; min-width: 0; }
  .nav, .side .me, .side .who { display: none; width: 100%; }
  body.nav-open .nav, body.nav-open .side .who { display: flex; }
  body.nav-open .side .me { display: block; padding: 4px 12px; }
  .nav { flex-direction: column; } .nav.secondary { margin-top: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  main { padding: 16px calc(16px + env(safe-area-inset-right)) calc(64px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left)); }
  h1 { font-size: 1.45rem; }
  .hero { margin: 3vh auto 24px; } .hero h1 { font-size: 1.8rem; }
  .pilot { padding: 12px 12px 10px; border-radius: 18px; }
  .msgs { max-height: 58dvh; } .msg { max-width: 94%; }
  table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  td textarea { min-width: 200px; }
  .conn { grid-template-columns: 22px 1fr; } .conn > .small { grid-column: 2; }
  .stage { min-height: 0; max-height: 62dvh; } .stage img, .stage video { max-height: 60dvh; }
  .webmedia img, .webmedia.v img, .webmedia video { max-height: 52dvh; }
  .rpanel { position: static; }
  .decide { position: sticky; bottom: env(safe-area-inset-bottom); background: var(--panel); padding: 8px 0; z-index: 2; }
  .evpanel { width: auto; position: static; }
  .toast { bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* À valider : création qui attend une correction (on peut en parler avec AYA) */
.sthumb.fix { outline: 2px solid var(--or, #D6B25E); outline-offset: -2px; }
/* À valider : file de cartes, navigation, ce qui a changé, variantes (demande de Saran du 31/10) */
.nav-revue { gap: 10px; align-items: center; }
.file-revue { display: flex; gap: 10px; overflow-x: auto; padding: 6px 2px 16px; }
.fcard { flex: 0 0 150px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; text-align: left; border: 2px solid var(--line); background: var(--panel); border-radius: 12px; padding: 8px; cursor: pointer; color: var(--ink); }
.fcard.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.fcard .fthumb { width: 100%; height: 84px; border-radius: 8px; overflow: hidden; background: var(--soft); display: flex; align-items: center; justify-content: center; position: relative; color: var(--muted); font-size: .8rem; }
.fcard .fthumb img, .fcard .fthumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.fcard .fthumb .play { position: absolute; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.fcard .ftitle { font-size: .82rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pill.new { color: var(--accent-text, var(--brand)); border-color: var(--accent-text, var(--brand)); }
.changes { border: 1px solid var(--accent-text, var(--brand)); border-radius: 12px; padding: 10px 12px; font-size: .9rem; }
.changes p { margin: 4px 0; }
.diff { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; max-height: 240px; overflow: auto; white-space: pre-wrap; }
.diff .add { color: var(--ok); } .diff .del { color: var(--ko); text-decoration: line-through; }
.variantes .row { flex-wrap: wrap; gap: 6px; }
.pillbtn.off { cursor: default; opacity: .7; }
/* Urgence et date limite de validation (demande de Saran du 31/10) */
.fcard .fdate { font-size: .78rem; color: var(--muted); }
.urg { font-size: .74rem; font-weight: 600; border-radius: 999px; padding: 1px 8px; }
.urg.late, .deadline.late { color: #fff; background: var(--ko); }
.urg.urgent { color: #1a1a1a; background: #E8A33D; }
.urg.soon { color: #1a1a1a; background: #E9D58A; }
.urg.calm { color: var(--muted); border: 1px solid var(--line); }
.deadline { border-radius: 10px; padding: 8px 10px; margin: 0; font-size: .9rem; }
.deadline.urgent { background: rgba(232,163,61,.18); border: 1px solid #E8A33D; }
.deadline.soon { background: rgba(233,213,138,.14); border: 1px solid #E9D58A; }
.deadline.calm { border: 1px solid var(--line); }
/* Choisir la version à garder dans une série (demande de Saran du 31/10) */
.choix { border: 1px solid var(--brand); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.choix p { margin: 0; }
.vrow { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; border-radius: 10px; padding: 4px; }
.vrow.on { background: var(--soft); }
.vthumb { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; border: 0; padding: 0; background: var(--soft); position: relative; cursor: pointer; color: var(--muted); font-size: .7rem; }
.vthumb img { width: 100%; height: 100%; object-fit: cover; } .vthumb .play { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; }
.vthumb[disabled] { cursor: default; }
.vname { font-size: .88rem; }

/* Lien de retour vers l'accueil de NAMUN Media OS */
.os-retour { display: inline-block; margin: 0 0 6px; font-size: .9rem; font-weight: 600; color: var(--brand); text-decoration: none; }
.os-retour:hover { text-decoration: underline; }
.brand .symbole { width: 21px; height: 28px; display: block; flex: none; }

/* ---------- Menu court et « Ce qui t'attend » (GO de Saran du 10/11 ; maquette Figma « 05 · Studio · refonte de l'usage ») :
   plus d'air, écriture plus grande, un gros bouton par geste, l'état écrit en toutes lettres. */
:root { --g-approuver: #B85C00; --g-confirmer: #9B7425; --g-corriger: #BF382B; --g-ok: #2E7D4F;
  --g-facebook: #1877F2; --g-instagram: #C13584; --g-youtube: #E00000; --g-or1: #C9A34A; --g-or2: #9B7425; }
html[data-theme="dark"] { --g-approuver: #F0A65A; --g-confirmer: #DDBA64; --g-corriger: #EE8378; --g-ok: #6FCB93;
  --g-facebook: #6EA8FF; --g-instagram: #F27AC0; --g-youtube: #FF7A7A; }
body.shell { grid-template-columns: 280px 1fr; }
.side { padding: 32px 20px 24px; gap: 14px; }
.nav button { font-size: 1.05rem; padding: 13px 16px; border-radius: 14px; color: var(--muted); font-weight: 500; }
.nav button.on { background: rgba(185,134,60,.16); color: var(--ink); font-weight: 600; }
.nav .count { background: var(--accent); color: var(--accent-ink); font-size: .8rem; padding: 1px 9px; font-weight: 700; }
.nav-plus { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.nav-plus summary { cursor: pointer; padding: 11px 16px; color: var(--muted); font-size: .98rem; list-style: none; border-radius: 12px; }
.nav-plus summary::-webkit-details-marker { display: none; }
.nav-plus summary::after { content: " ›"; }
.nav-plus[open] summary::after { content: " ⌄"; }
.nav-plus summary:hover { background: var(--soft); }
.nav-plus button { font-size: .95rem; padding: 10px 16px; }
.aya-btn { margin-top: auto; border: 1.5px solid rgba(185,134,60,.55); background: var(--panel); color: var(--accent-text); font-weight: 600; font-size: 1.02rem;
  border-radius: 999px; padding: 14px 18px; cursor: pointer; }
.aya-btn.on, .aya-btn:hover { background: rgba(185,134,60,.14); }

.attend { max-width: 1100px; margin: 0 auto; display: grid; gap: 24px; padding-top: 18px; }
.g-tete { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 4px; }
.g-h1 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 400; font-size: clamp(2.6rem, 5vw, 3.8rem); line-height: 1.05; margin: 0; }
.g-sub { font-size: 1.25rem; color: var(--muted); margin: 10px 0 0; }
.g-carte { display: grid; grid-template-columns: 126px minmax(0, 1fr) auto; gap: 32px; align-items: center; background: var(--panel);
  border: 1px solid rgba(185,134,60,.22); border-radius: 28px; padding: 26px 32px 26px 26px; box-shadow: var(--shadow); }
.g-apercu { width: 126px; height: 224px; border-radius: 18px; overflow: hidden; position: relative; border: 0; padding: 0; cursor: zoom-in;
  background: var(--stage); display: flex; align-items: center; justify-content: center; color: #fff; }
.g-apercu img, .g-apercu video { width: 100%; height: 100%; object-fit: cover; display: block; }
.g-apercu .play { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 48px; height: 48px; border-radius: 50%;
  background: rgba(0,0,0,.45); display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.g-apercu.fixe { cursor: default; flex: 0 0 auto; }
.g-texte { min-width: 0; display: grid; gap: 8px; }
.g-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.g-etat { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 13px; border-radius: 999px; color: var(--g-c); background: color-mix(in srgb, var(--g-c) 13%, transparent); }
.g-etat i, .g-net i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; display: inline-block; }
.g-approuver { --g-c: var(--g-approuver); } .g-confirmer { --g-c: var(--g-confirmer); } .g-corriger { --g-c: var(--g-corriger); }
.g-net { display: inline-flex; align-items: center; gap: 7px; font-size: 1rem; font-weight: 500; color: var(--muted); }
.g-net i { background: var(--g-n, var(--muted)); }
.g-facebook { --g-n: var(--g-facebook); } .g-instagram { --g-n: var(--g-instagram); } .g-youtube { --g-n: var(--g-youtube); }
.g-genre { color: var(--muted); font-size: 1rem; }
.g-titre { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: clamp(1.7rem, 2.6vw, 2.1rem); line-height: 1.12; margin: 2px 0 0; overflow-wrap: anywhere; }
.g-titre-p { font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.6rem; margin: 0; line-height: 1.15; }
.g-date { font-size: 1.2rem; font-weight: 600; margin: 0; }
.g-zone, .g-local { color: var(--muted); font-weight: 400; font-size: 1.02rem; }
.g-local { margin: 0; }
.g-why { color: var(--muted); font-size: 1.05rem; line-height: 1.5; margin: 0; max-width: 62ch; }
.g-legende summary { cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: .98rem; }
.g-legende textarea { margin-top: 8px; min-height: 0; font-size: 1rem; line-height: 1.5; background: var(--soft); resize: vertical; }
.g-legende-txt { margin-top: 8px; white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px 14px; font-size: 1rem; max-height: 260px; overflow: auto; }
.g-legende-txt.court { max-height: 160px; }
.g-geste { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 220px; max-width: 280px; }
.g-btn { border: 0; cursor: pointer; border-radius: 999px; padding: 18px 32px; font-size: 1.1rem; font-weight: 600; color: #fff; text-align: center;
  background: linear-gradient(90deg, var(--g-or1), var(--g-or2)); box-shadow: 0 8px 18px -4px rgba(153,115,38,.4); }
.g-btn:hover { filter: brightness(1.05); } .g-btn:disabled { opacity: .55; cursor: default; }
.g-btn.second { background: var(--panel); color: var(--accent-text); border: 1.5px solid rgba(185,134,60,.55); box-shadow: none; }
.g-lien { background: none; border: 0; cursor: pointer; color: var(--accent-text); font-weight: 600; font-size: 1rem; padding: 4px; }
.g-note { color: var(--muted); font-size: .92rem; text-align: center; margin: 0; }
.g-fix { width: 100%; display: grid; gap: 8px; }
.g-fix textarea { min-height: 70px; }
.g-alerte { border-radius: 18px; padding: 16px 20px; background: color-mix(in srgb, var(--g-corriger) 12%, transparent); font-size: 1.05rem; }
.g-calme { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border-radius: 22px; padding: 20px 28px;
  background: color-mix(in srgb, var(--g-ok) 10%, transparent); font-size: 1.1rem; font-weight: 500; }
.g-calme b { color: var(--g-ok); margin-right: 6px; }
.g-passees > summary { cursor: pointer; color: var(--muted); font-size: 1.02rem; padding: 6px 2px; }
.g-passees[open] { display: grid; gap: 18px; }
.g-passees .g-carte { opacity: .85; }
.g-aide { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px 26px; font-size: 1.05rem; }
.g-aide ol { margin: 8px 0; padding-left: 22px; display: grid; gap: 6px; }
.g-modal { position: fixed; inset: 0; z-index: 50; background: rgba(20,17,12,.55); display: flex; align-items: center; justify-content: center;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.g-modal-box { background: var(--panel); border-radius: 26px; padding: 22px 26px 26px; width: min(920px, 100%); max-height: 100%; overflow: auto; display: grid; gap: 16px; }
.g-modal-box.petite { width: min(680px, 100%); }
.g-modal-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.g-modal-h h2 { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 1.8rem; margin: 0; }
.g-fermer { background: var(--soft); border: 0; border-radius: 999px; width: 40px; height: 40px; cursor: pointer; font-size: 1.1rem; flex: 0 0 auto; }
.g-grand img, .g-grand video { max-width: 100%; max-height: 72vh; display: block; margin: 0 auto; border-radius: 14px; }
.g-grand .webmedia { display: grid; gap: 10px; }
.g-conf { display: flex; gap: 22px; align-items: flex-start; }
.g-modal-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
@media (max-width: 900px) {
  body.shell { grid-template-columns: 1fr; }
  .g-carte { grid-template-columns: 96px minmax(0, 1fr); padding: 20px; gap: 18px; align-items: start; }
  .g-apercu { width: 96px; height: 170px; }
  .g-geste { grid-column: 1 / -1; max-width: none; min-width: 0; align-items: stretch; }
  .g-conf { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { .g-btn { transition: none; } }
.g-leg-t { color: var(--accent-text); font-weight: 600; font-size: .98rem; margin: 4px 0 0; }
.g-legende textarea { field-sizing: content; max-height: none; }
/* Changer l'heure (10/11) */
.g-heures { border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px 16px; margin: 0; display: grid; gap: 10px; }
.g-heures legend { font-weight: 700; font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); padding: 0 6px; }
.g-h-opt { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 1.02rem; line-height: 1.4; padding: 6px 4px; border-radius: 10px; }
.g-h-opt:hover { background: var(--soft); }
.g-h-opt input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex: 0 0 auto; }
.g-h-opt.off { opacity: .55; cursor: default; }
.g-h-det { color: var(--muted); font-size: .95rem; }
.g-h-autre { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding-left: 34px; }
.g-h-autre input { font-size: 1rem; }
.g-geste .g-lien[data-heure] { order: 0; }
/* « Je suis en : … » (fuseau de la personne, 10/11) */
.g-zonechoix { display: inline-flex; align-items: center; gap: 8px; font-size: .98rem; color: var(--muted); margin-top: 10px; }
.g-zonechoix select { font-size: .98rem; padding: 6px 10px; border-radius: 999px; color: var(--ink); }
.g-heures .g-zonechoix { margin: 0 0 4px; }
.g-fichier { color: var(--muted); font-size: .88rem; margin: 0; overflow-wrap: anywhere; }
.evapercu { margin: 10px 0; } .evapercu video, .evapercu img { max-height: 46vh; width: 100%; object-fit: contain; background: var(--stage); }
