/* ============================================================
   UBIQUE FILM — ARCHIVES DATABASE
   Active stylesheet: public/style.css
   Version: 4.2.15-dev24

   DEV21 scope: CSS organization only, no intentional visual or
   behavioral change. This file is now the single local active CSS
   layer. Legacy CSS files may remain on disk for reference/rollback,
   but they are not loaded by index.html.

   Organization map:
   01. Design tokens, base layout, sidebar/topbar, panels, forms
   02. Core app views and historical base components
   03. Merged clip results layer
   04. Merged source results layer
   05. Merged frontend consolidation layer
   06. Merged stability/theme overrides

   Rule for future work: do not add a new hotfix CSS file. Add new
   styles here in the correct section, or split into source modules only
   if a build step produces one active stylesheet.
   ============================================================ */

:root {
  --bg: #0f172a;
  --sidebar: #111827;
  --panel: #ffffff;
  --muted: #64748b;
  --text: #111827;
  --line: #e5e7eb;
  --accent: #2563eb;
  --accent-soft: #dbeafe;
  --danger: #dc2626;
  --radius: 18px;
  --shadow: 0 12px 35px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Aptos, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #f1f5f9; color: var(--text); }
.app-shell { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #fff; padding: 24px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #fff; color: #111827; font-weight: 800; }
.brand h1 { margin: 0; font-size: 22px; }
.brand p { margin: 2px 0 0; color: #cbd5e1; }
nav { display: grid; gap: 8px; }
.nav { border: 0; border-radius: 12px; padding: 12px 14px; background: transparent; color: #d1d5db; text-align: left; cursor: pointer; font-size: 15px; }
.nav.active, .nav:hover { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-note { margin-top: auto; color: #cbd5e1; font-size: 13px; line-height: 1.5; border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; }
.main { padding: 28px; min-width: 0; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.topbar h2 { margin: 0; font-size: 30px; }
.topbar p { margin: 6px 0 0; color: var(--muted); }
.view { display: none; }
.view.active { display: block; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.panel h3 { margin: 0 0 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-card strong { font-size: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.production-card { cursor: pointer; min-height: 150px; }
.production-card h3 { margin-bottom: 8px; }
.production-card .slug { display: inline-block; background: var(--accent-soft); color: #1d4ed8; padding: 4px 8px; border-radius: 999px; font-size: 12px; }
.button { border: 0; border-radius: 12px; padding: 10px 14px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; font-weight: 650; }
.button.secondary { background: #e5e7eb; color: #111827; }
.button.danger { background: var(--danger); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.filters-panel { display: grid; grid-template-columns: 1.8fr repeat(4, minmax(120px, 1fr)) auto; gap: 12px; align-items: end; margin-bottom: 18px; }
.field { display: grid; gap: 6px; }
.field label { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; background: #fff; }
.table-panel { padding: 0; overflow: hidden; }
.table-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.table-actions-right { display: flex; gap: 10px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 300px); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
th { position: sticky; top: 0; background: #f8fafc; z-index: 1; text-align: left; color: #334155; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:hover td { background: #f8fafc; }
.clip-id { color: var(--accent); cursor: pointer; font-weight: 700; }
.thumb { width: 96px; height: 54px; border-radius: 10px; object-fit: cover; background: #e5e7eb; border: 1px solid var(--line); }
.no-thumb { width: 96px; height: 54px; border-radius: 10px; background: #e5e7eb; color: #64748b; display: grid; place-items: center; font-size: 11px; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 9px; font-size: 12px; font-weight: 700; background: #e5e7eb; }
.badge.validated { background: #dcfce7; color: #166534; }
.badge.partial { background: #fef3c7; color: #92400e; }
.badge.needs_review, .badge.unvalidated { background: #fee2e2; color: #991b1b; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 16px; }
.data-list { width: 100%; border-collapse: collapse; }
.data-list td:first-child { color: var(--muted); width: 180px; font-weight: 700; }
.drawer { display: none; position: fixed; inset: 0; z-index: 20; }
.drawer.active { display: block; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, .45); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(840px, 94vw); background: #fff; padding: 28px; overflow: auto; box-shadow: -20px 0 60px rgba(0,0,0,.25); }
.icon-button { position: sticky; top: 0; margin-left: auto; display: block; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #e5e7eb; font-size: 24px; cursor: pointer; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 14px 0 20px; }
.thumb-grid img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); }
.edit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.edit-grid .full { grid-column: 1 / -1; }
.modal { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 40; place-items: center; }
.modal.active { display: grid; }
.modal-box { background: #fff; border-radius: var(--radius); padding: 24px; width: min(460px, 94vw); box-shadow: var(--shadow); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.log-box { background: #0f172a; color: #e5e7eb; padding: 18px; border-radius: var(--radius); min-height: 180px; overflow: auto; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stat-grid, .grid-2, .filters-panel { grid-template-columns: 1fr; }
}

/* V1.1 additions */
.filters-panel { grid-template-columns: 1.8fr repeat(5, minmax(120px, 1fr)) auto; }
.button.tiny { padding: 7px 10px; border-radius: 9px; font-size: 12px; }
.clip-detail-header { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin-bottom: 12px; }
.clip-detail-header h2 { margin: 0 0 6px; }
.clip-nav-label { color: var(--muted); font-size: 13px; white-space: nowrap; margin-top: 8px; }
.thumb { cursor: pointer; }
.thumb-button { position: relative; border: 0; background: transparent; padding: 0; cursor: zoom-in; text-align: left; }
.thumb-button img { display: block; }
.thumb-button span { position: absolute; right: 8px; bottom: 8px; background: rgba(15,23,42,.78); color: #fff; border-radius: 999px; padding: 3px 7px; font-size: 11px; }
.editable-info td:first-child { width: 160px; }
.info-value-wrap { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: start; }
.field-value.multiline { white-space: pre-wrap; line-height: 1.45; }
.empty-value { color: #94a3b8; font-style: italic; }
.field-edit { border: 0; background: #e5e7eb; color: #111827; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-weight: 800; }
.field-edit:hover { background: var(--accent-soft); color: #1d4ed8; }
.inline-editor { display: grid; gap: 10px; }
.inline-actions { display: flex; gap: 8px; justify-content: flex-end; }
.inline-input { width: 100%; border: 1px solid var(--accent); border-radius: 12px; padding: 10px 12px; font: inherit; }
.people-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.person-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--accent-soft); color: #1d4ed8; font-weight: 650; }
.remove-person { border: 0; background: transparent; color: inherit; cursor: pointer; font-size: 16px; line-height: 1; }
.add-person { border: 1px dashed #93c5fd; background: #eff6ff; color: #1d4ed8; border-radius: 999px; padding: 6px 10px; cursor: pointer; font-weight: 700; }
.drawer-nav { position: sticky; bottom: -28px; background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; padding: 16px 0 0; margin-top: 28px; }
.lightbox { display: none; position: fixed; inset: 0; z-index: 80; }
.lightbox.active { display: block; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, .86); }
.lightbox-content { position: absolute; inset: 30px; display: grid; place-items: center; }
.lightbox-content img { max-width: min(1200px, 88vw); max-height: 82vh; border-radius: 16px; box-shadow: 0 20px 70px rgba(0,0,0,.45); background: #111827; }
.lightbox-close { position: absolute; right: 8px; top: 8px; border: 0; background: rgba(255,255,255,.92); color: #111827; width: 42px; height: 42px; border-radius: 50%; font-size: 28px; cursor: pointer; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.92); color: #111827; width: 52px; height: 72px; border-radius: 16px; font-size: 48px; cursor: pointer; line-height: 1; }
.lightbox-nav.prev { left: 8px; }
.lightbox-nav.next { right: 8px; }
.lightbox-nav:disabled { opacity: .25; cursor: not-allowed; }
.lightbox-caption { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); background: rgba(15,23,42,.78); color: #fff; padding: 8px 14px; border-radius: 999px; font-size: 13px; }
.admin-list-panel { margin-top: 18px; }
.controlled-form { display: grid; grid-template-columns: 180px 1fr auto; gap: 12px; align-items: end; margin-bottom: 16px; }
.controlled-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.controlled-pill { display: inline-flex; gap: 8px; align-items: center; background: #f8fafc; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; }
.controlled-pill small { color: #16a34a; font-weight: 700; }
.controlled-pill.inactive { opacity: .5; }
.controlled-pill.inactive small { color: #64748b; }
@media (max-width: 1200px) {
  .filters-panel { grid-template-columns: 1fr 1fr; }
  .controlled-form { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .clip-detail-header { display: block; }
  .drawer-nav { position: static; }
  .lightbox-content { inset: 12px; }
  .lightbox-nav { width: 42px; height: 60px; font-size: 38px; }
}

/* V1.2 additions */
.batch-modal-box { width: min(980px, 96vw); max-height: 88vh; overflow: auto; }
.batch-form { margin-top: 14px; }
.batch-table th { position: static; }
.batch-table td:first-child { width: 180px; }
.batch-table select,
.batch-table input,
.batch-table textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font: inherit; background: #fff; }
.batch-table textarea { resize: vertical; }
.batch-preview pre { white-space: pre-wrap; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 14px 0 0; color: #334155; }
.thumb-hover-preview { display: none; position: fixed; z-index: 70; pointer-events: none; background: #0f172a; border-radius: 16px; padding: 8px; box-shadow: 0 24px 80px rgba(0,0,0,.35); }
.thumb-hover-preview.active { display: block; }
.thumb-hover-preview img { display: block; max-width: min(540px, 42vw); max-height: 340px; object-fit: contain; border-radius: 10px; background: #111827; }
@media (max-width: 800px) {
  .batch-modal-box { width: 96vw; }
  .batch-table, .batch-table thead, .batch-table tbody, .batch-table tr, .batch-table th, .batch-table td { display: block; width: 100%; }
  .batch-table thead { display: none; }
  .batch-table tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .batch-table td { border-bottom: 0; padding: 6px 0; }
  .thumb-hover-preview { display: none !important; }
}

/* V1.3 additions */
.source-id { color: var(--accent); cursor: pointer; font-weight: 750; }
.sources-filters-panel { grid-template-columns: 1.8fr repeat(3, minmax(140px, 1fr)) auto; }
.source-info td:first-child { width: 190px; }
.inline-check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 650; }
.inline-check input { width: auto; }
.linked-clips-table th { position: static; }
.open-source-from-clip { margin-top: 10px; }
@media (max-width: 1000px) {
  .sources-filters-panel { grid-template-columns: 1fr; }
}

/* V1.4 additions: clearer modes, source batch selection and production rows */
.nav { display: flex; align-items: center; gap: 9px; }
.detail-mode { border-radius: 22px; padding: 16px; margin: -8px -8px 0; }
.detail-mode-label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 7px 11px; border-radius: 999px; margin-bottom: 14px; }
.detail-mode-icon { font-size: 16px; }
.clip-mode { background: linear-gradient(180deg, #f8fbff 0%, #fff 170px); }
.clip-mode .detail-mode-label { background: #dbeafe; color: #1d4ed8; }
.source-mode { background: linear-gradient(180deg, #fffbeb 0%, #fff 170px); }
.source-mode .detail-mode-label { background: #fef3c7; color: #92400e; }
.production-mode { background: linear-gradient(180deg, #f5f3ff 0%, #fff 190px); }
.production-mode .detail-mode-label { background: #ede9fe; color: #5b21b6; }
.clip-header, .source-header, .production-header { padding: 10px 0 8px; }
.source-header h2::before { content: '📼 '; }
.clip-header h2::before { content: '🎬 '; }
.production-header h2::before { content: '🎞️ '; }

.production-list { display: grid; gap: 14px; }
.production-row { display: grid; grid-template-columns: 58px 1fr minmax(150px, 190px); gap: 16px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 18px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease; }
.production-row:hover { transform: translateY(-1px); border-color: #c7d2fe; box-shadow: 0 16px 42px rgba(15,23,42,.16); }
.production-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: #ede9fe; font-size: 25px; }
.production-title-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.production-title-line h3 { margin: 0; font-size: 19px; }
.production-meta { margin: 5px 0; color: var(--muted); font-size: 13px; }
.production-summary { margin: 0; color: #334155; line-height: 1.45; max-width: 900px; }
.production-stats { display: grid; grid-template-columns: 1fr; gap: 2px; text-align: right; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.production-stats strong { color: var(--text); font-size: 18px; text-transform: none; letter-spacing: 0; }
.fiche-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; background: #f1f5f9; color: #334155; font-size: 12px; font-weight: 800; white-space: nowrap; }
.fiche-badge.muted { background: #f8fafc; color: #64748b; }
.production-detail-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin: 14px 0 18px; }
.soft-panel { box-shadow: none; background: rgba(255,255,255,.8); }
.mini-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-stat-grid div { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: #fff; display: grid; gap: 4px; }
.mini-stat-grid strong { font-size: 20px; }
.mini-stat-grid span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.fiche-placeholder { border: 1px dashed #c4b5fd; background: #faf5ff; color: #5b21b6; border-radius: 16px; padding: 14px 16px; line-height: 1.45; margin-bottom: 18px; }
.linked-sources-table th { position: static; }

.linked-clips-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 18px; }
.linked-clips-actions h3 { margin: 0; }
.linked-actions-right { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.selectable-linked-clips input[type="checkbox"] { width: auto; }
.selectable-linked-clips tbody tr:has(input:checked) td { background: #eff6ff; }
.source-row-check { cursor: pointer; }

@media (max-width: 900px) {
  .production-row { grid-template-columns: 44px 1fr; }
  .production-stats { grid-column: 1 / -1; text-align: left; grid-template-columns: repeat(2, minmax(90px, 1fr)); }
  .production-detail-grid { grid-template-columns: 1fr; }
  .linked-clips-actions { align-items: flex-start; flex-direction: column; }
}

/* V1.5 additions: sober monochrome SVG icons, logo, fiche signalétique, documents */
.ui-icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; color: currentColor; vertical-align: -3px; }
.nav .ui-icon { opacity: .9; }
.brand-logo-wrap { width: 82px; height: 36px; display: flex; align-items: center; justify-content: center; }
.brand-logo { max-width: 82px; max-height: 34px; object-fit: contain; filter: invert(1); opacity: .96; }
.brand-mark { display: none; }
.sidebar .brand { align-items: center; gap: 12px; }
.sidebar .brand h1 { font-size: 20px; }
.sidebar .brand p { font-size: 13px; }
.detail-mode-label .ui-icon { width: 17px; height: 17px; }
.production-icon { font-size: inherit; color: #5b21b6; }
.production-icon .ui-icon { width: 26px; height: 26px; }
.source-header h2::before, .clip-header h2::before, .production-header h2::before { content: none !important; }
.field-edit, .source-field-edit { border: 0; background: #e5e7eb; color: #111827; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; display: inline-grid; place-items: center; }
.field-edit .ui-icon, .source-field-edit .ui-icon { width: 15px; height: 15px; }
.field-edit:hover, .source-field-edit:hover { background: var(--accent-soft); color: #1d4ed8; }
.fiche-badge { gap: 6px; }
.fiche-badge .ui-icon { width: 14px; height: 14px; }
.fiche-badge.ready { background: #dcfce7; color: #166534; }
.fiche-import-form { display: grid; grid-template-columns: minmax(220px, 280px) 1fr auto; gap: 12px; align-items: end; }
.fiche-summary-panel { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; border: 1px solid var(--line); background: #fff; border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.fiche-summary-main h4 { margin: 0 0 8px; font-size: 18px; }
.fiche-summary-main p { margin: 0; color: #334155; line-height: 1.5; }
.fiche-kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fiche-kv-grid div { background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; padding: 11px; display: grid; gap: 4px; }
.fiche-kv-grid span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.fiche-kv-grid strong { color: var(--text); font-size: 13px; line-height: 1.25; }
.fiche-section { border: 1px solid var(--line); border-radius: 16px; background: #fff; margin: 10px 0; overflow: hidden; }
.fiche-section summary { cursor: pointer; padding: 12px 14px; font-weight: 800; background: #f8fafc; }
.fiche-section > .table-wrap, .fiche-section > .data-list, .fiche-section > p { margin: 0; }
.compact-table-wrap { max-height: 300px; border-top: 1px solid var(--line); }
.compact-table { font-size: 12px; }
.compact-table th { position: sticky; top: 0; }
.compact-table td { line-height: 1.35; }
.document-list { display: grid; gap: 8px; margin-bottom: 14px; }
.document-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; text-decoration: none; color: var(--text); background: #fff; }
.document-row:hover { background: #f8fafc; border-color: #cbd5e1; }
.document-row span { color: var(--accent); display: grid; place-items: center; }
.document-row small { color: var(--muted); }
.attach-form { display: grid; grid-template-columns: 1fr minmax(180px, 240px) 1fr auto; gap: 10px; align-items: center; border: 1px dashed #cbd5e1; border-radius: 16px; padding: 12px; background: #f8fafc; }
.attach-form input { border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font: inherit; background: #fff; }
@media (max-width: 1000px) {
  .fiche-import-form, .fiche-summary-panel, .attach-form { grid-template-columns: 1fr; }
  .fiche-kv-grid { grid-template-columns: 1fr; }
  .document-row { grid-template-columns: 28px 1fr; }
  .document-row small { grid-column: 2; }
}


/* V1.6 additions: production posters, editable fiche metadata, multi-file document upload */
.production-thumb {
  width: 58px;
  height: 78px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #f1f5f9;
  border: 1px solid var(--line);
  color: #475569;
  overflow: hidden;
}
.production-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.production-thumb .ui-icon { width: 26px; height: 26px; }
.production-row { grid-template-columns: 64px 1fr minmax(150px, 190px); }
.production-side-panel h3 { margin-top: 0; }
.poster-block { display: grid; gap: 10px; margin-bottom: 18px; }
.poster-frame {
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: 480px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0f172a;
  box-shadow: 0 12px 32px rgba(15,23,42,.14);
}
.poster-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-placeholder {
  aspect-ratio: 2 / 3;
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  background: #f8fafc;
  color: #64748b;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 16px;
}
.poster-placeholder .ui-icon { width: 42px; height: 42px; opacity: .75; }
.poster-placeholder span { font-weight: 800; color: #334155; }
.poster-placeholder small { display: block; max-width: 180px; }
.poster-upload-row { display: grid; gap: 8px; }
.poster-upload-row input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; font: inherit; background: #fff; }
.fiche-main-table .field-edit,
.editable-fiche-table .field-edit { opacity: .82; }
.fiche-cell-wrap { display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 8px; align-items: start; }
.fiche-cell-wrap .field-edit { width: 26px; height: 26px; }
.fiche-cell-wrap .field-edit .ui-icon { width: 13px; height: 13px; }
.fiche-cell-editor { min-width: 260px; }
.attach-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: stretch;
}
.attach-dropzone {
  grid-column: 1 / -1;
  min-height: 94px;
  border: 1px dashed #94a3b8;
  background: #fff;
  border-radius: 16px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 16px;
  text-align: center;
  color: #475569;
}
.attach-dropzone .ui-icon { width: 28px; height: 28px; }
.attach-dropzone strong { color: #111827; }
.attach-dropzone span { color: var(--muted); font-size: 13px; }
.attach-dropzone.drag-over {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}
#productionDocFile { min-width: 260px; }
#uploadProductionDoc { white-space: nowrap; }
@media (max-width: 1000px) {
  .production-row { grid-template-columns: 54px 1fr; }
  .production-thumb { width: 52px; height: 70px; }
  .attach-form { grid-template-columns: 1fr; }
}

/* V1.7 additions: safer update UX, click-to-upload poster, document type dropdown */
.poster-click-area {
  display: grid;
  gap: 8px;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: inherit;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.poster-click-area:hover .poster-frame,
.poster-click-area:hover .poster-placeholder {
  border-color: #2563eb;
  box-shadow: 0 16px 40px rgba(37, 99, 235, .18);
}
.poster-click-hint {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  color: #475569;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}
.poster-click-hint .ui-icon { width: 14px; height: 14px; }
.visually-hidden-file {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.inline-fiche-import {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 12px;
  align-items: center;
  cursor: pointer;
}
.inline-fiche-import strong { display: block; color: #4c1d95; }
.inline-fiche-import span { display: block; color: #6d28d9; font-size: 13px; margin-top: 2px; }
.inline-fiche-import:hover { border-color: #8b5cf6; background: #f5f3ff; }
.attach-form {
  grid-template-columns: minmax(180px, 260px) minmax(200px, 1fr) auto;
}
.attach-form .field { margin: 0; }
.attach-form select,
.attach-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
.attach-dropzone { cursor: pointer; }
.attach-dropzone:hover { background: #f1f5f9; border-color: #64748b; }
@media (max-width: 1000px) {
  .inline-fiche-import { grid-template-columns: 28px 1fr; }
  .inline-fiche-import button { grid-column: 2; justify-self: start; }
  .attach-form { grid-template-columns: 1fr; }
}

/* V1.8 additions: global search and larger production posters */
.global-search-panel {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.global-search-panel .search-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.global-results { display: grid; gap: 16px; }
.empty-search-state {
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  padding: 28px;
}
.search-summary { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.search-summary p { margin: 0; color: var(--muted); font-size: 13px; }
.search-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.search-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.search-section-title h3 { margin: 0; font-size: 16px; }
.search-section-title span {
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #e5e7eb;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}
.search-result-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.search-result-card:last-child { border-bottom: 0; }
.search-result-card:hover { background: #f8fafc; }
.search-icon-box, .search-thumb, .search-poster {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f1f5f9;
  display: grid;
  place-items: center;
  color: #475569;
  overflow: hidden;
}
.search-thumb { object-fit: cover; aspect-ratio: 16 / 9; height: 34px; border-radius: 10px; }
.search-poster { object-fit: cover; height: 72px; border-radius: 10px; }
.search-result-title { font-weight: 850; color: #111827; }
.search-result-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; margin-top: 3px; }
.match-line { margin-top: 6px; line-height: 1.35; }
.match-line strong {
  display: inline-block;
  margin-right: 7px;
  color: #1d4ed8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.match-line span { color: #334155; }
.search-doc-link { justify-self: end; }
.production-row { grid-template-columns: 148px 1fr minmax(150px, 190px); align-items: stretch; }
.production-thumb {
  width: 132px;
  height: 198px;
  border-radius: 16px;
}
.production-thumb .ui-icon { width: 42px; height: 42px; }
@media (max-width: 1000px) {
  .global-search-panel { grid-template-columns: 1fr; }
  .search-summary { display: block; }
  .search-result-card { grid-template-columns: 48px minmax(0, 1fr); }
  .search-doc-link { grid-column: 2; justify-self: start; }
  .production-row { grid-template-columns: 96px 1fr; }
  .production-thumb { width: 82px; height: 123px; }
}

/* V1.9: édition rapide des champs clés de fiche signalétique */
.fiche-kv-editable > div { position: relative; padding-right: 34px; }
.fiche-kv-editable .field-edit { position: absolute; right: 8px; top: 8px; opacity: .55; }
.fiche-kv-editable > div:hover .field-edit { opacity: 1; }
.fiche-kv-editable .inline-editor { grid-column: 1 / -1; }

/* V2.0: recherche globale regroupée par production */
.search-section-subcount {
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.grouped-production-card {
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: start;
}
.search-poster-grouped {
  width: 58px;
  height: 86px;
  border-radius: 12px;
}
.grouped-match-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.grouped-match-line {
  display: grid;
  grid-template-columns: minmax(120px, 190px) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f8fafc;
}
.grouped-match-line strong {
  color: #1d4ed8;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.grouped-match-line span {
  color: #334155;
  line-height: 1.35;
}
@media (max-width: 800px) {
  .grouped-production-card { grid-template-columns: 54px minmax(0, 1fr); }
  .search-poster-grouped { width: 46px; height: 69px; }
  .grouped-match-line { grid-template-columns: 1fr; gap: 3px; }
}

/* V2.1 additions: dashboard, trash, settings, modern filters, thumbnail modes */
.filters-panel, .global-search-panel { align-items: end; }
.field input, .field select, .inline-input {
  border-radius: 14px;
  border: 1px solid #dbe3ef;
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.field input:focus, .field select:focus, .inline-input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.14);
}
.field.compact { min-width: 120px; }
.modern-check { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; font-size: 13px; font-weight: 700; color: #475569; white-space: nowrap; }
.modern-check input { width: auto; }
.dashboard-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.dashboard-grid .wide-panel { grid-column: span 1; }
.dashboard-stat-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
.analytics-card { background: linear-gradient(180deg, #fff, #f8fbff); border: 1px solid #dbeafe; }
.panel-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.panel-title-row h3 { margin: 0; }
.panel-title-row span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.bar-list { display: grid; gap: 12px; }
.bar-row-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.bar-row-top span { color: #334155; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row-top strong { color: #0f172a; }
.bar-track { height: 9px; border-radius: 999px; background: #e2e8f0; overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, #60a5fa, #7c3aed); }
.health-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.health-card { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: #f8fafc; display: grid; gap: 4px; }
.health-card strong { font-size: 26px; }
.health-card span { color: var(--muted); font-weight: 700; font-size: 12px; }
.media-badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 850; background: #eef2ff; color: #3730a3; text-transform: uppercase; letter-spacing: .03em; }
.media-badge.audio { background: #fff7ed; color: #c2410c; }
.media-badge.document { background: #ecfdf5; color: #047857; }
.audio-row td { background: #fffaf0; }
.table-thumb-small { width: 78px; height: 46px; object-fit: cover; border-radius: 10px; }
.table-thumb-large { width: 260px; max-width: 26vw; height: 150px; object-fit: cover; border-radius: 14px; box-shadow: 0 10px 30px rgba(15,23,42,.15); }
.thumb-grid-mini { display: grid; grid-template-columns: repeat(2, 68px); gap: 5px; }
.thumb-grid-mini .table-thumb { width: 68px; height: 42px; object-fit: cover; border-radius: 8px; }
.thumb-mode-0 .no-thumb.compact { font-size: 18px; color: #cbd5e1; }
.thumb-mode-2 td, .thumb-mode-4 td { vertical-align: middle; }
.button.tiny { padding: 6px 9px; border-radius: 10px; font-size: 12px; }
.button.danger.tiny { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.button.danger.tiny:hover { background: #fecaca; }
.clip-detail-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.settings-panel p { color: var(--muted); }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 12px 0 16px; }
.settings-grid .wide { grid-column: span 2; }
#trashTable .table-thumb-large, #clipsTable .table-thumb-large { min-width: 220px; }
.search-result-card.thumb-mode-2 .search-media { width: 280px; }
.search-result-card.thumb-mode-4 .search-media { width: 150px; }
.search-result-card .thumb-grid-mini { grid-template-columns: repeat(2, 68px); }
@media (max-width: 1100px) {
  .dashboard-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .health-grid { grid-template-columns: repeat(2, 1fr); }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid .wide { grid-column: span 1; }
  .table-thumb-large { width: 180px; height: 104px; }
}

/* V2.2 visual refresh: subdued archival palette, monochrome icons, compact production cards */
:root {
  --accent: #6f6a55;
  --accent-strong: #47412f;
  --accent-soft: #ece8dc;
  --accent-alt: #7b8a72;
  --bg: #f6f4ef;
  --panel: #fffefa;
  --text: #23251f;
  --muted: #6f716b;
  --line: #ded9cb;
  --shadow: 0 14px 38px rgba(38, 36, 28, .09);
}
body { background: var(--bg); color: var(--text); }
.sidebar { background: #26251f; }
.nav.active, .nav:hover { background: rgba(236,232,220,.12); color: #fff; }
.button { background: var(--accent-strong); color: #fff; border-color: var(--accent-strong); }
.button.secondary { background: #f5f2e9; color: var(--accent-strong); border: 1px solid var(--line); }
.button.danger { background: #8a4f3d; border-color: #8a4f3d; }
.panel, .stat-card, .production-card { background: var(--panel); border-color: var(--line); }
.field input, .field select, .field textarea, select, input { border-color: var(--line); background: #fffefa; }
.field input:focus, .field select:focus, .inline-input:focus { outline: 2px solid rgba(111,106,85,.22); border-color: var(--accent); }
.badge.validated { background: #e7ede3; color: #3f6137; }
.badge.unvalidated { background: #f1eadc; color: #7b5b20; }
.badge.review, .badge.needs_review { background: #f2e2d8; color: #7b3f2f; }
.media-badge.video { background: #e8ece2; color: #4f6047; }
.media-badge.audio { background: #eee7d9; color: #755d32; }

.ui-icon { width: 18px; height: 18px; color: currentColor; }
.thumb-select-field { display: none; }
.inline-thumb-toolbar, .thumb-mode-icons { display: inline-flex; gap: 6px; align-items: center; }
.thumb-mode-icon { width: 36px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: #fffefa; color: #777063; cursor: pointer; transition: background .14s ease, color .14s ease, border-color .14s ease, transform .12s ease; }
.thumb-mode-icon:hover { transform: translateY(-1px); color: var(--accent-strong); border-color: #beb7a6; }
.thumb-mode-icon.active { background: var(--accent-soft); color: var(--accent-strong); border-color: var(--accent); box-shadow: inset 0 0 0 1px rgba(111,106,85,.12); }
.table-actions-right { align-items: center; }
#clipsTable th[data-sort] { cursor: pointer; user-select: none; color: var(--accent-strong); }
#clipsTable th[data-sort]:hover { background: #f3efe5; }
#clipsTable th.active-sort { background: #ece8dc; }

.filters-panel { align-items: end; }
.filters-panel select, .filters-panel input { border-radius: 14px; min-height: 40px; }
.global-search-panel { align-items: end; }
.toolbar-thumb-slot { align-self: end; padding-bottom: 2px; }

.production-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 620px)); gap: 18px; align-items: stretch; justify-content: start; }
.production-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; max-width: 620px; }
.production-card:hover { transform: translateY(-2px); border-color: #c7bfae; box-shadow: 0 18px 44px rgba(38,36,28,.14); }
.production-poster-block { width: 150px; min-height: 210px; border-radius: 18px; background: #ece8dc; display: grid; place-items: center; overflow: hidden; color: var(--accent-strong); }
.production-poster-block img { width: 100%; height: 100%; object-fit: cover; display: block; }
.production-card-main { display: flex; flex-direction: column; min-width: 0; }
.production-card .production-title-line { gap: 8px; align-items: flex-start; }
.production-card h3 { margin: 0; font-size: 20px; line-height: 1.2; }
.production-card .production-summary { margin: 8px 0 12px; color: #484a43; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.production-card-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; color: var(--muted); font-size: 13px; }
.production-card-stats span { background: #f3efe5; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; }
.production-card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.production-card-actions .button { cursor: pointer; }
.fiche-badge.ready { background: #e7ede3; color: #3f6137; }

.validation-candidate { display: grid; grid-template-columns: 94px 1fr; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 16px; padding: 10px; margin-top: 14px; background: #fbfaf6; }
.validation-candidate img { width: 94px; height: 64px; object-fit: cover; border-radius: 12px; background: #ddd; }
.validation-candidate small, .last-modified small { display: block; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 800; font-size: 11px; }
.validation-candidate strong, .last-modified strong { display: block; margin: 2px 0; }
.validation-candidate span, .last-modified span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 7px; }
.last-modified { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }
.last-modified em { display: block; color: var(--muted); font-style: normal; font-size: 12px; }

.vocab-panel { margin-top: 16px; }
.vocab-grid { grid-template-columns: 1fr 1fr 2fr auto; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.controlled-pill { border: 1px solid var(--line); cursor: pointer; }
.controlled-pill:hover { border-color: var(--accent); background: #f3efe5; }

@media (max-width: 900px) {
  .production-card-grid { grid-template-columns: 1fr; }
  .production-card { grid-template-columns: 120px 1fr; max-width: none; }
  .production-poster-block { width: 120px; min-height: 170px; }
  .vocab-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .production-card { grid-template-columns: 1fr; }
  .production-poster-block { width: 100%; height: 260px; }
}


/* V2.2.2 hotfixes */
.error-cell { padding: 18px; color: #8a4f3d; background: #fff7ed; font-weight: 700; }
.sort-head { display: inline-flex; align-items: center; gap: 4px; }
#clipsTable th[data-sort] { position: relative; }
#clipsTable th[data-sort] .sort-head::after { content: ''; opacity: .45; }
.search-result-card[data-result-kind="clip"] {
  grid-template-columns: minmax(96px, auto) minmax(0, 1fr);
  align-items: start;
}
.search-result-card[data-result-kind="clip"] .search-media {
  width: auto;
  min-width: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.search-result-card[data-result-kind="clip"].thumb-mode-0 .search-media { min-width: 42px; }
.search-result-card[data-result-kind="clip"].thumb-mode-1 .table-thumb-small { width: 96px; height: 56px; }
.search-result-card[data-result-kind="clip"].thumb-mode-2 .search-media { width: 300px; max-width: 34vw; }
.search-result-card[data-result-kind="clip"].thumb-mode-2 .table-thumb-large { width: 300px; max-width: 34vw; height: 170px; }
.search-result-card[data-result-kind="clip"].thumb-mode-4 .search-media { width: 150px; }
.search-result-card[data-result-kind="clip"] .thumb-grid-mini { grid-template-columns: repeat(2, 68px); }
@media (max-width: 900px) {
  .search-result-card[data-result-kind="clip"] { grid-template-columns: 1fr; }
  .search-result-card[data-result-kind="clip"] .search-media { justify-content: flex-start; }
}


/* V2.3 — UI/search/settings refresh */
:root {
  --bg: #f4f3ef;
  --sidebar: #171a16;
  --panel: #fffef9;
  --panel-2: #f7f6f1;
  --muted: #6f746b;
  --text: #20231f;
  --line: #e3e0d7;
  --accent: #6f7f3f;
  --accent-strong: #4f612d;
  --accent-soft: #edf2df;
  --danger: #a14a3c;
  --danger-soft: #f3e1dc;
  --radius: 20px;
  --shadow: 0 14px 38px rgba(31, 35, 29, .09);
}
body {
  background: linear-gradient(180deg, #f7f6f2 0%, #ece9df 100%);
  transition: background-color 160ms ease, color 160ms ease;
}
body.dark-mode {
  --bg: #151515;
  --sidebar: #111113;
  --panel: #232326;
  --panel-2: #2b2b30;
  --muted: #aaa89f;
  --text: #f1f0e9;
  --line: #3d3c42;
  --accent: #a8c25e;
  --accent-strong: #d3ef7a;
  --accent-soft: rgba(168, 194, 94, .14);
  --danger: #d67862;
  --danger-soft: rgba(214, 120, 98, .14);
  --shadow: 0 16px 42px rgba(0, 0, 0, .32);
  background: radial-gradient(circle at 20% 0%, #25252b 0%, #17171a 44%, #111113 100%);
}
body.dark-mode .panel,
body.dark-mode .stat-card,
body.dark-mode .search-section,
body.dark-mode .empty-search-state,
body.dark-mode .drawer-panel,
body.dark-mode .modal-box,
body.dark-mode .document-row,
body.dark-mode .field input,
body.dark-mode .field select,
body.dark-mode textarea,
body.dark-mode .attach-dropzone,
body.dark-mode .attach-form input,
body.dark-mode .attach-form select,
body.dark-mode .inline-input {
  background: var(--panel);
  color: var(--text);
  border-color: var(--line);
}
body.dark-mode th,
body.dark-mode .search-section-title,
body.dark-mode .search-section-subcount,
body.dark-mode tr:hover td {
  background: var(--panel-2);
}
body.dark-mode .button.secondary {
  background: #34343a;
  color: var(--text);
}
body.dark-mode .clip-id,
body.dark-mode .match-line strong {
  color: var(--accent-strong);
}
.sidebar {
  box-shadow: 18px 0 60px rgba(0,0,0,.09);
}
.nav,
.button,
.field input,
.field select,
textarea,
.panel,
.stat-card,
.search-result-card,
.production-card,
.thumb-mode-icon {
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}
.nav.active, .nav:hover {
  background: rgba(168, 194, 94, .14);
}
.button {
  background: var(--accent);
  color: #fff;
}
.button:hover,
.thumb-mode-icon:hover {
  transform: translateY(-1px);
}
.button.secondary {
  background: #e9e6dc;
  color: #272a25;
}
.button.danger {
  background: var(--danger);
}
.clip-id {
  color: var(--accent-strong);
}
.field input, .field select, textarea {
  background: var(--panel);
  border-color: var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.field input:focus, .field select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.filters-panel {
  grid-template-columns: minmax(220px, 1.5fr) repeat(6, minmax(125px, 1fr)) auto auto;
  align-items: end;
}
.duration-range-field {
  grid-column: span 2;
}
.duration-range-row {
  display: grid;
  grid-template-columns: auto minmax(90px, 1fr) minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.duration-range-row input[type="range"] {
  padding: 0;
  accent-color: var(--accent);
}
.duration-range-field small {
  color: var(--muted);
  font-size: 12px;
}
.table-wrap {
  max-height: calc(100vh - 310px);
}
#clipsTable {
  border-collapse: separate;
  border-spacing: 0 7px;
  padding: 0 10px 10px;
}
#clipsTable th {
  border: 0;
  background: transparent;
  position: sticky;
  top: 0;
}
#clipsTable td {
  background: var(--panel);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
#clipsTable tr td:first-child {
  border-left: 1px solid var(--line);
  border-radius: 16px 0 0 16px;
}
#clipsTable tr td:last-child {
  border-right: 1px solid var(--line);
  border-radius: 0 16px 16px 0;
}
#clipsTable tr:hover td {
  background: var(--panel-2);
}
.sort-head {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 5px 2px;
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
th.active-sort .sort-head {
  color: var(--accent-strong);
}
.sort-indicator {
  min-width: 14px;
}
#clipsTable.no-thumb-mode th:nth-child(2),
#clipsTable.no-thumb-mode td:nth-child(2) {
  display: none;
}
#clipsTable.no-thumb-mode td {
  padding-top: 7px;
  padding-bottom: 7px;
}
#clipsTable.no-thumb-mode .desc-cell {
  max-width: 420px;
}
tbody.refreshing {
  opacity: .45;
}
.thumb-mode-icons {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  border-radius: 999px;
}
.thumb-mode-icon {
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.thumb-mode-icon.active {
  background: var(--accent);
  color: #fff;
}
.thumb-mode-icon .ui-icon {
  width: 18px;
  height: 18px;
}
.no-thumb.compact,
.no-thumb {
  background: transparent;
  border: 0;
  width: auto;
  height: auto;
}
.search-result-card.thumb-mode-0 {
  grid-template-columns: minmax(0, 1fr) auto;
}
.search-result-card.thumb-mode-0 .search-media {
  display: none;
}
.search-result-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  margin: 8px 12px;
  background: var(--panel);
}
.search-section {
  padding-bottom: 8px;
}
.theme-toggle {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.06);
  color: #f5f5f0;
  border-radius: 999px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  font-weight: 750;
}
.theme-dot {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(168, 194, 94, .14);
}
.production-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(440px, 640px));
  justify-content: start;
}
.production-card {
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.production-poster-block {
  min-width: 150px;
}
.production-poster-block img {
  width: 142px;
  height: 210px;
}
.production-card-stats {
  margin-top: 14px;
}
.view.active {
  animation: viewFadeIn 150ms ease both;
}
@keyframes viewFadeIn {
  from { opacity: .82; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1200px) {
  .filters-panel {
    grid-template-columns: 1fr 1fr;
  }
  .duration-range-field {
    grid-column: 1 / -1;
  }
}


/* V2.3.1 hotfix — lightbox, sorting, compact filters, click rows */
#closeLightbox { z-index: 20; cursor: pointer; }
.lightbox.active { display: flex; }
.lightbox-content { pointer-events: auto; }
.lightbox-backdrop { cursor: zoom-out; }

/* Compact duration controls: same line, less height */
.duration-range-field {
  min-width: 320px;
}
.duration-range-row {
  grid-template-columns: auto minmax(130px, 1fr) minmax(130px, 1fr) auto;
  gap: 8px;
  min-height: 36px;
}
.duration-range-row input[type="range"] {
  height: 22px;
  cursor: pointer;
}
.duration-range-field small {
  display: block;
  margin-top: 2px;
  line-height: 1.1;
}

/* Search fields and dropdowns share the same geometry */
.field input,
.field select,
.field textarea,
select,
input[type="search"],
input[type="text"] {
  height: 42px;
  font: inherit;
  font-size: 14px;
  border-radius: 14px;
  padding: 0 12px;
  line-height: 42px;
}
.field textarea { height: auto; line-height: 1.35; padding-top: 10px; padding-bottom: 10px; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

/* Sorting is server-side; make headers clearly interactive */
.sort-head {
  cursor: pointer;
  border-radius: 999px;
  padding: 7px 9px;
}
.sort-head:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Smoother result updates: row entrance instead of whole-table opacity flash */
tbody.refreshing { opacity: 1; }
#clipsTable tbody tr {
  animation: rowSoftIn 130ms ease both;
}
@keyframes rowSoftIn {
  from { opacity: .86; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Entire clip row is clickable, but controls keep their own actions */
#clipsTable tbody tr.clip-row {
  cursor: pointer;
}
#clipsTable tbody tr.clip-row:focus-visible td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
#clipsTable tbody tr.clip-row .row-check,
#clipsTable tbody tr.clip-row button {
  cursor: auto;
}
#clipsTable .table-thumb {
  transition: transform 150ms ease, box-shadow 150ms ease;
}
#clipsTable tbody tr.clip-row:hover .table-thumb {
  transform: scale(1.08);
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}

/* Dashboard accents: replace old blue impression with same green/olive accent */
.health-fill,
.bar-fill,
.progress-fill,
.dashboard .accent,
.stat-card .stat-icon {
  background: var(--accent) !important;
  color: #fff !important;
}
.media-badge {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Production view: stronger posters and titles */
.production-card-grid {
  grid-template-columns: repeat(auto-fill, minmax(540px, 760px));
  gap: 22px;
}
.production-card {
  align-items: stretch;
  min-height: 320px;
}
.production-poster-block {
  min-width: 250px;
}
.production-poster-block img {
  width: 230px;
  height: 340px;
  border-radius: 22px;
}
.production-title-line h3,
.production-card h3 {
  font-size: 30px;
  line-height: 1.08;
  letter-spacing: -.03em;
}
.production-summary,
.production-card-stats {
  margin-top: 12px;
}

@media (max-width: 900px) {
  .production-card-grid { grid-template-columns: 1fr; }
  .production-poster-block { min-width: 160px; }
  .production-poster-block img { width: 150px; height: 220px; }
  .production-title-line h3, .production-card h3 { font-size: 22px; }
  .duration-range-field { min-width: 100%; }
  .duration-range-row { grid-template-columns: auto 1fr auto; }
  .duration-range-row input[type="range"]:first-of-type { grid-column: 2; }
  .duration-range-row input[type="range"]:last-of-type { grid-column: 2; }
}



/* V2.3.5 — rebuilt thumbnail lightbox using the original #lightbox */
body.lightbox-open {
  overflow: hidden;
}
.lightbox {
  display: none !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  color: #f4f3ef;
}
.lightbox.active {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.lightbox-backdrop {
  position: absolute !important;
  inset: 0 !important;
  background: rgba(10, 13, 15, .88) !important;
  backdrop-filter: blur(8px);
  cursor: zoom-out !important;
  z-index: 1 !important;
  pointer-events: auto !important;
}
.lightbox-shell {
  position: relative !important;
  z-index: 2 !important;
  width: min(94vw, 1500px);
  height: min(90vh, 960px);
  display: grid;
  place-items: center;
  pointer-events: none;
}
.lightbox-content {
  position: relative !important;
  inset: auto !important;
  display: grid !important;
  place-items: center !important;
  gap: 10px;
  margin: 0 !important;
  pointer-events: none !important;
}
.lightbox-content img,
#lightboxImage {
  max-width: min(94vw, 1500px) !important;
  max-height: 84vh !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  border-radius: 18px !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.55) !important;
  background: #111 !important;
  pointer-events: auto !important;
}
.lightbox-caption {
  position: static !important;
  transform: none !important;
  background: rgba(20, 22, 24, .72) !important;
  color: rgba(255,255,255,.82) !important;
  padding: 8px 13px !important;
  border-radius: 999px !important;
  font-size: 13px !important;
  font-weight: 800;
  letter-spacing: .05em;
}
.lightbox-close,
.lightbox-nav {
  z-index: 3 !important;
  pointer-events: auto !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  background: rgba(27, 30, 29, .78) !important;
  color: #f7f7f2 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  backdrop-filter: blur(10px);
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease;
}
.lightbox-close:hover,
.lightbox-nav:hover {
  background: rgba(108, 128, 63, .92) !important;
  border-color: rgba(255,255,255,.38) !important;
}
.lightbox-close {
  position: fixed !important;
  top: 22px !important;
  right: 26px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 999px !important;
  font-size: 34px !important;
  line-height: 1 !important;
  padding: 0 0 4px 0 !important;
}
.lightbox-nav {
  position: fixed !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 56px !important;
  height: 74px !important;
  border-radius: 18px !important;
  font-size: 58px !important;
  line-height: .8 !important;
}
.lightbox-nav:hover {
  transform: translateY(-50%) scale(1.04) !important;
}
.lightbox-nav.prev {
  left: 26px !important;
}
.lightbox-nav.next {
  right: 26px !important;
}
.lightbox-nav:disabled {
  opacity: .22 !important;
  cursor: default !important;
  transform: translateY(-50%) !important;
}
@media (max-width: 700px) {
  .lightbox-close {
    top: 12px !important;
    right: 12px !important;
  }
  .lightbox-nav {
    width: 42px !important;
    height: 58px !important;
    font-size: 42px !important;
  }
  .lightbox-nav.prev {
    left: 10px !important;
  }
  .lightbox-nav.next {
    right: 10px !important;
  }
}


/* V2.3.5 — focused sorting fix */
#clipsTable th[data-sort] {
  cursor: pointer;
}
#clipsTable th[data-sort] .sort-head {
  width: 100%;
  justify-content: flex-start;
  cursor: pointer;
}
#clipsTable th.active-sort .sort-head {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 6px 10px;
}
#clipsTable .sort-indicator {
  font-weight: 900;
}


/* V2.3.5 — column sorting final hotfix */
#clipsTable thead th[data-sort] {
  cursor: pointer !important;
  user-select: none;
}
#clipsTable thead th[data-sort]:hover .sort-head,
#clipsTable thead th[data-sort]:hover {
  color: var(--accent-strong) !important;
}
#clipsTable thead th[data-sort] .sort-head {
  pointer-events: none;
}
#clipsTable thead th.active-sort .sort-head {
  color: var(--accent-strong) !important;
  background: var(--accent-soft) !important;
  border-radius: 999px;
}


/* V2.3.6 — final clickable sort headers */
#clipsTable th[data-sort],
#clipsTable th[data-sort] * {
  cursor: pointer !important;
}
#clipsTable th[data-sort] .sort-head {
  pointer-events: auto !important;
  user-select: none;
}
#clipsTable th.active-sort .sort-head {
  outline: 2px solid rgba(111, 127, 63, .24);
  background: var(--accent-soft);
  color: var(--accent-strong);
}


/* V2.3.7 — Production cards layout fix + global clip results table */

/* Production cards: strict poster/content grid to prevent text overlap. */
.production-card-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(620px, 760px)) !important;
  gap: 26px !important;
  align-items: stretch !important;
}
.production-card {
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr) !important;
  gap: 26px !important;
  align-items: start !important;
  min-height: 380px !important;
  padding: 20px !important;
  overflow: hidden !important;
}
.production-poster-block {
  width: 250px !important;
  min-width: 250px !important;
  height: 350px !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  display: grid !important;
  place-items: center !important;
  align-self: start !important;
}
.production-poster-block img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  border-radius: 24px !important;
}
.production-poster-block .ui-icon {
  width: 44px !important;
  height: 44px !important;
  opacity: .65;
}
.production-card-main {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
}
.production-title-line {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  align-items: start !important;
}
.production-title-line h3 {
  font-size: clamp(30px, 3.2vw, 46px) !important;
  line-height: .96 !important;
  margin: 0 !important;
  letter-spacing: -0.055em !important;
  overflow-wrap: anywhere !important;
}
.production-meta {
  margin-top: 8px !important;
}
.production-summary {
  max-width: 100% !important;
  margin-top: 14px !important;
  font-size: 17px !important;
  line-height: 1.42 !important;
}
.production-card-stats {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin-top: 18px !important;
}
.production-card-actions {
  width: 100% !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 9px !important;
  margin-top: 12px !important;
}
@media (max-width: 860px) {
  .production-card-grid {
    grid-template-columns: 1fr !important;
  }
  .production-card {
    grid-template-columns: 1fr !important;
  }
  .production-poster-block {
    width: min(100%, 290px) !important;
    min-width: 0 !important;
    height: 410px !important;
  }
}

/* Recherche globale clips: reuse the Recherche clips table language. */
.global-clips-table-wrap {
  max-height: none !important;
  margin: 0 10px 12px !important;
  overflow-x: auto !important;
  border-radius: 20px !important;
}
.global-clips-table {
  width: 100% !important;
  min-width: 1180px !important;
  border-collapse: separate !important;
  border-spacing: 0 7px !important;
  padding: 0 8px 8px !important;
}
.global-clips-table th {
  text-align: left !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  padding: 6px 10px !important;
  background: transparent !important;
  border: 0 !important;
}
.global-clips-table td {
  background: var(--panel) !important;
  border-top: 1px solid var(--line) !important;
  border-bottom: 1px solid var(--line) !important;
  padding: 9px 10px !important;
  vertical-align: middle !important;
}
.global-clips-table tr td:first-child {
  border-left: 1px solid var(--line) !important;
  border-radius: 16px 0 0 16px !important;
}
.global-clips-table tr td:last-child {
  border-right: 1px solid var(--line) !important;
  border-radius: 0 16px 16px 0 !important;
}
.global-clips-table tr:hover td {
  background: var(--panel-2) !important;
}
.global-clips-table .desc-cell {
  min-width: 300px !important;
  max-width: 520px !important;
}
.global-match-hint {
  margin-top: 4px !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
}
.global-match-hint strong {
  color: var(--accent-strong) !important;
}
.global-clips-table.no-thumb-mode .global-clip-thumb-cell,
.global-clips-table.no-thumb-mode .global-clip-thumb-head {
  display: none !important;
}
.global-clips-section.thumb-mode-0 .global-clips-table {
  min-width: 980px !important;
}
.global-clip-row {
  cursor: pointer !important;
}
.global-clip-row .table-thumb {
  transition: transform 130ms ease, box-shadow 130ms ease !important;
}
.global-clip-row:hover .table-thumb {
  transform: scale(1.08) !important;
  box-shadow: 0 10px 28px rgba(0,0,0,.18) !important;
}

/* V2.3.8 Administration BD / import package sécurisé */
.admin-instructions {
  margin: 10px 0 14px 20px;
  line-height: 1.45;
}
.admin-preview-box {
  margin-top: 14px;
}
.admin-preview {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: var(--panel-soft, rgba(0,0,0,0.025));
}
.admin-preview.ok {
  border-color: rgba(70, 140, 70, 0.45);
}
.admin-preview.error {
  border-color: rgba(180, 70, 70, 0.55);
}
.admin-preview h4 {
  margin: 0 0 10px 0;
}
.admin-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
  margin: 10px 0;
}
.admin-preview-grid > div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: var(--card-bg, rgba(255,255,255,0.5));
}
.admin-preview-grid strong,
.admin-preview-grid span {
  display: block;
}
.admin-preview-grid span {
  font-size: 1.25rem;
  margin-top: 3px;
}
.admin-warnings,
.admin-errors {
  margin-top: 10px;
  padding: 10px;
  border-radius: 12px;
}
.admin-warnings {
  background: rgba(220, 160, 40, 0.12);
}
.admin-errors {
  background: rgba(180, 60, 60, 0.12);
}
.backup-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 360px;
  overflow: auto;
}
.backup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
}
.backup-row strong,
.backup-row span {
  display: block;
}
.backup-row span {
  opacity: 0.72;
  font-size: 0.86rem;
  margin-top: 2px;
}

/* v2.3.9 fiche import repair */
.fiche-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 0 0 10px;
}

/* V2.4.0 — UI, vocabulaires et fiche production */
.drawer-panel {
  width: min(990px, 96vw) !important;
}
.production-card {
  grid-template-columns: 250px minmax(0, 1fr) !important;
}
.production-poster-column {
  width: 250px !important;
  min-width: 250px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  align-self: start !important;
}
.production-poster-block {
  position: relative !important;
}
.poster-fiche-badge {
  position: absolute !important;
  left: 10px !important;
  bottom: 10px !important;
  right: auto !important;
  max-width: calc(100% - 20px) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,.16) !important;
  backdrop-filter: blur(8px) !important;
}
.production-title-line {
  grid-template-columns: minmax(0, 1fr) !important;
}
.production-poster-stats,
.production-card-stats {
  width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 7px !important;
  margin-top: 0 !important;
}
.production-poster-stats span,
.production-card-stats span {
  display: block !important;
  background: #f3efe5 !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  padding: 8px 10px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}
.production-poster-stats strong,
.production-card-stats strong {
  color: var(--text) !important;
}
.improved-vocab-grid {
  grid-template-columns: minmax(190px, .8fr) minmax(260px, 1.2fr) minmax(260px, 1fr) !important;
}
.inline-add-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}
.helper-text {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  margin: 6px 0 12px;
}
.controlled-toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.controlled-toolbar-inline span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-right: auto;
}
.controlled-grid-selectable {
  max-height: 420px;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.45);
}
.controlled-grid-selectable .controlled-pill {
  border-radius: 12px;
  cursor: pointer;
  user-select: none;
}
.controlled-grid-selectable .controlled-pill input {
  width: auto;
  margin: 0;
  accent-color: var(--accent);
}
.controlled-grid-selectable .controlled-pill:has(input:checked) {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.fiche-detail-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2, #f8fafc);
}
.fiche-detail-toolbar > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.selectable-fiche-table .select-col,
.selectable-fiche-table .action-col {
  width: 42px;
  text-align: center;
  white-space: nowrap;
}
.selectable-fiche-table input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}
.selectable-fiche-table tr:has(.fiche-detail-check:checked) td {
  background: var(--accent-soft) !important;
}
.field-edit.danger {
  color: var(--danger);
}
.field-edit.danger:hover {
  background: var(--danger-soft);
}
.fiche-main-inline-editor {
  min-width: min(100%, 360px);
}
.editable-fiche-table td {
  vertical-align: top;
}

@media (max-width: 860px) {
  .production-card {
    grid-template-columns: 1fr !important;
  }
  .production-poster-column {
    width: min(100%, 290px) !important;
    min-width: 0 !important;
  }
  .improved-vocab-grid {
    grid-template-columns: 1fr !important;
  }
}

/* V2.4.1 — ajustements UI demandés */
.drawer-panel {
  width: min(1140px, 98vw) !important;
  max-width: 98vw !important;
}

/* Les statuts de fiche sur les cartes production ne doivent plus être superposés au poster. */
.production-poster-column .poster-fiche-badge {
  position: static !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 100% !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  white-space: normal !important;
  text-align: center !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.production-poster-stats {
  display: grid !important;
  gap: 6px !important;
}

/* Fiche source > Clips liés : empêcher la colonne validation et les longs lieux de sortir de l’écran. */
.source-linked-clips-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.source-mode .linked-clips-table {
  width: 100%;
  min-width: 1040px;
  table-layout: fixed;
}

.source-mode .linked-clips-table th,
.source-mode .linked-clips-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: top;
}

.source-mode .linked-clips-table th:nth-child(1),
.source-mode .linked-clips-table td:nth-child(1) { width: 42px; }
.source-mode .linked-clips-table th:nth-child(2),
.source-mode .linked-clips-table td:nth-child(2) { width: 116px; }
.source-mode .linked-clips-table th:nth-child(3),
.source-mode .linked-clips-table td:nth-child(3) { width: 96px; }
.source-mode .linked-clips-table th:nth-child(4),
.source-mode .linked-clips-table td:nth-child(4) { width: 72px; }
.source-mode .linked-clips-table th:nth-child(5),
.source-mode .linked-clips-table td:nth-child(5) { width: 80px; }
.source-mode .linked-clips-table th:nth-child(6),
.source-mode .linked-clips-table td:nth-child(6) { width: 160px; }
.source-mode .linked-clips-table th:nth-child(7),
.source-mode .linked-clips-table td:nth-child(7) { width: 145px; }
.source-mode .linked-clips-table th:nth-child(8),
.source-mode .linked-clips-table td:nth-child(8) { width: 170px; }

.source-mode .linked-clips-table .badge {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.selectable-linked-clips tbody tr,
.selectable-fiche-table tbody tr,
#clipsTable tbody tr {
  user-select: none;
}

.selectable-linked-clips tbody tr:hover,
.selectable-fiche-table tbody tr:hover,
#clipsTable tbody tr:hover {
  background: rgba(111, 116, 82, 0.07);
}

/* Vocabulaires : lecture en colonnes verticales de 10 éléments. */
.controlled-grid-selectable.vocab-column-list {
  display: grid !important;
  grid-template-rows: repeat(10, minmax(34px, auto));
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  grid-template-columns: none !important;
  align-items: start;
  gap: 8px 12px;
  overflow-x: auto;
  overflow-y: hidden;
  max-height: none;
}

.vocab-column-list .controlled-pill {
  display: flex !important;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
}

.vocab-column-list .controlled-pill span {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.vocab-column-list .controlled-pill small {
  opacity: .65;
  font-size: 11px;
}

/* Administration BD : sections moins collées et retrait de la maintenance locale. */
#adminView > .panel,
#adminView > .admin-section-stack,
#adminView > .log-box {
  margin-bottom: 22px;
}

.admin-section-stack {
  display: grid;
  gap: 18px;
}

#adminView .admin-import-panel + .admin-import-panel,
#adminView .admin-import-panel + .admin-section-stack,
#adminView .admin-section-stack + .admin-list-panel {
  margin-top: 4px;
}

@media (max-width: 760px) {
  .drawer-panel {
    width: 100vw !important;
    max-width: 100vw !important;
  }
  .controlled-grid-selectable.vocab-column-list {
    grid-template-rows: none;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr !important;
    overflow-x: visible;
  }
}

/* V2.5.0 — recherche compacte, icônes SVG locales, ajout de lignes fiche */
.ui-icon.svg-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: inline-block;
  vertical-align: -4px;
  flex: 0 0 auto;
  opacity: .9;
}
.button .ui-icon.svg-icon,
.field-edit .ui-icon.svg-icon,
.source-field-edit .ui-icon.svg-icon {
  pointer-events: none;
}

#clipsView > .filters-panel {
  display: grid !important;
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, .9fr) minmax(180px, .9fr) minmax(150px, .75fr) minmax(210px, 1fr) minmax(150px, .75fr) minmax(140px, .65fr);
  gap: 12px;
  align-items: end;
  padding: 22px 22px 18px;
  border-radius: 24px;
}
#clipsView > .filters-panel .wide { grid-column: auto; }
#clipsView > .filters-panel .compact-duration-field { grid-column: span 3; }
#clipsView > .filters-panel .modern-check {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  display: inline-flex;
  align-items: center;
}
#clipsView > .filters-panel #applyFiltersBtn,
#clipsView > .filters-panel #clearClipFiltersBtn {
  min-height: 42px;
}
.location-autocomplete-field input { width: 100%; }
.visually-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.duration-input-row {
  display: inline-grid;
  grid-template-columns: minmax(92px, 110px) minmax(92px, 110px);
  gap: 10px;
  margin-bottom: 6px;
}
.duration-input-row > div { display: grid; gap: 4px; }
.duration-input-row small {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  font-weight: 800;
}
.duration-input-row input {
  min-height: 34px !important;
  padding: 7px 10px !important;
  border-radius: 10px !important;
  background: #fff;
}
.compact-range-row {
  position: relative;
  display: grid !important;
  grid-template-columns: 1fr !important;
  min-height: 22px;
  max-width: 520px;
}
.compact-range-row input[type="range"] {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100%;
  pointer-events: none;
  background: transparent;
}
.compact-range-row input[type="range"]::-webkit-slider-thumb { pointer-events: auto; }
.compact-range-row input[type="range"]::-moz-range-thumb { pointer-events: auto; }
.duration-hidden-label { display: none !important; }
.page-size-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}
.page-size-inline select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 7px 24px 7px 9px;
  min-height: 34px;
  background: #fff;
  font: inherit;
  color: var(--text);
}
.fiche-new-row td {
  background: rgba(111,116,82,.06);
  vertical-align: top;
}
.fiche-new-row .inline-input {
  min-width: 150px;
  padding: 8px 9px;
  border-radius: 10px;
}
.fiche-new-row .action-col {
  min-width: 150px;
}
.fiche-empty-row td {
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 18px;
}
.add-person-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.add-person-inline input {
  border: 0;
  outline: 0;
  min-width: 220px;
  padding: 6px 8px;
  background: transparent;
  font: inherit;
}
.add-person-inline .add-person {
  border-style: solid;
}
@media (max-width: 1200px) {
  #clipsView > .filters-panel {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  #clipsView > .filters-panel .compact-duration-field { grid-column: span 2; }
}
@media (max-width: 780px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .compact-duration-field { grid-column: auto; }
  .table-actions-right { flex-wrap: wrap; justify-content: flex-end; }
  .add-person-inline { width: 100%; border-radius: 14px; }
  .add-person-inline input { min-width: 0; flex: 1; }
}

/* V2.5.1 — recherche clips plus compacte + corrections duration/autocomplete/batch */
#clipsView > .filters-panel {
  max-width: 1180px;
  margin-left: 0;
  margin-right: auto;
  padding: 18px 20px 16px !important;
  border-radius: 22px !important;
  display: grid !important;
  grid-template-columns: minmax(250px, 1.55fr) minmax(180px, .85fr) minmax(180px, .85fr);
  gap: 10px 14px !important;
  align-items: end !important;
}
#clipsView > .filters-panel .field,
#clipsView > .filters-panel .modern-check {
  min-width: 0;
}
#clipsView > .filters-panel label,
#clipsView > .filters-panel .field > label {
  font-size: 11px !important;
  letter-spacing: .06em !important;
  margin-bottom: 5px !important;
}
#clipsView > .filters-panel input,
#clipsView > .filters-panel select,
#clipsView > .filters-panel .modern-check {
  min-height: 38px !important;
  height: 38px !important;
  padding-top: 7px !important;
  padding-bottom: 7px !important;
  border-radius: 13px !important;
  font-size: 13px !important;
}
#clipsView > .filters-panel .wide,
#clipsView > .filters-panel .location-autocomplete-field {
  grid-column: auto !important;
}
#clipsView > .filters-panel #thumbFilter,
#clipsView > .filters-panel label[for="thumbFilter"],
#clipsView > .filters-panel .field:has(#thumbFilter) {
  display: none !important;
}
#clipsView > .filters-panel .compact-duration-field {
  grid-column: span 1 !important;
  max-width: 260px;
}
#clipsView > .filters-panel .compact-duration-field > label {
  margin-bottom: 2px !important;
}
.duration-input-row {
  grid-template-columns: 1fr 1fr !important;
  gap: 7px !important;
  margin-bottom: 4px !important;
}
.duration-input-row small {
  font-size: 10px !important;
  line-height: 1 !important;
}
.duration-input-row input {
  min-height: 34px !important;
  height: 34px !important;
  padding: 6px 9px !important;
  font-size: 12px !important;
}
.compact-range-row {
  height: 24px !important;
  min-height: 24px !important;
  max-width: 240px !important;
  display: block !important;
  position: relative !important;
  margin-top: 0 !important;
}
.compact-range-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10px;
  height: 4px;
  border-radius: 999px;
  background: rgba(111,116,82,.24);
}
.compact-range-row input[type="range"] {
  position: absolute !important;
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background: transparent !important;
  pointer-events: none !important;
}
.compact-range-row input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
  border: 0;
}
.compact-range-row input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
  border: 0;
}
.compact-range-row input[type="range"]::-webkit-slider-thumb {
  pointer-events: auto !important;
  -webkit-appearance: none !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 2px solid #fff !important;
  background: var(--accent) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
  margin-top: -7px !important;
}
.compact-range-row input[type="range"]::-moz-range-thumb {
  pointer-events: auto !important;
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  border: 2px solid #fff !important;
  background: var(--accent) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
}
#durationMinRange { z-index: 3; }
#durationMaxRange { z-index: 4; }
#durationRangeHint {
  display: none !important;
}
#clipsView > .filters-panel .modern-check {
  justify-content: center;
  padding-left: 13px !important;
  padding-right: 13px !important;
}
#clipsView > .filters-panel #applyFiltersBtn,
#clipsView > .filters-panel #clearClipFiltersBtn {
  min-height: 38px !important;
  height: 38px !important;
  padding: 0 18px !important;
  border-radius: 13px !important;
  align-self: end;
}
#locationFilter,
#locationFilter:focus,
#searchInput,
#searchInput:focus {
  color: var(--text) !important;
  background: #fff !important;
  -webkit-text-fill-color: var(--text) !important;
  caret-color: var(--accent) !important;
}
#locationFilter::placeholder,
#searchInput::placeholder {
  color: rgba(43,44,36,.48) !important;
  -webkit-text-fill-color: rgba(43,44,36,.48) !important;
}
#locationFilter::selection,
#searchInput::selection {
  color: #fff !important;
  background: var(--accent) !important;
}
#locationFilter:-webkit-autofill,
#searchInput:-webkit-autofill {
  -webkit-text-fill-color: var(--text) !important;
  box-shadow: 0 0 0 1000px #fff inset !important;
}
.batch-table .batch-action,
.batch-table .batch-value {
  transition: border-color .15s ease, background .15s ease;
}
.batch-table .batch-action:not([value="ignore"]),
.batch-table tr:has(.batch-action option[value="replace"]:checked) .batch-value {
  border-color: var(--accent);
}

@media (min-width: 1180px) {
  #clipsView > .filters-panel {
    grid-template-columns: minmax(255px, 1.35fr) minmax(160px, .75fr) minmax(160px, .75fr) minmax(130px, .65fr) minmax(215px, 1fr) minmax(145px, .7fr);
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: span 2 !important;
  }
}
@media (max-width: 900px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr 1fr !important;
  }
  #clipsView > .filters-panel .wide,
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: span 2 !important;
    max-width: none;
  }
}
@media (max-width: 620px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr !important;
    padding: 14px !important;
  }
  #clipsView > .filters-panel .wide,
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: auto !important;
  }
}

/* V2.5.2 — recherche clips: layout en 3 lignes + durée encadrée */
#clipsView > .filters-panel {
  max-width: 1080px !important;
  padding: 18px 20px 20px !important;
  gap: 13px 14px !important;
  grid-template-columns: minmax(280px, 1.45fr) minmax(180px, .85fr) minmax(180px, .85fr) !important;
  align-items: end !important;
}

#clipsView > .filters-panel .field {
  min-width: 0 !important;
}

#clipsView > .filters-panel .field select,
#clipsView > .filters-panel .field input {
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

#clipsView > .filters-panel select {
  padding-left: 14px !important;
  padding-right: 34px !important;
  color: var(--text) !important;
  background-color: #fff !important;
  -webkit-text-fill-color: var(--text) !important;
}

/* Première ligne: recherche, production, source. */
#clipsView > .filters-panel .field.wide {
  grid-column: 1 / 2 !important;
  grid-row: 1 !important;
}
#clipsView > .filters-panel .field:has(#productionFilter) {
  grid-column: 2 / 3 !important;
  grid-row: 1 !important;
}
#clipsView > .filters-panel .field:has(#sourceFilter) {
  grid-column: 3 / 4 !important;
  grid-row: 1 !important;
}

/* Deuxième ligne: type, lieu, validation, audio. */
#clipsView > .filters-panel .field:has(#typeFilter) {
  grid-column: 1 / 2 !important;
  grid-row: 2 !important;
}
#clipsView > .filters-panel .location-autocomplete-field {
  grid-column: 2 / 3 !important;
  grid-row: 2 !important;
}
#clipsView > .filters-panel .field:has(#validationFilter) {
  grid-column: 3 / 4 !important;
  grid-row: 2 !important;
}
#clipsView > .filters-panel .modern-check {
  grid-column: 1 / 2 !important;
  grid-row: 3 !important;
  justify-self: stretch !important;
  align-self: stretch !important;
  min-height: 42px !important;
  height: 42px !important;
  margin-top: 0 !important;
}

/* Troisième ligne: durée + actions. */
#clipsView > .filters-panel .compact-duration-field {
  grid-column: 2 / 4 !important;
  grid-row: 3 !important;
  max-width: none !important;
  width: 100% !important;
  padding: 10px 12px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.72) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55) !important;
  box-sizing: border-box !important;
}

#clipsView > .filters-panel .compact-duration-field > label {
  margin-bottom: 8px !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row {
  max-width: 260px !important;
  margin-bottom: 9px !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row input {
  background: #fff !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row {
  height: 30px !important;
  min-height: 30px !important;
  max-width: 100% !important;
  margin: 0 !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row::before {
  top: 13px !important;
  left: 2px !important;
  right: 2px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"] {
  top: 3px !important;
  height: 28px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"]::-webkit-slider-thumb {
  width: 20px !important;
  height: 20px !important;
  margin-top: -8px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"]::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
}

#clipsView > .filters-panel #applyFiltersBtn,
#clipsView > .filters-panel #clearClipFiltersBtn {
  grid-row: 4 !important;
  min-height: 42px !important;
  height: 42px !important;
  margin-top: 2px !important;
}
#clipsView > .filters-panel #applyFiltersBtn {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel #clearClipFiltersBtn {
  grid-column: 2 / 3 !important;
}

@media (min-width: 1180px) {
  #clipsView > .filters-panel {
    grid-template-columns: minmax(300px, 1.45fr) minmax(210px, .95fr) minmax(210px, .95fr) !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: 2 / 4 !important;
  }
}

@media (max-width: 900px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr 1fr !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .field:has(#productionFilter),
  #clipsView > .filters-panel .field:has(#sourceFilter),
  #clipsView > .filters-panel .field:has(#typeFilter),
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .field:has(#validationFilter),
  #clipsView > .filters-panel .modern-check,
  #clipsView > .filters-panel .compact-duration-field,
  #clipsView > .filters-panel #applyFiltersBtn,
  #clipsView > .filters-panel #clearClipFiltersBtn {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 620px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: auto !important;
  }
}

/* V2.5.3 — Recherche clips: lisibilité selects + durée horizontale */
#clipsView > .filters-panel {
  max-width: 1060px !important;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) !important;
  gap: 14px 16px !important;
  padding: 18px 20px 20px !important;
  align-items: end !important;
}

/* Réorganisation en 2 colonnes plus lisibles pour éviter les champs trop étroits. */
#clipsView > .filters-panel .field.wide,
#clipsView > .filters-panel .field:has(#productionFilter),
#clipsView > .filters-panel .field:has(#sourceFilter),
#clipsView > .filters-panel .field:has(#typeFilter),
#clipsView > .filters-panel .location-autocomplete-field,
#clipsView > .filters-panel .field:has(#validationFilter),
#clipsView > .filters-panel .modern-check,
#clipsView > .filters-panel .compact-duration-field,
#clipsView > .filters-panel #applyFiltersBtn,
#clipsView > .filters-panel #clearClipFiltersBtn {
  grid-row: auto !important;
}

/* Ligne 1: Recherche pleine largeur. */
#clipsView > .filters-panel .field.wide {
  grid-column: 1 / -1 !important;
}

/* Ligne 2: Production / Source. */
#clipsView > .filters-panel .field:has(#productionFilter) {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel .field:has(#sourceFilter) {
  grid-column: 2 / 3 !important;
}

/* Ligne 3: Type / Lieu. */
#clipsView > .filters-panel .field:has(#typeFilter) {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel .location-autocomplete-field {
  grid-column: 2 / 3 !important;
}

/* Ligne 4: Validation / audio. */
#clipsView > .filters-panel .field:has(#validationFilter) {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel .modern-check {
  grid-column: 2 / 3 !important;
  align-self: end !important;
  min-height: 46px !important;
  height: 46px !important;
}

/* Ligne 5: Durée pleine largeur, mais barre à droite des valeurs. */
#clipsView > .filters-panel .compact-duration-field {
  grid-column: 1 / -1 !important;
  display: grid !important;
  grid-template-columns: 260px minmax(250px, 1fr) !important;
  grid-template-rows: auto auto !important;
  column-gap: 18px !important;
  row-gap: 8px !important;
  align-items: end !important;
  max-width: none !important;
  width: 100% !important;
  padding: 14px 14px 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.78) !important;
}

#clipsView > .filters-panel .compact-duration-field > label {
  grid-column: 1 / -1 !important;
  margin: 0 0 2px !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row {
  grid-column: 1 / 2 !important;
  grid-row: 2 !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row > div {
  min-width: 0 !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row small {
  display: block !important;
  margin: 0 0 5px !important;
  color: var(--muted) !important;
}

#clipsView > .filters-panel .compact-duration-field .duration-input-row input {
  min-height: 42px !important;
  height: 42px !important;
  line-height: 42px !important;
  padding: 0 12px !important;
  border-radius: 12px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row {
  grid-column: 2 / 3 !important;
  grid-row: 2 !important;
  align-self: end !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 0 4px 0 0 !important;
  max-width: none !important;
  width: 100% !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row::before {
  top: 20px !important;
  left: 0 !important;
  right: 0 !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"] {
  top: 10px !important;
  height: 28px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"]::-webkit-slider-thumb {
  width: 20px !important;
  height: 20px !important;
  margin-top: -8px !important;
}

#clipsView > .filters-panel .compact-duration-field .compact-range-row input[type="range"]::-moz-range-thumb {
  width: 20px !important;
  height: 20px !important;
}

/* Ligne 6: boutons. */
#clipsView > .filters-panel #applyFiltersBtn {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel #clearClipFiltersBtn {
  grid-column: 2 / 3 !important;
}

/* Les selects étaient visuellement coupés sur certains navigateurs/macOS. */
#clipsView > .filters-panel .field select,
#clipsView > .filters-panel .field input[list],
#clipsView > .filters-panel #locationFilter,
#clipsView > .filters-panel #searchInput {
  min-height: 46px !important;
  height: 46px !important;
  line-height: normal !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  color: var(--text) !important;
  -webkit-text-fill-color: var(--text) !important;
  background-color: #fffefa !important;
}

#clipsView > .filters-panel .field select {
  padding-left: 14px !important;
  padding-right: 40px !important;
  overflow: visible !important;
  text-overflow: clip !important;
}

#clipsView > .filters-panel .field select option {
  color: var(--text) !important;
  background: #fff !important;
}

@media (min-width: 1180px) {
  #clipsView > .filters-panel {
    grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: 1 / -1 !important;
  }
}

@media (max-width: 780px) {
  #clipsView > .filters-panel {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .field:has(#productionFilter),
  #clipsView > .filters-panel .field:has(#sourceFilter),
  #clipsView > .filters-panel .field:has(#typeFilter),
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .field:has(#validationFilter),
  #clipsView > .filters-panel .modern-check,
  #clipsView > .filters-panel .compact-duration-field,
  #clipsView > .filters-panel #applyFiltersBtn,
  #clipsView > .filters-panel #clearClipFiltersBtn {
    grid-column: auto !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .compact-duration-field .duration-input-row,
  #clipsView > .filters-panel .compact-duration-field .compact-range-row {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}

/* V2.5.4 — icônes SVG nettoyées, contraste et menu principal */
.ui-icon.svg-icon.mask-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  background-color: currentColor;
  -webkit-mask-image: var(--icon-url);
  mask-image: var(--icon-url);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
  vertical-align: -0.18em;
  opacity: 1;
  object-fit: initial;
}

.sidebar .nav {
  min-height: 62px;
  gap: 14px;
  padding: 10px 14px;
  color: #efece2;
}

.sidebar .nav .ui-icon.svg-icon.mask-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  color: currentColor;
  opacity: .96;
}

.sidebar .nav.active,
.sidebar .nav:hover {
  color: #ffffff;
}

.sidebar .nav.active .ui-icon.svg-icon.mask-icon,
.sidebar .nav:hover .ui-icon.svg-icon.mask-icon {
  color: #ffffff;
}

.button .ui-icon.svg-icon.mask-icon,
.field-edit .ui-icon.svg-icon.mask-icon,
.source-field-edit .ui-icon.svg-icon.mask-icon,
.thumb-mode-icon .ui-icon.svg-icon.mask-icon,
.fiche-badge .ui-icon.svg-icon.mask-icon {
  background-color: currentColor;
  opacity: 1;
}

.field-edit.danger .ui-icon.svg-icon.mask-icon,
.button.danger .ui-icon.svg-icon.mask-icon {
  color: currentColor;
}

.dashboard-icon-card {
  display: grid;
  gap: 10px;
  min-height: 132px;
}

.dashboard-icon-card .stat-label {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.dashboard-icon-card .dashboard-stat-icon {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  color: var(--accent-strong);
  opacity: .95;
}

.dashboard-icon-card strong {
  font-size: 30px;
  line-height: 1.05;
}

body.dark-mode .dashboard-icon-card .dashboard-stat-icon {
  color: #f8f6ef;
}

body.dark-mode .sidebar .nav,
body.dark-mode .sidebar .nav .ui-icon.svg-icon.mask-icon {
  color: #f8f6ef;
}

body.dark-mode .button.secondary .ui-icon.svg-icon.mask-icon,
body.dark-mode .thumb-mode-icon .ui-icon.svg-icon.mask-icon,
body.dark-mode .field-edit .ui-icon.svg-icon.mask-icon,
body.dark-mode .source-field-edit .ui-icon.svg-icon.mask-icon {
  color: currentColor;
}

@media (max-width: 1000px) {
  .sidebar .nav {
    min-height: 54px;
  }
  .sidebar .nav .ui-icon.svg-icon.mask-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}

/* V2.6.0 — Dashboard géographie / fondation lieux */
.dashboard-icon-card .dashboard-stat-icon {
  width: 50px !important;
  height: 50px !important;
  min-width: 50px !important;
  min-height: 50px !important;
}

.geography-panel {
  grid-column: 1 / -1;
}

.geo-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.geo-metric {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.5);
}

.geo-metric-icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  color: var(--accent-strong);
}

.geo-metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.geo-metric strong {
  font-size: 26px;
  line-height: 1;
}

.geo-dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.geo-dashboard-columns h4 {
  margin: 0 0 10px;
}

.country-index,
.location-review-list {
  display: grid;
  gap: 8px;
}

.country-row,
.location-review-item {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}

.country-row {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
}

.country-row span,
.location-review-item strong {
  font-weight: 800;
  overflow-wrap: anywhere;
}

.country-row small,
.location-review-item small,
.location-review-item span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.geo-map-placeholder {
  margin-top: 18px;
  min-height: 150px;
  border: 1px dashed var(--line-strong, var(--line));
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.55), rgba(241,238,229,.78));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.geo-placeholder-icon {
  width: 64px;
  height: 64px;
  min-width: 64px;
  color: var(--accent-strong);
}

.geo-map-placeholder div {
  display: grid;
  gap: 6px;
}

.geo-map-placeholder span {
  color: var(--muted);
}

body.dark-mode .geo-metric,
body.dark-mode .country-row,
body.dark-mode .location-review-item {
  background: rgba(255,255,255,.05);
}

body.dark-mode .geo-map-placeholder {
  background: rgba(255,255,255,.04);
}

body.dark-mode .geo-metric-icon,
body.dark-mode .geo-placeholder-icon {
  color: #f8f6ef;
}

@media (max-width: 920px) {
  .geo-dashboard-grid,
  .geo-dashboard-columns {
    grid-template-columns: 1fr;
  }
}

/* V2.6.1 — géographie à granularité variable */
.geo-dashboard-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.location-review-item.cleanup {
  border-style: dashed;
  background: rgba(161, 75, 54, .05);
}
body.dark-mode .location-review-item.cleanup {
  background: rgba(255,255,255,.04);
}
@media (max-width: 1180px) {
  .geo-dashboard-columns {
    grid-template-columns: 1fr;
  }
}

/* V2.6.2 — Gestion des lieux structurés */
.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.location-manager-filters {
  margin-top: 12px;
}
.compact-actions {
  margin-top: 8px;
  margin-bottom: 8px;
}
.locations-manager-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}
.location-edit-card {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.78);
  padding: 12px;
  box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.location-edit-card.merge-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 10px 24px rgba(15,23,42,.06);
}
.location-edit-select {
  padding-top: 6px;
}
.location-edit-select input {
  width: auto;
  accent-color: var(--accent);
}
.location-edit-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}
.location-edit-header strong {
  display: block;
  font-size: 16px;
  color: var(--text);
}
.location-edit-header span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}
.location-edit-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.location-edit-badges small {
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--muted);
  padding: 4px 8px;
  font-weight: 700;
  white-space: nowrap;
}
.location-edit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
}
.location-edit-grid label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.location-edit-grid label.wide {
  grid-column: span 2;
}
.location-edit-grid input,
.location-edit-grid select {
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: white;
  color: var(--text);
  padding: 8px 10px;
  font-size: 13px;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
}
.location-edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.error-text {
  color: var(--danger);
}
@media (max-width: 920px) {
  .location-edit-grid { grid-template-columns: repeat(2, minmax(140px, 1fr)); }
}
@media (max-width: 620px) {
  .location-edit-card { grid-template-columns: 1fr; }
  .location-edit-header { flex-direction: column; }
  .location-edit-badges { justify-content: flex-start; }
  .location-edit-grid { grid-template-columns: 1fr; }
  .location-edit-grid label.wide { grid-column: auto; }
}

/* V2.6.3 — création de lieux structurés depuis modification en lot */
.batch-location-picker {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.batch-location-create-panel {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-2, rgba(255,255,255,.55));
}
.batch-location-panel-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.batch-location-panel-title strong {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
}
.batch-location-panel-title span {
  color: var(--muted);
  font-size: 13px;
}
.batch-location-create-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}
.batch-location-create-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.batch-location-create-grid .wide {
  grid-column: 1 / -1;
}
.batch-location-create-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
@media (max-width: 900px) {
  .batch-location-picker {
    grid-template-columns: 1fr;
  }
  .batch-location-create-grid {
    grid-template-columns: 1fr;
  }
}

/* V2.6.4 — Paramètres en sous-onglets et gestion des lieux séparée */
.settings-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.62);
}
.settings-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
  cursor: pointer;
}
.settings-tab-btn .ui-icon { width: 22px; height: 22px; }
.settings-tab-btn:hover {
  color: var(--accent-strong);
  background: #f3efe5;
  border-color: var(--line);
}
.settings-tab-btn.active {
  color: var(--accent-strong);
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px rgba(111,106,85,.12);
}
.settings-tab-panel { display: none; }
.settings-tab-panel.active { display: block; }
.settings-tab-panel .settings-panel { margin-top: 0; }
.locations-manager-list {
  max-height: 70vh;
  overflow: auto;
  padding-right: 4px;
}
.location-edit-card {
  scroll-margin-top: 90px;
}
.location-edit-header strong,
.location-edit-header span {
  overflow-wrap: anywhere;
}
.location-manager-filters {
  align-items: end;
}
.vocab-panel code,
.locations-panel code {
  background: #f3efe5;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 5px;
}
@media (max-width: 740px) {
  .settings-subnav { display: grid; grid-template-columns: 1fr; }
  .settings-tab-btn { justify-content: flex-start; width: 100%; }
  .locations-manager-list { max-height: none; overflow: visible; }
}

