/* noma-crea front — genere 22071102 */
/* WiseDyn front admin component - shared admin shell/design. */
:root {
  --accent: #8806ce;
  --primary: #8806ce; /* référence stable : --accent est redéfini par les modes clair/sombre */
  --accent-contrast: #ffffff;
  --success: #00a86b;
  --danger: #df1b41;
  --warning: #e08c0a;
  --info: #2563eb;
  --radius: 8px;

  /* Couleur moyenne du fond d'écran, posée par JS -> liserets / bordures. */
  --border-rgb: 255, 255, 255;
  --wallpaper: none;
  --content-veil-alpha: 60%;
  --menu-veil-alpha: 60%;
}

html {
  height: 100%;
  overflow: hidden;
}

body.admin-body {
  --nc-accent: var(--accent);
  --nc-c-primary: var(--accent);
  --nc-c-secondary: #b6b6b6;
  --nc-c-success: #78bd5d;
  --nc-c-info: #59c4e4;
  --nc-c-warning: #f4ab43;
  --nc-c-danger: #e46050;
  --nc-c-light: #f5f7fa;
  --nc-c-dark: #2d374b;
  --nc-btn-primary-color: var(--accent-contrast);
  --nc-rayon: var(--radius);
  --nc-champ-bg: var(--panel);
  --nc-champ-bg-soft: var(--panel-soft);
  --nc-champ-texte: var(--text);
  --nc-champ-muted: var(--muted);
  --nc-champ-placeholder: var(--muted);
  --nc-champ-bord: var(--input-border, var(--border-soft));
  --nc-champ-bord-focus: var(--accent);
  --nc-champ-focus-shadow: var(--accent-pale);
  /* Overlay de survol générique : dérivé de --text → foncé en thème clair, clair en thème sombre (auto-adaptatif) */
  --hover-overlay: color-mix(in srgb, var(--text) 8%, transparent);
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--bg-base);
  background-image: var(--voile, none), var(--wallpaper, none);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* ===== Mode CLAIR : apparence claire — texte noir, surfaces blanches translucides ===== */
