/* ============================================================
   VAIDEO — Compléments shell MVC (FAB support, drawer mobile, padding contenu)
   ============================================================ */

/* Padding du contenu de page (le <main> du shell) */
.main > main { padding: 28px 32px 64px; }
@media (max-width: 1024px) { .main > main { padding: 18px 16px 90px; } }

/* Drawer mobile : la sidebar s'ouvre par-dessus */
@media (max-width: 1024px) {
  .shell.nav-open .sidebar {
    display: flex; position: fixed; inset: 0 auto 0 0; width: 282px; max-width: 86vw;
    z-index: 70; box-shadow: var(--shadow-lg);
  }
  .shell.nav-open::before {
    content: ""; position: fixed; inset: 0; background: oklch(0 0 0 / 0.45);
    z-index: 65; backdrop-filter: blur(2px);
  }
}

/* FAB Assistance */
.support-fab { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 55; }
@media (max-width: 1024px) { .support-fab { bottom: 76px; right: 1rem; } }
.support-fab__btn {
  width: 3.5rem; height: 3.5rem; border: 0; border-radius: var(--r-pill); cursor: pointer;
  display: grid; place-items: center; color: var(--primary-fg);
  background: linear-gradient(145deg, var(--primary), color-mix(in oklch, var(--primary) 55%, var(--spark)));
  box-shadow: var(--shadow-lg); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.support-fab__btn:hover { transform: translateY(-2px) scale(1.03); box-shadow: var(--shadow-pop); }
.support-fab .proj-menu { position: absolute; }

/* Avatar pied de sidebar */
.sb-foot .avatar { display: grid; place-items: center; border-radius: var(--r-pill); color: #fff; font-weight: var(--fw-bold); flex: none; }
.sb-foot-txt { min-width: 0; flex: 1; }
.sb-foot-txt .n { font-size: var(--t-sm); font-weight: var(--fw-semibold); }
.sb-foot-txt .r { font-size: var(--t-xs); color: var(--text-subtle); }
.tenant .tav { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r-sm); color: #fff; font-weight: var(--fw-bold); flex: none; }
.proj-opt .tav { display: grid; place-items: center; width: 26px; height: 26px; border-radius: var(--r-xs); color: #fff; font-weight: var(--fw-bold); flex: none; }

/* ===== Tuiles de statut + cartes média (dashboard, statuts, listes) ===== */
.dash-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.dash-head h1 { font-size: var(--t-h1); }
.dash-search { position: relative; max-width: 30rem; margin-bottom: 20px; }
.dash-search .input { border-radius: var(--r-pill); padding-right: 38px; }
.dash-search-clear { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); width: 26px; height: 26px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--text-faint); cursor: pointer; font-size: 18px; line-height: 1; }
.dash-search-clear:hover { background: var(--surface-2); color: var(--text); }

.dash-tile { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 130px; padding: var(--pad-card); cursor: pointer; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.dash-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.dash-tile.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-ring); }
.dash-tile-ic { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border-radius: var(--r-md); background: var(--primary-tint); color: var(--primary); }
.dash-tile-ic svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.dash-tile-count { font-size: 2rem; font-weight: var(--fw-black); line-height: 1; }

