/* BAT Review — feuille de style (identité IDF : noir / blanc, accent prune, Josefin Sans + Dosis)
   Les couleurs et polices sont des variables CSS surchargées depuis config.php (brand.*). */
:root {
  --c-primary: #111111;
  --c-accent: #590e54;
  --c-secondary: #002660;
  --c-bg: #f4f4f5;
  --c-surface: #ffffff;
  --c-border: #e4e4e7;
  --c-text: #1f1f23;
  --c-muted: #71717a;
  --c-ok: #1a7f37;
  --c-ok-bg: #e7f6ec;
  --c-warn: #b45309;
  --c-warn-bg: #fff4e0;
  --c-err: #b42318;
  --c-err-bg: #fdecea;
  --font-heading: 'Josefin Sans', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Dosis', 'Segoe UI', Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --accent-soft: color-mix(in srgb, var(--c-accent) 12%, white);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-body); font-weight: 500; font-size: 16px; line-height: 1.5; color: var(--c-text); background: var(--c-bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; letter-spacing: .01em; }
h1 { font-size: 1.7rem; text-transform: uppercase; }
h2 { font-size: 1.1rem; text-transform: uppercase; letter-spacing: .04em; }
h3 { font-size: 1rem; }
a { color: var(--c-accent); }
code { background: #f1f1f3; padding: 1px 5px; border-radius: 4px; font-size: .9em; }
small, .small { font-size: .85rem; }
.muted { color: var(--c-muted); }
.hidden { display: none !important; }
.strong { font-weight: 700; color: var(--c-text); text-decoration: none; }
.strong:hover { color: var(--c-accent); }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; font: 600 .95rem/1 var(--font-body); letter-spacing: .02em;
  padding: .65em 1.1em; border-radius: 7px; border: 1px solid var(--c-border); background: #fff; color: var(--c-text); cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s, color .15s, opacity .15s; white-space: nowrap; }
.btn:hover { border-color: #c9c9cf; background: #fafafa; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }
.btn-success { background: var(--c-ok); border-color: var(--c-ok); color: #fff; }
.btn-success:hover { background: #136a2c; border-color: #136a2c; color: #fff; }
.btn-warn { background: #fff; border-color: #f0c78a; color: var(--c-warn); }
.btn-warn:hover { background: var(--c-warn-bg); }
.btn-danger { background: var(--c-err); border-color: var(--c-err); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); border-color: transparent; }
.btn-ghost.danger { color: var(--c-err); }
.btn-sm { font-size: .85rem; padding: .5em .8em; }
.btn-block { width: 100%; }
.linklike, .linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--c-accent); cursor: pointer; }
.linkbtn { font-size: .85rem; font-weight: 600; }
.linkbtn:hover, .linklike:hover { text-decoration: underline; }
.linkbtn.danger { color: var(--c-err); }
.icon-btn { width: 32px; height: 32px; border-radius: 7px; border: 1px solid var(--c-border); background: #fff; font-size: 1.2rem; line-height: 1; cursor: pointer; color: var(--c-text); }
.icon-btn:hover:not(:disabled) { background: #f4f4f5; }
.icon-btn:disabled { opacity: .35; cursor: default; }

/* Badges */
.badge { display: inline-block; padding: .3em .7em; border-radius: 999px; font: 700 .75rem/1.2 var(--font-body); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.badge-en_attente { background: #eef0f4; color: #3f4451; }
.badge-modifications { background: var(--c-warn-bg); color: var(--c-warn); }
.badge-valide { background: var(--c-ok); color: #fff; }
.tag { display: inline-block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: .15em .5em; border-radius: 4px; background: #f1f1f3; color: var(--c-muted); }
.tag-accent { background: var(--c-accent); color: #fff; }
.chip { font-size: .75rem; font-weight: 700; padding: .15em .55em; border-radius: 999px; }
.chip-ok { background: var(--c-ok-bg); color: var(--c-ok); }
.count { display: inline-block; min-width: 1.6em; text-align: center; padding: .1em .45em; border-radius: 999px; background: var(--c-accent); color: #fff; font-weight: 700; font-size: .85rem; }

/* Alertes */
.alert { padding: .8em 1em; border-radius: 8px; margin: 0 0 1rem; border: 1px solid transparent; }
.alert ul { margin: .4em 0 0; padding-left: 1.2em; }
.alert-ok { background: var(--c-ok-bg); color: #14532d; border-color: #bfe5cb; }
.alert-error { background: var(--c-err-bg); color: var(--c-err); border-color: #f6c7c2; }
.alert-warn { background: var(--c-warn-bg); color: #7c3f06; border-color: #f3d5a4; }

/* Mise en page admin */
.topbar { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 20; }
.topbar::after { content: ''; display: block; height: 3px; background: var(--c-accent); }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: .7rem 1.25rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--c-text); }
.brand img { height: 30px; width: auto; display: block; }
.brand span { font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; color: var(--c-muted); border-left: 1px solid var(--c-border); padding-left: .9rem; }
.topnav { display: flex; align-items: center; gap: 1.2rem; }
.topnav a, .topnav .linklike { color: var(--c-text); text-decoration: none; font-weight: 600; }
.topnav a.active { color: var(--c-accent); }
.topnav form { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.container.narrow { max-width: 780px; }
.foot { text-align: center; color: var(--c-muted); font-size: .8rem; padding: 1rem 0 2rem; }
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); padding: 1.25rem 1.4rem; margin-bottom: 1.25rem; box-shadow: var(--shadow); }
.card.empty { text-align: center; padding: 2.5rem 1rem; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-head h1 { margin-bottom: .2rem; }
.page-head p { margin: 0; }
.head-actions { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.crumbs { margin: 0 0 .5rem; font-size: .9rem; }
.crumbs a { color: var(--c-muted); text-decoration: none; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 1.25rem; align-items: start; }
.row-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .75rem; }
.row-actions form { margin: 0; }
.copy-row { display: flex; gap: .5rem; }
.copy-row input { flex: 1; font-family: ui-monospace, Menlo, monospace; font-size: .85rem; }
.filters { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.filters input[type=search] { flex: 1; min-width: 220px; }
.danger-zone { border-color: #f3cfcb; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th { text-align: left; font: 700 .72rem/1.2 var(--font-heading); text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); padding: .9rem 1rem; border-bottom: 1px solid var(--c-border); white-space: nowrap; }
.table td { padding: .8rem 1rem; border-bottom: 1px solid #f0f0f2; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fcfcfd; }
.table .actions { text-align: right; white-space: nowrap; }
.table .actions > * { margin-left: .25rem; }
.table .actions form { display: inline; }
.card .table th:first-child, .card .table td:first-child { padding-left: 0; }
.card.table-wrap .table th:first-child, .card.table-wrap .table td:first-child { padding-left: 1.4rem; }
.table.checks td { padding: .45rem .5rem; }

/* Formulaires */
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .85rem; }
.form label small { display: block; font-weight: 500; color: var(--c-muted); margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), textarea, select {
  display: block; width: 100%; margin-top: .3rem; padding: .62em .75em; border: 1px solid #d4d4d8; border-radius: 7px;
  font: 500 .95rem/1.35 var(--font-body); color: var(--c-text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.filters input, .filters select, .copy-row input, .inline-form select, .vw-version select, .pg-info select { margin-top: 0; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 60px; height: 38px; padding: 2px; border: 1px solid #d4d4d8; border-radius: 7px; display: block; margin-top: .3rem; }
textarea { resize: vertical; min-height: 64px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.grid2 .span2 { grid-column: span 2; }
.form h2 { margin-top: 1.2rem; }
.form h2:first-child { margin-top: 0; }
label.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 500; }
label.check input { margin-top: .3rem; width: 18px; height: 18px; accent-color: var(--c-ok); flex: none; }
.inline-form { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.upload-form { border-top: 1px solid var(--c-border); margin-top: 1.25rem; padding-top: 1.1rem; }
.dropzone { display: block; position: relative; border: 2px dashed #d4d4d8; border-radius: var(--radius); padding: 1.6rem 1rem; text-align: center; color: var(--c-muted); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--c-accent); background: var(--accent-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--c-ok); color: var(--c-text); background: var(--c-ok-bg); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* Connexion / accueil */
.login-wrap { display: grid; place-items: center; min-height: 60vh; }
.login-card { width: 100%; max-width: 380px; text-align: center; padding: 2rem; }
.login-card label { text-align: left; }
.login-logo { height: 48px; margin-bottom: 1rem; }
.landing { min-height: 100vh; display: grid; place-items: center; background: var(--c-primary); color: #fff; padding: 1rem; }
.landing-box { max-width: 520px; text-align: center; }
.landing-logo { height: 70px; filter: invert(1); margin-bottom: 1.2rem; }
.landing .muted { color: #a1a1aa; }
.landing .btn-ghost { color: #d4d4d8; }

/* ================================================================== */
/* Visionneuse                                                        */
/* ================================================================== */
.viewer-body { overflow: hidden; }
.viewer { height: 100vh; height: 100dvh; display: flex; flex-direction: column; }
.vw-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .55rem 1rem; background: #fff; border-bottom: 1px solid var(--c-border); box-shadow: inset 0 -3px 0 var(--c-accent); flex-wrap: wrap; }
.vw-brand { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.vw-brand img { height: 28px; display: block; }
.vw-title { display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--c-border); padding-left: .9rem; line-height: 1.2; }
.vw-title strong { font-family: var(--font-heading); text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.vw-title small { color: var(--c-muted); }
.vw-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.vw-version { display: flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--c-muted); }
.vw-version select { width: auto; padding: .4em .6em; font-size: .85rem; }
.vw-banner .bn { padding: .55rem 1rem; font-size: .92rem; border-bottom: 1px solid var(--c-border); }
.bn-ok { background: var(--c-ok-bg); color: #14532d; }
.bn-warn { background: var(--c-warn-bg); color: #7c3f06; }
.bn-info { background: #eef2ff; color: #1e3a8a; }
.bn-note { background: #fff; color: var(--c-text); }
.vw-main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 380px; min-height: 0; }
.vw-stage-wrap { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #e9e9ec; }
.vw-toolbar { display: flex; align-items: center; gap: 1rem; padding: .45rem .8rem; background: #fafafa; border-bottom: 1px solid var(--c-border); flex-wrap: wrap; }
.tb-group { display: flex; align-items: center; gap: .35rem; }
.pg-info { font-size: .9rem; display: flex; align-items: center; gap: .35rem; }
.pg-info select { width: auto; padding: .3em .4em; font-size: .9rem; }
.zm-val { min-width: 54px; text-align: center; font-size: .9rem; font-variant-numeric: tabular-nums; }
.tb-hint { margin-left: auto; font-size: .82rem; color: var(--c-muted); }
.vw-stage { flex: 1; overflow: auto; position: relative; padding: 24px; display: flex; }
.vw-page { position: relative; margin: auto; flex: none; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.12); }
.vw-page canvas, .vw-page img { display: block; user-select: none; -webkit-user-drag: none; }
.vw-overlay { position: absolute; inset: 0; cursor: crosshair; touch-action: manipulation; }
.vw-overlay.locked { cursor: default; }
.vw-loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--c-muted); font-weight: 600; pointer-events: none; text-align: center; padding: 1rem; }

/* Repères */
.pin-num { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 999px; background: var(--c-accent); color: #fff; font: 700 .78rem/1 var(--font-body); box-shadow: 0 0 0 2px #fff, 0 2px 6px rgba(0,0,0,.3); }
.pin-num.general { background: #71717a; }
.pin { position: absolute; transform: translate(-50%, -50%); cursor: pointer; z-index: 2; transition: transform .12s; }
.pin .pin-num { min-width: 28px; height: 28px; font-size: .85rem; }
.area { position: absolute; border: 2px solid var(--c-accent); background: color-mix(in srgb, var(--c-accent) 10%, transparent); border-radius: 3px; cursor: pointer; z-index: 1; transition: background .12s; }
.area .pin-num { position: absolute; left: -12px; top: -12px; }
.pin.resolved .pin-num, .area.resolved .pin-num { background: var(--c-ok); }
.area.resolved { border-color: var(--c-ok); background: color-mix(in srgb, var(--c-ok) 8%, transparent); border-style: dashed; }
.pin.hl, .pin.active { transform: translate(-50%, -50%) scale(1.25); z-index: 5; }
.area.hl, .area.active { background: color-mix(in srgb, var(--c-accent) 22%, transparent); z-index: 4; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c-accent); }
.pin.draft .pin-num, .area.draft .pin-num { background: var(--c-secondary); }
.area.draft { border-style: dashed; border-color: var(--c-secondary); }
.band { position: absolute; border: 2px dashed var(--c-secondary); background: color-mix(in srgb, var(--c-secondary) 10%, transparent); pointer-events: none; }
.pulse .pin-num { animation: pulse 1s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 0 color-mix(in srgb, var(--c-accent) 70%, transparent); } 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 18px transparent; } }

/* Panneau latéral */
.vw-side { display: flex; flex-direction: column; background: #fff; border-left: 1px solid var(--c-border); min-height: 0; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .8rem 1rem .4rem; }
.side-head h2 { margin: 0; font-size: .95rem; }
.side-filters { display: flex; gap: .25rem; padding: .2rem 1rem .6rem; border-bottom: 1px solid var(--c-border); }
.side-filters button { border: 0; background: none; padding: .35rem .65rem; border-radius: 999px; font: 600 .85rem var(--font-body); color: var(--c-muted); cursor: pointer; }
.side-filters button span { display: inline-block; min-width: 1.4em; padding: 0 .35em; margin-left: .2em; border-radius: 999px; background: #f1f1f3; font-size: .75rem; }
.side-filters button.active { background: var(--c-primary); color: #fff; }
.side-filters button.active span { background: rgba(255,255,255,.2); }
#composer-slot:not(:empty) { padding: .8rem 1rem; border-bottom: 1px solid var(--c-border); background: #fafafe; }
.threads { flex: 1; overflow-y: auto; padding: .6rem .7rem 1rem; }
.empty-side { text-align: center; color: var(--c-muted); padding: 2rem 1rem; }
.side-foot { padding: .6rem 1rem; border-top: 1px solid var(--c-border); font-size: .85rem; color: var(--c-muted); }
.side-foot:empty { display: none; }
.thread { border: 1px solid var(--c-border); border-radius: var(--radius); padding: .7rem .8rem; margin-bottom: .6rem; background: #fff; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.thread.hl { border-color: color-mix(in srgb, var(--c-accent) 45%, white); }
.thread.active { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.thread.resolved { background: #fbfbfb; }
.thread.resolved .cmt-body { color: var(--c-muted); }
.thread-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.thread.resolved .thread-head .pin-num { background: var(--c-ok); }
.t-where { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-muted); flex: 1; }
.cmt { padding: .35rem 0; }
.cmt + .cmt { border-top: 1px dashed #ececef; margin-top: .25rem; padding-top: .55rem; }
.cmt-head { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; font-size: .9rem; }
.cmt-head time { margin-left: auto; font-size: .75rem; color: var(--c-muted); }
.cmt-body { font-size: .95rem; margin-top: .15rem; word-wrap: break-word; overflow-wrap: anywhere; }
.atts { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.att-thumb { display: block; width: 74px; height: 74px; border-radius: 6px; overflow: hidden; border: 1px solid var(--c-border); background: #f4f4f5; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file { display: flex; align-items: center; gap: .45rem; max-width: 100%; padding: .35rem .55rem; border: 1px solid var(--c-border); border-radius: 6px; text-decoration: none; color: var(--c-text); font-size: .85rem; background: #fafafa; }
.att-file:hover { border-color: var(--c-accent); }
.att-file .ext { font-weight: 700; font-size: .68rem; padding: .2em .4em; border-radius: 3px; background: var(--c-primary); color: #fff; }
.att-file .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 170px; }
.att-file small { color: var(--c-muted); }
.thread-actions { display: flex; gap: .9rem; margin-top: .4rem; }
.reply-slot:not(:empty) { margin-top: .6rem; }
.composer { cursor: default; }
.composer-head { font-weight: 700; display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .92rem; }
.composer-head small { font-weight: 500; color: var(--c-muted); }
.composer textarea { margin-top: 0; }
.composer.dragging textarea { border-color: var(--c-accent); background: var(--accent-soft); }
.composer-actions { display: flex; align-items: center; gap: .35rem; margin-top: .5rem; }
.composer-actions .spacer { flex: 1; }
.attach-btn { cursor: pointer; padding-left: .3rem; }
.file-list { display: flex; flex-wrap: wrap; gap: .3rem; }
.file-list:not(:empty) { margin-top: .45rem; }
.file-chip { display: inline-flex; align-items: center; gap: .3rem; background: #f1f1f3; border-radius: 999px; padding: .15rem .3rem .15rem .65rem; font-size: .8rem; max-width: 100%; }
.file-chip button { border: 0; background: #d4d4d8; color: #fff; width: 18px; height: 18px; border-radius: 50%; cursor: pointer; line-height: 1; padding: 0; }
.progress { height: 4px; background: #eee; border-radius: 4px; margin-top: .5rem; overflow: hidden; }
.progress div { height: 100%; width: 0; background: var(--c-accent); transition: width .2s; }

/* Modale & toast */
.modal { position: fixed; inset: 0; background: rgba(17,17,17,.55); display: grid; place-items: center; z-index: 100; padding: 1rem; }
.modal-box { position: relative; background: #fff; border-radius: 14px; padding: 1.6rem 1.6rem 1.3rem; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal-close { position: absolute; top: .6rem; right: .8rem; border: 0; background: none; font-size: 1.6rem; color: var(--c-muted); cursor: pointer; line-height: 1; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
.done { text-align: center; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--c-ok); color: #fff; font-size: 2rem; display: grid; place-items: center; margin: .3rem auto 1rem; }
.done .modal-actions { justify-content: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--c-primary); color: #fff; padding: .7rem 1.1rem; border-radius: 8px; z-index: 200; box-shadow: 0 8px 24px rgba(0,0,0,.25); font-weight: 600; max-width: 90vw; }
.toast-error { background: var(--c-err); }
.toast-warn { background: var(--c-warn); }

/* Responsive */
@media (max-width: 980px) {
  .cols { grid-template-columns: 1fr; }
  .vw-main { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 42%); }
  .vw-side { border-left: 0; border-top: 1px solid var(--c-border); }
  .tb-hint { display: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 1.35rem; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2 { grid-column: auto; }
  .brand span { display: none; }
  .vw-top { padding: .5rem .7rem; gap: .5rem; }
  .vw-title strong { max-width: 55vw; }
  .vw-actions { width: 100%; }
  .vw-actions .btn { flex: 1; }
  .vw-version { width: 100%; }
  .vw-version select { flex: 1; }
  .vw-stage { padding: 12px; }
  .table .actions { white-space: normal; }
}

/* ---- v1.1 : repères déplaçables / redimensionnables ---- */
.pin.movable, .area.movable { cursor: grab; }
.pin.movable { touch-action: none; }
.area.draft, .area.movable.active, .area.movable.editing { touch-action: none; }
.pin.dragging, .area.dragging { cursor: grabbing; transition: none; z-index: 10; }
.pin.dragging { transform: translate(-50%, -50%) scale(1.3); }
.pin.dragging .pin-num, .area.dragging .pin-num { box-shadow: 0 0 0 2px #fff, 0 6px 16px rgba(0,0,0,.35); }
.pin.editing .pin-num, .area.editing .pin-num { background: var(--c-secondary); }
.area.editing { border-style: dashed; border-color: var(--c-secondary); }
.handle { position: absolute; width: 14px; height: 14px; background: #fff; border: 2px solid var(--c-secondary); border-radius: 3px; z-index: 3; touch-action: none; }
.area:not(.draft):not(.editing) .handle { border-color: var(--c-accent); }
.h-nw { left: -8px; top: -8px; cursor: nwse-resize; }
.h-se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.h-ne { right: -8px; top: -8px; cursor: nesw-resize; }
.h-sw { left: -8px; bottom: -8px; cursor: nesw-resize; }
.area.has-handles .pin-num { left: 10px; top: -13px; }
@media (pointer: coarse) { .handle { width: 22px; height: 22px; } .h-nw, .h-ne { top: -12px; } .h-sw, .h-se { bottom: -12px; } .h-nw, .h-sw { left: -12px; } .h-ne, .h-se { right: -12px; } }
.composer-tip { display: block; width: 100%; font-weight: 500; font-size: .78rem; color: var(--c-secondary); }
.composer-head { flex-wrap: wrap; }
.move-tip { margin: .35rem 0 0; font-size: .78rem; color: var(--c-secondary); }
.cmt-edit { font-size: .78rem; margin-top: .15rem; }
.cmt-editor textarea { margin-top: .2rem; }
/* Zones visibles aussi sur des mises en page sombres */
.area { box-shadow: 0 0 0 1px rgba(255,255,255,.85), inset 0 0 0 1px rgba(255,255,255,.5); }