body[data-theme="clair"] {
  --menu-bg: rgb(255 255 255 / var(--menu-veil-alpha));
  --accent: var(--text-auto, #14181f);
  --accent-contrast: #ffffff;
  --text: var(--text-auto, #14181f);
  --muted: color-mix(in srgb, var(--text-auto, #14181f) 64%, transparent);
  --panel: rgba(255, 255, 255, .5);
  --modal-bg: rgba(255, 255, 255, .92);
  --panel-soft: rgba(255, 255, 255, .32);
  --accent-pale: rgba(0, 0, 0, .07);
  --accent-mist: rgba(0, 0, 0, .04);
  --border: rgba(var(--border-rgb), .4);
  --border-soft: rgba(0, 0, 0, .12);
  --table-bg: rgba(255, 255, 255, .85);
  --bg-base: transparent;
  --voile: none;
  --shadow: 0 18px 50px rgba(0, 0, 0, .14);
}

/* ===== Aucun fond : thème blanc + primary violet (texte sombre) ===== */
body[data-theme="defaut"] {
  --menu-bg: #ffffff;
  --text: #0a2540;
  --muted: #62788d;
  --panel: #ffffff;
  --panel-soft: #f7fafc;
  --accent-pale: #f4ecfc;
  --accent-mist: #faf6fe;
  --border: #e7dcf4;
  --border-soft: #edf2f7;
  --input-border: rgba(10, 37, 64, .24);
  --table-bg: #ffffff;
  --bg-base: #f5f5f6;
  --voile: none;
  --shadow: 0 24px 70px rgba(50, 50, 93, .10), 0 8px 24px rgba(15, 23, 42, .07);
}

/* ===== Mode SOMBRE : apparence sombre — texte blanc, surfaces noires translucides ===== */
body[data-theme="sombre"] {
  --menu-bg: rgb(0 0 0 / var(--menu-veil-alpha));
  --accent: var(--text-auto-light, #ffffff);
  --accent-contrast: #14181f;
  --text: var(--text-auto-light, #ffffff);
  --muted: color-mix(in srgb, var(--text-auto-light, #ffffff) 78%, transparent);
  --panel: rgba(0, 0, 0, .42);
  --modal-bg: rgba(22, 24, 30, .92);
  --panel-soft: rgba(0, 0, 0, .28);
  --accent-pale: rgba(255, 255, 255, .22);
  --accent-mist: rgba(255, 255, 255, .12);
  --border: rgba(var(--border-rgb), .35);
  --border-soft: rgba(var(--border-rgb), .2);
  --table-bg: rgba(0, 0, 0, .46);
  --table-scroll-bg: rgba(0, 0, 0, .46);
  --doc-upload-row-bg: rgba(24, 94, 61, .55);
  --drop-inset-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 2px 10px rgba(255, 255, 255, .18);
  --drop-inset-shadow-active: inset 0 2px 14px rgba(255, 255, 255, .32);
  --bg-base: transparent;
  --voile: none;
  --shadow: 0 18px 50px rgba(0, 0, 0, .28);
}

/* Mode sombre sans image : fond gris foncé stable, surfaces plus claires
   et toujours translucides. Les sliders content/menu restent actifs. */
body[data-theme="sombre"][data-wallpaper="0"] {
  --menu-bg: rgb(255 255 255 / calc(var(--menu-veil-alpha) * .12));
  --accent: var(--text-auto-light, #e8ebf0);
  --accent-contrast: #14181f;
  --text: var(--text-auto-light, #e8ebf0);
  --muted: color-mix(in srgb, var(--text-auto-light, #e8ebf0) 70%, transparent);
  --panel: rgb(255 255 255 / calc(var(--content-veil-alpha) * .18));
  --panel-soft: rgb(255 255 255 / calc(var(--content-veil-alpha) * .11));
  --accent-pale: rgb(255 255 255 / calc(var(--content-veil-alpha) * .18));
  --accent-mist: rgb(255 255 255 / calc(var(--content-veil-alpha) * .10));
  --border: rgba(255, 255, 255, .16);
  --border-soft: rgba(255, 255, 255, .10);
  --table-bg: rgb(255 255 255 / calc(var(--content-veil-alpha) * .20));
  --table-scroll-bg: rgb(255 255 255 / calc(var(--content-veil-alpha) * .24));
  --doc-upload-row-bg: rgba(24, 94, 61, .45);
  --drop-inset-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), inset 0 2px 10px rgba(255, 255, 255, .18);
  --drop-inset-shadow-active: inset 0 2px 14px rgba(255, 255, 255, .32);
  --bg-base: #151922;
  --shadow: 0 18px 48px rgba(0, 0, 0, .34);
}

.shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  overflow: hidden;
  transition: grid-template-columns .24s ease;
}

.sidebar {
  position: sticky;
  top: 0;
  width: 238px;
  height: 100vh;
  padding: 10px;
  background: var(--menu-bg, var(--panel));
  border-right: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  overflow: hidden;
  z-index: 40;
  transition: transform .24s ease;
}

/* WD-mark devient un bouton (reset) */
.brand-mark {
  appearance: none;
  cursor: pointer;
}

/* ===== Menu rétractable ===== */
/* Rétracté : la colonne disparait, la sidebar glisse a gauche */
body.menu-collapsed .shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.menu-collapsed .sidebar {
  transform: translateX(-100%);
}

/* Bouton WD flottant pour rouvrir (visible seulement quand rétracté) */
.menu-rappel {
  position: fixed;
  top: 7px;
  left: 12px;
  z-index: 60;
  width: 40px;
  height: 40px;
  display: none;
  place-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.menu-rappel img {
  width: 30px;
  height: auto;
  display: block;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .45));
}

body.menu-collapsed .menu-rappel {
  display: grid;
}

/* Quand le menu est caché, le WD flottant (haut-gauche) ne doit pas chevaucher
   le contenu du haut : on décale toolbar / entête de page. */
body.menu-collapsed .toolbar,
body.menu-collapsed .page-header {
  padding-left: 45px;
}

/* Menu ouvert : un peu plus de marge a gauche dans la toolbar. */
body:not(.menu-collapsed) .toolbar {
  padding-left: 20px;
}

/* ===== Responsive : sous 900px la sidebar passe en overlay ===== */
@media (max-width: 900px) {
  .shell,
  body.menu-collapsed .shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    box-shadow: var(--shadow);
  }

  body.menu-collapsed .sidebar {
    transform: translateX(-100%);
  }

  /* Le rappel WD reste dispo, masqué seulement quand le menu est ouvert */
  .menu-rappel {
    display: grid;
  }

  body:not(.menu-collapsed) .menu-rappel {
    display: none;
  }

  /* Voile derriere la sidebar ouverte */
  body:not(.menu-collapsed) .main::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(0, 0, 0, .35);
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 40px;
  height: 32px;
  border-radius: 0;
  display: grid;
  place-items: center;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-wd {
  position: relative;
}

.brand-wd img {
  width: 30px;
  height: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 720;
  letter-spacing: 0;
}

.brand-name .sfs {
  color: var(--accent);
  font-size: 20px;
  line-height: 1;
}

.brand-subtitle {
  display: block;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  line-height: 1.1;
}


.nav {
  display: grid;
  gap: 2px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  /* La scrollbar se rapproche du bord (la nav deborde dans le padding droit de
     .sidebar), et le padding-right compense pour garder le contenu en place. */
  margin-right: -8px;
  padding-right: 8px;
}

.nav-with-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22px;
  align-items: center;
  gap: 1px;
}

.sidebar .nav-with-toggle .nav-link {
  min-width: 0;
}

.subnav-toggle {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.subnav-toggle:hover {
  color: var(--accent);
  background: var(--accent-pale);
}

.subnav-toggle .sfs {
  font-size: 11px;
  line-height: 1;
  transition: transform .16s ease;
}

.subnav-toggle[aria-expanded="false"] .sfs {
  transform: rotate(-90deg);
}

.subnav {
  display: grid;
  gap: 1px;
  margin: -3px 0 1px 16px;
  padding-left: 4px;
  border-left: 1px solid var(--border-soft);
}

.subnav.is-collapsed {
  display: none;
}

.subnav-link {
  min-height: 23px;
  padding: 3px 6px;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
}

.subnav-link:hover,
.subnav-link.is-active {
  color: var(--text);
  background: var(--accent-pale);
}

.subnav-link .sfs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  overflow: visible;
  color: var(--accent);
  font-size: 15px;
  line-height: 1;
}

.subnav-link span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-section {
  margin: 7px 8px 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.sidebar .nav-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-height: 25px;
  padding: 0 5px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 620;
  transform-origin: left center;
  transition: color .16s ease, transform .16s ease;
}

.sidebar .nav-link:hover {
  color: var(--text);
  transform: scale(1.025) !important;
}

.sidebar .nav-link.is-active {
  color: var(--text);
}

.sidebar .nav-link[aria-disabled="true"] {
  cursor: default;
  color: var(--muted);
  background: transparent;
  transform: none;
}

.sidebar .nav-link[aria-disabled="true"] .nav-icon {
  color: var(--muted);
  background: transparent;
}

.nav-icon {
  width: 30px;
  height: 22px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: transparent;
  font-size: 16px;
  font-weight: 760;
}

.nav-icon .sfs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

.nav-icon .sfs,
.btn .sfs,
.row-icon .sfs,
.card-icon .sfs {
  line-height: 1;
}

.sidebar-footer {
  margin-top: auto;
  min-height: 34px;
  padding: 5px 6px 5px 9px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 8px;
}

.footer-photo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #0a2540;
  color: #fff;
  font-size: 11px;
  font-weight: 760;
}

.footer-photo img,
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.footer-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
}

.footer-lock {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.footer-lock:hover {
  color: var(--accent);
  background: var(--accent-pale);
}

.footer-lock .sfs {
  font-size: 16px;
  line-height: 1;
}

.main {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  padding: 18px 18px 24px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}

body[data-theme="clair"] .main::after,
body[data-theme="sombre"] .main::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

body[data-theme="clair"] .main::after {
  background: rgb(255 255 255 / var(--content-veil-alpha));
}

body[data-theme="sombre"] .main::after {
  background: rgb(0 0 0 / var(--content-veil-alpha));
}

.topbar {
  z-index: 10;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  min-height: 44px;
  margin-bottom: 14px;
  padding: 8px 18px;
  background: transparent;
  position: relative;
}

.topbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -9999px;
  right: -9999px;
  background: rgba(246, 249, 252, .82);
  border-bottom: 1px solid var(--border-soft);
  backdrop-filter: blur(18px);
  z-index: -1;
}

#pages-admin {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}


.title-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.title {
  margin: 0;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #0a2540, var(--accent));
  font-size: 13px;
  font-weight: 760;
}

.panel {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .04), 0 2px 10px rgba(15, 23, 42, .08);
  backdrop-filter: blur(10px);
  padding: 10px;
}

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.page-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: 0;
}

.page-subtitle {
  margin: 0;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.btn-group {
  display: inline-flex;
  align-items: center;
}

.icon-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border: 1px solid var(--border);
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}

/* Icônes d'action de header : style plat/transparent générique (bouton +, engrenages, frais…) sur toutes les pages */
.toolbar .icon-btn {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
}

/* Survol générique des icônes d'action de header (bouton +, engrenages, etc.) : overlay adaptatif au thème */
.toolbar .icon-btn:hover {
  background: var(--hover-overlay);
  color: var(--text);
}

.icon-btn-primary {
  border-color: transparent;
  color: var(--accent-contrast);
  background: var(--accent);
}

.icon-btn:disabled {
  cursor: default;
  color: var(--muted);
  border-color: var(--border);
  background: var(--panel-soft);
  box-shadow: none;
}

.icon-btn .sfs {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.card {
  grid-column: span 4;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  text-decoration: none;
  color: var(--text);
}

.card:hover {
  border-color: var(--border);
  box-shadow: 0 16px 35px rgba(15, 23, 42, .08);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-pale);
  font-size: 18px;
}

.card-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 740;
}

.card-meta {
  color: var(--muted);
  font-size: 13px;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 12px;
  background: transparent;
  position: relative;
  z-index: 20;
}

.toolbar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -9999px;
  right: -9999px;
  background: rgba(255, 255, 255, .7);
  box-shadow: 0 1px 5px rgba(15, 23, 42, .08);
  z-index: -1;
}

body[data-theme="sombre"] .toolbar::before {
  background: rgb(30 33 42 / .7);
  box-shadow: 0 1px 6px rgb(0 0 0 / .35);
}

.toolbar > div:first-child {
  min-width: 0;
}

.toolbar-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.toolbar-heading .icon-wrapper {
  flex: 0 0 auto;
}

.admin-heading-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 38px;
  background: transparent;
  color: var(--accent);
  line-height: 1;
}

.admin-heading-icon .sfs {
  color: var(--accent) !important;
  display: block;
  font-size: 1.75rem !important;
  line-height: 1;
}

.toolbar-heading .text {
  min-width: 0;
}

.toolbar-heading .subtitle {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
  margin-top: 1px;
}

.toolbar .title {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* la recherche (repertoire) occupe l'espace disponible ;
   les actions / le compteur sont poussés a droite */
.toolbar .search {
  flex: 1 1 auto;
}

.toolbar .actions {
  margin-left: auto;
  flex: 0 0 auto;
}

.search {
  position: relative;
  min-width: 0;
}

.search input {
  box-sizing: border-box;
  width: 100%;
  height: 34px;
  padding: 0 42px 0 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
}

.search-input {
  min-height: 32px;
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--text);
  background: var(--panel);
  font: inherit;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(136, 6, 206, .11);
  outline: none;
}

.search button {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  color: var(--accent-contrast);
  background: var(--accent);
  display: grid;
  place-items: center;
}

.list {
  display: grid;
}

/* ============================================================
   TABLES = composant FRONT (front/components/table/ -> nc.css).
   admin2 ne contient AUCUN selecteur de table : il MAPPE seulement
   son theme sur les variables generiques --table-* du composant.
   Les largeurs minimales metier se posent via --table-min-width sur le wrapper.
   ============================================================ */
.admin-body {
  --table-bord: var(--border-soft);
  --table-fond: var(--table-scroll-bg, rgba(255, 255, 255, .72));
  --table-rayon: var(--radius);
  --table-lien: var(--accent);
  --table-survol: var(--accent-mist);
}



/* vo26.10.26 ligne de banque a justifier (debit, cote fournisseur) ; placee AVANT la regle du
   document pour que le vert l emporte des que le justificatif est arrive */
.table tbody tr.a-justifier td {
  background: var(--a-justifier-row-bg, #ffe0b2);
}

.table tbody tr.has-doc-upload td {
  background: var(--doc-upload-row-bg, #d4edda);
}

.row-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-pale);
  font-size: 13px;
  font-weight: 760;
}

.row-icon .sfs {
  font-size: 15px;
}

.row-title {
  display: block;
  min-width: 0;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-subtitle {
  min-width: 0;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  color: var(--text);
  background: var(--accent-pale);
  font-size: 12px;
  font-weight: 660;
}

main.login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 28px;
}

.form-field {
  display: grid;
  gap: 6px;
  margin-bottom: 13px;
}

.form-field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.form-field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--panel);
  color: var(--text);
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.login-message {
  min-height: 20px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.login-message[data-state="error"] {
  color: var(--danger);
}

.login-message[data-state="success"] {
  color: var(--success);
}

.empty {
  padding: 34px 18px;
  text-align: center;
  color: var(--muted);
}

.loading {
  padding: 28px;
  color: var(--muted);
}

@media (max-width: 900px) {
  /* La sidebar passe en overlay (gérée plus haut) ; on garde la mise en page
     pleine hauteur. Le contenu prend toute la largeur, retrait du menu via le WD. */
  .main {
    padding: 0 14px 18px;
  }

  .card {
    grid-column: span 12;
  }
}

body.admin-body .modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 19990;
  background: rgba(15, 23, 42, .28);
}