.media-card { overflow: hidden; padding: 0; display: block; transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.media-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.media-card-thumb { position: relative; aspect-ratio: 16/9; background: var(--surface-2); overflow: hidden; }
.media-home-card-image { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-home-card-stats { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.media-home-card-stat { background: oklch(0 0 0 / 0.6); color: #fff; font-size: var(--t-xs); padding: 2px 7px; border-radius: var(--r-pill); }
.media-home-card-error-badge { position: absolute; top: 8px; right: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--st-failed-fg); border: 2px solid var(--surface); z-index: 2; }
.media-card-body { padding: 14px 16px 16px; }
.img-broken-badge { position: absolute; top: 8px; left: 8px; width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--st-failed-fg); color: #fff; display: grid; place-items: center; z-index: 3; box-shadow: 0 1px 3px oklch(0 0 0 / 0.4); }

/* Shim utilitaires (pour le JS réutilisé qui bascule .d-none, etc.) */
.d-none { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-uppercase { text-transform: uppercase; }
.text-danger { color: var(--st-failed-fg); }
.text-success { color: var(--st-live-fg); }
.text-warning { color: var(--st-running-fg); }
.text-muted { color: var(--text-muted); }

/* Input fichier natif stylé (en attendant un vrai composant dropzone) */
.input[type="file"] { padding: 6px 8px; cursor: pointer; line-height: 1.6; }
.input[type="file"]::file-selector-button {
  margin-right: 12px; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  background: var(--surface); color: var(--text); font-weight: var(--fw-semibold);
  font-family: inherit; font-size: var(--t-sm); padding: 6px 12px; cursor: pointer; transition: var(--dur) var(--ease);
}
.input[type="file"]::file-selector-button:hover { background: var(--surface-2); border-color: var(--text-faint); }

/* ===== Onglets en page (data-tab-group / data-tab / data-pane) ===== */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 22px; overflow-x: auto; }
.tabs > button, .tabs > .tab {
  appearance: none; border: 0; background: transparent; color: var(--text-muted);
  font-family: inherit; font-size: var(--t-sm); font-weight: var(--fw-semibold); cursor: pointer;
  padding: 11px 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.tabs > button:hover, .tabs > .tab:hover { color: var(--text); }
.tabs > button.active, .tabs > .tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== Badges (shim pour réutiliser le JS/markup hérité text-bg-*) ===== */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: var(--r-pill);
  font-size: var(--t-xs); font-weight: var(--fw-semibold); line-height: 1.4; border: 1px solid transparent; white-space: nowrap; }
.badge.text-bg-success   { background: var(--st-live-bg); color: var(--st-live-fg); border-color: var(--st-live-bd); }
.badge.text-bg-danger    { background: var(--st-failed-bg); color: var(--st-failed-fg); border-color: var(--st-failed-bd); }
.badge.text-bg-warning   { background: var(--st-running-bg); color: var(--st-running-fg); border-color: var(--st-running-bd); }
.badge.text-bg-info      { background: var(--st-scheduled-bg); color: var(--st-scheduled-fg); border-color: var(--st-scheduled-bd); }
.badge.text-bg-primary   { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-tint-2); }
.badge.text-bg-secondary { background: var(--surface-2); color: var(--text-muted); border-color: var(--border); }
.badge.text-bg-light     { background: var(--surface-2); color: var(--text); border-color: var(--border); }

/* ===== Alertes / notices (shim TempData) ===== */
.alert { padding: 12px 14px; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2);
  color: var(--text); font-size: var(--t-sm); margin-bottom: 16px; }
.alert code { word-break: break-all; }
.alert-success { background: var(--st-live-bg); color: var(--st-live-fg); border-color: var(--st-live-bd); }
.alert-danger  { background: var(--st-failed-bg); color: var(--st-failed-fg); border-color: var(--st-failed-bd); }
.alert-warning { background: var(--st-running-bg); color: var(--st-running-fg); border-color: var(--st-running-bd); }
.alert-info    { background: var(--st-scheduled-bg); color: var(--st-scheduled-fg); border-color: var(--st-scheduled-bd); }

/* ===== Spinner ===== */
.spinner { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle;
  border: 2.5px solid var(--border-strong); border-top-color: var(--primary); animation: vaideo-spin 0.7s linear infinite; }
.spinner.sm { width: 15px; height: 15px; border-width: 2px; }
@keyframes vaideo-spin { to { transform: rotate(360deg); } }

/* ===== Switch (checkbox stylé en interrupteur — pour lignes AJAX) ===== */
.switch { appearance: none; -webkit-appearance: none; width: 40px; height: 23px; border-radius: 99px;
  background: var(--border-strong); position: relative; cursor: pointer; transition: var(--dur); border: 0; flex: none; vertical-align: middle; margin: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; transition: var(--dur) var(--ease); box-shadow: var(--shadow-xs); }
.switch:checked { background: var(--primary); }
.switch:checked::after { left: 19px; }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== Liste (groupes de comptes externes, etc.) ===== */
.dlist { display: flex; flex-direction: column; }
.dlist-item { padding: 14px var(--pad-card); border-top: 1px solid var(--border-subtle); }
.dlist-item:first-child { border-top: 0; }

/* Chevron de collapse (data-collapse-toggle) */
[data-collapse-toggle] .chev-collapse { transition: transform var(--dur) var(--ease); }
[data-collapse-toggle].is-collapsed .chev-collapse { transform: rotate(-90deg); }

/* Liste d'autocomplétion (invitation membres) */
.autocomplete-pop { position: absolute; top: 100%; left: 0; width: 100%; z-index: 60; margin-top: 4px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  max-height: 220px; overflow-y: auto; padding: 4px; }
.autocomplete-pop .autocomplete-item { padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: var(--t-sm); }
.autocomplete-pop .autocomplete-item:hover { background: var(--surface-2); }

/* ===== Badge variant manquant (shim) ===== */
.badge.text-bg-dark { background: var(--surface-3, var(--surface-2)); color: var(--text); border-color: var(--border); }

/* ===== Générateur d'overlay vidéo (porté depuis site.css, tokens design) ===== */
.video-overlay-page { display: grid; gap: 24px; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .video-overlay-page { grid-template-columns: 1fr; } }
.video-overlay-preview-shell { position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 280px; border: 1px dashed var(--border); border-radius: var(--r-xl);
  background: linear-gradient(135deg, var(--primary-tint), transparent); overflow: hidden; }
.video-overlay-preview-shell canvas { width: auto; max-width: 100%; height: auto; max-height: 70vh; background: #000; }
.video-overlay-preview-placeholder { padding: 2rem; text-align: center; color: var(--text-muted); max-width: 32rem; }
.video-overlay-preview-controls { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; }
.video-overlay-image-thumb { display: block; max-width: min(100%, 512px); max-height: 512px; width: auto; height: auto;
  border-radius: var(--r-md); border: 1px solid var(--border); object-fit: contain; background: rgba(0,0,0,0.2); }
.video-overlay-image-preview-button { display: inline-block; padding: 0; border: 0; background: transparent; cursor: zoom-in; }
.video-overlay-color-editor { display: grid; grid-template-columns: auto 1fr; gap: .5rem; align-items: center; }
.video-overlay-color-swatches { display: flex; flex-wrap: wrap; gap: .4rem; }
.video-overlay-color-swatch { width: 1.5rem; height: 1.5rem; border-radius: 999px; border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 0 1px var(--border); background: var(--swatch, #000); cursor: pointer; }
.video-overlay-color-swatch:hover { transform: scale(1.08); }

/* ── Éditeur d'overlay vidéo refondu : topbar, grille, calques, panneau propriétés ── */
.vo-topbar { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.vo-editor { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr) minmax(320px, 420px); align-items: start; }
@media (max-width: 1100px) { .vo-editor { grid-template-columns: 1fr; } }
.vo-layer-list { display: block; }
.vo-layer { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--r-md); background: var(--surface-2); }
.vo-layer.is-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.vo-layer-main { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0;
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; }
.vo-layer-badge { font-size: var(--t-xs); font-weight: var(--fw-semibold); padding: 2px 8px; border-radius: var(--r-pill);
  background: var(--surface-3, var(--surface-2)); border: 1px solid var(--border); color: var(--text-muted); flex: none; }
.vo-layer-name { font-weight: var(--fw-medium); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vo-layer-actions { display: flex; gap: 4px; flex: none; }
.vo-layer-btn { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--surface); color: var(--text);
  cursor: pointer; font-size: var(--t-sm); line-height: 1; }
.vo-layer-btn:hover:not(:disabled) { background: var(--surface-2); }
.vo-layer-btn:disabled { opacity: .4; cursor: default; }
.vo-layer-btn--danger:hover:not(:disabled) { color: var(--danger, #dc3545); border-color: var(--danger, #dc3545); }
.vo-empty { padding: 14px; border: 1px dashed var(--border); border-radius: var(--r-md);
  color: var(--text-muted); font-size: var(--t-sm); text-align: center; }
.vo-prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vo-prop-grid .span-2 { grid-column: span 2; }
.vo-input-color { padding: 4px; min-width: 48px; height: var(--control-h); }

/* ── Accordéon de calques (éditeur de cover) ── */
.vo-acc { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.vo-acc + .vo-acc { margin-top: 8px; }
.vo-acc.is-active { border-color: var(--primary); }
.vo-acc-header { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 10px 12px;
  background: var(--surface-2); cursor: pointer; user-select: none; }
.vo-acc-header:hover { background: var(--surface-3, var(--surface-2)); }
.vo-acc-chev { flex: none; color: var(--text-muted); font-weight: var(--fw-bold); font-size: var(--t-base);
  transition: transform var(--dur) var(--ease); }
.vo-acc.is-open > .vo-acc-header .vo-acc-chev { transform: rotate(90deg); }
.vo-acc-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--fw-semibold); }
.vo-acc-header .spacer { flex: 1; }
.vo-acc-header .vo-layer-actions { margin-left: auto; flex: none; display: flex; gap: 4px; }
.vo-acc-body { padding: 12px; border-top: 1px solid var(--border-subtle); }

/* ── Tuiles de source (cover existante / vignette metadata, éditeur de cover) ── */
.cover-source-tile { display: block; width: 100%; min-width: 0; text-align: left; padding: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2);
  color: inherit; font: inherit; cursor: pointer; transition: border-color var(--dur) var(--ease); }
.cover-source-tile:hover { border-color: var(--border-strong); }
.cover-source-tile.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary) inset; }
.cover-source-tile img { display: block; width: 100%; height: auto; max-height: 280px; object-fit: contain;
  border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.2); }