/* V2.6.5 — Gestion des lieux: voir les clips liés */
.location-linked-clips-btn.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-color: var(--accent);
}
.location-linked-clips-panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.62);
  overflow: hidden;
}
body.dark .location-linked-clips-panel {
  background: rgba(255,255,255,.05);
}
.location-linked-clips-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(111,116,82,.08);
}
.location-linked-clips-head span {
  color: var(--muted);
  font-size: 13px;
}
.location-linked-clips-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 0;
  border-radius: 0;
}
.location-linked-clips-table {
  min-width: 980px;
  width: 100%;
  table-layout: fixed;
}
.location-linked-clips-table th,
.location-linked-clips-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: top;
}
.location-linked-clips-table th:nth-child(1),
.location-linked-clips-table td:nth-child(1) { width: 72px; }
.location-linked-clips-table th:nth-child(2),
.location-linked-clips-table td:nth-child(2) { width: 150px; }
.location-linked-clips-table th:nth-child(3),
.location-linked-clips-table td:nth-child(3) { width: 110px; }
.location-linked-clips-table th:nth-child(4),
.location-linked-clips-table td:nth-child(4) { width: 110px; }
.location-linked-clips-table th:nth-child(5),
.location-linked-clips-table td:nth-child(5) { width: 90px; }
.location-linked-clips-table th:nth-child(6),
.location-linked-clips-table td:nth-child(6) { width: 84px; }
.location-linked-clips-table th:nth-child(7),
.location-linked-clips-table td:nth-child(7) { width: 88px; }
.location-linked-clips-table .no-thumb.mini {
  min-height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(0,0,0,.06);
  color: var(--muted);
}
.error-text {
  color: var(--danger);
}