body.admin-body .modal-backdrop.fade { opacity: 0; }
body.admin-body .modal-backdrop.show { opacity: 1; }
body.admin-body.modal-open { overflow: hidden; }

.tabs {
  display: flex;
  gap: 4px;
  margin: 6px 0 16px;
  border-bottom: 1px solid var(--border-soft);
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 8px 14px;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 640;
  font-size: 13px;
  cursor: pointer;
}

.tab:hover { color: var(--text); }

.tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* liste a onglets : le panneau actif remplit la hauteur, son tableau scrolle */
.page-wisedyn.liste > .tabs { margin-top: 0; }
.page-wisedyn.liste > .tab-panel.is-active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.seg {
  display: inline-flex;
  padding: 2px;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
}

.seg-btn {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 5px 14px;
  border-radius: 6px;
  color: var(--muted);
  font: inherit;
  font-weight: 620;
  font-size: 13px;
  cursor: pointer;
}

.seg-btn.is-active {
  color: var(--accent-contrast);
  background: var(--accent);
}

/* Preferences de theme admin : controles reutilisables par les back-offices
   et les demos sans dependre d'une page metier. */
[data-prefs] {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 4px 20px;
}

.prefs-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.prefs-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.prefs-controls .prefs-row {
  margin-bottom: 0;
}