.cover-source-tile__title { display: block; font-weight: var(--fw-semibold); margin-bottom: 8px; }
.cover-source-tile__meta { display: block; font-size: var(--t-sm); color: var(--text-muted); margin-top: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Shims utilitaires hérités (pour réutiliser le HTML généré par le JS legacy) ===== */
.fw-bold { font-weight: var(--fw-bold); }
.fw-semibold { font-weight: var(--fw-semibold); }
.small { font-size: var(--t-sm); }
.text-body-secondary { color: var(--text-muted); }
/* marges / alignement / espacements (compat Bootstrap, scope _LayoutApp uniquement) */
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 16px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 16px; } .my-3 { margin: 16px 0; }
.me-1 { margin-right: 4px; } .me-2 { margin-right: 8px; } .ms-1 { margin-left: 4px; } .ms-2 { margin-left: 8px; }
.p-0 { padding: 0; } .ps-3 { padding-left: 16px; } .pe-2 { padding-right: 8px; }
.text-start { text-align: left; } .text-end { text-align: right; } .text-center { text-align: center; }
.d-block { display: block; } .flex-grow-1 { flex: 1 1 auto; } .flex-column { flex-direction: column; }
.text-decoration-none { text-decoration: none; }
.list-group { display: flex; flex-direction: column; }
.list-group-item { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); }
.list-group-item:last-child { border-bottom: 0; }
.btn-link { background: transparent; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .input, .input-group textarea, .input-group .form-control { flex: 1; }

/* ===== Compat formulaires / cartes / boutons Bootstrap (scope _LayoutApp) ===== */
.form-control, .form-select { border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text); padding: 0 12px; height: var(--control-h); font-size: var(--t-base); font-family: inherit; width: 100%; }
textarea.form-control { height: auto; min-height: 80px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.form-control:focus, .form-select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.form-control-sm { height: 32px; padding: 0 8px; font-size: var(--t-sm); }
.form-control-color { width: 46px; height: 34px; padding: 3px; }
.form-range { width: 100%; }
.form-label { font-size: var(--t-sm); font-weight: var(--fw-semibold); color: var(--text-muted); display: block; margin-bottom: 6px; }
.form-text { font-size: var(--t-xs); color: var(--text-subtle); margin-top: 4px; }
.form-check-input { margin: 0; }
.card-header { padding: 14px 18px; border-bottom: 1px solid var(--border-subtle); font-weight: var(--fw-semibold); }
.card-body { padding: 16px 18px; }
.card-footer { padding: 14px 18px; border-top: 1px solid var(--border-subtle); }
.btn-outline-primary { background: var(--primary-tint); color: var(--primary); border-color: var(--primary-tint-2); }
.btn-outline-secondary { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.btn-outline-danger { background: var(--st-failed-bg); color: var(--st-failed-fg); border-color: var(--st-failed-bd); }
/* utilitaires de mise en page (compat) */
.d-flex { display: flex; } .d-inline-flex { display: inline-flex; } .d-grid { display: grid; } .d-inline-block { display: inline-block; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; } .justify-content-center { justify-content: center; } .justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; } .align-items-start { align-items: flex-start; } .align-items-end { align-items: flex-end; }
.align-self-start { align-self: flex-start; }
.w-100 { width: 100%; } .h-100 { height: 100%; }
.p-2 { padding: 8px; } .p-3 { padding: 16px; } .p-4 { padding: 24px; }
.px-3 { padding-left: 16px; padding-right: 16px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }
.mb-4 { margin-bottom: 24px; } .mt-2 { margin-top: 8px; }
.rounded-3, .rounded-4 { border-radius: var(--r-lg); }
.bg-body, .bg-body-tertiary, .bg-dark-subtle { background: var(--surface-2); }
.text-primary-emphasis { color: var(--primary); }
.img-fluid { max-width: 100%; height: auto; }

/* ===== Éditeur de covers (porté depuis site.css, tokens design) ===== */
.media-cover-workflow { border: 1px solid var(--border); border-radius: var(--r-xl); }
.media-cover-workflow__hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1.25rem;
  border: 1px solid var(--border); border-radius: var(--r-xl); background: linear-gradient(135deg, var(--primary-tint), transparent); }
