/* ============================================================
   ADMINISTRATION — tableau de bord + menu latéral (tiroir à gauche)
   Chargé uniquement par admin.html (aucun effet sur les autres pages).
   Les styles des tableaux, filtres, badges et pop-ups sont conservés.
   ============================================================ */

.adm {
  --adm-texte: #3f343d;
  --adm-muted: #8a7d87;
  --adm-ligne: #efe6ec;
  --adm-alerte: #b03a3a;
  --adm-alerte-bg: #fbebe9;
  /* Corail (charte Travers) : actions principales et accents de l'administration. */
  --adm-corail: #e06b4f;
  --adm-corail-btn: #cf5d42;
  --adm-corail-fonce: #b84d34;
  --adm-corail-pale: #fdece6;
  --adm-bar-h: 3.75rem;
  --adm-drawer-w: 18.5rem;
  --adm-ombre: 0 .125rem 1.125rem rgba(74,32,80,.04);
}
.adm [hidden] { display: none !important; }
body.adm { background: var(--wsh-bg-page); color: var(--adm-texte); }
body.adm.adm-menu-ouvert { overflow: hidden; }

/* --- Accès rapide au contenu (clavier) ----------------------- */
.adm-skip {
  position: absolute; left: -62.5rem; top: .5rem; z-index: 200;
  padding: .5rem .875rem; border-radius: .5rem; background: #fff; color: var(--wsh-primary);
  font-size: .8125rem; font-weight: 600; box-shadow: 0 .25rem 1rem rgba(74,32,80,.2);
}
.adm-skip:focus { left: .75rem; }

/* --- Barre du haut : bouton menu à gauche + section courante -- */
.adm-bar {
  position: sticky; top: 0; z-index: 60;
  display: flex; align-items: center; gap: .875rem;
  height: var(--adm-bar-h); padding: 0 1.125rem;
  background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(.5rem); backdrop-filter: blur(.5rem);
  border-bottom: .0625rem solid var(--wsh-border-soft);
}
.adm-menu-btn {
  position: relative; flex: none; width: 2.5rem; height: 2.5rem; padding: 0;
  display: grid; place-items: center;
  border: .0625rem solid var(--wsh-border); border-radius: .75rem; background: #fff; color: var(--wsh-primary);
  cursor: pointer; transition: background .15s ease, border-color .15s ease;
}
.adm-menu-btn:hover { background: var(--wsh-bg-soft); border-color: var(--wsh-primary-light); }
.adm-menu-btn svg { width: 1.25rem; height: 1.25rem; }
.adm-menu-dot {
  position: absolute; top: -.375rem; right: -.375rem;
  min-width: 1.125rem; height: 1.125rem; padding: 0 .3125rem; border-radius: 62.4375rem;
  display: grid; place-items: center;
  background: var(--adm-alerte); color: #fff; font-size: .625rem; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 .125rem #fff;
}
.adm-bar-titres { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.adm-bar-sur { font-size: .65625rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--adm-muted); }
.adm-bar-titres h1 {
  margin: .0625rem 0 0; color: var(--wsh-primary); font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-bar-droite { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.adm-maj-info { font-size: .75rem; color: var(--adm-muted); white-space: nowrap; }

/* --- Fond assombri + tiroir ---------------------------------- */
.adm-scrim {
  position: fixed; inset: 0; z-index: 70; background: rgba(40,18,44,.42);
  opacity: 0; visibility: hidden; transition: opacity .2s ease, visibility 0s linear .2s;
}
.adm-scrim.is-open { opacity: 1; visibility: visible; transition: opacity .2s ease, visibility 0s; }

.adm-drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 80;
  width: min(var(--adm-drawer-w), 88vw);
  display: flex; flex-direction: column; background: #fff;
  box-shadow: .5rem 0 2rem rgba(74,32,80,.18);
  transform: translateX(-102%); visibility: hidden;
  transition: transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s linear .24s;
}
.adm-drawer.is-open { transform: none; visibility: visible; transition: transform .24s cubic-bezier(.2,.8,.2,1), visibility 0s; }


.adm-drawer-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  height: var(--adm-bar-h); padding: 0 1.25rem 0 .75rem; border-bottom: .0625rem solid var(--wsh-border-soft);
}
.adm-drawer-brand { display: inline-flex; align-items: center; }
.adm-drawer-logo { display: block; height: 2.875rem; width: auto; }
.adm-icon-plain {
  width: 2.25rem; height: 2.25rem; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: .625rem; background: none; color: #766970; cursor: pointer;
}
.adm-icon-plain:hover { background: var(--wsh-bg-soft); color: var(--wsh-primary); }
.adm-icon-plain svg { width: 1.25rem; height: 1.25rem; }