.prefs-range {
  width: 230px;
  max-width: 100%;
}

.prefs-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
}

.prefs-range .prefs-label {
  flex: 0 0 44px;
}

.prefs-range input[type="range"] {
  flex: 1 1 auto;
  min-width: 120px;
  accent-color: var(--accent);
}

.range-value {
  flex: 0 0 42px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 620;
  text-align: right;
}

.fonds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.fond {
  aspect-ratio: 16 / 10;
  border: 0;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-color: var(--panel);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  transition: transform .12s ease, box-shadow .12s ease;
}

.fond:hover { transform: translateY(-2px); }

.fond.is-active {
  box-shadow: 0 0 0 3px var(--accent);
}

.fond-aucun {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-image: none;
  background-color: var(--panel);
  color: var(--accent);
  font-size: 12px;
  font-weight: 640;
}

.fond-aucun .sfs {
  font-size: 20px;
}

/* ===== Page en cours de migration (stub) ===== */
.stub-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  padding: 48px 28px;
  color: var(--muted);
}

.stub-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 30px;
}

.stub-title {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 740;
}

.stub-panel p {
  margin: 0;
  max-width: 420px;
  font-size: 13px;
}

/* accent flatpickr */
.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--accent);
  border-color: var(--accent);
}

.flatpickr-day.today {
  border-color: var(--accent);
}