.media-cover-workflow__orientation-note { min-width: 220px; padding: 1rem; border-radius: var(--r-lg);
  border: 1px solid var(--primary-tint-2); background: var(--primary-tint); }
.media-cover-stepper { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .16rem; align-items: stretch; }
.media-cover-stepper__item { display: block; border: 1px solid var(--border); background: var(--surface-2); text-align: left;
  padding: .68rem .9rem .72rem 1.35rem; min-height: 5.6rem; position: relative; overflow: hidden; color: inherit;
  clip-path: polygon(0 0, calc(100% - 1.05rem) 0, 100% 50%, calc(100% - 1.05rem) 100%, 0 100%, .95rem 50%);
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease, color .2s ease; }
.media-cover-stepper__item:first-child { padding-left: .95rem; clip-path: polygon(0 0, calc(100% - 1.05rem) 0, 100% 50%, calc(100% - 1.05rem) 100%, 0 100%); }
.media-cover-stepper__item:last-child { padding-right: .9rem; clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%, .95rem 50%); }
.media-cover-stepper__item:not(:disabled):hover { transform: translateY(-1px); }
.media-cover-stepper__item:disabled { opacity: .82; cursor: not-allowed; }
.media-cover-stepper__item.is-active { background: linear-gradient(135deg, var(--primary), var(--primary)); color: #fff;
  border-color: var(--primary); box-shadow: 0 14px 30px var(--primary-ring); }