/* v2.6.6 — Location linked clips selection + inline structured location editor */
.location-linked-clips-head {
  gap: 12px;
}
.location-linked-clips-head > div:first-child {
  display: grid;
  gap: 2px;
}
.location-linked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.selectable-location-linked-clips .location-linked-check,
.selectable-location-linked-clips .location-linked-select-all-box {
  width: auto;
  accent-color: var(--accent);
}
.selectable-location-linked-clips tbody tr {
  cursor: pointer;
  user-select: none;
}
.selectable-location-linked-clips tbody tr:hover {
  background: rgba(111, 116, 82, 0.07);
}
.selectable-location-linked-clips tbody tr:has(.location-linked-check:checked) td {
  background: var(--accent-soft, rgba(111, 116, 82, 0.12)) !important;
}
.location-linked-clips-table th:nth-child(1),
.location-linked-clips-table td:nth-child(1) { width: 42px; }
.location-linked-clips-table th:nth-child(2),
.location-linked-clips-table td:nth-child(2) { width: 72px; }
.location-linked-helper {
  margin: 8px 0 0;
}
.inline-location-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.inline-location-create-panel {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: var(--panel-2, #f8fafc);
}
.inline-location-create-panel[hidden] {
  display: none !important;
}
.inline-location-create-panel .batch-location-create-grid {
  margin-top: 10px;
}
.location-linked-clips-table .table-thumb {
  cursor: zoom-in;
}
.location-linked-clips-table .link-button {
  text-align: left;
}
@media (max-width: 760px) {
  .inline-location-picker {
    grid-template-columns: 1fr;
  }
  .location-linked-actions {
    justify-content: flex-start;
  }
}

/* V2.6.7 — Gestion des lieux compacte et dépliable */
.location-edit-card.compact,
.location-edit-card.collapsed,
.location-edit-card.expanded {
  align-items: start;
}
.location-edit-card.collapsed {
  padding-top: 9px;
  padding-bottom: 9px;
}
.location-card-summary {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  background: transparent;
  border: 0;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.location-card-summary:hover .location-summary-name strong {
  color: var(--accent-strong);
}
.location-summary-name strong {
  display: block;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
.location-summary-name span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}
.location-edit-card.collapsed .location-edit-select {
  padding-top: 4px;
}
.location-edit-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.location-chevron {
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
  border-color: rgba(111,116,82,.18) !important;
}
.location-edit-card.collapsed .location-edit-badges {
  margin-bottom: 0;
}
.location-edit-card.expanded .location-card-summary {
  padding-bottom: 0;
}
.location-edit-card.expanded {
  border-color: rgba(111,116,82,.32);
}
@media (max-width: 900px) {
  .location-card-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .location-edit-badges {
    justify-content: flex-start;
  }
}

/* V2.7.0 — OpenStreetMap / coordonnées GPS */
.location-coordinates-box {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  color: var(--text);
  font-size: 13px;
}
.location-coordinates-box .ui-icon {
  width: 20px;
  height: 20px;
  margin-right: 6px;
  vertical-align: middle;
}
.location-coordinates-box span,
.location-coordinates-box small {
  color: var(--muted);
  line-height: 1.35;
}
.location-edit-badges small:nth-child(3) {
  background: rgba(53, 94, 59, .12);
  color: #355e3b;
}
.geocode-location-btn {
  border-color: rgba(53, 94, 59, .22) !important;
}
#geocodeSelectedLocationsBtn {
  white-space: nowrap;
}

/* V2.7.2 — filtres lieux et géocodage automatique */
.location-manager-filters {
  grid-template-columns: minmax(260px, 1.4fr) minmax(190px, .8fr) minmax(190px, .8fr) !important;
}
.location-geocode-actions {
  align-items: center;
  gap: 10px;
}
.location-geocode-actions .compact-check {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.55);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .location-manager-filters {
    grid-template-columns: 1fr !important;
  }
  .location-geocode-actions .compact-check {
    width: 100%;
  }
}

/* V2.7.3 — Gestion des lieux : filtres plus compacts et regroupés à gauche */
.location-manager-filters {
  display: grid !important;
  grid-template-columns: minmax(220px, 360px) minmax(180px, 250px) minmax(180px, 250px) !important;
  justify-content: start !important;
  align-items: end !important;
  gap: 12px 14px !important;
  max-width: 900px !important;
}
.location-manager-filters .field,
.location-manager-filters .field.wide {
  min-width: 0 !important;
  width: 100% !important;
}
.location-manager-filters input,
.location-manager-filters select {
  width: 100% !important;
  min-width: 0 !important;
}
.location-manager-filters select {
  padding-right: 34px !important;
}
.locations-panel .panel-title-row {
  max-width: 1050px;
}
@media (max-width: 920px) {
  .location-manager-filters {
    grid-template-columns: 1fr 1fr !important;
    max-width: none !important;
  }
  .location-manager-filters .field.wide {
    grid-column: 1 / -1;
  }
}
@media (max-width: 620px) {
  .location-manager-filters {
    grid-template-columns: 1fr !important;
  }
}