.adm-nav { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: .75rem .75rem 1rem; }
.adm-nav-groupe {
  margin: 1.125rem .75rem .375rem; font-size: .65625rem; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase; color: var(--adm-muted);
}
.adm-nav-item {
  position: relative; display: flex; align-items: center; gap: .75rem; width: 100%;
  min-height: 2.75rem; padding: .5rem .75rem; margin: 0 0 .125rem;
  border: 0; border-radius: .75rem; background: none; text-align: left;
  font: inherit; font-size: .875rem; font-weight: 500; color: #5a4d57; text-decoration: none; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.adm-nav-item svg { width: 1.125rem; height: 1.125rem; flex: none; }
.adm-nav-lib { flex: 1 1 auto; min-width: 0; }
.adm-nav-item:hover { background: var(--wsh-bg-soft); color: var(--wsh-primary); }
.adm-nav-item.is-active { background: var(--wsh-bg-soft); color: var(--wsh-primary); font-weight: 600; }
.adm-nav-item.is-active::before {
  content: ''; position: absolute; left: -.75rem; top: .625rem; bottom: .625rem; width: .25rem;
  border-radius: 0 .25rem .25rem 0; background: var(--adm-corail);
}
.adm-nav-item .adm-tab-badge { margin-left: auto; }
.adm-nav-item svg.adm-nav-ext { width: .8125rem; height: .8125rem; opacity: .4; }
.adm-nav-item-lien:hover svg.adm-nav-ext { opacity: .75; }
.adm-drawer-foot {
  flex: none; padding: .75rem .75rem calc(.75rem + env(safe-area-inset-bottom, 0px));
  border-top: .0625rem solid var(--wsh-border-soft);
}
.adm-nav-logout:hover { background: var(--wsh-red-bg); color: var(--wsh-red); }

/* --- Zone de contenu ----------------------------------------- */
.adm-main { max-width: 88.75rem; margin: 0 auto; padding: 1.25rem 1.125rem 4.5rem; outline: none; }
.adm-main:focus-visible { outline: none; }
.adm-panel:not([hidden]) { animation: adm-entree .18s ease; }
@keyframes adm-entree { from { opacity: 0; transform: translateY(.25rem); } to { opacity: 1; transform: none; } }

/* --- Boutons ------------------------------------------------ */
.adm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4375rem;
  min-height: 2.375rem; padding: .5rem .875rem; border-radius: .625rem;
  font: inherit; font-size: .78125rem; font-weight: 600; white-space: nowrap;
  cursor: pointer; text-decoration: none; border: .0625rem solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.adm-btn svg { width: .9375rem; height: .9375rem; flex-shrink: 0; }
.adm-btn:disabled { opacity: .55; cursor: default; }
.adm-btn-primary { background: var(--adm-corail-btn); color: #fff; }
.adm-btn-primary:hover:not(:disabled) { background: var(--adm-corail-fonce); }
.adm-btn-ghost { background: #fff; color: var(--wsh-primary); border-color: var(--wsh-border); }
.adm-btn-ghost:hover:not(:disabled) { background: var(--wsh-bg-soft); }
.adm-btn-ghost.is-active { background: var(--wsh-bg-soft); border-color: var(--wsh-primary-light); }
.adm-btn-danger-ghost { background: #fff; color: var(--wsh-red); border-color: #efc6c2; }
.adm-btn-danger-ghost:hover:not(:disabled) { background: var(--wsh-red-bg); }
.adm-btn.is-en-cours svg { animation: adm-tourne 0.9s linear infinite; }
@keyframes adm-tourne { to { transform: rotate(360deg); } }
.adm-btn:focus-visible, .adm-seg-btn:focus-visible, .adm-chip:focus-visible,
.adm-link:focus-visible, .adm-icon-btn:focus-visible, .adm-sort:focus-visible {
  outline: .125rem solid var(--wsh-primary-light); outline-offset: .125rem;
}
.adm-dot { width: .4375rem; height: .4375rem; border-radius: 50%; background: var(--adm-alerte); margin-left: .125rem; }

/* --- Pastille de compteur (menu) ------------------------------ */
.adm-tab-badge {
  min-width: 1.25rem; height: 1.25rem; padding: 0 .375rem; border-radius: 62.4375rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .6875rem; font-weight: 700; line-height: 1;
  background: var(--wsh-bg-soft); color: var(--wsh-primary);
}
.adm-tab-badge.is-alerte { background: var(--adm-alerte); color: #fff; }

/* --- Tableau de bord ------------------------------------------ */
.adm-panel.adm-dash {
  display: flex; flex-direction: column; gap: 1.75rem;
  background: none; border: 0; border-radius: 0; box-shadow: none;
}
.adm-dash-date { margin: 0; font-size: .78125rem; color: var(--adm-muted); }
.adm-dash-resume { margin: .1875rem 0 0; font-size: 1.625rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; color: var(--wsh-primary); }
.adm-dash-titre { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #766970; }

.adm-todo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr)); gap: .75rem; }
.adm-todo-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .375rem;
  padding: 1rem 1.125rem 1.0625rem; text-align: left; font: inherit; cursor: pointer;
  background: #fff; border: .0625rem solid var(--wsh-border-soft); border-radius: 1rem; box-shadow: var(--adm-ombre);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.adm-todo-card:hover { transform: translateY(-.0625rem); border-color: var(--wsh-primary-light); box-shadow: 0 .375rem 1.25rem rgba(74,32,80,.1); }
.adm-todo-ico {
  position: absolute; top: .875rem; right: .875rem; width: 2rem; height: 2rem; border-radius: .625rem;
  display: grid; place-items: center; background: var(--wsh-bg-soft); color: var(--wsh-primary-light);
}
.adm-todo-ico svg { width: 1rem; height: 1rem; }
.adm-todo-n { font-size: 2.125rem; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; color: #b9aeb6; }
.adm-todo-lib { font-size: .8125rem; line-height: 1.3; color: #6f646b; }
.adm-todo-card.is-alerte { border-color: #f3cfc2; }
.adm-todo-card.is-alerte .adm-todo-n { color: var(--adm-alerte); }
.adm-todo-card.is-alerte .adm-todo-ico { background: var(--adm-alerte-bg); color: var(--adm-alerte); }

.adm-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(12.5rem, 1fr)); gap: .75rem; }
.adm-kpi {
  display: block; padding: 1rem 1.125rem; color: inherit; text-decoration: none;
  background: #fff; border: .0625rem solid var(--wsh-border-soft); border-radius: 1rem; box-shadow: var(--adm-ombre);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.adm-kpi:hover { border-color: var(--wsh-primary-light); box-shadow: 0 .375rem 1.25rem rgba(74,32,80,.1); }
.adm-kpi-lib { display: block; font-size: .75rem; color: var(--adm-muted); }
.adm-kpi-val { display: block; margin-top: .375rem; font-size: 1.625rem; font-weight: 600; line-height: 1.1; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-kpi-sub { display: block; margin-top: .3125rem; font-size: .75rem; color: var(--adm-muted); }

.adm-dash-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .75rem; }
.adm-card { padding: 1.125rem 1.25rem 1.25rem; background: #fff; border: .0625rem solid var(--wsh-border-soft); border-radius: 1rem; box-shadow: var(--adm-ombre); }
.adm-card-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.adm-card-head .adm-dash-titre { margin: 0; }
.adm-card-head .adm-link { font-size: .78125rem; }

.adm-card-chart { display: flex; flex-direction: column; }
.adm-chart { flex: 1 1 auto; display: flex; align-items: stretch; gap: .375rem; min-height: 11rem; }
.adm-chart-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: .25rem; }
.adm-chart-val { white-space: nowrap; min-height: .875rem; font-size: .6875rem; font-weight: 600; line-height: 1; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-chart-zone { position: relative; flex: 1 1 auto; width: 100%; }
.adm-chart-bar {
  position: absolute; left: 0; right: 0; bottom: 0; min-height: .1875rem;
  border-radius: .375rem .375rem .125rem .125rem; background: #5d285f; opacity: 1;
  transition: height .3s ease;
}
.adm-chart-col.is-vide .adm-chart-bar { background: var(--adm-ligne); opacity: 1; }
/* Période en cours (jour, semaine, mois) : corail hachuré + contour pointillé, encore incomplète. */
.adm-chart-col.is-aujourdhui .adm-chart-bar {
  opacity: 1; background-color: var(--adm-corail-pale);
  background-image: repeating-linear-gradient(135deg, rgba(224,107,79,.38) 0 .25rem, transparent .25rem .5rem);
  border: .125rem dashed var(--adm-corail);
}
.adm-chart-col.is-aujourdhui .adm-chart-val { color: var(--adm-corail-fonce); }
.adm-chart-lbl { font-size: .6875rem; line-height: 1; color: var(--adm-muted); }
.adm-chart-col.is-weekend .adm-chart-lbl { opacity: .55; }
.adm-chart-col.is-aujourdhui .adm-chart-lbl { color: var(--adm-corail-fonce); font-weight: 700; }
.adm-chart-note { margin: .75rem 0 0; font-size: .75rem; color: var(--adm-muted); }

.adm-recent-list { list-style: none; margin: 0; padding: 0; }
.adm-recent {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .75rem .25rem; color: inherit; text-decoration: none; border-bottom: .0625rem solid var(--adm-ligne);
}
.adm-recent-list li:last-child .adm-recent { border-bottom: 0; padding-bottom: 0; }
.adm-recent:hover .adm-recent-nom { color: var(--wsh-primary); }
.adm-recent-main { min-width: 0; }
.adm-recent-nom { display: block; font-size: .8125rem; font-weight: 600; color: #3a2f38; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-recent-sub { display: block; margin-top: .125rem; font-size: .71875rem; color: var(--adm-muted); }
.adm-recent-droite { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: .3125rem; }
.adm-recent-montant { font-size: .8125rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-recent-vide { padding: 1.75rem .5rem; text-align: center; font-size: .8125rem; color: var(--adm-muted); }

.adm-shortcuts { display: flex; flex-wrap: wrap; gap: .625rem; }
.adm-shortcut {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: .5rem 1.0625rem;
  background: #fff; border: .0625rem solid var(--wsh-border); border-radius: .75rem;
  font: inherit; font-size: .8125rem; font-weight: 600; color: var(--wsh-primary); text-decoration: none; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.adm-shortcut:hover { background: var(--wsh-bg-soft); border-color: var(--wsh-primary-light); }
.adm-shortcut svg { width: 1rem; height: 1rem; flex: none; }

.adm-bar-refresh { min-height: 2.5rem; }
.adm-bar-home { width: 2.5rem; min-height: 2.5rem; padding: 0; }
.adm-bar-home svg { width: 1.0625rem; height: 1.0625rem; }
.adm-auteur { white-space: nowrap; }
.adm-bar-home:focus-visible, .adm-menu-btn:focus-visible, .adm-nav-item:focus-visible, .adm-icon-plain:focus-visible, .adm-todo-card:focus-visible,
.adm-kpi:focus-visible, .adm-shortcut:focus-visible, .adm-recent:focus-visible {
  outline: .125rem solid var(--wsh-primary-light); outline-offset: .125rem;
}

/* --- Panneau ------------------------------------------------ */
.adm-panel {
  background: #fff; border: .0625rem solid var(--wsh-border-soft);
  border-radius: 1rem; box-shadow: var(--adm-ombre);
}

.adm-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  padding: 1rem 1.125rem;
}
.adm-toolbar-droite { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.adm-toolbar-gauche { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }

/* Menu déroulant personnalisé (réponse client des devis) */
.adm-dd { position: relative; display: inline-block; }
.adm-dd-natif { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; overflow: hidden; }
.adm-dd-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  min-height: 2.375rem; padding: 0 .625rem 0 .875rem;
  border: .0625rem solid var(--wsh-border); border-radius: .625rem; background: #fff;
  font: inherit; font-size: .78125rem; color: var(--wsh-primary); cursor: pointer; white-space: nowrap;
}
.adm-dd-btn:hover { border-color: var(--wsh-primary-light); }
.adm-dd-btn:focus-visible, .adm-dd.is-open .adm-dd-btn { outline: none; border-color: var(--wsh-primary-light); box-shadow: 0 0 0 .125rem rgba(122,74,127,.18); }
.adm-dd-titre { font-size: .75rem; color: var(--adm-muted); }
.adm-dd-valeur { font-weight: 600; }
.adm-dd-chevron { width: .875rem; height: .875rem; transition: transform .15s ease; }
.adm-dd.is-open .adm-dd-chevron { transform: rotate(180deg); }
.adm-dd-liste {
  position: absolute; right: 0; top: calc(100% + .375rem); z-index: 40;
  min-width: 100%; max-width: calc(100vw - 2rem); margin: 0; padding: .3125rem; list-style: none;
  background: #fff; border: .0625rem solid var(--wsh-border-soft); border-radius: .875rem;
  box-shadow: 0 .5rem 1.5rem rgba(74,32,80,.16);
}
.adm-dd-liste[hidden] { display: none; }
.adm-dd-option {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .5rem .625rem; border-radius: .5625rem;
  font-size: .78125rem; color: var(--adm-texte); cursor: pointer; white-space: nowrap;
}
.adm-dd-option:hover, .adm-dd-option.is-focus { background: var(--wsh-bg-soft); }
.adm-dd-option[aria-selected="true"] { color: var(--wsh-primary); font-weight: 600; }
.adm-dd-option[aria-selected="true"]::after {
  content: ''; width: .875rem; height: .875rem; flex: none; background: currentColor;
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%);
}

/* Sélecteur segmenté (statut) */
.adm-seg { display: inline-flex; padding: .1875rem; background: var(--wsh-bg-soft); border-radius: .75rem; gap: .125rem; }
.adm-seg-btn {
  display: inline-flex; align-items: center; gap: .4375rem;
  padding: .4375rem .8125rem; border: 0; border-radius: .5625rem; background: transparent;
  font: inherit; font-size: .78125rem; font-weight: 500; color: var(--wsh-primary-light); cursor: pointer; white-space: nowrap;
}
.adm-seg-btn span { font-size: .6875rem; font-weight: 700; color: var(--adm-muted); font-variant-numeric: tabular-nums; }
.adm-seg-btn:hover { color: var(--wsh-primary); }
.adm-seg-btn.is-active { background: #fff; color: var(--wsh-primary); font-weight: 600; box-shadow: 0 .0625rem .25rem rgba(74,32,80,.12); }
.adm-seg-btn.is-active span { color: var(--adm-corail-fonce); }

/* Recherche */
.adm-search { position: relative; display: block; }
.adm-search svg { position: absolute; left: .75rem; top: 50%; width: .9375rem; height: .9375rem; transform: translateY(-50%); color: #9a9097; pointer-events: none; }
.adm-search input {
  width: 19rem; min-height: 2.375rem; padding: .5rem .875rem .5rem 2.25rem;
  border: .0625rem solid var(--wsh-border); border-radius: .625rem; background: #fbf9fa;
  font: inherit; font-size: .8125rem; color: var(--adm-texte); outline: none;
}
.adm-search input:focus { border-color: var(--wsh-primary-light); background: #fff; }

/* Filtres avancés */
.adm-filtres {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: .875rem;
  padding: .875rem 1.125rem; margin: 0 1.125rem 1rem; background: var(--wsh-bg-soft); border-radius: .75rem;
}
.adm-filtres .wsh-field-block { margin-bottom: 0; min-width: 9.5rem; }
.adm-filtres .wsh-link-btn { margin-bottom: .5rem; white-space: nowrap; }

/* Barre de sélection groupée */
.adm-bulk {
  display: flex; align-items: center; flex-wrap: wrap; gap: .5rem;
  margin: 0 1.125rem 1rem; padding: .5rem .5rem .5rem .875rem;
  background: #f4ecf5; border-radius: .75rem; font-size: .8125rem; color: var(--wsh-primary);
}
.adm-bulk > span { margin-right: auto; }
.adm-bulk .adm-btn { min-height: 2rem; padding: .375rem .75rem; }

/* --- Tableaux ----------------------------------------------- */
.adm-table-scroll { width: 100%; overflow-x: auto; border-top: .0625rem solid var(--adm-ligne); }
.adm-table { width: 100%; min-width: 56rem; border-collapse: collapse; font-size: .8125rem; color: var(--adm-texte); }
.adm-table th {
  text-align: center; background: #faf7f9; color: #766970;
  padding: .625rem .75rem; font-size: .71875rem; font-weight: 600; white-space: nowrap;
  border-bottom: .0625rem solid var(--adm-ligne);
}
.adm-table td { padding: .6875rem .75rem; border-bottom: .0625rem solid var(--adm-ligne); vertical-align: middle; text-align: center; }
.adm-table tbody tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover > td { background: #fdf9fb; }
.adm-table tr.is-selected > td { background: #f7eff8; }
.adm-table tr.is-nouvelle > td:first-child,
.adm-table tr.is-a-traiter > td:first-child { box-shadow: inset .1875rem 0 0 var(--adm-alerte); }
.adm-table tr.is-archive { color: var(--adm-muted); }
.adm-num { font-variant-numeric: tabular-nums; }
.adm-montant { white-space: nowrap; font-weight: 500; }
.adm-col-check { width: 2.5rem; }
.adm-col-check input { width: 1rem; height: 1rem; accent-color: var(--wsh-primary); cursor: pointer; }
.adm-col-actions { width: 1%; white-space: nowrap; }
.adm-vide { text-align: center; padding: 2.5rem 1rem !important; color: var(--adm-muted); }
/* Affichage progressif des grands tableaux : ligne « Afficher plus ». */
.adm-suite { text-align: center; padding: .75rem 1rem !important; }
.adm-suite .adm-btn { margin-inline: auto; }
.adm-resultat { margin: 0; padding: .75rem 1.125rem; font-size: .75rem; color: var(--adm-muted); border-top: .0625rem solid var(--adm-ligne); }
.adm-resultat:empty { display: none; }

/* En-têtes triables */
.adm-sort {
  display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; cursor: pointer; white-space: nowrap;
}
.adm-sort { position: relative; }
.adm-sort::after { content: ''; position: absolute; right: -.75rem; top: 50%; margin-top: -.25rem; width: .5rem; height: .5rem; opacity: 0; background: currentColor;
  clip-path: polygon(50% 0, 100% 40%, 0 40%, 0 60%, 100% 60%, 50% 100%); }
.adm-sort:hover { color: var(--wsh-primary); }
.adm-sort.is-asc, .adm-sort.is-desc { color: var(--wsh-primary); }
.adm-sort.is-asc::after { opacity: 1; clip-path: polygon(50% 10%, 100% 70%, 0 70%); }
.adm-sort.is-desc::after { opacity: 1; clip-path: polygon(0 30%, 100% 30%, 50% 90%); }

/* Contenu des cellules */
.adm-nom { display: block; font-weight: 600; color: #3a2f38; }
.adm-sub { display: block; margin-top: .125rem; font-size: .71875rem; color: var(--adm-muted); font-weight: 400; }
.adm-sub a, .adm-email a { color: inherit; text-decoration: none; }
.adm-sub a:hover, .adm-email a:hover { color: var(--wsh-primary); text-decoration: underline; }
.adm-email { color: #6f646b; }
.adm-sub-inline { font-size: .75rem; color: var(--adm-muted); }
.adm-date { display: block; white-space: nowrap; }
.adm-tag {
  display: inline-block; margin-left: .25rem; padding: .0625rem .375rem; border-radius: .3125rem;
  background: var(--wsh-bg-soft); color: var(--wsh-primary-light); font-size: .65625rem; font-weight: 600; vertical-align: middle;
}
.adm-txt-alerte { color: var(--adm-alerte); font-weight: 600; }

.adm-link {
  display: inline-flex; align-items: center; gap: .25rem; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--wsh-primary); cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: .1875rem;
  transition: text-decoration-color .15s ease;
}
.adm-link:hover { text-decoration-color: currentColor; }
.adm-link.adm-nom { display: inline; color: #3a2f38; }
.adm-link.adm-nom:hover { color: var(--wsh-primary); }
.adm-chevron { width: .875rem; height: .875rem; flex-shrink: 0; color: var(--adm-muted); transition: transform .15s ease; }
.adm-link-apercu[aria-expanded="true"] .adm-chevron { transform: rotate(90deg); color: var(--wsh-primary); }

/* Badges */
.adm-badge {
  display: inline-block; padding: .1875rem .5625rem; border-radius: 62.4375rem;
  font-size: .6875rem; font-weight: 600; white-space: nowrap;
}
.adm-badge-alerte { background: var(--adm-alerte-bg); color: var(--adm-alerte); }
.adm-badge-ok { background: var(--wsh-green-bg); color: var(--wsh-green); }
.adm-badge-refuse { background: var(--wsh-red-bg); color: var(--wsh-red); }
button.adm-badge-btn { border: 0; font-family: inherit; cursor: pointer; transition: filter .15s; }
button.adm-badge-btn:hover { filter: brightness(.94); box-shadow: 0 0 0 1px currentColor inset; }
button.adm-badge-btn:focus-visible { outline: 2px solid var(--wsh-primary); outline-offset: 2px; }
.adm-menu-statut {
  position: fixed; z-index: 1000; width: max-content; padding: .25rem;
  background: #fff; border: 1px solid var(--wsh-border); border-radius: .75rem;
  box-shadow: 0 .5rem 1.5rem rgba(74, 32, 80, .16);
}
.adm-menu-statut-item {
  display: flex; align-items: center; justify-content: flex-start; gap: .375rem; width: 100%;
  padding: .3125rem .4375rem; border: 0; background: none; border-radius: .5rem; cursor: pointer; font-family: inherit;
}
.adm-menu-statut-item:hover, .adm-menu-statut-item:focus-visible { background: var(--wsh-bg-soft); outline: none; }
.adm-menu-statut-item.is-actif { cursor: default; }
.adm-menu-statut-coche { display: inline-flex; width: .875rem; height: .875rem; color: var(--wsh-primary); }
.adm-menu-statut-coche svg { width: 100%; height: 100%; }
.adm-badge-neutre { background: #f2eff1; color: #7d727a; }
.adm-badge-admin { background: #eaf1fb; color: #3a6bb0; }

/* Boutons d'action en ligne */
.adm-actions { display: inline-flex; align-items: center; gap: .3125rem; }
.adm-icon-btn {
  width: 2rem; height: 2rem; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border-radius: .5rem; border: .0625rem solid #e7dfe4; background: #fff; color: #675a63; cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.adm-icon-btn svg { width: .9375rem; height: .9375rem; }
.adm-icon-btn:hover { background: var(--wsh-bg-soft); border-color: #d9ccd5; color: var(--wsh-primary); }
.adm-icon-ok:hover { background: var(--wsh-green-bg); border-color: #b9dcc5; color: var(--wsh-green); }
.adm-icon-danger:hover { background: var(--wsh-red-bg); border-color: #efc6c2; color: var(--wsh-red); }
.adm-icon-btn:disabled { opacity: .5; cursor: default; }

/* Aperçu des lignes d'une commande */
.adm-apercu-row > td { padding: 0 !important; background: #fbf8fa !important; }
.adm-apercu { display: flex; justify-content: center; padding: .75rem 1rem 1rem; overflow-x: auto; }
.adm-apercu-table { margin: 0 auto; }
.adm-apercu-table { border-collapse: collapse; font-size: .75rem; background: #fff; border: .0625rem solid var(--adm-ligne); border-radius: .5rem; }
.adm-apercu-table th, .adm-apercu-table td { padding: .375rem .625rem; border-bottom: .0625rem solid var(--adm-ligne); text-align: center; white-space: nowrap; }
.adm-apercu-table th { position: static; background: #faf7f9; font-size: .6875rem; color: #766970; }
.adm-apercu-table tr:last-child td { border-bottom: 0; }
.adm-apercu-table td.adm-apercu-designation { text-align: left; white-space: normal; min-width: 14rem; max-width: 24rem; }
.adm-apercu-vide { margin: 0; font-size: .78125rem; color: var(--adm-muted); }

/* --- Synchronisation ---------------------------------------- */
.adm-sync-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: 1.125rem 1.25rem; border-bottom: .0625rem solid var(--adm-ligne);
}
.adm-sync-head p { margin: 0; max-width: 40rem; font-size: .8125rem; line-height: 1.55; color: var(--adm-muted); }
.adm-sync-list { list-style: none; margin: 0; padding: 0; }
.adm-sync-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.25rem;
  padding: 1.125rem 1.25rem; border-bottom: .0625rem solid var(--adm-ligne);
}
.adm-sync-item:last-child { border-bottom: 0; }
.adm-sync-item h3 { margin: 0 0 .25rem; font-size: .9375rem; font-weight: 600; color: var(--wsh-primary); }
.adm-sync-texte { flex: 1; min-width: 0; }
.adm-sync-texte p { margin: 0; font-size: .8125rem; color: #6f646b; line-height: 1.5; }
.adm-sync-texte .adm-sync-dernier { margin-top: .375rem; font-size: .71875rem; color: var(--adm-muted); }
.adm-sync-dernier.is-echec { color: var(--wsh-red); }
.adm-sync-msg { margin: .625rem 0 0 !important; }
.adm-sync-btn { min-width: 8.5rem; }
.adm-sync-item.is-en-cours h3::after {
  content: ''; display: inline-block; width: .625rem; height: .625rem; margin-left: .5rem; vertical-align: middle;
  border: .125rem solid var(--wsh-primary-light); border-right-color: transparent; border-radius: 50%;
  animation: adm-tourne .8s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .adm-btn.is-en-cours svg, .adm-sync-item.is-en-cours h3::after { animation: none; }
}

/* --- Mobile / tablette -------------------------------------- */
@media (max-width: 900px) {
  .adm-toolbar { flex-direction: column; align-items: stretch; }
  .adm-seg { overflow-x: auto; }
  .adm-toolbar-gauche { width: 100%; }
  .adm-select { flex: 1 1 auto; }
  .adm-select select { flex: 1; }
  .adm-toolbar-droite { width: 100%; }
  .adm-search { flex: 1 1 100%; }
  .adm-search input { width: 100%; }
  .adm-toolbar-droite .adm-btn { flex: 1 1 auto; }
  .adm-sync-item { flex-direction: column; }
  .adm-sync-btn { width: 100%; }
  .adm-apercu { padding-left: 1rem; }
}

/* --- Avis -------------------------------------------------- */
.adm-stars { display: inline-flex; font-size: 1rem; letter-spacing: .0625rem; line-height: 1; white-space: nowrap; }
.adm-stars-on { color: #e0a82e; }
.adm-stars-off { color: #ded4db; }
.adm-avis-moyennes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; padding: .75rem 1.125rem; border-bottom: .0625rem solid var(--wsh-border-soft); background: var(--wsh-bg-soft); }
.adm-avis-moyennes-titre { font-size: .75rem; font-weight: 600; color: var(--adm-muted); margin-right: .25rem; }
.adm-avis-moyenne { display: inline-flex; align-items: baseline; gap: .3125rem; padding: .25rem .625rem; border-radius: 62.4375rem; background: #fff; border: .0625rem solid var(--wsh-border-soft); font-size: .75rem; color: #5a4d57; }
.adm-avis-moyenne strong { font-size: .875rem; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-avis-moyenne-max { color: var(--adm-muted); font-size: .6875rem; }
.adm-avis-moyenne.is-globale { border-color: #e0a82e; }
.adm-avis-retours { min-width: 16rem; max-width: 30rem; }
.adm-avis-texte { display: block; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.4; }
.adm-avis-texte + .adm-avis-texte { margin-top: .5rem; }

/* --- Camemberts par enseigne ---------- */
.adm-pie { display: flex; align-items: center; gap: 1.25rem; }
.adm-pie-graph { position: relative; flex: 0 0 9.5rem; width: 9.5rem; height: 9.5rem; }
.adm-pie-graph svg { display: block; width: 100%; height: 100%; }
.adm-pie-seg { transition: opacity .15s ease; }
.adm-pie-graph:hover .adm-pie-seg { opacity: .55; }
.adm-pie-graph .adm-pie-seg:hover { opacity: 1; }
.adm-pie-centre { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.adm-pie-total.is-long { font-size: 1.0625rem; }
.adm-pie-total { font-size: 1.5rem; font-weight: 600; line-height: 1.1; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-pie-unite { font-size: .6875rem; color: var(--adm-muted); }
.adm-pie-legende { flex: 1 1 auto; min-width: 0; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .4375rem; }
.adm-pie-legende li { display: flex; align-items: center; gap: .5rem; font-size: .8125rem; min-width: 0; }
.adm-pie-pastille { flex: 0 0 .625rem; width: .625rem; height: .625rem; border-radius: 50%; }
.adm-pie-lib { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-pie-val { flex: 0 0 auto; font-weight: 600; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-pie-pct { margin-left: .25rem; font-weight: 400; color: var(--adm-muted); }

/* --- Carrousel d'analyses ---------- */
.adm-carousel .adm-card-head { align-items: flex-start; }
.adm-carousel-titres { min-width: 0; }
.adm-carousel-sub { margin: .1875rem 0 0; font-size: .75rem; color: var(--adm-muted); }
.adm-carousel-nav { display: flex; align-items: center; gap: .25rem; flex: 0 0 auto; }
.adm-carousel-pos { min-width: 2.5rem; text-align: center; font-size: .75rem; color: var(--adm-muted); font-variant-numeric: tabular-nums; }
.adm-carousel-viewport { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 14.5rem; touch-action: pan-y; }
.adm-carousel-pane { flex: 1 1 auto; display: flex; flex-direction: column; animation: adm-fondu .25s ease; }
.adm-carousel-pane[hidden] { display: none; }
.adm-carousel-pane > .adm-recent-vide { margin: auto 0; }
.adm-carousel-pane > .adm-chart, .adm-carousel-pane > .adm-pie, .adm-carousel-pane > .adm-hbars { flex: 1 1 auto; }
.adm-carousel-pane > .adm-pie { align-items: center; }
.adm-carousel-dots { display: flex; justify-content: center; gap: .375rem; margin-top: .875rem; }
.adm-carousel-dot { width: .5rem; height: .5rem; padding: 0; border: 0; border-radius: 999px; background: var(--adm-ligne); cursor: pointer; transition: width .2s ease, background .2s ease; }
.adm-carousel-dot:hover { background: var(--wsh-primary-light); }
.adm-carousel-dot.is-active { width: 1.25rem; background: var(--adm-corail); }
.adm-carousel-dot:focus-visible, .adm-carousel-nav .adm-icon-btn:focus-visible { outline: .125rem solid var(--wsh-primary-light); outline-offset: .125rem; }
@keyframes adm-fondu { from { opacity: 0; } to { opacity: 1; } }

.adm-hbars { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; justify-content: center; gap: .625rem; }
.adm-hbar { display: grid; grid-template-columns: minmax(5rem, 9.5rem) minmax(0, 1fr) auto; align-items: center; gap: .625rem; font-size: .8125rem; }
.adm-hbar-lib { display: flex; flex-direction: column; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-hbar-sub { font-size: .6875rem; color: var(--adm-muted); overflow: hidden; text-overflow: ellipsis; }
.adm-hbar-piste { height: .625rem; border-radius: 999px; background: var(--adm-ligne); overflow: hidden; }
.adm-hbar-barre { display: block; height: 100%; border-radius: 999px; transition: width .3s ease; }
.adm-hbar-val { font-weight: 600; color: var(--wsh-primary); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* --- Notifications (push + e-mail) ---------- */
.adm-panel.ntf { display: flex; flex-direction: column; gap: .875rem; background: none; border: 0; border-radius: 0; box-shadow: none; }
.ntf > .adm-toolbar { padding: 0; border: 0; background: none; }
.ntf > [data-ntf-panel]:not([hidden]) { display: flex; flex-direction: column; gap: .875rem; }
.ntf .adm-card-head { flex-wrap: wrap; }
.ntf-card { padding-bottom: 1.375rem; }
.ntf-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ntf-seg { margin-bottom: 1rem; max-width: 100%; overflow-x: auto; }
.ntf-details { margin: 0 0 1rem; padding: .75rem 1rem; border: .0625rem solid var(--adm-ligne); border-radius: .75rem; background: var(--wsh-bg-soft); }
.ntf-details summary { cursor: pointer; font-size: .8125rem; font-weight: 500; color: var(--wsh-primary); }
.ntf-details[open] summary { margin-bottom: .75rem; }
.ntf-details .wsh-field-block:last-child { margin-bottom: 0; }
.ntf-date { width: auto; padding: .4375rem .625rem; border: .0625rem solid var(--wsh-border); border-radius: .5rem; font: inherit; font-size: .8125rem; color: var(--adm-texte); background: #fff; }
.ntf-date:disabled { opacity: .5; }
.ntf-audience { min-height: 1.25rem; margin: 0 0 1rem; padding: .625rem .875rem; font-size: .8125rem; color: var(--adm-texte); background: var(--wsh-bg-soft); border-radius: .75rem; }
.ntf-audience:empty { display: none; }
.ntf-audience strong { color: var(--wsh-primary); }
.ntf-audience .adm-sub { display: inline; margin-left: .25rem; }
.ntf-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .5rem; margin-top: .5rem; }
.ntf-actions-tete { display: flex; gap: .5rem; flex-wrap: wrap; }
.ntf-aide { margin: 0 0 1rem; font-size: .78125rem; line-height: 1.6; color: var(--adm-muted); }
.ntf-aide code, .ntf-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; }
.ntf-aide code { padding: .0625rem .3125rem; border-radius: .3125rem; background: var(--wsh-bg-soft); color: var(--wsh-primary); }
.ntf-code { margin: 0 0 1rem; padding: .875rem 1rem; overflow-x: auto; border-radius: .75rem; background: #2b1730; color: #f4e8f1; line-height: 1.6; }
.ntf-sous { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; margin-inline: auto; }
/* Tableaux dans une carte : cadre complet (sinon les côtés n'ont pas de bordure). */
.ntf-card .adm-table-scroll, .fid-adm-card .adm-table-scroll { border: .0625rem solid var(--adm-ligne); border-radius: .75rem; }
/* Enseignes de l'envoi : le panneau s'ouvre vers le bas (le champ est en milieu de page). */
.adm-ens-select.ntf-ens-select .wsh-multiselect-panel { top: calc(100% + .375rem); bottom: auto; }
.ntf-erreur { color: var(--wsh-red); max-width: 20rem; white-space: normal; }
.ntf-actions-ligne { flex-wrap: wrap; justify-content: flex-end; }
.adm-btn.ntf-mini { padding: .25rem .625rem; font-size: .75rem; }
.ntf-cible-bloc { margin: 0 0 .875rem; padding: .75rem .875rem; border: .0625rem solid var(--adm-ligne); border-radius: .75rem; }
.ntf-cible-bloc[hidden] { display: none; }
.ntf-cible-bloc input[type="search"] { width: 100%; margin-bottom: .5rem; padding: .5rem .75rem; border: .0625rem solid var(--wsh-border); border-radius: .5rem; font: inherit; font-size: .8125rem; }
.ntf-comptes { display: flex; flex-direction: column; gap: .375rem; max-height: 11rem; overflow-y: auto; }
.ntf-compte { align-items: flex-start; }
.ntf-compte .adm-sub { display: inline; margin-left: .25rem; }
.ntf-champ { width: 100%; min-width: 8rem; padding: .375rem .5rem; border: .0625rem solid transparent; border-radius: .5rem; font: inherit; font-size: .8125rem; background: transparent; }
.ntf-champ:hover { border-color: var(--wsh-border); }
.ntf-champ:focus { border-color: var(--wsh-primary-light); background: #fff; outline: none; }
.ntf-etat { margin: 0 0 1rem; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ntf-etat li { display: flex; align-items: flex-start; gap: .625rem; font-size: .8125rem; }
.ntf-etat-ico { flex: 0 0 1.375rem; width: 1.375rem; height: 1.375rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font-size: .75rem; font-weight: 700; }
.ntf-etat-ok .ntf-etat-ico { background: var(--wsh-green-bg); color: var(--wsh-green); }
.ntf-etat-ko .ntf-etat-ico { background: var(--wsh-red-bg); color: var(--wsh-red); }
.ntf-etat-attention .ntf-etat-ico { background: var(--adm-alerte-bg); color: var(--adm-alerte); }
.ntf-modal { max-width: 40rem; max-height: 92vh; overflow-y: auto; }
.ntf-apercu-modal { max-width: 30rem; max-height: 92vh; overflow-y: auto; }
.ntf-prev-titre { margin: 1rem 0 .5rem; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--adm-muted); }
.ntf-prev-push { display: flex; gap: .75rem; padding: .875rem; border-radius: 1rem; background: #f2eff1; }
.ntf-prev-push img { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; border-radius: .5625rem; }
.ntf-prev-push div { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.ntf-prev-push strong { font-size: .875rem; color: #2b1730; }
.ntf-prev-push span { font-size: .8125rem; line-height: 1.4; color: #4d4350; overflow-wrap: anywhere; }
.ntf-prev-push small { font-size: .6875rem; color: var(--adm-muted); }
.ntf-prev-mail { overflow: hidden; border: .0625rem solid var(--adm-ligne); border-radius: .875rem; }
.ntf-prev-mail-objet { padding: .625rem .875rem; font-size: .8125rem; background: var(--wsh-bg-soft); border-bottom: .0625rem solid var(--adm-ligne); }
.ntf-prev-mail-entete { padding: .75rem .875rem; font-size: .875rem; font-weight: 700; color: #fff; background: var(--wsh-primary); }
.ntf-prev-mail-entete span { margin-left: .375rem; font-size: .75rem; font-weight: 400; color: #e3b3a5; }
.ntf-prev-mail-corps { padding: 1rem .875rem; font-size: .8125rem; line-height: 1.6; color: var(--adm-texte); }
.ntf-prev-mail-corps h5 { margin: 0 0 .625rem; font-size: 1rem; color: var(--wsh-primary); }
.ntf-prev-mail-corps p { margin: 0 0 .625rem; }
.ntf-prev-mail-btn { display: inline-block; margin-top: .375rem; padding: .5rem 1rem; border-radius: .5rem; font-weight: 700; color: #fff; background: var(--wsh-accent); }
@media (max-width: 900px) { .ntf-grid-2 { grid-template-columns: 1fr; } .ntf-actions { justify-content: stretch; } .ntf-actions .adm-btn { flex: 1 1 auto; } }

/* --- Adaptation tablette / mobile du tableau de bord ---------- */
@media (max-width: 900px) {
  .adm-bar { padding: 0 .75rem; }
  .adm-main { padding: 1rem .75rem 4.5rem; }
  .adm-dash-cols { grid-template-columns: minmax(0, 1fr); }
  .adm-dash-resume { font-size: 1.375rem; }
  .adm-panel.adm-dash { gap: 1.5rem; }
}
@media (max-width: 700px) {
  .adm-maj-info { display: none; }
  .adm-bar-refresh { width: 2.5rem; padding: 0; }
  .adm-bar-refresh .adm-btn-lib { display: none; }
  .adm-todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-todo-grid > :last-child:nth-child(odd), .adm-kpi-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .adm-chart { gap: .1875rem; }
  .adm-shortcut { flex: 1 1 calc(50% - .3125rem); justify-content: flex-start; }
}
@media (max-width: 400px) {
  .adm-hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .adm-hbar-piste { grid-column: 1 / -1; grid-row: 2; }
  .adm-pie { flex-direction: column; align-items: stretch; }
  .adm-pie-graph { align-self: center; }
  .adm-todo-n { font-size: 1.75rem; }
  .adm-kpi-val { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  .adm-drawer, .adm-drawer.is-open, .adm-scrim, .adm-scrim.is-open, .adm-todo-card, .adm-chart-bar, .adm-pie-seg, .adm-hbar-barre, .adm-carousel-dot { transition: none; }
  .adm-carousel-pane { animation: none; }
  .adm-panel:not([hidden]) { animation: none; }
}

/* --- Codes promo --------------------------------------------- */
.adm-code-texte { font-family: inherit; font-size: .8125rem; font-weight: 700; letter-spacing: .02em; }
.adm-code-remise { display: block; font-weight: 600; color: #3a2f38; }
/* Pop-up large : deux colonnes confortables pour le formulaire, trois pour les conditions. */
.wsh-modal.wsh-modal-admin.adm-code-modal { max-width: 58rem; width: 100%; max-height: 92vh; padding: 2rem 2.25rem; }
.adm-code-modal .admin-modal-grid { gap: 0 1.5rem; }
.adm-code-modal .wsh-field-block { margin-bottom: 1rem; }
.adm-code-modal .wsh-field-block input:not([type="checkbox"]):not([type="radio"]), .adm-code-modal .wsh-field-block select { min-height: 2.75rem; }
.adm-code-modal #code-code { text-transform: uppercase; letter-spacing: .04em; }
.adm-code-bloc { margin-bottom: .25rem; }
.adm-code-options { margin: .5rem 0 .75rem; padding: .75rem .875rem; border: .0625rem solid var(--wsh-border-soft); border-radius: .75rem; background: #fcfafb; }
.adm-code-options > summary { cursor: pointer; font-size: .8125rem; font-weight: 600; color: var(--wsh-primary); }
.adm-code-options[open] > summary { margin-bottom: .75rem; }
/* « Générer » à droite du libellé « Code * » */
.adm-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .3125rem; }
.adm-label-row label { margin-bottom: 0; }
.adm-label-row .adm-link { font-size: .78125rem; }
.adm-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1.5rem; }
.adm-grid-3-span { grid-column: 1 / -1; margin: -.25rem 0 1rem; }
.adm-grid-3-span2 { grid-column: span 2; }
/* Menu déroulant des enseignes : même aspect que « Visibilité » de l'offre du moment */
.adm-ens-select { width: 100%; min-width: 0; flex: none; }
.adm-ens-select .wsh-multiselect-btn {
  box-sizing: border-box; width: 100%; height: 2.75rem; padding: 0 1.875rem 0 .875rem; line-height: 2.5625rem;
  border: .09375rem solid var(--wsh-border); border-radius: .625rem; background: #fff;
  font: inherit; font-size: .84375rem; font-weight: 400; color: #2b1f2b; text-align: left;
}
.adm-ens-select .wsh-multiselect-btn:hover { background: #fff; border-color: var(--wsh-primary-light); }
.adm-ens-select.wsh-open .wsh-multiselect-btn { border-color: var(--wsh-primary-light); }
/* Le champ est en bas de la pop-up : le panneau s'ouvre vers le haut pour rester entièrement visible. */
.adm-ens-select .wsh-multiselect-panel { top: auto; bottom: calc(100% + .375rem); }
.adm-ens-select .wsh-multiselect-option { display: flex; align-items: center; gap: .5rem; margin: 0; font-weight: 400; font-size: .8125rem; color: #2b1f2b; }
.adm-ens-select .wsh-multiselect-option input[type="checkbox"] { width: .875rem; height: .875rem; min-height: 0; padding: 0; flex: none; }.adm-art-picker { position: relative; }
.adm-art-choisi {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5625rem .75rem;
  background: var(--wsh-bg-soft); border: .0625rem solid var(--wsh-border); border-radius: .625rem; font-size: .8125rem;
}
.adm-art-resultats {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 20; margin: .25rem 0 0; padding: .25rem; list-style: none;
  max-height: 15rem; overflow-y: auto; background: #fff; border: .0625rem solid var(--wsh-border); border-radius: .75rem;
  box-shadow: 0 .5rem 1.5rem rgba(74,32,80,.16);
}
.adm-art-option, .adm-art-vide { display: flex; justify-content: space-between; gap: .75rem; padding: .5rem .625rem; border-radius: .5rem; font-size: .8125rem; }
.adm-art-option { cursor: pointer; }
.adm-art-option:hover, .adm-art-option:focus { background: var(--wsh-bg-soft); outline: none; }
.adm-art-vide { color: var(--adm-muted); }
.adm-checks { display: flex; flex-wrap: wrap; gap: .375rem 1rem; }
.wsh-field-block .adm-check, .adm-check {
  display: inline-flex; align-items: center; gap: .4375rem; margin: 0; font-size: .8125rem; font-weight: 400; color: var(--adm-texte); cursor: pointer;
}
.wsh-field-block .adm-check input, .adm-check input { width: 1rem; height: 1rem; padding: 0; flex: none; accent-color: var(--wsh-primary); cursor: pointer; }
.adm-check-actif { margin: .25rem 0 .25rem; font-weight: 600; }
@media (max-width: 900px) {
  .adm-art-resultats { max-height: 11rem; }
  .adm-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-grid-3-span2 { grid-column: 1 / -1; }
  .wsh-modal.wsh-modal-admin.adm-code-modal { padding: 1.5rem 1.25rem; }
}
@media (max-width: 600px) {
  .adm-grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   FIDELITE (administration)
   ============================================================ */
#adm-panel-fidelite .fid-adm-card { margin-bottom: 1.125rem; }
#adm-panel-fidelite .fid-adm-grid { margin-top: 0.875rem; }
#adm-panel-fidelite textarea { width: 100%; resize: vertical; }
#adm-panel-fidelite .fid-adm-actions { display: flex; justify-content: flex-end; margin-top: 0.5rem; }
#adm-panel-fidelite .adm-card-head { flex-wrap: wrap; }
#fid-adm-alerte { margin-bottom: 1rem; }
#adm-panel-fidelite .adm-actions .adm-btn { min-height: 2rem; padding: .375rem .75rem; }

/* Boutons de création à droite de la recherche (Commandes, Offre client, Offre publiée). */
a.adm-btn.adm-btn-creer, a.adm-btn.adm-btn-creer:visited { color: #fff; }
a.adm-btn.adm-btn-creer:hover { color: #fff; }

/* Campagnes fid' ponctuelles */
#adm-panel-fidelite .fid-camp-aide { margin: -.25rem 0 1rem; }
#fid-camp-alerte { margin-bottom: .875rem; }
.wsh-modal.wsh-modal-admin.fid-camp-modal { max-width: 46rem; width: 100%; max-height: 92vh; overflow-y: auto; }
.fid-camp-section { margin: 1.25rem 0 .625rem; padding-top: 1rem; border-top: .0625rem solid var(--adm-ligne); font-size: .875rem; color: var(--wsh-primary); }
.fid-camp-check { margin-top: 1.75rem; }
.fid-camp-apercu { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: .25rem 0 .5rem; font-size: .8125rem; color: var(--adm-texte); }
.fid-camp-apercu-liste { max-height: 10rem; overflow-y: auto; margin: 0 0 .5rem; padding: .5rem .75rem; border: .0625rem solid var(--adm-ligne); border-radius: .75rem; font-size: .78125rem; line-height: 1.6; }
.fid-camp-apercu-liste[hidden] { display: none; }
.fid-camp-apercu-liste .adm-sub { display: inline; margin-left: .25rem; }
.fid-camp-quand { align-items: center; margin-bottom: .75rem; }
[data-camp-bloc][hidden], [data-camp-type][hidden] { display: none; }
@media (max-width: 700px) { .fid-camp-check { margin-top: 0; } }
.fid-camp-erreur { color: var(--wsh-red); max-width: 16rem; margin-inline: auto; white-space: normal; }

/* --- Tableau de bord : indicateurs en deux pages --- */
.adm-pager-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .75rem; }
.adm-pager-head .adm-dash-titre { margin: 0; }
.adm-pager-viewport { touch-action: pan-y; }
.adm-pager-pane { animation: adm-fondu .25s ease; }
.adm-pager-pane[hidden] { display: none; }
.adm-pager .adm-carousel-dots { margin-top: .75rem; }
@media (prefers-reduced-motion: reduce) { .adm-pager-pane { animation: none; } }

/* --- Popup (administration) --- */
.pop-modal { max-width: 46rem; width: 100%; max-height: 92vh; overflow-y: auto; }
.pop-section { margin: 1.25rem 0 .625rem; padding-top: 1rem; border-top: .0625rem solid var(--adm-ligne); font-size: .875rem; color: var(--wsh-primary); }
.pop-section:first-of-type { margin-top: .75rem; padding-top: 0; border-top: 0; }
#adm-panel-popups > .ntf-aide, #adm-panel-accueil > .ntf-aide { margin: .75rem 0; padding: 0 1.125rem; }

/* --- Notifications : onglet Abonnés --- */
.ntf-abonnes-resume { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.ntf-abonnes-resume .adm-kpi { cursor: default; }
.ntf-abonnes-barre { margin-bottom: .75rem; }
#ntf-abonnes-tbody td .adm-sub { text-align: center; }

/* --- Comptes : visualisation d'un compte --- */
.wsh-modal.wsh-modal-admin.cpt-vue-modal { max-width: 62rem; width: 100%; max-height: 92vh; overflow-y: auto; padding: 1.75rem 2rem 2rem; }
.cpt-vue-entete { display: flex; align-items: center; gap: .5rem; margin: 0 2rem .375rem 0; min-width: 0; }
.cpt-vue-entete h3 { margin: 0; font-size: 1.25rem; overflow-wrap: anywhere; }
.cpt-vue-entete .adm-icon-btn { flex: 0 0 auto; }
.cpt-vue-sous { display: flex; align-items: center; flex-wrap: wrap; gap: .625rem; margin-bottom: 1.25rem; }
.cpt-vue-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.cpt-vue-bloc { padding: 1rem 1.125rem 1.125rem; background: #fff; border: .0625rem solid var(--wsh-border-soft); border-radius: .875rem; min-width: 0; }
.cpt-vue-pile { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.cpt-vue-bloc-large { margin-bottom: 1rem; }
.cpt-vue-titre { margin: 0 0 .75rem; font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: #766970; }
.cpt-vue-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .625rem; }
.cpt-vue-kpi { padding: .75rem .875rem; background: var(--wsh-bg-soft); border-radius: .75rem; }
.cpt-vue-kpi-lib { display: block; font-size: .71875rem; color: var(--adm-muted); }
.cpt-vue-kpi-val { display: block; margin-top: .25rem; font-size: 1.25rem; font-weight: 600; line-height: 1.15; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.cpt-vue-kpi-sub { display: block; margin-top: .1875rem; font-size: .71875rem; color: var(--adm-muted); }
.cpt-vue-liste { margin: 0; }
.cpt-vue-ligne { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .4375rem 0; border-bottom: .0625rem solid var(--adm-ligne); font-size: .8125rem; }
.cpt-vue-ligne:last-child { border-bottom: 0; }
.cpt-vue-ligne dt { color: var(--adm-muted); flex: 0 0 auto; }
.cpt-vue-ligne dd { margin: 0; text-align: right; color: var(--adm-texte); overflow-wrap: anywhere; min-width: 0; }
.cpt-vue-ligne dd a { color: inherit; text-decoration: none; }
.cpt-vue-ligne dd a:hover { color: var(--wsh-primary); text-decoration: underline; }
.cpt-vue-ligne dd .adm-sub { display: block; }
.cpt-vue-vide { margin: 0; font-size: .8125rem; color: var(--adm-muted); }
.cpt-vue-vide code { padding: .0625rem .3125rem; border-radius: .3125rem; background: var(--wsh-bg-soft); color: var(--wsh-primary); font-size: .75rem; }
.cpt-vue-sous-titre { margin: .75rem 0 .375rem; font-size: .75rem; font-weight: 600; color: var(--wsh-primary); }
.cpt-vue-cde { margin: 0; padding: 0; list-style: none; }
.cpt-vue-cde li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .4375rem 0; border-bottom: .0625rem solid var(--adm-ligne); font-size: .8125rem; }
.cpt-vue-cde li:last-child { border-bottom: 0; }
.cpt-vue-montant { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--wsh-primary); white-space: nowrap; }
@media (max-width: 760px) {
  .wsh-modal.wsh-modal-admin.cpt-vue-modal { padding: 1.25rem 1rem 1.5rem; }
  .cpt-vue-grille { grid-template-columns: 1fr; }
}
@media (max-width: 640px) { .cpt-vue-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- Comptes : cellules sur une seule ligne (texte tronqué), type de dispo sous l'enseigne --- */
#adm-table-comptes .adm-tronque { display: block; max-width: 10rem; margin-inline: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#adm-table-comptes .adm-email .adm-tronque { max-width: 10rem; }
#adm-table-comptes th, #adm-table-comptes td { padding-inline: .5rem; }
#adm-table-comptes th:last-child, #adm-table-comptes td:last-child { padding-right: 1rem; }
#adm-table-comptes td .adm-sub { max-width: 10rem; margin-inline: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-ens-cell { display: inline-flex; flex-direction: column; align-items: center; gap: .1875rem; }
.adm-ens-cell .adm-tag { margin-left: 0; }

/* Comptes — onglet « À valider » : colonnes allégées, bouton Valider à côté du menu d'actions */
#adm-table-comptes.is-attente .cpt-col-hors-attente { display: none; }
.adm-actions-duo { display: inline-flex; align-items: center; gap: .5rem; }
/* Même apparence que le bouton « Actions » (⋮) : fond blanc, bordure grise, survol doux */
.adm-valider-ligne { display: inline-flex; align-items: center; gap: .375rem; height: 2rem; padding: 0 .75rem; border-radius: .5rem; border: .0625rem solid #e7dfe4; background: #fff; color: #675a63; font: inherit; font-size: .8125rem; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.adm-valider-ligne:hover { background: var(--wsh-bg-soft); border-color: #d9ccd5; color: var(--wsh-primary); }
.adm-valider-ligne:focus-visible { outline: 2px solid var(--wsh-primary-light); outline-offset: 2px; }
.adm-valider-ligne svg { width: 1rem; height: 1rem; flex-shrink: 0; }

/* --- Prix clients (prix d'achat personnalisés) ---------------- */
.pxc-select { display: inline-flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--adm-muted); }
.pxc-select select {
  min-height: 2.375rem; max-width: 22rem; padding: 0 2rem 0 .75rem;
  border: .0625rem solid var(--wsh-border); border-radius: .625rem; background-color: #fff;
  font: inherit; font-size: .78125rem; color: var(--wsh-primary); font-weight: 600; cursor: pointer;
}
.pxc-select select:focus-visible { outline: none; border-color: var(--wsh-primary-light); box-shadow: 0 0 0 .125rem rgba(122,74,127,.18); }
#adm-panel-prix-clients > .pxc-aide { margin: 0 0 .75rem; padding: 0 1.125rem; }
#adm-panel-prix-clients > #pxc-alerte { margin: .75rem 1.125rem 0; }
#adm-panel-prix-clients > #pxc-alerte:not(.show) { margin: 0; }
.pxc-prix { color: var(--wsh-red); font-weight: 700; white-space: nowrap; }
.pxc-dispo { white-space: nowrap; }
.pxc-ecart { font-size: .75rem; color: var(--adm-muted); white-space: nowrap; }
.pxc-ecart.is-baisse { color: var(--wsh-green); font-weight: 600; }
.pxc-sans-compte { color: var(--adm-alerte); }
.pxc-note { font-style: italic; }
.pxc-client-picker { position: relative; }
.pxc-client-picker .wsh-field-help.is-alerte { color: var(--adm-alerte); }
.pxc-modal .wsh-modal-actions { flex-wrap: wrap; }
@media (max-width: 900px) {
  .pxc-select { width: 100%; }
  .pxc-select select { flex: 1; max-width: none; }
}
#adm-table-prix-clients .adm-tronque { display: block; max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#adm-table-prix-clients .pxc-col-article { text-align: center; }
#adm-table-prix-clients .pxc-col-article .adm-tronque { margin-inline: auto; max-width: 20rem; }
#adm-table-prix-clients td:first-child .adm-tronque { margin-inline: auto; }
.pxc-hors-dispo { display: inline-block; margin-top: .25rem; font-size: .65625rem; }
.pxc-article-alerte { margin: .5rem 0 0; padding: .5rem .75rem; border-radius: .5rem; background: var(--adm-alerte-bg); color: var(--adm-alerte); font-size: .75rem; line-height: 1.45; }
.pxc-article-alerte[hidden] { display: none; }
.pxc-art-libre { border-top: .0625rem dashed var(--wsh-border); color: var(--adm-alerte); }
/* Fenêtre « Ajouter un prix » : hauteur libre (pas de défilement interne), listes déroulantes par-dessus */
.wsh-modal.wsh-modal-admin.pxc-modal { max-width: 46rem; max-height: none; overflow: visible; }
.pxc-modal .wsh-field-block { margin-bottom: 1rem; }
@media (max-width: 640px), (max-height: 640px) {
  .wsh-modal.wsh-modal-admin.pxc-modal { max-height: 92vh; overflow-y: auto; }
}

#adm-table-prix-clients tr.pxc-inactif td { opacity: .6; }
#adm-table-prix-clients tr.pxc-inactif td.adm-col-actions { opacity: 1; }
.pxc-date { white-space: nowrap; }
.pxc-statut { display: inline-block; margin-top: .25rem; font-size: .65625rem; }

/* Fiche compte : codes promo */
.cpt-code-liste { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .375rem; }
.cpt-code-liste li { display: flex; align-items: center; gap: .625rem; padding: .375rem .5rem; background: var(--wsh-bg-soft); border-radius: .625rem; }
.cpt-code-liste li .adm-btn { margin-left: auto; }
.cpt-code-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; border-top: .0625rem dashed var(--wsh-border-soft); }
.cpt-code-select { flex: 1 1 9rem; min-width: 0; height: 1.75rem; padding: 0 .5rem; border: .0625rem solid var(--wsh-border); border-radius: .5rem; background: #fff; font: inherit; font-size: .75rem; color: #453b42; }

/* Fenêtre « Utilisations » d'un code promo */
.wsh-modal.wsh-modal-admin.adm-usages-modal { max-width: 62rem; width: 100%; max-height: 92vh; overflow-y: auto; padding: 1.75rem 2rem 2rem; }
.adm-usages-modal .adm-table th, .adm-usages-modal .adm-table td { white-space: nowrap; }
@media (max-width: 640px) { .wsh-modal.wsh-modal-admin.adm-usages-modal { padding: 1.25rem 1rem 1.5rem; } }

/* Filtres d'en-tête façon Excel */
.adm-th-filtrable { white-space: nowrap; }
.adm-th-filtrable .adm-sort.is-asc, .adm-th-filtrable .adm-sort.is-desc { margin-right: .875rem; }
/* Marge à droite des tableaux : la dernière colonne (et son entonnoir de filtre) ne colle plus au bord. */
.adm-table th:last-child, .adm-table td:last-child { padding-right: 1.5rem; }
.adm-filtre-btn {
  display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; padding: 0;
  margin-left: .125rem; vertical-align: middle; border: .0625rem solid transparent; border-radius: .25rem;
  background: none; color: var(--adm-muted); cursor: pointer;
}
.adm-filtre-btn svg { width: .75rem; height: .75rem; }
.adm-filtre-btn:hover, .adm-filtre-btn[aria-expanded="true"] { background: var(--wsh-bg-soft); border-color: var(--adm-ligne); color: var(--wsh-primary); }
.adm-filtre-btn.is-actif { background: var(--adm-corail-btn); color: #fff; }
.adm-filtre-btn.is-actif svg { fill: currentColor; }
.adm-filtre-btn:focus-visible { outline: 2px solid var(--wsh-primary); outline-offset: 1px; }
.adm-resultat-filtres { padding-top: 0; border-top: 0; }
.adm-filtre-pop {
  position: fixed; z-index: 1000; width: 17rem; max-width: calc(100vw - 1rem); padding: .5rem; background: #fff;
  border: .0625rem solid var(--adm-ligne); border-radius: .5rem; box-shadow: 0 .5rem 1.75rem rgba(40,18,44,.18);
  font-size: .8125rem; color: var(--adm-texte); font-weight: 400; text-transform: none; letter-spacing: normal;
}
.adm-filtre-recherche { width: 100%; box-sizing: border-box; margin-bottom: .375rem; padding: .375rem .5rem; border: .0625rem solid var(--adm-ligne); border-radius: .25rem; font: inherit; }
.adm-filtre-liste { max-height: 14rem; overflow-y: auto; margin-bottom: .5rem; border: .0625rem solid var(--adm-ligne); border-radius: .25rem; padding: .125rem 0; }
.adm-filtre-item { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem; cursor: pointer; }
.adm-filtre-item[hidden] { display: none; }
.adm-filtre-item:hover { background: var(--wsh-bg-soft); }
.adm-filtre-item input { width: 1rem; height: 1rem; accent-color: var(--wsh-primary); flex: none; }
.adm-filtre-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-filtre-tout { margin-top: .125rem; font-weight: 600; }
.adm-filtre-vide { margin: .5rem; color: var(--adm-muted); }
.adm-filtre-actions { display: flex; align-items: center; justify-content: flex-end; gap: .5rem; }
.adm-filtre-actions [data-effacer] { margin-right: auto; }

/* Offre publiée : lignes cliquables + pop-up de visualisation */
#admin-offres-tbody tr.adm-ligne-cliquable { cursor: pointer; }
#admin-offres-tbody tr.adm-ligne-cliquable:hover { background: var(--wsh-bg-soft); }
.wsh-modal.wsh-modal-admin.offre-vue-modal { max-width: min(70rem, 96vw); width: 100%; max-height: 92vh; overflow-y: auto; padding: 1.75rem 2rem 2rem; }
.offre-vue-entete { display: flex; align-items: center; gap: .625rem; padding-right: 2rem; margin-bottom: .5rem; flex-wrap: wrap; }
.offre-vue-entete h3 { margin: 0; text-align: left; }
.offre-vue-crayon { display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; padding: 0; border: .0625rem solid var(--adm-ligne); border-radius: .5rem; background: #fff; color: var(--wsh-primary); cursor: pointer; flex: none; }
.offre-vue-crayon:hover, .offre-vue-crayon:focus-visible { background: var(--wsh-bg-soft); border-color: var(--wsh-primary-light); }
.offre-vue-crayon svg { width: 1rem; height: 1rem; }
.offre-vue-modal > .sub { text-align: left; margin: 0 0 1rem; }
.offre-vue-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: 0 0 1.25rem; }
.offre-vue-info dt { font-size: .71875rem; color: var(--adm-muted); margin: 0 0 .125rem; }
.offre-vue-info dd { margin: 0; font-size: .84375rem; font-weight: 500; }
@media (max-width: 640px) {
  .wsh-modal.wsh-modal-admin.offre-vue-modal { padding: 1.25rem 1rem 1.5rem; }
  .offre-vue-infos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.offre-vue-modal .adm-table { min-width: 0; }
.offre-vue-modal .adm-table td:first-child, .offre-vue-modal .adm-table th:first-child { text-align: left; }
.offre-vue-modal .adm-table-scroll { border: .0625rem solid var(--adm-ligne); border-radius: .75rem; }

/* --- Bandeau d'annulation (validation de commande différée) --- */
.adm-toast {
  position: fixed; left: 50%; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 1100;
  transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2rem);
  display: flex; align-items: center; gap: 1rem; padding: .75rem .75rem .75rem 1.125rem; overflow: hidden;
  border-radius: .75rem; background: #2f1a33; color: #fff; font-size: .875rem;
  box-shadow: 0 .5rem 1.75rem rgba(40,18,44,.35);
}
.adm-toast-texte { min-width: 0; }
.adm-toast-btn {
  flex: none; min-height: 2.25rem; padding: .375rem .875rem; border: 0; border-radius: .5rem;
  background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}
.adm-toast-btn:hover, .adm-toast-btn:focus-visible { background: rgba(255,255,255,.26); }
.adm-toast-barre {
  position: absolute; left: 0; bottom: 0; height: .1875rem; width: 100%; background: #e9a48c;
  transform-origin: left; animation: adm-toast-delai 5s linear forwards;
}
@keyframes adm-toast-delai { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .adm-toast-barre { animation: none; opacity: 0; } }

/* --- Écran étroit (téléphone, tablette) : tableaux affichés en cartes ------------------------------------------
   L'intitulé de colonne (data-label, posé par js/admin-tableaux-mobiles.js) précède chaque valeur.
   Les en-têtes triables / filtrables restent disponibles sous forme de pastilles. */
@media (max-width: 61.9375rem) {
  .adm-table-scroll { overflow-x: visible; }
  .adm-table { display: block; min-width: 0; }
  .adm-table thead { display: block; }
  .adm-table thead tr { display: flex; flex-wrap: wrap; gap: .375rem; padding: .625rem .75rem; background: #faf7f9; border-bottom: .0625rem solid var(--adm-ligne); }
  .adm-table thead th { display: none; }
  .adm-table thead th:has(button, input) {
    display: inline-flex; align-items: center; gap: .375rem; padding: .3125rem .625rem;
    border: .0625rem solid var(--adm-ligne); border-radius: 62.4375rem; background: #fff;
  }
  .adm-table thead th.adm-col-check { width: auto; }
  .adm-table thead th.adm-col-check::after { content: 'Tout'; font-weight: 600; }
  .adm-table .adm-sort::after { position: static; margin: 0 0 0 .125rem; }
  .adm-table tbody { display: block; padding: .625rem .75rem .125rem; }
  .adm-table tbody tr {
    display: block; position: relative; margin-bottom: .625rem; padding: .375rem 0;
    border: .0625rem solid var(--adm-ligne); border-radius: .75rem; background: #fff;
  }
  .adm-table tbody tr:hover > td, .adm-table tr.is-selected > td { background: none; }
  .adm-table tr.is-selected { background: #f7eff8; }
  .adm-table tr.is-nouvelle > td:first-child, .adm-table tr.is-a-traiter > td:first-child { box-shadow: none; }
  .adm-table tr.is-nouvelle, .adm-table tr.is-a-traiter { box-shadow: inset .1875rem 0 0 var(--adm-alerte); }
  /* Grille : intitulé à gauche, valeur(s) empilées et alignées à droite. */
  .adm-table td {
    display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); align-items: center; column-gap: .75rem;
    padding: .375rem .875rem; border: 0; text-align: right; overflow-wrap: anywhere;
  }
  .adm-table td > * { grid-column: 2; justify-self: end; max-width: 100%; }
  .adm-table td[data-label]::before {
    content: attr(data-label); grid-column: 1; grid-row: 1 / span 3; max-width: 9rem; text-align: left;
    font-size: .71875rem; font-weight: 600; color: var(--adm-muted);
  }
  .adm-table td:not([data-label]) { grid-template-columns: minmax(0, 1fr); }
  .adm-table td:not([data-label]) > * { grid-column: 1; }
  .adm-table td.adm-col-check, .adm-table td.adm-col-actions { width: auto; }
  .adm-table td.adm-col-actions { margin-top: .25rem; padding-top: .5rem; border-top: .0625rem solid var(--adm-ligne); }
  .adm-table td.adm-vide, .adm-table td.adm-suite, .adm-table tr.adm-apercu-row > td { display: block; text-align: center; }
  .adm-table tbody tr:has(> td.adm-vide) { border-style: dashed; }
  .adm-table tr.adm-apercu-row { margin-top: -.5rem; border-top-left-radius: 0; border-top-right-radius: 0; overflow: hidden; }
  /* !important : annule les troncatures propres à chaque tableau (#adm-table-comptes, #adm-table-prix-clients…). */
  .adm-table td .adm-tronque, .adm-table td .adm-sub { max-width: 100% !important; margin-inline: 0 !important; white-space: normal !important; }
  .adm-table .adm-date, .adm-table .adm-sub { text-align: right; }
}

/* --- Fiche commande ------------------------------------------ */
.wsh-modal.wsh-modal-admin.adm-fiche-cde { max-width: min(78rem, 96vw); width: 100%; overflow-x: hidden; }
/* Lignes de commande : en-têtes sur plusieurs lignes pour tenir dans la largeur, défilement interne en dernier recours. */
.adm-fiche-lignes .adm-apercu-table th { white-space: normal; min-width: 4.5rem; line-height: 1.25; vertical-align: bottom; }
.adm-fiche-lignes .adm-apercu-table td.adm-apercu-designation { min-width: 11rem; }
.adm-fiche-entete { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; margin: 0 2rem 1rem 0; }
.adm-fiche-entete h3 { margin: 0; }
.adm-fiche-infos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem 1.25rem; margin: 0 0 1.25rem; }
.adm-fiche-ligne { min-width: 0; }
.adm-fiche-ligne dt { font-size: .6875rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--adm-muted); }
.adm-fiche-ligne dd { margin: .125rem 0 0; font-size: .875rem; color: var(--adm-texte); overflow-wrap: anywhere; }
.adm-fiche-ligne dd a { color: var(--wsh-primary); }
.adm-fiche-commentaire { margin: 0 0 1.25rem; padding: .75rem 1rem; border-radius: .75rem; background: var(--wsh-bg-soft); }
.adm-fiche-commentaire h4, .adm-fiche-sous-titre { margin: 0 0 .375rem; font-size: .75rem; font-weight: 600; color: var(--adm-muted); text-transform: uppercase; letter-spacing: .04em; }
.adm-fiche-commentaire p { margin: 0; white-space: pre-wrap; font-size: .875rem; }
.adm-fiche-lignes { max-height: 22rem; overflow: auto; border: .0625rem solid var(--adm-ligne); border-radius: .75rem; }
.adm-fiche-lignes .adm-apercu-table { margin: 0; width: 100%; }
.adm-fiche-actions { flex-wrap: wrap; justify-content: space-between; gap: .5rem; }
.adm-fiche-actions-cde { display: flex; flex-wrap: wrap; gap: .5rem; }
.adm-fiche-actions-cde .adm-btn svg { width: .9375rem; height: .9375rem; }
.adm-cde-num { display: inline-flex; align-items: center; gap: .125rem; }
.adm-cde-num .adm-icon-plain { width: 1.75rem; height: 1.75rem; }
@media (max-width: 43.75rem) {
  .adm-fiche-infos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-fiche-actions-cde { width: 100%; }
  .adm-fiche-actions-cde .adm-btn { flex: 1 1 auto; }
}

/* --- Recherche globale (barre du haut) ----------------------- */
.adm-rg { position: relative; margin-left: auto; flex: 0 1 24rem; min-width: 0; }
.adm-rg ~ .adm-bar-droite { margin-left: 0; }
.adm-rg-ouvrir { display: none; width: 2.5rem; padding: 0; }
.adm-rg-ouvrir svg { width: 1.125rem; height: 1.125rem; }
.adm-rg-zone { position: relative; }
.adm-rg-champ input { width: 100%; padding-right: 2.25rem; }
.adm-rg-raccourci {
  position: absolute; right: .625rem; top: 50%; transform: translateY(-50%);
  min-width: 1.25rem; padding: 0 .3125rem; border: .0625rem solid var(--wsh-border); border-radius: .3125rem;
  font: inherit; font-size: .6875rem; line-height: 1.125rem; text-align: center; color: var(--adm-muted); background: #fff;
}
.adm-rg-champ input:focus + .adm-rg-raccourci, .adm-rg-champ input:not(:placeholder-shown) + .adm-rg-raccourci { display: none; }
.adm-rg-resultats {
  position: absolute; left: 0; right: 0; top: calc(100% + .375rem); z-index: 90;
  max-height: min(28rem, 70vh); overflow-y: auto; padding: .375rem;
  background: #fff; border: .0625rem solid var(--wsh-border); border-radius: .75rem; box-shadow: 0 .75rem 2rem rgba(74,32,80,.18);
}
.adm-rg-groupe + .adm-rg-groupe { margin-top: .25rem; padding-top: .25rem; border-top: .0625rem solid var(--adm-ligne); }
.adm-rg-groupe-titre { margin: .375rem .625rem .25rem; font-size: .65625rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--adm-muted); }
.adm-rg-groupe-titre span { text-transform: none; letter-spacing: 0; font-weight: 500; }
.adm-rg-item { display: flex; flex-direction: column; gap: .0625rem; padding: .5rem .625rem; border-radius: .5rem; cursor: pointer; }
.adm-rg-item.is-actif, .adm-rg-item:hover { background: var(--wsh-bg-soft); }
.adm-rg-item-titre { font-size: .8125rem; font-weight: 600; color: var(--adm-texte); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-rg-item-sous { font-size: .71875rem; color: var(--adm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-rg-vide { margin: 0; padding: 1rem .625rem; font-size: .8125rem; color: var(--adm-muted); text-align: center; }
.adm-rg-pied { margin: .25rem 0 0; padding: .375rem .625rem .125rem; border-top: .0625rem solid var(--adm-ligne); font-size: .6875rem; color: var(--adm-muted); }

/* Écran moyen ou petit : loupe dans la barre, champ déployé sous la barre. */
@media (max-width: 61.9375rem) {
  .adm-rg { flex: none; position: static; }
  .adm-rg-ouvrir { display: inline-flex; }
  .adm-rg-zone {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    padding: .625rem 1.125rem .75rem; background: #fff; border-bottom: .0625rem solid var(--wsh-border-soft);
    box-shadow: 0 .5rem 1rem rgba(74,32,80,.08);
  }
  .adm-rg.is-ouverte .adm-rg-zone { display: block; }
  .adm-rg-zone .adm-search input { width: 100%; }
  .adm-rg-resultats { left: 1.125rem; right: 1.125rem; top: calc(100% - .25rem); }
  .adm-rg-raccourci { display: none; }
  .adm-maj-info { display: none; }
}

/* --- Formulaires en étapes (js/admin-etapes.js) -------------- */
[data-etapes] .adm-etape:not(.is-active) { display: none; }
[data-etapes] .adm-etape details > summary { display: none; }
[data-etapes] .adm-etape details { margin-top: 0; border: 0; padding: 0; }
.adm-etapes-nav {
  display: flex; gap: .375rem; margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: none;
}
.adm-etapes-nav li { flex: 1 1 0; min-width: 0; }
.adm-etapes-nav button {
  display: flex; align-items: center; gap: .5rem; width: 100%; padding: .5rem .625rem .5625rem;
  border: 0; border-bottom: .1875rem solid var(--adm-ligne); background: none; cursor: pointer;
  font: inherit; font-size: .78125rem; font-weight: 600; color: var(--adm-muted); text-align: left;
}
.adm-etapes-nav button:hover { color: var(--wsh-primary); }
.adm-etapes-num {
  flex: none; display: grid; place-items: center; width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: var(--adm-ligne); color: #766970; font-size: .6875rem;
}
.adm-etapes-lib { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-etapes-nav button.is-faite { border-bottom-color: #c9b3cd; }
.adm-etapes-nav button.is-faite .adm-etapes-num { background: #c9b3cd; color: #fff; }
.adm-etapes-nav button.is-active { color: var(--wsh-primary); border-bottom-color: var(--wsh-primary); }
.adm-etapes-nav button.is-active .adm-etapes-num { background: var(--adm-corail-btn); color: #fff; }
@media (max-width: 43.75rem) {
  .adm-etapes-nav button:not(.is-active) .adm-etapes-lib { display: none; }
  .adm-etapes-nav li:has(button.is-active) { flex: 3 1 0; }
}

/* Écran moyen (992 à 1200 px) : colonnes resserrées pour tenir sans défilement horizontal. */
@media (min-width: 62rem) and (max-width: 75rem) {
  .adm-table { min-width: 0; }
  .adm-table th, .adm-table td { padding-inline: .4375rem; }
  .adm-table th { white-space: normal; }
  .adm-avis-retours { min-width: 10rem; }
}
/* Tablette : cartes sur deux colonnes. */
@media (min-width: 44rem) and (max-width: 61.9375rem) {
  .adm-table tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .625rem; align-items: start; }
  .adm-table tbody tr:has(> td.adm-vide), .adm-table tr.adm-apercu-row, .adm-table tr.adm-suite-row { grid-column: 1 / -1; }
}

/* --- Page « Trafic » ----------------------------------------- */
.trf .trf-kpis { margin: 1rem 0; }
.trf-card { margin-bottom: .75rem; }
.trf-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-bottom: .75rem; }
.trf-grille .trf-card { margin-bottom: 0; }
.trf-grille > .trf-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.trf-msg { margin: .75rem 0 0; padding: .625rem .875rem; border-radius: .625rem; background: var(--wsh-bg-soft); font-size: .875rem; }
.trf-exclus { list-style: none; margin: 0 0 .75rem; padding: 0; display: flex; flex-direction: column; gap: .375rem; }
.trf-exclus li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; padding: .5rem .75rem; border-radius: .625rem; background: var(--wsh-bg-soft); font-size: .875rem; }
.trf-note { margin: 0; font-size: .75rem; color: var(--adm-muted); }
.trf-actions { display: flex; gap: .375rem; justify-content: flex-end; flex-wrap: nowrap; }
.trf .adm-card-head { flex-wrap: wrap; }
.trf .adm-card-head .adm-search { flex: 0 1 16rem; min-width: 0; max-width: 100%; }
.trf .adm-card-head .adm-search input { width: 100%; box-sizing: border-box; }
@media (max-width: 47.5rem) { .trf-grille { grid-template-columns: minmax(0, 1fr); } }
/* Éléments cliquables des graphiques (détail des pages vues) */
.adm-chart-col.is-cliquable { cursor: pointer; border-radius: .375rem; }
.adm-chart-col.is-cliquable:hover .adm-chart-zone { background: var(--wsh-bg-soft); border-radius: .375rem; }
.adm-chart-col.is-cliquable:focus-visible { outline: 2px solid var(--wsh-primary); outline-offset: 2px; }
.adm-hbar.is-cliquable { cursor: pointer; border-radius: .5rem; margin: -.25rem -.375rem; padding: .25rem .375rem; }
.adm-hbar.is-cliquable:hover { background: var(--wsh-bg-soft); }
.adm-hbar.is-cliquable:focus-visible { outline: 2px solid var(--wsh-primary); outline-offset: 1px; }
.trf-kpi-lien { width: 100%; font: inherit; text-align: left; cursor: pointer; }
.trf-kpi-lien:hover { border-color: var(--wsh-primary-light); }
/* Graphique « Pages vues » du Trafic : plus haut que les graphiques du tableau de bord. */
#trf-jours .adm-chart { min-height: 18rem; }
@media (max-width: 43.75rem) { #trf-jours .adm-chart { min-height: 13rem; } }
/* Fenêtre « liste » des tuiles du Trafic (qui a installé l'application, qui est venu…). */
.wsh-modal.wsh-modal-admin.trf-liste-modal { max-width: min(52rem, 96vw); width: 100%; }
.trf-liste-seg { margin: 0 0 .75rem; }
.trf-liste-seg:empty { display: none; }
.trf-liste-modal .adm-table-scroll { max-height: min(60vh, 32rem); overflow: auto; border: .0625rem solid var(--adm-ligne); border-radius: .75rem; }
.trf-liste-modal .adm-table { margin: 0; width: 100%; min-width: 0; }

/* Boutons Exporter / Vider et fenêtre de vidage */
.trf-btn-ico { display: inline-flex; align-items: center; gap: .375rem; }
.trf-btn-ico svg { width: 1rem; height: 1rem; flex: none; }
.trf-vider { text-align: left; }
.trf-vider-choix { margin: 1rem 0 .75rem; padding: 0; border: 0; display: flex; flex-direction: column; gap: .5rem; }
.trf-vider-choix legend { margin-bottom: .5rem; font-size: .8125rem; font-weight: 600; color: var(--wsh-primary); }
.trf-vider-export { margin-bottom: .75rem; }
.trf-vider .trf-note { margin-bottom: .75rem; }
/* Fenêtre d'export compacte : tient sans barre de défilement sur un écran d'ordinateur. */
.wsh-modal.trf-export { padding: 1.375rem 1.5rem 1.25rem; max-height: 92vh; }
.trf-export .sub { margin-bottom: .625rem; }
.trf-export .trf-vider-choix { margin: .5rem 0; gap: .3125rem; }
.trf-export .trf-vider-choix legend { margin-bottom: .3125rem; }
.trf-export .adm-check { line-height: 1.3; }
.trf-export .adm-check .adm-sub-inline { font-size: .6875rem; line-height: 1.25; }
.trf-export .trf-vider-export { margin: .375rem 0 0; }
.trf-export .wsh-msg { margin: .5rem 0 0; }
.trf-export .wsh-modal-actions { margin-top: .75rem; }
.trf-export .adm-check { align-items: flex-start; }
.trf-export .adm-check input { margin-top: .1875rem; }
.trf-export .adm-check .adm-sub-inline { display: block; }
.trf-exp-dates { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; padding-left: 1.5rem; }
.trf-exp-dates .wsh-field-block { margin-bottom: 0; }
.trf-export .adm-check.is-inactif { opacity: .5; }

/* Détail des pages vues */
.trf-journal .adm-card-head { align-items: flex-start; }
.trf-j-barre { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: .75rem; }
.trf-journal .adm-filtres { margin: 0 0 .75rem; padding: .75rem .875rem; }
.trf-journal .adm-filtres .wsh-field-block { min-width: 8.5rem; flex: 1 1 8.5rem; }
.trf-j-puces { display: flex; flex-wrap: wrap; gap: .375rem; margin-bottom: .75rem; }
.trf-j-puce { display: inline-flex; align-items: center; gap: .25rem; padding: .25rem .25rem .25rem .625rem; border-radius: 999px; background: var(--adm-corail-pale); color: var(--adm-corail-fonce); font-size: .8125rem; font-weight: 600; }
.trf-j-puce button { display: inline-flex; align-items: center; justify-content: center; width: 1.375rem; height: 1.375rem; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.trf-j-puce button:hover { background: rgba(224,107,79,.18); }
.trf-j-puce svg { width: .8125rem; height: .8125rem; }
.trf-j-note { margin-bottom: .75rem; }
.trf-j-visites { display: flex; flex-direction: column; gap: .5rem; }
.trf-j-visite { padding: .75rem .875rem; border: .0625rem solid var(--adm-ligne); border-left: .25rem solid var(--adm-ligne); border-radius: .75rem; background: #fff; }
.trf-j-visite.is-client { border-left-color: #5d285f; }
.trf-j-visite-tete { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .375rem .75rem; margin-bottom: .5rem; }
.trf-j-visite-qui { font-size: .875rem; min-width: 0; }
.trf-j-visite-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem; font-size: .75rem; }
.trf-j-heure { font-weight: 600; color: var(--wsh-primary); font-variant-numeric: tabular-nums; margin-right: .125rem; }
.trf-j-tag { display: inline-block; padding: .125rem .5rem; border-radius: 999px; background: var(--wsh-bg-soft); color: var(--adm-muted); white-space: nowrap; }
.trf-j-tag.is-fort { background: var(--adm-corail-pale); color: var(--adm-corail-fonce); font-weight: 600; }
.trf-j-tag.is-app { background: rgba(93,40,95,.1); color: #5d285f; font-weight: 600; }
.trf-j-anonyme { font-weight: 600; color: var(--adm-muted); }
.trf-j-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.trf-j-connu { font-size: .75rem; color: var(--adm-muted); }
.trf-j-parcours { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .375rem; font-size: .8125rem; }
.trf-j-parcours li { display: inline-flex; align-items: baseline; gap: .3125rem; }
.trf-j-parcours li + li::before { content: "→"; color: var(--adm-muted); margin-right: .0625rem; }
.trf-j-parcours time { font-size: .6875rem; color: var(--adm-muted); font-variant-numeric: tabular-nums; }
.trf-j-quand { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 40rem) {
  .trf-j-barre .adm-seg { display: flex; flex-wrap: wrap; width: 100%; box-sizing: border-box; }
  .trf-j-barre .adm-seg-btn { flex: 1 1 auto; padding-left: .5rem; padding-right: .5rem; white-space: nowrap; }
  .trf-journal .adm-filtres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .625rem; }
  .trf-journal .adm-filtres .wsh-field-block { min-width: 0; }
  .trf-journal .adm-filtres .wsh-field-block input, .trf-journal .adm-filtres .wsh-field-block select { min-width: 0; width: 100%; box-sizing: border-box; }
  .trf-journal .adm-filtres .wsh-link-btn { grid-column: 1 / -1; justify-self: start; margin-bottom: 0; }
  .trf-j-parcours { flex-direction: column; align-items: flex-start; }
  .trf-j-parcours li + li::before { content: none; }
}

/* Graphique sans donnée : 0 affiché */
.adm-zero { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .375rem; min-height: 8rem; text-align: center; }
.adm-zero-val { font-size: 2.25rem; font-weight: 600; line-height: 1; color: var(--wsh-primary); font-variant-numeric: tabular-nums; }
.adm-zero-lib { font-size: .8125rem; color: var(--adm-muted); }
.adm-carousel-pane > .adm-zero { flex: 1 1 auto; }
.adm-pie.is-vide .adm-pie-total { color: var(--adm-muted); }
.adm-pie-aucune { font-size: .8125rem; color: var(--adm-muted); }
.adm-chart-col.is-vide .adm-chart-val { color: var(--adm-muted); font-weight: 500; }

/* Beaucoup de colonnes sur petit écran : valeurs au survol / appui (title) seulement, libellés réduits. */
@media (max-width: 40rem) {
  .adm-chart.trf-dense .adm-chart-val { visibility: hidden; }
  .adm-chart.trf-dense .adm-chart-lbl { font-size: .5625rem; }
}

/* Champ « Numéro client » : bouton + vers le listing Flo'W (flow-autocomplete.js). */
.flow-ac { position: relative; display: flex; align-items: center; gap: 0.5rem; }
.flow-ac-ligne { flex: 1; min-width: 0; }
.flow-ac-ligne > input { width: 100%; }
.flow-ac-btn {
  width: 2rem; height: 2rem; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 0.0625rem solid var(--wsh-border); background: #fff; color: var(--wsh-primary);
  cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.flow-ac-btn svg { width: 1rem; height: 1rem; }
.flow-ac-btn:hover, .flow-ac-btn:focus-visible,
.flow-ac-btn[aria-expanded="true"] { background: var(--wsh-primary); border-color: var(--wsh-primary); color: #fff; outline: none; }
.flow-ac-panel {
  position: fixed; z-index: 1000;   /* top / left / largeur calculés par flow-autocomplete.js */
  border: 0.0625rem solid var(--wsh-border); border-radius: 0.75rem; background: #fff; overflow: hidden;
  box-shadow: 0 0.75rem 2rem rgba(74,32,80,.22);
}
.flow-ac-panel[hidden] { display: none; }
.flow-ac-entete {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.875rem; background: var(--wsh-bg-soft); border-bottom: 0.0625rem solid var(--wsh-border-soft);
}
.flow-ac-titre { font-size: 0.84375rem; font-weight: 700; color: var(--wsh-primary); }
.flow-ac-compte { margin-left: auto; font-size: 0.75rem; color: #6b5f6b; white-space: nowrap; }
.flow-ac-panel .flow-ac-search {
  display: block; width: 100%; border: none; border-bottom: 0.0625rem solid var(--wsh-border-soft); border-radius: 0;
  padding: 0.625rem 0.875rem; font-size: 0.84375rem; outline: none; font-family: inherit; box-shadow: none; background: #fff;
}
.flow-ac-liste { max-height: 16.25rem; overflow-y: auto; overscroll-behavior: contain; }
.flow-ac-item {
  display: block; width: 100%; text-align: left; background: none; border: none; border-bottom: 0.0625rem solid var(--wsh-border-soft);
  padding: 0.5625rem 0.875rem; cursor: pointer; font-family: inherit;
}
.flow-ac-item:last-child { border-bottom: none; }
.flow-ac-item:hover, .flow-ac-item:focus-visible { background: var(--wsh-bg-soft); outline: none; }
.flow-ac-item.is-actuel { box-shadow: inset 0.1875rem 0 0 var(--wsh-primary); }
.flow-ac-nom { display: block; font-size: 0.84375rem; font-weight: 600; color: #2a2a2a; }
.flow-ac-num { color: var(--wsh-primary-light); font-weight: 600; }
.flow-ac-detail { display: block; font-size: 0.75rem; color: #6b5f6b; margin-top: 0.0625rem; overflow-wrap: anywhere; }
.flow-ac-vide { padding: 1rem 0.875rem; font-size: 0.8125rem; color: #786976; text-align: center; }
.flow-ac-vide.is-erreur { color: var(--wsh-red); }
.flow-ac-info {   /* même aspect que les aides de champ (.wsh-field-help), une ligne arrêtée avant le bouton + */
  max-width: calc(100% - 2.5rem); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default;
}
.flow-ac-info:empty { display: none; }


/* ============================================================
   TOUCHES CORAIL — administration uniquement (scopé sous .adm)
   ============================================================ */
/* Raccourcis du tableau de bord (« Créer un compte », etc.) */
.adm-shortcut svg { color: var(--adm-corail); }
.adm-shortcut:hover { background: var(--adm-corail-pale); border-color: var(--adm-corail); }
/* Icônes des cartes « à faire » */
.adm-todo-ico { background: var(--adm-corail-pale); color: var(--adm-corail); }
/* Survol des cartes KPI / à faire */
.adm-kpi:hover, .adm-todo-card:hover { border-color: var(--adm-corail); }
/* Liens d'action (« Voir tout », etc.) */
.adm-card-head .adm-link { color: var(--adm-corail-fonce); }
/* Boutons de validation des pop-ups ouvertes depuis l'administration */
.adm .wsh-btn-submit { background: var(--adm-corail-btn); }
.adm .wsh-btn-submit:hover:not(:disabled) { background: var(--adm-corail-fonce); }
/* Bouton « + Créer » et soulignés d'accent */
.adm-btn-ghost.is-active { border-color: var(--adm-corail); }

/* V3_149 : produits programmés d'une période du Guide des saisons */
.cal-prod-recherche { position: relative; }
.cal-prod-resultats {
  margin-top: .25rem; max-height: 14rem; overflow-y: auto;
  list-style: none; margin: 0; padding: .25rem; background: #fff; border: 1px solid var(--wsh-border); border-radius: .75rem;
  box-shadow: 0 .75rem 2rem rgba(43,23,48,.14);
}
.cal-prod-resultats[hidden] { display: none; }
.cal-prod-resultats button {
  display: flex; flex-direction: column; align-items: flex-start; gap: .125rem; width: 100%; padding: .5rem .625rem; border: 0; border-radius: .5rem;
  background: none; font: inherit; text-align: left; cursor: pointer;
}
.cal-prod-resultats button:hover:not(:disabled) { background: var(--adm-corail-pale); }
.cal-prod-resultats button:disabled { opacity: .5; cursor: default; }
.cal-prod-resultats strong { font-size: .8125rem; color: #2b1f2b; }
.cal-prod-resultats small, .cal-prod-choisis small { font-size: .6875rem; color: #786976; }
.cal-prod-resultats .is-info { padding: .625rem; font-size: .8125rem; color: #786976; }
.cal-prod-choisis { list-style: none; margin: .5rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .375rem; }
.cal-prod-choisis:empty { display: none; }
.cal-prod-choisis li { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .625rem; border: 1px solid var(--wsh-border); border-radius: .625rem; background: #fdfbfa; }
.cal-prod-choisis li span { display: flex; flex-direction: column; min-width: 0; }
.cal-prod-choisis strong { font-size: .8125rem; color: #2b1f2b; }
.cal-prod-choisis button { width: 1.75rem; height: 1.75rem; flex-shrink: 0; border: 0; border-radius: 50%; background: #f4eef2; color: #7d717b; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.cal-prod-choisis button:hover { background: var(--adm-corail-pale); color: var(--adm-corail-fonce); }
.cal-prod-resultats button.is-libre strong { color: var(--adm-corail-fonce); }
.cal-prod-choisis li.is-libre { background: #fff; border-style: dashed; }
.cal-prod-choisis li.is-libre span { flex: 1; gap: .25rem; }
.cal-prod-choisis li.is-libre input { width: 100%; padding: .375rem .5rem; border: 1px solid var(--wsh-border); border-radius: .5rem; font: inherit; font-size: .8125rem; }


/* Téléphone : cartes compactes sur deux colonnes (intitulé au-dessus de la valeur) ; deux fois
   moins de hauteur par ligne qu'une cellule par ligne. Actions, aperçus et messages : pleine largeur. */
@media (max-width: 43.75rem) {
  .adm-table tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: .5rem .25rem .25rem; }
  .adm-table td {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: .125rem;
    padding: .3125rem .625rem; text-align: left;
  }
  .adm-table td > * { justify-self: auto; max-width: 100%; }
  .adm-table td[data-label]::before { max-width: none; font-size: .65625rem; letter-spacing: .02em; }
  .adm-table .adm-date, .adm-table .adm-sub, .adm-table td .adm-tronque { text-align: left; }
  .adm-table td.adm-col-check { position: absolute; top: .375rem; right: .375rem; padding: .25rem; }
  .adm-table td.adm-col-check::before { display: none; }
  .adm-table td.adm-col-actions {
    grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end;
    margin-top: .25rem; padding-top: .5rem;
  }
  .adm-table td.adm-col-actions::before { display: none; }
  .adm-table td.adm-vide, .adm-table td.adm-suite, .adm-table tr.adm-apercu-row > td, .adm-table td[colspan] { grid-column: 1 / -1; }
  .adm-table tr.adm-apercu-row, .adm-table tr:has(> td.adm-vide), .adm-table tr.adm-suite-row { display: block; padding: 0; }
}

/* ============================================================
   Formulaires de paramétrage (ILV, Guide des saisons) : titres corail,
   sections numérotées repliables avec résumé, explications derrière un œil.
   ============================================================ */
.wsh-modal-admin > h3 { color: var(--adm-corail-fonce); }
.adm-section { margin: 0 0 0.75rem; border: 0.0625rem solid var(--wsh-border); border-radius: 0.875rem; background: #fff; }
.adm-section > summary {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.6875rem 0.875rem; cursor: pointer; list-style: none;
  font-size: 0.875rem; font-weight: 700; color: var(--adm-corail-fonce); border-radius: 0.875rem;
}
.adm-section > summary::-webkit-details-marker { display: none; }
.adm-section > summary::after {
  content: ''; flex-shrink: 0; width: 0.5rem; height: 0.5rem; margin-left: 0.25rem;
  border-right: 0.125rem solid currentColor; border-bottom: 0.125rem solid currentColor; transform: rotate(45deg) translateY(-0.125rem);
  transition: transform .2s ease;
}
.adm-section[open] > summary::after { transform: rotate(-135deg) translateY(-0.125rem); }
.adm-section > summary:hover { background: var(--adm-corail-pale); }
.adm-section[open] > summary { border-bottom: 0.0625rem solid #f3ebef; border-radius: 0.875rem 0.875rem 0 0; }
.adm-section-num {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 1.375rem; height: 1.375rem;
  border-radius: 50%; background: var(--adm-corail); color: #fff; font-size: 0.71875rem;
}
.adm-section-resume { flex: 1; min-width: 0; margin-left: 0.25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; font-size: 0.71875rem; font-weight: 500; color: #786976; }
.adm-section > :not(summary) { margin-left: 0.875rem; margin-right: 0.875rem; }
.adm-section > :not(summary):first-of-type { margin-top: 0.75rem; }
.adm-section > :last-child { margin-bottom: 0.75rem; }
.adm-section .wsh-field-block > label:not(.adm-check), .adm-section .wsh-field-block > .adm-label-aide { color: var(--adm-corail-fonce); font-weight: 600; }

/* Explications : masquées, œil à droite du libellé */
.adm-aide { display: none !important; }
.adm-aide.is-visible { display: block !important; }
.adm-label-aide { display: flex !important; align-items: center; gap: 0.375rem; }
.adm-label-lien { margin-left: 0.25rem; font-size: 0.6875rem; font-weight: 500; }
.adm-aide-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem; margin-left: auto; flex-shrink: 0;
  min-width: 1.375rem; height: 1.375rem; padding: 0 0.25rem; border: 0; border-radius: 62.4375rem; background: transparent;
  color: #b9abb6; font: inherit; font-size: 0.6875rem; font-weight: 600; cursor: pointer;
}
.adm-aide-btn svg { width: 0.875rem; height: 0.875rem; }
.adm-aide-btn:hover, .adm-aide-btn.is-actif { color: var(--adm-corail-fonce); background: var(--adm-corail-pale); }
.adm-aide-ligne { display: flex; justify-content: flex-end; margin: -0.25rem 0 0.25rem; }
.adm-aide-ligne .adm-aide-btn { margin-left: 0; padding: 0 0.5rem; }
p.ntf-aide.adm-aide.is-visible { margin-top: 0; }
/* Assistants par étapes (code promo, activation fid', pop-up) : même accent corail que les sections. */
.adm-etapes-nav button.is-active .adm-etapes-num { background: var(--adm-corail); color: #fff; }
.adm-etapes-nav button.is-active { border-bottom-color: var(--adm-corail); }
.adm-etapes-nav button.is-active .adm-etapes-lib { color: var(--adm-corail-fonce); }
[data-etapes] .wsh-field-block label:not(.adm-check):not(.wsh-multiselect-option) { color: var(--adm-corail-fonce); font-weight: 600; }
.wsh-modal .adm-aide-ligne { margin: 0.125rem 0 0.25rem; }
.adm-grid-3-span.adm-aide-ligne, .adm-aide-ligne:has(+ .adm-grid-3-span) { grid-column: 1 / -1; }
.cpt-code-liste .adm-nom { font-size: 0.8125rem; }

/* Offres types (meubles de vente) */
.ot-lignes li { display: grid !important; grid-template-columns: 1fr 4.5rem 5.5rem auto; align-items: center; gap: 0.5rem; }
.ot-l-champ { display: flex; flex-direction: column; gap: 0.125rem; font-size: 0.625rem; color: #786976; }
.ot-l-champ input { width: 100%; padding: 0.3125rem 0.375rem; border: 0.0625rem solid var(--wsh-border); border-radius: 0.5rem; font: inherit; font-size: 0.78125rem; }
.ot-offerts { list-style: none; margin: 0 0 0.5rem; padding: 0; display: flex; flex-direction: column; gap: 0.375rem; }
.ot-offerts:empty { display: none; }
.ot-offerts li { display: grid; grid-template-columns: 1fr 10rem 4.5rem auto; gap: 0.375rem; align-items: center; }
.ot-offerts input { width: 100%; min-width: 0; padding: 0.4375rem 0.5rem; border: 0.0625rem solid var(--wsh-border); border-radius: 0.5rem; font: inherit; font-size: 0.78125rem; }
.ot-offerts button { width: 1.75rem; height: 1.75rem; border: 0; border-radius: 50%; background: #f4eef2; color: #7d717b; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.ot-apercu .adm-sub { display: block; margin: 0 0 0.5rem; }
.ot-apercu-table tfoot td { border-top: 0.125rem solid var(--wsh-border); background: #fbf8fa; }
@media (max-width: 43.75rem) { .ot-lignes li { grid-template-columns: 1fr 1fr auto; } .ot-lignes li > span { grid-column: 1 / -1; } .ot-offerts li { grid-template-columns: 1fr 1fr; } }

/* Offres podium : description au survol du nom de l'offre */
#ot-tbody [data-ot-desc] { cursor: help; text-decoration: underline dotted rgba(74,32,80,0.35); text-underline-offset: 0.1875rem; }
.ot-bulle {
  position: fixed; z-index: 3000; max-width: 22rem; padding: 0.5rem 0.75rem; border-radius: 0.625rem;
  background: #2b1f2b; color: #fff; font-size: 0.75rem; line-height: 1.45; white-space: pre-line;
  box-shadow: 0 0.5rem 1.5rem rgba(43,31,43,0.25); pointer-events: none;
}

/* ============================================================
   v199 - Cohérence et confort de l'administration
   ============================================================ */
/* Sélecteurs segmentés (Nouvelles / Validées / ... / Toutes) : sur téléphone, défilement horizontal au lieu
   d'un débordement masqué qui rendait le dernier onglet inaccessible. */
@media (max-width: 900px) {
  .adm-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .adm-seg::-webkit-scrollbar { display: none; }
  .adm-seg-btn { flex-shrink: 0; }
}
/* Téléphone : pastilles de tri / filtre des colonnes sur une seule ligne qui défile (au lieu de 4 à 5 lignes
   empilées avant le premier résultat). Les fenêtres de filtre sont en position fixe : elles ne sont pas rognées. */
@media (max-width: 43.75rem) {
  .adm-table thead tr { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .adm-table thead tr::-webkit-scrollbar { display: none; }
  .adm-table thead th:has(button, input) { flex-shrink: 0; white-space: nowrap; }
}
/* Fenêtres de paramétrage : libellés en corail partout (comme les formulaires en étapes et les sections numérotées). */
.wsh-modal-admin .wsh-field-block > label:not(.adm-check):not(.wsh-filter-checkbox):not(.wsh-multiselect-option) { color: var(--adm-corail-fonce); font-weight: 600; }

/* v260 - Synchronisation des fiches produit : deux boutons empilés (« Synchroniser », « Tout relire »). */
.adm-sync-actions { display: flex; flex-direction: column; gap: .5rem; flex-shrink: 0; }
.adm-sync-btn-second { font-size: .75rem; }
@media (max-width: 900px) { .adm-sync-actions { width: 100%; } }

/* v272 - Détail des pages vues : aperçu des 5 plus récentes + « Tout voir », bouton de suppression. */
.trf-j-plus { display: flex; justify-content: center; margin-top: .75rem; }
.trf-j-visite-meta .trf-j-suppr { width: 1.75rem; height: 1.75rem; margin-left: .125rem; }
.trf-j-table .adm-col-actions { width: 2.5rem; text-align: right; }
.trf-j-table .adm-icon-btn { width: 1.75rem; height: 1.75rem; }
@media (max-width: 640px) {
  .trf-j-visite-meta .trf-j-suppr, .trf-j-table .adm-icon-btn { width: 2.75rem; height: 2.75rem; }
}