.media-cover-stepper__item.is-complete { background: var(--primary-tint); border-color: var(--primary-tint-2); }
.media-cover-stepper__index { display: inline-flex; align-items: center; justify-content: center; width: 1.55rem; height: 1.55rem;
  border-radius: 999px; font-weight: 700; font-size: .82rem; background: var(--primary-tint); color: var(--primary); margin-bottom: .3rem; }
.media-cover-stepper__item.is-active .media-cover-stepper__index { background: rgba(255,255,255,.18); color: #fff; }
.media-cover-stepper__label, .media-cover-stepper__hint { display: block; }
.media-cover-stepper__label { font-weight: 700; font-size: 1rem; line-height: 1.15; margin-bottom: .18rem; }
.media-cover-stepper__hint { font-size: .72rem; line-height: 1.2; color: var(--text-muted); }
.media-cover-stepper__item.is-active .media-cover-stepper__hint { color: rgba(255,255,255,.82); }
.media-cover-choice-card { display: block; height: 100%; padding: 1rem; border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface-2); cursor: pointer; }
.media-cover-choice-card.is-disabled { opacity: 0.55; cursor: not-allowed; }
.media-cover-choice-card input { margin-bottom: 0.75rem; }
.media-cover-choice-card__content { display: flex; flex-direction: column; gap: 0.35rem; }
.media-cover-choice-card__title { font-weight: 700; }
.media-cover-choice-card__text { color: var(--text-muted); font-size: 0.95rem; }
.media-cover-workflow__source-preview { min-height: 360px; }
.media-cover-workflow__source-preview canvas { max-height: 360px; }
.media-cover-workflow__overlay-list { max-height: 960px; overflow: auto; }
.js-existing-cover-button.active { border-color: var(--primary); background: var(--primary-tint); }
.media-cover-overlay-card--active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary-ring); }
.media-cover-tile { border: 1px solid var(--border); border-radius: var(--r-lg); }
.media-cover-tile__preview { height: 100%; padding: .75rem; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface-2); }
.media-cover-tile__portrait { aspect-ratio: 9/16; width: min(280px, 100%); object-fit: cover; }
.media-cover-tile__landscape { aspect-ratio: 16/9; max-width: 420px; object-fit: cover; }
@media (max-width: 991.98px) {
  .media-cover-workflow__hero { grid-template-columns: 1fr; }
  .media-cover-stepper { grid-template-columns: 1fr; }
  .media-cover-stepper__item, .media-cover-stepper__item:first-child, .media-cover-stepper__item:last-child {
    clip-path: none; border-radius: var(--r-lg); padding-left: 1rem; padding-right: 1rem; }
}