/* ============================================================
   Fiche plein cadre : recouvre la liste dans la zone de contenu.
   La section liste doit etre position:relative.
   ============================================================ */
.fiche-panel {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: none;
  flex-direction: column;
  background: var(--table-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .12);
}

.fiche-panel.is-open {
  display: flex;
}

.fiche-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.fiche-icone {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
  font-size: 17px;
}

.fiche-titre {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 16px;
  font-weight: 740;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fiche-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.fiche-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px 28px;
}

/* onglets internes de fiche (reutilise .tabs/.tab/.tab-panel) */
.fiche-body .tabs {
  margin-bottom: 16px;
}

/* bouton plein (Enregistrer) et danger (Supprimer) */
.btn-fiche {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 7px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.btn-fiche-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-fiche-danger {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}

.btn-fiche-danger:hover {
  filter: brightness(.93);
}

.fiche-fermer {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.fiche-fermer:hover {
  background: var(--accent-pale);
  color: var(--text);
}

/* lignes de liste ouvrables (interaction admin2, pas du style de table) */
.dbl-lien,
.lien {
  cursor: pointer;
}

/* --- shim utilitaires Bootstrap utilisés par le markup hérité --- */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
@media (min-width: 768px) { .d-md-inline { display: inline !important; } .d-md-block { display: block !important; } }
@media (min-width: 992px) { .d-lg-inline { display: inline !important; } }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-grow-1 { flex: 1 1 auto !important; }
.align-items-center { align-items: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-end { justify-content: flex-end !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.fw-bold { font-weight: 700 !important; }
.fw-normal { font-weight: 400 !important; }
.text-info { color: #2b8fb3 !important; }
.text-danger { color: #e5484d !important; }
.text-success { color: #2e9e5b !important; }
.text-warning { color: #c98a1b !important; }
.text-muted { color: var(--muted) !important; }
.color-white { color: #fff !important; }
.small { font-size: .85em; }
.fs-3 { font-size: 1.4rem; }
.fs-4 { font-size: 1.15rem; }
.fs-7 { font-size: .78rem; }
.ms-1 { margin-left: .25rem; } .ms-2 { margin-left: .5rem; } .ms-3 { margin-left: 1rem; }
.me-1 { margin-right: .25rem; } .me-2 { margin-right: .5rem; } .me-3 { margin-right: 1rem; } .me-6 { margin-right: 1.5rem; }
.mt-1 { margin-top: .25rem; } .mt-3 { margin-top: 1rem; } .mb-1 { margin-bottom: .25rem; } .mb-3 { margin-bottom: 1rem; }
.mn-1 { margin: 0 .25rem; }
.py-5 { padding-top: 1.4rem; padding-bottom: 1.4rem; }
.pb-5 { padding-bottom: 1.6rem; } .pt-1 { padding-top: .25rem; } .px-3 { padding-left: 1rem; padding-right: 1rem; } .p-2 { padding: .5rem; }
.padding-sm { padding: .5rem; }
.clearfix::after { content: ""; display: block; clear: both; }
.spin { animation: a2-spin 1s linear infinite; }
@keyframes a2-spin { to { transform: rotate(360deg); } }

/* --- panneau liste plein cadre (root .page-wisedyn.liste) --- */
#pages-admin { position: relative; }

.page-wisedyn {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  will-change: auto;
}
.page-wisedyn.liste { flex: 1 1 auto; }

/* Page avec toolbar : remonte l'entête en annulant les paddings/marges au-dessus */
.main .page-wisedyn:has(> .toolbar) {
  margin-top: -18px; /* = padding-top de .main : affleure le bord sans déborder du cadre */
}

/* wrappers internes des fiches : transparents, remplissent la hauteur */
.fiche-cell,
.fiche-box,
.fiche-article,
.fiche,
.fiche-list,
.fiche-fill {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.editable-box {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: 20px;
  vertical-align: middle;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color .12s ease, color .12s ease;
}

.editable-box:not(.editing):hover {
  background: color-mix(in srgb, var(--accent-pale) 72%, transparent);
}

.editable-box:not(.editing)::after {
  content: "\270e";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  color: var(--accent);
  font-size: 11px;
  line-height: 1;
  opacity: 0;
  transform: scale(.86);
  transition: opacity .12s ease, transform .12s ease;
}

.editable-box:not(.editing):hover::after {
  opacity: .8;
  transform: scale(1);
}

.editable-box .badge,
.editable-box .static-avatar {
  flex: 0 0 auto;
}

#inline-editor-container {
  border-radius: 7px;
  color: var(--text);
}

#inline-editor-container.texte {
  background: transparent;
  box-shadow: none;
}

#inline-editor-container.badge,
#inline-editor-container.avatar {
  padding: 6px;
  background: var(--panel);
  border: 1px solid var(--border-soft);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}

#inline-editor-container .form-edit-box {
  margin: 0;
  width: 100%;
}

#inline-editor-container .form-edit-box input.form-control,
#inline-editor-container .form-edit-box select.form-select,
#inline-editor-container .form-edit-box textarea.form-control {
  height: 24px;
  min-height: 24px;
  margin: 0;
  padding: 0 .45rem;
  border-color: var(--input-border, var(--border-soft));
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

#inline-editor-container .form-edit-box textarea.form-control {
  height: auto;
  min-height: 84px;
  padding-top: .35rem;
  padding-bottom: .35rem;
}

#inline-editor-container .form-edit-box select.form-select {
  padding-right: 1.5rem;
}

#inline-editor-container .inline-editor-ok {
  width: 28px;
  min-width: 28px;
  height: 24px;
  min-height: 24px;
  padding: 0;
}

#inline-editor-container .form-edit-box .li {
  cursor: pointer;
}

#inline-editor-container .form-edit-box .li + .li {
  margin-top: 3px;
}

#inline-editor-container .form-edit-box .li.active {
  filter: saturate(1.05);
}