/* V2.8.0 — Dashboard carte + modernisation UI */
.main {
  max-width: 1580px;
  margin: 0 auto;
  width: 100%;
}
#dashboardView {
  max-width: 1540px;
  margin: 0 auto;
}
.dashboard-stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  gap: 16px !important;
}
.dashboard-icon-card {
  min-height: 132px !important;
  display: grid !important;
  align-content: space-between !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(247,246,241,.92)) !important;
}
.dashboard-icon-card .stat-label {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  font-size: 13px !important;
  text-transform: uppercase !important;
  letter-spacing: .055em !important;
  font-weight: 850 !important;
}
.dashboard-icon-card .dashboard-stat-icon {
  width: 54px !important;
  height: 54px !important;
  flex: 0 0 54px !important;
  opacity: 1 !important;
  color: #263019 !important;
  background-color: currentColor !important;
}
.dashboard-icon-card strong {
  font-size: clamp(28px, 2.5vw, 44px) !important;
  letter-spacing: -.04em !important;
}
.dashboard-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, .75fr) !important;
  gap: 18px !important;
}
.dashboard-grid .geography-panel {
  grid-column: 1 / -1 !important;
  padding: 22px !important;
}
.panel-title-row h3 {
  font-size: 20px;
}
.geo-dashboard-modern {
  display: grid;
  grid-template-columns: minmax(520px, 1.45fr) minmax(320px, .8fr);
  gap: 18px;
  align-items: stretch;
}
.geo-map-panel,
.geo-side-panel,
.geo-card-mini {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,.68);
}
.geo-map-panel {
  padding: 14px;
  min-height: 460px;
}
.geo-side-panel {
  padding: 14px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.geo-map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 4px 4px 12px;
}
.geo-map-toolbar strong {
  display: block;
  font-size: 18px;
}
.geo-map-toolbar span,
.geo-map-selection span {
  color: var(--muted);
  font-size: 13px;
}
.geo-map-actions {
  display: flex;
  gap: 8px;
}
.geo-map-actions .button {
  min-width: 38px;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
.geo-map-schematic {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid rgba(38,48,25,.14);
  border-radius: 20px;
  background:
    radial-gradient(circle at 22% 28%, rgba(122,142,63,.16), transparent 32%),
    radial-gradient(circle at 68% 48%, rgba(122,142,63,.13), transparent 34%),
    linear-gradient(180deg, #eef3ec, #f8f5ec);
}
.geo-map-schematic::before {
  content: '';
  position: absolute;
  inset: 8%;
  border-radius: 54% 46% 50% 50%;
  border: 1px dashed rgba(38,48,25,.12);
  transform: rotate(-6deg);
}
.geo-map-schematic::after {
  content: '';
  position: absolute;
  inset: 18% 9% 10% 13%;
  border-radius: 42% 58% 45% 55%;
  background: rgba(255,255,255,.33);
  filter: blur(1px);
}
.geo-map-graticule {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(38,48,25,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(38,48,25,.055) 1px, transparent 1px);
  background-size: 12.5% 20%;
  z-index: 1;
}
.geo-map-point {
  position: absolute;
  z-index: 3;
  width: var(--point-size, 22px);
  height: var(--point-size, 22px);
  margin-left: calc(var(--point-size, 22px) / -2);
  margin-top: calc(var(--point-size, 22px) / -2);
  border: 2px solid rgba(255,255,255,.82);
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
  cursor: pointer;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  transition: transform .16s ease, box-shadow .16s ease;
}
.geo-map-point:hover {
  transform: scale(1.12);
  box-shadow: 0 12px 34px rgba(0,0,0,.26);
}
.geo-map-point.cold { background: #587b91; }
.geo-map-point.cool { background: #6f8a3e; }
.geo-map-point.warm { background: #c28d31; }
.geo-map-point.hot { background: #b44e38; }
.geo-map-point span { pointer-events: none; }
.geo-map-selection {
  min-height: 48px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,.62);
}
.geo-map-selection strong {
  display: block;
}
.geo-map-empty {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 8px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: 20px;
  padding: 24px;
}
.geo-card-mini {
  padding: 14px;
}
.geo-card-mini h4 {
  margin: 0 0 12px;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .055em;
  color: var(--muted);
}
.compact-geo-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}
.compact-geo-metrics .geo-metric {
  min-height: 98px;
}
.dashboard-top-locations {
  display: grid;
  gap: 8px;
}
.dashboard-location-row {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 10px;
  text-align: left;
  cursor: pointer;
}
.dashboard-location-row:hover {
  background: #f8faf2;
  border-color: rgba(111,138,62,.35);
}
.dashboard-location-row span {
  font-weight: 850;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dashboard-location-row strong {
  font-size: 20px;
  color: var(--accent);
}
.dashboard-location-row small {
  color: var(--muted);
  grid-column: 1 / -1;
}
.country-index .country-row {
  border-radius: 14px;
  border: 1px solid transparent;
}
.country-index .country-row:hover {
  border-color: var(--line);
  background: #fff;
}
.settings-subnav {
  padding: 12px !important;
  border: 1px solid rgba(111,138,62,.24) !important;
  border-radius: 24px !important;
  background: linear-gradient(145deg, #f4f1e8, #ffffff) !important;
  box-shadow: 0 12px 30px rgba(15,23,42,.08) !important;
  gap: 12px !important;
}
.settings-tab-btn {
  min-height: 78px !important;
  padding: 14px 18px !important;
  font-size: 16px !important;
  font-weight: 900 !important;
  border-radius: 18px !important;
}
.settings-tab-btn .ui-icon {
  width: 46px !important;
  height: 46px !important;
  flex: 0 0 46px !important;
}
.settings-tab-btn.active {
  background: #6f7f3b !important;
  color: #fff !important;
}
.settings-tab-btn.active .ui-icon {
  background-color: #fff !important;
}
body.dark-mode .dashboard-icon-card {
  background: linear-gradient(145deg, rgba(31,41,55,.95), rgba(17,24,39,.95)) !important;
}
body.dark-mode .dashboard-icon-card .dashboard-stat-icon,
body.dark-mode .geo-metric-icon {
  color: #fff !important;
  background-color: currentColor !important;
}
body.dark-mode .geo-map-panel,
body.dark-mode .geo-side-panel,
body.dark-mode .geo-card-mini,
body.dark-mode .geo-map-selection,
body.dark-mode .dashboard-location-row {
  background: rgba(31,41,55,.74);
}
body.dark-mode .geo-map-schematic {
  background:
    radial-gradient(circle at 22% 28%, rgba(148,163,184,.16), transparent 32%),
    radial-gradient(circle at 68% 48%, rgba(111,138,62,.18), transparent 34%),
    linear-gradient(180deg, #111827, #1f2937);
}
@media (max-width: 1100px) {
  .geo-dashboard-modern,
  .dashboard-grid {
    grid-template-columns: 1fr !important;
  }
  .geo-map-panel { min-height: 0; }
  .geo-map-schematic { min-height: 330px; }
}
@media (min-width: 1680px) {
  .main { max-width: 1540px; }
}

/* V2.8.0 — OpenStreetMap/Leaflet layer */
.geo-leaflet-map {
  display: none;
  width: 100%;
  min-height: 410px;
  border: 1px solid rgba(38,48,25,.14);
  border-radius: 20px;
  overflow: hidden;
  background: #e9efe7;
  margin-bottom: 12px;
}
.geo-map-fallback.leaflet-active {
  display: none;
}
.geo-leaflet-map .leaflet-popup-content-wrapper,
.geo-leaflet-map .leaflet-popup-tip {
  border-radius: 14px;
}
.geo-leaflet-map .leaflet-popup-content {
  margin: 12px 14px;
  min-width: 160px;
  line-height: 1.35;
}
.geo-leaflet-map .leaflet-control-attribution {
  font-size: 10px;
}
body.dark-mode .geo-leaflet-map {
  background: #111827;
}
@media (max-width: 1100px) {
  .geo-leaflet-map { min-height: 340px; }
}


/* V2.8.1 — dashboard + recherche clips refine */
#dashboardView {
  max-width: 1480px !important;
}
.dashboard-stat-grid {
  grid-template-columns: repeat(6, minmax(150px, 1fr)) !important;
  gap: 14px !important;
}
.dashboard-stat-action {
  border: 1px solid var(--line) !important;
  text-align: left !important;
  cursor: pointer !important;
  color: inherit !important;
}
.dashboard-stat-action:hover {
  transform: translateY(-2px);
  border-color: rgba(111,127,59,.38) !important;
  box-shadow: 0 16px 38px rgba(15,23,42,.12) !important;
}
.dashboard-icon-card {
  min-height: 124px !important;
  padding: 16px !important;
}
.dashboard-icon-card .stat-label {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 12px !important;
  line-height: 1.15 !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
.dashboard-icon-card .dashboard-stat-icon {
  width: 60px !important;
  height: 60px !important;
  flex: 0 0 60px !important;
}
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon {
  width: 76px !important;
  height: 76px !important;
  flex: 0 0 76px !important;
}
.dashboard-stat-action[data-dashboard-action="clips"] .stat-label {
  min-height: 78px !important;
}
.dashboard-stat-action[data-dashboard-action="clips"] strong {
  margin-top: -6px;
  font-size: clamp(30px, 2.6vw, 46px) !important;
}
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon,
.dashboard-stat-action[data-dashboard-action="clips"] .ui-icon { background-size: contain !important; }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { opacity: 1 !important; }
.dashboard-stat-action[data-dashboard-action="clips"] { }
.dashboard-stat-action[data-dashboard-action="clips"] .stat-label { gap: 10px !important; }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { transform: scale(1.02); }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
.dashboard-stat-action[data-dashboard-action="clips"] .dashboard-stat-icon { }
/* Horloge légèrement plus grande. */
.dashboard-stat-action[data-dashboard-action="clips"] + .dashboard-stat-action .dashboard-stat-icon,
.dashboard-stat-action[data-dashboard-action="clips"] + .dashboard-stat-action .ui-icon {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px !important;
}
.compact-geo-metrics .geo-metric {
  min-height: 144px !important;
  padding: 18px !important;
  cursor: default;
}
.compact-geo-metrics .geo-metric.dashboard-open-locations { cursor: pointer; }
.compact-geo-metrics .geo-metric-icon {
  width: 70px !important;
  height: 70px !important;
  flex: 0 0 70px !important;
}
.compact-geo-metrics .geo-metric span { font-size: 13px !important; }
.compact-geo-metrics .geo-metric strong { font-size: 34px !important; }
.country-row.dashboard-country-row {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.country-row.dashboard-country-row:hover {
  background: rgba(111,127,59,.10) !important;
}
.dashboard-validation-quality,
.dashboard-health-merged {
  margin-bottom: 16px;
}
.dashboard-validation-quality h4,
.dashboard-health-merged h4 {
  margin: 0 0 10px;
  font-size: 15px;
}
.dashboard-health-card {
  border: 1px solid var(--line);
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.dashboard-random-review {
  margin-top: 18px !important;
  grid-template-columns: 210px minmax(0, 1fr) !important;
  align-items: stretch !important;
  padding: 16px !important;
}
.dashboard-random-review img,
.dashboard-random-review .no-thumb {
  width: 210px !important;
  height: 118px !important;
  object-fit: cover !important;
  border-radius: 18px !important;
}
.dashboard-random-review small {
  font-size: 12px !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 900;
}
.dashboard-random-review strong {
  font-size: 18px !important;
  margin: 6px 0 3px;
}
.dashboard-random-review .button {
  margin-top: 12px;
  font-weight: 900;
}
.settings-tab-btn {
  min-height: 92px !important;
  padding: 16px 22px !important;
  font-size: 18px !important;
  background: #f2eee4 !important;
  border: 1px solid rgba(111,127,59,.22) !important;
}
.settings-tab-btn .ui-icon {
  width: 62px !important;
  height: 62px !important;
  flex: 0 0 62px !important;
}
.settings-tab-btn.active {
  background: #5f6f2d !important;
  color: #fff !important;
  box-shadow: 0 14px 32px rgba(95,111,45,.22) !important;
}
#clipsView {
  max-width: 1780px !important;
  margin: 0 auto !important;
}
#clipsView > .filters-panel,
#clipsView > .table-panel {
  max-width: min(1780px, 96vw) !important;
  width: min(1780px, 96vw) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
#clipsView > .filters-panel {
  display: grid !important;
  grid-template-columns: minmax(380px, 1.25fr) minmax(260px, .75fr) minmax(210px, .55fr) minmax(210px, .55fr) !important;
  gap: 13px 14px !important;
  padding: 18px 22px !important;
  align-items: end !important;
}
#clipsView > .filters-panel .field.wide { grid-column: 1 / 4 !important; grid-row: 1 !important; }
#clipsView > .filters-panel .field:has(#productionFilter) { grid-column: 4 / 5 !important; grid-row: 1 !important; }
#clipsView > .filters-panel .field:has(#sourceFilter) { grid-column: 1 / 2 !important; grid-row: 2 !important; }
#clipsView > .filters-panel .field:has(#typeFilter) { grid-column: 2 / 3 !important; grid-row: 2 !important; }
#clipsView > .filters-panel .location-autocomplete-field { grid-column: 3 / 5 !important; grid-row: 2 !important; }
#clipsView > .filters-panel .compact-duration-field {
  grid-column: 1 / 3 !important;
  grid-row: 3 !important;
  grid-template-columns: 250px minmax(220px, 1fr) !important;
  padding: 12px 14px !important;
}
#clipsView > .filters-panel .field:has(#validationFilter) { grid-column: 3 / 4 !important; grid-row: 3 !important; }
#clipsView > .filters-panel .modern-check { grid-column: 4 / 5 !important; grid-row: 3 !important; }
#clipsView > .filters-panel #applyFiltersBtn { grid-column: 3 / 4 !important; grid-row: 4 !important; }
#clipsView > .filters-panel #clearClipFiltersBtn { grid-column: 4 / 5 !important; grid-row: 4 !important; }
#clipsView > .filters-panel .compact-duration-field > label { grid-column: 1 / -1 !important; }
#clipsView > .filters-panel .compact-duration-field .duration-input-row { grid-column: 1 / 2 !important; }
#clipsView > .filters-panel .compact-duration-field .compact-range-row { grid-column: 2 / 3 !important; }
#clipsView > .table-panel .table-wrap,
#clipsTable {
  max-width: 100% !important;
}
@media (max-width: 1180px) {
  .dashboard-stat-grid { grid-template-columns: repeat(3, minmax(150px, 1fr)) !important; }
  #clipsView > .filters-panel {
    grid-template-columns: 1fr 1fr !important;
    width: min(100%, 96vw) !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .field:has(#productionFilter),
  #clipsView > .filters-panel .field:has(#sourceFilter),
  #clipsView > .filters-panel .field:has(#typeFilter),
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .compact-duration-field,
  #clipsView > .filters-panel .field:has(#validationFilter),
  #clipsView > .filters-panel .modern-check,
  #clipsView > .filters-panel #applyFiltersBtn,
  #clipsView > .filters-panel #clearClipFiltersBtn {
    grid-column: auto !important;
    grid-row: auto !important;
  }
}


/* V2.8.2 — Recherche globale refinements */
.global-search-panel-v282 {
  grid-template-columns: minmax(360px, 1fr) auto auto auto !important;
  align-items: end !important;
  gap: 12px !important;
}
.global-search-panel-v282 .global-search-input-field input,
.global-search-panel-v282 .global-search-action,
.global-search-panel-v282 .global-search-audio {
  min-height: 46px !important;
}
.global-search-panel-v282 .global-search-action {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 18px !important;
  white-space: nowrap !important;
}
.global-search-panel-v282 .global-search-audio {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 0 14px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: #fffefa !important;
  color: var(--text) !important;
  white-space: nowrap !important;
}
body.dark-mode .global-search-panel-v282 .global-search-audio {
  background: var(--panel) !important;
  border-color: var(--line) !important;
  color: var(--text) !important;
}
.visually-hidden-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  overflow: hidden !important;
}
.global-clips-title-row {
  align-items: center !important;
  gap: 14px !important;
}
.global-clips-title-tools {
  margin-left: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
}
.global-clip-count-badge {
  display: inline-flex !important;
  align-items: center !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 999px !important;
  background: var(--panel-2) !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
}
.global-clip-overflow-note {
  margin: 0 14px 12px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--line) !important;
  border-radius: 14px !important;
  background: var(--accent-soft) !important;
  color: var(--text) !important;
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}
.global-clip-overflow-note .button {
  margin-left: auto !important;
}
.thumb-mode-icon .ui-icon.svg-icon.mask-icon {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
}
@media (max-width: 1050px) {
  .global-search-panel-v282 {
    grid-template-columns: 1fr 1fr !important;
  }
  .global-search-panel-v282 .global-search-input-field,
  .global-search-panel-v282 .search-note {
    grid-column: 1 / -1 !important;
  }
}
@media (max-width: 680px) {
  .global-search-panel-v282 {
    grid-template-columns: 1fr !important;
  }
  .global-clip-overflow-note .button {
    margin-left: 0 !important;
    width: 100% !important;
  }
}

/* V2.8.3 — dashboard geo cards, global search notice, productions grid */
.compact-geo-metrics .geo-metric {
  display: grid !important;
  grid-template-columns: 96px minmax(0, 1fr) !important;
  grid-template-rows: auto 1fr !important;
  align-items: center !important;
  column-gap: 12px !important;
  min-height: 142px !important;
  overflow: hidden !important;
}
.compact-geo-metrics .geo-metric .geo-metric-icon,
.compact-geo-metrics .geo-metric > .ui-icon {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  justify-self: center !important;
  align-self: center !important;
  width: 82px !important;
  height: 82px !important;
  min-width: 82px !important;
  min-height: 82px !important;
}
.compact-geo-metrics .geo-metric span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  justify-self: stretch !important;
  text-align: center !important;
  margin: 0 !important;
  line-height: 1.15 !important;
}
.compact-geo-metrics .geo-metric strong {
  grid-column: 2 !important;
  grid-row: 2 !important;
  justify-self: stretch !important;
  align-self: start !important;
  text-align: center !important;
  margin: 4px 0 0 !important;
  font-size: clamp(36px, 3vw, 50px) !important;
  line-height: .95 !important;
}

.global-clip-overflow-note-top {
  margin-top: 12px !important;
  margin-bottom: 12px !important;
}
.global-clip-overflow-note-bottom {
  margin: 12px 14px 4px !important;
  padding: 8px 10px !important;
  font-size: 12px !important;
  opacity: .9 !important;
}
.global-clip-overflow-note-bottom .button {
  min-height: 28px !important;
  font-size: 12px !important;
  padding: 0 10px !important;
}

#productionsGrid .production-card-grid,
.production-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  justify-content: stretch !important;
  align-items: stretch !important;
}
#productionsGrid .production-card {
  max-width: none !important;
  width: 100% !important;
}

@media (max-width: 1180px) {
  #productionsGrid .production-card-grid,
  .production-card-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  .compact-geo-metrics .geo-metric {
    grid-template-columns: 70px minmax(0, 1fr) !important;
    min-height: 116px !important;
  }
  .compact-geo-metrics .geo-metric .geo-metric-icon,
  .compact-geo-metrics .geo-metric > .ui-icon {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
  }
}

/* V3.0 audit / maintenance */
.admin-audit-panel {
  border: 1px solid rgba(54, 94, 125, 0.18);
}
.audit-summary-box {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(16, 24, 40, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  font-size: 14px;
}
.audit-summary-box.empty {
  color: var(--muted, #667085);
}
.audit-summary-box.ok {
  border-color: rgba(18, 138, 82, 0.32);
  background: rgba(236, 253, 243, 0.72);
}
.audit-summary-box.warning {
  border-color: rgba(181, 118, 20, 0.38);
  background: rgba(255, 250, 235, 0.82);
}
.audit-summary-box.error {
  border-color: rgba(180, 35, 24, 0.38);
  background: rgba(254, 243, 242, 0.82);
}
.audit-head,
.audit-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.audit-head > div,
.audit-metrics-grid > div {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 24, 40, 0.08);
}
.audit-head strong,
.audit-metrics-grid strong {
  display: block;
  font-size: 17px;
  line-height: 1.2;
}
.audit-head span,
.audit-metrics-grid span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted, #667085);
}
.audit-issues {
  display: grid;
  gap: 10px;
}
.audit-issue {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(16, 24, 40, 0.1);
  background: rgba(255, 255, 255, 0.78);
}
.audit-issue.error {
  border-color: rgba(180, 35, 24, 0.32);
}
.audit-issue.warning {
  border-color: rgba(181, 118, 20, 0.32);
}
.audit-issue.info {
  border-color: rgba(54, 94, 125, 0.22);
}
.audit-issue strong {
  display: block;
}
.audit-issue > span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--muted, #667085);
}
.audit-issue p {
  margin: 8px 0 0;
}
.audit-issue details {
  margin-top: 8px;
}
.audit-issue pre {
  white-space: pre-wrap;
  max-height: 260px;
  overflow: auto;
}

/* V3.0.1 collapsible advanced metadata in clip drawer */
.advanced-meta-card {
  margin: 18px 0;
  border: 1px solid rgba(54, 94, 125, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}
.advanced-meta-card > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}
.advanced-meta-card > summary::-webkit-details-marker {
  display: none;
}
.advanced-meta-card > summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  transition: transform 0.18s ease;
}
.advanced-meta-card[open] > summary::before {
  transform: rotate(90deg);
}
.advanced-meta-card > summary span {
  display: inline-flex;
  align-items: center;
}
.advanced-meta-card > summary small {
  color: var(--muted, #667085);
  font-weight: 600;
  font-size: 12px;
  text-align: right;
}
.advanced-meta-card .data-list,
.advanced-meta-card .empty-value {
  margin: 0 14px 14px;
}

/* V3.1 — import impact preview + DB optimization controls */
.admin-impact {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}
.admin-impact > strong {
  display: block;
  margin-bottom: 8px;
}
.admin-impact small {
  display: block;
  margin-top: 8px;
  opacity: 0.75;
  line-height: 1.35;
}
.admin-preview-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}
.admin-preview-grid.compact div span {
  font-size: 0.78rem;
}
.security-status-box {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 0.88rem;
}
.security-status-box strong { font-weight: 700; }
.security-status-box span { opacity: 0.75; }
.security-status-box.protected { border-color: rgba(70, 180, 120, 0.45); }
.security-status-box.local { border-color: rgba(240, 180, 80, 0.45); }
.security-status-box.warning { border-color: rgba(230, 80, 80, 0.55); }


/* V3.3.3 interaction repair */
.global-clips-table tr[data-clip-row],
#globalSearchResults tr[data-clip-row] { cursor: pointer; }
.global-clips-table tr[data-clip-row]:hover { background: rgba(132, 145, 112, .10); }
.thumb-mode-icon { cursor: pointer; }
.thumb-hover-preview { z-index: 9999; }
.thumb-hover-preview img { max-width: min(680px, 58vw); max-height: 440px; }

/* V3.3.3 — sélecteur de colonnes pour Recherche clips */
.column-picker { position: relative; display: inline-flex; align-items: center; }
.compact-button { padding: 9px 12px; min-height: 36px; }
.column-picker-count { font-size: 11px; color: var(--muted); background: rgba(255,255,255,.55); border: 1px solid var(--line); border-radius: 999px; padding: 2px 7px; }
.column-picker-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 30; width: 260px; background: #fffefa; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 50px rgba(38,36,28,.18); padding: 12px; }
.column-picker-title { font-weight: 800; margin: 2px 4px 10px; color: var(--accent-strong); }
.column-picker-option { display: flex; align-items: center; gap: 10px; padding: 8px 6px; border-radius: 12px; cursor: pointer; color: #3f3d35; }
.column-picker-option:hover { background: #f3efe5; }
.column-picker-option input { width: 16px; height: 16px; accent-color: var(--accent); }
.column-picker-actions { display: flex; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.column-picker-menu small { display: block; color: var(--muted); line-height: 1.35; margin: 10px 4px 2px; }
#clipsTable [data-clip-col][hidden] { display: none !important; }

/* V3.3.5 — sélecteur de colonnes aussi dans Recherche globale > Clips */
.global-column-picker .column-picker-menu { right: 0; }
#globalSearchResults [data-global-clip-col][hidden] { display: none !important; }


/* V3.3.5 — global search clip column controls made explicit */
.global-clip-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .58);
}
.global-clip-control-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.global-clip-control-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.global-column-picker-prominent .compact-button {
  border-color: rgba(62, 76, 54, .22);
  background: #fffefa;
  box-shadow: 0 5px 14px rgba(38,36,28,.08);
}
.global-column-picker-prominent .column-picker-menu {
  left: 0;
  right: auto;
  z-index: 80;
}
.global-clips-section .global-clips-title-tools {
  justify-content: flex-end;
}
@media (max-width: 900px) {
  .global-clip-controls-row { align-items: flex-start; }
  .global-column-picker-prominent .column-picker-menu { left: 0; right: auto; }
}


/* V3.3.6 — responsive laptop / table compact mode
   Objectif: garder le look grand écran, mais empêcher les tableaux de déborder sur laptop.
   Corrige aussi les largeurs basées sur 96vw, qui débordaient quand la sidebar était présente. */
.main,
.view,
#clipsView,
#globalView,
#globalSearchResults {
  min-width: 0 !important;
  max-width: 100% !important;
}

#clipsView > .filters-panel,
#clipsView > .table-panel,
#globalView > .panel,
#globalSearchResults .search-section,
#globalSearchResults .search-summary {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#clipsView > .table-panel,
.global-clips-section {
  overflow: hidden !important;
}

#clipsView .table-wrap,
.global-clips-table-wrap,
.source-linked-clips-wrap,
.compact-table-wrap {
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

#clipsTable,
.global-clips-table {
  table-layout: fixed !important;
  width: 100% !important;
  min-width: 1180px !important;
}

#clipsTable th,
#clipsTable td,
.global-clips-table th,
.global-clips-table td {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

#clipsTable .desc-cell,
.global-clips-table .desc-cell {
  min-width: 0 !important;
  max-width: none !important;
}

/* Largeurs de base des colonnes clips, utiles dès qu'on est sous grand écran. */
#clipsTable th:first-child,
#clipsTable td:first-child { width: 38px !important; }
#clipsTable [data-clip-col="thumb"] { width: 96px !important; }
#clipsTable [data-clip-col="archive_id"] { width: 132px !important; }
#clipsTable [data-clip-col="production"] { width: 170px !important; }
#clipsTable [data-clip-col="source"] { width: 160px !important; }
#clipsTable [data-clip-col="camera"] { width: 130px !important; }
#clipsTable [data-clip-col="type"] { width: 94px !important; }
#clipsTable [data-clip-col="duration"] { width: 78px !important; }
#clipsTable [data-clip-col="description"] { width: 265px !important; }
#clipsTable [data-clip-col="location"] { width: 190px !important; }
#clipsTable [data-clip-col="people"] { width: 190px !important; }
#clipsTable [data-clip-col="media"] { width: 82px !important; }
#clipsTable [data-clip-col="validation"] { width: 112px !important; }
#clipsTable th:last-child,
#clipsTable td:last-child { width: 112px !important; min-width:112px !important; max-width:112px !important; }

.global-clips-table [data-global-clip-col="thumb"] { width: 96px !important; }
.global-clips-table [data-global-clip-col="archive_id"] { width: 132px !important; }
.global-clips-table [data-global-clip-col="production"] { width: 170px !important; }
.global-clips-table [data-global-clip-col="source"] { width: 160px !important; }
.global-clips-table [data-global-clip-col="camera"] { width: 130px !important; }
.global-clips-table [data-global-clip-col="type"] { width: 94px !important; }
.global-clips-table [data-global-clip-col="duration"] { width: 78px !important; }
.global-clips-table [data-global-clip-col="description"] { width: 275px !important; }
.global-clips-table [data-global-clip-col="location"] { width: 190px !important; }
.global-clips-table [data-global-clip-col="people"] { width: 190px !important; }
.global-clips-table [data-global-clip-col="media"] { width: 82px !important; }
.global-clips-table [data-global-clip-col="validation"] { width: 112px !important; }

@media (max-width: 1500px) {
  .app-shell {
    grid-template-columns: 238px minmax(0, 1fr) !important;
  }
  .sidebar {
    padding: 18px 16px !important;
    gap: 18px !important;
  }
  .brand h1 { font-size: 19px !important; }
  .brand p { font-size: 12px !important; }
  .sidebar .nav {
    min-height: 54px !important;
    padding: 8px 12px !important;
    font-size: 13px !important;
  }
  .sidebar .nav .ui-icon.svg-icon.mask-icon {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }
  .sidebar-note { font-size: 12px !important; }
  .main {
    padding: 22px 20px !important;
    overflow-x: hidden !important;
  }
  .topbar { margin-bottom: 18px !important; }
  .topbar h2 { font-size: 26px !important; }
  .topbar p { font-size: 13px !important; }
  .panel { padding: 16px !important; }

  #clipsView > .filters-panel {
    padding: 14px 16px !important;
    gap: 10px 12px !important;
  }
  #clipsView > .filters-panel .field label,
  #clipsView > .filters-panel .field > label {
    font-size: 10px !important;
  }
  #clipsView > .filters-panel .field input,
  #clipsView > .filters-panel .field select,
  #clipsView > .filters-panel .modern-check,
  #clipsView > .filters-panel #applyFiltersBtn,
  #clipsView > .filters-panel #clearClipFiltersBtn {
    min-height: 38px !important;
    height: 38px !important;
    font-size: 12px !important;
    border-radius: 12px !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    padding: 10px 12px !important;
  }
  #clipsView > .filters-panel .compact-duration-field .duration-input-row input {
    min-height: 36px !important;
    height: 36px !important;
    line-height: 36px !important;
    font-size: 12px !important;
  }

  .table-actions {
    padding: 12px 14px !important;
    gap: 10px !important;
  }
  .table-actions h3,
  .table-actions strong { font-size: 15px !important; }
  .table-actions-right,
  .global-clips-title-tools,
  .global-clip-controls-row {
    gap: 8px !important;
  }
  .button,
  .page-size-inline select,
  .compact-button {
    min-height: 34px !important;
    font-size: 12px !important;
  }
  .thumb-mode-icon {
    width: 31px !important;
    height: 31px !important;
  }

  #clipsTable,
  .global-clips-table {
    font-size: 12px !important;
    line-height: 1.18 !important;
    min-width: 1120px !important;
  }
  #clipsTable th,
  #clipsTable td,
  .global-clips-table th,
  .global-clips-table td {
    padding: 7px 8px !important;
  }
  #clipsTable .table-thumb-small,
  .global-clips-table .table-thumb-small {
    width: 72px !important;
    height: 40px !important;
    border-radius: 9px !important;
  }
  #clipsTable .table-thumb-large,
  .global-clips-table .table-thumb-large {
    width: 136px !important;
    height: 76px !important;
    border-radius: 10px !important;
  }
  #clipsTable .thumb-grid-mini,
  .global-clips-table .thumb-grid-mini {
    grid-template-columns: repeat(2, 40px) !important;
    gap: 3px !important;
  }
  #clipsTable .thumb-grid-mini img,
  .global-clips-table .thumb-grid-mini img {
    width: 40px !important;
    height: 23px !important;
    border-radius: 6px !important;
  }
  #clipsTable [data-clip-col="thumb"],
  .global-clips-table [data-global-clip-col="thumb"] { width: 84px !important; }
  #clipsTable [data-clip-col="archive_id"],
  .global-clips-table [data-global-clip-col="archive_id"] { width: 124px !important; }
  #clipsTable [data-clip-col="production"],
  .global-clips-table [data-global-clip-col="production"] { width: 152px !important; }
  #clipsTable [data-clip-col="source"],
  .global-clips-table [data-global-clip-col="source"] { width: 150px !important; }
  #clipsTable [data-clip-col="type"],
  .global-clips-table [data-global-clip-col="type"] { width: 86px !important; }
  #clipsTable [data-clip-col="duration"],
  .global-clips-table [data-global-clip-col="duration"] { width: 72px !important; }
  #clipsTable [data-clip-col="description"],
  .global-clips-table [data-global-clip-col="description"] { width: 240px !important; }
  #clipsTable [data-clip-col="location"],
  .global-clips-table [data-global-clip-col="location"] { width: 170px !important; }
  #clipsTable [data-clip-col="people"],
  .global-clips-table [data-global-clip-col="people"] { width: 165px !important; }
}

@media (max-width: 1280px) {
  .app-shell {
    grid-template-columns: 218px minmax(0, 1fr) !important;
  }
  .main { padding: 18px 16px !important; }
  #clipsView > .filters-panel {
    grid-template-columns: 1fr 1fr !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .field:has(#productionFilter),
  #clipsView > .filters-panel .field:has(#sourceFilter),
  #clipsView > .filters-panel .field:has(#typeFilter),
  #clipsView > .filters-panel .location-autocomplete-field,
  #clipsView > .filters-panel .compact-duration-field,
  #clipsView > .filters-panel .field:has(#validationFilter),
  #clipsView > .filters-panel .modern-check,
  #clipsView > .filters-panel #applyFiltersBtn,
  #clipsView > .filters-panel #clearClipFiltersBtn {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  #clipsView > .filters-panel .field.wide,
  #clipsView > .filters-panel .compact-duration-field {
    grid-column: 1 / -1 !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-template-columns: 220px minmax(180px, 1fr) !important;
  }
  #clipsTable,
  .global-clips-table {
    min-width: 1040px !important;
    font-size: 11.5px !important;
  }
  #clipsTable th,
  #clipsTable td,
  .global-clips-table th,
  .global-clips-table td {
    padding: 6px 7px !important;
  }
  #clipsTable [data-clip-col="description"],
  .global-clips-table [data-global-clip-col="description"] { width: 220px !important; }
  #clipsTable [data-clip-col="location"],
  .global-clips-table [data-global-clip-col="location"] { width: 155px !important; }
  #clipsTable [data-clip-col="people"],
  .global-clips-table [data-global-clip-col="people"] { width: 150px !important; }
}

@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 1fr !important; }
  .sidebar {
    position: static !important;
    padding: 14px !important;
    gap: 12px !important;
  }
  .sidebar nav {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .sidebar .nav {
    min-height: 46px !important;
    font-size: 12px !important;
  }
  .sidebar .nav .ui-icon.svg-icon.mask-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
  }
  .sidebar-note { display: none !important; }
  .main { padding: 14px !important; }
  .topbar { flex-wrap: wrap !important; gap: 10px !important; }
  .topbar h2 { font-size: 24px !important; }
  #clipsView > .filters-panel,
  .global-search-panel-v282 {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .compact-duration-field {
    grid-template-columns: 1fr !important;
  }
  #clipsView > .filters-panel .compact-duration-field .duration-input-row,
  #clipsView > .filters-panel .compact-duration-field .compact-range-row {
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .table-actions {
    align-items: flex-start !important;
    flex-wrap: wrap !important;
  }
  .table-actions-right {
    width: 100% !important;
    justify-content: flex-start !important;
    flex-wrap: wrap !important;
  }
  .global-clip-controls-row {
    align-items: flex-start !important;
  }
}

@media (max-width: 760px) {
  .sidebar nav { grid-template-columns: 1fr !important; }
  .brand-mark { width: 38px !important; height: 38px !important; }
  .brand h1 { font-size: 17px !important; }
  .panel { border-radius: 16px !important; }
  #clipsTable,
  .global-clips-table {
    min-width: 980px !important;
  }
  .column-picker-menu {
    right: auto !important;
    left: 0 !important;
    width: min(280px, calc(100vw - 32px)) !important;
  }
}

/* V3.4 — réconciliation lieux + édition de lignes fiche */
.location-reconcile-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.4fr);
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  margin: .75rem 0 1rem;
  border: 1px solid var(--border-soft);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-bg) 88%, var(--accent) 12%);
}
.location-reconcile-panel p { margin: .25rem 0 0; color: var(--text-muted); }
.location-reconcile-grid { margin: 0; }
.editable-fiche-table tr.editing-row td {
  background: color-mix(in srgb, var(--panel-bg) 80%, var(--accent) 20%);
  vertical-align: top;
}
.fiche-row-actions {
  min-width: 145px;
  white-space: nowrap;
}
.fiche-row-actions .button,
.fiche-row-actions .field-edit {
  margin: 0 .25rem .25rem 0;
}
.fiche-row-edit-input {
  width: 100%;
  min-width: 120px;
  box-sizing: border-box;
}
@media (max-width: 1100px) {
  .location-reconcile-panel { grid-template-columns: 1fr; }
}

/* V3.4.3 — Géographie pleine largeur + métriques hautes + choix de look carte */
.geography-panel-v342 {
  grid-column: 1 / -1 !important;
  margin: 0 0 18px !important;
  padding: 24px !important;
}
.geo-dashboard-v342 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  align-items: stretch !important;
}
.geo-metrics-row-v342 {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) !important;
  gap: 12px !important;
}
.geo-metrics-row-v342 .geo-metric {
  min-height: 112px !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  padding: 14px 16px !important;
}
.geo-metrics-row-v342 .geo-metric .geo-metric-icon,
.geo-metrics-row-v342 .geo-metric > .ui-icon {
  width: 58px !important;
  height: 58px !important;
  min-width: 58px !important;
  min-height: 58px !important;
}
.geo-metrics-row-v342 .geo-metric span {
  font-size: 12px !important;
  line-height: 1.1 !important;
}
.geo-metrics-row-v342 .geo-metric strong {
  font-size: clamp(34px, 3.2vw, 54px) !important;
}
.geo-map-panel-full-v342 {
  width: 100% !important;
  min-height: 0 !important;
  padding: 16px !important;
}
.geo-map-panel-full-v342 .geo-leaflet-map {
  min-height: clamp(500px, 48vh, 680px) !important;
  margin-bottom: 12px !important;
}
.geo-map-panel-full-v342 .geo-map-schematic {
  min-height: clamp(500px, 48vh, 680px) !important;
}
.geo-bottom-lists-v342 {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  gap: 16px !important;
}
.geo-card-mini h4 .geo-list-icon {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  margin-right: 8px !important;
  vertical-align: -6px !important;
}
.geo-map-style-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 8px 4px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
}
.geo-map-style-control select {
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 850;
  font-size: 13px;
  outline: none;
  max-width: 160px;
}
body.dark-mode .geo-map-style-control {
  background: rgba(17,24,39,.72);
}
body.dark-mode .geo-map-style-control select {
  color: #f8fafc;
}
@media (max-width: 1280px) {
  .geo-metrics-row-v342 {
    grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
  }
}
@media (max-width: 980px) {
  .geo-metrics-row-v342,
  .geo-bottom-lists-v342 {
    grid-template-columns: 1fr !important;
  }
  .geo-map-toolbar {
    align-items: flex-start !important;
    flex-direction: column !important;
  }
  .geo-map-actions {
    flex-wrap: wrap !important;
  }
  .geo-map-panel-full-v342 .geo-leaflet-map,
  .geo-map-panel-full-v342 .geo-map-schematic {
    min-height: 380px !important;
  }
}