/* ===== Widget d'upload de fichier (porté depuis site.css, tokens design) ===== */
.file-upload-widget__shell { background: var(--surface); }
.file-upload-widget__dropzone { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.25rem;
  border: 2px dashed var(--primary-tint-2); border-radius: var(--r-lg); background: var(--surface-2); color: inherit;
  transition: border-color 0.18s ease, background-color 0.18s ease, transform 0.18s ease; }
.file-upload-widget__dropzone:hover, .file-upload-widget__dropzone.is-dragover { border-color: var(--primary); background: var(--primary-tint); transform: translateY(-1px); }
.file-upload-widget__dropzone-copy { display: flex; flex-direction: column; gap: 0.2rem; }
.file-upload-widget__dropzone-title { font-weight: 600; }
.file-upload-widget__dropzone-hint { color: var(--text-muted); font-size: 0.925rem; }
.file-upload-widget__preview-card { display: grid; gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.file-upload-widget__media { display: flex; }
.file-upload-widget__image, .file-upload-widget__video { width: 100%; max-height: 320px; object-fit: contain; border: 1px solid var(--border); border-radius: var(--r-md); background: #000; }
.file-upload-widget__icon { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px;
  border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--primary-tint); font-weight: 700; letter-spacing: 0.08em; }
.inline-file-picker__dropzone { min-height: 0; }
@media (max-width: 767.98px) { .file-upload-widget__dropzone { flex-direction: column; align-items: stretch; } }

/* ===== Logo Overview projet (porté depuis site.css, tokens design) ===== */
.project-overview-logo, .project-overview-logo-placeholder { width: 64px; height: 64px; border-radius: 50%; flex: 0 0 auto; }
.project-overview-logo { object-fit: cover; border: 1px solid var(--border); background: var(--surface-2); }
.project-overview-logo-placeholder { display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.35rem; font-weight: 700; color: var(--text); background: var(--primary-tint); }

/* ===== Calendrier éditorial (porté depuis site.css, tokens design) ===== */
.publication-calendar-logo-placeholder { width: 56px; height: 56px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.publication-calendar-filters .select[multiple] { min-height: 9rem; }
.publication-calendar-filters-caret { transition: transform .2s ease; display: inline-block; }
.publication-calendar-month-badge { text-transform: capitalize; font-size: .95rem; padding: .45rem .85rem; }
.publication-calendar-board { overflow: hidden; }
.publication-calendar-weekdays, .publication-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .65rem; }
.publication-calendar-weekday { text-align: center; font-size: .85rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.publication-calendar-day { min-height: 11rem; border: 1px solid var(--border); border-radius: var(--r-md); padding: .85rem; background: var(--surface); }
.publication-calendar-day.is-muted { opacity: .5; }
.publication-calendar-day-items { display: grid; gap: .5rem; }
.publication-calendar-chip { display: block; border: 1px solid var(--border); border-radius: var(--r-md); padding: .55rem .65rem; background: var(--primary-tint); }
.publication-calendar-chip:hover { border-color: var(--border-strong); }
.publication-calendar-chip-title { font-weight: 600; margin: .2rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.publication-calendar-empty { font-size: .82rem; color: var(--text-muted); }
.publication-calendar-item-card { overflow: hidden; }
.publication-calendar-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.publication-calendar-provider-logo { width: 18px; height: 18px; object-fit: contain; }
.publication-calendar-description { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 900px) { .publication-calendar-weekdays, .publication-calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .publication-calendar-meta { grid-template-columns: 1fr; } }

/* ===== Shims grille Bootstrap (row g-* / col-*) — utilisés par les formulaires
   legacy re-skinnés (PublishPipelines, catalogue de variables…) ===== */
.row.g-2, .row.g-3 { flex-wrap: wrap; align-items: stretch; }
.row.g-2 { gap: 8px; } .row.g-3 { gap: 12px; }
.row > .col-12, .row > [class*="col-md-"], .row > [class*="col-lg-"] { flex: 1 1 100%; min-width: 0; }
@media (min-width: 768px) {
  .row > .col-md-3 { flex: 0 0 calc(25% - 12px); }
  .row > .col-md-4 { flex: 0 0 calc(33.333% - 12px); }
  .row > .col-md-6 { flex: 0 0 calc(50% - 12px); }
}
@media (min-width: 992px) {
  .row > .col-lg-4 { flex: 0 0 calc(33.333% - 12px); }
  .row > .col-lg-6 { flex: 0 0 calc(50% - 12px); }
}
.border { border: 1px solid var(--border); }
.rounded { border-radius: var(--r-md); }
.bg-light { background: var(--surface-2); }
.table-responsive { overflow-x: auto; }
.table-striped tbody tr:nth-child(odd) { background: var(--surface-2); }
.align-middle td, .align-middle th { vertical-align: middle; }
.btn-outline-info { background: var(--st-scheduled-bg); color: var(--st-scheduled-fg); border-color: var(--st-scheduled-bd); }
.btn-close { appearance: none; border: 0; background: transparent; font-size: 18px; line-height: 1; cursor: pointer; color: var(--text-muted); }
.btn-close::before { content: "✕"; }
/* Menu d'autocomplétion (catalogue de variables) : panneau positionné, affiché via .show */
.dropdown-menu { display: none; position: absolute; z-index: 50; top: 100%; left: 0; margin: 4px 0 0; padding: 6px; list-style: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--shadow-2, 0 8px 24px rgba(0,0,0,.12)); }
.dropdown-menu.show { display: block; }
.dropdown-menu .dropdown-item { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: transparent;
  border-radius: var(--r-sm, 6px); color: var(--text); cursor: pointer; }
.dropdown-menu .dropdown-item:hover { background: var(--surface-2); }

/* ===== Stepper pleine largeur à étapes nommées (wizards) ===== */
.steps-wide { display: flex; align-items: flex-start; width: 100%; }
.steps-wide .step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: none; min-width: 92px; }
.steps-wide .step .node { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--border-strong); background: var(--surface);
  display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); font-size: var(--t-sm); color: var(--text-muted); }