.table.no-hover tbody td {
  min-height: 32px;
  vertical-align: middle;
}

.table.no-hover tbody tr {
  height: 32px;
}

/* --- pile de fiches générées par modules/fiches.4dweb --- */
.page-wisedyn.page {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  bottom: auto;
  z-index: 50;
  max-height: 100%;
  background: var(--table-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 6px 30px rgba(0, 0, 0, .14);
}

/* --- banner (en-tête liste & fiche) --- */
.banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  flex: 0 0 auto;
}
.banner .header-content { display: flex; align-items: center; gap: 11px; flex: 1 1 auto; min-width: 0; order: -1; }
.banner .icon-wrapper { flex: 0 0 auto; }
.banner .icone {
  width: 38px; height: 38px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--accent-contrast);
}
.banner .icone.dg-violet { background: var(--accent); }
.banner .icone[class*="dg-"] {
  background: transparent;
  color: var(--accent);
}
.banner .icone[class*="dg-"] .sfs {
  color: var(--accent) !important;
}
.banner .text { min-width: 0; }
.banner .heading { font-size: 16px; font-weight: 740; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.banner .description { font-size: 12px; color: var(--muted); }
.banner .secondary-action { display: flex; align-items: center; gap: 8px; margin-left: auto; order: 2; }
.banner .primary-action { order: 3; }

.icon-button, .unstyled-button {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-button:hover { background: var(--accent-pale); color: var(--text); }

/* contenu scrollable de fiche */
.content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.fiche .fiche-content-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* --- onglets hérités (nav / nav-tabs / nav-tab1 / nav-tab2) --- */
.nav-tabs, .nav-tabs-simple, .nav.nav-tab1, .nav.nav-tab2 {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  border-bottom: 0;
}
.nav-tabs::after,
.nav-tabs-simple::after,
.nav.nav-tab1::after,
.nav.nav-tab2::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--primary);
  opacity: .3;
  pointer-events: none;
}
.nav-item { list-style: none; }
.nav-link {
  appearance: none;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent;
  padding: 8px 13px; margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted); font: inherit; font-weight: 640; font-size: 13px; cursor: pointer;
}
.nav-link:hover { color: var(--text); }
.nav-link.active {
  color: var(--text);
  border-bottom-color: transparent;
  box-shadow: inset 0 -2px 0 var(--accent);
}
.tab-content { flex: 1 1 auto; min-height: 0; }
.tab-pane { display: none; }
.tab-pane.active, .tab-pane.show.active { display: block; }
.tab-pane.fade { transition: opacity .15s; }