/* V3.4.3 - Dashboard geography simplifié */
.geography-panel .geography-title-row span { display: none !important; }
.geo-dashboard-v343 { display: grid; gap: 18px; }
.geo-map-panel-full-v343 { width: 100%; padding: 0; overflow: hidden; }
.geo-map-panel-full-v343 .geo-leaflet-map { min-height: 520px; border-radius: 18px; }
.geo-map-panel-full-v343 .geo-map-schematic { min-height: 520px; }
.geo-dashboard-v343 .geo-metrics-row-v343 {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 0;
}
.geo-dashboard-v343 .geo-metrics-row-v343 .geo-metric { min-height: 128px; }
.geo-dashboard-v343 .geo-bottom-lists-v342 { margin-top: 0; }
.geo-dashboard-v343 .geo-map-toolbar,
.geo-dashboard-v343 .geo-map-selection,
.geo-dashboard-v343 .geo-map-style-control { display: none !important; }
.geo-dashboard-v343 .leaflet-control-zoom { display: none !important; }
@media (max-width: 1100px) {
  .geo-map-panel-full-v343 .geo-leaflet-map,
  .geo-map-panel-full-v343 .geo-map-schematic { min-height: 390px; }
  .geo-dashboard-v343 .geo-metrics-row-v343 { grid-template-columns: 1fr; }
}

/* V3.4.4 - Dashboard géographie : carte pleine largeur + métriques sous la carte */
.geography-panel-v344 {
  grid-column: 1 / -1 !important;
  margin: 0 0 18px !important;
  padding: 24px !important;
}
.geo-dashboard-v344 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
}
.geo-map-panel-full-v344 {
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.geo-map-panel-full-v344 .geo-leaflet-map,
.geo-map-panel-full-v344 .geo-map-schematic {
  width: 100% !important;
  min-height: clamp(560px, 52vh, 760px) !important;
  border-radius: 20px !important;
}
.geo-dashboard-v344 .geo-map-toolbar,
.geo-dashboard-v344 .geo-map-selection,
.geo-dashboard-v344 .geo-map-style-control,
.geo-dashboard-v344 .leaflet-control-zoom {
  display: none !important;
}
.geo-metrics-row-v344 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 0 !important;
}
.geo-metrics-row-v344 .geo-metric {
  min-height: 112px !important;
  grid-template-columns: 68px minmax(0, 1fr) !important;
  padding: 14px 16px !important;
}
.geo-metrics-row-v344 .geo-metric .geo-metric-icon,
.geo-metrics-row-v344 .geo-metric > .ui-icon {
  width: 56px !important;
  height: 56px !important;
  min-width: 56px !important;
  min-height: 56px !important;
}
.geo-metrics-row-v344 .geo-metric span {
  font-size: 12px !important;
  line-height: 1.1 !important;
}
.geo-metrics-row-v344 .geo-metric strong {
  font-size: clamp(34px, 3vw, 50px) !important;
}
.geo-bottom-lists-v344 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
}
@media (max-width: 1280px) {
  .geo-metrics-row-v344 { grid-template-columns: repeat(2, minmax(150px, 1fr)) !important; }
  .geo-bottom-lists-v344 { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
  .geo-map-panel-full-v344 .geo-leaflet-map,
  .geo-map-panel-full-v344 .geo-map-schematic { min-height: 380px !important; }
  .geo-metrics-row-v344 { grid-template-columns: 1fr !important; }
}

/* V3.4.6 — Dashboard géographie ajusté + recherche clips responsive laptop */
.geography-panel-v344 {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.geo-dashboard-v346 {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 16px !important;
  width: 100% !important;
}
.geo-map-panel-full-v346 {
  width: 100% !important;
  padding: 0 !important;
  overflow: hidden !important;
}
.geo-map-panel-full-v346 .geo-leaflet-map,
.geo-map-panel-full-v346 .geo-map-schematic {
  width: 100% !important;
  min-height: clamp(560px, 54vh, 780px) !important;
  border-radius: 20px !important;
}
.geo-dashboard-v346 .geo-map-toolbar,
.geo-dashboard-v346 .geo-map-selection,
.geo-dashboard-v346 .geo-map-style-control,
.geo-dashboard-v346 .leaflet-control-zoom {
  display: none !important;
}
.geo-metrics-row-v346 {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) !important;
  gap: 14px !important;
  margin-top: 0 !important;
}
.geo-metrics-row-v346 .geo-metric {
  min-height: 104px !important;
  grid-template-columns: 62px minmax(0, 1fr) !important;
  padding: 12px 14px !important;
}
.geo-metrics-row-v346 .geo-metric .geo-metric-icon,
.geo-metrics-row-v346 .geo-metric > .ui-icon {
  width: 52px !important;
  height: 52px !important;
  min-width: 52px !important;
  min-height: 52px !important;
}
.geo-metrics-row-v346 .geo-metric span {
  font-size: 12px !important;
  line-height: 1.1 !important;
}
.geo-metrics-row-v346 .geo-metric strong {
  font-size: clamp(32px, 2.6vw, 48px) !important;
}
.geo-bottom-lists-v346 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
}
@media (max-width: 1150px) {
  .geo-metrics-row-v346 { grid-template-columns: repeat(2, minmax(140px, 1fr)) !important; }
  .geo-bottom-lists-v346 { grid-template-columns: 1fr !important; }
}
@media (max-width: 760px) {
  .geo-map-panel-full-v346 .geo-leaflet-map,
  .geo-map-panel-full-v346 .geo-map-schematic { min-height: 380px !important; }
  .geo-metrics-row-v346 { grid-template-columns: 1fr !important; }
}

/* Recherche clips : boutons compacts et colonnes plus intelligentes */
#clipsTable .delete-clip-btn.icon-only-trash {
  width: 38px !important;
  min-width: 38px !important;
  height: 34px !important;
  padding: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
}
#clipsTable .delete-clip-btn.icon-only-trash .ui-icon,
#clipsTable .delete-clip-btn.icon-only-trash svg {
  width: 18px !important;
  height: 18px !important;
}
#clipsTable th[data-clip-col="duration"] {
  text-align: center !important;
  font-size: 18px !important;
  letter-spacing: 0 !important;
}
#clipsTable th:last-child,
#clipsTable td:last-child { width: 112px !important; min-width:112px !important; max-width:112px !important; }

/* Largeur de la colonne thumbnail selon le mode choisi */
#clipsTable.thumb-table-mode-0 [data-clip-col="thumb"] { width: 1px !important; min-width: 1px !important; }
#clipsTable.thumb-table-mode-1 [data-clip-col="thumb"] { width: 96px !important; min-width: 96px !important; }
#clipsTable.thumb-table-mode-2 [data-clip-col="thumb"] { width: 176px !important; min-width: 176px !important; }
#clipsTable.thumb-table-mode-4 [data-clip-col="thumb"] { width: 150px !important; min-width: 150px !important; }
#clipsTable.thumb-table-mode-2 .table-thumb-large {
  width: 152px !important;
  height: 86px !important;
}
#clipsTable.thumb-table-mode-4 .thumb-grid-mini {
  grid-template-columns: repeat(2, 58px) !important;
  gap: 4px !important;
}
#clipsTable.thumb-table-mode-4 .thumb-grid-mini img {
  width: 58px !important;
  height: 33px !important;
}
#clipsTable.thumb-table-mode-2,
#clipsTable.thumb-table-mode-4 {
  min-width: 1220px !important;
}

/* Mode laptop: cache automatiquement les colonnes moins utiles si l'utilisateur ne les a pas déjà masquées. */
@media (max-height: 1220px), (max-width: 1500px) {
  #clipsTable [data-clip-col="archive_id"],
  #clipsTable [data-clip-col="camera"],
  .global-clips-table [data-global-clip-col="archive_id"],
  .global-clips-table [data-global-clip-col="camera"] {
    display: none !important;
  }
  #clipsTable { min-width: 960px !important; }
  #clipsTable [data-clip-col="production"] { width: 150px !important; }
  #clipsTable [data-clip-col="source"] { width: 210px !important; }
  #clipsTable [data-clip-col="type"] { width: 90px !important; }
  #clipsTable [data-clip-col="duration"] { width: 58px !important; }
  #clipsTable [data-clip-col="description"] { width: 280px !important; }
  #clipsTable [data-clip-col="location"] { width: 160px !important; }
  #clipsTable [data-clip-col="people"] { width: 170px !important; }
}

/* Formulaire de recherche clips : réduction automatique au scroll, expansion au survol/focus */
#clipsView > .filters-panel {
  transition: padding .18s ease, box-shadow .18s ease, border-radius .18s ease;
}
#clipsView > .filters-panel.clips-filters-collapsed {
  position: sticky !important;
  top: 10px !important;
  z-index: 70 !important;
  grid-template-columns: minmax(280px, 1fr) minmax(220px, 300px) !important;
  padding: 12px 14px !important;
  box-shadow: 0 14px 34px rgba(20, 20, 18, .12) !important;
  backdrop-filter: blur(10px);
}
#clipsView > .filters-panel.clips-filters-collapsed:not(:hover):not(:focus-within) > :not(.field.wide):not(.field:has(#productionFilter)) {
  display: none !important;
}
#clipsView > .filters-panel.clips-filters-collapsed:not(:hover):not(:focus-within) .field.wide,
#clipsView > .filters-panel.clips-filters-collapsed:not(:hover):not(:focus-within) .field:has(#productionFilter) {
  grid-column: auto !important;
  margin: 0 !important;
}
#clipsView > .filters-panel.clips-filters-collapsed:not(:hover):not(:focus-within) .field.wide input,
#clipsView > .filters-panel.clips-filters-collapsed:not(:hover):not(:focus-within) .field:has(#productionFilter) select {
  min-height: 38px !important;
  height: 38px !important;
}
#clipsView > .filters-panel.clips-filters-collapsed:hover,
#clipsView > .filters-panel.clips-filters-collapsed:focus-within {
  grid-template-columns: inherit !important;
}

/* V3.7.3 — Import workflow and protected restore polish */
.admin-new-values {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(205, 140, 40, 0.35);
  border-radius: 12px;
  background: rgba(255, 190, 90, 0.08);
}
.admin-new-values > strong {
  display: block;
  margin-bottom: 4px;
}
.admin-new-values details {
  margin-top: 8px;
}
.admin-new-values summary {
  cursor: pointer;
  font-weight: 700;
}
.admin-new-values ul {
  margin: 8px 0 0 18px;
  padding: 0;
}
.admin-new-values li span {
  opacity: 0.7;
  font-size: 0.88rem;
}
.admin-report-link {
  margin-top: 12px;
}
.backup-restore-warning {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(210, 80, 80, 0.28);
  background: rgba(210, 80, 80, 0.06);
}
.backup-restore-warning span {
  opacity: 0.76;
  font-size: 0.88rem;
}
.security-status-box small {
  display: block;
  margin-top: 4px;
  opacity: 0.68;
}

/* V4.0 cart / roles / storage UI */
.nav-count {
  display: inline-flex;
  min-width: 1.4rem;
  height: 1.4rem;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  padding: 0 .35rem;
  border-radius: 999px;
  font-size: .72rem;
  background: rgba(120,120,120,.16);
}
.nav-count.pulse { transform: scale(1.15); transition: transform .18s ease; }
.cart-panel .panel-title-row { align-items: flex-start; gap: 1rem; }
.cart-content.empty { padding: 1.25rem; color: var(--muted); border: 1px dashed var(--border); border-radius: 1rem; }
.cart-table td small { display:block; max-width: 360px; color: var(--muted); margin-top: .25rem; line-height: 1.25; }
.cart-table .table-thumb-small { width: 72px; height: 42px; object-fit: cover; border-radius: .5rem; }
.user-row { display:flex; justify-content:space-between; gap:1rem; align-items:center; padding:.7rem .85rem; border:1px solid var(--border); border-radius:.85rem; margin:.45rem 0; background:var(--panel-bg, rgba(255,255,255,.55)); }
.user-row span { color: var(--muted); font-size:.9rem; }
body[data-archive-role="client"] .nav[data-view="settings"],
body[data-archive-role="client"] .nav[data-view="admin"],
body[data-archive-role="client"] .nav[data-view="users"],
body[data-archive-role="employee"] .nav[data-view="admin"],
body[data-archive-role="employee"] .nav[data-view="users"] { display:none; }

/* V4.0.4 — panier plus lisible + menu latéral stable */
@media (min-width: 1001px) {
  .app-shell { align-items: start; }
  .sidebar {
    position: sticky !important;
    top: 0 !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    align-self: start !important;
  }
}

.add-cart-btn,
.detail-add-cart-btn {
  position: relative;
  border: 1px solid var(--line) !important;
  transition: transform .14s ease, box-shadow .14s ease, background-color .14s ease, border-color .14s ease, color .14s ease !important;
}
.add-cart-btn:hover,
.detail-add-cart-btn:hover {
  transform: translateY(-1px) scale(1.03);
  border-color: var(--accent) !important;
  box-shadow: 0 8px 22px rgba(38, 36, 28, .14);
  background: var(--accent-soft) !important;
  color: var(--accent-strong) !important;
}
.add-cart-btn:active,
.detail-add-cart-btn:active {
  transform: translateY(0) scale(.97);
}
.add-cart-btn.is-loading,
.detail-add-cart-btn.is-loading {
  opacity: .72;
  cursor: wait;
}
.add-cart-btn.cart-added-feedback,
.detail-add-cart-btn.cart-added-feedback {
  background: #e7ede3 !important;
  color: #3f6137 !important;
  border-color: #8aa07b !important;
  box-shadow: 0 0 0 3px rgba(138, 160, 123, .18);
}
.add-cart-feedback-label {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.labeled-add-cart {
  white-space: nowrap;
}
.clip-detail-actions {
  align-items: center;
  flex-wrap: wrap;
}
.cart-summary-bar {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f7f4ea;
}
.cart-summary-bar div {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(222,217,203,.8);
}
.cart-summary-bar strong {
  font-size: 20px;
  line-height: 1.05;
  color: var(--accent-strong);
}
.cart-summary-bar span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  font-weight: 800;
}
.cart-table td:nth-child(5) small,
.cart-table td:nth-child(4) small {
  max-width: 420px;
}
@media (max-width: 1100px) {
  .cart-summary-bar { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

/* V4.0.5 — export PDF panier client plus propre */
.cart-export-hint {
  display: flex;
  gap: .55rem;
  align-items: center;
  flex-wrap: wrap;
  margin: .4rem 0 1rem;
  padding: .75rem .95rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7f4ea;
  color: var(--muted);
}
.cart-export-hint strong {
  color: var(--text);
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .04em;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 29, 26, .48);
  backdrop-filter: blur(3px);
  z-index: 9999;
}
.modal-backdrop.active { display: flex; }
.modal-card {
  width: min(720px, 96vw);
  max-height: 90vh;
  overflow: auto;
  border-radius: 24px;
  background: var(--panel-bg, #fffdf7);
  border: 1px solid var(--line);
  box-shadow: 0 28px 80px rgba(0,0,0,.22);
  padding: 22px;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 14px;
}
.modal-header h3 { margin: 0 0 .25rem; }
.modal-header p { margin: 0; color: var(--muted); }
.cart-pdf-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.cart-pdf-form-grid label {
  display: grid;
  gap: 6px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
}
.cart-pdf-form-grid label.wide { grid-column: 1 / -1; }
.cart-pdf-form-grid input,
.cart-pdf-form-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .78rem .9rem;
  background: rgba(255,255,255,.86);
  color: var(--text);
  font: inherit;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.cart-pdf-form-grid textarea { resize: vertical; min-height: 92px; }
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.75);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}
.icon-button:hover { background: var(--accent-soft); color: var(--accent-strong); }
@media (max-width: 720px) {
  .cart-pdf-form-grid { grid-template-columns: 1fr; }
  .modal-card { padding: 18px; }
}


/* V4.0.6 — section Utilisateurs séparée de l'Administration BD */
.admin-users-panel .settings-grid { align-items: end; }
.user-edit-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(520px, 2fr);
  align-items: center;
}
.user-main span { display:block; margin-top:.2rem; }
.user-edit-controls {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) minmax(140px, .9fr) auto minmax(170px, 1fr) auto;
  gap: .5rem;
  align-items: center;
}
.user-edit-controls input,
.user-edit-controls select {
  min-height: 36px;
  border-radius: .7rem;
  border: 1px solid var(--border);
  padding: .35rem .55rem;
  background: var(--input-bg, rgba(255,255,255,.75));
  color: var(--text);
}
.user-active-check { white-space: nowrap; font-size: .9rem; color: var(--muted); display:flex; align-items:center; gap:.3rem; }
@media (max-width: 1100px) {
  .user-edit-row { grid-template-columns: 1fr; }
  .user-edit-controls { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .user-edit-controls { grid-template-columns: 1fr; }
}


/* V4.0.7 — utilisateurs + visibilité client explicite */
.user-row-status,
.users-action-status {
  min-height: 1.2rem;
  margin-top: .45rem;
  font-size: .82rem;
  color: var(--muted);
}
.user-row-status.success,
.users-action-status.success { color: #557238; font-weight: 700; }
.user-row-status.pending,
.users-action-status.pending { color: #7a6b47; }
.user-row-status.error,
.users-action-status.error { color: #9b3d2d; font-weight: 700; }
.save-user-btn.success { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(85,114,56,.22); }
.client-visibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: .22rem .55rem;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.client-visibility-badge.is-visible {
  color: #4f6530;
  background: rgba(108, 133, 69, .12);
  border: 1px solid rgba(108, 133, 69, .25);
}
.client-visibility-badge.is-private {
  color: #9b3d2d;
  background: rgba(155, 61, 45, .10);
  border: 1px solid rgba(155, 61, 45, .25);
}
.client-visibility-card {
  margin: .9rem 0 1.1rem;
  padding: .85rem 1rem;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid rgba(40,40,35,.08);
  background: rgba(247,245,238,.78);
}
.client-visibility-card strong { display: block; font-size: .95rem; }
.client-visibility-card span,
.client-visibility-card small { display: block; color: var(--muted); margin-top: .15rem; }
.client-visibility-card.is-private {
  background: rgba(155,61,45,.08);
  border-color: rgba(155,61,45,.18);
}
.client-visibility-card.is-private strong { color: #8b3529; }
@media (max-width: 850px) {
  .client-visibility-card { align-items: flex-start; flex-direction: column; }
}

/* V4.0.9 — requêtes clients + suppression client */
.client-requests-list{display:flex;flex-direction:column;gap:14px;}
.client-requests-list.empty{padding:18px;color:var(--muted);}
.client-request-card{border:1px solid var(--border);background:var(--panel);border-radius:18px;padding:14px 16px;box-shadow:var(--shadow-soft);}
.client-request-head{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;}
.client-request-head strong{display:block;font-size:1rem;line-height:1.25;}
.client-request-head span{display:block;color:var(--muted);font-size:.82rem;margin-top:3px;}
.client-request-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;}
.client-request-meta{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;}
.client-request-meta span{background:var(--chip-bg);border:1px solid var(--border);border-radius:999px;padding:5px 9px;font-size:.84rem;}
.client-request-contact{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;color:var(--muted);font-size:.85rem;}
.client-request-contact span,.client-request-contact em{background:rgba(0,0,0,.035);border-radius:10px;padding:5px 8px;}
.client-request-detail{margin-top:14px;border-top:1px solid var(--border);padding-top:12px;}
.client-request-summary{margin-bottom:12px;}
.client-request-items td small{display:block;color:var(--muted);margin-top:4px;line-height:1.25;}
.user-edit-controls .delete-user-btn{white-space:nowrap;}
.cart-pdf-card .modal-actions{gap:10px;flex-wrap:wrap;}


/* V4.0.11 — utilisateurs/clients groupés, auth test et modales plus naturelles */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auth-widget {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid var(--border, #ded8ca);
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  min-height: 34px;
}
.auth-current {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
  max-width: 190px;
}
.auth-current span { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auth-current small,
.auth-mode-label { font-size: 10.5px; opacity: .72; white-space: nowrap; }
.users-client-requests-panel { margin-top: 18px; }
.cart-panel .settings-actions .button .ui-icon { width: 15px; height: 15px; }
.modal.active { cursor: default; }
.modal.active::before,
.modal-backdrop.active::before { cursor: default; }
.batch-modal-box,
.modal-card,
.source-batch-panel-v365 { cursor: auto; }


/* V4.0.12 — utilisateurs / clients : vraie interface de gestion */
.admin-users-panel {
  overflow: visible;
}
.admin-users-panel .settings-grid {
  align-items: end;
}
.admin-users-panel h3,
.users-client-requests-panel h3 {
  letter-spacing: -0.02em;
}
.users-action-status {
  margin-top: 10px;
  min-height: 22px;
  font-weight: 700;
}
.users-action-status.pending { color: var(--muted); }
.users-action-status.success { color: #526f2e; }
.users-action-status.error { color: #a52929; }
.user-admin-list {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}
.user-admin-list.empty {
  padding: 18px;
  color: var(--muted);
}
.user-admin-card {
  display: grid !important;
  grid-template-columns: minmax(260px, .9fr) minmax(520px, 1.6fr) minmax(150px, .45fr) !important;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(0,0,0,.075);
  border-radius: 22px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 14px 34px rgba(0,0,0,.045);
}
.user-admin-card.just-created {
  animation: userCreatedPulse 2.2s ease-out;
}
@keyframes userCreatedPulse {
  0% { box-shadow: 0 0 0 0 rgba(109, 128, 64, .35), 0 14px 34px rgba(0,0,0,.045); }
  45% { box-shadow: 0 0 0 8px rgba(109, 128, 64, .14), 0 14px 34px rgba(0,0,0,.045); }
  100% { box-shadow: 0 0 0 0 rgba(109, 128, 64, 0), 0 14px 34px rgba(0,0,0,.045); }
}
.user-card-identity {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}
.user-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-weight: 900;
  letter-spacing: .03em;
  color: #fff;
  background: #6f7658;
}
.user-avatar-admin { background: #2e3544; }
.user-avatar-employee { background: #6d704f; }
.user-avatar-client { background: #7b6c55; }
.user-id-block {
  min-width: 0;
}
.user-id-block strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.15;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-username {
  display: block;
  color: var(--muted);
  font-weight: 700;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-pill-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 9px;
}
.user-role-pill,
.user-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .76rem;
  line-height: 1;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(0,0,0,.04);
}
.user-role-admin { background: rgba(46,53,68,.13); color: #2e3544; }
.user-role-employee { background: rgba(109,112,79,.15); color: #565a35; }
.user-role-client { background: rgba(123,108,85,.16); color: #634f36; }
.user-status-pill.is-active { background: rgba(95,130,56,.15); color: #526f2e; }
.user-status-pill.is-inactive { background: rgba(160,70,60,.13); color: #93372f; }
.user-card-fields {
  display: grid !important;
  grid-template-columns: minmax(170px, 1fr) minmax(150px, .8fr) minmax(190px, 1fr) auto !important;
  gap: 10px;
  align-items: end;
}
.user-card-fields label {
  display: grid;
  gap: 6px;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 900;
  color: var(--muted);
}
.user-card-fields input,
.user-card-fields select {
  min-height: 42px !important;
  border-radius: 14px !important;
  border: 1px solid var(--border) !important;
  padding: .45rem .7rem !important;
  background: rgba(255,255,255,.86) !important;
  color: var(--text) !important;
  font-size: .95rem;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 700;
}
.user-active-check {
  min-height: 42px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  white-space: nowrap;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.user-active-check input {
  min-height: auto !important;
}
.user-card-actions {
  display: grid;
  gap: 9px;
  justify-items: stretch;
}
.user-card-actions .button {
  width: 100%;
}
.user-row-status {
  min-height: 18px;
  font-size: .82rem;
  font-weight: 800;
  text-align: center;
}
.user-row-status.pending { color: var(--muted); }
.user-row-status.success { color: #526f2e; }
.user-row-status.error { color: #a52929; }
@media (max-width: 1320px) {
  .user-admin-card {
    grid-template-columns: 1fr !important;
  }
  .user-card-actions {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    align-items: center;
  }
  .user-row-status { grid-column: 1 / -1; }
}
@media (max-width: 820px) {
  .user-card-fields {
    grid-template-columns: 1fr !important;
  }
  .user-card-actions {
    grid-template-columns: 1fr;
  }
}


/* V4.1.0 — consolidation Utilisateurs / clients */
.users-admin-shell { display: grid; gap: 18px; }
.users-admin-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 22px;
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(238,235,225,.72));
}
.users-admin-hero h3 { margin-bottom: 6px; }
.users-admin-hero p { max-width: 880px; color: var(--muted); }
.users-admin-legend { display: flex; flex-direction: column; gap: 8px; min-width: 260px; }
.users-admin-legend span { padding: 8px 10px; border-radius: 14px; background: rgba(255,255,255,.62); border: 1px solid rgba(0,0,0,.06); font-size: .88rem; }
.users-tabbar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  box-shadow: var(--shadow-soft);
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
}
.users-tab-btn {
  border: 0;
  border-radius: 13px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
  cursor: pointer;
}
.users-tab-btn:hover { background: rgba(0,0,0,.045); color: var(--text); }
.users-tab-btn.active { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(0,0,0,.12); }
.users-tab-panel { display: none; }
.users-tab-panel.active { display: grid; gap: 18px; }
.users-create-panel, .users-list-panel, .users-access-panel { border-radius: 24px; }
.users-create-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.user-request-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: .76rem;
  line-height: 1;
  font-weight: 900;
  border: 1px solid rgba(0,0,0,.08);
  background: rgba(80,78,68,.08);
  color: var(--muted);
}
.user-created-date { display: block; margin-top: 8px; color: var(--muted); font-weight: 700; }
.login-roadmap-note { margin-top: 14px; padding: 14px 16px; border-radius: 16px; border: 1px solid rgba(0,0,0,.07); background: rgba(247,245,238,.8); color: var(--muted); }
.client-request-filters { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px); gap: 10px; margin: 12px 0 16px; }
.client-request-filters input, .client-request-filters select, .client-request-status-select {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255,255,255,.84);
  padding: .65rem .75rem;
  color: var(--text);
  font-weight: 700;
}
.client-request-status-badge { display: inline-flex !important; width: fit-content; margin-top: 8px !important; border-radius: 999px; padding: 4px 9px; font-size: .75rem !important; font-weight: 900; }
.status-submitted { color: #6c5c33; background: rgba(155,132,78,.18); }
.status-in_progress { color: #325b77; background: rgba(64,120,160,.16); }
.status-completed { color: #4f6530; background: rgba(95,130,56,.16); }
.status-archived { color: #606060; background: rgba(100,100,100,.12); }
.client-request-actions { align-items: center; }
@media (max-width: 980px) {
  .users-admin-hero { flex-direction: column; }
  .users-admin-legend { min-width: 0; width: 100%; }
  .users-create-grid { grid-template-columns: 1fr 1fr; }
  .client-request-filters { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .users-create-grid { grid-template-columns: 1fr; } }


/* V4.1.2 — rôles et actions panier/corbeille */
#clipsTable .clip-row-actions { white-space: nowrap; display: inline-flex; align-items: center; gap: 9px; }
#clipsTable .add-cart-btn { margin-right: 3px; }
body[data-archive-role="client"] .field-edit,
body[data-archive-role="client"] .delete-clip-btn,
body[data-archive-role="client"] .trash-current-clip,
body[data-archive-role="client"] .restore-current-clip,
body[data-archive-role="client"] .toggle-client-visibility-btn,
body[data-archive-role="client"] #batchBtn,
body[data-archive-role="client"] .row-check,
body[data-archive-role="client"] .add-person-inline { display: none !important; }
body[data-archive-role="client"] .client-visibility-card { display: none !important; }
body[data-archive-role="employee"] [data-view="admin"],
body[data-archive-role="employee"] [data-view="settings"],
body[data-archive-role="employee"] [data-view="trash"],
body[data-archive-role="employee"] [data-users-tab="accounts"],
body[data-archive-role="employee"] [data-users-tab="access"],
body[data-archive-role="employee"] [data-users-panel="accounts"],
body[data-archive-role="employee"] [data-users-panel="access"] { display: none !important; }
body[data-archive-role="client"] [data-view="admin"],
body[data-archive-role="client"] [data-view="settings"],
body[data-archive-role="client"] [data-view="trash"],
body[data-archive-role="client"] [data-view="users"] { display: none !important; }

/* V4.1.2 — exports requêtes, mot de passe masqué, actions clips mieux alignées */
.password-prompt-card { width: min(460px, 94vw); }
.password-prompt-field { display: grid; gap: 8px; margin: 16px 0 6px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .78rem; }
.password-prompt-input { width: 100%; min-height: 48px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel-bg, #fffdf7); color: var(--text); font-size: 18px; padding: 0 16px; }
.password-prompt-input:focus { outline: 2px solid rgba(112, 128, 73, .25); border-color: var(--accent); }
.client-request-detail-actions { display: flex; justify-content: flex-end; gap: 8px; margin: 8px 0 10px; flex-wrap: wrap; }
.client-request-actions { gap: 8px; flex-wrap: wrap; }
#clipsTable th:last-child,
#clipsTable td:last-child { width: 112px !important; min-width: 112px !important; max-width: 132px !important; padding-right: 14px !important; overflow: visible !important; }
#clipsTable .clip-row-actions { width: 100%; min-width: 92px; justify-content: center; gap: 12px !important; padding-inline: 2px; box-sizing: border-box; }
#clipsTable .add-cart-btn { margin-right: 0 !important; flex: 0 0 auto; }
#clipsTable .delete-clip-btn.icon-only-trash { flex: 0 0 38px; }

/* V4.1.4 — correction définitive cellule Actions clips + Sources sélection */
#clipsTable th.clip-actions-head,
#clipsTable td.clip-actions-cell,
#clipsTable th:last-child,
#clipsTable td:last-child {
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
  text-align: center !important;
}
#clipsTable td.clip-actions-cell {
  vertical-align: middle !important;
}
#clipsTable .clip-row-actions {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 112px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
}
#clipsTable .clip-row-actions .button,
#clipsTable .add-cart-btn,
#clipsTable .delete-clip-btn.icon-only-trash {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 42px !important;
  min-height: 42px !important;
  max-height: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 46px !important;
  box-sizing: border-box !important;
  border-radius: 14px !important;
}
#clipsTable .clip-row-actions .ui-icon,
#clipsTable .clip-row-actions svg,
#clipsTable .add-cart-btn .ui-icon,
#clipsTable .delete-clip-btn .ui-icon {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
}
#clipsTable .add-cart-btn:hover,
#clipsTable .delete-clip-btn:hover {
  transform: none !important;
}
#clipsTable .add-cart-btn:active,
#clipsTable .delete-clip-btn:active {
  transform: scale(.96) !important;
}
body[data-archive-role="client"] #clipsTable th.clip-actions-head,
body[data-archive-role="client"] #clipsTable td.clip-actions-cell,
body[data-archive-role="client"] #clipsTable th:last-child,
body[data-archive-role="client"] #clipsTable td:last-child {
  width: 72px !important;
  min-width: 72px !important;
  max-width: 72px !important;
}
body[data-archive-role="client"] #clipsTable .clip-row-actions {
  max-width: 56px !important;
}
.sources-table-v365 .source-select-cell,
.sources-table-v365 .source-select-head {
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  text-align: center !important;
}
.sources-table-v365 .source-group-row-check {
  cursor: pointer !important;
}


/* V4.1.6 — Correctif robuste colonne Actions clips.
   Répété dans les trois fichiers CSS pour neutraliser les anciens correctifs qui forçaient la dernière colonne à 58/62px. */
#clipsTable thead th.clip-actions-head,
#clipsTable tbody tr.clip-row > td.clip-actions-cell,
#clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell,
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  display: table-cell !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 16px 16px 0 !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 15px !important;
  transform: none !important;
}
body[data-archive-role="client"] #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  gap: 0 !important;
}

/* V4.1.8 — Restore sticky header, contain clip action buttons without table-wrap scroll.
   Important: the sticky header in Recherche clips depends on the page scroll, so the
   table panel/wrap must NOT become a horizontal scrolling container. Instead the
   table is kept at 100% width with compact, fixed-layout columns and ellipsis. */
body.aw35-clips-page #clipsView > .table-panel {
  overflow: visible !important;
  max-width: min(1780px, 96vw) !important;
  width: min(1780px, 96vw) !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable thead th,
body.aw35-clips-page #clipsTable tbody td {
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.aw35-clips-page #clipsTable tbody td:not(.clip-actions-cell):not([data-clip-col="thumb"]) {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
body.aw35-clips-page #clipsTable thead th {
  white-space: nowrap !important;
}

/* Compact default column geometry. These widths are designed to add up inside
   the panel instead of pushing Actions outside the right edge. */
body.aw35-clips-page #clipsTable thead th:first-child,
body.aw35-clips-page #clipsTable tbody td:first-child {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
}
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page.aw35-thumb-0 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-0 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 td[data-clip-col="thumb"] { display: none !important; width: 0 !important; max-width: 0 !important; }
body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] { width: 168px !important; max-width: 168px !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] { width: 150px !important; max-width: 150px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="production"],
body.aw35-clips-page #clipsTable td[data-clip-col="production"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="source"],
body.aw35-clips-page #clipsTable td[data-clip-col="source"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"],
body.aw35-clips-page #clipsTable td[data-clip-col="type"] { width: 78px !important; max-width: 78px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"],
body.aw35-clips-page #clipsTable td[data-clip-col="duration"] { width: 80px !important; max-width: 80px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="description"],
body.aw35-clips-page #clipsTable td[data-clip-col="description"] { width: 21% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="location"],
body.aw35-clips-page #clipsTable td[data-clip-col="location"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="people"],
body.aw35-clips-page #clipsTable td[data-clip-col="people"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] { width: 98px !important; max-width: 98px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
body.aw35-clips-page #clipsTable td[data-clip-col="camera"] { width: 110px !important; max-width: 110px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="media"],
body.aw35-clips-page #clipsTable td[data-clip-col="media"] { width: 80px !important; max-width: 80px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="validation"],
body.aw35-clips-page #clipsTable td[data-clip-col="validation"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { width: 104px !important; max-width: 104px !important; }

/* Actions column: fixed, compact, and inside the table. */
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  padding: 6px 6px !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  height: 39px !important;
  min-height: 39px !important;
  max-height: 39px !important;
  flex: 0 0 39px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions svg {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  gap: 0 !important;
}

/* When the admin chooses every column, keep the interface readable instead of
   letting hidden laptop rules or huge min-widths fight with the table. */
body.aw35-clips-page #clipsTable.clip-many-columns th,
body.aw35-clips-page #clipsTable.clip-many-columns td {
  font-size: 13px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
body.aw35-clips-page #clipsTable.clip-all-columns th,
body.aw35-clips-page #clipsTable.clip-all-columns td {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

/* V4.2.2 storage/R2 admin card */
.storage-mode-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(117, 127, 92, 0.22);
  border-radius: 22px;
  background: rgba(255,255,255,0.74);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.storage-mode-card p {
  margin: 6px 0 0;
  color: var(--muted, #6d7066);
  line-height: 1.45;
}
.compact-log {
  min-height: 80px;
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
}

/* V4.2.2 migration R2 */
.storage-migration-card {
  grid-column: 1 / -1;
  border: 1px solid rgba(117, 127, 92, 0.22);
  border-radius: 22px;
  background: rgba(255,255,255,0.78);
  padding: 18px;
  display: grid;
  gap: 14px;
}
.storage-migration-card p {
  margin: 6px 0 0;
  color: var(--muted, #6d7066);
  line-height: 1.45;
}
.compact-storage-grid {
  grid-template-columns: minmax(220px, 1.6fr) minmax(120px, .5fr) repeat(3, minmax(120px, .5fr));
  align-items: end;
}
.check-option {
  min-height: 46px;
  border: 1px solid var(--line, rgba(0,0,0,.12));
  border-radius: 16px;
  padding: 10px 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  color: var(--ink, #24251f);
  background: rgba(250,249,244,.88);
}
.check-option input {
  width: 18px;
  height: 18px;
}
@media (max-width: 1000px) {
  .compact-storage-grid { grid-template-columns: 1fr 1fr; }
}


/* V4.2.3 — R2 migration completion/status feedback */
.storage-migration-live {
  border-radius: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(117, 127, 92, 0.24);
  background: rgba(250, 249, 244, 0.9);
  color: var(--ink, #24251f);
  font-weight: 700;
  line-height: 1.35;
}
.storage-migration-live.idle {
  color: var(--muted, #6d7066);
  background: rgba(250, 249, 244, 0.72);
}
.storage-migration-live.running {
  border-color: rgba(161, 116, 43, 0.35);
  background: rgba(255, 247, 224, 0.95);
}
.storage-migration-live.done {
  border-color: rgba(50, 116, 83, 0.35);
  background: rgba(230, 246, 237, 0.95);
}
.storage-migration-live.error {
  border-color: rgba(160, 62, 62, 0.35);
  background: rgba(255, 235, 235, 0.95);
}
.storage-migration-live-summary {
  margin-top: 6px;
  font-weight: 600;
  color: var(--muted, #6d7066);
}
.storage-migration-live-summary strong {
  color: var(--ink, #24251f);
}

/* V4.2.5 — progress bar for R2 migration jobs */
.storage-migration-progress {
  border: 1px solid rgba(117, 127, 92, 0.22);
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 8px;
}
.storage-migration-progress[hidden] {
  display: none !important;
}
.storage-migration-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
}
.storage-migration-progress-head span {
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.storage-migration-progress-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(36, 37, 31, 0.10);
}
.storage-migration-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(117,127,92,.95), rgba(161,116,43,.95));
  transition: width 0.28s ease;
}
.storage-migration-progress-details {
  font-size: 12px;
  line-height: 1.35;
  color: var(--muted, #6d7066);
}
.storage-migration-progress-details .muted {
  color: var(--muted, #6d7066);
}


/* V4.2.5 — make R2 migration progress visibly present even before upload */
.storage-migration-card .storage-migration-progress {
  margin-top: 12px;
  border: 1px solid rgba(30, 70, 110, 0.18);
  background: rgba(245, 248, 252, 0.92);
}
.storage-migration-card .storage-migration-live {
  margin-top: 10px;
  font-weight: 600;
}

/* V4.2.9 — Administration BD tab rationalization */
.admin-tab-panel { display: none; }
.admin-tab-panel.active { display: block; }
.admin-subnav { margin-bottom: 16px; }
.admin-tab-panel .panel { margin-bottom: 16px; }
.settings-tab-panel[data-settings-panel="visual"] .settings-panel { max-width: 1100px; }

.muted-label { color: var(--muted, #777); font-size: 0.85em; font-weight: 600; }

/* ============================================================
   SECTION 03–05 — MERGED RESULTS + FRONTEND CONSOLIDATION LAYERS
   Historical layers preserved in original order to avoid visual changes.
   Do not reorder rules in this block without browser testing.
   ============================================================ */

/* === V4.2.15-dev24 merged frontend_consolidation_v3_7.css BEGIN === */
/* === V4.2.15-dev24 MERGED: public/clip_results_v3_5.css START === */
/* Archive Web App V3.5.0 — stable clip results layout
   Clean replacement for V3.4.6-13 sticky experiments.
   Goal: search/filter panel scrolls normally; only results toolbar + table headers stick. */

body.aw35-clips-page {
  --aw35-toolbar-height: 72px;
  --aw35-header-bg: rgba(242, 239, 230, 0.985);
  --aw35-header-bg-active: rgba(232, 228, 214, 0.99);
  --aw35-line: rgba(84, 89, 72, 0.16);
  --aw35-shadow: 0 8px 18px rgba(0,0,0,0.07);
}

/* Search panel: absolutely no sticky/compact/floating behavior. */
body.aw35-clips-page #clipsView > .filters-panel,
body.aw35-clips-page #clipsView > .filters-panel.aw35-search-panel,
body.aw35-clips-page #clipsView > .filters-panel[class*="sticky"],
body.aw35-clips-page #clipsView > .filters-panel[class*="compact"],
body.aw35-clips-page #clipsView > .filters-panel[class*="floating"],
body.aw35-clips-page #clipsView > .filters-panel[class*="collapsed"] {
  position: static !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  z-index: auto !important;
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.aw35-clips-page #clipsView > .filters-panel::before,
body.aw35-clips-page #clipsView > .filters-panel::after { display: none !important; }
body.aw35-clips-page [class*="search-spacer"],
body.aw35-clips-page [class*="sticky-spacer"],
body.aw35-clips-page [class*="compact-spacer"] { display: none !important; height: 0 !important; }

/* Results container: no internal scroll; the page scrolls. */
body.aw35-clips-page #clipsView .table-panel { overflow: visible !important; }
body.aw35-clips-page #clipsView .table-wrap { overflow: visible !important; max-height: none !important; }

/* Sticky results toolbar. */
body.aw35-clips-page #clipsView .table-panel > .table-actions {
  position: sticky !important;
  top: 0 !important;
  z-index: 760 !important;
  min-height: var(--aw35-toolbar-height) !important;
  background: rgba(255, 253, 247, 0.985) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-bottom: 1px solid var(--aw35-line) !important;
  box-shadow: var(--aw35-shadow) !important;
}

/* Sticky table column headers, exactly under the toolbar. */
body.aw35-clips-page #clipsTable thead th {
  position: sticky !important;
  top: var(--aw35-toolbar-height) !important;
  z-index: 735 !important;
  background: var(--aw35-header-bg) !important;
  border-top: 1px solid var(--aw35-line) !important;
  border-bottom: 1px solid var(--aw35-line) !important;
  box-shadow: 0 6px 12px rgba(0,0,0,0.045) !important;
  vertical-align: middle !important;
  height: 48px !important;
  padding: 7px 9px !important;
}
body.aw35-clips-page #clipsTable thead th:hover,
body.aw35-clips-page #clipsTable thead th.active-sort { background: var(--aw35-header-bg-active) !important; }

/* Keep labels readable and on one line where possible. */
body.aw35-clips-page #clipsTable thead th,
body.aw35-clips-page #clipsTable thead th *,
body.aw35-clips-page #clipsTable .sort-head,
body.aw35-clips-page #clipsTable .sort-head * {
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  hyphens: none !important;
}
body.aw35-clips-page #clipsTable .sort-head {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.32rem !important;
  max-width: 100% !important;
  min-width: 0 !important;
  padding: 0.38rem 0.66rem !important;
  line-height: 1.05 !important;
  font-size: 12px !important;
  letter-spacing: 0.035em !important;
}
body.aw35-clips-page #clipsTable th.active-sort .sort-head {
  padding: 0.42rem 0.72rem !important;
  border-radius: 999px !important;
  outline: 2px solid rgba(111, 127, 63, .22) !important;
}

/* Hide text Actions. Trash button icon is enough. */
body.aw35-clips-page #clipsTable thead th:last-child,
body.aw35-clips-page #clipsTable thead th:last-child * {
  color: transparent !important;
  font-size: 0 !important;
  width: 62px !important;
  min-width: 62px !important;
  max-width: 70px !important;
}
body.aw35-clips-page #clipsTable tbody td:last-child { width: 112px !important; min-width: 112px !important; max-width: 112px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable .delete-clip-btn,
body.aw35-clips-page #clipsTable button.delete-clip-btn {
  width: 38px !important; min-width: 38px !important; height: 38px !important;
  padding: 0 !important; border-radius: 12px !important; font-size: 0 !important;
  display: inline-flex !important; align-items: center !important; justify-content: center !important;
}
body.aw35-clips-page #clipsTable .delete-clip-btn svg,
body.aw35-clips-page #clipsTable .delete-clip-btn img { width: 20px !important; height: 20px !important; }
body.aw35-clips-page #clipsTable .delete-clip-btn::before { content: "" !important; }

/* Duration header: clear clock. */
body.aw35-clips-page #clipsTable th[data-clip-col="duration"] { width: 82px !important; min-width: 76px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"] .sort-head { font-size: 0 !important; padding: 0.32rem !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"] .sort-head::before {
  content: "⏱" !important; font-size: 24px !important; line-height: 1 !important; color: var(--accent-strong, #63733c) !important;
}

/* Conservative widths for laptop. */
body.aw35-clips-page #clipsTable th:nth-child(1), body.aw35-clips-page #clipsTable td:nth-child(1) { width: 42px !important; min-width: 42px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="production"], body.aw35-clips-page #clipsTable td[data-clip-col="production"] { min-width: 172px !important; width: 180px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="source"], body.aw35-clips-page #clipsTable td[data-clip-col="source"] { min-width: 175px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"], body.aw35-clips-page #clipsTable td[data-clip-col="type"] { min-width: 108px !important; width: 110px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="description"], body.aw35-clips-page #clipsTable td[data-clip-col="description"] { min-width: 310px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="location"], body.aw35-clips-page #clipsTable td[data-clip-col="location"] { min-width: 160px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="people"], body.aw35-clips-page #clipsTable td[data-clip-col="people"] { min-width: 170px !important; }

/* Thumbnail columns by mode. */
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] { min-width: 126px !important; width: 126px !important; overflow: visible !important; }
body.aw35-clips-page #clipsTable img[src*="thumbnails/"],
body.aw35-clips-page #clipsTable .table-thumb { object-fit: contain !important; object-position: center !important; }
body.aw35-clips-page.aw35-thumb-0 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-0 #clipsTable td[data-clip-col="thumb"] { display: none !important; }
body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"] { min-width: 380px !important; width: 380px !important; max-width: 400px !important; }
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"] img[src*="thumbnails/"] { width: 350px !important; max-width: 350px !important; height: auto !important; max-height: 205px !important; object-fit: contain !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"] { min-width: 240px !important; width: 240px !important; max-width: 260px !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable .thumb-grid-mini,
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"] .thumb-grid-mini { display: grid !important; grid-template-columns: repeat(2, 88px) !important; gap: 5px !important; width: 185px !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable .thumb-grid-mini img,
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"] img[src*="thumbnails/"] { width: 88px !important; max-width: 88px !important; height: 50px !important; object-fit: cover !important; }

/* Source editor helpers. */
.source-section-title-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-top:1.2rem; }
.source-full-edit-form { display:grid; gap:12px; }
.source-full-edit-grid { display:grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap:12px; }
.source-full-edit-field label { display:block; font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin-bottom:5px; }
.source-full-edit-field input, .source-full-edit-field select, .source-full-edit-field textarea { width:100%; }
.source-full-edit-field.full { grid-column:1 / -1; }
.source-propagation-box { border:1px solid var(--line); border-radius:16px; padding:12px; background:rgba(246,244,237,.8); }
.source-propagation-box label { display:inline-flex; align-items:center; gap:.4rem; margin:.25rem .8rem .25rem 0; font-size:13px; }
.source-full-edit-actions { display:flex; justify-content:flex-end; gap:.6rem; }

@media (max-width: 1500px) {
  body.aw35-clips-page #clipsTable thead th { padding: 6px 7px !important; }
  body.aw35-clips-page #clipsTable .sort-head { font-size: 11.2px !important; padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="production"], body.aw35-clips-page #clipsTable td[data-clip-col="production"] { min-width: 158px !important; width: 162px !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="source"], body.aw35-clips-page #clipsTable td[data-clip-col="source"] { min-width: 158px !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="description"], body.aw35-clips-page #clipsTable td[data-clip-col="description"] { min-width: 270px !important; }
}


/* V4.1.6 — Correctif robuste colonne Actions clips.
   Répété dans les trois fichiers CSS pour neutraliser les anciens correctifs qui forçaient la dernière colonne à 58/62px. */
#clipsTable thead th.clip-actions-head,
#clipsTable tbody tr.clip-row > td.clip-actions-cell,
#clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell,
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  display: table-cell !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 16px 16px 0 !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 15px !important;
  transform: none !important;
}
body[data-archive-role="client"] #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  gap: 0 !important;
}
/* V4.1.8 — Restore sticky header, contain clip action buttons without table-wrap scroll.
   Important: the sticky header in Recherche clips depends on the page scroll, so the
   table panel/wrap must NOT become a horizontal scrolling container. Instead the
   table is kept at 100% width with compact, fixed-layout columns and ellipsis. */
