/* Sotheby's Media — thème inspiré de l'interface de Claude : ivoire chaud, accent terre cuite, titres en serif.
   Tout passe par des variables : une organisation peut les remplacer (organizations.theme). */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Newsreader:opsz,wght@6..72,400;6..72,500;6..72,600&family=Montserrat:wght@400;600;700&family=EB+Garamond:wght@400;700&family=TikTok+Sans:wght@400;700&family=Roboto:wght@400;700&family=Instrument+Sans:wght@400;700&family=Courier+Prime:wght@400;700&family=Racing+Sans+One&family=Cormorant:wght@400;700&family=Marck+Script&family=Neonderthaw&family=Playfair+Display:wght@400;700&family=Caveat:wght@400;700&family=Pacifico&family=Bebas+Neue&family=Anton&family=Poppins:wght@400;700&display=swap");

:root {
  --bg: #f5f4ee;
  --paper: #fffefb;
  --sidebar: #efede4;
  --ink: #1f1e1b;
  --muted: #6f6c64;
  --line: #e4e1d6;
  --line-strong: #d3cfc1;
  --accent: #c96442;
  --accent-hover: #b4553a;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6dd;
  --accent-soft-ink: #8a3c22;
  --hover: #e9e6db;
  --ok: #3f7a52;
  --ok-soft: #e3efe4;
  --info: #3c6a8a;
  --info-soft: #e1ecf3;
  --warn-soft: #f8eed6;
  --warn-ink: #7a5414;
  --warn-line: #e8d4a4;
  --danger: #b3372f;
  --danger-soft: #f8e3df;
  --frame-a: #e9c3ae;
  --frame-b: #b9785c;
  --frame-c: #5d3a2c;
  --overlay: rgba(31, 30, 27, .55);
  --shadow: 0 1px 2px rgba(31, 30, 27, .04), 0 4px 16px rgba(31, 30, 27, .05);
  --shadow-lg: 0 10px 40px rgba(31, 30, 27, .18);
  --radius: 14px;
  --serif: "Newsreader", "Tiempos Text", Georgia, "Times New Roman", serif;
  --font: "Inter", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #262624;
    --paper: #30302e;
    --sidebar: #1f1e1d;
    --ink: #f1efe8;
    --muted: #a8a59c;
    --line: #3d3c39;
    --line-strong: #4d4b47;
    --accent: #d97757;
    --accent-hover: #e48a6c;
    --accent-ink: #1f1e1d;
    --accent-soft: #4a3229;
    --accent-soft-ink: #f2bba6;
    --hover: #383735;
    --ok: #8cc49c;
    --ok-soft: #2c3b2f;
    --info: #9cc3e0;
    --info-soft: #273846;
    --warn-soft: #463a22;
    --warn-ink: #ecd29a;
    --warn-line: #6b5730;
    --danger: #f09a8f;
    --danger-soft: #4a2a26;
    --overlay: rgba(0, 0, 0, .6);
    --shadow: 0 1px 2px rgba(0, 0, 0, .2), 0 4px 16px rgba(0, 0, 0, .2);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
h1 { font-size: 2rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.08rem; }
p { margin: 0; }
a { color: var(--accent); }
code { font-size: .85em; background: var(--hover); padding: .1em .35em; border-radius: 5px; }
blockquote { margin: .35rem 0 0; padding: .4rem .7rem; border-left: 3px solid var(--line-strong); color: var(--muted); font-size: .875rem; background: var(--bg); border-radius: 0 8px 8px 0; white-space: pre-wrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.ico { width: 18px; height: 18px; flex: none; }
.grow { flex: 1; }
.right { text-align: right; }
.center { text-align: center; }
.danger-text { color: var(--danger) !important; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 40px; padding: 0 1rem;
  border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, opacity .15s; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; pointer-events: none; }
.btn.secondary { background: var(--paper); color: var(--ink); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--hover); }
.btn.ghost { background: transparent; color: var(--ink); border-color: transparent; }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { min-height: 34px; padding: 0 .75rem; font-size: .875rem; border-radius: 9px; }
.btn.sm .ico { width: 16px; height: 16px; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--accent-ink) transparent var(--accent-ink) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn.secondary.loading::after, .btn.ghost.loading::after { border-color: var(--ink) transparent var(--ink) transparent; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover:not(:disabled) { background: var(--hover); color: var(--ink); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Champs */
.field { display: grid; gap: .35rem; align-content: start; }
.field label, .mini { font-weight: 500; font-size: .85rem; }
select { max-width: 100%; }
.field input, .field select, .field textarea, textarea, .constraint input, .constraint select, .mini input, .mini select, .table select {
  min-height: 42px; padding: .5rem .8rem; border: 1px solid var(--line-strong); border-radius: 10px; width: 100%;
  font: inherit; background: var(--paper); color: var(--ink); transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; line-height: 1.5; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--accent) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
.field.inline { grid-template-columns: auto 1fr; align-items: center; gap: .75rem; }
.field.suggested input, .field.suggested select, .field.suggested textarea { border-color: var(--accent); background: var(--accent-soft); }
.hint { color: var(--muted); font-size: .85rem; }
.hint .ico { width: 14px; height: 14px; vertical-align: -2px; }
.req { color: var(--accent); margin-left: 2px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .9rem 1rem; }
.span2 { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; }
legend { font-family: var(--serif); font-size: 1.05rem; margin-bottom: .6rem; padding: 0; }
.toggle { display: flex; align-items: center; gap: .6rem; font-weight: 500; cursor: pointer; }
.toggle input, input[type="checkbox"], input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; }
.counter { justify-self: end; }
.code-input { font-size: 1.6rem !important; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }

/* Chips, badges, avatars */
.chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; font-weight: 500; padding: .12rem .6rem; border-radius: 999px; background: var(--hover); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.review { background: var(--warn-soft); color: var(--warn-ink); }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.chip.ready { background: var(--ok-soft); color: var(--ok); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.busy { background: var(--accent-soft); color: var(--accent-soft-ink); }
.chip.busy::before { animation: pulse 1.2s ease-in-out infinite; }
.avatar { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-soft-ink); font-weight: 600; font-size: .78rem; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 600; display: inline-grid; place-items: center; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; }
.spinner.big { width: 34px; height: 34px; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .3; } }

/* Marque */
.brand { display: flex; align-items: center; gap: .6rem; font-family: var(--serif); font-size: 1.2rem; font-weight: 500; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; }

/* Connexion */
.login { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem 16px; }
.login-card { width: min(420px, 100%); display: grid; gap: 1.75rem; }
.login-card .brand { justify-content: center; font-size: 1.5rem; }
.login-card .brand img { width: 38px; height: 38px; }
.login-card .intro { text-align: center; display: grid; gap: .5rem; justify-items: center; margin-bottom: 1.5rem; }
.login-card .intro h1 { font-size: 2.1rem; }
.card-form { display: grid; gap: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.card-form .btn { min-height: 44px; }
.row-links { display: flex; justify-content: space-between; font-size: .875rem; }
.error { background: var(--danger-soft); color: var(--danger); padding: .7rem .9rem; border-radius: 10px; font-size: .9rem; }
.foot { margin-top: -.5rem; }

/* Coquille */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.rail { background: var(--sidebar); border-right: 1px solid var(--line); padding: 1rem .75rem; display: flex; flex-direction: column; gap: 1.4rem; position: sticky; top: 0; height: 100vh; }
.rail .brand { padding: .2rem .5rem; }
.rail nav { display: grid; gap: 2px; }
.rail nav a, .rail-btn { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; padding: .5rem .65rem; border-radius: 10px; font-size: .925rem; }
.rail nav a .ico, .rail-btn .ico { color: var(--muted); }
.rail nav a:hover, .rail-btn:hover { background: var(--hover); }
.rail nav a[aria-current="page"] { background: var(--paper); box-shadow: var(--shadow); font-weight: 500; }
.rail nav a[aria-current="page"] .ico { color: var(--accent); }
.rail-foot { margin-top: auto; display: grid; gap: .4rem; }
.rail-btn { border: 0; background: transparent; font: inherit; cursor: pointer; width: 100%; text-align: left; }
.who { display: flex; align-items: center; gap: .3rem; padding: .6rem .2rem 0 .3rem; border-top: 1px solid var(--line); }
.who-link { display: flex; align-items: center; gap: .6rem; color: inherit; text-decoration: none; font-size: .875rem; flex: 1; min-width: 0; }
.who-link small { display: block; color: var(--muted); font-size: .78rem; }
.content { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(16px, 4vw, 3rem) 0; max-width: 1320px; width: 100%; }
.org { color: var(--muted); font-size: .875rem; }
.top-actions { display: flex; align-items: center; gap: .5rem; }
.mode-pill { font-size: .75rem; padding: .2rem .6rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent-soft-ink); cursor: help; }
.notif-btn { position: relative; }
.notif-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
.notif-panel { position: fixed; top: 56px; right: 16px; width: min(380px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 40; }
.notif-panel header { padding: .9rem 1rem .5rem; }
.notif-panel ul { list-style: none; margin: 0; padding: 0 .4rem .4rem; }
.notif-panel li a { display: block; padding: .6rem .7rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.notif-panel li a:hover { background: var(--hover); }
.notif-panel li.unread a { background: var(--accent-soft); }
.notif-panel small { display: block; color: var(--muted); font-size: .78rem; margin-top: .15rem; }
.pad { padding: 1rem; }

.main { padding: 1.4rem clamp(16px, 4vw, 3rem) 4rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-content: start; max-width: 1320px; width: 100%; outline: none; }
#step-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.loading-view { display: grid; place-items: center; min-height: 40vh; }
.loading-view.full { min-height: 100vh; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.page-head > div > p { color: var(--muted); margin-top: .35rem; }
.status-line { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; font-size: .875rem; }
.head-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: .25rem; color: var(--muted); text-decoration: none; font-size: .875rem; margin-bottom: -.75rem; width: fit-content; }
.back:hover { color: var(--ink); }
.back .ico { width: 16px; height: 16px; }
.section { display: grid; gap: .9rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.section-head a { font-size: .875rem; }

.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; display: grid; gap: 1rem; box-shadow: var(--shadow); align-content: start; min-width: 0; }
.panel.flush { padding: 0; overflow: auto; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.panel-head > div { display: grid; gap: .3rem; }
.stack { display: grid; gap: 1.25rem; align-content: start; min-width: 0; }
.stack-sm { display: grid; gap: .75rem; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 1.25rem; align-items: start; }
.actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.sticky-actions { position: sticky; bottom: 0; background: var(--paper); padding-top: .75rem; border-top: 1px solid var(--line); margin: 0 -1.3rem -1.3rem; padding: .9rem 1.3rem; border-radius: 0 0 var(--radius) var(--radius); }
.calc-row { margin-top: -.75rem; }
.next-row { display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.next-row .btn:only-child { margin-left: auto; }
.notice { background: var(--warn-soft); border: 1px solid var(--warn-line); color: var(--warn-ink); padding: .7rem .9rem; border-radius: 10px; font-size: .875rem; display: flex; gap: .5rem; }
.banner { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem; border-radius: 12px; background: var(--hover); font-size: .925rem; }
.banner.ready { background: var(--ok-soft); color: var(--ok); }
.banner.info { background: var(--info-soft); color: var(--info); }
.banner.review, .banner.warn { background: var(--warn-soft); color: var(--warn-ink); }
.banner.danger { background: var(--danger-soft); color: var(--danger); }
.empty { text-align: center; padding: 3rem 1rem; display: grid; gap: .6rem; justify-items: center; color: var(--muted); }
.empty h2, .empty h3 { color: var(--ink); }
.empty.slim { padding: 1.5rem 1rem; background: var(--paper); border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.empty-ico { width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.empty-ico .ico { width: 26px; height: 26px; }

/* Accueil */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
.tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: grid; gap: .1rem; transition: transform .15s; }
.tile:hover { transform: translateY(-2px); }
.tile strong { font-family: var(--serif); font-size: 2rem; font-weight: 500; }
.tile span { color: var(--muted); font-size: .875rem; }
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: .5rem; }
.tabs button { border: 0; background: transparent; font: inherit; font-size: .9rem; padding: .4rem .8rem; border-radius: 9px; color: var(--muted); cursor: pointer; display: inline-flex; gap: .4rem; align-items: center; }
.tabs button:hover { background: var(--hover); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; }
.tabs .count { font-size: .75rem; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.project-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); display: grid; transition: transform .15s, box-shadow .15s; }
.project-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.project-card .cover { aspect-ratio: 4 / 3; background: linear-gradient(160deg, var(--frame-a), var(--frame-b) 60%, var(--frame-c)); display: grid; place-items: center; color: rgba(255, 255, 255, .85); overflow: hidden; }
.project-card .cover img { width: 100%; height: 100%; object-fit: cover; }
.project-card .cover .ico { width: 32px; height: 32px; }
.project-card .body { padding: .8rem .95rem 1rem; display: grid; gap: .4rem; }
.project-card h3 { font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.meta { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: .3rem .7rem; flex-wrap: wrap; }

/* Étapes */
.stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.stepper a { display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 12px; text-decoration: none; color: var(--muted); border: 1px solid transparent; min-width: 0; }
.stepper a:hover { background: var(--hover); }
.stepper a.current { background: var(--paper); border-color: var(--line); color: var(--ink); box-shadow: var(--shadow); }
.stepper strong { display: block; font-weight: 500; font-size: .9rem; color: inherit; }
.stepper small { display: block; font-size: .76rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stepper span:last-child { min-width: 0; }
.stepper .num { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--hover); font-weight: 600; font-size: .85rem; color: var(--muted); }
.stepper a.current .num { background: var(--accent); color: var(--accent-ink); }
.stepper a.done .num { background: var(--ok-soft); color: var(--ok); }
.stepper .num .ico { width: 16px; height: 16px; }

.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.checklist li { display: flex; gap: .55rem; align-items: flex-start; font-size: .9rem; }
.checklist li .ico { width: 18px; height: 18px; margin-top: 1px; }
.checklist li.ok .ico { color: var(--ok); }
.checklist li.warn .ico { color: var(--warn-ink); }
.checklist li.bad .ico { color: var(--danger); }
.checklist li.bad { color: var(--danger); }
.checklist a { color: inherit; }

/* Rushs */
.dropzone { display: grid; justify-items: center; gap: .35rem; padding: 2rem 1rem; border: 2px dashed var(--line-strong); border-radius: var(--radius); background: var(--paper); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: var(--accent-soft); }
.dropzone > .ico { width: 30px; height: 30px; color: var(--accent); }
.progress { width: min(420px, 100%); height: 26px; border-radius: 999px; background: var(--hover); position: relative; overflow: hidden; margin-top: .6rem; }
.progress .bar { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); transition: width .2s; }
.progress span { position: relative; font-size: .78rem; line-height: 26px; color: var(--ink); font-weight: 500; }
.rush-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: .9rem; counter-reset: rush; }
.rush { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: auto 1fr auto; box-shadow: var(--shadow); counter-increment: rush; }
.rush.failed { border-color: var(--danger); }
.rush .thumb { aspect-ratio: 16 / 10; min-height: 0; overflow: hidden; background: var(--hover); position: relative; display: grid; place-items: center; color: var(--muted); }
.rush .thumb::before { content: counter(rush); position: absolute; top: 8px; left: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: .75rem; font-weight: 600; display: grid; place-items: center; z-index: 1; }
.rush .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rush .thumb .kind, .rush .thumb .overlay { z-index: 1; }
.rush .thumb > .ico { width: 30px; height: 30px; }
.rush .overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .5); }
.rush .kind { position: absolute; bottom: 8px; left: 8px; display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; }
.rush .kind .ico { width: 13px; height: 13px; }
.rush-body { padding: .6rem .75rem .2rem; display: grid; min-width: 0; }
.rush-body strong { font-weight: 500; font-size: .875rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rush.failed .hint { color: var(--danger); }
.rush-actions { display: grid; gap: 2px; padding: 0 .35rem .35rem; min-width: 0; }
.rush-actions a.icon-btn { text-decoration: none; }

/* Montage */
.montage, .pub-form { display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.stage { display: grid; gap: .8rem; position: sticky; top: calc(var(--stick-top, 0px) + 1rem); }
.player { aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden; background: #111; box-shadow: var(--shadow-lg); max-height: 78vh; margin: 0 auto; width: 100%; }
.player video { width: 100%; height: 100%; object-fit: contain; display: block; background: #111; }
.empty-player { display: grid; place-items: center; align-content: center; gap: .6rem; color: rgba(255, 255, 255, .75); background: linear-gradient(170deg, var(--frame-a), var(--frame-b) 55%, var(--frame-c)); padding: 2rem; text-align: center; }
.empty-player .ico { width: 36px; height: 36px; }
.versions { display: flex; gap: .4rem; flex-wrap: wrap; }
.version { border: 1px solid var(--line); background: var(--paper); border-radius: 10px; display: grid; justify-items: start; padding: .3rem .6rem .35rem; font-size: .82rem; }
.version > button:first-child { border: 0; background: none; padding: 0; font: inherit; cursor: pointer; text-align: left; color: var(--ink); }
.version .link { font-size: .75rem; }
.version.failed { border-color: var(--danger); background: var(--danger-soft); }
.version small { display: block; color: var(--muted); font-size: .72rem; }
.version.active { border-color: var(--accent); background: var(--accent-soft); }
.pipeline ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.pipeline li { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.pipeline li.current { color: var(--ink); font-weight: 500; }
.pipeline li.done { color: var(--ok); }
.pipeline .dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--hover); flex: none; }
.pipeline li.done .dot { background: var(--ok-soft); }
.pipeline .dot .ico { width: 14px; height: 14px; }
.pipeline .dot .spinner { width: 14px; height: 14px; }
.constraint { display: grid; grid-template-columns: 130px minmax(0, 1fr) auto auto; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.editor { display: block; min-width: 0; }
.editor > * + * { margin-top: 1rem; }
#editor-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: .8rem; min-width: 0; }
.editor summary { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; cursor: pointer; list-style: none; }
.editor summary::-webkit-details-marker { display: none; }
.editor summary h2 { display: inline-flex; align-items: center; gap: .5rem; }
.editor[open] summary { margin-bottom: .5rem; }
.timeline { display: flex; gap: 3px; height: 34px; }
.timeline span { border-radius: 6px; background: var(--hover); font-size: .7rem; color: var(--muted); padding: 8px 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; }
.timeline span.hook { background: var(--accent-soft); color: var(--accent-soft-ink); }
.seg-table { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.seg { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: .8rem; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; align-items: center; }
.seg-thumb { position: relative; aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--hover); display: grid; place-items: center; }
.seg-thumb img { width: 100%; height: 100%; object-fit: cover; }
.seg-thumb span { position: absolute; top: 4px; left: 4px; background: var(--paper); border-radius: 50%; width: 20px; height: 20px; font-size: .7rem; font-weight: 600; display: grid; place-items: center; }
.seg-fields { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, .6fr) minmax(0, .6fr) minmax(0, .9fr) minmax(0, .9fr); gap: .5rem; min-width: 0; }
.seg-fields .wide { grid-column: 1 / -1; }
.mini { display: grid; gap: .2rem; font-size: .74rem; color: var(--muted); font-weight: 500; min-width: 0; }
.mini input, .mini select { min-height: 34px; padding: .3rem .5rem; font-size: .85rem; border-radius: 8px; color: var(--ink); }
.mini input[type="range"] { margin-inline: 0; padding: 0; border: 0; box-shadow: none !important; accent-color: var(--accent); background: transparent; }
.seg-actions { display: grid; }
.editor-foot { display: flex; gap: .8rem; align-items: flex-end; flex-wrap: wrap; }

/* Publication */
.account-pick { display: grid; gap: .5rem; }
.account-option { display: flex; align-items: center; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.account-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.account-option small, .account-card small { display: block; color: var(--muted); font-size: .8rem; }
.net { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 600; flex: none; }
.net-instagram { background: linear-gradient(135deg, #f58529, #dd2a7b 55%, #8134af); }
.net-tiktok { background: #111; }
.net-youtube { background: #e62117; }
.net-facebook { background: #1877f2; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.tags:empty { display: none; }
.tag { display: inline-flex; align-items: center; gap: .2rem; padding: .2rem .25rem .2rem .6rem; border-radius: 999px; background: var(--hover); font-size: .82rem; }
.tag button { border: 0; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.tag button:hover { background: var(--line); color: var(--ink); }
.tag .ico { width: 13px; height: 13px; }
.segmented { display: inline-flex; background: var(--hover); border-radius: 10px; padding: 3px; width: fit-content; }
.segmented label { padding: .4rem .9rem; border-radius: 8px; cursor: pointer; font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--paper); box-shadow: var(--shadow); font-weight: 500; }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--accent); }
.reviewer { display: flex; align-items: center; gap: .7rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; }
.reviewer > span:nth-child(2) { flex: 1; }
.reviewer small { display: block; color: var(--muted); font-size: .8rem; }
.reviewer.locked .ico { color: var(--accent); }
.recap { border-color: var(--accent); }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pub-list li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.pub-list a { flex: 1; color: var(--ink); text-decoration: none; font-weight: 500; }
.pub-list a small { color: var(--muted); font-weight: 400; margin-left: .4rem; }
.pub-list-big { display: grid; gap: .6rem; }
.pub-row { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); }
.pub-row:hover { border-color: var(--line-strong); }
.pub-row img { width: 42px; height: 74px; object-fit: cover; border-radius: 8px; background: var(--hover); flex: none; }
.pub-main { flex: 1; min-width: 0; display: grid; }
.pub-main small, .pub-side small { color: var(--muted); font-size: .8rem; }
.pub-side { display: grid; justify-items: end; gap: .3rem; text-align: right; }
.caption { white-space: pre-wrap; }
.hashtags { color: var(--accent); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .1rem .5rem; }
.reviewers { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.reviewers li { display: flex; justify-content: space-between; gap: .75rem; padding: .7rem .85rem; border: 1px solid var(--line); border-radius: 12px; }
.reviewers .name { font-weight: 500; display: inline-flex; gap: .35rem; align-items: center; }
.reviewers .name .ico { width: 15px; height: 15px; color: var(--accent); }
.reviewers .role { display: block; color: var(--muted); font-size: .8rem; }
.rv-side { display: flex; align-items: flex-start; gap: .3rem; }
.history { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 2px solid var(--line); display: grid; gap: .7rem; font-size: .875rem; }
.history li { position: relative; }
.history li::before { content: ""; position: absolute; left: calc(-1rem - 6px); top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.history small { display: block; color: var(--muted); font-size: .76rem; }
.decide { border-color: var(--accent); }

/* Comptes, équipe, paramètres */
.account-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; }
.account-card { display: flex; gap: .8rem; padding: 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); align-items: flex-start; }
.account-card > div:nth-child(2) { flex: 1; min-width: 0; display: grid; gap: .3rem; }
.account-card .hint .ico { width: 14px; height: 14px; vertical-align: -2px; }
.row-actions { display: flex; align-items: center; }
.roles-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .5rem 1.5rem; font-size: .85rem; color: var(--muted); }
.roles-legend strong { color: var(--ink); font-weight: 500; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); }
.table td { padding: .65rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table select { min-height: 34px; padding: .2rem .5rem; width: auto; }
.person { display: flex; align-items: center; gap: .6rem; }
.person small { display: block; color: var(--muted); font-size: .8rem; }
.settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; align-items: start; }
.settings .wide { grid-column: 1 / -1; }
.settings-flow { columns: 2; column-gap: 1.25rem; }
.settings-flow > .panel { break-inside: avoid; margin-bottom: 1.25rem; }
.settings-flow > .panel:last-child { margin-bottom: 0; }
@media (max-width: 960px) { .settings-flow { columns: 1; } }
.settings .panel h3 { margin-top: .5rem; }
.dev-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; }
.dev-links a { display: flex; gap: .7rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); }
.dev-links a:hover { background: var(--hover); }
.dev-links .ico { color: var(--accent); width: 22px; height: 22px; }
.dev-links small { display: block; color: var(--muted); font-size: .8rem; }

/* Fenêtres, messages */
.modal { border: 0; padding: 0; border-radius: 18px; background: var(--paper); color: var(--ink); width: min(520px, calc(100vw - 32px)); box-shadow: var(--shadow-lg); }
.modal.wide { width: min(720px, calc(100vw - 32px)); }
.modal::backdrop { background: var(--overlay); }
/* Le titre (avec sa croix) et les boutons restent visibles : seul le contenu défile */
/* overflow: clip : la fenêtre elle-même ne défile jamais (même quand un choix plus bas reçoit le focus) */
.modal { max-height: calc(100dvh - 32px); overflow: clip; }
.modal form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.modal header { flex: none; display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: 1.1rem 1.3rem .4rem; }
.modal-body { position: relative; padding: .6rem 1.3rem 1rem; display: grid; gap: .9rem; flex: 1 1 auto; min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.modal footer { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; padding: .9rem 1.3rem; border-top: 1px solid var(--line); }
/* Sous-fenêtre : « Retour » à gauche du titre */
.modal.nested header { justify-content: flex-start; }
.modal.nested header h2 { flex: 1; min-width: 0; }
.modal .back-btn { flex: none; padding-left: .35rem; }
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: .5rem; z-index: 100; width: min(460px, calc(100vw - 32px)); }
.toast { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .9rem; animation: toast-in .2s ease-out; transition: opacity .3s, transform .3s; }
.toast.error { background: var(--danger); color: #fff; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Tutoriel */
.tour { position: fixed; inset: 0; z-index: 200; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px var(--overlay); transition: all .25s ease; pointer-events: none; }
.tour-spot.none { top: 50% !important; left: 50% !important; width: 0 !important; height: 0 !important; }
.tour-pop { position: fixed; background: var(--paper); border-radius: 16px; padding: 1.2rem 1.25rem 1rem; box-shadow: var(--shadow-lg); display: grid; gap: .6rem; transition: top .25s ease, left .25s ease; }
.tour-pop.center { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); width: min(440px, calc(100vw - 32px)) !important; padding: 1.6rem; }
.tour-pop.center h2 { font-size: 1.6rem; }
.tour-text { color: var(--muted); font-size: .92rem; }
.tour-text b { color: var(--ink); font-weight: 600; }
.tour-progress { display: flex; gap: 4px; }
.tour-progress span { height: 4px; flex: 1; border-radius: 2px; background: var(--line); }
.tour-progress span.on { background: var(--accent); }
.tour-actions { display: flex; gap: .4rem; align-items: center; margin-top: .3rem; }

@media (max-width: 1100px) {
  .montage, .pub-form, .two-col { grid-template-columns: minmax(0, 1fr); }
  .stage { position: static; max-width: 360px; width: 100%; margin: 0 auto; }
  .seg-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .seg-fields label:first-child { grid-column: span 3; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .rail { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; gap: .5rem; padding: .5rem 16px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .rail .brand span { display: none; }
  .rail nav { display: flex; }
  .rail nav a { white-space: nowrap; }
  .rail nav a span:not(.badge) { display: none; }
  .rail-foot { margin: 0; display: flex; }
  .rail-btn span, .who { display: none; }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .stepper { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stepper small { display: none; }
  h1 { font-size: 1.6rem; }
  .notif-panel { top: 110px; }
}
@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr; }
  .stepper a { flex-direction: column; text-align: center; gap: .3rem; padding: .5rem .2rem; }
  .stepper strong { font-size: .75rem; }
  .seg { grid-template-columns: 56px minmax(0, 1fr); }
  .seg-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
  .seg-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg-fields label:first-child { grid-column: 1 / -1; }
  .constraint { grid-template-columns: minmax(0, 1fr) auto auto; }
  .constraint select { grid-column: 1 / -1; }
  .table th:nth-child(3), .table td:nth-child(3) { display: none; }
  .pub-row { flex-wrap: wrap; }
  .account-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Montage : modèles, musique ; fiche : note sur les honoraires */
.preset-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.preset-row select { flex: 1; min-width: 180px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: .875rem; padding: 0 .6rem; }
.save-state { white-space: nowrap; }
.file-btn { width: fit-content; cursor: pointer; }
.fees-note { display: flex; gap: .4rem; align-items: center; margin: -.2rem 0 .7rem; }
.stage > .btn { justify-self: center; }
.preset-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.preset-list li { display: flex; align-items: center; gap: .4rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; }
.preset-list li > span:first-child { flex: 1; min-width: 0; }
.preset-list small { display: block; color: var(--muted); font-size: .78rem; }

.extra { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; gap: .5rem; margin-bottom: .5rem; }
.extra input { min-height: 38px; padding: .4rem .7rem; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; min-width: 0; }
.extra.suggested input { border-color: var(--accent); background: var(--accent-soft); }
details.paste summary { cursor: pointer; color: var(--muted); font-size: .875rem; }
details.paste[open] { display: grid; gap: .6rem; }
@media (max-width: 640px) { .extra { grid-template-columns: 1fr auto; } .extra [data-x=value] { grid-column: 1 / 2; } }

/* Bibliothèques, modèles, musique du projet, éditeur de textes, coûts */
.track-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.track { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.track.pending { border-color: var(--warn-line); }
.track-cover, .mo-cover { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.track-cover img, .mo-cover img { width: 100%; height: 100%; object-fit: cover; }
.track-main { display: grid; gap: .3rem; min-width: 0; }
.track-main small { color: var(--muted); font-size: .8rem; }
.track-main audio { width: 100%; max-width: 420px; height: 34px; }
.track-side { display: grid; justify-items: end; gap: .4rem; }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.template { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr; }
.template.pending { border-color: var(--warn-line); }
.template-media { aspect-ratio: 9 / 12; background: #111; display: grid; place-items: center; color: rgba(255, 255, 255, .7); overflow: hidden; }
.template-media video, .template-media img { width: 100%; height: 100%; object-fit: cover; }
.template-media iframe { width: 100%; height: 100%; border: 0; }
.template-body { padding: .9rem; display: grid; gap: .5rem; align-content: start; }
.timeline.small { height: 22px; }
.timeline.small span { font-size: .62rem; padding: 4px; }
.timeline span.card { background: var(--ink); color: var(--bg); }
.template-mini { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: .7rem; align-items: start; }
.template-mini img { width: 64px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; }
select.full { width: 100%; min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; padding: 0 .7rem; }
.music-pick { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .3rem; }
.music-option { flex: none; width: 150px; display: grid; gap: .4rem; justify-items: start; text-align: left; padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: .82rem; cursor: pointer; }
.music-option > .ico { width: 64px; height: 64px; padding: 20px; border-radius: 10px; background: var(--hover); color: var(--muted); }
.music-option small { display: block; color: var(--muted); font-size: .75rem; }
.music-option.active { border-color: var(--accent); background: var(--accent-soft); }
.music-detail { display: grid; gap: .6rem; }
.music-detail audio { width: 100%; }
.music-start { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.music-start .mini { width: 110px; }
.stage-actions { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.text-row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(3, minmax(0, 1fr)) auto; gap: .4rem; margin-bottom: .35rem; }
.text-row input, .text-row select { min-height: 32px; padding: .25rem .5rem; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper); color: var(--ink); font: inherit; font-size: .82rem; min-width: 0; }
.texts { display: grid; }
.texts .btn { justify-self: start; }
.seg.is-card { background: var(--hover); }
.seg input[type=color] { min-height: 34px; padding: 2px; }
.dup-card { display: flex; gap: .7rem; align-items: center; padding: .6rem; border: 1px solid var(--line); border-radius: 10px; }
.dup-card img, .dup-card > .ico { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; }
.dup-card small { display: block; color: var(--muted); font-size: .8rem; }
.cost-tiles .tile { box-shadow: none; }
.cost-tiles .tile strong { font-size: 1.6rem; }
.cost-chart { margin: 0; display: grid; gap: .3rem; }
.cost-chart svg { width: 100%; height: 120px; }
.cost-chart .bar-fill { fill: var(--accent); }
.cost-chart .bar:hover .bar-fill { fill: var(--accent-hover); }
.cost-chart .axis { stroke: var(--line-strong); stroke-width: 1; }
details.calls summary { cursor: pointer; font-weight: 500; margin: .5rem 0; }
details.calls { max-height: 520px; overflow: auto; }
.table tr.failed td { color: var(--danger); }
@media (max-width: 640px) {
  .track { grid-template-columns: 48px minmax(0, 1fr); }
  .track-side { grid-column: 1 / -1; justify-items: start; grid-auto-flow: column; justify-content: start; align-items: center; }
  .text-row { grid-template-columns: 1fr 1fr; }
  .text-row input { grid-column: 1 / -1; }
}
.music-option strong { overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tabs a { display: inline-flex; gap: .4rem; align-items: center; padding: .4rem .8rem; border-radius: 9px; color: var(--muted); text-decoration: none; font-size: .9rem; }
.tabs a:hover { background: var(--hover); color: var(--ink); }
.tabs a[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: var(--shadow); font-weight: 500; }
.tabs a .ico { width: 16px; height: 16px; }
.badge.inline { margin-left: .2rem; }
#tab { display: grid; gap: 1rem; min-width: 0; }
#tab > .section-head { align-items: center; }
#tab > .section-head .hint { max-width: 70ch; }
.template-row { grid-template-columns: 90px minmax(0, 1fr) auto; }
.tpl-thumb { position: relative; width: 90px; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: #111; color: rgba(255, 255, 255, .7); display: grid; place-items: center; cursor: pointer; }
.tpl-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tpl-thumb .play { position: absolute; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); display: grid; place-items: center; }
.tpl-thumb .play .ico { width: 16px; height: 16px; color: #fff; }
.tpl-video, .tpl-embed { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; border: 0; border-radius: 12px; background: #111; }
@media (max-width: 640px) { .template-row { grid-template-columns: 70px minmax(0, 1fr); } .tpl-thumb { width: 70px; } }
.type-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .5rem; margin: 0; }
.type-pick legend { font-family: var(--font); font-size: .85rem; font-weight: 500; margin-bottom: .4rem; }
.type-option { display: flex; gap: .6rem; align-items: flex-start; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.type-option input { position: absolute; opacity: 0; pointer-events: none; }
.type-option .ico { color: var(--accent); margin-top: 2px; }
.type-option small { display: block; color: var(--muted); font-size: .78rem; }
.type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.type-option:has(input:focus-visible) { outline: 2px solid var(--accent); }
.stepper.steps-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }
.virtual-badge { position: absolute; top: 8px; right: 8px; display: inline-flex; gap: .25rem; align-items: center; font-size: .7rem; padding: .15rem .45rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); z-index: 1; }
.virtual-badge .ico { width: 12px; height: 12px; }
.ra-main { display: grid; gap: 2px; min-width: 0; }
.ra-icons { display: flex; align-items: center; gap: 2px; min-width: 0; border-top: 1px solid var(--line); padding-top: 2px; }
.ra-icons .spacer { flex: 1; }
.stage-btn { min-height: 30px; padding: 0 .5rem; font-size: .8rem; justify-content: flex-start; min-width: 0; max-width: 100%; }
.stage-btn > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.stage-btn > .ico { flex: none; }
/* Numéro d'ordre en bas à droite : les coins du haut portent la case à cocher et les badges */
.rush .thumb::before { top: auto; left: auto; bottom: 8px; right: 8px; }
.stage-src { display: flex; gap: .8rem; align-items: center; }
.stage-src img { width: 120px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.style-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: .4rem; margin: 0; }
.style-pick legend { font-family: var(--font); font-size: .85rem; font-weight: 500; margin-bottom: .4rem; }
.style-option { position: relative; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .875rem; }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); font-weight: 500; }
.staged-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 1rem; }
.staged { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: grid; min-width: 0; }
.staged.failed { border-color: var(--danger); }
.compare { position: relative; aspect-ratio: 4 / 3; background: var(--hover); --pos: 50%; overflow: hidden; }
.compare .after, .compare .before-wrap img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare .before-wrap { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); border-right: 2px solid #fff; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare .lbl { position: absolute; bottom: 8px; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; }
.compare .lbl.l { left: 8px; } .compare .lbl.r { right: 8px; }
.staged-msg { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .5rem; padding: 1rem; text-align: center; font-size: .875rem; color: var(--muted); }
.staged-body { padding: .7rem .8rem; display: grid; gap: .3rem; }
.staged-body small { color: var(--muted); font-size: .8rem; }
.staged-body .row-actions { gap: .3rem; flex-wrap: wrap; }
.icon-btn.fav { color: var(--accent); background: var(--accent-soft); }
.use-select { min-height: 34px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--paper); color: var(--ink); font: inherit; font-size: .85rem; max-width: 220px; }
.pick-row { display: flex; gap: .6rem; overflow-x: auto; padding-bottom: .4rem; }
.pick-photo { flex: none; position: relative; width: 170px; aspect-ratio: 4 / 3; border: 0; padding: 0; border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--hover); }
.pick-photo img { width: 100%; height: 100%; object-fit: cover; }
.pick-photo span { position: absolute; bottom: 6px; left: 6px; display: inline-flex; gap: .3rem; align-items: center; padding: .2rem .55rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .78rem; }
.pick-photo span .ico { width: 14px; height: 14px; }
.pick-photo:hover { outline: 2px solid var(--accent); }
.slides { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.slide { position: relative; aspect-ratio: var(--ratio); border-radius: 10px; overflow: hidden; background: var(--hover); box-shadow: var(--shadow); }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide span { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: .72rem; font-weight: 600; display: grid; place-items: center; }
.player.horizontal { aspect-ratio: 16 / 9; max-height: none; }
.montage.horizontal { grid-template-columns: minmax(0, 1fr); }
.montage.horizontal .stage { position: static; max-width: 900px; width: 100%; margin: 0 auto; }
.pub-slides { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 78vh; overflow: auto; }
.net-linkedin { background: #0a66c2; }
.dup-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.dup-side { position: relative; display: grid; gap: .35rem; padding: .9rem; border: 1px solid var(--line); border-radius: 12px; min-width: 0; align-content: start; }
.dup-side.found { border-color: var(--accent); background: var(--accent-soft); }
.dup-side strong { font-weight: 500; font-size: .875rem; overflow-wrap: anywhere; }
.dup-side small { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.dup-tag { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.dup-thumb { aspect-ratio: 16 / 10; border-radius: 8px; overflow: hidden; background: var(--hover); display: grid; place-items: center; color: var(--muted); }
.dup-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-body { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .dup-compare { grid-template-columns: 1fr; } }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(10, 10, 10, .88); }
.lb-stage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); height: min(86vh, calc(92vw / (var(--ratio)))); aspect-ratio: var(--ratio); overflow: hidden; border-radius: 12px; background: #000; }
.lb-track { display: flex; height: 100%; transition: transform .3s ease; touch-action: pan-y; }
.lb-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: contain; user-select: none; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: #111; display: grid; place-items: center; cursor: pointer; }
.lb-nav:disabled { opacity: 0; pointer-events: none; }
.lb-nav.prev { left: 10px; } .lb-nav.next { right: 10px; }
.lb-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.lb-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; }
.lb-dots span.on { background: #fff; }
.lb-close { position: fixed; top: 16px; right: 16px; background: rgba(255, 255, 255, .9); color: #111; }
.lb-count { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: .85rem; }
/* Couleur par type de projet : teintes neutres (rose poudré, bleu, taupe, violet) */
.t-short { --tc: #a85a6e; --tc-soft: #f4e4e8; }
.t-long { --tc: #3d6a92; --tc-soft: #e2eaf2; }
.t-car45, .t-car11, .t-car916 { --tc: #7a6452; --tc-soft: #eee6de; }
.t-staging { --tc: #6f5a9a; --tc-soft: #ebe6f4; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .t-short { --tc: #e0a3b3; --tc-soft: #42303a; } :root:not([data-theme="light"]) .t-long { --tc: #9dbddb; --tc-soft: #26354a; }
  :root:not([data-theme="light"]) .t-car45, :root:not([data-theme="light"]) .t-car11, :root:not([data-theme="light"]) .t-car916 { --tc: #cdb6a2; --tc-soft: #3b322b; }
  :root:not([data-theme="light"]) .t-staging { --tc: #c1b0e4; --tc-soft: #352e47; } }
:root[data-theme="dark"] .t-short { --tc: #e0a3b3; --tc-soft: #42303a; } :root[data-theme="dark"] .t-long { --tc: #9dbddb; --tc-soft: #26354a; }
:root[data-theme="dark"] .t-car45, :root[data-theme="dark"] .t-car11, :root[data-theme="dark"] .t-car916 { --tc: #cdb6a2; --tc-soft: #3b322b; }
:root[data-theme="dark"] .t-staging { --tc: #c1b0e4; --tc-soft: #352e47; }
.type-chip { justify-self: start; width: max-content; max-width: 100%; display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; font-weight: 500; padding: .12rem .55rem; border-radius: 999px; background: var(--tc-soft); color: var(--tc); white-space: nowrap; }
.type-chip .ico { width: 13px; height: 13px; }
.project-card { border-top: 3px solid var(--tc, var(--line)); }
.type-option .ico { color: var(--tc); }
.type-filter { display: flex; gap: .4rem; flex-wrap: wrap; }
.type-filter button { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink); border-radius: 999px; padding: .3rem .75rem; font: inherit; font-size: .82rem; cursor: pointer; }
.type-filter button .ico { width: 15px; height: 15px; color: var(--tc, var(--muted)); }
.type-filter button.on { background: var(--tc-soft, var(--hover)); border-color: var(--tc, var(--ink)); color: var(--tc, var(--ink)); font-weight: 500; }

/* Aperçus de publication par réseau (contours d'applications) */
.previews .tabs button.chosen::after { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-left: .4rem; vertical-align: middle; }

/* Sélection multiple (retouches, photos) */
.bulk-bar { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem .8rem; margin-bottom: .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); position: sticky; top: calc(var(--stick-top, 0px) + .5rem); z-index: 3; }
.bulk-bar .spacer { flex: 1; }
.bulk-bar .check { display: inline-flex; align-items: center; gap: .4rem; font-size: .88rem; cursor: pointer; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: .6rem; }
.pick-grid .pick-photo { width: auto; }
.pick-photo .tick { position: absolute; top: 6px; right: 6px; left: auto; bottom: auto; width: 26px; height: 26px; padding: 0; justify-content: center; border-radius: 50%; background: rgba(0, 0, 0, .35); border: 2px solid #fff; }
.pick-photo .tick .ico { opacity: 0; }
.pick-photo[aria-pressed="true"] { outline: 3px solid var(--accent); outline-offset: -3px; }
.pick-photo[aria-pressed="true"] .tick { background: var(--accent); }
.pick-photo[aria-pressed="true"] .tick .ico { opacity: 1; }
.pick-photo[aria-pressed="true"] img { opacity: .85; }
.pick-check { position: absolute; top: 8px; left: 8px; z-index: 4; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: rgba(0, 0, 0, .45); cursor: pointer; }
.pick-check input { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.staged.selected { outline: 3px solid var(--accent); outline-offset: -1px; }
.stage-src.many { display: flex; gap: .4rem; flex-wrap: wrap; }
.stage-src.many img { width: 76px; height: 58px; object-fit: cover; border-radius: 8px; }
.stage-src .more { display: grid; place-items: center; width: 76px; height: 58px; border-radius: 8px; background: var(--hover); font-weight: 600; }
.style-option.quality span { display: inline-flex; align-items: center; gap: .3rem; }
.style-option .ico { width: 15px; height: 15px; }
.radio-list { border: 0; padding: 0; margin: 0; display: grid; gap: .5rem; }
.radio-list > label { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.radio-list .field, .radio-list #tp-new { margin-left: 1.6rem; }
button.slide { border: 0; padding: 0; font: inherit; cursor: zoom-in; }
.dup-thumb video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.dup-thumb small { font-size: .75rem; text-align: center; padding: 0 .5rem; }
.dup-thumb:has(small) { gap: .3rem; align-content: center; }
.dup-thumb.audio { position: relative; }
.dup-thumb.audio > .ico { width: 40px; height: 40px; }
.dup-thumb.audio audio { position: absolute; left: 8px; right: 8px; bottom: 8px; width: calc(100% - 16px); height: 36px; }

/* Carte de projet : type en haut, état en bas à gauche, date en bas à droite */
.project-card .card-type { margin-bottom: .1rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.project-card .card-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; color: var(--muted); font-size: .8rem; }
.project-card .card-foot .when { margin-left: auto; white-space: nowrap; }
.project-card .card-foot .when { overflow: hidden; text-overflow: ellipsis; }
.project-card .private-mark { display: inline-flex; color: var(--muted); }
.project-card .private-mark .icon { width: 14px; height: 14px; }
.notice.read-only { background: var(--hover); border-color: var(--line); color: var(--ink); margin: .2rem 0 .8rem; }
.who-filter { margin-bottom: .4rem; }
.project-card { grid-template-rows: auto 1fr; }
.project-card .body { display: flex; flex-direction: column; gap: .45rem; }
.net svg { width: 62%; height: 62%; }
.net.sm { width: 26px; height: 26px; border-radius: 8px; }
.net.xs { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; vertical-align: middle; }
.previews .tabs button { display: inline-flex; align-items: center; gap: .4rem; }
.pub-thumb { position: relative; flex: none; }
.pub-thumb .net { position: absolute; right: -6px; bottom: -6px; box-shadow: 0 0 0 2px var(--paper); }
.pub-list li { display: flex; align-items: center; gap: .6rem; }
h2.with-logo { display: flex; align-items: center; gap: .5rem; }
.status-line .net.xs { margin-right: -.2rem; }

/* Voix off */
a.rail-btn { text-decoration: none; }
.voice-panel h2 { display: flex; align-items: center; gap: .45rem; }
.voice-panel h2 .ico { color: var(--accent); }
.vo-write { display: flex; gap: .6rem; align-items: flex-end; flex-wrap: wrap; }
.vo-write .field { margin: 0; }
.vo-write .grow { flex: 1 1 220px; }
.vo-lines { display: grid; gap: .5rem; margin-top: .8rem; }
.vo-line { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .3rem .6rem; align-items: start; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.vo-line textarea { width: 100%; resize: vertical; font: inherit; min-height: 2.6rem; }
.vo-line .vo-time { display: inline-flex; align-items: center; gap: .25rem; font-size: .8rem; color: var(--muted); white-space: nowrap; padding-top: .4rem; }
.vo-line .vo-time input { width: 4.2rem; }
.vo-line .vo-fit { grid-column: 2; font-size: .75rem; color: var(--muted); }
.vo-line.long { border-color: #d6a74a; }
.vo-line.long .vo-fit { color: #9a6b00; }
.vo-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .5rem; }
.vo-actions { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.vo-or { color: var(--muted); font-size: .85rem; }
.vo-synth { display: flex; gap: .4rem; flex-wrap: wrap; flex: 1 1 260px; }
.vo-synth select { flex: 1 1 200px; min-width: 0; }
.vo-read { margin: 0 0 .8rem; padding-left: 0; list-style: none; display: grid; gap: .3rem; }
.vo-read li { display: flex; gap: .6rem; font-size: .9rem; }
.vo-read span { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 3.2rem; }

/* Karaoké */
.karaoke { width: min(1100px, 96vw); }
.kara-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 760px) { .kara-body { grid-template-columns: minmax(0, 1fr); } }
.kara-video { position: relative; background: #000; border-radius: 12px; overflow: hidden; display: grid; place-items: center; max-height: 68vh; }
.kara-video video { width: 100%; max-height: 68vh; object-fit: contain; display: block; }
.kara-count { position: absolute; inset: 0; display: grid; place-items: center; font: 600 5rem/1 var(--font-display, serif); color: #fff; background: rgba(0, 0, 0, .35); }
.kara-rec { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: .4rem; padding: .2rem .6rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .8rem; }
.kara-rec i, .rec-dot { width: 9px; height: 9px; border-radius: 50%; background: #e5484d; animation: blink 1s infinite; display: inline-block; }
@keyframes blink { 50% { opacity: .25; } }
.kara-side { display: grid; gap: .8rem; min-width: 0; }
.kara-prompt { max-height: 48vh; overflow-y: auto; display: grid; gap: .9rem; padding: .4rem .2rem; scroll-behavior: smooth; }
.kara-prompt p { margin: 0; font-size: 1.35rem; line-height: 1.45; color: var(--muted); opacity: .55; transition: opacity .2s, color .2s; }
.kara-prompt p.on { opacity: 1; color: var(--ink); font-weight: 500; }
.kara-prompt p.on span { background: linear-gradient(90deg, var(--accent-soft, rgba(201, 100, 66, .22)) calc(var(--fill, 0) * 100%), transparent 0); border-radius: 4px; }
.kara-prompt p.past { opacity: .35; }
.kara-meter { height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; min-width: 120px; flex: 1; }
.kara-meter span { display: block; height: 100%; width: calc(var(--lvl, 0) * 100%); background: var(--accent); transition: width .06s; }

/* Ma voix */
.voice-steps { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 1.4rem; }
.voice-steps h3 { margin: 0 0 .2rem; font-size: 1rem; }
.voice-steps blockquote { margin: .6rem 0; padding: .8rem 1rem; border-left: 3px solid var(--accent); background: var(--hover); border-radius: 0 10px 10px 0; font-size: 1.05rem; line-height: 1.55; }
.voice-steps blockquote.consent { font-weight: 500; }
.rec-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.rec-row audio { height: 36px; max-width: 100%; }
.rec-time { font-variant-numeric: tabular-nums; }
.rail-btn[aria-current="page"] { background: var(--paper); box-shadow: var(--shadow); font-weight: 500; }
#voiceover { margin-top: 1.2rem; }
.vo-line [data-rm] { grid-column: 3; grid-row: 1; }
.vo-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: .5rem; }
.vo-mode { display: flex; gap: .5rem; align-items: flex-start; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.vo-mode input { margin-top: .2rem; accent-color: var(--accent); }
.vo-mode span { display: grid; gap: .1rem; min-width: 0; }
.vo-mode small { color: var(--muted); font-size: .78rem; }
.vo-mode.on { border-color: var(--accent); background: var(--accent-soft, var(--hover)); }
.vo-wish-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: .6rem; margin-top: .8rem; }
.vo-wish-opts .wide { grid-column: 1 / -1; }
.vo-wish-opts .field { margin: 0; }
.voice-row { display: flex; gap: .4rem; }
.voice-row select { flex: 1; min-width: 0; }
.durations { margin-top: .4rem; }
/* Cartes de projets : titre sur 2 lignes réservées, type et état toujours groupés juste dessous */
.project-card h3 { line-height: 1.3; min-height: 2.6em; overflow-wrap: anywhere; word-break: break-word; }
.project-card .card-foot { margin-top: 0; }
.project-card .card-type .type-chip { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.project-card .card-foot .chip { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Titres saisis par l'utilisateur : un mot très long passe à la ligne au lieu d'élargir la page */
h1, h2, h3, .status-line, .pub-main strong, .track-main strong { overflow-wrap: anywhere; }
.main, .page-head, .page-head > div { min-width: 0; }
.lang-switch { margin-left: auto; display: inline-flex; border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; }
.lang-switch button { border: 0; background: transparent; font: inherit; font-size: .75rem; padding: .2rem .55rem; cursor: pointer; color: var(--muted); }
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.login-card .brand { display: flex; align-items: center; gap: .5rem; }
.lang-pick .modal-body { text-align: center; padding: 1.6rem; }
.lang-pick h2 { margin-bottom: 1.2rem; }
.lang-options { display: flex; gap: .8rem; justify-content: center; }
.lang-options .btn { min-width: 140px; }

/* Réglages du montage : son, musiques, durées */
.sub-head { display: flex; align-items: center; gap: .4rem; font-size: .95rem; margin: 1rem 0 .35rem; }
.sub-head:first-of-type { margin-top: 0; }
.sub-head .ico { width: 16px; height: 16px; color: var(--accent); }
.sound-panel .panel-head h2 { display: flex; align-items: center; gap: .45rem; }
.sound-sub { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .2rem; }
.track-item { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; margin-bottom: .6rem; display: grid; gap: .45rem; background: var(--paper); }
.track-item audio { width: 100%; height: 34px; }
.track-item.template-music { border-style: dashed; }
.ti-head { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.ti-head strong { display: inline-flex; align-items: center; gap: .35rem; min-width: 0; overflow-wrap: anywhere; }
.ti-head .grow { flex: 1; }
.ti-head .toggle { margin-left: auto; }
.ti-range { display: flex; flex-wrap: wrap; gap: .4rem .6rem; align-items: flex-end; }
.ti-range input { width: 6.5rem; }
.music-add { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.music-add select { flex: 1 1 220px; min-width: 0; }
.music-common { display: grid; gap: .4rem; }
.duration-row { display: flex; gap: .4rem; align-items: center; }
.duration-row select { flex: 1; min-width: 0; }
.custom-d { display: inline-flex; align-items: center; gap: .25rem; white-space: nowrap; }
.custom-d input { width: 5rem; }
.duration-info { display: grid; gap: .3rem; font-size: .85rem; background: var(--hover); border-radius: 10px; padding: .55rem .7rem; margin: .2rem 0 .6rem; }
.duration-info span { display: flex; gap: .4rem; align-items: flex-start; }
.duration-info .ico { width: 15px; height: 15px; flex: none; margin-top: .15rem; }
.brief-write { display: grid; gap: .4rem; margin: .6rem 0 .8rem; padding: .7rem; border: 1px dashed var(--line-strong); border-radius: 12px; }
.brief-write label { font-size: .85rem; font-weight: 500; }
.brief-write textarea { width: 100%; resize: vertical; font: inherit; }
.brief-write .btn { justify-self: start; }
.launch-panel { display: grid; gap: .4rem; justify-items: start; }
.toggle[hidden] { display: none; }
.preset-lines { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .25rem; font-size: .85rem; }
.preset-lines li { display: flex; gap: .4rem; align-items: baseline; }
.preset-lines .chip { flex: none; font-size: .7rem; }
.tpl-music { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .4rem; font-size: .85rem; }
.tpl-music .ico { width: 15px; height: 15px; color: var(--accent); }
.tpl-music audio { height: 30px; max-width: 220px; }
.my-voice-try { display: grid; gap: .6rem; margin: .8rem 0 1rem; padding: .8rem; background: var(--hover); border-radius: 12px; }
.my-voice-try .btn { justify-self: start; }
.my-voice-try textarea { width: 100%; font: inherit; resize: vertical; }
.say-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.my-voice-try audio { width: 100%; }

/* Éditeur de passage musical (forme d'onde) */
.wave { --wave-on: var(--accent); --wave-off: var(--line-strong); display: grid; gap: .45rem; }
.wave-canvas { position: relative; height: 64px; border-radius: 10px; background: var(--hover); cursor: pointer; touch-action: none; user-select: none; }
.wave-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-shade { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--paper) 55%, transparent); pointer-events: none; }
.wave-shade.left { left: 0; border-radius: 10px 0 0 10px; }
.wave-shade.right { right: 0; border-radius: 0 10px 10px 0; }
.wave-handle { position: absolute; top: -4px; bottom: -4px; width: 14px; margin-left: -7px; cursor: ew-resize; z-index: 2; outline: none; }
.wave-handle span { position: absolute; left: 6px; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: var(--ink); }
.wave-handle span::before { content: ''; position: absolute; left: -5px; top: -2px; width: 13px; height: 13px; border-radius: 4px; background: var(--ink); }
.wave-handle.end span::before { top: auto; bottom: -2px; }
.wave-handle:focus-visible span { background: var(--accent); }
.wave-head { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #e5484d; pointer-events: none; z-index: 1; left: 0; }
.wave-loading { position: absolute; inset: 0; display: grid; place-items: center; }
.wave-bar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-size: .85rem; }
.wave-times { color: var(--muted); font-variant-numeric: tabular-nums; }
.wave-times strong { color: var(--ink); font-weight: 500; }
.wave-pos { margin-left: auto; color: #e5484d; font-variant-numeric: tabular-nums; }

/* Modèle, assistant, règles */
.template-panel h2, .assist-panel h2, .text-panel h2 { display: flex; align-items: center; gap: .45rem; }
.template-panel h2 .ico, .assist-panel h2 .ico { color: var(--accent); }
.assist-panel textarea { width: 100%; font: inherit; resize: vertical; }
.assist-row { display: flex; justify-content: flex-start; margin-top: .4rem; }
.assist-summary { list-style: none; margin: .6rem 0 0; padding: .6rem .7rem; background: var(--hover); border-radius: 10px; display: grid; gap: .3rem; font-size: .88rem; }
.assist-summary li { display: flex; gap: .4rem; align-items: flex-start; }
.assist-summary .ico { width: 15px; height: 15px; color: var(--ok, #3f7d4a); flex: none; margin-top: .15rem; }
.rules-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .4rem; }
.rules-actions select { flex: 1 1 220px; min-width: 0; }
.music-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: .5rem; margin-bottom: .7rem; }
.tpl-config { display: flex; align-items: flex-start; gap: .35rem; font-size: .82rem; color: var(--muted); margin: .35rem 0 0; }
.tpl-config .ico { width: 14px; height: 14px; flex: none; margin-top: .15rem; }

/* Style des textes */
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; align-items: end; }
@media (max-width: 640px) { .style-grid { grid-template-columns: minmax(0, 1fr); } }
.style-grid .field { margin: 0; }
.style-grid input[type=color] { width: 100%; height: 40px; padding: 2px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--paper); }
.style-preview { margin: .8rem 0 .4rem; padding: 1.4rem 1rem; border-radius: 12px; display: grid; justify-items: center; gap: .3rem; text-align: center;
  background: linear-gradient(160deg, #3d5a73, #1f2d3a 60%, #2a1f18); color: var(--sp-color, #fff); overflow: hidden; }
.style-preview .sp-kicker { font: 600 .75rem/1.2 'Montserrat', sans-serif; letter-spacing: .25em; }
.style-preview .sp-title { font: 400 2rem/1.15 'EB Garamond', serif; }
.style-preview .sp-price { font: 400 1.5rem/1.2 'EB Garamond', serif; }
.style-preview.custom-font > [data-sp-text] { font-family: var(--sp-font), serif; }
/* Sous-titres : blancs, contour doux et ombre légère, sans boîte (comme au rendu) */
.style-preview .sp-sub, .style-preview.custom-font .sp-sub { margin-top: .9rem; font: 700 .95rem/1.3 'Inter', sans-serif; color: #fff;
  text-shadow: 0 0 2px rgba(0,0,0,.55), 0 0 4px rgba(0,0,0,.4), 0 1px 3px rgba(0,0,0,.45); }
.style-preview.play[data-anim="fade"] > [data-sp-text], .style-preview.play[data-anim="auto"] > [data-sp-text] { animation: sp-fade .6s both; }
.style-preview.play[data-anim="slide_up"] > [data-sp-text] { animation: sp-slide .5s both; }
.style-preview.play[data-anim="pop"] > [data-sp-text] { animation: sp-pop .4s both; }
.style-preview.play[data-anim="reveal"] > [data-sp-text] { animation: sp-fade .3s both; }
.style-preview.play > [data-sp-text]:nth-child(2) { animation-delay: .15s; }
.style-preview.play > [data-sp-text]:nth-child(3) { animation-delay: .3s; }
@keyframes sp-fade { from { opacity: 0; } }
@keyframes sp-slide { from { opacity: 0; transform: translateY(18px); } }
@keyframes sp-pop { 0% { opacity: 0; transform: scale(.72); } 60% { transform: scale(1.06); } }
.font-row .font-sample { margin: .35rem 0 0; font-size: 1.35rem; line-height: 1.3; overflow-wrap: anywhere; }

/* Rubriques repliables (étape Montage) */
details.fold { padding: 0; }
details.fold > summary { list-style: none; cursor: pointer; display: block; padding: 1rem 1.2rem; overflow: hidden; }
/* Ligne du titre dans un élément à part : certains navigateurs n'appliquent pas « flex » directement à <summary> */
details.fold > summary .fold-row { display: flex; align-items: center; gap: .7rem; min-width: 0; width: 100%; }
details.fold > summary .fold-row > .ico { width: 16px; height: 16px; transition: transform .15s; flex: none; }
details.fold[open] > summary .fold-row > .ico { transform: rotate(180deg); }
details.fold > summary .fold-title { flex: none; max-width: 60%; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary .fold-title { font-family: var(--font-display, serif); font-size: 1.15rem; display: inline-flex; align-items: center; gap: .45rem; }
details.fold > summary .fold-title .ico { color: var(--accent); width: 18px; height: 18px; }
details.fold > summary .fold-summary { display: block; color: var(--muted); font-size: .85rem; flex: 1 1 0; min-width: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
details.fold > summary > .ico { width: 16px; height: 16px; transition: transform .15s; flex: none; }
details.fold[open] > summary > .ico { transform: rotate(180deg); }
details.fold > summary:hover { background: var(--hover); border-radius: var(--radius); }
.fold-body { padding: 0 1.2rem 1.2rem; display: grid; gap: .6rem; }

/* Modèle choisi */
.tpl-row { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.tpl-current { display: flex; align-items: center; gap: .7rem; flex: 1 1 260px; min-width: 0; }
.tpl-current span { display: grid; gap: .15rem; min-width: 0; }
.tpl-current small { color: var(--muted); font-size: .8rem; display: inline-flex; align-items: center; gap: .3rem; }
.tpl-current small .ico { width: 13px; height: 13px; }
.tpl-cover { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.tpl-cover.empty { display: grid; place-items: center; background: var(--hover); color: var(--muted); }

/* Sélecteur visuel */
.picker .modal-body { display: grid; gap: .7rem; }
.picker-search { width: 100%; }
.picker-items { display: grid; gap: .5rem; max-height: 60vh; overflow-y: auto; padding: 2px; }
.picker-items.grid { grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); }
.picker-items.media { grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr)); }
.picker-item { position: relative; display: flex; gap: .6rem; align-items: center; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--paper); min-width: 0; }
.picker-item[hidden] { display: none; }
.picker-item > input { position: absolute; opacity: 0; pointer-events: none; }
.picker-item.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft, rgba(201, 100, 66, .25)); }
.picker-item:hover { border-color: var(--line-strong); }
.picker-items.grid .picker-item, .picker-items.media .picker-item { flex-direction: column; align-items: stretch; padding: .5rem; }
.pi-main { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.pi-main .chip { justify-self: start; }
.pi-main small, .pi-card small { color: var(--muted); font-size: .8rem; display: flex; align-items: center; gap: .3rem; }
.pi-card { display: grid; gap: .3rem; min-width: 0; }
.pi-card strong { overflow-wrap: anywhere; }
.pi-cover { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; background: var(--hover); }
.pi-cover.empty { display: grid; place-items: center; color: var(--muted); }
.pi-cover.small { width: 46px; height: 46px; aspect-ratio: auto; display: grid; place-items: center; overflow: hidden; flex: none; }
.pi-cover.small img { width: 100%; height: 100%; object-fit: cover; }
.pi-music { display: flex; align-items: center; gap: .6rem; width: 100%; min-width: 0; }
.pi-sample { font-size: 1.3rem; line-height: 1.3; margin-top: .2rem; overflow-wrap: anywhere; }
.pi-media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--hover); color: var(--muted); }
.pi-media img { width: 100%; height: 100%; object-fit: cover; }
.pi-badge { position: absolute; left: 4px; bottom: 4px; display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .4rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: .7rem; }
.pi-badge.right { left: auto; right: 4px; top: 4px; bottom: auto; }
.pi-badge .ico { width: 11px; height: 11px; }
.picker-items.media .picker-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .72rem; }
.picker-count { margin-right: auto; }
.picker-all { display: inline-flex; gap: .4rem; align-items: center; font-size: .88rem; }
.warn-text { color: #9a6b00 !important; }

/* Règles enregistrées */
.rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.rule-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); flex-wrap: wrap; }
.rule-main { flex: 1 1 260px; display: grid; gap: .1rem; min-width: 0; }
.rule-main small { color: var(--muted); font-size: .8rem; }
.rule-side { display: flex; align-items: center; gap: .4rem; }
.constraint [data-keep] .ico { width: 16px; height: 16px; }

/* Rushs : outils, sélection, photos mises de côté */
.rush-tools { display: flex; justify-content: flex-end; margin: -.4rem 0 .6rem; }
.rush .thumb { position: relative; }
.rush.selected { outline: 3px solid var(--accent); outline-offset: -1px; border-radius: var(--radius); }
.hidden-rushes { margin-top: 1rem; }
.hidden-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.hidden-list li { display: flex; align-items: center; gap: .6rem; }
.hidden-list img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; opacity: .7; }
.hidden-list span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .88rem; }
.pick-wrap { position: relative; }
.pick-wrap .pick-photo { width: 100%; }
.pick-dl { position: absolute; left: 6px; top: 6px; background: rgba(0, 0, 0, .45); color: #fff; border-radius: 8px; }
.style-option span { display: grid; gap: .1rem; }
.style-option small { font-size: .74rem; color: var(--muted); font-weight: 400; }

/* Aperçu des vidéos de référence (lecteurs officiels) */
.tpl-embed-box { width: min(360px, 100%); margin: 0 auto; border-radius: 12px; overflow: hidden; background: #000; }
.tpl-embed-box .tpl-embed { display: block; width: 100%; border: 0; }
.tpl-embed-box.tiktok .tpl-embed { aspect-ratio: 9 / 17.5; }
.tpl-embed-box.instagram { background: #fff; }
.tpl-embed-box.instagram .tpl-embed { height: min(70vh, 660px); }
.tpl-embed-box.youtube { width: 100%; }
.tpl-embed-box.youtube .tpl-embed { aspect-ratio: 16 / 9; }
.font-btn { display: inline-flex; justify-content: space-between; align-items: center; gap: .5rem; flex: 1; min-width: 0; }
.font-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.tpl-config + .tpl-music { margin-top: .2rem; }
.tpl-current .tpl-cover { width: 56px; height: 56px; min-height: 0; align-self: center; flex: none; display: grid; place-items: center; }
.picker-search { min-height: 40px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; padding: 0 .8rem; }
.tpl-embed-box.instagram { width: min(420px, 100%); }
.tpl-embed-box.instagram .tpl-embed { height: min(64vh, 620px); }

/* Opérations en cours (barre du haut) */
.act-btn { display: inline-flex; align-items: center; gap: .35rem; height: 34px; padding: 0 .65rem; border-radius: 999px; border: 1px solid var(--line);
  background: var(--paper); color: var(--muted); cursor: pointer; font: inherit; font-size: .8rem; font-weight: 600; }
.act-btn[hidden] { display: none; }
.act-btn .act-ico { display: inline-grid; place-items: center; }
.act-btn .act-ico .ico { width: 16px; height: 16px; }
.act-btn.working { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.act-btn.working .act-ico { animation: spin 1.2s linear infinite; }
.act-list li > a, .act-list li > div { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.act-list li > a:hover { background: var(--hover); }
.act-list .spinner { width: 16px; height: 16px; flex: none; margin-top: .15rem; }
.act-main { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.act-target { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-state { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; margin-top: .15rem; }
.act-state .ico { width: 16px; height: 16px; }
.act-state.ok { color: var(--ok, #2e7d4f); }
.act-state.ko { color: var(--danger, #b3261e); }
.act-bar { display: block; height: 4px; border-radius: 4px; background: var(--hover); overflow: hidden; margin-top: .3rem; }
.act-bar > span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.act-foot { border-top: 1px solid var(--line); font-size: .78rem; }

/* Aperçu des rushs : lecture au clic, aperçu muet au survol */
.rush .thumb .thumb-open { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: zoom-in; display: grid; place-items: center; z-index: 1; }
.rush .thumb[data-hover] .thumb-open { cursor: pointer; }
.rush .thumb .thumb-open .play { width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; transition: transform .15s, opacity .15s; }
.rush .thumb .thumb-open .play .ico { width: 20px; height: 20px; margin-left: 2px; }
.rush .thumb .thumb-open:hover .play, .rush .thumb .thumb-open:focus-visible .play { transform: scale(1.08); }
.rush .thumb .hover-play { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.rush .thumb:has(.hover-play) .thumb-open .play { opacity: 0; }
.rush .thumb .pick-check, .rush .thumb .virtual-badge, .rush .thumb .kind { z-index: 2; }
.rush-video { width: 100%; max-height: 72vh; border-radius: 12px; background: #111; display: block; }
.rush-video-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.rush-video-foot [data-q] { margin-right: auto; }

/* Badges des rushs (empilés en haut à droite) */
.rush .thumb .badges { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; z-index: 2; pointer-events: none; }
.rush .thumb .badges .virtual-badge, .compare .virtual-badge { position: static; }
.compare .virtual-badge { position: absolute; top: 8px; right: 8px; z-index: 2; }
.virtual-badge.visit { background: var(--ink); color: var(--paper); }

/* Propositions vidéo : vignette, lecture, fichier d'origine en médaillon */
.staged .compare .thumb-open { position: absolute; inset: 0; border: 0; padding: 0; background: transparent; cursor: pointer; display: grid; place-items: center; z-index: 1; }
.staged .compare .thumb-open .play { width: 48px; height: 48px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.staged .compare .thumb-open .play .ico { width: 22px; height: 22px; margin-left: 2px; }
.staged .compare .from { position: absolute; left: 8px; bottom: 8px; width: 64px; height: 48px; object-fit: cover; border-radius: 6px; border: 2px solid #fff; box-shadow: var(--shadow); z-index: 2; }
.staged .compare .kind { position: absolute; right: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: .3rem; font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; z-index: 2; }
.staged .compare .kind .ico { width: 13px; height: 13px; }
.staged-msg .ghost { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .25; filter: blur(2px); z-index: -1; }
.staged-msg { z-index: 0; isolation: isolate; }
.retouch-filter { margin-bottom: .6rem; }

/* Visite IA (réglages du montage) */
.life-main span strong { font-weight: 600; }
.life-options { display: grid; gap: .6rem; margin-top: .4rem; padding: .8rem; border-radius: 12px; background: var(--hover); transition: opacity .2s; }
.life-options.off { opacity: .55; }

/* Modèles : polices et musique détectées dans la vidéo */
.tpl-detected { display: grid; gap: .4rem; margin: .5rem 0; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.tpl-detected .det-row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; min-width: 0; }
.tpl-detected .det-row > span:not(.chip) { display: grid; flex: 1 1 12rem; min-width: 0; }
.tpl-detected .det-row strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.tpl-detected .det-row small { color: var(--muted); }


/* Moments notés d'une vidéo (aperçu des rushs) */
.moments { margin-top: .8rem; }
.moments h3 { font-size: .95rem; margin: 0 0 .4rem; display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; }
.moments ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .3rem; max-height: 14rem; overflow-y: auto; }
.moments button { all: unset; box-sizing: border-box; cursor: pointer; width: 100%; display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto 2rem;
  gap: .6rem; align-items: center; padding: .4rem .6rem; border-radius: 8px; border-left: 3px solid var(--line-strong); background: var(--paper); }
.moments button:hover, .moments button:focus-visible { background: var(--hover); }
.moments button.good { border-left-color: var(--ok); } .moments button.mid { border-left-color: var(--warn-ink); } .moments button.bad { border-left-color: var(--danger); opacity: .75; }
.moments .m-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .82rem; }
.moments .m-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.moments .m-tags { display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.moments .m-tags i { font-style: normal; font-size: .72rem; padding: .05rem .45rem; border-radius: 999px; background: var(--hover); color: var(--muted); }
.moments .m-tags i.warn { background: var(--warn-soft); color: var(--warn-ink); }
.moments .m-score { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .moments button { grid-template-columns: 4.5rem minmax(0, 1fr) 2rem; } .moments .m-tags { display: none; } }

/* Fiche de tournage */
.shot-sheet .fold-title svg { margin-right: .35rem; }
.shot-list { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .45rem; }
.shot-list li { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .5rem; align-items: start; padding: .5rem .6rem; border-radius: 10px; background: var(--paper); }
.shot-list li > span:last-child { display: grid; gap: .1rem; min-width: 0; }
.shot-list small { color: var(--muted); }
.shot-list .req { color: var(--accent-soft-ink); font-weight: 600; }
.shot-list .shot-note { color: var(--ink); }
.shot-list .shot-files { font-style: italic; overflow-wrap: anywhere; }
.shot-list .shot-ico svg { width: 18px; height: 18px; }
.shot-list li.ok .shot-ico { color: var(--ok); } .shot-list li.bad .shot-ico { color: var(--danger); } .shot-list li.warn .shot-ico { color: var(--warn-ink); }
.shot-list li.bad { box-shadow: inset 3px 0 0 var(--danger); } .shot-list li.ok { opacity: .85; }
/* Sous-onglets du montage : version verticale / horizontale */
.format-tabs { display: flex; gap: .6rem; flex-wrap: wrap; margin: 0 0 1rem; }
.format-tabs button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem;
  border: 1px solid var(--line-strong); border-radius: 12px; background: var(--paper); min-width: 0; }
.format-tabs button span { display: grid; }
.format-tabs button small { color: var(--muted); font-size: .76rem; }
.format-tabs button em { font-style: normal; font-size: .75rem; min-width: 1.3rem; text-align: center; border-radius: 999px; background: var(--hover); padding: 0 .35rem; }
.format-tabs button em:empty { display: none; }
.format-tabs button.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; background: var(--accent-soft); }
.format-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.format-tabs .add-format { border-style: dashed; color: var(--muted); }
.companion { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.account-option.off { opacity: .45; }
.anim-modes { margin-bottom: .8rem; }
.default-rules { margin: .2rem 0 .8rem; }
.default-rules summary { cursor: pointer; color: var(--muted); font-size: .88rem; }
.default-rules ul { margin: .4rem 0 0; padding-left: 1.1rem; display: grid; gap: .25rem; font-size: .88rem; color: var(--muted); }
.shot-edit-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.shot-edit { padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.shot-edit .field { margin-bottom: .4rem; }
.shot-edit-foot { display: flex; align-items: center; gap: .3rem; }
.shot-edit .req { color: var(--accent-soft-ink); font-weight: 600; }

/* Propositions : cartes de même hauteur, textes longs coupés (texte complet au survol) */
.staged-body .st-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.6em; line-height: 1.3; }
.staged-body .st-meta { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 2.5em; line-height: 1.25; overflow-wrap: anywhere; }
.staged-grid { align-items: stretch; }
.staged { grid-template-rows: auto 1fr; }
.staged-body { grid-template-rows: auto auto 1fr; }
.staged-body .row-actions { align-self: end; min-height: 34px; }
/* Retoucher ou animer */
.result-pick .style-option strong { display: inline-flex; align-items: center; gap: .4rem; }
.frame-pick { display: grid; gap: .4rem; margin-bottom: .8rem; }
.frame-pick video { width: 100%; max-height: 260px; background: #000; border-radius: 10px; }
.frame-row { display: grid; gap: .2rem; }
/* Polices : l'aperçu prend toute la largeur (pas de colonne de pochette) */
.track.font-row { grid-template-columns: minmax(0, 1fr) auto; }
/* Favoris et droits des musiques */
.icon-btn.star.on { color: #d4a017; }
.icon-btn.star.on svg { fill: currentColor; }
.fav-only { margin: 0 0 .6rem; }
.chip.rights { font-size: .7rem; vertical-align: middle; margin-left: .3rem; }
.chip.rights::before { display: none; }
.chip.rights svg { width: 12px; height: 12px; }
.rights-note { margin: .4rem 0; }
.font-row .font-sample.caps { font-size: 1rem; letter-spacing: .2em; margin-top: .1rem; }
.section-head .head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.fav-mark svg { width: 14px; height: 14px; color: #d4a017; fill: currentColor; margin-right: .25rem; vertical-align: -2px; }
/* Fiches de tournage : plusieurs fiches, création avec l'IA */
.sheet-tabs button small { color: var(--muted); }
.sheet-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 1rem; align-items: start; margin-top: .8rem; }
.sheet-layout.readonly { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 900px) { .sheet-layout { grid-template-columns: minmax(0, 1fr); } }
.sheet-chat { position: sticky; top: 1rem; display: grid; gap: .5rem; }
.sheet-chat h3 { margin: 0; font-size: 1rem; display: flex; align-items: center; gap: .35rem; }
.chat-log { display: grid; gap: .4rem; max-height: 300px; overflow-y: auto; }
.chat-log .msg { margin: 0; padding: .45rem .65rem; border-radius: 10px; font-size: .88rem; }
.chat-log .msg.user { background: var(--accent-soft); justify-self: end; max-width: 90%; }
.chat-log .msg.assistant { background: var(--hover); max-width: 90%; }
.chat-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.shot-pick { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .2rem 0 .6rem; }

/* Lien à copier (Metricool) */
.copy-row { display: flex; gap: .5rem; margin: .75rem 0; }
.copy-row input { flex: 1; min-width: 0; font-size: .85rem; }
.panel-head h2:has(> .ico) { display: flex; align-items: center; gap: .45rem; }
.bulk-bar > .hint { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bulk-bar > .btn { flex: none; white-space: nowrap; }

/* Faire le tri : plans qui se ressemblent, groupe par groupe */
.modal.xwide { width: min(1040px, calc(100vw - 32px)); }
.sort-dlg .modal-body { max-height: calc(100vh - 220px); overflow-x: hidden; overflow-y: auto; }
.sort-dlg footer .spacer { flex: 1; }
.sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: .8rem; }
.sort-tile { display: grid; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--paper); opacity: .55; transition: opacity .15s, border-color .15s; }
.sort-tile.kept { border-color: var(--accent); opacity: 1; }
.sort-tile:hover { opacity: 1; }
.sort-media { position: relative; aspect-ratio: 4 / 3; background: #111; display: grid; place-items: center; overflow: hidden; }
.sort-media video, .sort-media img { width: 100%; height: 100%; object-fit: contain; }   /* fichier en entier, paysage compris */
.sort-media .play { position: absolute; width: 40px; height: 40px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; pointer-events: none; }
.sort-tile.playing .play { opacity: 0; }
.sort-best { position: absolute; top: 8px; left: 8px; font-size: .72rem; padding: .15rem .5rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); }
.sort-foot { display: flex; gap: .5rem; align-items: flex-start; padding: .5rem .6rem; min-width: 0; }
.sort-foot input { width: 18px; height: 18px; accent-color: var(--accent); margin-top: 2px; flex: none; }
.sort-foot > span { display: grid; min-width: 0; }
.sort-foot strong { font-weight: 500; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sort-foot small { color: var(--muted); font-size: .78rem; }
.sort-recap { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: .5rem; }
.sort-recap li { display: grid; gap: .25rem; font-size: .78rem; min-width: 0; }
.sort-recap img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; }
.sort-recap span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Cartes de compte : les boutons passent sous le texte (le nom et l'état restent lisibles) */
.account-card { flex-wrap: wrap; }
.account-card > .row-actions { flex-basis: 100%; justify-content: flex-end; flex-wrap: wrap; gap: .3rem; border-top: 1px solid var(--line); padding-top: .5rem; }
.sort-dlg header .sort-sound { margin-left: auto; margin-right: .4rem; }
/* Cartes de la bibliothèque : la colonne de texte ne s'élargit jamais au-delà de la carte (frise de 30 plans, longs titres) */
.track-main { grid-template-columns: minmax(0, 1fr); }
.track-main > * { min-width: 0; max-width: 100%; }
.timeline { min-width: 0; overflow: hidden; }
.timeline span { flex-basis: 0; }
.tpl-music { min-width: 0; }
.tpl-music > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.tpl-music audio { flex: 1 1 200px; min-width: 160px; max-width: 280px; }
.timeline.dense span { font-size: 0; padding: 0; }
.timeline.dense { gap: 2px; }
.notice > .btn { flex: none; align-self: center; height: auto; }
.notice { flex-wrap: wrap; } .notice > span { flex: 1 1 16rem; min-width: 0; }
.life-options[hidden] { display: none; }

/* --- Filtres de couleur --- */
.filter-grid { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.filter-tile { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface, var(--bg)); display: flex; flex-direction: column; min-width: 0; }
.filter-tile.pending { border-style: dashed; }
.filter-cmp.compare { aspect-ratio: 3 / 2; }
.filter-body { padding: .6rem .75rem .75rem; display: grid; gap: .25rem; min-width: 0; }
.filter-title { display: flex; align-items: center; gap: .4rem; justify-content: space-between; }
.filter-title strong { min-width: 0; overflow-wrap: anywhere; }
.filter-body small { color: var(--muted); font-size: .8rem; }
.filter-body .row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .2rem; }
.filter-card .pi-cover { aspect-ratio: 3 / 2; }
.filter-card { position: relative; }
.filter-card .pi-badge { position: absolute; top: 6px; right: 6px; left: auto; bottom: auto; }
.filter-btn { display: flex; align-items: center; gap: .6rem; width: 100%; max-width: 360px; padding: .35rem .6rem .35rem .35rem; border: 1px solid var(--line);
  border-radius: 12px; background: transparent; color: inherit; cursor: pointer; text-align: left; font: inherit; }
.filter-btn:hover:not(:disabled) { border-color: var(--accent); }
.filter-btn:disabled { cursor: default; opacity: .7; }
.filter-btn img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; flex: none; background: var(--hover); }
.filter-btn span { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.filter-btn small { color: var(--muted); font-size: .78rem; }
.grade-modes { margin-bottom: .6rem; }
.grade-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: .8rem; }
.grade-slots .field { display: grid; gap: .35rem; justify-items: start; }

/* essai d'un filtre sur les rushs */
.filter-test .ft-bar { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: flex-end; }
.filter-test .ft-bar .field { margin: 0; min-width: min(220px, 100%); }
.filter-test .ft-view { display: grid; gap: .4rem; justify-items: center; }
.ft-compare { width: 100%; max-height: 58vh; max-width: min(100%, calc(58vh * 1.6)); }
.ft-compare .after, .ft-compare .before-wrap img { object-fit: contain; background: #111; }
.ft-loading { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .55); border-radius: 999px; padding: .25rem; display: grid; }
.ft-loading[hidden] { display: none; }
.ft-time { width: 100%; max-width: 520px; display: grid; gap: .2rem; }
.ft-strip { display: flex; gap: .4rem; overflow-x: auto; padding: 2px 2px 6px; }
.ft-rush { position: relative; flex: none; width: 84px; height: 60px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--hover); }
.ft-rush img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ft-rush.on { border-color: var(--accent); }
.ft-rush .pi-badge { position: absolute; bottom: 3px; right: 3px; left: auto; padding: 0 .25rem; }

/* retouche : filtre et lumière */
.grade-sec[hidden], #ai-sec[hidden] { display: none; }
.grade-sec { display: grid; gap: .6rem; }
.grade-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 1rem; align-items: start; }
@media (max-width: 640px) { .grade-row { grid-template-columns: minmax(0, 1fr); } }
.rg-cmp { max-height: 300px; border-radius: 10px; }
.rg-cmp .after, .rg-cmp .before-wrap img { object-fit: contain; background: #111; }
.grade-sec #rg-test { justify-self: start; }

/* Visite IA : fichiers choisis */
.life-picks { margin-bottom: .4rem; }
.life-chosen[hidden] { display: none; }
.chosen-strip { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-bottom: .2rem; }
.chosen-item { position: relative; display: inline-block; flex: none; width: 56px; height: 42px; border-radius: 6px; overflow: hidden; background: var(--hover); }
.chosen-item img { width: 100%; height: 100%; object-fit: cover; }
.chosen-item .pi-badge { position: absolute; bottom: 2px; right: 2px; left: auto; padding: 0 .2rem; }
.field .label { font-size: .85rem; font-weight: 500; display: block; margin-bottom: .3rem; }

/* import depuis un lien */
.link-help { margin: 0 0 .6rem; padding-left: 1.1rem; display: grid; gap: .3rem; font-size: .88rem; }
.import-notice { align-items: center; gap: .6rem; margin: .5rem 0; }

/* aperçu en direct (filtre calculé par le navigateur) */
.gv { display: grid; gap: .35rem; justify-items: center; }
.gv-stage { position: relative; aspect-ratio: var(--ratio, 4 / 3); width: min(100%, calc(52vh * var(--r, 1.333))); background: #111; border-radius: 10px; overflow: hidden; --pos: 50%; }
.gv-stage canvas, .gv-stage .gv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.gv-stage canvas[hidden], .gv-stage .gv-img[hidden] { display: none; }
.gv-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; box-shadow: 0 0 4px rgba(0, 0, 0, .4); }
.gv-split { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.gv-stage .lbl { position: absolute; bottom: 8px; font-size: .72rem; padding: .1rem .45rem; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; pointer-events: none; }
.gv-stage .lbl.l { left: 8px; } .gv-stage .lbl.r { right: 8px; }
.gv-load { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(0, 0, 0, .55); border-radius: 999px; padding: .25rem; display: grid; }
.gv-load[hidden] { display: none; }
.gv-bar { display: flex; align-items: center; gap: .5rem; width: min(100%, 560px); }
.gv-bar[hidden] { display: none; }
.gv-bar .gv-time { flex: 1; min-width: 0; }
.gv-clock { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gv-sound.on { color: var(--accent); }
.gt-scope { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin: .3rem 0 0; }
.gt-scope .check { font-size: .85rem; }

/* fenêtre Retoucher : 1. filtre et lumière, 2. retouche IA (facultative) */
.rt-block { display: grid; gap: .6rem; padding: .2rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.rt-block:last-child { border-bottom: 0; margin-bottom: 0; }
.rt-block h3 { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: 1rem; }
.rt-block h3 small { color: var(--muted); font-weight: 400; font-size: .8rem; font-family: var(--font); }
.rt-ask-row { display: flex; gap: .5rem; align-items: flex-end; flex-wrap: wrap; }
.rt-ask-row textarea { flex: 1 1 16rem; min-width: 0; }
.rt-ask-out { display: flex; gap: .4rem; align-items: flex-start; margin: 0; color: var(--ink); }
.rt-ask-out .icon { flex: none; color: var(--ok, currentColor); margin-top: .15rem; }
.rg-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem 1rem; align-items: end; }
@media (max-width: 640px) { .rg-controls { grid-template-columns: minmax(0, 1fr); } }
.rt-block .toggle small.hint, .filter-test .toggle small.hint, .launch-panel .toggle small.hint { display: block; font-weight: 400; }
#ai-sec { display: grid; gap: .6rem; }
#ai-sec[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Curseurs dans un champ : le curseur va jusqu'au bout (pas de marge intérieure de champ de saisie) */
.field input[type="range"] { margin-inline: 0; padding: 0; border: 0; min-height: 28px; background: transparent; box-shadow: none !important; accent-color: var(--accent); }
.pi-badge.sugg { background: var(--accent); color: var(--accent-ink); }
.sugg-box { margin: .5rem 0 1rem; padding: .9rem 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.sugg-box .sub-head { margin-top: 0; }
.sugg-box .grade-slots { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.filter-tile .chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }

/* Plan détaillé (à valider avant le montage, ou détail d'une version) */
.plan-view { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 1rem; align-items: start; }
#review-host, #pd-host { container-type: inline-size; }
#review-host { margin-bottom: 1rem; }
@container (max-width: 640px) {
  .plan-view { grid-template-columns: minmax(0, 1fr); }
  .pv-preview { position: static; }
  .pv-side { width: min(100%, 340px); justify-self: center; }
}
.pv-side { min-width: 0; align-self: stretch; }   /* aussi haute que la liste : l’aperçu la suit jusqu’en bas */
.pv-preview { position: sticky; top: calc(var(--stick-top, 0px) + .5rem); display: grid; gap: .4rem; }
.pv-stage { aspect-ratio: 9 / 16; max-height: 60vh; border-radius: 12px; overflow: hidden; background: #111; display: grid; place-items: center; position: relative; }
.montage.horizontal .pv-stage, .plan-view.h .pv-stage { aspect-ratio: 16 / 9; }
.pv-stage video, .pv-stage img { width: 100%; height: 100%; object-fit: cover; }
.pv-stage .hint { color: #ddd; padding: 1rem; text-align: center; }
.pv-stage img.kb { animation: pv-kb var(--d, 3s) ease-in-out infinite alternate; }
.pv-stage img.kb.zoom_out, .pv-stage img.kb.depth_out { animation-name: pv-kb-out; }
.pv-stage img.kb.pan_left, .pv-stage img.kb.pan_right, .pv-stage img.kb.rise, .pv-stage img.kb.descend,
.pv-stage img.kb.parallax_left, .pv-stage img.kb.parallax_right, .pv-stage img.kb.orbit_left, .pv-stage img.kb.orbit_right { animation-name: pv-kb-pan; }
@keyframes pv-kb { from { transform: scale(1); } to { transform: scale(1.12); } }
@keyframes pv-kb-out { from { transform: scale(1.12); } to { transform: scale(1); } }
@keyframes pv-kb-pan { from { transform: scale(1.12) translateX(-4%); } to { transform: scale(1.12) translateX(4%); } }
@media (prefers-reduced-motion: reduce) { .pv-stage img.kb { animation: none; } }
.pv-note { position: absolute; left: .5rem; right: .5rem; bottom: .5rem; padding: .3rem .5rem; border-radius: 8px; background: rgba(0, 0, 0, .65); color: #fff; font-size: .78rem; }
.pv-cardview { width: 100%; height: 100%; display: grid; place-content: center; gap: .4rem; color: #fff; text-align: center; padding: 1rem; font-family: var(--serif, Georgia, serif); font-size: 1.2rem; }
.pv-caption { font-size: .85rem; color: var(--muted); margin: 0; }
.pv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.pv-row { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .7rem; padding: .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.pv-row.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pv-row.gen { border-style: dashed; }
.pv-thumb { position: relative; width: 76px; height: 76px; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: pointer; background: var(--hover); }
.pv-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-card { display: grid; place-items: center; width: 100%; height: 100%; color: #fff; background: #1F1E1B; }
.pv-body { display: grid; gap: .15rem; align-content: start; min-width: 0; }
.pv-body small { color: var(--muted); overflow-wrap: anywhere; }
.pv-body .btn { justify-self: start; margin-top: .25rem; }
.pv-time { font-variant-numeric: tabular-nums; font-size: .78rem; font-weight: 600; color: var(--accent-soft-ink); }
.pv-texts .ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: .25rem; }
.pv-total { grid-column: 1 / -1; }
.plan-review .pr-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.plan-review #pv-host { margin: .75rem 0; }
.relaunch-pick { margin: 0 0 .5rem; }
.launch-panel .toggle { margin: .5rem 0; }

/* Logos de l'agence */
/* L'image tient toujours dans sa case (hauteur fixe), quelle que soit sa taille d'origine */
.logo-swatch { display: block; box-sizing: border-box; padding: .4rem; border-radius: 8px; height: 64px; overflow: hidden;
  background: repeating-conic-gradient(#8f8b84 0% 25%, #a9a59d 0% 50%) 0 0 / 14px 14px; }
.logo-swatch img { display: block; width: 100%; height: 100%; object-fit: contain; }
.logo-swatch.big { height: 140px; }
.logo-pick { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .5rem; }
.logo-opt { position: relative; display: grid; gap: .25rem; width: 130px; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; text-align: center; }
.logo-opt.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.logo-opt input { position: absolute; opacity: 0; pointer-events: none; }
.logo-opt small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logo-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .8rem; }
.logo-tile { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--paper); display: grid; }
.logo-tile .filter-body { padding: .6rem .75rem; display: grid; gap: .25rem; }
.logo-mock { position: relative; width: 120px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; margin-top: .5rem;
  background: url('/api/filters/preview?f=&i=0&w=360&rush=sample%3Aexterior-1') center / cover, #333; }
.logo-mock.horizontal { width: 220px; aspect-ratio: 16 / 9; }
.logo-mock img { position: absolute; width: 26%; height: auto; }
.logo-mock.size-small img { width: 18%; } .logo-mock.size-large img { width: 38%; }
.logo-mock.pos-center img { left: 50%; top: 45%; transform: translate(-50%, -50%); width: 45%; }
.logo-mock.pos-center.size-small img { width: 32%; } .logo-mock.pos-center.size-large img { width: 60%; }
.logo-mock.pos-top img { left: 50%; top: 5.5%; transform: translateX(-50%); max-height: 8.5%; width: auto; max-width: 26%; }
.logo-mock.pos-top-left img { left: 5%; top: 3%; } .logo-mock.pos-top-right img { right: 5%; top: 3%; }
.logo-mock.pos-bottom-left img { left: 5%; bottom: 12%; } .logo-mock.pos-bottom-right img { right: 5%; bottom: 12%; }

/* Coordonnées de l'agent à la fin de la vidéo : aperçu de la carte (mêmes proportions qu'au rendu, en unités de 1/1080
   du petit côté de la vidéo) */
.ct-options { display: grid; gap: .7rem; }
.ct-templates { display: flex; flex-wrap: wrap; gap: .5rem; }
.ct-tpl { position: relative; display: grid; justify-items: center; gap: .25rem; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.ct-tpl.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ct-tpl input { position: absolute; opacity: 0; pointer-events: none; }
.ct-preview { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.ct-mock { position: relative; width: 170px; aspect-ratio: 9 / 16; border-radius: 10px; overflow: hidden; container-type: inline-size; flex: none;
  background: url('/api/filters/preview?f=&i=0&w=360&rush=sample%3Aexterior-1') center / cover, #333; }
.ct-mock.horizontal { width: 300px; aspect-ratio: 16 / 9; }
.ct-mock.mini { width: 84px; border-radius: 6px; }
.ct-card { --u: calc(100cqw / 1080); position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); width: var(--ct-w);
  box-sizing: border-box; padding: calc(50 * var(--u)) calc(56 * var(--u)); display: grid; justify-items: center; text-align: center;
  font-family: var(--ct-font), sans-serif; color: #fff; }
.ct-mock.horizontal .ct-card { --u: calc(100cqw / 1920); top: 50%; }
.ct-card strong { position: relative; font-size: calc(var(--ct-name) * var(--u)); line-height: 1.2; font-weight: 700; white-space: nowrap;
  margin-bottom: calc(26 * var(--u)); }
.ct-card span { font-size: calc(var(--ct-info) * var(--u)); line-height: 1.4; white-space: nowrap; }
.ct-mock.t-carte .ct-card { background: rgba(255, 255, 255, .9); color: #1a1a1a; border-radius: calc(28 * var(--u)); }
.ct-mock.t-bandeau .ct-card { width: 100%; background: rgba(0, 0, 0, .62); }
.ct-mock.t-epure::before { content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .5); }
.ct-mock.t-epure .ct-card, .ct-mock.t-cadre .ct-card { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.ct-mock.t-epure .ct-card strong::after { content: ''; position: absolute; left: 50%; bottom: calc(-14 * var(--u)); width: calc(150 * var(--u));
  height: max(1px, calc(3 * var(--u))); background: rgba(255, 255, 255, .87); transform: translateX(-50%); }
.ct-mock.t-cadre .ct-card { background: rgba(0, 0, 0, .56); outline: max(1px, calc(3 * var(--u))) solid rgba(255, 255, 255, .94); }
.ct-mock.play .ct-card, .ct-mock.play.t-epure::before { animation: ct-fade 2s ease both; }
.ct-mock.play[data-anim=slide_up] .ct-card { animation: ct-fade 2s ease both, ct-slide .45s ease-out both; }
.ct-mock.play[data-anim=zoom] .ct-card { animation: ct-fade 2s ease both, ct-zoom .45s ease-out both; }
.ct-mock.play[data-anim=lines] .ct-card > * { animation: ct-fade 2s ease both; }
.ct-mock.play[data-anim=lines] .ct-card > :nth-child(2) { animation-delay: .15s; }
.ct-mock.play[data-anim=lines] .ct-card > :nth-child(3) { animation-delay: .3s; }
@keyframes ct-fade { 0% { opacity: 0; } 20%, 80% { opacity: 1; } 100% { opacity: 0; } }
@keyframes ct-slide { from { translate: 0 calc(60 * var(--u)); } to { translate: 0 0; } }
@keyframes ct-zoom { from { scale: .86; } to { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .ct-mock.play .ct-card, .ct-mock.play .ct-card > * { animation-duration: .01s !important; } }
.logo-mock.horizontal.pos-center img { top: 50%; }
/* Dans une fenêtre, un bouton au texte long passe à la ligne plutôt que de dépasser (téléphone) */
.modal-body .btn { white-space: normal; max-width: 100%; }

/* Pièces du bien : en tête du plan détaillé (pièces, parcours de la visite) et tri par pièce */
.pv-tour { grid-column: 1 / -1; display: grid; gap: .7rem; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pv-tour > div { display: grid; gap: .35rem; min-width: 0; }
.room-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.room-chips li { font-size: .8rem; padding: .15rem .55rem; border-radius: 999px; background: var(--accent-soft); color: var(--ink); }
.room-chips li.off { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
.tour-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .2rem; counter-reset: step; }
.tour-steps li { display: grid; padding: .3rem .6rem; border: 1px solid var(--line); border-radius: 10px; font-size: .85rem; min-width: 0; }
.tour-steps li span::before { counter-increment: step; content: counter(step) ". "; color: var(--muted); }
.tour-steps li small { color: var(--muted); font-size: .72rem; }
.tour-steps li + li::before { content: '→'; position: absolute; margin-left: -1.05rem; margin-top: .5rem; color: var(--muted); }
.tour-steps li + li { position: relative; margin-left: .9rem; }
.pv-time b { font-weight: 600; color: var(--ink); }
.room-tile { display: grid; gap: .3rem; min-width: 0; }
.room-tile > .btn { justify-self: start; }
.room-name { margin-bottom: .2rem; }
.tour-edit { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.tour-edit li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .5rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 10px; }
.tour-edit li > span:nth-child(2) { display: grid; min-width: 0; }
.tour-edit small { color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour-n { width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); font-size: .8rem; font-weight: 600; }
.move-head { display: flex; gap: .8rem; align-items: center; }
.move-head img { width: 96px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; flex: none; }
.move-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(180px, 100%), 1fr)); gap: .4rem; }
.move-pick .style-option.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.move-pick .style-option span { display: grid; }
.move-pick .style-option small { color: var(--muted); }
.move-pick strong .ico { margin-right: .3rem; }

/* Pièce d'un rush (« Salon +2 », « Visite · 4 pièces ») et choix de ses pièces */
.room-chip { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; margin-top: .3rem; padding: .15rem .55rem;
  font: inherit; font-size: .78rem; line-height: 1.4; border-radius: 999px; border: 1px solid transparent; background: var(--accent-soft);
  color: var(--ink); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; justify-self: start; }
span.room-chip { cursor: default; }
.room-chip .ico { width: 13px; height: 13px; flex: none; }
.room-chip.none { background: transparent; border: 1px dashed var(--line); color: var(--muted); }
button.room-chip:hover { border-color: var(--accent); }
.room-pick { list-style: none; margin: .8rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.room-opt { display: inline-flex; align-items: center; gap: .3rem; padding: .35rem .75rem; font: inherit; font-size: .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface, transparent); color: var(--ink); cursor: pointer; }
.room-opt small { font-size: .72rem; color: var(--muted); }
.room-opt.main { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.room-opt.main small { color: var(--accent-ink); opacity: .8; }
.room-opt.also { border-color: var(--accent); background: var(--accent-soft); }
.room-opt .ico { width: 14px; height: 14px; }
.room-add { display: flex; gap: .4rem; margin-top: .8rem; }
.room-add input { flex: 1; min-width: 0; }
#rf-visit + span small { display: block; margin-top: .1rem; }

/* Plan détaillé : son gardé sur chaque plan, lecture avec le son et à la suite */
.pv-controls { display: flex; flex-wrap: wrap; gap: .4rem; }
.pv-sound { display: inline-flex; align-items: center; gap: .25rem; margin-left: .35rem; padding: 0 .45rem; border-radius: 999px;
  font-weight: 500; font-size: .74rem; color: var(--muted); border: 1px dashed var(--line); vertical-align: 1px; }
.pv-sound .ico { width: 12px; height: 12px; }
.pv-sound.on { color: var(--ink); background: var(--accent-soft); border: 1px solid transparent; }

/* Plan détaillé : durée de chaque plan, musique avec le son des plans, volume, enregistrement */
.pv-trim:empty { display: none; }
.pv-trim { display: flex; flex-wrap: wrap; align-items: end; gap: .4rem .5rem; padding: .55rem .6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.pv-trim strong { flex-basis: 100%; font-size: .8rem; }
.pv-trim .mini { width: 5.2rem; }
.pv-trim small { flex-basis: 100%; }
.pv-nudge { display: flex; gap: .25rem; }
.plan-view .pv-stage { max-height: 52vh; max-width: 100%; justify-self: center; width: auto; height: 52vh; }
.pv-bar { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; padding: .6rem .75rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pv-bar .pv-mix { flex-basis: 100%; }
.pv-volume { display: grid; grid-template-columns: auto minmax(6rem, 10rem) 3rem; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500; }
.pv-volume output { font-variant-numeric: tabular-nums; color: var(--muted); text-align: right; }
.pv-mix { margin: 0; font-size: .78rem; }
.pv-track { display: grid; grid-template-columns: auto minmax(0, 16rem); align-items: center; gap: .4rem; font-size: .85rem; font-weight: 500; min-width: 0; }
.pv-track select { min-width: 0; width: 100%; min-height: 34px; font-size: .85rem; }
.pv-join { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; margin-left: 2.2rem; padding: .1rem 0; font-size: .8rem; color: var(--muted); }
.pv-join .ico { width: 15px; height: 15px; }
.pv-join b { color: var(--ink); font-weight: 600; }
.pv-join select, .pv-join input { min-height: 30px; padding: .15rem .45rem; font-size: .8rem; border-radius: 8px; max-width: 13rem; }
.pv-acts { display: flex; flex-wrap: wrap; gap: .1rem .3rem; margin-top: .2rem; }
.pv-acts .btn { margin-top: 0; }
button.pv-sound { cursor: pointer; font-family: inherit; }
button.pv-sound:hover { border-color: var(--accent); }
@media (max-width: 640px) { .pv-volume, .pv-track { grid-template-columns: minmax(0, 1fr); width: 100%; } .pv-join { margin-left: 0; } }
.pv-save { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .7rem; border-radius: 12px;
  background: var(--paper); border: 1px solid var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .1); }
.pv-save span { flex: 1 1 14rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .88rem; font-weight: 500; }

/* Rushs : rotation et raccord de deux vidéos */
.rot-stage { display: grid; place-items: center; height: 260px; border-radius: 12px; background: #111; overflow: hidden; margin: .6rem 0; }
.rot-stage img { max-width: 100%; max-height: 100%; transition: transform .25s ease; }
.rot-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.flip-x { display: inline-flex; transform: scaleX(-1); }
.join-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: .6rem 0; }
@media (max-width: 640px) { .join-parts { grid-template-columns: minmax(0, 1fr); } }
.join-part { display: grid; gap: .45rem; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; margin: 0; }
.join-part legend, .join-kinds legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.join-part select { min-width: 0; width: 100%; }
.join-view { position: relative; height: min(42vh, 340px); border-radius: 8px; background: #111; overflow: hidden; }
.join-view video, .join-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.join-pickzone { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: rgba(0, 0, 0, .15); cursor: crosshair; }
.join-view.picking { outline: 3px solid var(--accent); outline-offset: -3px; }
.join-dot { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff;
  background: rgba(209, 92, 60, .85); box-shadow: 0 0 0 2px rgba(0, 0, 0, .35); pointer-events: none; }
.jb { position: relative; height: 34px; margin: .2rem 10px 0; touch-action: none; cursor: pointer; }
.jb::before { content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 8px; border-radius: 4px; background: var(--hover); border: 1px solid var(--line); }
.jb-kept { position: absolute; top: 13px; height: 8px; border-radius: 4px; background: var(--accent); }
.jb-head { position: absolute; top: 6px; width: 2px; height: 22px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.jb-h { position: absolute; top: 5px; width: 20px; height: 24px; margin-left: -10px; padding: 0; border-radius: 6px; border: 2px solid var(--accent);
  background: var(--paper); cursor: ew-resize; touch-action: none; }
.jb-h:focus-visible { outline: 3px solid var(--accent-soft); }
.join-trim { display: flex; flex-wrap: wrap; align-items: end; gap: .45rem .9rem; }
.join-trim .jt-row { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.join-trim .jt { display: flex; align-items: end; gap: .2rem; }
.join-trim .mini { width: 4.8rem; }
.join-part select { min-height: 36px; }
.join-point { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .5rem; }
.join-point small { flex-basis: 100%; }
.join-kinds { border: 1px solid var(--line); border-radius: 12px; padding: .6rem .7rem; margin: 0 0 .6rem; display: grid; gap: .5rem; min-width: 0; }
.join-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .35rem; }
.join-ai { display: grid; gap: .35rem; }
.join-sub { margin: .2rem 0 0; font-weight: 600; }
.join-opt { display: flex; gap: .45rem; align-items: start; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 9px; cursor: pointer; font-size: .86rem; min-width: 0; }
.join-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.join-opt input { margin-top: .2rem; flex: none; }
.join-opt small { display: block; color: var(--muted); font-size: .76rem; margin-top: .1rem; }
#j-extra:empty { display: none; }
#j-extra { display: grid; gap: .5rem; }
#j-extra .j-dur { display: grid; grid-template-columns: auto minmax(0, 1fr) 3rem; align-items: center; gap: .5rem; }
#j-extra .j-dur span { white-space: nowrap; }
#j-extra .j-dur output { font-variant-numeric: tabular-nums; text-align: right; }
/* plan détaillé modifiable : l'aperçu reste entier à l'écran avec ses réglages */
@media (max-width: 860px) { .plan-view .pv-stage { height: auto; width: 100%; } }

/* Plan détaillé : consignes (durées, règles) et consignes données à l'IA */
.pv-rules { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.pv-rules summary { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .7rem; padding: .6rem .75rem; cursor: pointer; list-style: none; }
.pv-rules summary::-webkit-details-marker { display: none; }
.pv-rules summary .ico { width: 16px; height: 16px; }
.pv-dur { display: inline-flex; align-items: center; gap: .25rem; margin-left: auto; font-size: .8rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; }
.pv-dur.ok { background: var(--accent-soft); }
.pv-dur.bad { color: var(--danger); background: var(--danger-soft); }
.pv-rules-body { display: grid; gap: .6rem; padding: 0 .75rem .75rem; }
.pv-durs { display: flex; flex-wrap: wrap; align-items: end; gap: .5rem .8rem; }
.pv-durs .mini { width: 9rem; }
.pv-durs .bad { flex-basis: 100%; margin: 0; color: var(--danger); }
.pv-rule-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.pv-rule-list li { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto auto; align-items: center; gap: .4rem; }
.pv-rule-list select, .pv-rule-list input { min-height: 34px; font-size: .85rem; min-width: 0; }
.pv-outcome { font-size: .74rem; font-weight: 600; padding: .05rem .5rem; border-radius: 999px; white-space: nowrap; background: var(--hover); color: var(--muted); }
.pv-outcome.ok { background: var(--accent-soft); color: var(--ink); }
.pv-outcome.part { background: var(--warn-soft); color: var(--warn-ink); }
.pv-outcome.ko { background: var(--danger-soft); color: var(--danger); }
@media (max-width: 640px) { .pv-rule-list li { grid-template-columns: minmax(0, 1fr) auto; } .pv-rule-list li input, .pv-rule-list li > span:not(.pv-outcome) { grid-column: 1 / -1; } }
.ai-items { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .3rem .9rem; margin: 0 0 .8rem; }
.ai-items dt { color: var(--muted); font-size: .85rem; }
.ai-items dd { margin: 0; overflow-wrap: anywhere; }
.ai-prompt { margin: .3rem 0 0; padding: .7rem .85rem; border-left: 3px solid var(--accent); background: var(--hover); border-radius: 0 8px 8px 0;
  font-size: .82rem; line-height: 1.45; overflow-wrap: anywhere; max-height: 40vh; overflow: auto; }
.pv-subs .ico, .pv-texts .ico { width: 13px; height: 13px; vertical-align: -2px; margin-right: .25rem; }
.pv-texts b, .pv-subs b { font-weight: 600; color: var(--ink); }
.pv-subs { color: var(--muted); }
.pv-subs.on { color: var(--ink); }

/* Plan détaillé : réglages du plan choisi (onglets), écran avec textes, sous-titres et boutons des réseaux */
.plan-view.h .pv-stage { aspect-ratio: 16 / 9; height: auto; width: 100%; max-height: none; }
.pv-tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: -.1rem 0 .55rem; }
.pv-tabs button { border: 0; background: none; padding: .4rem .6rem; font: inherit; font-size: .85rem; font-weight: 500; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.pv-tabs button.on { color: var(--ink); border-bottom-color: var(--accent); }
.pv-trim { display: block; }
.pv-tab { display: grid; gap: .5rem; }
.pv-row-fields { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem .5rem; }
.pv-row-fields .mini { width: auto; min-width: 4.6rem; }
.pv-row-fields .mini input { width: 5rem; }
.pv-part { border: 1px solid var(--line); border-radius: 10px; padding: .5rem .6rem; margin: 0; display: grid; gap: .45rem; min-width: 0; }
.pv-part legend { font-size: .82rem; font-weight: 600; padding: 0 .25rem; }
.pv-text { display: grid; gap: .4rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; }
.pv-text.placing { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.pv-text > input { min-height: 34px; font-size: .9rem; }
.pv-sublines { display: grid; gap: .4rem; }
.pv-subline { display: grid; grid-template-columns: 4.2rem 4.2rem minmax(0, 1fr); align-items: end; gap: .35rem; font-size: .8rem; color: var(--muted); }
.pv-subline .mini input { width: 100%; }
.pv-subline input { min-height: 32px; font-size: .85rem; }
.pv-netui { font-size: .8rem; }
.pv-screen { position: absolute; inset: 0; pointer-events: none; color: #fff; font-family: Inter, system-ui, sans-serif; }
.pv-g { position: absolute; display: flex; flex-direction: column; gap: .15em; max-width: 78%; text-align: center; }
.pv-t { line-height: 1.15; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); overflow-wrap: anywhere; }
.pv-t.box { background: rgba(0, 0, 0, .45); padding: .1em .35em; border-radius: 3px; }
.pv-t.sel { outline: 2px dashed var(--accent); outline-offset: 2px; }
.pv-sub span { font-weight: 700; line-height: 1.15; text-shadow: 0 0 3px #000, 0 1px 2px #000; }
.pv-zone { position: absolute; pointer-events: auto; border: 2px dashed #fff; border-radius: 8px; background: rgba(209, 92, 60, .35); color: #fff;
  font: 600 .72rem Inter, sans-serif; cursor: pointer; text-shadow: 0 1px 2px #000; }
.pv-zone:hover { background: rgba(209, 92, 60, .6); }
.ui-yt-top { position: absolute; top: 0; left: 0; right: 0; height: 12%; padding: .4em .7em; font-size: .7rem; background: linear-gradient(rgba(0, 0, 0, .5), transparent); }
.ui-yt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 12%; display: flex; align-items: center; justify-content: space-between; padding: 0 .7em;
  font-size: .62rem; background: linear-gradient(transparent, rgba(0, 0, 0, .6)); }
.ui-prog { position: absolute; left: .7em; right: .7em; top: 10%; height: 3px; background: rgba(255, 255, 255, .5); }
.pv-add { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; grid-column: 2; }
@media (max-width: 860px) { .pv-add { grid-column: auto; } }
.pv-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; max-height: 55vh; overflow: auto; }
.pv-pick-item { display: grid; gap: .25rem; padding: .35rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .75rem; min-width: 0; }
.pv-pick-item:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.pv-pick-item input { position: absolute; opacity: 0; }
.pv-pick-item img, .pv-pick-item .pv-card { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; height: auto; }
.pv-pick-item small { overflow-wrap: anywhere; }
.pr-settings { border: 1px solid var(--line); border-radius: 12px; margin: .75rem 0; }
.pr-settings > summary { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; padding: .7rem .8rem; cursor: pointer; list-style: none; }
.pr-settings > summary::-webkit-details-marker { display: none; }
.pr-settings > summary .ico { width: 16px; height: 16px; }
#pr-settings-body { padding: 0 .6rem .6rem; }

/* Écran d'Instagram (Reels) dans l'aperçu du plan : tailles en em (police de l'écran = hauteur / 62) */
.pv-screen [class^="ig-"] { text-shadow: 0 1px 2px rgba(0, 0, 0, .55); }
.pv-screen svg { display: block; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .45)); }
.ig-top { position: absolute; top: 0; left: 0; right: 0; height: 4.2em; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(rgba(0, 0, 0, .28), transparent); }
.ig-tabs { display: flex; gap: 1.5em; font-size: 1.15em; }
.ig-tabs b { font-weight: 700; }
.ig-tabs span { color: rgba(255, 255, 255, .72); font-weight: 600; }
.ig-cam { position: absolute; right: .9em; top: 1.1em; width: 1.9em; }
.ig-right { position: absolute; right: .55em; bottom: 9.6em; display: flex; flex-direction: column; align-items: center; gap: 1.15em; }
.ig-right > span { display: grid; justify-items: center; gap: .2em; }
.ig-right svg { width: 2.15em; height: 2.15em; }
.ig-right small { font-size: .78em; font-weight: 600; }
.ig-audio { width: 2em; height: 2em; border-radius: .45em; border: .15em solid #fff; background: linear-gradient(135deg, #8a7357, #2f2a24); }
.ig-bottom { position: absolute; left: .85em; right: 4.4em; bottom: 6.4em; display: grid; gap: .5em; text-align: left; }
.ig-who { display: flex; align-items: center; gap: .55em; font-size: .95em; min-width: 0; }
.ig-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ig-pp, .ig-me { display: grid; place-items: center; flex: none; border-radius: 50%; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #b9855c, #5d3b25); border: .1em solid rgba(255, 255, 255, .85); }
.ig-pp { width: 2.3em; height: 2.3em; font-size: .9em; }
.ig-follow { border: .08em solid rgba(255, 255, 255, .75); border-radius: .5em; padding: .15em .7em; font-weight: 600; font-size: .9em; }
.ig-desc { font-size: .92em; line-height: 1.3; }
.ig-desc span { color: rgba(255, 255, 255, .7); }
.ig-song { display: flex; align-items: center; gap: .35em; font-size: .85em; }
.ig-song svg { width: 1em; height: 1em; }
.ig-nav { position: absolute; left: 0; right: 0; bottom: 0; height: 4.8em; display: flex; align-items: center; justify-content: space-around;
  background: #000; border-top: 1px solid rgba(255, 255, 255, .12); }
.ig-nav svg { width: 1.85em; height: 1.85em; }
.ig-nav span:not(.on) { opacity: .92; }
.ig-me { width: 1.9em; height: 1.9em; font-size: .8em; }
.pv-card-on { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: .4em; width: 58%; }
.plan-view.h .pv-card-on { top: 47%; width: 34%; }
.pv-card-on img { width: 100%; max-height: 14em; object-fit: contain; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .6)); }
.pv-card-on small { font-size: .78em; padding: .15em .6em; border-radius: 1em; background: rgba(0, 0, 0, .6); }
.pv-card-on.contact { background: rgba(255, 255, 255, .92); color: #1a1a1a; border-radius: .8em; padding: 1.2em .8em; text-shadow: none; }
.pv-card-on.contact small { background: none; color: #555; }
.pv-clash { position: absolute; left: 6%; right: 6%; top: 9%; padding: .5em .7em; border-radius: .6em; background: var(--danger); color: #fff;
  font-size: .85em; font-weight: 600; text-align: center; text-shadow: none; }
.pv-t[data-tj] { pointer-events: auto; cursor: pointer; }
.pv-text-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .3rem; align-items: center; }
.pv-text-line.placing input { border-color: var(--accent); }
.pv-text-line input { min-height: 34px; font-size: .9rem; }
.pv-autosave { margin: 0; font-size: .78rem; }
.pv-autosave.bad { color: var(--danger); }
.pv-card-on.at-top { top: 20%; }
.pv-card-on.at-bottom { top: 60%; }
.pv-card-on.at-top_right { left: 80%; top: 13%; width: 32%; }
.pv-card-on.at-bottom_right { left: 72%; top: 60%; width: 32%; }
.pv-card-on.at-together { top: 27%; width: 50%; }
.pv-card-on.contact.at-under { top: 58%; }
.pv-card-on.contact.at-bottom { top: 62%; }

/* Rubrique Textes : sous-titres (couleur, mot prononcé), logo (place, apparition), coordonnées personnalisées */
.style-preview .sp-sub i { font-style: normal; display: inline-block; transition: color .12s, opacity .12s, transform .12s; }
.style-preview .sp-sub i.grow { transform: scale(1.22); }
.style-preview .sp-sub .sp-row { display: block; font-weight: 400; opacity: .7; }
.style-preview .sp-sub .sp-row.on { font-weight: 800; opacity: 1; }
.style-preview .sp-sub.sp-in[data-anim="fade"] { animation: sp-fade .5s both; }
.style-preview .sp-sub.sp-in[data-anim="pop"] { animation: sp-pop .35s both; }
.ct-lines { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }
.ct-mock.custom .ct-card { background: color-mix(in srgb, var(--ct-bg, #fff) 90%, transparent) !important; color: var(--ct-ink, #1a1a1a) !important; }
.ct-card em { font-style: normal; font-size: calc(var(--ct-info) * .9 * var(--u)); letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.logo-mock.pos-bottom img { left: 50%; top: 60%; transform: translate(-50%, -50%); width: 45%; }
.logo-mock.pos-top img { top: 20%; transform: translate(-50%, -50%); max-height: none; width: 45%; max-width: none; }
.logo-mock.pos-top_right img { left: auto; right: 6%; top: 9%; width: 26%; transform: none; }
.logo-mock.pos-bottom_right img { left: auto; right: 14%; top: 54%; width: 26%; transform: none; }
.logo-mock.play.anim-fade img { animation: sp-fade .6s both; }
.logo-mock.play.anim-zoom img { animation: logo-zoom .5s both; }
.logo-mock.play.anim-slide_up img { animation: logo-up .5s both; }
@keyframes logo-zoom { from { opacity: 0; scale: .8; } to { opacity: 1; scale: 1; } }
@keyframes logo-up { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

/* Étapes du projet collées en haut en descendant : petites bulles */
.stepper-mark { display: block; height: 0; }
.stepper { position: sticky; top: calc(var(--rail-h, 0px) + .4rem); z-index: 25; transition: padding .15s; }
.stepper.stuck { display: flex; justify-content: center; gap: .35rem; width: fit-content; max-width: 100%; margin: 0 auto; padding: .3rem;
  border-radius: 999px; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border: 1px solid var(--line); box-shadow: var(--shadow); }
.stepper.stuck a { flex-direction: row; padding: .3rem .75rem .3rem .35rem; border-radius: 999px; gap: .4rem; box-shadow: none; }
.stepper.stuck a.current { background: var(--accent-soft); border-color: transparent; }
.stepper.stuck small { display: none; }
.stepper.stuck strong { font-size: .8rem; white-space: nowrap; }
.stepper.stuck .num { width: 22px; height: 22px; font-size: .72rem; }
.stepper.stuck .num .ico { width: 13px; height: 13px; }
@media (max-width: 640px) { .stepper.stuck a { padding: .25rem .5rem .25rem .25rem; } .stepper.stuck strong { font-size: .7rem; } }
.modal .pv-preview { top: .5rem; }

/* Styles de sous-titres (bibliothèque) */
.sub-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.sub-style { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem .6rem; align-items: start; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.sub-demo { grid-column: 1 / -1; display: grid; place-items: center; min-height: 86px; padding: .6rem; border-radius: 9px;
  background: linear-gradient(135deg, #3c4a57, #2a2622); text-align: center; }
.sub-demo .sp-sub { font: 700 1rem/1.3 Inter, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.sub-demo .sp-sub i { font-style: normal; display: inline-block; transition: color .12s, opacity .12s, transform .12s; }
.sub-demo .sp-sub i.grow { transform: scale(1.22); }
.sub-demo .sp-sub .sp-row { display: block; font-weight: 400; opacity: .7; }
.sub-demo .sp-sub .sp-row.on { font-weight: 800; opacity: 1; }
.sub-body { display: grid; gap: .15rem; min-width: 0; }
.sub-body small { overflow-wrap: anywhere; }
.pv-list, .pv-row, .pv-body { min-width: 0; }
.pv-acts .btn { white-space: normal; text-align: left; }
.btn.is-off { opacity: .45; cursor: not-allowed; }
.tpl-keeps { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; font-size: .88rem; }
.redo-card { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.redo-choices strong { flex-basis: 100%; font-size: .9rem; }
.redo-choices .hint { flex-basis: 100%; }
.versions-bar { margin-bottom: .8rem; }
.versions-bar .versions { margin: 0; }
.version.planning button { border-style: dashed; }

/* Mixage : volume de chaque piste du son d'une vidéo montée */
.mixer h2 { display: flex; align-items: center; gap: .45rem; }
.mixer h2 .ico { color: var(--accent); }
.mix-rows { display: grid; gap: .55rem; margin: .4rem 0 .9rem; }
.mix-row { display: grid; grid-template-columns: minmax(10rem, 16rem) 1fr 4rem; align-items: center; gap: .8rem; }
.mix-row span { display: flex; flex-direction: column; min-width: 0; }
.mix-row input[type=range] { width: 100%; accent-color: var(--accent); }
.mix-row output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.mix-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
@media (max-width: 640px) {
  .mix-row { grid-template-columns: 1fr 3.5rem; }
  .mix-row span { grid-column: 1 / -1; }
}
.mix-restore { margin: 0 0 .9rem; }

/* Brouillons des vidéos IA (360p) : à valider (720p) ou à refaire */
.draft-badge { display: inline-flex; align-items: center; gap: .3rem; justify-self: start; width: fit-content; font-size: .72rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; background: var(--warn-soft, #fdf1d8); color: var(--warn-ink, #7a4b00); border: 1px solid color-mix(in srgb, currentColor 25%, transparent); }
.draft-badge .ico { width: 12px; height: 12px; }
.draft-badge .spinner { width: 11px; height: 11px; border-width: 2px; }
.draft-badge.busy { background: var(--hover); color: var(--ink); }
.rush .thumb > .draft-badge { position: absolute; left: 8px; bottom: 34px; z-index: 2; }
.draft-actions { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .4rem; }
.draft-actions .btn { min-height: 30px; font-size: .8rem; padding: 0 .6rem; }
.ai-drafts h2 { display: flex; align-items: center; gap: .45rem; }
.ai-drafts h2 .ico { color: var(--accent); }
.ai-drafts .panel-head { display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.draft-list { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.draft-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: .7rem; align-items: start; padding: .55rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.draft-thumb { position: relative; width: 96px; aspect-ratio: 9 / 16; max-height: 140px; border: 0; padding: 0; border-radius: 8px; overflow: hidden; background: var(--hover); cursor: pointer; }
.montage.horizontal ~ .ai-drafts .draft-thumb, .draft-thumb.wide { aspect-ratio: 16 / 9; }
.draft-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.draft-thumb .play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; }
.draft-info { display: grid; gap: .3rem; min-width: 0; }
.draft-info strong { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staged-body .draft-badge { margin-top: .25rem; }
@media (max-width: 560px) { .draft-list { grid-template-columns: 1fr; } }

/* Nouvelle version de l'application pendant que l'onglet est ouvert */
.update-bar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 120; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; justify-content: center; width: max-content; max-width: calc(100vw - 32px); padding: .55rem .6rem .55rem 1rem; border-radius: 12px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .9rem; }

/* Son des vidéos filmées : quatre choix en 2 × 2 ; explication des cases à cocher sous leur titre */
.sound-modes { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.toggle > span > small.hint { display: block; font-weight: 400; margin-top: .1rem; }
.toggle:has(> span > small.hint) { align-items: flex-start; }
.toggle:has(> span > small.hint) > input { margin-top: .15rem; }

/* Visite IA : ce que l'IA peut créer (les meubles ne sont qu'une possibilité parmi d'autres) */
.life-kinds { list-style: none; margin: .2rem 0 .8rem; padding: 0; display: grid; gap: .35rem; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.life-kinds li { display: flex; gap: .5rem; align-items: flex-start; font-size: .85rem; color: var(--muted); padding: .45rem .6rem; border: 1px solid var(--line); border-radius: 10px; }
.life-kinds li strong { color: var(--ink); font-weight: 600; }
.life-kinds .ico { flex: none; width: 16px; height: 16px; color: var(--accent); margin-top: .1rem; }

/* Visite IA « Je choisis » : un fichier par ligne, avec ce qui est demandé à l'IA */
.chosen-list { list-style: none; margin: .3rem 0 .5rem; padding: 0; display: grid; gap: .4rem; }
.chosen-list li { display: flex; align-items: center; gap: .6rem; padding: .35rem .45rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.chosen-list .chosen-item { flex: none; display: block; }
.chosen-what { display: grid; gap: .1rem; min-width: 0; flex: 1; }
.chosen-what strong { font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen-what small { font-size: .78rem; color: var(--muted); }
.chosen-list .btn { flex: none; }
.life-chosen > small.hint { display: block; margin-top: .3rem; }
.chosen-what { flex: 1 1 110px; }
@media (max-width: 560px) { .chosen-list li { flex-wrap: wrap; } .chosen-list .btn { margin-left: auto; } }
.pv-rule-acts { display: flex; flex-wrap: wrap; gap: .3rem; }

/* Rushs regroupés par pièce */
.rush-view { margin-left: auto; }
.rush-view .ico { width: 14px; height: 14px; margin-right: .25rem; vertical-align: -2px; }
.rush-room { margin-bottom: 1.2rem; }
.rush-room .sub-head { display: flex; align-items: center; gap: .45rem; }
.rush-room .sub-head .hint { font-family: inherit; font-size: .8rem; font-weight: 400; }
.pv-pick-rooms { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-bottom: .6rem; scrollbar-width: thin; }
.pv-pick-rooms button { flex: none; }
.pv-pick-item { position: relative; }
.pv-pick-item .pv-inplan { position: absolute; top: .55rem; left: .55rem; right: auto; bottom: auto; font-size: .65rem; }

/* Tri par pièce : les fichiers d'une pièce sur une seule rangée qui défile sur le côté */
.sort-row-wrap { display: flex; align-items: center; gap: .4rem; min-width: 0; }
.sort-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(170px, 210px); grid-template-columns: none; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; padding-bottom: .4rem; flex: 1; min-width: 0; scrollbar-width: thin; }
.sort-row > .room-tile { scroll-snap-align: start; }
.sort-row .sort-media { aspect-ratio: 4 / 3; max-height: 42vh; }
.sort-scroll { flex: none; }
.sort-scroll[hidden] { display: none; }
@media (max-width: 560px) { .sort-scroll { display: none; } .sort-row { grid-auto-columns: 62%; } }

/* Ce que l'IA a appris (Paramètres) */
.lessons { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.lesson { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; }
.lesson.dismissed { opacity: .6; }
.lesson-main { display: grid; gap: .15rem; flex: 1 1 260px; min-width: 0; }
.lesson-main small { color: var(--muted); font-size: .8rem; }
.lesson-acts { display: flex; flex-wrap: wrap; gap: .2rem; align-items: center; }
.pv-lessons { margin: 0; padding-left: 1.1rem; font-size: .85rem; color: var(--muted); }
.ai-prompt-box summary { cursor: pointer; margin: .4rem 0; }

/* Plan à valider : réglages du montage reportés (ou non) sur le plan */
.plan-sync { display: grid; gap: .4rem; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); margin: .4rem 0; }
.plan-sync p { display: flex; gap: .45rem; align-items: flex-start; margin: 0; font-size: .85rem; }
.plan-sync .ico { flex: none; width: 16px; height: 16px; margin-top: .15rem; }
.plan-sync .ok-text { color: var(--ok, #2f6b3a); }
.plan-sync .btn { justify-self: start; }
.pv-conflict { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: center; padding: .65rem .8rem; margin: .5rem 0; border: 1px solid var(--warn-line); border-radius: 12px; background: var(--warn-soft); color: var(--warn-ink); font-size: .87rem; }
.pv-conflict > .ico { flex: none; width: 18px; height: 18px; align-self: flex-start; margin-top: .1rem; }
.pv-conflict > span:first-of-type { flex: 1 1 320px; }
.pv-conflict-acts { display: flex; flex-wrap: wrap; gap: .35rem; }
.pv-cards-on { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: 0 0 .5rem; font-size: .85rem; }
.pv-cards-on .ico { width: 15px; height: 15px; color: var(--accent); }
.pv-flash { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; transition: outline-color .3s; }
.draft-project { margin-bottom: 1rem; }
.draft-project-link { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: .4rem; color: var(--ink); text-decoration: none; }
.draft-project-link:hover strong { text-decoration: underline; }
.draft-project-link .ico { width: 16px; height: 16px; color: var(--accent); }
.project-drafts { margin: .6rem 0 1rem; } .project-drafts .fold-title .ico { color: var(--accent); margin-right: .35rem; }
/* Validations : filtres, et cartes de même taille */
.val-filter { margin: -.4rem 0 1.2rem; }
.draft-list { grid-auto-rows: 1fr; }
.draft-list li { height: 100%; box-sizing: border-box; }
.draft-info { align-content: start; }
.draft-info > small.hint:not(:first-of-type) { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.draft-info .btn { justify-self: start; margin-top: .3rem; }
a.draft-thumb { display: block; }
/* Validations et projet : cartes de même hauteur, sans grand vide (vignette fixe, textes d'une ligne, boutons en bas) */

.pv-draft { display: grid; gap: .3rem; margin-top: .3rem; }

/* Cartes de brouillon : vignette 96×170, infos sur une ligne chacune, boutons groupés en bas */
.draft-list li { grid-template-rows: 1fr; align-items: stretch; }
.draft-thumb { height: 170px; max-height: none; aspect-ratio: auto; }
.draft-info { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.draft-info > :last-child { margin-top: auto; }
.draft-info > .draft-badge { align-self: flex-start; }
.draft-info > .btn { align-self: flex-start; }
.draft-info > small.hint { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.draft-info > small.hint:not(:first-of-type) { display: block; -webkit-line-clamp: unset; }
.draft-info .draft-actions { align-self: stretch; }
.draft-actions { display: grid; grid-template-columns: 1fr auto; gap: .3rem; }
.draft-actions [data-draft-ok] { grid-column: 1 / -1; justify-content: center; }
.draft-actions .btn { justify-self: stretch; margin-top: 0; }
.draft-actions [data-draft-drop].btn { padding: 0 .5rem; }
/* Carte de rush en brouillon : Valider, Refaire, Abandonner sur une ligne (à la place de « Retoucher ») */
.draft-actions.compact { grid-template-columns: 1fr 1fr auto; gap: 2px; }
.draft-actions.compact [data-draft-ok] { grid-column: auto; }
.draft-actions.compact .btn { min-height: 30px; padding: 0 .4rem; font-size: .78rem; gap: .25rem; min-width: 0; }
.draft-actions.compact .btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-actions.compact .btn .ico { flex: none; width: 14px; height: 14px; }
.draft-wait { display: inline-flex; align-items: center; gap: .4rem; min-height: 30px; padding: 0 .5rem; font-size: .8rem; }
.draft-wait .spinner { width: 12px; height: 12px; border-width: 2px; }
.rush-body { align-content: start; }
.rush-body .room-chip { justify-self: start; }

/* Photos pour aider l'IA */
.ref-pick { display: grid; gap: .4rem; border-top: 1px solid var(--line); padding-top: .7rem; }
.ref-head { display: flex; gap: .5rem; align-items: baseline; }
.ref-group summary { cursor: pointer; font-size: .85rem; padding: .2rem 0; display: flex; gap: .4rem; align-items: center; }
.ref-group .chip { font-size: .7rem; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .35rem; padding: .3rem 0 .5rem; }
.ref-tile { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--hover); }
.ref-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-tile input { position: absolute; top: 4px; left: 4px; width: 16px; height: 16px; accent-color: var(--accent); z-index: 1; }
.ref-tile.on { border-color: var(--accent); }
.ref-tile:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.ref-kind { position: absolute; right: 4px; bottom: 4px; background: rgba(0, 0, 0, .55); color: #fff; border-radius: 6px; padding: 1px 3px; display: grid; }
.ref-kind .ico { width: 12px; height: 12px; }
.draft-list { grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); }
.draft-actions:not(.compact) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.draft-actions .btn { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.draft-actions [data-draft-drop].btn { padding: 0 .6rem; }
/* Roue de chargement dans un bandeau (import Drive…) : jamais étirée comme le texte du bandeau */
.notice > .spinner { flex: none; width: 18px; height: 18px; }
/* Numéro fixe du fichier : dans l'étiquette « Vidéo 12 · 7,6 s » (plus de compteur d'ordre dans le coin) */
.rush .thumb::before { content: none; display: none; }
.sub-title { display: block; margin-top: .6rem; font-size: .85rem; }
.rooms-confirm, .similar-notice { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.rooms-confirm > span, .similar-notice > span { flex: 1 1 18rem; }

/* Voici ce que j'ai compris (demande écrite lue avant de générer) */
.rq-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .8rem; }
.rq-list li { padding-left: .2rem; }
.rq-head { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rq-head > .ico { width: 16px; height: 16px; color: var(--muted); }
.rq-file { display: inline-flex; align-items: center; gap: .4rem; padding: .15rem .45rem .15rem .15rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: .8rem; }
.rq-file img { width: 28px; height: 28px; object-fit: cover; border-radius: 50%; }
.rq-file span { display: grid; line-height: 1.15; }
.rq-file small { color: var(--muted); font-size: .7rem; }
.rq-what { margin: .3rem 0 .1rem; }
.rq-refs { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.rq-cost { display: flex; gap: .4rem; align-items: flex-start; padding: .6rem .7rem; border-radius: 10px; background: var(--accent-soft); }
.rq-cost .ico { flex: none; color: var(--accent); margin-top: 2px; }

/* Animations réutilisables */
.anim-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.anim-card, .anim-card > label { display: grid; grid-template-columns: auto 64px minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
.anim-card { padding: .5rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); grid-template-columns: 64px minmax(0, 1fr) auto; }
.anim-list.pick .anim-card { display: block; }
.anim-list.pick .anim-card > label { cursor: pointer; }
.anim-thumb { width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--hover); display: grid; place-items: center; }
.anim-thumb img { width: 100%; height: 100%; object-fit: cover; }
.anim-body { display: grid; gap: .2rem; min-width: 0; }
.anim-body strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anim-body .chip { justify-self: start; }
.anim-body small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.anim-actions { display: flex; gap: 2px; }
.room-anims { list-style: none; margin: .3rem 0; padding: 0; display: grid; gap: .3rem; }
.room-anims li { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 10px; }
.room-anims li > span { flex: 1; min-width: 0; display: grid; }
.room-anims small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.quick-pick .style-option strong { display: inline-flex; align-items: center; gap: .4rem; }
@media (max-width: 560px) { .quick-pick { grid-template-columns: 1fr; } }
.project-drafts-link { text-decoration: none; align-items: center; margin: .5rem 0; }
.project-drafts-link > .btn { flex: none; }
.montage-tabs { margin: 1.2rem 0 .6rem; }
.shot-rooms { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .6rem 0; }

/* Images et vidéos IA « avec notre abonnement » : étapes à faire soi-même (Validations) et réglage (Paramètres) */
.manual-steps { list-style: none; margin: .4rem 0 0; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); }
.manual-step { display: flex; flex-direction: column; gap: .55rem; padding: .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); min-width: 0; }
.ms-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .5rem; }
.ms-head strong { flex: 1 1 12rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-head .hint { flex-basis: 100%; }
.ms-how { margin: 0; padding-left: 1.2rem; font-size: .875rem; display: grid; gap: .2rem; }
.ms-inputs { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .15rem; }
.ms-input { flex: 0 0 auto; display: grid; gap: .2rem; text-decoration: none; color: inherit; font-size: .8rem; }
.ms-input img { width: 84px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); }
.ms-input span { display: inline-flex; align-items: center; gap: .25rem; }
.ms-prompt { display: grid; gap: .4rem; }
.ms-prompt textarea { width: 100%; box-sizing: border-box; font-size: .8rem; resize: vertical; }
.ms-prompt .btn { justify-self: start; }
.ms-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: auto; }
.ms-actions .hint { flex-basis: 100%; }
.ms-upload { cursor: pointer; }
.media-modes { display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.media-modes .vo-mode small { display: block; margin-top: .2rem; }
.mm-help summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.mm-help ul { margin: .4rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.mm-fields { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.table-scroll { overflow-x: auto; max-width: 100%; }
.settings .panel { min-width: 0; }
.settings .panel > .table, .settings details > .table { display: block; overflow-x: auto; }

/* Aperçus des publications dans les applications (mockups.js) : téléphone, barre d'état, menus, colonne d'icônes.
   Couleurs propres à chaque application, volontairement fixes (indépendantes du thème clair ou sombre). */
.mk-stage { display: flex; justify-content: center; padding: 1.2rem 0 .4rem; }
.mk-phone { width: 300px; max-width: 100%; border-radius: 44px; padding: 9px; background: #121214; box-shadow: 0 0 0 1.5px #3a3a3e inset, 0 22px 50px rgba(0, 0, 0, .22); }
.mk-screen { position: relative; border-radius: 36px; overflow: hidden; aspect-ratio: 9 / 19.5; background: #fff; color: #0f0f0f;
  font: 12.5px/1.35 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif; display: flex; flex-direction: column; }
.mk-phone.dark .mk-screen { background: #000; color: #fff; }
.mk-screen svg { width: 22px; height: 22px; flex: none; }
.mk-screen button { font: inherit; }
.mk-btn { all: unset; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; color: inherit; }
.mk-btn:focus-visible { outline: 2px solid #3897f0; outline-offset: 2px; border-radius: 6px; }
.mk-like .on, .mk-like .off { display: inline-flex; }
.mk-like:not(.liked) .on, .mk-like.liked .off { display: none; }
.mk-like.liked .on { animation: mk-pop .35s; }
@keyframes mk-pop { 50% { transform: scale(1.25); } }
.mk-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #8a7357, #c9b08a); color: #fff; font-size: 11px; font-weight: 700; }
.mk-avatar.xs { width: 24px; height: 24px; font-size: 8.5px; }
.mk-avatar.sm { width: 28px; height: 28px; font-size: 9.5px; }
.mk-avatar.sq { border-radius: 6px; width: 40px; height: 40px; }
.mk-avatar.ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4px #d6249f; }
.mk-dim { color: #737373; display: inline-flex; align-items: center; gap: 3px; }
.mk-dim svg { width: 12px; height: 12px; }

/* barre d'état et barre d'accueil */
.mk-status { flex: none; height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 6px 22px 0; font-size: 12.5px; position: relative; z-index: 4; }
.mk-status.dark { color: #fff; }
.mk-notch { position: absolute; left: 50%; top: 7px; translate: -50% 0; width: 84px; height: 22px; border-radius: 999px; background: #000; }
.mk-sys { display: inline-flex; gap: 5px; align-items: center; }
.mk-sys i { display: inline-block; background: currentColor; }
.mk-sys .sig { width: 15px; height: 9px; clip-path: polygon(0 100%, 22% 100%, 22% 70%, 0 70%, 0 100%, 26% 100%, 26% 50%, 48% 50%, 48% 100%, 52% 100%, 52% 28%, 74% 28%, 74% 100%, 78% 100%, 78% 0, 100% 0, 100% 100%); }
.mk-sys .wifi { width: 13px; height: 10px; clip-path: polygon(50% 100%, 0 30%, 15% 12%, 50% 0, 85% 12%, 100% 30%); }
.mk-sys .bat { width: 22px; height: 10px; border-radius: 3px; box-shadow: 0 0 0 1px currentColor inset; background: linear-gradient(90deg, currentColor 70%, transparent 70%); background-clip: content-box; padding: 2px; }
.mk-homebar { position: absolute; bottom: 6px; left: 50%; translate: -50% 0; width: 110px; height: 4px; border-radius: 999px; background: #111; z-index: 6; }
.mk-homebar.dark { background: #fff; }

/* plein écran vertical : vidéo, menu du haut, colonne d'icônes, texte, menu du bas */
.mk-full { position: absolute; inset: 0 0 50px; background: #111; }
.mk-full video, .mk-full img, .mk-media video, .mk-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-full video, .mk-media video { cursor: pointer; }
.mk-play { position: absolute; inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; border: 0; cursor: pointer; z-index: 2;
  display: grid; place-items: center; background: rgba(0, 0, 0, .35); color: #fff; }
.mk-play svg { width: 26px; height: 26px; }
.mk-play.gone { display: none; }
.mk-top { position: absolute; top: 36px; left: 0; right: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between;
  padding: 4px 14px; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.mk-top b { font-size: 17px; display: inline-flex; align-items: center; gap: 2px; }
.mk-top b svg { width: 16px; height: 16px; }
.mk-top > span { display: inline-flex; gap: 14px; }
.tt-tabs { display: inline-flex; gap: 9px; align-items: baseline; white-space: nowrap; }
.tt-tabs small { font-size: 12px; color: rgba(255, 255, 255, .7); font-weight: 600; }
.tt-tabs b { font-size: 13.5px; position: relative; }
.tt-tabs b::after { content: ""; position: absolute; left: 25%; right: 25%; bottom: -5px; height: 2.5px; border-radius: 2px; background: #fff; }
.mk-rail { position: absolute; right: 8px; bottom: 120px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 15px; }
.mk-rail .mk-btn small { font-size: 10.5px; font-weight: 600; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); max-width: 54px; text-align: center; line-height: 1.1; }
.mk-rail svg { width: 28px; height: 28px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45)); }
.mk-phone.tt .mk-rail svg { width: 32px; height: 32px; }
.mk-phone .mk-like.liked .on svg { color: #ff3040; }
.mk-phone.tt .mk-like.liked .on svg { color: #fe2c55; }
.mk-phone.yt .mk-like.liked .on svg, .mk-phone.fb .mk-like.liked .on svg { color: #fff; }
.mk-cover { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #fff; background: linear-gradient(135deg, #8a7357, #c9b08a); }
.tt-avatar { position: relative; margin-bottom: 6px; }
.tt-avatar .mk-avatar { width: 42px; height: 42px; box-shadow: 0 0 0 1.5px #fff; }
.tt-avatar i { position: absolute; left: 50%; bottom: -7px; translate: -50% 0; width: 18px; height: 18px; border-radius: 50%; background: #fe2c55;
  color: #fff; font-style: normal; font-weight: 700; display: grid; place-items: center; font-size: 14px; line-height: 1; }
.tt-disc { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(#333 45%, #111 46%);
  animation: mk-spin 6s linear infinite; }
@keyframes mk-spin { to { rotate: 360deg; } }
.mk-bottom { position: absolute; left: 0; right: 64px; bottom: 58px; z-index: 3; padding: 0 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .55); display: grid; gap: 5px; }
.mk-bottom p { margin: 0; font-size: 12.5px; white-space: pre-line; }
.mk-bottom.open { top: 35%; overflow-y: auto; background: linear-gradient(transparent, rgba(0, 0, 0, .75) 18%); padding-top: 24px; scrollbar-width: none; }
.mk-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mk-who strong { font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-who .mk-follow { flex: none; }
.mk-follow { border: 1px solid rgba(255, 255, 255, .8); border-radius: 8px; padding: 2px 9px; font-size: 12px; font-weight: 600; }
.yt-sub { background: #fff; color: #0f0f0f; border: 0; border-radius: 999px; padding: 5px 12px; text-shadow: none; }
.yt-sub.dark { background: #0f0f0f; color: #fff; margin-left: auto; }
.mk-sound { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; min-width: 0; }
.mk-sound svg { width: 14px; height: 14px; }
.mk-sound span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-more { cursor: pointer; font-weight: 600; opacity: .85; }
.tt-progress { position: absolute; left: 0; right: 0; bottom: 50px; height: 2px; background: rgba(255, 255, 255, .25); z-index: 3; }
.tt-progress i { display: block; width: 35%; height: 100%; background: #fff; }

/* menus du bas */
.mk-nav { margin-top: auto; flex: none; height: 50px; padding-bottom: 12px; display: flex; justify-content: space-around; align-items: center;
  background: #fff; border-top: 1px solid #efefef; position: relative; z-index: 4; color: #0f0f0f; }
.mk-nav.dark { background: #000; border-top-color: #1f1f1f; color: #fff; }
.mk-nav > span { display: flex; flex-direction: column; align-items: center; gap: 1px; opacity: .75; }
.mk-nav > span.on { opacity: 1; }
.mk-nav small { font-size: 8.5px; }
.mk-nav svg { width: 24px; height: 24px; }
.mk-phone.dark .mk-nav { position: absolute; left: 0; right: 0; bottom: 0; }
.tt-plus { display: inline-grid; place-items: center; width: 40px; height: 26px; border-radius: 8px; background: #fff; color: #000; font-size: 20px; font-weight: 700;
  box-shadow: -3px 0 0 #25f4ee, 3px 0 0 #fe2c55; }
.yt-plus svg { width: 34px; height: 34px; stroke-width: 1.2; }
.li-nav small { font-size: 8px; }

/* fils d'actualité */
.mk-scroll { flex: 1; overflow-y: auto; scrollbar-width: none; min-height: 0; }
.mk-scroll::-webkit-scrollbar { display: none; }
.mk-appbar { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; gap: 10px; }
.mk-appbar > span { display: inline-flex; gap: 14px; align-items: center; }
.ig-word { font: italic 600 22px/1 "Snell Roundhand", "Brush Script MT", "Segoe Script", cursive; display: inline-flex; align-items: center; gap: 3px; }
.ig-word svg { width: 14px; height: 14px; }
.ig-stories { display: flex; gap: 12px; padding: 6px 12px 10px; overflow: hidden; border-bottom: 1px solid #efefef; }
.ig-stories > span { display: grid; justify-items: center; gap: 4px; width: 58px; flex: none; }
.ig-stories .mk-avatar { width: 52px; height: 52px; font-size: 14px; }
.ig-stories .mk-avatar.ring { box-shadow: 0 0 0 2px #fff, 0 0 0 4.5px #d6249f; }
.ig-stories small { font-size: 10px; max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-head { display: flex; align-items: center; gap: 9px; padding: 8px 12px; }
.mk-head > span:not(.mk-avatar):not(.mk-dim):not(.mk-follow):not(.li-follow) { display: grid; line-height: 1.25; }
.mk-head small { color: #65676b; font-size: 11px; display: inline-flex; align-items: center; gap: 3px; }
.mk-head small svg { width: 11px; height: 11px; }
.mk-head .mk-dim { margin-left: auto; }
.mk-media { position: relative; background: #111; overflow: hidden; }
.mk-page { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; }
.mk-dots { display: inline-flex; gap: 4px; justify-content: center; }
.mk-dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.mk-dots i.on { background: #0095f6; }
.mk-dots.inline i { background: rgba(255, 255, 255, .5); } .mk-dots.inline i.on { background: #fff; }
.mk-actions { display: flex; align-items: center; gap: 14px; padding: 8px 12px 4px; }
.mk-actions .mk-btn { flex-direction: row; gap: 4px; }
.mk-actions .mk-btn small { font-size: 12.5px; font-weight: 600; }
.mk-actions .grow { flex: 1; display: flex; justify-content: center; }
.mk-text { padding: 2px 12px 8px; display: grid; gap: 3px; }
.mk-text p { margin: 0; white-space: pre-line; }
.mk-text h4 { margin: 0; font-size: 14.5px; line-height: 1.3; }
.mk-link { all: unset; cursor: pointer; color: #737373; font-size: 12.5px; }
.mk-note { margin: 4px 12px; font-size: 10.5px; color: #8a6d00; }
.mk-post { background: #fff; border-top: 6px solid #e4e6eb; }
.mk-phone.li .mk-scroll { background: #f4f2ee; }
.mk-phone.li .mk-post { border-top: 8px solid #f4f2ee; }
.mk-stats { display: flex; justify-content: space-between; padding: 8px 12px; color: #65676b; font-size: 11.5px; border-bottom: 1px solid #e4e6eb; }
.mk-stats .mk-link { font-size: 11.5px; color: inherit; }
.fb-reacts i, .li-reacts i { font-style: normal; font-size: 11px; margin-right: -3px; }
.mk-row { display: flex; justify-content: space-around; padding: 4px 6px 8px; color: #65676b; }
.mk-row .mk-btn { flex-direction: row; gap: 5px; padding: 6px 4px; font-weight: 600; }
.mk-row .mk-btn small { font-size: 11.5px; }
.mk-row svg { width: 19px; height: 19px; }
.mk-row .mk-like.liked { color: #0866ff; }
.mk-phone.li .mk-row { flex-wrap: nowrap; }
.mk-phone.li .mk-row .mk-btn { flex-direction: column; gap: 2px; }
.mk-phone.li .mk-row .mk-like.liked { color: #0a66c2; }
.fb-word { color: #0866ff; font: 700 25px/1 Helvetica, Arial, sans-serif; letter-spacing: -.5px; }
.mk-round { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #e4e6eb; }
.mk-round svg { width: 18px; height: 18px; }
.mk-tabs { display: flex; justify-content: space-around; border-bottom: 1px solid #e4e6eb; color: #65676b; }
.mk-tabs span { padding: 8px 0 7px; flex: 1; display: grid; place-items: center; }
.mk-tabs span.on { color: #0866ff; box-shadow: 0 -2.5px 0 #0866ff inset; }
.li-bar { background: #fff; }
.li-search { flex: 1; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 4px; background: #edf3f8; color: #56687a; font-size: 12px; }
.li-search svg { width: 15px; height: 15px; }
.li-follow { margin-left: auto; color: #0a66c2; font-weight: 700; font-size: 12.5px; }
.yt-player { width: 100%; }
.mk-time { position: absolute; right: 8px; bottom: 10px; background: rgba(0, 0, 0, .75); color: #fff; font-size: 10.5px; padding: 1px 4px; border-radius: 4px; }
.yt-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255, 255, 255, .35); }
.yt-bar i { display: block; width: 30%; height: 100%; background: #f00; }
.yt-chips { display: flex; gap: 8px; padding: 2px 12px 10px; overflow: hidden; }
.yt-pill { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #f2f2f2; font-weight: 600; font-size: 12px; }
.yt-pill svg { width: 18px; height: 18px; }
.yt-pill .mk-btn { flex-direction: row; gap: 5px; }
.yt-pill .mk-btn small { font-size: 12px; }
.yt-pill > i { width: 1px; height: 18px; background: #ccc; }
.yt-comments { all: unset; cursor: pointer; display: grid; gap: 6px; margin: 0 12px 10px; padding: 10px 12px; border-radius: 12px; background: #f2f2f2; font-size: 12px; }
.yt-comments span { display: flex; gap: 8px; align-items: center; }
.mk-desc { margin: 0 12px 12px; background: #f2f2f2; border-radius: 12px; padding: 8px 10px; font-size: 12px; }

/* commentaires (exemples) */
.mk-sheet { position: absolute; left: 0; right: 0; bottom: 0; max-height: 62%; z-index: 8; display: flex; flex-direction: column;
  background: #fff; color: #111; border-radius: 16px 16px 0 0; box-shadow: 0 -6px 20px rgba(0, 0, 0, .25); text-shadow: none; }
.mk-sheet[hidden] { display: none; }
.mk-grab { width: 36px; height: 4px; border-radius: 4px; background: #d0d0d0; margin: 7px auto 0; }
.mk-sheet header { display: flex; justify-content: center; align-items: center; position: relative; padding: 8px 10px 10px; border-bottom: 1px solid #eee; font-size: 13px; }
.mk-sheet header .mk-btn { position: absolute; right: 12px; font-size: 20px; line-height: 1; }
.mk-sheet ul { list-style: none; margin: 0; padding: 8px 12px; overflow-y: auto; display: grid; gap: 10px; }
.mk-sheet li { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; font-size: 12px; }
.mk-sheet li .mk-avatar { width: 26px; height: 26px; font-size: 9px; }
.mk-sheet li small { color: #8e8e8e; }
.mk-sheet li svg { width: 14px; height: 14px; color: #8e8e8e; }
.mk-sample { margin: 0; padding: 0 12px 4px; font-size: 10.5px; color: #8a6d00; }
.mk-input { margin: 4px 10px 22px; padding: 8px 12px; border: 1px solid #ddd; border-radius: 999px; color: #999; font-size: 12px; }
.mk-media img[data-mk-slide] { cursor: pointer; }

/* Publication : langue de la description, bouton « Générer », exemples de style */
.caption-tools { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; margin-bottom: .6rem; }
.lang-flags { display: inline-flex; gap: .35rem; flex-wrap: wrap; }
.flag-opt { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .55rem; border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  font-size: .78rem; font-weight: 600; color: var(--muted); background: var(--paper); }
.flag-opt input { position: absolute; opacity: 0; pointer-events: none; }
.flag-opt .flag { width: 22px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.flag-opt:has(input:checked) { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.flag-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.style-hint .notice.tip { background: var(--hover, var(--bg)); border-color: var(--line); color: var(--ink); align-items: center; flex-wrap: wrap; margin-bottom: .6rem; }
.style-hint .notice.tip > span { flex: 1 1 14rem; }
.style-hint .hint { display: flex; align-items: center; gap: .3rem; margin: 0 0 .5rem; }
.link-btn { all: unset; cursor: pointer; color: var(--accent); font-weight: 600; text-decoration: underline; }
.ro-locked { cursor: not-allowed; }
.cleanup-note { display: flex; gap: .3rem; align-items: center; flex-wrap: wrap; margin-top: .3rem; color: var(--muted); }
.cleanup-note .icon { width: 14px; height: 14px; }
.cleanup-form { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: flex-end; margin: .4rem 0 1rem; }
.cleanup-form .field { flex: 1 1 14rem; margin: 0; }
.cleanup-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tile small.up { color: var(--ok); } .tile small.down { color: var(--danger); }
.account-stats .tiles, .account-stats { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.account-stats .tile { padding: .4rem .6rem; min-width: 6rem; }
.account-stats .tile strong { font-size: 1rem; }
.ok-text { color: var(--ok); display: flex; gap: .3rem; align-items: center; }
.warn-text { color: var(--warn-ink); }
.net-opt { display: grid; gap: .5rem; margin-top: .8rem; padding: .8rem; border: 1px solid var(--line); border-radius: 12px; }
.net-opt > strong { display: flex; align-items: center; gap: .4rem; }
.net-checks { display: flex; flex-wrap: wrap; gap: .3rem 1rem; }

/* Pages publiques : politique de confidentialité, conditions d'utilisation (exigées par les réseaux) */
.legal-page { max-width: 760px; margin: 0 auto; padding: 32px 16px 64px; line-height: 1.6; }
.legal-page .brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--serif, Georgia, serif); font-size: 1.2rem; color: var(--ink); text-decoration: none; margin-bottom: 1.5rem; }
.legal-page .brand img { width: 28px; height: 28px; }
.legal-page h2 { margin-top: 1.6rem; font-size: 1.15rem; }

/* Paramètres en onglets ; choix de la période des statistiques (Comptes sociaux) */
.settings { margin-top: 1rem; }
.field.inline { display: flex; align-items: center; gap: .5rem; margin: 0; }
.field.inline label { margin: 0; white-space: nowrap; }
.field.inline select { width: auto; }
.storage-meter { height: 10px; border-radius: 6px; background: var(--hover); overflow: hidden; margin: .4rem 0 .2rem; }
.storage-meter > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.storage-meter.full > span { background: var(--danger, #c0392b); }

/* Carte de visite en image : à la fin des vidéos à la place du texte (profil, montage) */
.ct-mock.t-image .ct-card { width: auto; height: 74%; padding: 0; top: 46%; background: none; }
.ct-mock.t-image.horizontal .ct-card { height: 86%; top: 50%; }
.ct-mock.t-image img { display: block; height: 100%; width: auto; max-width: 86cqw; object-fit: contain; border-radius: 4px; }
.contact-card-row { display: flex; align-items: flex-end; gap: .8rem; flex-wrap: wrap; }
.contact-card-img { width: 110px; aspect-ratio: auto; border-radius: 8px; border: 1px solid var(--line); background: var(--hover); }