.steps-wide .step.done .node { background: var(--track-fill); border-color: var(--track-fill); color: #fff; }
.steps-wide .step.curr .node { border-color: var(--track-fill); color: var(--text); box-shadow: 0 0 0 4px var(--primary-ring); }
.steps-wide .step .lbl { font-size: var(--t-xs); color: var(--text-muted); text-align: center; }
.steps-wide .step.curr .lbl { color: var(--text); font-weight: var(--fw-semibold); }
.steps-wide .link { flex: 1; height: 2px; background: var(--border-strong); margin-top: 15px; }
.steps-wide .link.done { background: var(--track-fill); }

/* ===== Checkbox design (cases à cocher de la charte) ===== */
.check { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; flex: none; margin: 0;
  border: 2px solid var(--border-strong); border-radius: 6px; background: var(--surface); cursor: pointer; position: relative;
  transition: background .12s ease, border-color .12s ease; }
.check:checked { background: var(--track-fill); border-color: var(--track-fill); }
.check:checked::after { content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.check:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.check:disabled { opacity: .5; cursor: not-allowed; }

/* L'attribut [hidden] doit toujours l'emporter sur display:inline-flex des .btn
   (sinon un bouton masqué via .hidden = attribut reste visible). */
[hidden] { display: none !important; }