/* --- badges Site/Manifestation --- */
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 999px;
  font-size: 11px; font-weight: 700; line-height: 1.5;
  background: var(--accent-pale); color: var(--accent);
}
.badge-info { background: rgba(43, 143, 179, .15); color: #2b8fb3; }
.badge-success { background: rgba(46, 158, 91, .15); color: #2e9e5b; }
.badge-primary { background: var(--accent-pale); color: var(--accent); }
.badge-warning { background: rgba(201, 138, 27, .16); color: #c98a1b; }

/* --- drag / poignée / paragraphes (colonne CMS de la fiche) --- */
.poignee { cursor: grab; color: var(--muted); }
.poignee:active { cursor: grabbing; }
.drag { /* ligne/bloc déplaçable */ }
.sortable-ghost { opacity: .45; }

/* --- libellés de section & champs hérités résiduels --- */
.bloc { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; margin: 14px 0 8px; }
.label-titre { display: block; }
.label-reference { font-size: 12px; color: var(--muted); }

/* toolbar filtre/export des tables : input + bouton compacts, calés à droite */
.input-xs {
  box-sizing: border-box;
  height: 28px;
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  font: inherit;
  font-size: 12px;
}
.input-xs:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-pale); }

.btn-label-responsive {
  display: inline;
}
@media (max-width: 1023.98px) {
  .btn-label-responsive {
    display: none;
  }
}

.filtrer {
  max-width: 190px;
  margin: 5px 6px;
}

/* la barre filtre/export : un peu d'air autour */
.table-toolbar-right {
  margin: 4px 0 8px;
  padding: 0 6px;
}

/* list-group (sous-listes héritées) */
.list-group-item {
  display: block; padding: 8px 11px; border: 1px solid var(--border-soft);
  border-bottom: 0; background: var(--panel); color: var(--text);
}
.list-group-item:last-child { border-bottom: 1px solid var(--border-soft); }
.list-group-item-action { cursor: pointer; }
.list-group-item-action:hover { background: var(--accent-pale); }

/* message de verrouillage */
.lock-msg { font-weight: 500; font-size: .82em; color: var(--muted); }

/* ============================================================
   Modales Bootstrap (params-site, etc.) — CACHEES par defaut.
   Bootstrap CSS n'est pas charge en admin2 : sans cette regle, un
   <div class="modal fade"> rendu inline reste dans le flux et occupe
   la hauteur (ex: 915px), ecrasant la liste. On reproduit le comportement
   Bootstrap : modale hors-flux (fixed), cachee tant que pas .show.
   ============================================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1050;
  overflow-y: auto;
}

.modal.show,
.modal.in {
  display: block;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, .5);
}

.modal-dialog {
  position: relative;
  margin: 4vh auto;
  max-width: 540px;
}

/* Tailles de modale. Bootstrap n'etant pas charge ici, .modal-lg / .modal-xl
   n'existaient que scopees a .redactionnels : ailleurs elles restaient sans effet
   et toutes les modales gardaient les 540px par defaut. */
.modal-dialog.modal-sm { max-width: 380px; }
.modal-dialog.modal-lg { max-width: 960px; }
.modal-dialog.modal-xl { max-width: 1180px; }

@media (max-width: 1200px) {
  .modal-dialog.modal-xl { max-width: 94vw; }
}
@media (max-width: 992px) {
  .modal-dialog.modal-lg { max-width: 94vw; }
}

.modal-content {
  display: flex;
  flex-direction: column;
  /* Fond de modal plus opaque que --panel (lisible par-dessus un fond d'écran) + verre dépoli */
  background: var(--modal-bg, var(--panel));
  backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
  overflow: hidden;
}

/* En-tete / pied / croix : regles GENERIQUES (les .redactionnels .modal-* ne
   s'appliquent plus une fois le modal deplace dans <body> par moveModalToBody). */
.modal-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-soft);
}
.modal-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-soft);
}
.modal-title {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 740;
}
.modal-header .btn-close {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
}
.modal-header .btn-close::before { content: "\00d7"; font-size: 22px; }
.modal-header .btn-close:hover { background: var(--accent-pale); color: var(--text); }

/* (Le design des tables Rédactionnels vient desormais du composant front
   front/components/table/ — plus aucun selecteur de table ici.) */


/* Filtres en .form-floating (ex. recherche banque) : nc.css donne au <select> un
   margin-bottom que l'<input> n'a pas, ce qui le decale verticalement dans une
   rangee align-items:center. On l'annule pour aligner select et input. */
.form-floating > select.form-select,
.form-floating > select.form-control {
  margin-bottom: 0;
}

.modal-body {
  padding: 16px;
  overflow: auto;
}