body.aw35-clips-page #clipsView > .table-panel {
  overflow: visible !important;
  max-width: min(1780px, 96vw) !important;
  width: min(1780px, 96vw) !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable thead th,
body.aw35-clips-page #clipsTable tbody td {
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.aw35-clips-page #clipsTable tbody td:not(.clip-actions-cell):not([data-clip-col="thumb"]) {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
body.aw35-clips-page #clipsTable thead th {
  white-space: nowrap !important;
}

/* Compact default column geometry. These widths are designed to add up inside
   the panel instead of pushing Actions outside the right edge. */
body.aw35-clips-page #clipsTable thead th:first-child,
body.aw35-clips-page #clipsTable tbody td:first-child {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
}
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page.aw35-thumb-0 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-0 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 td[data-clip-col="thumb"] { display: none !important; width: 0 !important; max-width: 0 !important; }
body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] { width: 168px !important; max-width: 168px !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] { width: 150px !important; max-width: 150px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="production"],
body.aw35-clips-page #clipsTable td[data-clip-col="production"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="source"],
body.aw35-clips-page #clipsTable td[data-clip-col="source"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"],
body.aw35-clips-page #clipsTable td[data-clip-col="type"] { width: 78px !important; max-width: 78px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"],
body.aw35-clips-page #clipsTable td[data-clip-col="duration"] { width: 80px !important; max-width: 80px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="description"],
body.aw35-clips-page #clipsTable td[data-clip-col="description"] { width: 21% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="location"],
body.aw35-clips-page #clipsTable td[data-clip-col="location"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="people"],
body.aw35-clips-page #clipsTable td[data-clip-col="people"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] { width: 98px !important; max-width: 98px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
body.aw35-clips-page #clipsTable td[data-clip-col="camera"] { width: 110px !important; max-width: 110px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="media"],
body.aw35-clips-page #clipsTable td[data-clip-col="media"] { width: 80px !important; max-width: 80px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="validation"],
body.aw35-clips-page #clipsTable td[data-clip-col="validation"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { width: 104px !important; max-width: 104px !important; }

/* Actions column: fixed, compact, and inside the table. */
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  padding: 6px 6px !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  height: 39px !important;
  min-height: 39px !important;
  max-height: 39px !important;
  flex: 0 0 39px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions svg {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  gap: 0 !important;
}

/* When the admin chooses every column, keep the interface readable instead of
   letting hidden laptop rules or huge min-widths fight with the table. */
body.aw35-clips-page #clipsTable.clip-many-columns th,
body.aw35-clips-page #clipsTable.clip-many-columns td {
  font-size: 13px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
body.aw35-clips-page #clipsTable.clip-all-columns th,
body.aw35-clips-page #clipsTable.clip-all-columns td {
  font-size: 12px !important;
  line-height: 1.15 !important;
}
/* === V4.2.15-dev24 MERGED: public/clip_results_v3_5.css END === */

/* === V4.2.15-dev24 MERGED: public/source_results_v3_7_1.css START === */
/* V3.7.1 — Sources hotfix: header glued under toolbar, functional thumbnail buttons, hover preview, adaptive thumbnail column. */
#sourcesView .filters-panel {
  position: static !important;
  top: auto !important;
}
#sourcesView .table-panel.sources-table-panel-v365,
#sourcesView .table-panel {
  overflow: visible !important;
  position: relative !important;
  border-radius: 22px;
}
#sourcesView .table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
  max-height: none !important;
  position: relative !important;
}
#sourcesView .table-actions.source-actions-v365 {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 16px 18px !important;
  background: #fffdf8 !important;
  border-bottom: 1px solid var(--line, #ded9ca) !important;
  box-shadow: 0 12px 26px rgba(38,35,28,.10) !important;
}
#sourcesView .source-actions-right-v365 {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
#sourcesView .source-count-wrap {
  font-size: 1.05rem;
  white-space: nowrap;
}
#sourcesView .page-size-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted, #6f756a);
  font-weight: 800;
  white-space: nowrap;
}
#sourcesView .page-size-inline select {
  min-width: 78px;
  height: 44px;
}
#sourcesView .page-label-inline {
  color: var(--muted, #6f756a);
  font-weight: 800;
  white-space: nowrap;
}

#sourcesView .table-panel.sources-table-panel-v365 .table-wrap {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#sourcesTable.sources-table-v365 thead,
#sourcesTable.sources-table-v365 thead tr {
  transform: none !important;
}

#sourcesTable.sources-table-v365 {
  width: 100%;
  min-width: 1120px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
#sourcesTable.sources-table-v365 thead th {
  position: sticky !important;
  top: var(--source-header-top, 0px) !important;
  z-index: 115 !important;
  background: #ebe7db !important;
  color: #304057 !important;
  padding: 14px 12px !important;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 900;
  border-bottom: 1px solid var(--line, #ded9ca) !important;
  box-shadow: 0 10px 22px rgba(38,35,28,.11) !important;
  vertical-align: middle;
}

#sourcesTable.sources-table-v365 thead {
  position: relative !important;
  z-index: 110 !important;
}
#sourcesTable.sources-table-v365 tbody td {
  position: relative;
  z-index: 1;
}
#sourcesTable.sources-table-v365 tbody tr:first-child td {
  border-top: 1px solid var(--line, #ded9ca) !important;
}
#sourcesTable.sources-table-v365 .table-thumb {
  transition: transform 150ms ease, box-shadow 150ms ease;
}
#sourcesTable.sources-table-v365 tbody tr.source-row:hover .table-thumb {
  transform: scale(1.08);
  box-shadow: 0 14px 34px rgba(0,0,0,.18);
}
#sourcesTable.sources-table-v365.source-thumb-mode-0 { min-width: 940px !important; }
#sourcesTable.sources-table-v365.source-thumb-mode-1 [data-source-col="thumb"] { width: 125px !important; }
#sourcesTable.sources-table-v365.source-thumb-mode-2 [data-source-col="thumb"] { width: 260px !important; }
#sourcesTable.sources-table-v365.source-thumb-mode-4 [data-source-col="thumb"] { width: 215px !important; }

#sourcesTable.sources-table-v365 thead th[data-source-sort] { cursor: pointer; }
#sourcesTable.sources-table-v365 thead th[data-source-sort]:hover span {
  color: var(--accent-dark, #53642f);
}
#sourcesTable.sources-table-v365 tbody td {
  background: #fffefb !important;
  padding: 18px 12px !important;
  border-bottom: 1px solid var(--line, #ded9ca);
  vertical-align: middle;
}
#sourcesTable.sources-table-v365 tbody tr.source-row { cursor: pointer; }
#sourcesTable.sources-table-v365 tbody tr.source-row:hover td { background: #f6f3eb !important; }
#sourcesTable.sources-table-v365 .source-select-head,
#sourcesTable.sources-table-v365 .source-select-cell {
  width: 46px !important;
  text-align: center;
}
#sourcesTable.sources-table-v365 [data-source-col="thumb"] { width: 125px; }
#sourcesTable.sources-table-v365 [data-source-col="source"] { width: 170px; }
#sourcesTable.sources-table-v365 [data-source-col="production"] { width: 170px; }
#sourcesTable.sources-table-v365 [data-source-col="date"] { width: 115px; }
#sourcesTable.sources-table-v365 [data-source-col="location"] { width: 185px; }
#sourcesTable.sources-table-v365 [data-source-col="clips"] { width: 78px; text-align: center; }
#sourcesTable.sources-table-v365 [data-source-col="duration"] { width: 105px; }
#sourcesTable.sources-table-v365 [data-source-col="source_type"] { width: 145px; }
#sourcesTable.sources-table-v365 [data-source-col="source_medium"] { width: 130px; }
#sourcesTable.sources-table-v365 [data-source-col="camera"] { width: 160px; }
#sourcesTable.sources-table-v365 [data-source-col="notes"] { width: 260px; }
#sourcesTable.sources-table-v365 .source-id {
  color: var(--accent, #6f8a3e);
  font-weight: 900;
}
#sourcesTable.sources-table-v365 .source-thumb-placeholder {
  width: 96px;
  height: 54px;
  border-radius: 10px;
  background: #e9e8e0;
  color: #8a8b80;
  display: grid;
  place-items: center;
  font-weight: 900;
}
#sourcesTable.sources-table-v365 .table-thumb-small {
  width: 98px;
  height: 55px;
  object-fit: cover;
  border-radius: 10px;
}
#sourcesTable.sources-table-v365 .table-thumb-large {
  width: 218px;
  height: 123px;
  object-fit: contain;
  background: #e9e8e0;
  border-radius: 12px;
}
#sourcesTable.sources-table-v365 .source-thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 88px);
  gap: 6px;
}
#sourcesTable.sources-table-v365 .source-thumb-grid .table-thumb,
#sourcesTable.sources-table-v365 .source-thumb-grid .source-thumb-placeholder {
  width: 88px;
  height: 50px;
  object-fit: cover;
}
#sourcesTable.sources-table-v365.source-thumb-mode-0 [data-source-col="thumb"] {
  display: none !important;
}
#sourcesTable.sources-table-v365.source-thumb-mode-2 [data-source-col="thumb"] { width: 260px !important; }
#sourcesTable.sources-table-v365.source-thumb-mode-4 [data-source-col="thumb"] { width: 215px !important; }
.source-column-picker-v365 { position: relative; }
.source-column-menu-v365 {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 120;
  min-width: 245px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line, #ded9ca);
  background: #fffdf8;
  box-shadow: 0 22px 70px rgba(0,0,0,.22);
}
.source-column-menu-v365 .column-menu-title {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted, #6f756a);
  margin-bottom: 8px;
}
.source-column-menu-v365 label {
  display: block;
  padding: 6px 2px;
  font-weight: 700;
}
.source-batch-modal-v365,
.source-merge-modal-v365 {
  z-index: 160 !important;
  padding: 24px !important;
  place-items: center !important;
}
.source-batch-panel-v365,
.source-merge-panel-v365 {
  width: min(1120px, calc(100vw - 54px));
  max-height: 88vh;
  overflow: auto;
  background: #fffdf8 !important;
  color: var(--ink, #202020) !important;
  border: 1px solid var(--line, #ded9ca) !important;
  border-radius: 24px !important;
  box-shadow: 0 30px 110px rgba(0,0,0,.36) !important;
  padding: 22px;
}
.source-batch-alert-v365 {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  margin: 12px 0 18px;
  border-radius: 16px;
  border: 1px solid #ead9a8;
  background: #fff6d8;
  color: #4c3c10;
}
.source-batch-grid-v365 {
  display: grid;
  grid-template-columns: repeat(3, minmax(190px, 1fr));
  gap: 14px;
}
.source-batch-field-v365 {
  border: 1px solid var(--line, #ded9ca);
  background: rgba(255,255,255,.7);
  border-radius: 18px;
  padding: 12px;
}
.source-batch-field-v365 .batch-field-enable {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  margin-bottom: 8px;
}
.source-batch-field-v365 input[type="text"],
.source-batch-field-v365 input[type="date"],
.source-batch-field-v365 select,
.source-batch-field-v365 textarea,
.source-merge-panel-v365 select {
  width: 100%;
  border: 1px solid var(--line, #ded9ca);
  border-radius: 12px;
  background: #fff;
  padding: 10px 11px;
  color: var(--ink, #202020);
}
.source-batch-propagate-v365 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .88rem;
  color: var(--muted, #6f756a);
  margin-top: 8px;
}
@media (max-width: 1500px) {
  #sourcesTable.sources-table-v365 { min-width: 1040px; font-size: .92rem; }
  #sourcesTable.sources-table-v365 [data-source-col="thumb"] { width: 110px; }
  #sourcesTable.sources-table-v365 [data-source-col="source"] { width: 150px; }
  #sourcesTable.sources-table-v365 [data-source-col="production"] { width: 150px; }
  #sourcesTable.sources-table-v365.source-thumb-mode-2 [data-source-col="thumb"] { width: 230px !important; }
  #sourcesTable.sources-table-v365.source-thumb-mode-4 [data-source-col="thumb"] { width: 200px !important; }
  .source-batch-grid-v365 { grid-template-columns: repeat(2, minmax(190px, 1fr)); }
}


/* V4.2.15-dev24 — Sources column dropdown portal/z-index fix */
#sourcesView .source-actions-v365,
#sourcesView .table-actions.source-actions-v365,
#sourceColumnPicker {
  position: sticky !important;
  z-index: 2147482000 !important;
  overflow: visible !important;
  isolation: isolate !important;
}
#sourcesView .table-panel,
#sourcesView .table-wrap,
#sourcesView .source-actions-right-v365 {
  overflow: visible !important;
}
#sourcesTable.sources-table-v365 thead,
#sourcesTable.sources-table-v365 thead tr,
#sourcesTable.sources-table-v365 thead th {
  z-index: 100 !important;
}
#sourceColumnMenu.source-column-menu-v365,
.source-column-menu-v365.source-column-menu-portal-v4215 {
  z-index: 2147483000 !important;
  max-height: min(72vh, 620px) !important;
  overflow: auto !important;
  pointer-events: auto !important;
}
/* === V4.2.15-dev24 MERGED: public/source_results_v3_7_1.css END === */

/* V3.7 — shared front-end consolidation layer. Loaded after the view patches. */
.loading-soft{opacity:.58;pointer-events:none}
.audit-metrics-grid .metric-warning strong{color:#8a5d00}


/* V4.1.4 — Consolidation tableaux: actions stables + colonnes réactivables */
#clipsView .table-wrap,
#globalSearchResults .table-wrap,
#sourcesView .table-wrap {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#clipsTable,
.global-clips-table,
#sourcesTable.sources-table-v365 {
  table-layout: fixed !important;
}

#clipsTable.clip-many-columns,
.global-clips-table.clip-many-columns {
  min-width: 1560px !important;
}
#clipsTable.clip-all-columns,
.global-clips-table.clip-all-columns {
  min-width: 1760px !important;
}
#sourcesTable.sources-table-v365.sources-many-columns {
  min-width: 1480px !important;
}
#sourcesTable.sources-table-v365.sources-all-columns {
  min-width: 1640px !important;
}

/* Les colonnes masquées par choix utilisateur restent masquées, mais les anciennes règles laptop
   ne doivent plus empêcher Archive ID / Caméra de réapparaître quand on les coche. */
#clipsTable [data-clip-col][hidden],
.global-clips-table [data-global-clip-col][hidden],
#sourcesTable.sources-table-v365 [data-source-col][hidden] {
  display: none !important;
}

@media (max-height: 1220px), (max-width: 1500px) {
  #clipsTable [data-clip-col="archive_id"]:not([hidden]),
  #clipsTable [data-clip-col="camera"]:not([hidden]),
  .global-clips-table [data-global-clip-col="archive_id"]:not([hidden]),
  .global-clips-table [data-global-clip-col="camera"]:not([hidden]) {
    display: table-cell !important;
  }
}

/* Colonne actions: garder les icônes dans la cellule, ne jamais convertir le TD en inline-flex. */
#clipsTable th:last-child,
#clipsTable td.clip-actions-cell,
#clipsTable td:last-child {
  width: 132px !important;
  min-width: 132px !important;
  max-width: 132px !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
  overflow: visible !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
#clipsTable th:last-child,
#clipsTable th:last-child * {
  font-size: 0 !important;
  color: transparent !important;
}
#clipsTable td.clip-actions-cell {
  display: table-cell !important;
}
#clipsTable td.clip-actions-cell .clip-row-actions,
#clipsTable .clip-row-actions {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
#clipsTable .add-cart-btn,
#clipsTable .delete-clip-btn.icon-only-trash {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  padding: 0 !important;
  flex: 0 0 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 14px !important;
  margin: 0 !important;
}
#clipsTable .add-cart-btn .ui-icon,
#clipsTable .add-cart-btn svg,
#clipsTable .delete-clip-btn.icon-only-trash .ui-icon,
#clipsTable .delete-clip-btn.icon-only-trash svg {
  width: 19px !important;
  height: 19px !important;
  margin: 0 !important;
}
body[data-archive-role="client"] #clipsTable th:last-child,
body[data-archive-role="client"] #clipsTable td.clip-actions-cell,
body[data-archive-role="client"] #clipsTable td:last-child {
  width: 70px !important;
  min-width: 70px !important;
  max-width: 70px !important;
}
body[data-archive-role="client"] #clipsTable td.clip-actions-cell .clip-row-actions { gap: 0 !important; }

/* Largeurs explicites des colonnes additionnelles quand elles sont affichées. */
#clipsTable [data-clip-col="archive_id"],
.global-clips-table [data-global-clip-col="archive_id"] { width: 150px !important; min-width: 150px !important; }
#clipsTable [data-clip-col="camera"],
.global-clips-table [data-global-clip-col="camera"] { width: 150px !important; min-width: 150px !important; }
#clipsTable [data-clip-col="client_visibility"],
.global-clips-table [data-global-clip-col="client_visibility"] { width: 130px !important; min-width: 130px !important; }
#clipsTable [data-clip-col="media"],
.global-clips-table [data-global-clip-col="media"] { width: 96px !important; min-width: 96px !important; }
#clipsTable [data-clip-col="validation"],
.global-clips-table [data-global-clip-col="validation"] { width: 120px !important; min-width: 120px !important; }

