:root {
  --bg: var(--mx-bg);
  --bg-2: var(--mx-bg2, #292929);
  --panel: var(--mx-panel);
  --panel-2: var(--mx-panel2, #424242);
  --panel-3: color-mix(in srgb, var(--mx-panel) 50%, black);
  --line: var(--mx-border);
  --text: var(--mx-text);
  --muted: var(--mx-muted);
  --muted-2: color-mix(in srgb, var(--mx-muted) 80%, transparent);
  --accent: var(--mx-accent);
  --accent-2: var(--mx-accent2);
  --danger: #d56a5f;
  --warn: #f2b35d;
  --shadow: var(--mx-shadow, 0 18px 50px rgba(0,0,0,.28));
  --radius: 14px;
  --sidebar: 286px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { width: 100%; height: 100%; min-height: 100%; margin: 0; background: var(--bg); color: var(--text); }
body { overflow: hidden; }
a { color: inherit; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { opacity: .45; cursor: not-allowed; }

.app {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  max-height: 100dvh;
  display: grid;
  grid-template-rows: 52px minmax(0, 1fr) auto 24px;
  overflow: hidden;
}

.manoux-header {
  height: 52px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(35,35,35,.94);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 20;
}
.manoux-header .logo { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 999px; text-decoration: none; }
.manoux-header .logo img { width: 34px; height: 34px; object-fit: contain; display: block; }
.tool-heading { min-width: 0; line-height: 1.05; }
.tool-heading h1 { margin: 0; font-size: 1rem; letter-spacing: .02em; color: var(--text); }
.tool-heading p { margin: 3px 0 0; color: var(--accent-2); font-size: .64rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.manoux-header nav { display: flex; align-items: center; gap: 8px; }
.btn, .icon-btn, .manoux-header .btn {
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 32px;
  color: var(--text);
  background: rgba(255,255,255,.052);
  font-size: .7rem;
  font-weight: 850;
  padding: 0 10px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.manoux-header .btn { border-radius: 999px; white-space: nowrap; }
.manoux-header .btn-manoux { border-color: rgba(151,175,30,.46); color: var(--accent-2); }
.manoux-header .btn-manoux img { width: 18px; height: 18px; object-fit: contain; }
.btn.primary { color: #1f2312; background: linear-gradient(180deg, var(--accent-2), var(--accent)); border-color: rgba(198,223,77,.7); }
.btn.secondary:hover, .icon-btn:hover { border-color: rgba(198,223,77,.4); background: rgba(151,175,30,.13); }
.btn.danger { color: #fff; border-color: rgba(213,106,95,.48); background: rgba(213,106,95,.16); }
.btn.full { width: 100%; }
.btn.mini { min-height: 28px; padding: 0 9px; border-radius: 9px; font-size: .7rem; }
.icon-btn { width: 30px; min-height: 28px; padding: 0; font-size: 1.1rem; }

.layout {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  gap: 8px;
  padding: 8px;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}
.sidebar {
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  padding-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  scrollbar-width: thin;
}
.card { background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025)); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12); }
.section-title { color: var(--accent-2); text-transform: uppercase; font-size: .64rem; letter-spacing: .14em; font-weight: 850; margin-bottom: 7px; }
.section-title.tight { margin-top: 9px; }
.section-title.no-margin { margin: 0; }
.section-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.count-pill, .tag { min-width: 22px; padding: 3px 7px; border-radius: 999px; background: rgba(198,223,77,.12); color: var(--accent-2); border: 1px solid rgba(198,223,77,.2); font-size: .66rem; font-weight: 850; text-align: center; text-transform: uppercase; letter-spacing: .08em; }
.tag.is-live { color: var(--accent-2); border-color: rgba(198,223,77,.32); }
.tag.is-idle { color: var(--muted); }
.tag.is-warn { color: var(--warn); border-color: rgba(242,179,93,.35); }

.photo-summary { display: grid; grid-template-columns: 70px minmax(0, 1fr); gap: 8px; align-items: stretch; }
.photo-thumb-wrap { min-height: 72px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: rgba(255,255,255,.04); display: grid; place-items: center; }
.photo-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-thumb-placeholder { padding: 10px; color: var(--muted-2); font-size: .64rem; text-align: center; }
.photo-meta-grid { display: grid; gap: 5px; min-width: 0; }
.meta-pair-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.meta-block { min-width: 0; padding: 5px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.meta-label { display: block; margin-bottom: 3px; color: var(--muted-2); font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.meta-block strong { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; color: var(--text); }
.photo-actions, .detect-btn { margin-top: 6px; }
.helper { margin: 5px 0 0; color: var(--warn); font-size: .67rem; line-height: 1.25; }
.photo-helper { color: var(--muted); }

.preset-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.preset { min-height: 28px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.045); color: var(--text); font-weight: 750; font-size: .7rem; padding: 0 7px; }
.preset:hover, .preset.is-active { border-color: rgba(198,223,77,.55); background: rgba(151,175,30,.14); }
.preset.wide { grid-column: 1 / -1; }

.section-title { font-size: .72rem; margin-bottom: 5px; }
.section-title.tight { margin-top: 3px; }
.segmented label { min-height: 28px; padding: 5px 7px; font-size: .7rem; }
.control-grid { display: grid; gap: 5px; }
.range-row { gap: 5px; }
.range-row span { font-size: .68rem; }
.range-row output { font-size: .67rem; }
.btn { min-height: 30px; padding: 0 10px; font-size: .72rem; }
.btn.mini { min-height: 28px; padding: 0 8px; font-size: .7rem; }
.icon-btn { width: 28px; height: 28px; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented.vertical { grid-template-columns: 1fr; }
.segmented label { display: block; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { min-height: 28px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.045); color: var(--muted); font-size: .7rem; font-weight: 800; padding: 0 7px; }
.segmented input:checked + span { border-color: rgba(198,223,77,.65); color: var(--accent-2); background: rgba(151,175,30,.13); box-shadow: inset 0 0 0 1px rgba(198,223,77,.1); }
.segmented.vertical span { justify-content: flex-start; }

.control-grid { display: grid; gap: 7px; margin-top: 6px; }
.range-row, .select-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 50px; align-items: center; gap: 7px; font-size: .7rem; color: var(--muted); }
.range-row output { color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.select-row { grid-template-columns: 78px minmax(0, 1fr); }
.mini-select { grid-template-columns: 66px minmax(0, 1fr); }
input[type="range"] { accent-color: var(--accent-2); min-width: 0; }
select { min-height: 28px; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: #252525; color: var(--text); padding: 0 7px; font-size: .7rem; }
.button-grid { display: grid; gap: 6px; margin-top: 6px; }
.compact-buttons, .export-buttons { grid-template-columns: 1fr 1fr; }
.legal-note { margin: 6px 0 0; color: var(--muted-2); font-size: .62rem; line-height: 1.22; }
.export-card {
  position: sticky;
  top: 0;
  z-index: 4;
  border-color: rgba(198,223,77,.22);
  box-shadow: 0 10px 28px rgba(0,0,0,.20);
}
.export-card .section-line { margin-bottom: 4px; }
.export-card .range-row { gap: 6px; }
.export-card .button-grid { margin-top: 7px; }

.mask-list { display: grid; gap: 5px; max-height: 96px; overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.mask-list.empty { color: var(--muted-2); font-size: .7rem; }
.mask-item { display: grid; grid-template-columns: 1fr auto; gap: 6px; align-items: center; width: 100%; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); color: var(--muted); padding: 5px 6px; text-align: left; }
.mask-item strong { display: block; color: var(--text); font-size: .7rem; }
.mask-item small { display: block; color: var(--muted-2); font-size: .62rem; }
.mask-item.is-selected { border-color: rgba(198,223,77,.62); background: rgba(151,175,30,.13); }
.mask-delete { width: 22px; height: 22px; border-radius: 8px; border: 1px solid rgba(213,106,95,.35); background: rgba(213,106,95,.12); color: var(--text); font-weight: 900; }
.mask-edit-row { margin-top: 7px; }

.workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 38px auto minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(36,36,36,.52); overflow: hidden; }
.workspace-toolbar { min-height: 38px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; border-bottom: 1px solid var(--line); background: rgba(0,0,0,.13); flex-wrap: wrap; }
.zoom-tools, .preview-tools, .stage-actions { display: flex; align-items: center; gap: 7px; min-width: 0; }
.stage-actions { margin-left: auto; }
.stage-actions .btn { min-width: 78px; }
.stage-actions .btn.secondary { border-color: rgba(198,223,77,.34); color: var(--accent-2); background: rgba(151,175,30,.08); }
.zoom-tools input { width: min(210px, 20vw); }
.zoom-value { min-width: 42px; text-align: right; color: var(--muted); font-size: .7rem; font-variant-numeric: tabular-nums; }
.toggle-line { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: .7rem; white-space: nowrap; }
.toggle-line input, .checks input { accent-color: var(--accent-2); }
.compare-bar { min-height: 28px; display: grid; grid-template-columns: auto minmax(120px, 1fr) auto; gap: 8px; align-items: center; padding: 4px 9px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .7rem; background: rgba(151,175,30,.07); }

.stage-shell { min-height: 0; overflow: auto; display: grid; place-items: center; padding: 10px; position: relative; background: linear-gradient(45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(-45deg, rgba(255,255,255,.025) 25%, transparent 25%), linear-gradient(45deg, transparent 75%, rgba(255,255,255,.025) 75%), linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.025) 75%); background-size: 28px 28px; background-position: 0 0, 0 14px, 14px -14px, -14px 0; }
.stage-shell.dragover { box-shadow: inset 0 0 0 3px rgba(198,223,77,.48), inset 0 0 90px rgba(151,175,30,.10); }
.drop-overlay { position: absolute; inset: 0; z-index: 12; display: grid; place-items: center; background: rgba(22,22,22,.52); backdrop-filter: blur(2px); pointer-events: none; }
.drop-overlay-card { display: grid; place-items: center; gap: 6px; width: min(100%, 420px); padding: 22px; border-radius: 18px; border: 2px dashed rgba(198,223,77,.86); background: rgba(51,51,51,.92); box-shadow: 0 24px 80px rgba(0,0,0,.34), 0 0 0 8px rgba(198,223,77,.08); text-align: center; }
.drop-overlay-icon, .empty-arrow { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: linear-gradient(180deg, var(--accent-2), var(--accent)); color: #1f2312; font-weight: 900; font-size: 1.15rem; }
.empty-state { display: grid; place-items: center; text-align: center; gap: 4px; width: min(100%, 460px); max-width: 460px; padding: 20px 18px; color: var(--muted); border: 1.5px dashed rgba(198,223,77,.52); border-radius: 18px; background: rgba(51,51,51,.76); box-shadow: 0 18px 46px rgba(0,0,0,.18); cursor: pointer; }
.empty-state.dragover { background: rgba(151,175,30,.16); border-color: var(--accent-2); transform: translateY(-1px); box-shadow: 0 22px 58px rgba(0,0,0,.22); }
.empty-state img { width: 70px; height: 70px; object-fit: contain; opacity: .88; margin-bottom: 4px; }
.empty-state h2 { margin: 0; color: var(--text); font-size: 1.05rem; }
.empty-state p { margin: 0 0 6px; font-size: .82rem; line-height: 1.35; max-width: 46ch; }
.empty-state strong { color: var(--text); font-size: .92rem; }
.empty-state small, .drop-overlay small { color: var(--muted); font-size: .7rem; }
.drop-overlay strong { color: var(--text); font-size: .96rem; }
.canvas-stack { position: relative; max-width: none; max-height: none; box-shadow: var(--shadow); line-height: 0; background: #fff; touch-action: none; }
.canvas-stack canvas { position: absolute; inset: 0; image-rendering: auto; }
#imageCanvas { z-index: 1; }
#originalCanvas { z-index: 2; opacity: 0; pointer-events: none; transition: opacity .12s ease; }
#originalCanvas.visible { opacity: 1; }
#overlayCanvas { z-index: 3; cursor: crosshair; }
body.tool-edit #overlayCanvas { cursor: default; }
body.tool-drag #overlayCanvas { cursor: move; }
.loupe { position: fixed; z-index: 50; width: 160px; height: 160px; border-radius: 50%; border: 3px solid var(--accent-2); box-shadow: 0 16px 48px rgba(0,0,0,.35); background: #fff; pointer-events: none; }

@keyframes imageIn { from { opacity: 0; transform: scale(.985) translateY(6px); filter: blur(2px); } to { opacity: 1; transform: scale(1) translateY(0); filter: blur(0); } }
.canvas-stack.image-appear { animation: imageIn .28s ease-out both; }
@keyframes statusPulse { 0% { color: var(--accent-2); transform: translateY(0); } 40% { color: var(--text); transform: translateY(-1px); } 100% { color: var(--muted); transform: translateY(0); } }
.status.is-updated { animation: statusPulse .55s ease; }
.toast { position: absolute; right: 18px; bottom: 18px; z-index: 30; max-width: min(420px, calc(100% - 36px)); padding: 9px 12px; border-radius: 999px; border: 1px solid rgba(198,223,77,.34); background: rgba(36,36,36,.94); color: var(--text); box-shadow: 0 18px 48px rgba(0,0,0,.28); font-size: .7rem; font-weight: 800; backdrop-filter: blur(10px); animation: toastIn .22s ease-out both; }
.toast.success { border-color: rgba(198,223,77,.55); color: var(--accent-2); }
.toast.warn { border-color: rgba(242,179,93,.62); color: var(--warn); }
.toast.danger { border-color: rgba(213,106,95,.62); color: #fff; }
@keyframes toastIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.bottom-panel { min-height: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 6px 8px 4px; border-top: 1px solid var(--line); background: rgba(0,0,0,.14); align-items: start; }
.rgpd-box { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); padding: 5px 8px; max-height: 112px; overflow: auto; scrollbar-width: thin; }
.rgpd-box summary { cursor: pointer; color: var(--accent-2); font-weight: 850; font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.rgpd-box summary small { color: var(--muted-2); font-size: .62rem; letter-spacing: .02em; text-transform: none; }
.profile-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 3px; color: var(--muted); font-size: .7rem; }
.profile-row select { width: 150px; min-height: 26px; }
.checks { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 3px 8px; margin: 3px 0 3px; }
.checks label { font-size: .64rem; color: var(--muted); display: flex; gap: 6px; align-items: flex-start; }
.rgpd-box p { margin: 4px 0 0; color: var(--muted-2); font-size: .62rem; line-height: 1.25; }
.status { display: flex; align-items: center; justify-content: flex-end; color: var(--muted); font-size: .7rem; text-align: right; min-width: 0; white-space: nowrap; padding: 4px 0; }
.manoux-footer { border-top: 1px solid var(--line); padding: 4px 12px; color: var(--muted-2); font-size: .66rem; text-align: center; background: rgba(35,35,35,.9); }
.is-busy * { cursor: progress !important; }

@media (max-width: 1180px) {
  :root { --sidebar: 292px; }
  .tool-heading p { display: none; }
  .checks { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
}
@media (max-width: 880px) {
  body { overflow: auto; }
  .app { height: auto; min-height: 100vh; max-height: none; grid-template-rows: auto auto auto auto; overflow: visible; }
  .manoux-header { height: auto; grid-template-columns: auto minmax(0, 1fr); }
  .manoux-header nav { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; }
  .layout { grid-template-columns: 1fr; height: auto; overflow: visible; }
  .sidebar { height: auto; max-height: none; overflow: visible; }
  .workspace { min-height: 70vh; grid-template-rows: auto auto 65vh; }
  .bottom-panel { grid-template-columns: 1fr; }
  .rgpd-box { max-height: none; }
  .checks { grid-template-columns: 1fr; }
  .zoom-tools input { width: 130px; }
  .photo-summary { grid-template-columns: 72px minmax(0,1fr); }
  .stage-actions { width: 100%; justify-content: flex-end; margin-left: 0; }
  .toast { bottom: 120px; right: 12px; left: 12px; max-width: none; border-radius: 14px; }
}

.tools-card .button-grid.compact-buttons { grid-template-columns: 1fr 1fr; }
.tools-card .button-grid .btn { min-width: 0; }
.sidebar .card:last-child { margin-bottom: 2px; }


/* v2.4.4 — onglets compacts colonne gauche */
.sidebar {
  gap: 6px;
}

.sidebar-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(36,36,36,.96);
  backdrop-filter: blur(10px);
}

.tab-btn {
  min-height: 28px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.tab-btn.is-active {
  color: #1f2312;
  border-color: rgba(198,223,77,.68);
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
}

.tab-panel {
  display: none;
  min-height: 0;
}

.tab-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.photo-summary {
  grid-template-columns: 58px minmax(0, 1fr);
}

.photo-thumb-wrap {
  min-height: 58px;
}

.photo-meta-grid {
  gap: 4px;
}

.meta-pair-row {
  gap: 4px;
}

.meta-block {
  padding: 4px 5px;
}

.meta-label {
  margin-bottom: 1px;
  font-size: .56rem;
}

.meta-block strong {
  font-size: .66rem;
}

.photo-actions {
  margin-top: 5px;
}

.photo-helper,
.legal-note,
.helper {
  font-size: .62rem;
}

.export-card {
  position: static;
  box-shadow: 0 8px 22px rgba(0,0,0,.16);
}

.export-card .legal-note {
  display: none;
}

.range-row,
.select-row {
  grid-template-columns: 68px minmax(0, 1fr) 42px;
  gap: 5px;
}

.select-row,
.mini-select {
  grid-template-columns: 68px minmax(0, 1fr);
}

.range-row span,
.select-row span {
  font-size: .64rem;
}

.range-row output {
  font-size: .62rem;
}

.button-grid {
  gap: 5px;
}

.card {
  padding: 7px;
}

.preset-grid {
  gap: 5px;
}

.preset,
.segmented span {
  min-height: 27px;
  font-size: .66rem;
}

.detect-btn {
  min-height: 29px;
}

.control-grid {
  gap: 5px;
  margin-top: 5px;
}

.mask-list {
  max-height: calc(100dvh - 300px);
}

.mini-help-card {
  border-color: rgba(198,223,77,.16);
}

.workspace {
  grid-template-rows: 36px auto minmax(0, 1fr);
}

.workspace-toolbar {
  min-height: 36px;
  padding: 4px 7px;
}

.stage-shell {
  padding: 8px;
}

.bottom-panel {
  min-height: 38px;
  padding: 4px 8px 3px;
}

.rgpd-box {
  max-height: 96px;
  padding: 4px 7px;
}

.rgpd-box[open] {
  max-height: 128px;
}

.manoux-footer {
  padding: 3px 12px;
}

@media (min-width: 1181px) {
  :root { --sidebar: 276px; }
}

@media (max-width: 880px) {
  .tab-panel,
  .tab-panel.is-active {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .sidebar-tabs {
    display: none;
  }
}


/* v2.4.5 — outils visibles directement */
.sidebar-tabs-2 { grid-template-columns: repeat(2, 1fr); }
:root { --sidebar: 294px; }
.tab-panel.is-active[data-panel="edit"] { gap: 5px; }
.tab-panel.is-active[data-panel="masks"] { gap: 5px; }
.photo-card, .preset-card, .tools-card, .export-card, .masks-card, .mini-help-card { scroll-margin-top: 8px; }
.preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preset.wide { grid-column: 1 / -1; }
.tools-action-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.export-grid { display: grid; gap: 5px; }
.compact-control-grid .range-row { margin: 0; }
.sidebar .export-card .button-grid { grid-template-columns: 1fr; }
.sidebar .export-card .btn { min-width: 0; }
.mask-list { max-height: calc(100dvh - 270px); }
@media (min-width: 1100px) {
  :root { --sidebar: 286px; }
}
@media (max-height: 860px) {
  :root { --sidebar: 282px; }
  .card { padding: 6px; }
  .section-title { margin-bottom: 4px; }
  .meta-block { padding: 4px 5px; }
  .btn { min-height: 28px; font-size: .7rem; }
  .btn.mini, .tab-btn, .preset, .segmented span { min-height: 26px; }
  .helper, .photo-helper, .legal-note { font-size: .6rem; }
}
@media (max-width: 880px) {
  .sidebar-tabs-2 { display: grid; }
}


/* v2.5 — garde-fou d'initialisation */
body[data-app-error="true"]::before {
  content: "Erreur d’initialisation : vérifiez la console et l’intégrité des fichiers.";
  position: fixed;
  inset: 12px auto auto 12px;
  z-index: 9999;
  max-width: min(520px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid rgba(213,106,95,.7);
  border-radius: 12px;
  background: rgba(36,36,36,.96);
  color: #fff;
  font-size: .8rem;
  box-shadow: 0 16px 42px rgba(0,0,0,.35);
}