/* ===== Compat composants génériques (pages migrées : seo, parefeu, logs, exim, ovh…) ===== */
.card-body { padding: 12px 14px; }
.alert {
  display: block;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border-soft, rgba(0, 0, 0, .08));
  border-radius: var(--radius);
  background: var(--panel);
  font-size: 13px;
}
.alert .sfs { margin-right: 6px; }
.alert-info { border-color: color-mix(in srgb, var(--info, #0ea5e9) 35%, transparent); background: color-mix(in srgb, var(--info, #0ea5e9) 8%, var(--panel)); }
.alert-warning { border-color: color-mix(in srgb, var(--warning, #f59e0b) 35%, transparent); background: color-mix(in srgb, var(--warning, #f59e0b) 8%, var(--panel)); }
.alert-danger { border-color: color-mix(in srgb, var(--danger, #dc2626) 35%, transparent); background: color-mix(in srgb, var(--danger, #dc2626) 8%, var(--panel)); }
.alert-success { border-color: color-mix(in srgb, var(--success, #16a34a) 35%, transparent); background: color-mix(in srgb, var(--success, #16a34a) 8%, var(--panel)); }
.btn-border {
  font-size: .7rem;
  font-weight: 700;
  padding: .01rem .55rem;
  border: 1px solid gray;
  border-radius: 3px;
  margin-right: .2rem;
}
.table-responsive { width: 100%; overflow-x: auto; }
.spinner-border {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  border: .2em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: admin-spin .75s linear infinite;
}
.spinner-border.spinner-border-sm { width: 1rem; height: 1rem; }
@keyframes admin-spin { to { transform: rotate(360deg); } }

/* ===== Standard pages : cards de contenu (fond blanc 90% + ombre, JAMAIS de border, zoom au survol) ===== */
.page-wisedyn .card {
  grid-column: auto;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: rgb(255 255 255 / .9);
  box-shadow: 0 1rem 1.75rem rgb(45 55 75 / .1);
  transition: transform .18s ease, box-shadow .18s ease;
}
.page-wisedyn .card:hover {
  border: 0;
  transform: scale(1.02);
  box-shadow: 0 1.25rem 2.2rem rgb(45 55 75 / .16);
}
body[data-theme="sombre"] .page-wisedyn .card { background: rgb(32 35 44 / .9); }
.page-wisedyn .card .card-header {
  padding: 10px 14px 0;
  border: 0;
  background: transparent;
  font-weight: 700;
}
.page-wisedyn .card .card-title { padding: 0; }

/* Cadre transparent autour des zones de cards : un bon padding pour que le zoom (scale)
   et l'ombre portée ne soient pas tronqués par les conteneurs scrollables, et annulation
   des marges négatives du .row (nc) qui collent les cards aux bords. */
.page-wisedyn .row:has(.card) {
  margin: 0;
  padding: 12px 22px 30px;
}
.page-wisedyn .tab-pane:has(.card),
.page-wisedyn .tab-content:has(.card) {
  overflow: visible;
}

/* Bande filtre/export des tables : masquée par défaut, basculée par clic sur le thead
   (double-clic sur les entêtes triables). Voir tables.js ensureToolbarToggle().
   Repli animé : max-height + opacité + glissement court (display:none n'est pas animable). */
[data-table-toolbar] {
  overflow: hidden;
  max-height: 5rem;
  opacity: 1;
  transform: translateY(0);
  transition: max-height .18s ease, opacity .14s ease, transform .18s ease, margin-bottom .18s ease;
}
.table-toolbar-cachee {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(-4px);
  margin-bottom: 0 !important;
  pointer-events: none;
}
table[data-filter] thead th:not(.pointer),
table[data-export] thead th:not(.pointer) { cursor: pointer; }

/* Indicateurs de tri des colonnes — générique, partout où le tri est activé :
   les moteurs (tables.js .table-sort et liste() de navigation.js) posent .pointer
   sur les th triables et .asc/.desc sur la colonne triée. */
.table thead th.pointer::after {
  content: "\2195";              /* ↕ : triable, visible au survol */
  display: inline-block;
  margin-left: .35em;
  font-size: .85em;
  line-height: 1;
  opacity: 0;
  transition: opacity .12s ease;
}
.table thead th.pointer:hover::after { opacity: .45; }
.table thead th.pointer.asc::after,
.table thead th.asc::after  { content: "\2191"; opacity: 1; }   /* ↑ */
.table thead th.pointer.desc::after,
.table thead th.desc::after { content: "\2193"; opacity: 1; }   /* ↓ */
.table thead th.asc,
.table thead th.desc { color: var(--accent, inherit); }

/* Séparateur entre les couleurs du site (en tête) et la palette Quill par défaut */
.quill-editor-wrapper .ql-toolbar.ql-snow .ql-picker-options .ql-color-site-sep {
  display: block;
  width: 100%;
  height: 0;
  margin: 4px 1px 3px;
  border-top: 1px solid rgba(0, 0, 0, 0.18);
}

/* Couleurs du site sous les champs couleur (champs/var) — même source que la palette Quill */
.champ-color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.champ-color-swatch {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid rgb(0 0 0 / .18);
  border-radius: 4px;
  cursor: pointer;
  transition: transform .1s ease;
}

.champ-color-swatch:hover {
  transform: scale(1.18);
}