/* Sources: quand tout est affiché, privilégier un scroll horizontal propre plutôt que des colonnes écrasées. */
#sourcesTable.sources-table-v365.sources-many-columns [data-source-col="notes"] { width: 320px !important; min-width: 320px !important; }
#sourcesTable.sources-table-v365.sources-many-columns [data-source-col="camera"] { width: 180px !important; min-width: 180px !important; }
#sourcesTable.sources-table-v365.sources-many-columns [data-source-col="source_type"],
#sourcesTable.sources-table-v365.sources-many-columns [data-source-col="source_medium"] { width: 155px !important; min-width: 155px !important; }

/* V4.1.5 — Fix définitif affichage boutons panier/corbeille dans Recherche clips.
   Le bug venait d'anciennes règles V3.5 plus spécifiques sur td:last-child.
   On cible explicitement la cellule actions avec une spécificité supérieure. */
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 148px !important;
  min-width: 148px !important;
  max-width: 148px !important;
  padding: 0 12px !important;
  box-sizing: border-box !important;
  display: table-cell !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  border-right: 1px solid var(--line) !important;
  border-radius: 0 18px 18px 0 !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 100% !important;
  max-width: 120px !important;
  min-width: 0 !important;
  height: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 48px !important;
  min-width: 48px !important;
  max-width: 48px !important;
  height: 48px !important;
  min-height: 48px !important;
  max-height: 48px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 48px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 16px !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn svg,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash svg {
  width: 21px !important;
  height: 21px !important;
  min-width: 21px !important;
  max-width: 21px !important;
  margin: 0 !important;
  flex: 0 0 21px !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn:hover,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash:hover {
  transform: translateY(-1px) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn:active,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash:active {
  transform: scale(.96) !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 74px !important;
  min-width: 74px !important;
  max-width: 74px !important;
  padding: 0 10px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  max-width: 52px !important;
  gap: 0 !important;
}


/* V4.1.6 — Correctif robuste colonne Actions clips.
   Répété dans les trois fichiers CSS pour neutraliser les anciens correctifs qui forçaient la dernière colonne à 58/62px. */
#clipsTable thead th.clip-actions-head,
#clipsTable tbody tr.clip-row > td.clip-actions-cell,
#clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell,
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  padding-left: 4px !important;
  padding-right: 4px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  display: table-cell !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 16px 16px 0 !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 88px !important;
  min-width: 88px !important;
  max-width: 88px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 0 !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
#clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  padding: 0 !important;
  margin: 0 !important;
  flex: 0 0 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  border-radius: 15px !important;
  transform: none !important;
}
body[data-archive-role="client"] #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}
body[data-archive-role="client"] #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  gap: 0 !important;
}
/* V4.1.8 — Restore sticky header, contain clip action buttons without table-wrap scroll.
   Important: the sticky header in Recherche clips depends on the page scroll, so the
   table panel/wrap must NOT become a horizontal scrolling container. Instead the
   table is kept at 100% width with compact, fixed-layout columns and ellipsis. */
body.aw35-clips-page #clipsView > .table-panel {
  overflow: visible !important;
  max-width: min(1780px, 96vw) !important;
  width: min(1780px, 96vw) !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable thead th,
body.aw35-clips-page #clipsTable tbody td {
  min-width: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body.aw35-clips-page #clipsTable tbody td:not(.clip-actions-cell):not([data-clip-col="thumb"]) {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
body.aw35-clips-page #clipsTable thead th {
  white-space: nowrap !important;
}

/* Compact default column geometry. These widths are designed to add up inside
   the panel instead of pushing Actions outside the right edge. */
body.aw35-clips-page #clipsTable thead th:first-child,
body.aw35-clips-page #clipsTable tbody td:first-child {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
}
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page.aw35-thumb-0 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-0 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 td[data-clip-col="thumb"] { display: none !important; width: 0 !important; max-width: 0 !important; }
body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] { width: 168px !important; max-width: 168px !important; }
body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] { width: 150px !important; max-width: 150px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="production"],
body.aw35-clips-page #clipsTable td[data-clip-col="production"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="source"],
body.aw35-clips-page #clipsTable td[data-clip-col="source"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"],
body.aw35-clips-page #clipsTable td[data-clip-col="type"] { width: 78px !important; max-width: 78px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"],
body.aw35-clips-page #clipsTable td[data-clip-col="duration"] { width: 80px !important; max-width: 80px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="description"],
body.aw35-clips-page #clipsTable td[data-clip-col="description"] { width: 21% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="location"],
body.aw35-clips-page #clipsTable td[data-clip-col="location"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="people"],
body.aw35-clips-page #clipsTable td[data-clip-col="people"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] { width: 98px !important; max-width: 98px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
body.aw35-clips-page #clipsTable td[data-clip-col="camera"] { width: 110px !important; max-width: 110px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="media"],
body.aw35-clips-page #clipsTable td[data-clip-col="media"] { width: 80px !important; max-width: 80px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="validation"],
body.aw35-clips-page #clipsTable td[data-clip-col="validation"] { width: 94px !important; max-width: 94px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { width: 104px !important; max-width: 104px !important; }

/* Actions column: fixed, compact, and inside the table. */
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: 104px !important;
  min-width: 104px !important;
  max-width: 104px !important;
  padding: 6px 6px !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 86px !important;
  min-width: 86px !important;
  max-width: 86px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  height: 39px !important;
  min-height: 39px !important;
  max-height: 39px !important;
  flex: 0 0 39px !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 14px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions svg {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: 0 0 18px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable thead th.clip-actions-head,
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  width: 54px !important;
  min-width: 54px !important;
  max-width: 54px !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: 39px !important;
  min-width: 39px !important;
  max-width: 39px !important;
  gap: 0 !important;
}

/* When the admin chooses every column, keep the interface readable instead of
   letting hidden laptop rules or huge min-widths fight with the table. */
body.aw35-clips-page #clipsTable.clip-many-columns th,
body.aw35-clips-page #clipsTable.clip-many-columns td {
  font-size: 13px !important;
  padding-left: 6px !important;
  padding-right: 6px !important;
}
body.aw35-clips-page #clipsTable.clip-all-columns th,
body.aw35-clips-page #clipsTable.clip-all-columns td {
  font-size: 12px !important;
  line-height: 1.15 !important;
}

/* V4.1.9 — Rationalisation finale des tableaux: ne pas casser le sticky header,
   conserver le tableau dans le panneau, et réduire dynamiquement les colonnes.
   Cette section est chargée en dernier et neutralise les anciens correctifs V3/V4. */
body.aw35-clips-page #clipsView > .table-panel,
body.aw35-clips-page #clipsView .table-panel {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  box-sizing: border-box !important;
  --clip-check-w: 34px;
  --clip-actions-w: 90px;
  --clip-thumb-w: 92px;
  --clip-button-size: 36px;
  --clip-action-gap: 6px;
  --clip-font-size: 14px;
  --clip-head-font-size: 12px;
  --clip-cell-pad-x: 8px;
}
body.aw35-clips-page #clipsTable.clip-cols-compact {
  --clip-thumb-w: 78px;
  --clip-font-size: 12.6px;
  --clip-head-font-size: 10.8px;
  --clip-cell-pad-x: 5px;
}
body.aw35-clips-page #clipsTable.clip-cols-tight,
body.aw35-clips-page #clipsTable.clip-all-columns {
  --clip-thumb-w: 64px;
  --clip-actions-w: 86px;
  --clip-font-size: 11.4px;
  --clip-head-font-size: 9.8px;
  --clip-cell-pad-x: 4px;
  --clip-button-size: 34px;
  --clip-action-gap: 5px;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable {
  --clip-actions-w: 48px;
  --clip-action-gap: 0px;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-0 { --clip-thumb-w: 0px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-1.clip-cols-comfort { --clip-thumb-w: 96px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-2.clip-cols-comfort { --clip-thumb-w: 170px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-4.clip-cols-comfort { --clip-thumb-w: 150px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-2.clip-cols-compact { --clip-thumb-w: 132px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-4.clip-cols-compact { --clip-thumb-w: 124px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-2.clip-cols-tight,
body.aw35-clips-page #clipsTable.thumb-table-mode-2.clip-all-columns { --clip-thumb-w: 112px; }
body.aw35-clips-page #clipsTable.thumb-table-mode-4.clip-cols-tight,
body.aw35-clips-page #clipsTable.thumb-table-mode-4.clip-all-columns { --clip-thumb-w: 112px; }

body.aw35-clips-page #clipsTable th,
body.aw35-clips-page #clipsTable td {
  font-size: var(--clip-font-size) !important;
  line-height: 1.18 !important;
  padding-left: var(--clip-cell-pad-x) !important;
  padding-right: var(--clip-cell-pad-x) !important;
  min-width: 0 !important;
  max-width: none !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
}
body.aw35-clips-page #clipsTable th {
  font-size: var(--clip-head-font-size) !important;
  letter-spacing: .06em !important;
  white-space: nowrap !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 35 !important;
}
body.aw35-clips-page #clipsTable tbody td:not(.clip-actions-cell):not([data-clip-col="thumb"]) {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}
body.aw35-clips-page #clipsTable [data-clip-col][hidden] { display: none !important; }

/* Reset des anciennes largeurs forcées: seules les colonnes structurelles restent fixes. */
body.aw35-clips-page #clipsTable th[data-clip-col]:not([hidden]),
body.aw35-clips-page #clipsTable td[data-clip-col]:not([hidden]) {
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}
body.aw35-clips-page #clipsTable thead th:first-child,
body.aw35-clips-page #clipsTable tbody td:first-child {
  width: var(--clip-check-w) !important;
  min-width: var(--clip-check-w) !important;
  max-width: var(--clip-check-w) !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  text-align: center !important;
}
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] {
  width: var(--clip-thumb-w) !important;
  min-width: var(--clip-thumb-w) !important;
  max-width: var(--clip-thumb-w) !important;
  padding-left: 5px !important;
  padding-right: 5px !important;
  text-align: center !important;
  overflow: hidden !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-0 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 td[data-clip-col="thumb"] {
  display: none !important;
}
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] { width: 72px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
body.aw35-clips-page #clipsTable td[data-clip-col="camera"] { width: 80px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"],
body.aw35-clips-page #clipsTable td[data-clip-col="type"] { width: 62px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"],
body.aw35-clips-page #clipsTable td[data-clip-col="duration"] { width: 62px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="media"],
body.aw35-clips-page #clipsTable td[data-clip-col="media"] { width: 66px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="validation"],
body.aw35-clips-page #clipsTable td[data-clip-col="validation"] { width: 82px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { width: 88px !important; text-align: center !important; }

/* Thumbnails vraiment contenus dans leur cellule. */
body.aw35-clips-page #clipsTable .table-thumb-small {
  width: min(78px, calc(var(--clip-thumb-w) - 12px)) !important;
  max-width: calc(var(--clip-thumb-w) - 12px) !important;
  height: 46px !important;
  object-fit: cover !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-2 .table-thumb-large {
  width: calc(var(--clip-thumb-w) - 14px) !important;
  min-width: 0 !important;
  max-width: calc(var(--clip-thumb-w) - 14px) !important;
  height: auto !important;
  max-height: 92px !important;
  object-fit: cover !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 4px !important;
  width: calc(var(--clip-thumb-w) - 12px) !important;
  max-width: calc(var(--clip-thumb-w) - 12px) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini img,
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini .table-thumb {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: 34px !important;
  object-fit: cover !important;
}
body.aw35-clips-page #clipsTable.clip-cols-comfort.thumb-table-mode-4 .thumb-grid-mini img,
body.aw35-clips-page #clipsTable.clip-cols-comfort.thumb-table-mode-4 .thumb-grid-mini .table-thumb { height: 39px !important; }
body.aw35-clips-page #clipsTable.clip-cols-tight.thumb-table-mode-4 .thumb-grid-mini img,
body.aw35-clips-page #clipsTable.clip-cols-tight.thumb-table-mode-4 .thumb-grid-mini .table-thumb { height: 30px !important; }

/* Actions: largeur stable, mais pas au prix d'un débordement hors panneau. */
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  width: var(--clip-actions-w) !important;
  min-width: var(--clip-actions-w) !important;
  max-width: var(--clip-actions-w) !important;
  padding-left: 3px !important;
  padding-right: 3px !important;
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable thead th.clip-actions-head,
body.aw35-clips-page #clipsTable thead th.clip-actions-head * {
  color: transparent !important;
  font-size: 0 !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: calc(var(--clip-button-size) * 2 + var(--clip-action-gap)) !important;
  min-width: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--clip-action-gap) !important;
  padding: 0 !important;
  margin: 0 auto !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
}
body[data-archive-role="client"].aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions {
  width: var(--clip-button-size) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions > button.delete-clip-btn.icon-only-trash {
  width: var(--clip-button-size) !important;
  min-width: var(--clip-button-size) !important;
  max-width: var(--clip-button-size) !important;
  height: var(--clip-button-size) !important;
  min-height: var(--clip-button-size) !important;
  max-height: var(--clip-button-size) !important;
  flex: 0 0 var(--clip-button-size) !important;
  margin: 0 !important;
  padding: 0 !important;
  border-radius: 13px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions .ui-icon,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell .clip-row-actions svg {
  width: 17px !important;
  height: 17px !important;
  min-width: 17px !important;
  max-width: 17px !important;
  margin: 0 !important;
  flex: 0 0 17px !important;
}

/* Recherche globale: même principe de densité, sans la colonne actions. */
.global-clips-table {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  --global-clip-font-size: 13.5px;
  --global-clip-head-size: 11.2px;
  --global-clip-pad-x: 7px;
}
.global-clips-table.clip-cols-compact { --global-clip-font-size: 12.2px; --global-clip-head-size: 10.2px; --global-clip-pad-x: 5px; }
.global-clips-table.clip-cols-tight,
.global-clips-table.clip-all-columns { --global-clip-font-size: 11.2px; --global-clip-head-size: 9.6px; --global-clip-pad-x: 4px; }
.global-clips-table th,
.global-clips-table td {
  min-width: 0 !important;
  max-width: none !important;
  font-size: var(--global-clip-font-size) !important;
  padding-left: var(--global-clip-pad-x) !important;
  padding-right: var(--global-clip-pad-x) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  overflow-wrap: anywhere !important;
}
.global-clips-table th { font-size: var(--global-clip-head-size) !important; }
.global-clips-table [data-global-clip-col][hidden] { display: none !important; }
.global-clips-table [data-global-clip-col]:not([hidden]) { min-width: 0 !important; max-width: none !important; }
.global-clips-table [data-global-clip-col="thumb"] { width: 82px !important; }
.global-clips-table [data-global-clip-col="archive_id"] { width: 74px !important; }
.global-clips-table [data-global-clip-col="camera"] { width: 82px !important; }
.global-clips-table [data-global-clip-col="type"] { width: 64px !important; }
.global-clips-table [data-global-clip-col="duration"] { width: 62px !important; }
.global-clips-table [data-global-clip-col="media"] { width: 66px !important; }
.global-clips-table [data-global-clip-col="validation"] { width: 84px !important; }
.global-clips-table [data-global-clip-col="client_visibility"] { width: 88px !important; }
/* === V4.2.15-dev24 merged frontend_consolidation_v3_7.css END === */

/* ============================================================
   SECTION 06 — MERGED STABILITY / THEME OVERRIDES
   Highest-priority historical overrides now live at the end of style.css.
   ============================================================ */

/* === V4.2.15-dev24 merged from public/css/v4_2_14_stability.css START === */
/* V4.2.15-dev phase 1 — stability + rationalized table layout.
   This replaces the V4.2.14 table geometry that used max-content/auto layout
   and caused horizontal expansion on laptops. */
:root {
  --clip-results-toolbar-h: 72px;
  --results-row-radius: 22px;
  --results-check-col: 46px;
  --results-action-col: 98px;
  --clip-thumb-small-col: 96px;
  --clip-thumb-large-col: clamp(168px, 15vw, 220px);
  --clip-thumb-grid-col: clamp(160px, 13vw, 190px);
}

/* Tabs / menu states: Settings, Administration BD and Utilisateurs share the same accent behaviour. */
.settings-subnav .settings-tab-btn,
.users-tabbar .users-tab-btn,
.admin-subnav .admin-tab-btn {
  border-radius: var(--radius-lg, 20px) !important;
  overflow: hidden !important;
  border: 1px solid var(--line, #d8dee8) !important;
}
.settings-subnav .settings-tab-btn.active,
.users-tabbar .users-tab-btn.active,
.admin-subnav .admin-tab-btn.active {
  background: var(--accent, #64748b) !important;
  border-color: var(--accent-strong, var(--accent, #64748b)) !important;
  color: #fff !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #fff 20%, transparent), 0 10px 28px rgba(0,0,0,.08) !important;
}
.settings-subnav .settings-tab-btn:not(.active),
.users-tabbar .users-tab-btn:not(.active),
.admin-subnav .admin-tab-btn:not(.active) {
  background: color-mix(in srgb, var(--panel, #fff) 82%, var(--surface-hover, #eef2f7) 18%) !important;
  border-color: color-mix(in srgb, var(--line, #d8dee8) 76%, var(--accent, #64748b) 24%) !important;
}
.settings-subnav .settings-tab-btn:hover,
.users-tabbar .users-tab-btn:hover,
.admin-subnav .admin-tab-btn:hover {
  background: var(--surface-hover, color-mix(in srgb, var(--panel, #fff) 74%, var(--accent, #64748b) 26%)) !important;
  border-color: var(--accent, #64748b) !important;
}
.settings-subnav .settings-tab-btn.active:hover,
.users-tabbar .users-tab-btn.active:hover,
.admin-subnav .admin-tab-btn.active:hover {
  background: var(--accent-strong, var(--accent, #64748b)) !important;
}
.users-tab-panel:not(.active),
.admin-tab-panel:not(.active) { display: none !important; }
.users-tab-panel.active,
.admin-tab-panel.active { display: block !important; }

/* Shared result panels. */
.table-panel {
  border-radius: var(--radius-xl, 28px) !important;
  overflow: visible !important;
}
.table-panel > .table-actions {
  background: color-mix(in srgb, var(--panel, #fff) 88%, var(--highlight, #eef3dc) 12%) !important;
  border-bottom: 1px solid var(--line, #ddd8cc) !important;
}
body.aw35-clips-page #clipsView > .table-panel,
#sourcesView > .table-panel,
#trashView > .table-panel {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-actions,
#sourcesView > .table-panel > .table-actions,
#trashView > .table-panel > .table-actions {
  position: sticky !important;
  top: 0 !important;
  z-index: 60 !important;
  min-height: var(--clip-results-toolbar-h, 72px) !important;
  backdrop-filter: blur(10px) !important;
  border-top-left-radius: var(--radius-xl, 28px) !important;
  border-top-right-radius: var(--radius-xl, 28px) !important;
}
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable),
body.aw35-clips-page #clipsView .table-wrap,
#sourcesView .table-wrap,
#trashView .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  max-height: none !important;
  border-radius: 0 0 var(--radius-xl, 28px) var(--radius-xl, 28px) !important;
}

/* Recherche clips: fixed layout means text can no longer force horizontal scrolling. */
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable thead th {
  position: sticky !important;
  top: var(--clip-results-toolbar-h, 72px) !important;
  z-index: 55 !important;
  background: color-mix(in srgb, var(--panel, #fff) 88%, var(--highlight, #eef3dc) 12%) !important;
  border-top: 1px solid var(--line, #ddd8cc) !important;
  border-bottom: 1px solid var(--line, #ddd8cc) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}
body.aw35-clips-page #clipsTable th,
body.aw35-clips-page #clipsTable td {
  box-sizing: border-box !important;
  min-width: 0 !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td {
  background: var(--panel, #fff) !important;
  overflow: hidden !important;
  vertical-align: middle !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  border-bottom: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 80%, transparent) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:first-child {
  border-top-left-radius: var(--results-row-radius) !important;
  border-bottom-left-radius: var(--results-row-radius) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child {
  border-top-right-radius: var(--results-row-radius) !important;
  border-bottom-right-radius: var(--results-row-radius) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row:hover > td {
  background: var(--surface-hover, color-mix(in srgb, var(--panel, #fff) 88%, var(--accent, #64748b) 12%)) !important;
}

/* Utility columns */
body.aw35-clips-page #clipsTable thead th:first-child,
body.aw35-clips-page #clipsTable tbody td:first-child {
  width: var(--results-check-col) !important;
  min-width: var(--results-check-col) !important;
  max-width: var(--results-check-col) !important;
  text-align: center !important;
}
body.aw35-clips-page #clipsTable th.clip-actions-head,
body.aw35-clips-page #clipsTable td.clip-actions-cell,
body.aw35-clips-page #clipsTable th:last-child,
body.aw35-clips-page #clipsTable td:last-child.clip-actions-cell {
  width: var(--results-action-col) !important;
  min-width: var(--results-action-col) !important;
  max-width: var(--results-action-col) !important;
  padding: 8px 6px !important;
  text-align: center !important;
  overflow: visible !important;
}

/* Thumbnail columns */
body.aw35-clips-page #clipsTable.thumb-table-mode-0 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-0 td[data-clip-col="thumb"] {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-1 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-1 td[data-clip-col="thumb"] {
  width: var(--clip-thumb-small-col) !important;
  min-width: var(--clip-thumb-small-col) !important;
  max-width: var(--clip-thumb-small-col) !important;
  text-align: center !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] {
  width: var(--clip-thumb-large-col) !important;
  min-width: var(--clip-thumb-large-col) !important;
  max-width: var(--clip-thumb-large-col) !important;
  padding: 8px !important;
  text-align: center !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] {
  width: var(--clip-thumb-grid-col) !important;
  min-width: var(--clip-thumb-grid-col) !important;
  max-width: var(--clip-thumb-grid-col) !important;
  padding: 8px !important;
  text-align: center !important;
}
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] .table-thumb,
body.aw35-clips-page #clipsTable td[data-clip-col="thumb"] img.table-thumb {
  display: block !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
  object-fit: cover !important;
  z-index: 1 !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-1 .table-thumb-small {
  width: 74px !important;
  height: 42px !important;
  max-width: 74px !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-2 .table-thumb-large {
  width: calc(var(--clip-thumb-large-col) - 22px) !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-width: calc(var(--clip-thumb-large-col) - 22px) !important;
  max-height: 124px !important;
  border-radius: 14px !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini {
  width: calc(var(--clip-thumb-grid-col) - 22px) !important;
  max-width: calc(var(--clip-thumb-grid-col) - 22px) !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini img,
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini .table-thumb {
  width: 100% !important;
  height: 48px !important;
  max-width: 100% !important;
  border-radius: 9px !important;
}

/* Content columns. The sum is intentionally compact; long text is truncated, not allowed to resize the table. */
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] { width: 112px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="production"],
body.aw35-clips-page #clipsTable td[data-clip-col="production"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="source"],
body.aw35-clips-page #clipsTable td[data-clip-col="source"] { width: 15% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
body.aw35-clips-page #clipsTable td[data-clip-col="camera"] { width: 120px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="type"],
body.aw35-clips-page #clipsTable td[data-clip-col="type"] { width: 78px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="duration"],
body.aw35-clips-page #clipsTable td[data-clip-col="duration"] { width: 74px !important; text-align: center !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="description"],
body.aw35-clips-page #clipsTable td[data-clip-col="description"] { width: auto !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="location"],
body.aw35-clips-page #clipsTable td[data-clip-col="location"] { width: 12% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="people"],
body.aw35-clips-page #clipsTable td[data-clip-col="people"] { width: 13% !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="media"],
body.aw35-clips-page #clipsTable td[data-clip-col="media"] { width: 78px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="validation"],
body.aw35-clips-page #clipsTable td[data-clip-col="validation"] { width: 108px !important; }
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { width: 92px !important; }
body.aw35-clips-page #clipsTable td[data-clip-col] > small.cell-subtle {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Action buttons */
body.aw35-clips-page #clipsTable .clip-row-actions {
  width: 84px !important;
  margin: 0 auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  overflow: visible !important;
}
body.aw35-clips-page #clipsTable .clip-row-actions > button.add-cart-btn,
body.aw35-clips-page #clipsTable .clip-row-actions > button.delete-clip-btn {
  width: 36px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  max-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 13px !important;
  border: 1px solid color-mix(in srgb, var(--line, #d8dee8) 82%, var(--accent, #64748b) 18%) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  transform: none !important;
  overflow: hidden !important;
}
body.aw35-clips-page #clipsTable .clip-row-actions > button:hover {
  border-color: var(--accent, #64748b) !important;
  background: var(--surface-hover, color-mix(in srgb, var(--panel, #fff) 75%, var(--accent, #64748b) 25%)) !important;
  transform: none !important;
}
body.aw35-clips-page #clipsTable .clip-row-actions svg,
body.aw35-clips-page #clipsTable .clip-row-actions .ui-icon {
  width: 17px !important;
  height: 17px !important;
  margin: 0 !important;
  display: block !important;
}

/* Sources: same sticky toolbar/header principle without forcing horizontal width. */
#sourcesTable,
#trashTable {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 8px !important;
}
#sourcesTable thead th,
#trashTable thead th {
  position: sticky !important;
  top: var(--clip-results-toolbar-h, 72px) !important;
  z-index: 45 !important;
  background: color-mix(in srgb, var(--panel, #fff) 88%, var(--highlight, #eef3dc) 12%) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
}
#sourcesTable td,
#trashTable td {
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  vertical-align: middle !important;
  background: var(--panel, #fff) !important;
}
#sourcesTable tbody tr:hover td,
#trashTable tbody tr:hover td { background: var(--surface-hover, #f0eadc) !important; }

@media (max-width: 1320px) {
  :root { --clip-thumb-large-col: 168px; --clip-thumb-grid-col: 152px; --results-action-col: 92px; }
  body.aw35-clips-page #clipsTable th[data-clip-col="people"],
  body.aw35-clips-page #clipsTable td[data-clip-col="people"],
  body.aw35-clips-page #clipsTable th[data-clip-col="camera"],
  body.aw35-clips-page #clipsTable td[data-clip-col="camera"],
  body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
  body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] { display: none !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="source"],
  body.aw35-clips-page #clipsTable td[data-clip-col="source"] { width: 16% !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="location"],
  body.aw35-clips-page #clipsTable td[data-clip-col="location"] { width: 13% !important; }
}
@media (max-width: 1080px) {
  :root { --clip-thumb-large-col: 148px; --clip-thumb-grid-col: 136px; }
  body.aw35-clips-page #clipsTable th[data-clip-col="source"],
  body.aw35-clips-page #clipsTable td[data-clip-col="source"] { display: none !important; }
  body.aw35-clips-page #clipsTable th[data-clip-col="location"],
  body.aw35-clips-page #clipsTable td[data-clip-col="location"] { display: none !important; }
  body.aw35-clips-page #clipsTable.thumb-table-mode-2 .table-thumb-large { max-height: 86px !important; }
  body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini img { height: 38px !important; }
}

/* V4.2.15-dev24: final containment overrides. These deliberately beat older
   clip_results_v3_5.css/style.css rules that used aw35-thumb-* + !important. */
body.aw35-clips-page #clipsTable.is-loading-results tbody::before {
  content: 'Chargement des clips…';
  position: sticky;
  left: 0;
  display: block;
  margin: 8px 0;
  padding: 10px 14px;
  color: var(--muted, #6f746b);
  font-weight: 700;
}
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2,
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4,
body.aw35-clips-page #clipsTable.thumb-table-mode-2,
body.aw35-clips-page #clipsTable.thumb-table-mode-4 {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  table-layout: fixed !important;
}
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] {
  width: var(--clip-thumb-large-col) !important;
  min-width: var(--clip-thumb-large-col) !important;
  max-width: var(--clip-thumb-large-col) !important;
  overflow: hidden !important;
  padding: 8px !important;
}
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] img[src*="thumbnails/"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] .table-thumb-large,
body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 .table-thumb-large {
  display: block !important;
  width: calc(var(--clip-thumb-large-col) - 22px) !important;
  max-width: calc(var(--clip-thumb-large-col) - 22px) !important;
  min-width: 0 !important;
  height: auto !important;
  aspect-ratio: 16 / 9 !important;
  max-height: 124px !important;
  object-fit: cover !important;
  margin: 0 auto !important;
  position: static !important;
  transform: none !important;
  float: none !important;
}
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] {
  width: var(--clip-thumb-grid-col) !important;
  min-width: var(--clip-thumb-grid-col) !important;
  max-width: var(--clip-thumb-grid-col) !important;
  overflow: hidden !important;
  padding: 8px !important;
}
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] .thumb-grid-mini,
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 .thumb-grid-mini {
  display: grid !important;
  width: calc(var(--clip-thumb-grid-col) - 22px) !important;
  max-width: calc(var(--clip-thumb-grid-col) - 22px) !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] .thumb-grid-mini img,
body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 .thumb-grid-mini .table-thumb {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 48px !important;
  object-fit: cover !important;
  position: static !important;
  transform: none !important;
  float: none !important;
}
@media (max-width: 1320px) {
  body.aw35-clips-page.aw35-thumb-2 #clipsTable.thumb-table-mode-2 .table-thumb-large { max-height: 92px !important; }
  body.aw35-clips-page.aw35-thumb-4 #clipsTable.thumb-table-mode-4 .thumb-grid-mini img { height: 40px !important; }
}

/* V4.2.15-dev24: clip results full-width finish.
   Keeps the stable dev2 table model, but removes the last clipped/max-width
   constraints that can leave a blank gutter at the right edge of Recherche clips. */
body.aw35-clips-page .main {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView,
body.aw35-clips-page #clipsView.view,
body.aw35-clips-page #clipsView.view.active {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .filters-panel,
body.aw35-clips-page #clipsView > .table-panel {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsView > .table-panel > .table-actions,
body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box !important;
}
body.aw35-clips-page #clipsTable {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:first-child {
  border-left: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 80%, transparent) !important;
}
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell {
  border-right: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 80%, transparent) !important;
}

/* V4.2.15-dev24: client column alignment + unified visible/private badge. */
body.aw35-clips-page #clipsTable th[data-clip-col="client_visibility"],
body.aw35-clips-page #clipsTable td[data-clip-col="client_visibility"] {
  width: 92px !important;
  min-width: 92px !important;
  max-width: 92px !important;
  text-align: center !important;
}
.client-visibility-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  max-width: 100%;
  padding: 4px 7px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 86%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.client-visibility-badge.is-visible {
  color: var(--accent-strong, #526d2f);
  background: color-mix(in srgb, var(--accent, #78924a) 14%, transparent);
}
.client-visibility-badge.is-private {
  color: #8a3a2f;
  background: color-mix(in srgb, var(--danger, #c84f3e) 12%, transparent);
}


/* V4.2.15-dev24: Sources dropdown + representative thumbnails.
   This is intentionally scoped to #sourcesView so it does not affect clip results. */
#sourcesView .table-panel,
#sourcesView .table-actions,
#sourcesView .source-actions-v365,
#sourcesView .source-actions-right-v365 {
  overflow: visible !important;
}
#sourcesView .table-actions,
#sourcesView .source-actions-v365 {
  position: sticky !important;
  top: var(--aw-toolbar-top, 0px) !important;
  z-index: 140 !important;
  background: var(--panel, #fff) !important;
}
#sourceColumnPicker,
.source-column-picker-v365 {
  position: relative !important;
  z-index: 220 !important;
}
#sourceColumnMenu,
.source-column-menu-v365 {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 9999 !important;
  min-width: 230px !important;
  max-width: min(320px, 86vw) !important;
  max-height: min(520px, 70vh) !important;
  overflow: auto !important;
  background: var(--panel, #fff) !important;
  border: 1px solid var(--line, #ddd8cc) !important;
  border-radius: var(--radius-lg, 16px) !important;
  box-shadow: var(--shadow-popover, 0 16px 40px rgba(0,0,0,.18)) !important;
  padding: 10px !important;
}
#sourceColumnMenu[hidden],
.source-column-menu-v365[hidden] { display: none !important; }
#sourceColumnMenu label,
.source-column-menu-v365 label {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
  padding: 6px 8px !important;
  border-radius: var(--radius-sm, 8px) !important;
  white-space: nowrap !important;
}
#sourceColumnMenu label:hover,
.source-column-menu-v365 label:hover { background: var(--surface-hover, #f0eadc) !important; }
#sourcesTable th[data-source-col="thumb"],
#sourcesTable td[data-source-col="thumb"],
#sourcesTable .source-thumb-cell {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
  padding: 7px !important;
  overflow: hidden !important;
  text-align: center !important;
}
#sourcesTable.source-thumb-mode-0 th[data-source-col="thumb"],
#sourcesTable.source-thumb-mode-0 td[data-source-col="thumb"] {
  width: 34px !important;
  min-width: 34px !important;
  max-width: 34px !important;
  padding: 4px !important;
}
#sourcesTable .source-table-thumb,
#sourcesTable .source-thumb-placeholder {
  display: block !important;
  width: 96px !important;
  max-width: 96px !important;
  min-width: 0 !important;
  aspect-ratio: 16 / 9 !important;
  height: auto !important;
  max-height: 58px !important;
  object-fit: cover !important;
  border-radius: var(--radius-sm, 8px) !important;
  margin: 0 auto !important;
  position: static !important;
  float: none !important;
  transform: none !important;
  background: var(--surface-muted, #f5f1e8) !important;
  border: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 80%, transparent) !important;
}
#sourcesTable .source-thumb-placeholder {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--muted, #6f746b) !important;
  font-size: 12px !important;
}
#sourcesTable.source-thumb-mode-2 th[data-source-col="thumb"],
#sourcesTable.source-thumb-mode-2 td[data-source-col="thumb"] {
  width: 166px !important;
  min-width: 166px !important;
  max-width: 166px !important;
}
#sourcesTable.source-thumb-mode-2 .source-table-thumb.table-thumb-large {
  width: 146px !important;
  max-width: 146px !important;
  max-height: 92px !important;
}
#sourcesTable.source-thumb-mode-4 th[data-source-col="thumb"],
#sourcesTable.source-thumb-mode-4 td[data-source-col="thumb"] {
  width: 154px !important;
  min-width: 154px !important;
  max-width: 154px !important;
}
#sourcesTable .source-thumb-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 5px !important;
  width: 134px !important;
  max-width: 134px !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}
#sourcesTable .source-thumb-grid .source-table-thumb,
#sourcesTable .source-thumb-grid .source-thumb-placeholder {
  width: 100% !important;
  max-width: 100% !important;
  height: 38px !important;
  aspect-ratio: auto !important;
}


/* V4.2.15-dev24: Sources toolbar fixes.
   Keep the column picker above the sticky source table header and make
   source thumbnail buttons independent from the global clip thumb handler. */
#sourcesView .table-actions,
#sourcesView .source-actions-v365 {
  z-index: 9000 !important;
  isolation: isolate !important;
}
#sourcesView .table-wrap,
#sourcesView .table-shell,
#sourcesView .table-panel,
#sourcesView .source-actions-right-v365 {
  overflow: visible !important;
}
#sourceColumnPicker,
.source-column-picker-v365 {
  z-index: 9200 !important;
}
#sourceColumnMenu,
.source-column-menu-v365 {
  z-index: 9500 !important;
}
#sourcesTable thead,
#sourcesTable thead th {
  z-index: 120 !important;
}
#sourceThumbModeToolbar .source-thumb-mode-icons {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
#sourceThumbModeToolbar .source-thumb-mode-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 36px !important;
  height: 36px !important;
  border-radius: 999px !important;
  border: 1px solid color-mix(in srgb, var(--line, #ddd8cc) 86%, transparent) !important;
  background: var(--panel, #fff) !important;
  color: var(--muted, #66705f) !important;
  cursor: pointer !important;
}
#sourceThumbModeToolbar .source-thumb-mode-btn:hover {
  background: var(--surface-hover, #f0eadc) !important;
  color: var(--text, #20221f) !important;
}
#sourceThumbModeToolbar .source-thumb-mode-btn.active {
  background: var(--accent, #78924a) !important;
  border-color: var(--accent, #78924a) !important;
  color: #fff !important;
}
#sourceThumbModeToolbar .source-thumb-mode-btn svg,
#sourceThumbModeToolbar .source-thumb-mode-btn img {
  width: 20px !important;
  height: 20px !important;
  display: block !important;
}

/* V4.2.15-dev24 sources column menu stacking fix */
#sourcesView .sources-table-panel-v365 {
  overflow: visible !important;
  position: relative !important;
}

#sourcesView .source-actions-v365,
#sourcesView .table-actions.source-actions-v365 {
  position: sticky !important;
  top: var(--sticky-toolbar-top, 0px) !important;
  z-index: 2147481000 !important;
  overflow: visible !important;
  isolation: isolate;
}

#sourcesView .source-actions-right-v365,
#sourcesView #sourceColumnPicker,
#sourcesView .source-column-picker-v365 {
  position: relative !important;
  z-index: 2147481100 !important;
  overflow: visible !important;
}

#sourcesView #sourceColumnMenu,
#sourcesView .source-column-menu-v365,
#sourcesView .clip-column-menu.source-column-menu-v365 {
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 8px) !important;
  z-index: 2147482000 !important;
  max-height: min(70vh, 520px) !important;
  overflow: auto !important;
  transform: none !important;
}

#sourcesView .table-wrap,
#sourcesView #sourcesTable,
#sourcesView #sourcesTable thead,
#sourcesView #sourcesTable th {
  z-index: auto !important;
}

#sourcesView #sourcesTable thead th {
  z-index: 10 !important;
}

/* V4.2.15-dev24 merged v4_2_11_ui_hotfix.css */
/*
  This block preserves the useful rules from public/css/v4_2_11_ui_hotfix.css
  while removing that old file from the active HTML load chain. This is a
  no-visual-change consolidation step: the original file remains on disk,
  but is no longer loaded globally.
*/

/* V4.2.15-dev phase 1 — design-token bridge and legacy UI utilities.
   This file replaces the old V4.2.11 hotfix content. It intentionally no longer
   defines Recherche clips table geometry. Results tables are handled by
   v4_2_14_stability.css after the fragile JS synchronizers are removed. */
:root {
  --app-light-bg: #f7f6f2;
  --app-light-panel: #ffffff;
  --app-light-sidebar: #24241f;
  --app-light-text: #20231f;
  --app-light-muted: #6f746b;
  --app-light-border: #ded9cb;
  --app-light-accent: #5d6f35;
  --app-light-accent-strong: #435124;
  --app-light-hover: #f0eadc;
  --app-light-active: #e4e8d4;
  --app-light-highlight: #eef3dc;
  --app-light-danger: #a14a3c;

  --app-dark-bg: #151515;
  --app-dark-panel: #232326;
  --app-dark-sidebar: #111113;
  --app-dark-text: #f1f0e9;
  --app-dark-muted: #aaa89f;
  --app-dark-border: #3d3c42;
  --app-dark-accent: #a8c25e;
  --app-dark-accent-strong: #d3ef7a;
  --app-dark-hover: #303427;
  --app-dark-active: #42502c;
  --app-dark-highlight: #2f3823;
  --app-dark-danger: #d67862;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --shadow-soft: 0 12px 30px rgba(31, 35, 29, .075);
}

body:not(.dark-mode) {
  --bg: var(--app-light-bg);
  --panel: var(--app-light-panel);
  --panel-2: color-mix(in srgb, var(--app-light-panel) 86%, var(--app-light-bg) 14%);
  --panel-bg: var(--app-light-panel);
  --sidebar: var(--app-light-sidebar);
  --text: var(--app-light-text);
  --muted: var(--app-light-muted);
  --line: var(--app-light-border);
  --border: var(--app-light-border);
  --accent: var(--app-light-accent);
  --accent-strong: var(--app-light-accent-strong);
  --accent-soft: color-mix(in srgb, var(--app-light-accent) 17%, transparent);
  --surface-hover: var(--app-light-hover);
  --surface-active: var(--app-light-active);
  --highlight: var(--app-light-highlight);
  --danger: var(--app-light-danger);
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg) 92%, #fff 8%) 0%, var(--bg) 100%) !important;
  color: var(--text);
}
body.dark-mode {
  --bg: var(--app-dark-bg);
  --panel: var(--app-dark-panel);
  --panel-2: color-mix(in srgb, var(--app-dark-panel) 86%, var(--app-dark-bg) 14%);
  --panel-bg: var(--app-dark-panel);
  --sidebar: var(--app-dark-sidebar);
  --text: var(--app-dark-text);
  --muted: var(--app-dark-muted);
  --line: var(--app-dark-border);
  --border: var(--app-dark-border);
  --accent: var(--app-dark-accent);
  --accent-strong: var(--app-dark-accent-strong);
  --accent-soft: color-mix(in srgb, var(--app-dark-accent) 20%, transparent);
  --surface-hover: var(--app-dark-hover);
  --surface-active: var(--app-dark-active);
  --highlight: var(--app-dark-highlight);
  --danger: var(--app-dark-danger);
  background: radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--bg) 82%, #3b3b40 18%) 0%, var(--bg) 48%, color-mix(in srgb, var(--bg) 76%, #000 24%) 100%) !important;
  color: var(--text);
}

.panel,
.stat-card,
.production-card,
.search-section,
.empty-search-state,
.drawer-panel,
.modal-box,
.document-row,
.client-request-card,
.user-card,
.admin-card {
  background: var(--panel) !important;
  color: var(--text);
  border-color: var(--line) !important;
}
.field input,
.field select,
.field textarea,
textarea,
.inline-input,
.attach-form input,
.attach-form select {
  background: var(--panel) !important;
  color: var(--text) !important;
  border-color: var(--line) !important;
}
.field input:focus,
.field select:focus,
.field textarea:focus,
.inline-input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-color: var(--accent) !important;
}
.sidebar { background: var(--sidebar) !important; }

.sidebar .brand {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 10px !important;
  width: 100% !important;
  padding: 2px 0 10px !important;
}
.sidebar .brand-logo-wrap {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.sidebar .brand-logo {
  display: block !important;
  width: 100% !important;
  max-width: 220px !important;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  filter: invert(1) brightness(1.04) !important;
}
.sidebar .brand > div:not(.brand-logo-wrap) { width: 100% !important; text-align: center !important; }
.sidebar .brand h1 {
  margin: 6px 0 0 !important;
  font-size: 16px !important;
  line-height: 1.08 !important;
  letter-spacing: .105em !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}
.sidebar .brand p { margin: 6px 0 0 !important; font-size: 12px !important; letter-spacing: .07em !important; color: rgba(255,255,255,.72) !important; }

.ui-icon.svg-icon.mask-icon {
  display: inline-block !important;
  background-color: currentColor !important;
  -webkit-mask-image: var(--icon-url) !important;
  mask-image: var(--icon-url) !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
  opacity: 1 !important;
  pointer-events: none !important;
}

.button:not(.secondary):not(.danger) { background: var(--accent-strong, var(--accent)) !important; color: #fff !important; }
.button.secondary { background: color-mix(in srgb, var(--panel) 78%, var(--surface-hover) 22%) !important; color: var(--text) !important; border: 1px solid var(--line) !important; }
.button.danger { background: var(--danger) !important; color: #fff !important; }
.nav.active,
.nav:hover,
.thumb-mode-icon.active,
.settings-tab-btn.active,
.admin-tab-btn.active,
.users-tab-btn.active {
  background: color-mix(in srgb, var(--accent) 78%, #000 5%) !important;
  color: #fff !important;
}
tr:hover td,
.production-card:hover,
.search-result-card:hover,
.client-request-card:hover { background: var(--surface-hover) !important; }

.cart-table { width: 100%; border-collapse: collapse; }
.cart-table td,
.cart-table th { vertical-align: middle; }
.cart-table .cart-actions { text-align: right; white-space: nowrap; }
.cart-empty-box { padding: 24px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius-lg); }

.visual-palette-panel {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--panel) 82%, var(--highlight) 18%);
}
.visual-palette-row {
  display: grid;
  grid-template-columns: 130px repeat(6, minmax(104px, 1fr));
  gap: 10px;
  align-items: end;
}
.visual-palette-row strong { align-self: center; }
.visual-palette-row .field input[type=color] { height: 42px; padding: 4px; }
.visual-palette-note { color: var(--muted); margin: 0; font-size: 13px; line-height: 1.45; }
@media (max-width: 1200px) { .visual-palette-row { grid-template-columns: 1fr 1fr 1fr; } .visual-palette-row strong { grid-column: 1 / -1; } }
@media (max-width: 720px) { .visual-palette-row { grid-template-columns: 1fr 1fr; } }

/* V4.2.15-dev24 merged v4_2_13_consolidated.css */
/*
  This block preserves the useful rules from public/css/v4_2_13_consolidated.css
  while removing that old file from the active HTML load chain. This is a
  no-visual-change consolidation step: the original file remains on disk,
  but is no longer loaded globally.
*/

/* V4.2.13 consolidated UI fixes — loaded after V4.2.12. */
:root {
  --ui-accent-soft: color-mix(in srgb, var(--accent, #64748b) 14%, transparent);
  --ui-accent-hover: color-mix(in srgb, var(--accent, #64748b) 20%, var(--panel, #ffffff));
  --ui-active-panel: color-mix(in srgb, var(--panel, #ffffff) 88%, var(--accent, #64748b));
  --ui-outline: color-mix(in srgb, var(--accent, #64748b) 24%, var(--border, #d8dee8));
}
body.dark {
  --ui-accent-soft: color-mix(in srgb, var(--accent, #8fb3ff) 22%, transparent);
  --ui-accent-hover: color-mix(in srgb, var(--accent, #8fb3ff) 24%, var(--panel, #161b22));
  --ui-active-panel: color-mix(in srgb, var(--panel, #161b22) 82%, var(--accent, #8fb3ff));
  --ui-outline: color-mix(in srgb, var(--accent, #8fb3ff) 36%, var(--border, #303846));
}

/* Sidebar/logo */
.sidebar .brand { align-items: center; gap: 12px; }
.sidebar .brand-logo-wrap { width: 100%; max-width: none; display: flex; justify-content: center; }
.sidebar .brand-logo { width: min(100%, 238px); max-width: 100%; height: auto; object-fit: contain; display: block; }
.sidebar .brand h1 { margin-top: 8px; text-align: center; font-size: 14px; letter-spacing: .13em; font-weight: 900; text-transform: uppercase; }
.sidebar .brand p { text-align: center; }

/* Visual palette should affect panels, active tabs, hovers and highlights. */
.card, .panel, .drawer-panel, .modal-card, .settings-tab-panel, .detail-section, .fiche-summary-panel, .admin-card, .client-request-card, .user-card {
  background: var(--panel);
  border-color: var(--border);
}
.nav.active, .settings-tab-btn.active, .users-tab-btn.active, .button:not(.secondary):not(.danger), .pill.active, .thumb-mode-icon.active {
  background: var(--accent);
  border-color: var(--accent-strong, var(--accent));
  color: #fff;
}
.nav:hover, .settings-tab-btn:hover, .users-tab-btn:hover, .filter-card:hover, .production-card:hover, .search-result-card:hover, tr:hover td {
  background: var(--ui-accent-hover);
}
.notice, .settings-intro, .color-panel, .fiche-placeholder, .dropzone, .attach-dropzone {
  background: var(--ui-active-panel);
  border-color: var(--ui-outline);
}
.clip-id, a, .linklike { color: var(--accent-strong, var(--accent)); }

/* Recherche clips: table fills the available surface, with a flexible middle and fixed utility columns. */
body.aw35-clips-page #clipsView .table-wrap,
#clipsView .table-wrap:has(#clipsTable) {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  scrollbar-gutter: stable;
}
body.aw35-clips-page #clipsTable,
#clipsTable {
  width: 100% !important;
  min-width: 100% !important;
  max-width: none !important;
  table-layout: auto !important;
  border-collapse: separate;
  border-spacing: 0;
}
#clipsTable th, #clipsTable td { box-sizing: border-box; vertical-align: middle; }
#clipsTable th[data-clip-col="description"], #clipsTable td[data-clip-col="description"] { width: auto !important; min-width: 240px !important; }
#clipsTable th[data-clip-col="location"], #clipsTable td[data-clip-col="location"] { min-width: 132px !important; }
#clipsTable th[data-clip-col="thumb"], #clipsTable td[data-clip-col="thumb"] {
  overflow: hidden !important;
  text-align: center !important;
  white-space: normal !important;
}
#clipsTable.thumb-table-mode-1 th[data-clip-col="thumb"], #clipsTable.thumb-table-mode-1 td[data-clip-col="thumb"] { width: 92px !important; min-width: 92px !important; max-width: 92px !important; }
#clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"], #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"] { width: 190px !important; min-width: 190px !important; max-width: 190px !important; }
#clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"], #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"] { width: 168px !important; min-width: 168px !important; max-width: 168px !important; }
#clipsTable .table-thumb { display: block; margin: 0 auto; object-fit: cover; box-sizing: border-box; max-width: 100% !important; }
#clipsTable .table-thumb-small { width: 58px !important; height: 38px !important; }
#clipsTable .table-thumb-large { width: 164px !important; height: 92px !important; max-width: calc(100% - 12px) !important; }
#clipsTable .thumb-grid-mini { width: 136px !important; max-width: 100% !important; display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0 auto; overflow: hidden; }
#clipsTable .thumb-grid-mini img { width: 66px !important; height: 42px !important; max-width: 100% !important; }
#clipsTable th.clip-actions-header, #clipsTable td.clip-actions-cell, #clipsTable th:last-child, #clipsTable td.clip-actions-cell:last-child {
  width: 112px !important;
  min-width: 112px !important;
  max-width: 112px !important;
  text-align: center !important;
  padding-left: 8px !important;
  padding-right: 8px !important;
}
#clipsTable .clip-row-actions { display: flex !important; justify-content: center !important; align-items: center !important; gap: 8px !important; min-width: 0 !important; }
#clipsTable .clip-row-actions .button,
#clipsTable .add-cart-btn,
#clipsTable .delete-clip-btn {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  padding: 0 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  border: 1px solid var(--border) !important;
  overflow: hidden !important;
  line-height: 1 !important;
}
#clipsTable .clip-row-actions .icon,
#clipsTable .clip-row-actions svg,
#clipsTable .clip-row-actions img { width: 18px !important; height: 18px !important; display: block; margin: 0 !important; }
#clipsTable .clip-row-actions .button:hover { border-color: var(--accent) !important; background: var(--ui-accent-hover) !important; transform: none !important; }
#clipsTable thead th { position: sticky; top: var(--clip-results-toolbar-h, 0px); z-index: 20; }

/* Admin/client UI must remain visible when the user opens the Users/Admin section. */
#usersView .users-grid, #usersView .client-requests-list, #usersView .user-list { visibility: visible; }
.auth-widget { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.auth-mode-label { opacity: .78; font-size: 12px; }

/* V4.2.15-dev24 merged v4_2_12_clip_table_layout.css */
/*
  This block preserves the useful rules from public/css/v4_2_12_clip_table_layout.css
  while removing that old file from the active HTML load chain. This is a
  no-visual-change consolidation step: the original file remains on disk,
  but is no longer loaded globally.
*/

/* V4.2.12 — Recherche clips layout repair
   Correctifs ciblés après V4.2.11 : thumbnails contenus, header sticky stable,
   largeur pleine du panneau résultats, boutons panier/corbeille non coupés. */

:root {
  --clip-results-toolbar-h: 78px;
  --clip-thumb-small-w: 96px;
  --clip-thumb-small-h: 54px;
  --clip-thumb-large-w: 220px;
  --clip-thumb-large-h: 124px;
  --clip-thumb-grid-w: 198px;
  --clip-thumb-grid-img-h: 56px;
}

/* Recherche clips doit exploiter toute la largeur disponible dans la colonne main. */
body.aw35-clips-page .main,
body.aw35-clips-page #clipsView,
body.aw35-clips-page #clipsView.view.active {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.aw35-clips-page #clipsView > .table-panel {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.aw35-clips-page #clipsView > .table-panel > .table-wrap,
body.aw35-clips-page #clipsView .table-wrap:has(#clipsTable) {
  width: 100% !important;
  max-width: 100% !important;
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
  max-height: none !important;
  box-sizing: border-box !important;
}

/* La barre résultats/colonnes reste sticky, puis le header du tableau se colle dessous. */
body.aw35-clips-page #clipsView > .table-panel > .table-actions {
  position: sticky !important;
  top: 0 !important;
  z-index: 120 !important;
  min-height: var(--clip-results-toolbar-h) !important;
  background: color-mix(in srgb, var(--panel, #fff) 92%, var(--accent-soft, #eef2e2) 8%) !important;
  backdrop-filter: blur(10px) !important;
  border-bottom: 1px solid var(--line, #ddd8cc) !important;
  box-shadow: 0 10px 26px rgba(20, 22, 18, .055) !important;
}

body.aw35-clips-page #clipsTable {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
  box-sizing: border-box !important;
}

body.aw35-clips-page #clipsTable thead th {
  position: sticky !important;
  top: var(--clip-results-toolbar-h) !important;
  z-index: 110 !important;
  background: color-mix(in srgb, var(--panel, #fff) 90%, #ede7da 10%) !important;
  background-clip: padding-box !important;
  border-top: 1px solid var(--line, #ddd8cc) !important;
  border-bottom: 1px solid var(--line, #ddd8cc) !important;
  box-shadow: 0 9px 20px rgba(20, 22, 18, .06) !important;
  overflow: hidden !important;
  white-space: nowrap !important;
}

body.dark-mode.aw35-clips-page #clipsView > .table-panel > .table-actions,
body.dark-mode.aw35-clips-page #clipsTable thead th {
  background: color-mix(in srgb, var(--panel, #232326) 88%, #000 12%) !important;
}

/* Empêche les images de déborder vers le header ou la colonne Archive ID. */
body.aw35-clips-page #clipsTable tbody td,
body.aw35-clips-page #clipsTable thead th {
  box-sizing: border-box !important;
  min-width: 0 !important;
}

body.aw35-clips-page #clipsTable td[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable th[data-clip-col="thumb"] {
  overflow: hidden !important;
  text-align: center !important;
  vertical-align: middle !important;
}

body.aw35-clips-page #clipsTable .clip-row td {
  vertical-align: middle !important;
}

/* Mode 1 : petit thumbnail. */
body.aw35-clips-page #clipsTable.thumb-table-mode-1 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-1 td[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-1 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-1 #clipsTable td[data-clip-col="thumb"] {
  width: 116px !important;
  min-width: 116px !important;
  max-width: 116px !important;
}

body.aw35-clips-page #clipsTable .table-thumb-small {
  display: block !important;
  width: var(--clip-thumb-small-w) !important;
  min-width: 0 !important;
  max-width: calc(100% - 12px) !important;
  height: var(--clip-thumb-small-h) !important;
  max-height: var(--clip-thumb-small-h) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
}

/* Mode 2 : grand thumbnail, mais contenu dans une colonne réaliste. */
body.aw35-clips-page #clipsTable.thumb-table-mode-2,
body.aw35-clips-page.aw35-thumb-2 #clipsTable {
  min-width: 0 !important;
}

body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"] {
  width: 248px !important;
  min-width: 248px !important;
  max-width: 248px !important;
}

body.aw35-clips-page #clipsTable.thumb-table-mode-2 .table-thumb-large,
body.aw35-clips-page.aw35-thumb-2 #clipsTable .table-thumb-large {
  display: block !important;
  width: var(--clip-thumb-large-w) !important;
  min-width: 0 !important;
  max-width: calc(100% - 18px) !important;
  height: var(--clip-thumb-large-h) !important;
  min-height: 0 !important;
  max-height: var(--clip-thumb-large-h) !important;
  margin: 0 auto !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 14px !important;
}

/* Mode 4 : grille 2x2 contenue. */
body.aw35-clips-page #clipsTable.thumb-table-mode-4,
body.aw35-clips-page.aw35-thumb-4 #clipsTable {
  min-width: 0 !important;
}

body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"] {
  width: 226px !important;
  min-width: 226px !important;
  max-width: 226px !important;
}

body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini,
body.aw35-clips-page.aw35-thumb-4 #clipsTable .thumb-grid-mini {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px !important;
  width: var(--clip-thumb-grid-w) !important;
  max-width: calc(100% - 16px) !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini img,
body.aw35-clips-page #clipsTable.thumb-table-mode-4 .thumb-grid-mini .table-thumb,
body.aw35-clips-page.aw35-thumb-4 #clipsTable .thumb-grid-mini img,
body.aw35-clips-page.aw35-thumb-4 #clipsTable .thumb-grid-mini .table-thumb {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  height: var(--clip-thumb-grid-img-h) !important;
  max-height: var(--clip-thumb-grid-img-h) !important;
  object-fit: contain !important;
  object-position: center !important;
  border-radius: 10px !important;
}

/* Archive ID garde une largeur stable, sans se faire manger par le thumbnail. */
body.aw35-clips-page #clipsTable th[data-clip-col="archive_id"],
body.aw35-clips-page #clipsTable td[data-clip-col="archive_id"] {
  width: 142px !important;
  min-width: 142px !important;
  max-width: 142px !important;
  overflow-wrap: anywhere !important;
}

/* Actions : ne pas couper le contour haut des boutons sur hover. */
body.aw35-clips-page #clipsTable tbody tr.clip-row > td.clip-actions-cell,
body.aw35-clips-page #clipsTable tbody tr.clip-row > td:last-child.clip-actions-cell {
  overflow: visible !important;
  z-index: 2 !important;
}

body.aw35-clips-page #clipsTable .clip-row-actions {
  overflow: visible !important;
  position: relative !important;
  z-index: 3 !important;
}

body.aw35-clips-page #clipsTable .clip-row-actions > button,
body.aw35-clips-page #clipsTable .add-cart-btn,
body.aw35-clips-page #clipsTable .delete-clip-btn.icon-only-trash {
  border: 1px solid var(--line, #ded8ca) !important;
  overflow: visible !important;
  transform: none !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.025) !important;
}

body.aw35-clips-page #clipsTable .clip-row-actions > button:hover,
body.aw35-clips-page #clipsTable .add-cart-btn:hover,
body.aw35-clips-page #clipsTable .delete-clip-btn.icon-only-trash:hover {
  border-color: var(--accent, #5d6f35) !important;
  box-shadow: 0 0 0 2px var(--accent-soft, rgba(93,111,53,.16)), 0 8px 20px rgba(20,22,18,.10) !important;
  transform: none !important;
}

/* Le premier/dernier arrondi de la ligne doit rester propre même avec actions visibles. */
body.aw35-clips-page #clipsTable tr.clip-row td:first-child { overflow: hidden !important; }
body.aw35-clips-page #clipsTable tr.clip-row td:last-child { overflow: visible !important; }

/* Sur écrans plus étroits, réduire légèrement le grand thumbnail plutôt que déborder. */
@media (max-width: 1500px) {
  :root {
    --clip-thumb-large-w: 196px;
    --clip-thumb-large-h: 110px;
    --clip-thumb-grid-w: 180px;
    --clip-thumb-grid-img-h: 50px;
  }
  body.aw35-clips-page #clipsTable.thumb-table-mode-2 th[data-clip-col="thumb"],
  body.aw35-clips-page #clipsTable.thumb-table-mode-2 td[data-clip-col="thumb"],
  body.aw35-clips-page.aw35-thumb-2 #clipsTable th[data-clip-col="thumb"],
  body.aw35-clips-page.aw35-thumb-2 #clipsTable td[data-clip-col="thumb"] {
    width: 218px !important;
    min-width: 218px !important;
    max-width: 218px !important;
  }
  body.aw35-clips-page #clipsTable.thumb-table-mode-4 th[data-clip-col="thumb"],
  body.aw35-clips-page #clipsTable.thumb-table-mode-4 td[data-clip-col="thumb"],
  body.aw35-clips-page.aw35-thumb-4 #clipsTable th[data-clip-col="thumb"],
  body.aw35-clips-page.aw35-thumb-4 #clipsTable td[data-clip-col="thumb"] {
    width: 204px !important;
    min-width: 204px !important;
    max-width: 204px !important;
  }
}
/* === V4.2.15-dev24 merged from public/css/v4_2_14_stability.css END === */

/* V4.2.17 SEARCH_DEV — filtres clips appliqués seulement sur Appliquer + overlay lisible */
#clipsView > .filters-panel .field:has(#peopleFilter) {
  grid-column: 1 / 2 !important;
}
#clipsView > .filters-panel .location-autocomplete-field {
  grid-column: 2 / 3 !important;
}
#clipsView > .table-panel {
  position: relative;
}
#clipsView > .table-panel.is-loading-results .table-wrap,
#clipsView > .table-panel.is-loading-results .table-actions {
  opacity: .42;
}
.clips-results-loading-overlay {
  position: absolute;
  inset: 58px 0 0 0;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding-top: 70px;
  background: rgba(248, 247, 242, .66);
  backdrop-filter: blur(1.5px);
  z-index: 60;
  pointer-events: none;
}
.clips-results-loading-overlay.active {
  display: flex;
}
.clips-results-loading-card {
  padding: 14px 18px;
  border-radius: 16px;
  background: var(--panel, #fff);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft, 0 12px 32px rgba(0,0,0,.12));
  font-weight: 800;
  color: var(--text, #1f241f);
}
.admin-mode-check {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
}
@media (max-width: 980px) {
  #clipsView > .filters-panel .field:has(#peopleFilter),
  #clipsView > .filters-panel .location-autocomplete-field {
    grid-column: 1 / -1 !important;
  }
}

/* V4.2.19 Cloud deploy prep */
.system-check-list { display: grid; gap: .4rem; margin-top: .75rem; }
.system-check-row { display: grid; grid-template-columns: auto 1fr; gap: .35rem .6rem; align-items: center; padding: .45rem .55rem; border: 1px solid var(--border-subtle, rgba(0,0,0,.12)); border-radius: 10px; background: var(--panel-soft, rgba(255,255,255,.04)); }
.system-check-row small { grid-column: 2; opacity: .72; line-height: 1.3; word-break: break-word; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 4.8rem; padding: .18rem .45rem; border-radius: 999px; font-size: .72rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.status-ok { background: rgba(78, 143, 84, .16); color: #2f6f35; border: 1px solid rgba(78, 143, 84, .28); }
.status-warning { background: rgba(164, 126, 48, .16); color: #7a5b1f; border: 1px solid rgba(164, 126, 48, .28); }
.status-error { background: rgba(172, 63, 63, .16); color: #8a2d2d; border: 1px solid rgba(172, 63, 63, .28); }
body.dark .status-ok { color: #a9d7a9; }
body.dark .status-warning { color: #e1c47a; }
body.dark .status-error { color: #e49a9a; }

/* V4.2.21 — Server/auth preparation */
.server-login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(246, 242, 232, 0.92);
  backdrop-filter: blur(8px);
}
.server-login-card {
  width: min(430px, 100%);
  background: var(--panel, #fffaf0);
  border: 1px solid var(--border, #ddd3bd);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(40, 34, 24, 0.22);
  padding: 28px;
  display: grid;
  gap: 14px;
}
.server-login-logo {
  display: block;
  max-width: 190px;
  max-height: 56px;
  object-fit: contain;
  margin-bottom: 4px;
}
.server-login-card h2 { margin: 0; font-size: 1.55rem; }
.server-login-card p { margin: 0 0 4px; color: var(--muted, #6d675b); }
.server-login-card label { display: grid; gap: 6px; font-weight: 700; }
.server-login-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border, #d9cfbd);
  border-radius: 12px;
  background: rgba(255,255,255,.82);
}
.server-login-error { min-height: 20px; color: #a33; font-weight: 700; font-size: .9rem; }
body.auth-required .sidebar nav,
body.auth-required #refreshBtn { opacity: .28; pointer-events: none; }
body.role-client .nav[data-view="dashboard"],
body.role-client .nav[data-view="users"],
body.role-client .nav[data-view="trash"],
body.role-client .nav[data-view="settings"],
body.role-client .nav[data-view="admin"],
body.role-employee .nav[data-view="users"],
body.role-employee .nav[data-view="settings"],
body.role-employee .nav[data-view="admin"],
body.role-client .delete-clip-btn,
body.role-client .edit-btn,
body.role-client .save-btn,
body.role-client .admin-only,
body.role-client [data-admin-only="true"] { display: none !important; }
body.role-employee .nav[data-view="admin"],
body.role-employee .nav[data-view="settings"],
body.role-employee .nav[data-view="users"],
body.role-employee [data-admin-only="true"] { display: none !important; }
