:root {
  /* Couleurs du logo ZK : vert Zenkaa #1d5e55, anthracite #3b3d3f. */
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-alt: #fafbfa;
  --surface-sunken: #eff2f1;
  --border: #e3e8e6;
  --border-strong: #d3dad7;
  --text: #1b1f1e;
  --text-muted: #636a68;
  --text-faint: #99a09e;
  --primary: #1d5e55;
  --primary-hover: #154942;
  --primary-bg: #e7f1ef;
  --primary-border: #bcd9d3;
  --primary-ring: rgba(29, 94, 85, 0.18);
  /* Fonds verts à texte blanc (boutons, onglets actifs) : le vert ZK même en mode sombre, où --primary devient menthe. */
  --primary-fill: var(--primary);
  --primary-fill-hover: var(--primary-hover);
  --success: #16a35a;
  --success-bg: #e9f9ef;
  --success-border: #bfe9cd;
  --warning: #b45309;
  --warning-bg: #fef6e7;
  --warning-border: #f3ddab;
  --danger: #e0332b;
  --danger-bg: #fdecec;
  --danger-border: #f5bcba;
  /* Teintes d'appoint, toujours par ces variables : violet (à venir, IA, question), orange vif
     (offre exclusive), remplissage des barres « à compléter », bleu du travail (informations renseignées). */
  --accent: #6d3fd1;
  --accent-bg: #f3edff;
  --accent-border: #dccdfa;
  --accent-soft: #8b5cf6;
  --exclusive: #c2410c;
  --warning-fill: #f0b04a;
  --warning-soft: #f59e0b;
  --info: #3b6fd8;
  --info-bg: #c9d7f5;
  --anthracite: #3b3d3f;
  /* Tableau « À faire » façon Trello : fond vert ZK en dégradé, colonnes grises, cartes blanches. */
  --board-bg: linear-gradient(135deg, var(--primary) 0%, #236b5f 55%, #2d7f70 100%);
  --list-bg: #f1f3f2;
  --card-shadow: 0 1px 1px rgba(20, 30, 28, .2), 0 0 1px rgba(20, 30, 28, .3);
  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-xs: 0 1px 2px rgba(20, 30, 28, 0.05);
  --shadow-sm: 0 2px 6px rgba(20, 30, 28, 0.06), 0 1px 2px rgba(20, 30, 28, 0.04);
  --shadow-md: 0 8px 24px rgba(20, 30, 28, 0.10), 0 2px 6px rgba(20, 30, 28, 0.05);
  --sidebar-w: 200px;  /* resserré (avis n° 56) : plus de place pour le contenu */
}

* { box-sizing: border-box; }
/* Les composants qui fixent leur propre `display` (.alert, .pick-card…) ne doivent pas
   ignorer l'attribut `hidden`. */
[hidden] { display: none !important; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 4px; letter-spacing: -0.01em; }
.page-header { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header h1 { font-size: 21px; font-weight: 700; }
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }

/* --- App shell: sidebar + content --- */
.app-shell { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 16px 10px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0 20px 6px;
}
.zk-mark { flex: none; display: block; }
.sidebar-brand-name { font-weight: 700; font-size: 14.5px; line-height: 1.2; color: var(--text); white-space: nowrap; }
.sidebar-brand-name small { display: block; font-weight: 500; font-size: 11px; color: var(--text-faint); }

.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}
.sidebar-nav a svg { flex: none; opacity: .85; }
.sidebar-nav a:hover { background: var(--surface-alt); color: var(--text); text-decoration: none; }
.sidebar-nav a.active { background: var(--primary-bg); color: var(--primary-hover); font-weight: 600; }
.sidebar-nav a.active svg { opacity: 1; }
.nav-count {
  margin-left: auto; min-width: 19px; height: 19px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
}
.nav-count.is-work { background: var(--primary-bg); color: var(--primary-hover); }
.sidebar-nav a.active .nav-count.is-work { background: var(--primary-fill); color: #fff; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 8px; min-width: 0; flex: 1;
}
a.sidebar-user { color: inherit; text-decoration: none; border-radius: var(--radius-sm); }
a.sidebar-user:hover .sidebar-user-email { color: var(--text); }
.sidebar-user-avatar {
  width: 26px; height: 26px; border-radius: 999px; flex: none;
  background: var(--primary-bg); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
/* Le Zenk (recompenses.py) à la place de l'initiale, pour ceux qui corrigent : un clic ouvre Mon tableau. */
a.sidebar-user-avatar.is-zenk { width: 30px; height: 30px; overflow: hidden; text-decoration: none; }
a.sidebar-user-avatar.is-zenk:hover { box-shadow: 0 0 0 2px var(--primary-border); }
.sidebar-user-avatar .zenk { display: block; margin-top: 3px; }
dialog.modal.zenk-palier { width: min(380px, calc(100vw - 32px)); text-align: center; }
dialog.zenk-palier[open] { animation: fix-in .2s ease-out; }
.zenk-palier-art { display: flex; justify-content: center; margin: 2px 0 8px; }
.zenk-palier h3 { font-size: 20px; margin: 0 0 4px; }
.zenk-palier-niveau { margin: 0; color: var(--text-muted); }
.zenk-palier-niveau b { color: var(--primary); }
.zenk-palier-gain { margin: 6px 0 18px; color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.zenk-palier .modal-actions { justify-content: center; }
.zenk-anime { animation: zenk-hop 2.4s ease-in-out infinite; }
@keyframes zenk-hop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@media (prefers-reduced-motion: reduce) { .zenk-anime { animation: none; } }
.sidebar-user-email {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-footer form { flex: none; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.icon-btn:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

main { flex: 1; min-width: 0; }
/* Le contenu prend toute la largeur de l'écran (avis n° 55) ; seuls les longs textes gardent une
   largeur de lecture confortable. */
.content { max-width: none; margin: 0; padding: 26px 32px 60px; }
.tuto-text, .page-subtitle { max-width: 980px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.card-muted-note { color: var(--text-muted); font-size: 13px; margin: 0 0 14px; line-height: 1.55; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.field-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=date], input[type=file], select {
  font-family: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-width: 0;
  transition: border-color .12s ease, box-shadow .12s ease;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-ring);
}
input::placeholder { color: var(--text-faint); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { flex: none; }
.btn-primary { background: var(--primary-fill); color: white; box-shadow: 0 1px 2px rgba(29,94,85,.25); }
.btn-primary:hover { background: var(--primary-fill-hover); text-decoration: none; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-alt); text-decoration: none; border-color: var(--text-faint); }
.btn-danger { background: var(--surface); color: var(--danger); border-color: var(--danger-border); }
.btn-danger:hover { background: var(--danger-bg); text-decoration: none; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

table { width: 100%; border-collapse: collapse; }
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  /* Un tableau large défile dans son cadre plutôt que de couper sa dernière colonne. */
  overflow-x: auto;
}
th, td { padding: 12px 16px; text-align: left; font-size: 13.5px; }
thead th {
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background .1s ease; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface-alt); }
td.muted, .muted { color: var(--text-muted); }
code {
  background: var(--surface-sunken);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 12.5px;
  color: #3b3d3f;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  letter-spacing: .01em;
}
.badge-active { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-upcoming { background: var(--primary-bg); color: var(--primary-hover); border-color: var(--primary-border); }
.badge-expired { background: var(--surface-sunken); color: var(--text-faint); border-color: var(--border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); cursor: help; }
/* Priorité de correction (priority.py) : urgent, important, à améliorer, faible. */
.badge-prio { cursor: help; white-space: nowrap; vertical-align: middle; }
.badge-prio-1 { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.badge-prio-2 { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-prio-3 { background: var(--primary-bg); color: var(--primary-hover); border-color: var(--primary-border); }
.badge-prio-4 { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); }

.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 15px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.5;
}
.alert svg { flex: none; margin-top: 1px; }
.alert-error { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.chip-group { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  padding: 9px 12px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  transition: all .12s ease;
}
.chip:hover { border-color: var(--text-faint); color: var(--text); }
.chip.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary-hover); }
.category-chips { margin-top: 12px; }
.category-chips .chip { padding: 5px 11px; text-decoration: none; }
.category-link { color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; }
.category-link:hover { color: var(--primary); }

.margin-neg { color: var(--danger); }

.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-muted);
  font-size: 13.5px;
}
.card .empty-state, td .empty-state { padding: 22px 16px; }  /* dans une carte ou un tableau : plus serré */

.stat-row { display: flex; gap: 14px; margin-bottom: 18px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  padding: 14px 18px;
  flex: 1;
}
.stat .stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat .stat-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; margin-top: 2px; }
.stat.stat-ok .stat-value { color: var(--success); }
.stat.stat-error .stat-value { color: var(--danger); }
/* Omnibus : mêmes couleurs que les autres statuts, toujours avec icône et libellé. */
.omnibus-reduction { background: var(--success-bg); color: var(--success); border-color: var(--success-border); cursor: help; }
.omnibus-not_reduction, .omnibus-too_small { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); cursor: help; }
.omnibus-unknown { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); cursor: help; }
.omnibus-confirm { align-items: flex-start; }
.omnibus-list { margin: 0 0 8px; padding-left: 18px; font-size: 13px; max-height: 220px; overflow-y: auto; }
.omnibus-list li { margin-bottom: 4px; }
.omnibus-confirm .platform-check { background: var(--surface); }
.clamp-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 280px;
}


.row-error { background: var(--danger-bg) !important; }

.platform-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; }
.platform-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  user-select: none;
  transition: all .12s ease;
}
.platform-check:hover { border-color: var(--text-faint); }
.platform-check:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-bg);
  color: var(--primary-hover);
}
.platform-check input { margin: 0; }
/* Dès qu'une plateforme est cochée, les autres s'effacent pour faire ressortir la sélection ;
   le survol les rend lisibles pour en ajouter une. */
.platform-checkboxes:has(input:checked) .platform-check:not(:has(input:checked)) {
  opacity: .45; background: var(--surface-alt); border-color: var(--border);
}
.platform-checkboxes:has(input:checked) .platform-check:not(:has(input:checked)) img.platform-logo { filter: grayscale(1); }
.platform-checkboxes:has(input:checked) .platform-check:not(:has(input:checked)):hover { opacity: 1; }
/* Une case est un choix, pas un titre de champ : elle n'hérite pas du style de `.field label`. */
.field .platform-check { text-transform: none; letter-spacing: normal; font-size: 13px; font-weight: 500; color: var(--text); }
.platform-check img.platform-logo { width: 16px; height: 16px; object-fit: contain; border-radius: 3px; }

.platform-cell { display: flex; align-items: center; gap: 8px; }
.platform-stack { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; cursor: help; }
.platform-more {
  display: inline-flex; align-items: center; justify-content: center;
  height: 24px; padding: 0 7px; border-radius: 6px;
  background: var(--surface-alt); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--text-muted);
}

.table-footer {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap;
  padding: 12px 4px 0;
  font-size: 12.5px;
}
.platform-avatar {
  width: 24px; height: 24px; border-radius: 6px; object-fit: contain;
  background: #fff; border: 1px solid var(--border); flex: none;
}
.platform-avatar-fallback {
  width: 24px; height: 24px; border-radius: 6px; flex: none;
  background: var(--primary-bg); color: var(--primary-hover);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}

form.inline { display: inline; }

/* À faire : une ligne par tâche, sa pastille à cocher, son échéance colorée selon l'urgence. */
.task-list { list-style: none; margin: 0; padding: 0; }
.task-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 2px; border-top: 1px solid var(--border);
}
.task-item:first-child { border-top: none; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-weight: 600; font-size: 14px; }
.task-meta { font-size: 12.5px; color: var(--text-muted); }
.task-meta a { display: inline-flex; align-items: center; gap: 3px; }
.task-check {
  width: 20px; height: 20px; margin-top: 1px; padding: 0; border-radius: 999px; cursor: pointer;
  border: 2px solid var(--border-strong); background: var(--surface); color: var(--success);
  display: inline-flex; align-items: center; justify-content: center;
}
.task-check:hover { border-color: var(--success); background: var(--success-bg); }
.task-check.is-checked { border: none; background: none; }
/* Avis : le message garde ses retours à la ligne ; une couleur par nature d'avis. */
.feedback-message { font-size: 14px; white-space: pre-line; margin-top: 2px; }
.feedback-dialog textarea {
  width: 100%; font-family: inherit; font-size: 14px; padding: 9px 12px; line-height: 1.5; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.feedback-dialog textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.sidebar-help { display: flex; gap: 4px; margin-top: 12px; }
.sidebar-help .btn { justify-content: center; text-decoration: none; padding: 6px 6px; gap: 4px; font-size: 12px; white-space: nowrap; }
.sidebar-help .btn svg { width: 13px; height: 13px; flex: none; }
.sidebar-feedback { flex: 1; }
/* Pièces jointes des avis */
.att-zone { margin-top: 8px; padding: 8px 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
            display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 12.5px; color: var(--text-muted); }
.att-zone.is-over { border-color: var(--primary); background: var(--primary-bg); }
.att-pick { color: var(--primary); font-weight: 600; cursor: pointer; }
.att-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.att-list { display: contents; }
.att-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 8px; border-radius: 999px;
            background: var(--surface-alt); border: 1px solid var(--border); color: var(--text); max-width: 240px; }
.att-chip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-remove { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--text-muted); padding: 0 3px; }
.att-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.att-thumb { display: block; width: 96px; height: 64px; border-radius: 6px; border: 1px solid var(--border); overflow: hidden; background: #fff; }
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-thumb:hover { border-color: var(--primary); }
.att-pdf { display: inline-flex; align-items: center; gap: 6px; height: 64px; padding: 0 12px; border-radius: 6px;
           border: 1px solid var(--border); background: var(--surface-alt); font-size: 12.5px; color: var(--text); text-decoration: none; }
.att-pdf:hover { border-color: var(--primary); text-decoration: none; }
/* Avis : avancement en tête, puis une section par étape ; chaque avis garde son fil de suivi. */
.btn-success { background: var(--success); color: #fff; box-shadow: 0 1px 2px rgba(22,163,90,.25); }
.btn-success:hover { filter: brightness(.95); text-decoration: none; }
.btn-ghost { background: none; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover { color: var(--text); background: var(--surface-alt); border-color: var(--border); text-decoration: none; }
.fb-progress { margin-bottom: 18px; }
.fb-bar { display: flex; gap: 2px; height: 6px; border-radius: 999px; overflow: hidden; background: var(--surface-sunken); margin-bottom: 8px; }
.fb-bar-seg.is-valide, .fb-legend i.is-valide { background: var(--success); }
.fb-bar-seg.is-a_verifier, .fb-legend i.is-a_verifier { background: var(--accent-soft); }
.fb-bar-seg.is-en_cours, .fb-legend i.is-en_cours { background: var(--primary); }
.fb-bar-seg.is-nouveau, .fb-legend i.is-nouveau { background: var(--warning-soft); }
.fb-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-muted); }
.fb-legend strong { color: var(--text); }
.fb-legend span { display: inline-flex; align-items: center; gap: 6px; }
.fb-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fb-section h3 { margin-bottom: 4px; }
.fb-section > summary { cursor: pointer; }
.fb-list { list-style: none; margin: 0; padding: 0; }
.fb-item { display: grid; grid-template-columns: 1fr auto auto; gap: 4px 12px; align-items: center;
           padding: 12px 2px; border-top: 1px solid var(--border); scroll-margin-top: 20px; }
.fb-item:first-child { border-top: none; }
.fb-item:target { background: var(--primary-bg); border-radius: var(--radius-sm); padding-left: 10px; padding-right: 10px; }
.fb-body { min-width: 0; }
.fb-msg { font-size: 14px; font-weight: 500; white-space: pre-line; }
.fb-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.fb-sub > * + *::before { content: "·"; margin: 0 6px; color: var(--text-faint); }
.fb-last strong { font-weight: 600; }
.fb-last.is-a_verifier strong { color: var(--accent); }
.fb-last.is-valide strong { color: var(--success); }
.fb-last.is-en_cours strong { color: var(--primary-hover); }
.fb-see { font-weight: 600; margin-left: 4px; white-space: nowrap; }
.fb-history { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.fb-history summary { cursor: pointer; color: var(--text-faint); }
.fb-history ul { margin: 4px 0 0; padding-left: 16px; }
.fb-actions { display: contents; }
.fb-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.fb-compose { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 8px; max-width: 640px; }
.fb-compose .fb-buttons { justify-content: flex-start; }
.fb-compose textarea {
  width: 100%; font-family: inherit; font-size: 13.5px; padding: 8px 11px; line-height: 1.5; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
}
.fb-compose textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.fb-delete { opacity: 0; transition: opacity .12s ease; }
.fb-item:hover .fb-delete, .fb-delete:focus-within { opacity: 1; }
@media (max-width: 700px) {
  .fb-item { grid-template-columns: 1fr auto; }
  .fb-buttons { grid-column: 1; justify-content: flex-start; }
}
.alert-info { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary-hover); }

.task-item.is-done .task-title { color: var(--text-faint); text-decoration: line-through; font-weight: 500; }
.px-block { margin-top: 18px; }
.px-block-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.px-block-head h2 { font-size: 16px; margin: 0; }
.px-ops { padding: 0; overflow: hidden; }
.px-op { display: grid; grid-template-columns: 92px minmax(180px, 1.6fr) minmax(120px, 1fr) 100px minmax(170px, 1fr) 20px;
         gap: 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.px-op:first-child { border-top: none; }
.px-op:hover { background: var(--surface-alt); }
.px-op-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.px-op-margin { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.px-op-count { font-size: 13px; color: var(--text-muted); }
.px-op-go { color: var(--text-faint); font-size: 20px; line-height: 1; }
.px-loss { color: var(--danger); background: var(--danger-bg); border: 1px solid var(--danger-border); }
@media (max-width: 760px) { .px-op { grid-template-columns: 1fr auto; } .px-op-status, .px-op .platform-stack, .px-op-go { display: none; } }
/* --- À faire : le tableau façon Trello (fond coloré, colonnes grises, cartes blanches), la fenêtre
   d'une carte et le calendrier du mois. Voir taches.html, _task_card.html et _taches_js.html. --- */
.kb-frame { display: flex; flex-direction: column; min-height: calc(100vh - 150px); background: var(--board-bg);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.kb-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap;
  padding: 9px 14px; margin-bottom: 14px; background: rgba(0, 0, 0, .16); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.kb-views { display: inline-flex; gap: 4px; }
.kb-view { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .9); font-size: 13.5px; font-weight: 600; text-decoration: none; transition: background .12s ease; }
.kb-view:hover { background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; }
.kb-view.active { background: rgba(255, 255, 255, .95); color: var(--primary-hover); }
.kb-filter { display: flex; align-items: center; gap: 10px; color: rgba(255, 255, 255, .85); font-size: 12.5px; font-weight: 600; }
.kb-filter-people { display: flex; padding-left: 4px; }
.kb-filter-people .kb-avatar { margin-left: -4px; border: 0; padding: 0; font-family: inherit; cursor: pointer;
  box-shadow: 0 0 0 2px var(--primary); transition: transform .12s ease, opacity .12s ease, box-shadow .12s ease; }
.kb-filter-people .kb-avatar:hover { transform: translateY(-1px); }
.kb-filter-people .kb-avatar[aria-pressed="true"] { box-shadow: 0 0 0 2px #fff; z-index: 1; }
.kb-frame.is-filtered .kb-filter-people .kb-avatar[aria-pressed="false"] { opacity: .45; }
.kb-filter-clear { border: 0; background: none; padding: 2px 4px; font: inherit; color: #fff; text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.kb-board { flex: 1; display: grid; grid-template-columns: repeat(4, minmax(236px, 1fr)); gap: 10px; align-items: start;
  padding: 0 12px; overflow-x: auto; }
.kb-list { display: flex; flex-direction: column; min-width: 0; max-height: calc(100vh - 250px); background: var(--list-bg);
  border-radius: 12px; box-shadow: 0 1px 1px rgba(20, 30, 28, .2); }
.kb-list-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 8px 6px 14px; min-height: 44px; }
.kb-list-head h2 { margin: 0; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.kb-list-head h2 svg { color: var(--text-muted); }
.kb-count { font-size: 12px; font-weight: 700; color: var(--text-muted); background: rgba(20, 30, 28, .07); border-radius: 999px;
  padding: 0 8px; line-height: 20px; }
.kb-list-menu { margin-left: auto; }
.kb-icon-btn { flex: none; width: 32px; height: 32px; border: 0; border-radius: var(--radius-sm); background: none; padding: 0;
  color: var(--text-muted); font-family: inherit; font-size: 16px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; transition: background .12s ease, color .12s ease; }
.kb-icon-btn:hover { background: rgba(20, 30, 28, .08); color: var(--text); }
.kb-cards { display: flex; flex-direction: column; gap: 8px; min-height: 4px; padding: 2px 8px 4px; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: thin; }
.kb-card { position: relative; display: block; flex: none; padding: 8px 10px 8px 12px; background: var(--surface); color: var(--text);
  border-radius: 8px; box-shadow: var(--card-shadow); cursor: pointer; text-decoration: none; outline: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; transition: box-shadow .12s ease; }
.kb-card:hover { text-decoration: none; box-shadow: var(--card-shadow), inset 0 0 0 2px var(--primary-border); }
.kb-card:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.kb-card.is-new { animation: kb-in .28s ease-out; }
@keyframes kb-in { from { opacity: 0; transform: translateY(-6px); } }
.kb-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.kb-label { max-width: 100%; padding: 0 8px; border-radius: 4px; font-size: 11.5px; font-weight: 700; line-height: 18px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-label.is-op { background: var(--primary-bg); color: var(--primary-hover); }
.kb-label.is-start { background: var(--success-bg); color: var(--success); }
.kb-label.is-end { background: var(--surface-sunken); color: var(--text-muted); }
.kb-label.is-omnibus, .kb-label.is-warn { background: var(--danger-bg); color: var(--danger); }
.kb-label.is-bf { background: var(--text); color: var(--surface); }
.kb-card-main { display: flex; align-items: flex-start; }
.kb-card-title { font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.kb-card-note { margin-top: 2px; font-size: 12.5px; line-height: 1.4; color: var(--text-muted); }
/* La coche apparaît au survol de la carte, comme sur Trello ; faite, la carte la garde, en vert. */
.kb-check { flex: none; width: 0; height: 16px; margin: 2px 0 0; padding: 0; overflow: hidden; opacity: 0; cursor: pointer;
  border: 0 solid var(--text-faint); border-radius: 50%; background: var(--surface); color: transparent;
  display: inline-flex; align-items: center; justify-content: center;
  transition: width .15s ease, margin .15s ease, opacity .15s ease, background .12s ease, border-color .12s ease, color .12s ease; }
.kb-card:hover .kb-check, .kb-card:focus-within .kb-check, .kb-card.is-done .kb-check, .kb-card.is-completing .kb-check {
  width: 16px; margin-right: 8px; opacity: 1; border-width: 1.5px; }
.kb-check:hover { border-color: var(--success); color: var(--success); }
.kb-card.is-done .kb-check, .kb-card.is-completing .kb-check { background: var(--success); border-color: var(--success); color: #fff; }
.kb-card.is-done .kb-check:hover { background: var(--surface); color: var(--success); }
.kb-card.is-reopening .kb-check { background: var(--surface); border-color: var(--text-faint); color: transparent; }
.kb-card.is-done .kb-card-title { color: var(--text-muted); }
.kb-card.is-completing { animation: kb-pop .3s ease; }
@keyframes kb-pop { 50% { transform: scale(1.02); } }
@media (hover: none) { .kb-card .kb-check { width: 16px; margin-right: 8px; opacity: 1; border-width: 1.5px; } }
.kb-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin-top: 6px; }
.kb-due { display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 4px; font-size: 12px; font-weight: 500;
  line-height: 20px; color: var(--text-muted); white-space: nowrap; }
.kb-due svg { flex: none; }
.kb-due.is-overdue { background: var(--danger); color: #fff; font-weight: 600; }
.kb-due.is-today { background: var(--warning-fill); color: var(--text); font-weight: 600; }
.kb-due.is-soon { background: var(--warning-bg); color: var(--warning); font-weight: 600; }
.kb-due.is-done { background: var(--success); color: #fff; }
.kb-due.is-event { background: var(--surface-sunken); color: var(--text); }
.kb-badge { display: inline-flex; color: var(--text-muted); }
.kb-when { font-size: 12px; color: var(--text-muted); }
.kb-avatars { display: inline-flex; margin-left: auto; padding-left: 4px; }
.kb-avatars .kb-avatar + .kb-avatar { margin-left: -4px; }
.kb-avatar { flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em; box-shadow: 0 0 0 2px var(--surface); }
.kb-avatar.is-lg { width: 32px; height: 32px; font-size: 12px; }
.kb-avatar.tone-0 { background: var(--primary-fill); }
.kb-avatar.tone-1 { background: var(--accent); }
.kb-avatar.tone-2 { background: var(--info); }
.kb-avatar.tone-3 { background: var(--exclusive); }
.kb-avatar.tone-4 { background: var(--success); }
.kb-avatar.tone-5 { background: var(--anthracite); }
.kb-add { display: flex; align-items: center; gap: 6px; margin: 2px 8px 8px; padding: 6px 8px; border: 0; border-radius: 8px;
  background: none; color: var(--text-muted); font-family: inherit; font-size: 14px; font-weight: 500; text-align: left; cursor: pointer;
  transition: background .12s ease, color .12s ease; }
.kb-add:hover { background: rgba(20, 30, 28, .08); color: var(--text); }
.kb-composer { padding: 2px 8px 8px; }
.kb-composer-input { display: block; width: 100%; min-height: 56px; resize: none; overflow: hidden; padding: 8px 12px;
  border: 0; border-radius: 8px; background: var(--surface); box-shadow: var(--card-shadow); color: var(--text);
  font-family: inherit; font-size: 14px; line-height: 20px; }
.kb-composer-input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--primary); }
.kb-composer-actions { display: flex; align-items: center; gap: 4px; margin-top: 8px; }
.kb-empty { display: none; margin: 2px 8px 6px; padding: 14px 10px; border: 1.5px dashed var(--border-strong); border-radius: 8px;
  color: var(--text-muted); font-size: 12.5px; text-align: center; }
.kb-list:not(:has(.kb-cards > .kb-card:not([hidden]), .kb-cards > .kb-placeholder, .kb-composer)) .kb-empty { display: block; }
.kb-more { margin: 2px 14px 10px; font-size: 12px; color: var(--text-muted); }
.kb-list > .kb-cards:last-child { padding-bottom: 8px; }
.kb-placeholder { flex: none; border-radius: 8px; background: rgba(20, 30, 28, .1); }
.kb-card.is-lifted { display: none; }
.is-ghost { position: fixed !important; left: 0; top: 0; z-index: 2000; margin: 0 !important; pointer-events: none;
  box-shadow: var(--shadow-md) !important; opacity: .97; will-change: transform; }
html.is-dragging, html.is-dragging * { cursor: grabbing !important; }
html.is-dragging { -webkit-user-select: none; user-select: none; }
.kb-menu { position: absolute; top: calc(100% - 4px); right: 8px; z-index: 30; min-width: 230px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.kb-menu-title { padding: 4px 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); text-align: center;
  font-size: 12.5px; font-weight: 700; color: var(--text-muted); }
.kb-menu-item { display: block; width: 100%; padding: 7px 10px; border: 0; border-radius: var(--radius-sm); background: none;
  color: var(--text); font-family: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.kb-menu-item:hover { background: var(--surface-alt); }
.kb-foot { margin: 14px 16px 0; font-size: 12px; color: rgba(255, 255, 255, .82); }
.kb-foot .kb-mail-error { color: #fff; font-weight: 700; margin-left: 6px; }
.kb-toast { position: fixed; left: 50%; bottom: 24px; z-index: 3000; max-width: calc(100vw - 32px); padding: 10px 16px;
  border-radius: var(--radius); background: var(--text); color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-md);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.kb-toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.kb-toast.is-error { background: var(--danger); }
/* La fenêtre d'une carte (le « dos » de la carte Trello) : chaque champ s'enregistre dès qu'on le quitte. */
dialog.modal.kb-dialog { width: min(720px, calc(100vw - 32px)); padding: 0; }
.kb-dialog-body { position: relative; padding: 22px 24px 18px; outline: none; }
.kb-dialog-close { position: absolute; top: 12px; right: 12px; }
.kb-dialog-head { display: flex; align-items: flex-start; gap: 10px; padding-right: 36px; }
.kb-dialog .kb-check { width: 22px; height: 22px; margin: 6px 0 0; opacity: 1; border-width: 2px; }
.kb-dialog .kb-check:hover { border-color: var(--success); color: var(--success); }
.kb-dialog.is-done .kb-check { background: var(--success); border-color: var(--success); color: #fff; }
.kb-dialog-titles { flex: 1; min-width: 0; }
#td-title { display: block; width: 100%; resize: none; overflow: hidden; margin-left: -6px; padding: 3px 6px; border: 0;
  border-radius: var(--radius-sm); background: none; color: var(--text); font-family: inherit; font-size: 19px; font-weight: 700;
  line-height: 1.35; }
#td-title:focus { outline: none; background: var(--surface); box-shadow: inset 0 0 0 2px var(--primary); }
.kb-dialog.is-done #td-title { color: var(--text-muted); }
.kb-dialog-where { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.kb-dialog-where select { padding: 3px 8px; border-color: transparent; background-color: var(--surface-sunken); font-size: 13px; font-weight: 600; }
.kb-dialog-fields { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px 22px; margin: 20px 0 18px; padding-left: 32px; }
.kb-field-label { display: flex; align-items: center; gap: 6px; margin-bottom: 5px; font-size: 11.5px; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.kb-dialog-fields > .field:last-child { flex: 1; min-width: 200px; }
.kb-desc { padding-left: 32px; }
.kb-op-link { margin-left: 6px; font-weight: 600; text-transform: none; letter-spacing: normal; }
.kb-newop { margin: -4px 0 18px 32px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface-alt); display: flex; flex-direction: column; gap: 12px; }
.kb-newop .field-row { margin: 0; }
.kb-newop-name { flex: 1; min-width: 200px; }
.kb-newop .muted-small { margin: 0; }
.kb-newop-actions { display: flex; gap: 8px; }
.kb-newop-pending { align-self: flex-start; }
.kb-desc textarea { width: 100%; min-height: 96px; resize: vertical; padding: 9px 12px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-family: inherit; font-size: 14px; line-height: 1.5; }
.kb-desc textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.kb-dialog-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 16px; padding: 12px 0 0 32px;
  border-top: 1px solid var(--border); }
.kb-saved { font-size: 12.5px; font-weight: 600; color: var(--success); opacity: 0; transition: opacity .2s ease; }
.kb-saved.is-shown { opacity: 1; }
.kb-delete { margin-left: auto; }
.kb-delete:hover { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.kb-people { position: relative; display: flex; align-items: center; gap: 4px; min-height: 38px; }
.kb-people-list { display: inline-flex; gap: 4px; }
.kb-people-add { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--surface-sunken); color: var(--text-muted);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.kb-people-add:hover, .kb-people-add[aria-expanded="true"] { background: var(--border); color: var(--text); }
.kb-pop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 40; width: 270px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); }
.kb-pop-row { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 13.5px; cursor: pointer; }
.kb-pop-row:hover { background: var(--surface-alt); }
.kb-pop-row input { margin: 0; accent-color: var(--primary); }
.kb-pop-note { margin: 6px 8px 4px; font-size: 12px; color: var(--text-muted); }
/* Calendrier : le mois, cartes et échéances en pastilles à leur date ; une carte glissée sur un autre
   jour change d'échéance. */
.cal { margin: 0 14px; background: var(--surface); border-radius: 12px; box-shadow: var(--card-shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cal-title { margin: 0 6px 0 4px; font-size: 17px; font-weight: 700; }
.cal-arrow { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center;
  justify-content: center; color: var(--text); font-size: 18px; line-height: 1; text-decoration: none; }
.cal-arrow:hover { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-hover); text-decoration: none; }
.cal-legend { margin-left: auto; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cal-legend .is-task { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border-strong); }
.cal-legend .is-warn { background: var(--danger-bg); box-shadow: inset 0 0 0 1px var(--danger-border); }
.cal-legend .is-bf { background: var(--text); }
.cal-legend .is-op { width: 18px; background: var(--primary-bg); box-shadow: inset 3px 0 0 var(--primary); }
.cal-dows, .cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week { position: relative; }
.cal-dow { padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-alt); color: var(--text-muted);
  font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cal-day { position: relative; min-width: 0; min-height: 112px; padding: 6px 6px 10px; display: flex; flex-direction: column; gap: 4px;
  border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); transition: background .1s ease; }
.cal-week > .cal-day:nth-child(7) { border-right: 0; }
.cal-week:last-child > .cal-day { border-bottom: 0; }
.cal-day.is-weekend { background: var(--surface-alt); }
.cal-day.is-out { background: var(--surface-sunken); }
.cal-day-head { display: flex; align-items: center; justify-content: space-between; min-height: 24px; }
.cal-num { padding: 2px 7px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 18px; color: var(--text-muted); }
.cal-day.is-out .cal-num, .cal-day.is-past .cal-num { color: var(--text-faint); }
.cal-day.is-today .cal-num { background: var(--primary-fill); color: #fff; }
.cal-add { opacity: 0; }
.cal-day:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
@media (hover: none) { .cal-add { opacity: .7; } }
.cal-add.kb-icon-btn { width: 24px; height: 24px; border-radius: 6px; }
.cal-add.kb-icon-btn:hover { background: var(--primary-bg); color: var(--primary-hover); }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; margin-top: calc(var(--lanes, 0) * 22px); }
.cal-chip { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 3px 7px; border-radius: 5px; background: var(--surface);
  box-shadow: var(--card-shadow); color: var(--text); font-size: 12px; font-weight: 500; line-height: 16px; text-decoration: none;
  cursor: pointer; outline: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.cal-chip:hover { text-decoration: none; box-shadow: var(--card-shadow), inset 0 0 0 1.5px var(--primary-border); }
.cal-chip:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.cal-chip-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip-mark { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--text-faint); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; }
.cal-chip.urgency-overdue .cal-chip-mark { background: var(--danger); }
.cal-chip.urgency-today .cal-chip-mark { background: var(--warning-fill); }
.cal-chip.urgency-soon .cal-chip-mark { background: var(--warning-soft); }
.cal-chip.is-done { color: var(--text-muted); }
.cal-chip.is-done .cal-chip-mark { width: 12px; height: 12px; background: var(--success); }
.cal-chip.is-event { box-shadow: none; }
.cal-chip.is-start { background: var(--success-bg); color: var(--success); }
.cal-chip.is-end { background: var(--surface-sunken); color: var(--text-muted); }
.cal-chip.is-omnibus, .cal-chip.is-warn { background: var(--danger-bg); color: var(--danger); }
.cal-chip.is-bf { background: var(--text); color: var(--surface); }
.cal-chip.is-event:hover { box-shadow: inset 0 0 0 1.5px currentColor; }
.cal-chip.is-lifted { opacity: .35; }
/* Une opération : une barre sur ses jours, sous le numéro du jour (34 px), une ligne de 22 px par chevauchement. */
.cal-bar { --inset-l: 4px; --inset-r: 4px; position: absolute; z-index: 1; top: calc(34px + var(--lane) * 22px);
  left: calc(var(--col) * 100% / 7 + var(--inset-l)); width: calc(var(--span) * 100% / 7 - var(--inset-l) - var(--inset-r));
  height: 19px; padding: 0 8px; border-radius: 4px; background: var(--primary-bg); box-shadow: inset 3px 0 0 var(--primary);
  color: var(--primary-hover); font-size: 11.5px; font-weight: 700; line-height: 19px; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; text-decoration: none; }
.cal-bar:hover { text-decoration: none; background: var(--primary-border); }
.cal-bar.is-before { --inset-l: 0px; border-top-left-radius: 0; border-bottom-left-radius: 0; box-shadow: none; }
.cal-bar.is-after { --inset-r: 0px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-bar.is-warn { background: var(--danger-bg); box-shadow: inset 3px 0 0 var(--danger); color: var(--danger); }
.cal-bar.is-warn.is-before { box-shadow: none; }
.cal-bar.is-pending { outline: 1px dashed currentColor; outline-offset: -1px; }
html.is-dragging .cal-bar { pointer-events: none; }
.cal-day.is-drop { background: var(--primary-bg); box-shadow: inset 0 0 0 2px var(--primary); }
.cal-day .kb-composer { padding: 0; }
.cal-day .kb-composer-input { min-height: 44px; padding: 6px 8px; font-size: 13px; line-height: 18px; }
.cal-day .kb-composer-actions .btn { padding: 5px 9px; }
.kb-composer-caption { display: none; }
/* Petit écran (le seuil de la version mobile, mobile.css) : une colonne à la fois, qu'on fait glisser
   du doigt ; dans le calendrier, la saisie d'une carte monte en panneau au bas de l'écran. */
@media (max-width: 880px) {
  .kb-board { grid-template-columns: repeat(4, min(84vw, 340px)); scroll-snap-type: x mandatory; }
  .kb-list { max-height: none; scroll-snap-align: start; }
  .kb-dialog-fields, .kb-desc, .kb-dialog-foot { padding-left: 0; }
  .kb-newop { margin-left: 0; }
  .cal { margin: 0 8px; }
  .cal-legend { display: none; }
  .cal-dow { padding: 6px 4px; font-size: 10px; }
  .cal-day { min-height: 74px; padding: 6px 2px 8px; }
  .cal-num-month { display: none; }
  .cal-chip { padding: 1px 4px; font-size: 10.5px; gap: 3px; }
  .cal-chip-mark { width: 6px; height: 6px; }
  .cal-bar { padding: 0 5px; font-size: 10.5px; }
  .cal .kb-composer { position: fixed; left: 12px; right: 12px; bottom: calc(var(--m-tabs-h, 0px) + 12px); z-index: 60;
    padding: 12px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
  .cal .kb-composer-caption { display: block; margin-bottom: 8px; font-size: 13.5px; font-weight: 700; }
  .cal-day .kb-composer-input { min-height: 56px; font-size: 15px; }
}
.urgency-overdue .task-due { color: var(--danger); font-weight: 700; }
.urgency-today .task-due { color: var(--warning); font-weight: 700; }
.urgency-soon .task-due { color: var(--primary-hover); font-weight: 600; }

/* Onglets : un seul dessin partout (Paramètres, Prix, Opérations, fiche produit…), la pilule
   de .dash-tabs plus bas ; .tabs et .market-tabs en sont des alias. */
.tabs, .market-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-xs); }
.tab, .market-tab {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 18px; border: none; border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer;
  text-decoration: none; transition: background .12s ease, color .12s ease;
}
.tab:hover, .market-tab:hover { color: var(--text); text-decoration: none; }
.tab.active, .market-tab.active { background: var(--primary-fill); color: #fff; box-shadow: 0 1px 3px rgba(29,94,85,.3); }
.market-tab .platform-avatar, .market-tab .platform-avatar-fallback { width: 18px; height: 18px; border-radius: 5px; }
.market-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--surface-sunken); color: var(--text-muted); font-size: 11.5px; font-weight: 700; }
.market-tab.active .market-count { background: rgba(255,255,255,.22); color: #fff; }
h2 .market-count { vertical-align: middle; margin-left: 4px; }
.tab-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 999px;
  background: var(--warning); color: #fff; font-size: 11px; font-weight: 800;
}
.tab.active .tab-dot { background: #fff; color: var(--warning); }
.tab-panel { display: none; }

/* Commission non renseignée : la ligne de la plateforme est signalée dans le tableau. */
tr.rate-missing td { background: var(--warning-bg); }
.rate-input { display: flex; align-items: center; gap: 6px; }
.rate-input input { width: 80px; padding: 6px 8px; text-align: right; }
.diag-steps { list-style: none; margin: 12px 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.diag-step { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; position: relative; }
.diag-step:not(:last-child)::after { content: ""; position: absolute; left: 10px; top: 30px; bottom: -6px; width: 2px; background: var(--border); }
.diag-mark { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
             font-size: 12px; font-weight: 800; background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-muted); }
.diag-step.is-ok .diag-mark { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.diag-step.is-wait .diag-mark { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.diag-step.is-todo .diag-mark, .diag-step.is-ko .diag-mark { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.diag-body { display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; padding-top: 1px; }
.diag-step.is-ok .diag-body strong { font-weight: 500; }
.diag-mail { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.mail-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; cursor: pointer;
             font: inherit; font-size: 13px; font-weight: 600; color: var(--primary); background: var(--surface);
             border: 1px solid var(--primary); }
.mail-pill:hover { background: var(--primary-fill); color: #fff; }
.np-commissions { margin: -4px 0 14px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
                  background: var(--surface-alt); }
.np-commissions-head { font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
                       color: var(--text-muted); margin-bottom: 6px; }
.np-commission { display: grid; grid-template-columns: 190px 96px 64px 1fr auto; align-items: center; gap: 10px;
                 padding: 3px 0; font-size: 13px; }
.np-commission .platform-avatar, .np-commission .platform-avatar-fallback { width: 18px; height: 18px; }
.np-commissions-head.np-commission { padding: 0; }
.np-current { white-space: nowrap; }
.np-current.is-offline { color: var(--text-muted); }
.np-not-online { color: var(--warning); margin-top: 2px; }
.np-commission-origin { color: var(--text-muted); }
.np-commission-origin.is-default { color: var(--warning); }
.np-commission.is-missing strong, .np-commission.is-missing .np-commission-origin { color: var(--danger); }
.np-commission-actions { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
/* « changer » : la saisie remplace le taux, l'origine et les liens, sur la même ligne. */
.np-commission.is-editing { grid-template-columns: 190px 1fr; }
.np-commission.is-editing > strong, .np-commission.is-editing > .np-current, .np-commission.is-editing > .np-commission-origin, .np-commission.is-editing > .np-commission-actions { display: none; }
.np-commission-edit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.np-commission-edit input { width: 70px; padding: 4px 8px; font-size: 13px; }
.np-commission-scope { flex-basis: 100%; }
.np-commission-scope:empty { display: none; }
@media (max-width: 760px) { .np-commission { grid-template-columns: 1fr auto auto; } .np-commission-origin { grid-column: 1 / -1; } }
.cat-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid var(--border);
              border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 13px;
              cursor: pointer; white-space: nowrap; }
.cat-toggle:hover, .cat-toggle.is-open { border-color: var(--primary); }
.cat-caret { color: var(--text-muted); transition: transform .12s ease; }
.cat-toggle.is-open .cat-caret { transform: rotate(90deg); }
tr.cat-row > td { background: var(--surface-alt); padding-top: 4px; }
.cat-box { display: flex; flex-direction: column; gap: 10px; padding: 4px 0 6px 44px; }
.cat-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cat-add > input[type=text] { width: 280px; padding: 6px 10px; }
.cat-search { width: 180px; padding: 6px 10px; margin-left: auto; }
.cat-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 18px; }
.cat-item { display: flex; align-items: center; gap: 10px; padding: 3px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.cat-item > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-item .icon-btn { width: 26px; height: 26px; }
@media (max-width: 760px) { .cat-box { padding-left: 0; } .cat-add > input[type=text] { width: 100%; } .cat-search { margin-left: 0; } }
.bracket-table { max-height: 420px; overflow-y: auto; }
.bracket-table thead th { position: sticky; top: 0; }
.tab-panel.active { display: block; }

/* --- Historique des prix --- */
.ph-chart { position: relative; }
.ph-chart svg { display: block; width: 100%; height: auto; }
.ph-grid { stroke: var(--border); stroke-width: 1; }
.ph-axis { fill: var(--text-muted); font-size: 11px; font-family: inherit; }
.ph-today { stroke: var(--text); stroke-width: 1.5; }
.ph-future { fill: var(--surface-alt); }
.ph-window { fill: var(--primary-bg); opacity: .7; }
.ph-window-label { fill: var(--primary-hover); font-size: 11.5px; font-weight: 700; font-family: inherit; }
.ph-hatch-line { stroke: var(--border); stroke-width: 2; }
.ph-unknown-label { fill: var(--text-muted); font-size: 11.5px; font-style: italic; font-family: inherit;
  paint-order: stroke; stroke: var(--surface); stroke-width: 4px; }
.ph-ref { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 2 3; }
.ph-ref-label { fill: var(--text); font-size: 11.5px; font-weight: 700; font-family: inherit;
  paint-order: stroke; stroke: var(--primary-bg); stroke-width: 4px; }
.ph-start { stroke: var(--text-muted); stroke-width: 1.5; }
.ph-start-label { fill: var(--text); font-size: 11px; font-weight: 600; font-family: inherit; }
.ph-tooltip-note { color: var(--primary-hover); font-size: 11.5px; margin-bottom: 4px; }
.ph-answer { margin-bottom: 12px; font-size: 13.5px; line-height: 1.55; }
.ph-answer-warn { margin-top: 4px; font-size: 12.5px; color: var(--warning); }
.ph-cross { stroke: var(--text-muted); stroke-width: 1; }
.ph-dot { stroke: var(--surface); stroke-width: 2; }
.ph-tooltip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 200px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 8px 10px; font-size: 12.5px;
}
.ph-tooltip-date { font-weight: 700; margin-bottom: 4px; }
.ph-tooltip-row { display: flex; align-items: center; gap: 8px; }
.ph-tooltip-row strong { margin-left: auto; padding-left: 12px; }
.ph-legend { display: flex; flex-wrap: wrap; gap: 6px; }
.ph-legend-item {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 12.5px; font-weight: 500;
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  color: var(--text); cursor: pointer;
}
.ph-legend-item.is-off { opacity: .45; text-decoration: line-through; }
.ph-swatch { flex: none; width: 16px; height: 3px; border-radius: 2px; background: var(--c); }
.ph-swatch.is-dashed { background: repeating-linear-gradient(90deg, var(--c) 0 5px, transparent 5px 8px); }
.ph-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ph-head h3 { margin-bottom: 2px; }
.ph-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.ph-stat { background: var(--surface-alt); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.ph-stat-label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.ph-stat-value { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; margin-top: 2px; }
.ph-stat-detail { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-card .ph-legend { margin-bottom: 6px; }
.ph-planned { opacity: .5; }
.ph-today-label { font-weight: 600; fill: var(--text); }
.ph-promo { stroke: var(--text); stroke-width: 1.5; stroke-dasharray: 4 3; }
.ph-promo-dot { fill: var(--text); stroke: var(--surface); stroke-width: 2; }
.ph-leader { stroke: var(--text-faint); stroke-width: 1; }
.ph-end-label { fill: var(--text); font-size: 12px; font-weight: 600; font-family: inherit; font-variant-numeric: tabular-nums; }
.ph-end-label.is-promo { fill: var(--text-muted); }
.ph-sim { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.ph-sim-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ph-verdicts { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.ph-verdict { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(150px, 1fr) auto minmax(170px, auto); align-items: center; gap: 12px; font-size: 13px; }
.ph-verdict > * { justify-self: start; }
.ph-verdict-name { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.ph-verdict-ref { color: var(--text-muted); }
.ph-verdict-ref strong { color: var(--text); }
.ph-details { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.ph-details summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* --- Marketplaces (erreurs ShoppingFeed par marketplace) --- */
a.kpi-bubble { text-decoration: none; color: inherit; }
.ml-logo { flex: none; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid var(--border); }
.ml-logo-fallback { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--text-muted); background: var(--surface-alt); }
.ml-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); grid-auto-rows: minmax(104px, auto);
           grid-auto-flow: dense; gap: 12px; }
.ml-card-wrap.size-xl { grid-column: span 2; grid-row: span 2; }
.ml-card-wrap.size-l { grid-column: span 2; }
@media (max-width: 640px) { .ml-card-wrap.size-xl, .ml-card-wrap.size-l { grid-column: span 1; grid-row: span 1; } }
.ml-period-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin-bottom: 12px; }
.ml-total { margin: 0; font-size: 14px; color: var(--text-muted); }
.ml-periods a { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.ml-periods a + a { border-left: 1px solid var(--border-strong); }
.ml-periods a.active { background: var(--primary-bg); color: var(--primary-hover); }
.ml-period-pick { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ml-dates { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
.ml-dates[hidden] { display: none; }
.ml-dates input { padding: 5px 8px; font-size: 13px; }
.mo-dates-toggle svg { vertical-align: -2px; }
.ml-total strong { font-size: 18px; color: var(--text); }
.ml-card {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; min-width: 0; overflow: hidden;
}
.ml-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--primary-border); }
.ml-card-wrap { animation: ml-in .45s cubic-bezier(.2, .7, .3, 1) both; animation-delay: calc(min(var(--i, 0), 20) * 35ms); }
@keyframes ml-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.ml-card-title { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; padding-right: 18px; }
.ml-card-figures { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.ml-card-revenue { font-size: 20px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.size-xl .ml-card-revenue { font-size: 34px; }
.size-l .ml-card-revenue { font-size: 26px; }
.size-s .ml-card-revenue { font-size: 16px; color: var(--text-muted); }
.size-xl .ml-card-name { font-size: 17px; }
.size-xl .ml-card { padding: 20px; background: linear-gradient(160deg, var(--primary-bg), var(--surface) 55%); }
.ml-card-meta { font-size: 12px; color: var(--text-muted); }
.ml-card-margin { font-size: 12px; font-weight: 700; color: var(--success); }
.ml-card-margin.is-neg { color: var(--danger); }
.mg-card { margin-top: 18px; }
.st-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.st-tiles .stat { min-width: 0; cursor: default; }
.mg-table td, .mg-table th { white-space: nowrap; }
.mg-table td .muted-small { display: block; }
.mg-name { display: inline-flex; align-items: center; gap: 8px; }
.mg-name .ml-logo { flex: none; }
.mg-real { font-size: 11px; font-weight: 600; color: var(--success); }
.mg-margin { color: var(--success); }
.mg-margin span { display: block; font-size: 12px; }
.mg-margin.is-neg { color: var(--danger); }
.mg-loss { color: var(--danger); font-weight: 600; cursor: help; }
.mg-table tfoot td { border-top: 2px solid var(--border-strong); font-weight: 600; }
.mg-missing { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--warning-bg); border: 1px solid var(--warning-border);
              display: flex; flex-direction: column; gap: 4px; }
.mg-missing-table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.mg-missing-table td { padding: 6px 8px 6px 0; border-top: 1px solid var(--warning-border); vertical-align: middle; font-size: 13px; }
.mg-missing-table td .muted-small { display: block; }
.mg-missing-table tr.is-saved { opacity: .55; }
.mg-cost { display: flex; gap: 6px; justify-content: flex-end; }
.mg-cost input { width: 90px; padding: 5px 8px; }
.ml-share { display: block; height: 4px; border-radius: 999px; background: var(--border); overflow: hidden; }
.ml-share > span { display: block; height: 100%; width: 100%; border-radius: inherit; background: var(--primary);
                   transform-origin: left; transform: scaleX(var(--share, 0)); animation: ml-grow .9s .15s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes ml-grow { from { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .ml-card-wrap, .ml-share > span { animation: none; } }
.ml-card.is-ok { background: var(--surface-alt); }
.ml-card-wrap { position: relative; display: flex; }
.ml-card-wrap > .ml-card { flex: 1; }
.ml-hide { position: absolute; top: 8px; right: 8px; z-index: 1; margin: 0; }
.ml-hide button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid transparent; background: transparent;
                  color: var(--text-faint); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .12s ease; }
.ml-card-wrap:hover .ml-hide button { opacity: 1; }
.ml-hide button:hover { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.ml-hidden { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.ml-hidden form { margin: 0; }
.ml-hidden .ml-chip { font-family: inherit; cursor: pointer; color: var(--text-muted); }
.ml-card-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ml-card-name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ml-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.ml-dot.level-error { background: var(--danger); }
.ml-dot.level-warning { background: var(--warning); }
.ml-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.ml-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
           border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.ml-chip.is-on { background: var(--primary-bg); border-color: var(--primary-border); color: var(--primary-hover); }
.ml-chip:hover { text-decoration: none; }
.ml-filters .mode-switch a { display: inline-block; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.ml-filters .mode-switch a + a { border-left: 1px solid var(--border-strong); }
.ml-filters .mode-switch a.active { background: var(--primary-bg); color: var(--primary-hover); }
/* Onglet Commandes (mp_orders.py, _mp_orders_body.html, _mp_order_detail.html) */
#mo-root.is-loading .mo-content { opacity: .55; transition: opacity .15s .1s; }
.mo-bar { margin-bottom: 14px; }
.mo-search { position: relative; display: flex; align-items: center; flex: 1 1 260px; max-width: 420px; margin: 0; }
.mo-search svg { position: absolute; left: 10px; color: var(--text-faint); pointer-events: none; }
.mo-search input[type=search] { width: 100%; padding: 7px 10px 7px 32px; font: inherit; font-size: 13px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text); }
.mo-search input[type=search]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.mo-tiles .stat { display: flex; flex-direction: column; }
a.mo-tile { color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
a.mo-tile:hover { border-color: var(--primary-border); text-decoration: none; }
a.mo-tile.is-on { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.mo-delta { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-top: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mo-delta.is-up { color: var(--success); }
.mo-delta.is-down { color: var(--danger); }
.mo-delta span { font-weight: 500; color: var(--text-faint); }
.mo-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 3px; border-radius: 999px; background: var(--surface-sunken); font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums; }
.ml-filters .mode-switch a.active .mo-count { background: var(--surface); }
.mo-note { display: flex; align-items: center; gap: 6px; margin: -4px 0 12px; }
.mo-card { padding: 0; margin-top: 0; overflow: hidden; }
.mo-table td { vertical-align: top; }
.mo-table th.mo-num, .mo-table td.mo-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.mo-big { display: block; font-size: 15px; font-weight: 700; color: var(--text); }
.mo-gain .mo-big { color: var(--success); }
.mo-gain .mo-big.is-neg { color: var(--danger); }
.mo-sub { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 500; color: var(--text-faint); white-space: normal; }
.mo-amount .mo-sub { white-space: nowrap; }
.mo-gain .mo-sub { max-width: 150px; margin-left: auto; }
.mo-fee { color: var(--text-muted); }
.mo-rate { display: inline-block; margin-top: 4px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; line-height: 19px; letter-spacing: 0; vertical-align: middle;
  background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.mo-rate.is-low { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.mo-rate.is-neg { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.stat-value .mo-rate { margin: 0 0 0 4px; vertical-align: 4px; }
.mo-table .mg-name { align-items: flex-start; }
.mo-table .mg-name > span { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mo-when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.mo-id { font-variant-numeric: tabular-nums; }
.mo-table tr.mo-row { cursor: pointer; }
.mo-table tr.mo-row:hover > td { background: var(--surface-alt); }
.mo-table tr.mo-row.is-open > td { background: var(--primary-bg); }
.mo-table tr.mo-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.mo-table tr.is-new > td { animation: mo-new 3s ease-out; }
@keyframes mo-new { from { background: var(--primary-bg); } }
.mo-table tr.is-late .mo-when { color: var(--danger); font-weight: 600; }
.mo-table tr.mo-day > td { background: var(--surface-sunken); padding-top: 7px; padding-bottom: 7px; font-size: 13px; }
.mo-line { display: flex; align-items: center; gap: 9px; }
.mo-line + .mo-line { margin-top: 6px; }
.mo-thumb { flex: none; width: 32px; height: 32px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: #fff; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.mo-thumb img { width: 100%; height: 100%; object-fit: contain; }
.mo-line-text { min-width: 0; }
.mo-line.is-out .mo-line-text, .mo-line.is-out .mo-line-text a { color: var(--text-faint); }
.mo-tag { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: 11px; font-weight: 600; line-height: 18px; white-space: nowrap;
  background: var(--surface-sunken); color: var(--text-muted); border: 1px solid var(--border); }
.mo-tag.is-out { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.mo-margin { display: block; font-size: 12px; font-weight: 500; color: var(--success); margin-top: 3px; }
.mo-margin.is-neg, .mo-neg { color: var(--danger); }
.mo-state { white-space: nowrap; }
.mo-state .muted-small, .mo-due { display: block; margin-top: 4px; }
.mo-due { font-size: 12px; color: var(--text-muted); }
.mo-table tr.is-off td { color: var(--text-faint); }
.mo-table tr.is-off .mo-amount .mo-big { text-decoration: line-through; color: var(--text-faint); }
.mo-more { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-top: 1px solid var(--border); }
.mo-table tr.mo-detail > td { background: var(--surface-alt); padding: 14px 16px 16px; cursor: default; }
.mo-facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 13px; margin-bottom: 12px; }
.mo-facts > span > .muted-small:first-child { margin-right: 3px; }
.mo-copy { border: 0; background: none; padding: 2px 4px; margin-left: 2px; color: var(--text-faint); cursor: pointer; vertical-align: -2px; border-radius: 4px; }
.mo-copy:hover { color: var(--primary); background: var(--primary-bg); }
.mo-copy.is-done { color: var(--success); }
.mo-detail-box .table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.mo-lines { width: 100%; margin: 0; font-size: 13px; }
.mo-lines td, .mo-lines th { padding: 7px 10px; vertical-align: top; }
.mo-lines td:nth-child(n+2), .mo-lines th:nth-child(n+2) { text-align: right; white-space: nowrap; }
.mo-lines tr.is-out td { color: var(--text-faint); }
.mo-lines .mo-margin { display: inline; margin: 0; font-size: 13px; font-weight: 600; }
.mo-breakdown { margin: 10px 0 0; }
.mo-detail-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 10px; font-size: 13px; }
.mo-detail-foot a { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.mo-sources { margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.mo-sources summary { cursor: pointer; }
.mo-sources ul { margin: 8px 0; padding-left: 18px; }
.mo-sources li { margin: 3px 0; }
.mo-sources p { margin: 6px 0 0; }
.mo-error { color: var(--danger); }
/* Branchement en direct de chaque marketplace (connexion.py, _connexions.html) */
.cx-card { margin-top: 18px; padding: 0; overflow: hidden; }
.cx-head { display: flex; align-items: baseline; gap: 10px; padding: 12px 18px; cursor: pointer; list-style: none; }
.cx-head::-webkit-details-marker { display: none; }
.cx-head::after { content: "▾"; margin-left: auto; color: var(--text-faint); transition: transform .15s; }
.cx-card[open] > .cx-head::after { transform: rotate(180deg); }
.cx-head h3 { margin: 0; font-size: 15px; }
.cx-blocked { color: var(--danger); font-weight: 600; }
.cx-intro { margin: 0 18px 8px; }
.cx-advice { margin: 0 18px 12px; padding: 8px 12px; border-radius: var(--radius); background: var(--warning-bg); color: var(--text); font-size: 13px; }
.cx-advice strong { color: var(--warning); }
.cx-table td { vertical-align: top; }
.cx-name { color: var(--text); text-decoration: none; white-space: nowrap; }
.cx-name:hover { text-decoration: none; color: var(--primary); }
.cx-step { white-space: nowrap; }
.cx-steps { display: flex; gap: 3px; margin: 4px 0 4px; }
.cx-steps span { width: 18px; height: 6px; border-radius: 999px; background: var(--surface-sunken); }
.cx-steps span.is-done { background: var(--primary); }
.cx-steps span.is-current { background: var(--primary-border); box-shadow: inset 0 0 0 1px var(--primary); }
.cx-checks { display: flex; flex-wrap: wrap; gap: 4px 6px; max-width: 640px; }
.cx-check { display: inline-flex; align-items: baseline; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 12px;
  font-weight: 600; border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); }
.cx-check a { color: inherit; text-decoration: none; }
.cx-check span { font-weight: 500; color: var(--text-faint); }
.cx-check b { font-weight: 800; }
.cx-check.is-ok { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.cx-check.is-todo { color: var(--warning); border-color: var(--warning-border); background: var(--warning-bg); }
.cx-check.is-block { color: var(--danger); border-color: var(--danger-border); background: var(--danger-bg); }
.cx-action { font-size: 13px; min-width: 200px; max-width: 320px; }
.cx-table tr.is-blocked .cx-action { color: var(--danger); font-weight: 600; }
/* Préparation du lancement d'une marketplace (launch.py, _launch.html) */
.ln-card { margin-bottom: 16px; }
.ln-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ln-head h3 { margin: 0; }
.ln-head form { margin: 0; }
.ln-progress { margin: 12px 0 16px; }
.ln-figure { font-size: 15px; margin-bottom: 8px; }
.ln-figure strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.ln-bar { display: flex; height: 10px; border-radius: 999px; background: var(--surface-sunken); overflow: hidden; }
.ln-bar-ready { background: var(--primary); }
.ln-bar-after { background: var(--primary-border); }
.ln-gain { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 0; font-size: 13.5px; }
.ln-gain strong { font-weight: 700; }
.ln-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 24px; }
.ln-block h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.ln-block h4 + * { margin-top: 0; }
.ln-block h4:not(:first-child) { margin-top: 16px; }
.ln-table { width: 100%; font-size: 13px; margin: 0; }
.ln-table th, .ln-table td { padding: 5px 6px; }
.ln-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ln-table td .muted-small { margin-left: 4px; }
.ln-list { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.ln-list li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.ln-list li:last-child { border-bottom: 0; }
.ln-proposal { display: block; }
.ln-link { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 600; }
.ln-brands { margin: 0; }
.ln-files { display: flex; flex-wrap: wrap; gap: 8px; }
/* Envoi vers la marketplace (mirakl_push.py, _push.html), en haut de sa page */
.ps-card { margin-bottom: 16px; }
.ps-state { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  vertical-align: middle; border: 1px solid var(--border); background: var(--surface-sunken); color: var(--text-muted); }
.ps-state.is-essai { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.ps-state.is-ouvert { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.ps-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.ps-actions form { margin: 0; }
.ps-kpis { margin: 12px 0 4px; }
.ps-kpis .kpi { display: flex; flex-direction: column; gap: 2px; flex: 1 1 140px; }
.ps-ok { color: var(--success); }
.ps-form { display: flex; flex-direction: column; gap: 6px; max-width: 560px; margin-top: 12px; }
/* L'interrupteur : trois positions côte à côte ; la case de l'essai ou d'OUVRIR n'apparaît qu'avec sa position. */
.ps-seg { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px;
  background: var(--surface-sunken); }
.ps-seg label { cursor: pointer; }
.ps-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ps-seg span { display: inline-block; padding: 4px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-muted); }
.ps-seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.ps-seg input[value=essai]:checked + span { background: var(--warning-bg); color: var(--warning); }
.ps-seg input[value=ouvert]:checked + span { background: var(--success-bg); color: var(--success); }
.ps-seg input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 1px; }
.ps-when { display: none; flex-direction: column; gap: 4px; }
.ps-form:has(input[value=essai]:checked) .ps-when-essai,
.ps-form:has(input[value=ouvert]:checked) .ps-when-ouvert { display: flex; }
.ps-form textarea, .ps-form input[type=text] { font: inherit; font-size: 13px; padding: 6px 8px; border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.ps-form .btn { align-self: flex-start; }
.ps-title { margin: 14px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.ps-status { font-weight: 600; }
.ps-status.is-termine { color: var(--success); }
.ps-status.is-erreurs, .ps-status.is-en_cours, .ps-status.is-envoye { color: var(--warning); }
.ps-status.is-echec, .ps-status.is-erreur_envoi { color: var(--danger); }
.ps-messages { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--text-muted); }
.ml-row { cursor: pointer; }
.ml-issue { font-size: 13px; line-height: 1.45; }
/* Page d'une marketplace branchée en direct */
.ml-card-direct { flex-shrink: 0; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700;
                  background: var(--primary-bg); color: var(--primary-hover); }
.ml-card-direct.is-feed { background: var(--primary-fill); color: #fff; }
.ml-card-ready { font-size: 11px; font-weight: 600; color: var(--text-muted); padding-left: 2px; }
.ml-card-ready::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%;
                         background: currentColor; vertical-align: 1px; }
.ml-card-ready.is-ready { color: var(--success); }
.ml-card-ready.is-trial { color: var(--warning); }
.ml-card-ready.is-block { color: var(--danger); }
/* Page d'une marketplace préparée, pas encore branchée (Joybuy, 26/11) : qui fait quoi pour la brancher. */
.mp-prep-steps { margin: 12px 0 10px; padding-left: 22px; display: grid; gap: 8px; max-width: 760px; }
.mp-prep-steps li { line-height: 1.45; }
.mp-prep-who { display: inline-block; min-width: 42px; margin-right: 8px; padding: 1px 7px; border-radius: 999px; font-size: 11px;
  font-weight: 600; text-align: center; background: var(--surface-2, rgba(127,127,127,.12)); color: var(--text-muted); }
.mp-prep-who.is-zk { color: var(--primary, #2563eb); }
.ml-card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ml-direct { display: block; margin-bottom: 14px; padding: 10px 14px; border-radius: var(--radius); font-weight: 600; font-size: 13.5px;
             background: var(--primary-bg); border: 1px solid var(--primary-border); color: var(--primary-hover); text-decoration: none; }
.mp-hero { display: flex; flex-direction: column; gap: 14px; padding: 20px 22px; }
.mp-hero-figure { display: flex; align-items: baseline; gap: 10px; }
.mp-hero-value { font-size: 40px; font-weight: 800; color: var(--success); line-height: 1; }
.mp-hero-label { font-size: 15px; color: var(--text-muted); }
.mp-bar { display: flex; gap: 2px; height: 12px; border-radius: 999px; overflow: hidden; }
.mp-bar-seg { min-width: 4px; }
.mp-bar-seg.tone-ok { background: var(--success); }
.mp-bar-seg.tone-warning { background: var(--warning-fill); }
.mp-bar-seg.tone-error { background: var(--danger); }
.mp-bar-seg.tone-muted { background: var(--border-strong); }
.card.mp-hero { flex-direction: row; flex-wrap: wrap; gap: 20px 48px; align-items: center; }
.mp-ring-block { display: flex; align-items: center; gap: 18px; }
.mp-ring { width: 124px; height: 124px; flex-shrink: 0; }
.mp-ring circle { fill: none; stroke-width: 13; transform: rotate(-90deg); transform-origin: 60px 60px; }
.mp-ring-track { stroke: var(--border); }
.mp-ring a:hover .mp-ring-seg { stroke-width: 16; }
.mp-ring-seg { transition: stroke-width .15s; }
.mp-ring-seg.tone-ok { stroke: var(--success); }
.mp-ring-seg.tone-selling { stroke: var(--success); stroke-opacity: .45; }
.mp-ring-seg.tone-warning { stroke: var(--warning-fill); }
.mp-ring-seg.tone-error { stroke: var(--danger); }
.mp-ring-seg.tone-muted { stroke: var(--border-strong); }
.mp-ring-value { font-size: 22px; font-weight: 800; fill: var(--text); text-anchor: middle; }
.mp-ring-caption { font-size: 10px; fill: var(--text-muted); text-anchor: middle; }
.mp-ring-text { display: flex; flex-direction: column; gap: 4px; }
.mp-ring-text .mp-hero-value { font-size: 32px; }
.mp-hero-value-alt { color: var(--text) !important; }
.mp-section { margin: 26px 0 10px; font-size: 16px; }
.mp-actions { display: flex; flex-direction: column; gap: 8px; }
.mp-action { display: grid; grid-template-columns: 64px 1fr auto 20px; align-items: center; gap: 14px; padding: 14px 16px;
             background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.mp-action:hover { border-color: var(--primary); text-decoration: none; }
.mp-action-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mp-action-stock { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.mp-arrow { color: var(--text-faint); font-size: 18px; }
.mp-count { display: inline-flex; align-items: center; justify-content: center; height: 36px; border-radius: 999px;
            font-size: 16px; font-weight: 800; border: 1px solid; }
.mp-count.tone-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.mp-count.tone-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.mp-rest { margin-top: 16px; font-size: 13.5px; color: var(--text-muted); }
.mp-rest a { color: var(--text-muted); }
.mk-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.mk-dot.tone-ok { background: var(--success); }
.mk-dot.tone-muted { background: var(--border-strong); }
.mp-back { font-size: 13px; font-weight: 600; }
.mp-attrs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 14px; }
.mp-attrs select.mp-cat { width: auto; max-width: 360px; padding: 4px 8px; font-size: 13px; }
.mp-details { font-size: 13px; line-height: 1.45; max-width: 520px; }
.mp-aplus { margin-top: 12px; padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px;
            color: var(--text); text-decoration: none; }
.mp-aplus:hover { border-color: var(--primary); text-decoration: none; }
.mp-aplus > div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 240px; }
.mp-aplus-figures { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; }
.mp-issues { margin-top: 12px; padding: 16px 20px; }
.mp-issues-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.mp-issues-head > div { display: flex; flex-direction: column; gap: 2px; }
.mp-issues-list { display: flex; flex-direction: column; }
.mp-issues-list a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 8px 0; border-top: 1px solid var(--border);
                    color: var(--text); text-decoration: none; font-size: 13.5px; }
.mp-issues-list a:hover .mp-issues-name { color: var(--primary); }
.mp-issues-name { font-weight: 600; flex: 1; min-width: 220px; }
.mp-issues-err { color: var(--danger); font-weight: 600; }
.mp-issues-warn { color: var(--warning); font-weight: 600; }
.reco-card { margin-top: 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); overflow: hidden; }
.reco-why { font-size: 12px; color: var(--warning); cursor: help; }
.pf-why { font-size: 11.5px; color: var(--warning); cursor: help; }
.reco-block { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px; color: var(--text); text-decoration: none; min-width: 0; }
.reco-block + .reco-block { border-left: 1px solid var(--border); }
.reco-block:hover { background: var(--surface-alt); text-decoration: none; }
.reco-head { display: grid; grid-template-columns: 52px 1fr 20px; align-items: center; gap: 12px; margin-bottom: 4px; }
.reco-head .muted-small { display: block; }
.reco-line { display: flex; flex-direction: column; font-size: 13px; padding-left: 64px; min-width: 0; }
.reco-line > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reco-kind { display: inline-block; font-weight: 700; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; margin-right: 4px; }
.reco-kind.is-protect { color: var(--danger); background: var(--danger-bg); }
.reco-kind.is-align { color: var(--primary-hover); background: var(--primary-bg); }
@media (max-width: 760px) { .reco-card { grid-template-columns: 1fr; } .reco-block + .reco-block { border-left: 0; border-top: 1px solid var(--border); } .reco-line { padding-left: 0; } }
.mp-buybox { margin-top: 12px; padding: 16px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; }
.mp-buybox-main { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 260px; }
.mp-buybox-main .mp-hero-value { font-size: 30px; }
.mp-buybox-lost { flex: 1; min-width: 300px; grid-template-columns: 52px 1fr 20px; }
.pf-buybox { font-size: 11.5px; color: var(--text-muted); }
.pf-buybox.is-lost { color: var(--warning); font-weight: 600; }
.pf-buybox.is-held { color: var(--success); font-weight: 600; }
.mp-feed { margin-top: 12px; padding: 14px 18px; }
.mp-feed-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.mp-feed-live { color: var(--warning); font-weight: 700; }
.mp-feed-figures { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 10px; font-size: 14px; color: var(--text-muted); }
.mp-feed-figures strong { color: var(--text); font-size: 17px; }
.mp-feed-alert { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 12px; border-radius: var(--radius);
                 background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning); font-size: 13px; font-weight: 600; }
.mp-feed-history { margin-top: 10px; }
.mp-feed-history summary { cursor: pointer; }
.mp-feed-history table { margin-top: 8px; font-size: 13px; }
.mk-badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid; white-space: nowrap; }
.mk-badge.tone-ok { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.mk-badge.tone-warning { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.mk-badge.tone-error { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.mk-badge.tone-muted { background: var(--surface-alt); color: var(--text-muted); border-color: var(--border); }
.mp-product-status { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mp-product-sent { margin-top: 8px; }
.sr-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 18px; margin-bottom: 14px; }
#sr-status { flex-basis: 100%; }
.sr-input { width: 100%; min-width: 220px; padding: 6px 9px; font-size: 13.5px; font-family: inherit;
            border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); }
tr.is-saved .sr-input { border-color: var(--success-border); }
@media (max-width: 640px) {
  .mp-action { grid-template-columns: 52px 1fr; }
  .mp-action-stock, .mp-arrow { display: none; }
}
.tx-categories { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tx-category { font-family: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 999px; cursor: pointer;
               border: 1px solid var(--border); background: var(--surface); color: var(--text); text-align: left; }
.tx-category:hover { border-color: var(--primary); }
.tx-category.active { background: var(--primary-fill); border-color: var(--primary-fill); color: #fff; }
.tx-title { margin: 20px 0 10px; font-size: 15px; }
.tx-group { margin-bottom: 14px; }
.tx-group-head { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin-bottom: 8px; cursor: default; }
details.tx-group > summary { cursor: pointer; }
.tx-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tx-chip { font-size: 12.5px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-alt); }
.tx-chip.is-required { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); font-weight: 600; }
.tx-chip.is-recommended { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.ml-legend { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 2px 0 4px; }
.ml-legend:first-child { margin-left: 0; }
.fix-box { margin-top: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-alt); }
.fix-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.fix-rows { display: flex; flex-direction: column; gap: 6px; }
.fix-row { display: grid; grid-template-columns: 190px minmax(160px, 1fr) minmax(150px, 240px); gap: 10px; align-items: center; }
.fix-row input, .fix-row textarea { width: 100%; padding: 7px 10px; font-size: 13.5px; font-family: inherit;
                                     border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.fix-row.is-saved input, .fix-row.is-saved textarea { border-color: var(--success-border); }
.fix-label { font-size: 13.5px; font-weight: 600; }
.fix-targets { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 3px; margin-top: -2px; }
.fix-targets:empty { display: none; }
.fix-target { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.fix-target-mp { font-weight: 600; }
.fix-target strong { color: var(--text); }
.fix-target-ok { color: var(--success); font-weight: 700; }
.fix-target-bad { color: var(--danger); font-weight: 600; }
.fix-target-note { font-size: 11.5px; color: var(--text-faint); font-style: italic; }
.fix-target-adjusted { font-size: 11.5px; font-weight: 600; color: var(--warning); background: var(--warning-bg);
                       border: 1px solid var(--warning-border); border-radius: 999px; padding: 0 7px; }
.fix-target select, .fix-target .fix-target-search { width: auto; min-width: 240px; font-size: 12.5px; padding: 3px 6px; max-width: 320px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); border-radius: 6px; }
/* La liste ouverte reprend le fond du champ : un fond opaque, lisible en clair comme en sombre. */
.fix-target select option { background: var(--surface); color: var(--text); }
.fix-own-edit .fix-own-input { flex: 1 1 360px; min-width: 0; font-size: 12.5px; padding: 4px 8px; }
.fix-own-edit .fix-ai-note { flex: 1 1 100%; }
.fix-combo { position: relative; min-width: 0; }
.fix-combo-list { margin-top: 4px; }
.fix-combo-list .is-create .ac-name { color: var(--primary); }
.fix-other { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; cursor: pointer;
             border: 1px dashed var(--primary-border); background: var(--surface); color: var(--primary); }
.fix-other:hover { background: var(--primary-bg); }
.fix-clear { width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer; font-size: 14px; line-height: 18px;
             font-weight: 700; border: 1px solid var(--border); background: var(--surface); color: var(--text-faint); }
.fix-clear:hover { color: var(--danger); border-color: var(--danger); background: var(--danger-bg, var(--surface)); }
.fix-meta { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; overflow: hidden; }
.fix-badge { font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 999px; border: 1px solid; cursor: default; }
.fix-badge.is-proposed { color: var(--primary-hover); background: var(--primary-bg); border-color: var(--primary-border); cursor: help; }
.fix-badge.is-saved { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.fix-badge.is-ai { color: var(--accent); background: var(--accent-bg); border-color: var(--accent-border); }
.fix-row.is-ai input, .fix-row.is-ai textarea { border-color: var(--accent-border); background: #fcfaff; }
.btn-ai { color: var(--accent); border-color: var(--accent-border); }
.btn-ai:hover { background: var(--accent-bg); }
.fix-source { font-size: 11.5px; color: var(--text-muted); font-style: italic; }
.fix-row .fix-meta { flex-wrap: wrap; white-space: normal; row-gap: 2px; }
.fix-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.flux-steps { margin: 6px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
@media (max-width: 760px) { .ml-row-channel, .fix-row { grid-template-columns: 1fr; } .fix-targets { grid-column: auto; } }

/* --- Tuiles « Aujourd'hui sur chaque plateforme » --- */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 8px; }
.pf-cell { position: relative; display: flex; }
.pf-cell > .pf-tile { flex: 1; min-width: 0; }
.pf-link { position: absolute; right: 7px; bottom: 7px; display: inline-flex; align-items: center; justify-content: center;
           width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface);
           color: var(--text-muted); transition: color .12s ease, border-color .12s ease, transform .12s ease; }
.pf-link:hover { color: var(--primary); border-color: var(--primary); transform: translateY(-1px); text-decoration: none; }
.mp-product-links { display: inline-flex; align-items: center; gap: 14px; }
.mp-online-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px;
                  font-weight: 600; border: 1px solid var(--primary-border); background: var(--primary-bg); color: var(--primary-hover); }
.mp-online-link:hover { text-decoration: none; border-color: var(--primary); }
.pf-tile {
  display: flex; flex-direction: column; gap: 2px; text-align: left; font-family: inherit; color: var(--text);
  padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface);
  transition: border-color .12s ease, box-shadow .12s ease;
}
button.pf-tile { cursor: pointer; }
button.pf-tile:hover { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.pf-tile-head { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); min-width: 0; }
.pf-tile-head .platform-avatar, .pf-tile-head .platform-avatar-fallback { width: 20px; height: 20px; }
.pf-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-price { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; margin-top: 3px; }
.pf-meta { font-size: 12px; color: var(--text-muted); }
.pf-meta > span { font-weight: 600; color: var(--text); }
.pf-meta > span.margin-neg { color: var(--danger); }
.pf-tag, .pf-next { font-size: 11.5px; font-weight: 600; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-next { color: var(--text-muted); font-weight: 500; }
.pf-tile.is-rule { background: var(--success-bg); border-color: var(--success-border); }
.pf-tile.is-rule .pf-tag { color: var(--success); }
.pf-tile.is-operation { background: #f7f3ff; border-color: var(--accent-border); }
.pf-tile.is-operation .pf-tag { color: var(--accent); }
.pf-tile.is-exclusive { background: #fff7f1; border-color: #fbd3b8; }
.pf-tile.is-exclusive .pf-tag { color: var(--exclusive); }
.pf-tile.is-loss { border-color: var(--danger-border); box-shadow: inset 3px 0 0 var(--danger); }
.pf-status { display: inline-flex; gap: 3px; margin-left: auto; flex-shrink: 0; }
.pf-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 6px; }
.pf-icon.is-offline { color: var(--text); background: var(--border); }
.pf-icon.is-error { color: var(--danger); background: var(--danger-bg); }
.pf-icon.is-warning { color: var(--warning); background: var(--warning-bg); }

/* Où le produit est en vente : le bloc le plus visible de la fiche. */
/* Fiche produit, onglet Corriger : résumé, étapes numérotées, marketplaces rangées selon qui agit, suivi. */
.pc-tabs { margin-bottom: 16px; }

.pc-step-sub { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }

.pc-fields { display: flex; flex-direction: column; }
.pc-field.fix-row { grid-template-columns: minmax(170px, 230px) minmax(180px, 1fr) minmax(150px, 250px); padding: 9px 0;
                    border-top: 1px solid var(--border); align-items: start; }
.pc-field.fix-row:first-child { border-top: none; }
.pc-field .fix-meta { padding-top: 7px; }
.pc-field-label { display: flex; flex-direction: column; gap: 4px; padding-top: 6px; }
.pc-asked { display: flex; flex-wrap: wrap; gap: 4px; }
.pc-asked-mp { font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 999px; line-height: 18px;
               background: var(--surface-alt); border: 1px solid var(--border); color: var(--text-muted); cursor: help; }
.pc-asked-mp.is-blocking { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.pc-field.is-solved { opacity: .6; }
.pc-field.is-solved:hover { opacity: 1; }

.pc-mp-list { list-style: none; margin: 0; padding: 0; }
.pc-mp { display: grid; grid-template-columns: 170px 1fr auto; gap: 6px 14px; align-items: start;
         padding: 11px 0; border-top: 1px solid var(--border); }
.pc-mp:first-child { border-top: none; }
.pc-mp-name { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; min-width: 0; }
.pc-mp-name .platform-avatar, .pc-mp-name .platform-avatar-fallback { width: 22px; height: 22px; flex: none; }
.pc-mp-body { min-width: 0; }
.pc-mp-status { font-size: 13px; font-weight: 600; }
.pc-mp-todo { font-size: 13.5px; margin-top: 2px; }
.pc-mp-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.pc-detail { margin-top: 4px; font-size: 12.5px; }
.pc-detail > summary { cursor: pointer; color: var(--text-faint); font-weight: 600; width: fit-content; }
.pc-detail > summary:hover { color: var(--text-muted); }
.pc-detail .diag-steps { margin: 6px 0; }
.pc-detail-list { margin: 6px 0; padding-left: 18px; color: var(--text-muted); }


.pc-events { list-style: none; margin: 0; padding: 0 0 0 16px; border-left: 2px solid var(--border); }
.pc-event { position: relative; display: flex; gap: 14px; padding: 6px 0 10px; font-size: 13.5px; }
.pc-event::before { content: ""; position: absolute; left: -23px; top: 11px; width: 10px; height: 10px; border-radius: 50%;
                    background: var(--surface); border: 2px solid var(--border-strong); }
.pc-event.is-fix::before { background: var(--primary); border-color: var(--primary); }
.pc-event.is-up::before { background: var(--success); border-color: var(--success); }
.pc-event.is-down::before { background: var(--danger); border-color: var(--danger); }
.pc-event-date { width: 118px; flex: none; font-size: 12px; color: var(--text-muted); padding-top: 2px; }
.pc-event-body { min-width: 0; flex: 1; }
.pc-event-body .pc-mp-name { font-size: 13.5px; margin-right: 6px; }
.pc-event-change { color: var(--text-muted); }
.pc-event.is-up .pc-event-change strong { color: var(--success); }
.pc-event.is-down .pc-event-change strong { color: var(--danger); }
.pc-arrow { color: var(--text-faint); margin: 0 3px; }
.pc-worked { color: var(--success); font-weight: 600; font-size: 12.5px; margin-top: 2px; }
.pc-empty strong { font-size: 15px; }
.fix-badge.is-bad { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); cursor: help; }
.fix-badge.is-saving { color: var(--text-muted); background: var(--surface-alt); border-color: var(--border); }
.fix-problem { grid-column: 2 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px;
               padding: 6px 10px; border: 1px solid var(--danger-border); background: var(--danger-bg); color: var(--danger);
               border-radius: var(--radius-sm); }
.fix-problem[hidden] { display: none; }
.fix-problem button { font: inherit; font-size: 12px; color: var(--danger); background: none; border: 0; padding: 0;
                      text-decoration: underline; cursor: pointer; }
.fix-row.is-problem input, .fix-row.is-problem textarea { border-color: var(--danger-border); background: #fff; }
.fix-badge.is-locked { color: var(--text-muted); background: var(--surface-alt); border-color: var(--border); cursor: help; }
.fix-row input[readonly], .fix-row textarea[readonly] { background: var(--surface-alt); color: var(--text-muted); cursor: not-allowed; }
.fix-unlock, .fix-use { font: inherit; font-size: 12px; font-weight: 600; background: none; border: 0; padding: 0; cursor: pointer;
                        color: var(--primary); }
.fix-unlock:hover, .fix-use:hover { text-decoration: underline; }
/* Trombone d'un champ qui attend un fichier (product_documents.py), et le lien pour voir celui qui est joint. */
.fix-attach { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--primary);
              cursor: pointer; padding: 2px 8px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.fix-attach:hover { border-color: var(--primary-border); background: var(--primary-bg); }
.fix-attach.is-busy { opacity: .6; pointer-events: none; }
.fix-doc { font-size: 12px; font-weight: 600; color: var(--primary); }
.fix-known { grid-column: 2 / -1; display: flex; flex-direction: column; gap: 3px; margin-top: -2px; }
.fix-known:empty { display: none; }
.fix-scope { align-self: flex-start; font-size: 11.5px; font-weight: 600; color: var(--primary-hover); background: var(--primary-bg);
             border: 1px solid var(--primary-border); border-radius: 999px; padding: 1px 8px; cursor: help; }
.fix-known-line[hidden] { display: none; }
.fix-known-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.fix-known-line strong { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.fix-known-from { white-space: nowrap; }
.fix-known-line.is-ai .fix-known-from { color: var(--accent); }
@media (max-width: 760px) { .fix-problem, .fix-known { grid-column: auto; } }
.pc-more { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 10px; }
.pc-more > summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.pc-more[open] > summary { margin-bottom: 4px; }
@media (max-width: 760px) {
  .pc-field.fix-row, .pc-mp { grid-template-columns: 1fr; }
  .pc-mp-actions { justify-content: flex-start; }
  .pc-event { flex-direction: column; gap: 0; }
}
.ol-pf .platform-avatar, .ol-pf .platform-avatar-fallback, .ol-chip .platform-avatar, .ol-chip .platform-avatar-fallback,
.pl-online .platform-avatar, .pl-online .platform-avatar-fallback { width: 18px; height: 18px; flex: none; }
@media (max-width: 760px) { .ol-row { grid-template-columns: 1fr; } }

/* Liste Produits : où chaque produit est en vente. */
.pl-online { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.pl-pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 9px; line-height: 1.45;
           border-radius: 7px; border: 1px solid var(--border); color: var(--text-muted); background: var(--surface-alt); }
th.pl-product { min-width: 300px; }
th.pl-online-col { width: 210px; }
.pl-pill.is-online { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.pl-pill[title] { cursor: help; }
.pl-pill.is-offline { color: var(--danger); background: var(--danger-bg); border-color: var(--danger-border); }
.pl-pill.is-waiting { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.pl-fix { font-size: 12.5px; font-weight: 600; color: var(--danger); }
.pl-online-head { display: flex; align-items: center; gap: 8px; white-space: nowrap; cursor: help; }
.pl-count { font-size: 12.5px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.pl-blocked { font-size: 12.5px; font-weight: 600; color: var(--danger); line-height: 1.35; white-space: nowrap; }
.pl-blocked:hover { text-decoration: underline; }
.pl-waiting { font-size: 12.5px; font-weight: 600; color: var(--warning); line-height: 1.35; cursor: help; white-space: nowrap; }
@media (max-width: 760px) { .ph-stats { grid-template-columns: 1fr; } .ph-verdict { grid-template-columns: 1fr auto; } }

/* --- Sélecteur de dates (voir setupDatePicker dans app.js) --- */
.dp-trigger {
  display: flex; align-items: center; gap: 9px; width: 100%;
  font-family: inherit; font-size: 14px; text-align: left; cursor: pointer;
  padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text-muted);
  transition: border-color .12s ease, box-shadow .12s ease;
}
.dp-trigger:hover { border-color: var(--text-faint); }
.dp-trigger.is-open, .dp-trigger:focus-visible { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.dp-trigger.is-invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.dp-text { flex: 1; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dp-text.is-empty { color: var(--text-faint); font-weight: 400; }
.dp-nights { flex: none; font-size: 12px; font-weight: 600; color: var(--primary-hover); background: var(--primary-bg); border-radius: 999px; padding: 1px 9px; }
.dp-pop {
  position: fixed; inset: auto; margin: 0; display: none; z-index: 1000;
  padding: 14px 16px 12px; border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
  font-family: inherit;
}
.dp-pop.open { display: block; }
.dp-head { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; justify-content: space-between; pointer-events: none; }
.dp-nav {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
  font-size: 18px; line-height: 1; color: var(--text); cursor: pointer; font-family: inherit; pointer-events: auto;
}
.dp-nav:hover { background: var(--primary-bg); border-color: var(--primary-bg); color: var(--primary-hover); }
.dp-months { display: flex; gap: 26px; }
.dp-month-title { text-align: center; font-weight: 700; font-size: 14px; line-height: 32px; margin: -4px 0 8px; }
.dp-month-title::first-letter { text-transform: uppercase; }
.dp-hint { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 38px); row-gap: 2px; }
.dp-dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--text-faint); text-transform: uppercase; padding-bottom: 4px; }
.dp-day {
  height: 36px; border: 0; background: none; font-family: inherit; font-size: 13.5px; color: var(--text);
  cursor: pointer; border-radius: 50%; position: relative;
}
.dp-day:hover { background: var(--primary-bg); color: var(--primary-hover); }
.dp-day.is-past { color: var(--text-faint); }
.dp-day.is-today { font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--primary); }
.dp-day.in-range { background: var(--primary-bg); color: var(--primary-hover); border-radius: 0; }
.dp-day.is-start, .dp-day.is-end { background: var(--primary-fill); color: white; font-weight: 700; }
.dp-day.is-start:not(.is-end) { border-radius: 50% 0 0 50%; }
.dp-day.is-end:not(.is-start) { border-radius: 0 50% 50% 0; }
.dp-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dp-foot:empty { display: none; }
.dp-clear { margin-left: auto; border: 0; background: none; font-family: inherit; font-size: 13px; color: var(--text-muted); cursor: pointer; }
.dp-clear:hover { color: var(--danger); }

/* --- Fenêtre modale --- */
dialog.modal {
  width: min(460px, calc(100vw - 32px)); padding: 22px 24px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-md);
}
dialog.modal.modal-wide { width: min(720px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(20, 30, 28, .35); }
/* Fenêtre de correction : la page courte de correction (/product/corriger) au milieu de l'écran,
   par-dessus la liste. Deux cadres : le second, caché, précharge le produit suivant (setupFixWindow). */
dialog.fix-dialog { width: min(1080px, calc(100vw - 40px)); height: min(calc(100vh - 40px), 940px); max-height: none; padding: 0;
  overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text);
  box-shadow: 0 30px 80px rgba(20, 30, 28, .32), 0 8px 24px rgba(20, 30, 28, .12); }
dialog.fix-dialog[open] { display: flex; flex-direction: column; animation: fix-in .16s ease-out; }
dialog.fix-dialog::backdrop { background: rgba(20, 30, 28, .45); backdrop-filter: blur(2px); }
@keyframes fix-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.fix-dialog-head { display: flex; align-items: center; gap: 12px; padding: 9px 12px 9px 18px; border-bottom: 1px solid var(--border);
  background: var(--surface); }
.fix-dialog-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.fix-dialog-who strong, .fix-dialog-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fix-dialog-who strong { font-size: 14.5px; }
.fix-dialog-pos { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; flex: 0 1 auto; min-width: 0; max-width: 42%;
  overflow: hidden; text-overflow: ellipsis; }
/* Avis #101 : le nom de la file (« À renseigner : Y a-t-il un avertissement… ») ne pousse plus les boutons hors de la
   fenêtre ; il se coupe, le produit garde sa place, Précédent / Suivant, Fiche complète et ✕ ne rétrécissent jamais. */
.fix-dialog-who { flex-basis: 180px; }
.fix-dialog-nav, .fix-dialog-head > .btn, .fix-dialog-head > .icon-btn { flex: none; }
.fix-dialog-nav { display: flex; gap: 6px; }
.fix-dialog-body { position: relative; flex: 1; min-height: 0; display: flex; }
.fix-dialog iframe { flex: 1; width: 100%; border: 0; background: var(--bg); transition: opacity .12s; }
.fix-dialog iframe[hidden] { display: none; }
.fix-dialog.is-loading iframe { opacity: .55; }
.fix-dialog-loader { position: absolute; left: 0; right: 0; top: 0; height: 3px; overflow: hidden; pointer-events: none; opacity: 0;
  transition: opacity .15s; }
.fix-dialog.is-loading .fix-dialog-loader { opacity: 1; }
.fix-dialog-loader::after { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 2px;
  background: var(--primary); animation: fix-load 1s ease-in-out infinite; }
@keyframes fix-load { to { left: 100%; } }
html.in-frame .sidebar, html.in-frame .mp-back { display: none; }
html.in-frame .content { max-width: none; padding: 16px 22px 36px; }
tr.is-fixed td, li.is-fixed, .pl-row.is-fixed { background: var(--success-bg); }
/* La ligne de la liste affichée dans la fenêtre. */
tr.is-current td { background: var(--primary-bg); }
tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
tr.is-current.is-fixed td { background: var(--success-bg); }
th.pl-fix-col, td.pl-fix-col { width: 1%; white-space: nowrap; text-align: right; }
.modal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-head h3 { font-size: 16px; margin: 0; }
.modal-product { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.modal-actions .link-btn { margin-right: auto; }
/* Questions et messages (Pricer.confirm / alert / prompt, app.js) : au milieu de l'écran, dans la DA de ZK. */
dialog.ask-dialog[open] { animation: fix-in .14s ease-out; }
.ask-dialog .modal-head { margin-bottom: 8px; }
.ask-dialog .modal-head h3 { line-height: 1.4; overflow-wrap: anywhere; }
.ask-text { margin: 0; color: var(--text-muted); line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.ask-input { width: 100%; margin-top: 10px; }
.ask-dialog .modal-actions { margin-top: 20px; }

/* --- Sélecteur de produits en grille --- */
.product-thumb {
  flex: none; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--surface-alt); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.product-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-head h3 { margin: 0; }
#pk-body { margin-top: 14px; }
.picker-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.picker-filters select { max-width: 240px; }
.picker-search { position: relative; flex: 1; min-width: 220px; }
.picker-search span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: flex; }
.picker-search input { width: 100%; padding-left: 32px; }
.picker-actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; font-size: 13px; margin-bottom: 12px; }
.picker-paste { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.picker-paste textarea {
  font-family: inherit; font-size: 14px; padding: 9px 12px; resize: vertical;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.link-btn {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--primary);
  background: none; border: none; padding: 0; cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:disabled { color: var(--text-faint); cursor: default; text-decoration: none; }
/* « Recherche Sage » à côté du prix de revient et du poids brut (app.js, sageButton) */
.sage-btn { font-size: 12px; white-space: nowrap; margin: 0 0 0 8px; }
.field > .sage-btn { display: block; margin: 4px 0 0; }

.pick-grid {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  max-height: 62vh; overflow-y: auto; padding: 2px;
}
.pick-card {
  position: relative; display: flex; gap: 12px; align-items: center;
  padding: 10px 34px 10px 10px; cursor: pointer; user-select: none;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface);
  transition: border-color .12s ease, background .12s ease, box-shadow .12s ease;
}
.pick-card:hover { border-color: var(--text-faint); }
.pick-card:has(input:checked) { border-color: var(--primary); background: var(--primary-bg); box-shadow: 0 0 0 1px var(--primary); }
.pick-card input { position: absolute; top: 10px; right: 10px; margin: 0; width: 16px; height: 16px; accent-color: var(--primary); }
.pick-card[hidden] { display: none; }
.pick-info { min-width: 0; }
.pick-name {
  font-size: 13px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-prices { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; display: flex; flex-wrap: wrap; column-gap: 10px; }
.pick-prices span { white-space: nowrap; }
.pick-sales { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.pick-sales.is-here { color: var(--primary); font-weight: 600; }
.pick-why { font-size: 11.5px; color: var(--warning); margin-top: 3px; cursor: help; }
.pick-why a { color: var(--warning); text-decoration: underline; }
#sim-table td:not(:nth-child(2)) { white-space: nowrap; }
.pick-prices strong { color: var(--text); font-weight: 600; }


.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 20;
  margin-top: 6px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-item {
  padding: 9px 12px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s ease;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--primary-bg); }
.autocomplete-item .ac-name { font-weight: 600; }
.autocomplete-item .ac-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }
.autocomplete-empty { padding: 12px; font-size: 13px; color: var(--text-muted); }

/* --- Recherche rapide de la barre latérale --- */
.nav-search { position: relative; margin: 0 2px 14px; }
.nav-search > span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-faint); display: flex; }
.nav-search input { width: 100%; padding: 8px 10px 8px 32px; font-size: 13px; background: var(--surface-alt); }
.nav-search .autocomplete-list { width: 440px; max-height: min(70vh, 560px); }
/* Ouverte, la liste flotte au-dessus de la page (floatSearchList, app.js) : plus rognée par la barre latérale. */
.autocomplete-list.is-floating { position: fixed; right: auto; margin-top: 0; z-index: 60; }
.nav-search-kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); pointer-events: none;
  font: 600 10.5px/1 inherit; color: var(--text-faint); border: 1px solid var(--border); border-radius: 5px;
  padding: 3px 5px; background: var(--surface); }
.nav-search input:focus ~ .nav-search-kbd, .nav-search input:not(:placeholder-shown) ~ .nav-search-kbd { display: none; }
@media (pointer: coarse), (max-width: 880px) { .nav-search-kbd { display: none; } }
html.nav-closed .nav-search-kbd { display: none; }

/* --- Suggestions de produits (setupProductSearch, app.js) : vignette, nom surligné, identifiants, stock --- */
.autocomplete-item.ac-product { display: flex; align-items: center; gap: 10px; padding: 7px 10px; }
.ac-thumb { flex: none; width: 34px; height: 34px; border-radius: 6px; background: var(--surface-sunken); overflow: hidden;
  display: flex; align-items: center; justify-content: center; }
.ac-thumb img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.ac-body { flex: 1; min-width: 0; }
.ac-product .ac-name { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; }
.ac-product .ac-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.autocomplete-list mark { background: color-mix(in srgb, var(--warning-soft) 30%, transparent); color: inherit; border-radius: 2px; }
.ac-why { color: var(--primary); font-weight: 600; }
.ac-stock { flex: none; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.ac-stock.is-out { color: var(--danger); }
.ac-head { padding: 8px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.ac-foot { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px;
  font-size: 12px; color: var(--text-muted); background: var(--surface-alt); border-top: 1px solid var(--border); text-decoration: none; }
.ac-foot:hover { color: var(--primary); }
.ac-foot .ac-keys { color: var(--text-faint); }
@media (pointer: coarse) { .ac-foot .ac-keys { display: none; } }

/* --- Origine d'un prix --- */
.badge-operation { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }
.badge-nostock { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); cursor: help; }
.pick-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.badge-simulation { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-pending { background: var(--surface); color: var(--warning); border: 1px dashed var(--warning-border); }
/* Avancement de la validation d'une opération : produits à ajouter → prix à valider → validée. */
.badge-step { cursor: help; white-space: nowrap; }
.badge-step-count { opacity: .7; font-weight: 400; margin-left: 2px; }
.badge-step-products { background: var(--surface); color: var(--danger); border: 1px dashed var(--danger-border); }
.badge-step-prices { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.badge-step-counter { background: var(--primary-bg); color: var(--primary-hover); border-color: var(--primary-border); }
.badge-step-validated { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }
.badge-exclusive { background: #fff1e8; color: var(--exclusive); border-color: #fbd3b8; }
.badge-normal { background: var(--surface-sunken); color: var(--text-muted); border-color: var(--border); }
a.badge:hover { text-decoration: none; filter: brightness(.97); }

/* --- Verdict d'un prix par plateforme --- */
.verdict-table td { vertical-align: top; }
.verdict-table tr.is-blocked td { background: var(--danger-bg); }
.verdict-ok { color: var(--success); font-weight: 700; font-size: 12.5px; }
.verdict-blocked { color: var(--danger); font-weight: 600; font-size: 12.5px; }
.verdict-note { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
.verdict-why { color: var(--warning); font-size: 12px; margin-top: 2px; cursor: help; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 12px; }
.section-head h2 { font-size: 16px; margin: 0; }

/* --- Tableau de bord (pilotage) --- */
.kpi-bubbles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.kpi-bubble {
  display: flex; align-items: center; gap: 16px; padding: 18px 20px; font-family: inherit; text-align: left;
  border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-xs);
  cursor: pointer; transition: transform .12s ease, box-shadow .12s ease;
}
.kpi-bubble:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi-bubble-value {
  flex: none; width: 58px; height: 58px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 800; background: var(--surface-alt); color: var(--text); border: 1px solid var(--border);
}
.kpi-bubble-label { font-size: 13.5px; font-weight: 600; color: var(--text-muted); line-height: 1.3; }
.kpi-bubble.tone-primary .kpi-bubble-value { background: var(--primary-bg); color: var(--primary-hover); border-color: var(--primary-border); }
.kpi-bubble.tone-upcoming .kpi-bubble-value { background: var(--accent-bg); color: var(--accent); border-color: var(--accent-border); }
.kpi-bubble.tone-error .kpi-bubble-value { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }
.kpi-bubble.tone-ok .kpi-bubble-value { background: var(--success-bg); color: var(--success); border-color: var(--success-border); }

.bf-tab { font-weight: 800; }
.bf-tab:not(.active) { color: var(--text); }
.bf-tab.active { background: #1b1f1e !important; color: #fff !important; }
.bf-tab-count { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px;
                background: var(--danger); color: #fff; }
.bf-hero { background: #1b1f1e; color: #fff; border: 0; display: grid; grid-template-columns: auto 1fr; gap: 12px 36px; align-items: center; }
.bf-hero h2 { margin: 0; font-size: 26px; letter-spacing: -.01em; }
.bf-hero .muted-small, .bf-hero .bf-sub { color: #b3bab7; }
.bf-count { font-size: 56px; font-weight: 800; line-height: 1; }
.bf-count small { display: block; font-size: 13px; font-weight: 600; color: #b3bab7; margin-top: 4px; }
.bf-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.bf-step { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); }
.bf-step strong { display: block; font-size: 15px; }
.bf-step span { font-size: 12.5px; color: #b3bab7; }
.bf-step.is-urgent { background: rgba(224,51,43,.18); border-color: rgba(224,51,43,.55); }
.bf-step.is-urgent span { color: #ffd2cf; }
.bf-step.is-past { opacity: .5; }
.bf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.bf-figure { font-size: 30px; font-weight: 800; }
.bf-ratio { color: var(--success); font-weight: 800; }
.bf-top { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bf-top li { display: flex; justify-content: space-between; gap: 10px; }
.bf-top li span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-disc { font-weight: 800; }
.bf-disc.is-low { color: var(--danger); }
@media (max-width: 900px) { .bf-grid, .bf-hero { grid-template-columns: 1fr; } }
.dash-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; box-shadow: var(--shadow-xs); }
.dash-tab {
  display: inline-flex; align-items: center; gap: 7px; font-family: inherit; font-size: 14px; font-weight: 600;
  padding: 9px 18px; border: none; border-radius: 999px; background: transparent; color: var(--text-muted); cursor: pointer;
}
.dash-tab:hover { color: var(--text); }
.dash-tab.active { background: var(--primary-fill); color: #fff; box-shadow: 0 1px 3px rgba(29,94,85,.3); }
.dash-tab.active .tab-dot { background: #fff; color: var(--warning); }
.dash-empty { padding: 26px; text-align: center; color: var(--text-muted); font-size: 14px;
  border: 1px dashed var(--border-strong); border-radius: 20px; background: var(--surface); }

.ring { flex: none; width: 68px; height: 68px; }
.ring-track { fill: none; stroke: var(--border); stroke-width: 6; }
.ring-fill { fill: none; stroke: var(--primary); stroke-width: 6; stroke-linecap: round; transform: rotate(-90deg); transform-origin: 32px 32px; }
.ring-big { font: 800 14px Inter, sans-serif; fill: var(--text); text-anchor: middle; }
.ring-small { font: 600 10px Inter, sans-serif; fill: var(--text-faint); text-anchor: middle; }
.detail-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.detail-list li { display: flex; flex-direction: column; gap: 1px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.detail-list li:last-child { border-bottom: none; }
.detail-list a { font-weight: 600; color: var(--text); }

@media (max-width: 980px) { .kpi-bubbles { grid-template-columns: repeat(2, 1fr); } }

/* --- Fiche produit --- */
.product-head { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.product-head-main { flex: 1; min-width: 260px; }
.product-head h1 { font-size: 19px; line-height: 1.3; }
.product-ids { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--text-muted); margin-top: 6px; }
.kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.kpi { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; min-width: 116px; background: var(--surface-alt); }
.kpi-label { font-size: 10.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.kpi-value s { font-size: 12px; font-weight: 500; color: var(--text-faint); margin-left: 4px; }
.kpi.is-missing { border-color: var(--warning-border); background: var(--warning-bg); }
.kpi.is-missing .kpi-value { color: var(--warning); font-size: 13px; }
.kpi-edit { display: flex; align-items: center; gap: 5px; margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.kpi-edit[hidden] { display: none; }
.kpi-edit input { width: 82px; padding: 4px 6px; font-size: 14px; font-weight: 700; }
.kpi-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; font-size: 12.5px; }
.kpi-actions .kpi-edit { margin: 0; gap: 8px; }
.kpi-error { flex-basis: 100%; text-align: right; color: var(--danger); }
/* Prix de vente modifié dans l'en-tête : la marge qu'il donne sur chaque marketplace. */
.bp-panel { display: block; margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font-size: 12.5px; max-width: 560px; }
.bp-zenkaa { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font-weight: 600; }
.bp-zenkaa .muted-small { font-weight: 400; }
.bp-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px 18px; }
.bp-row { display: flex; justify-content: space-between; gap: 8px; min-width: 0; }
.bp-row > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-row > span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-note { margin: 8px 0 0; color: var(--text-muted); }
@media (max-width: 560px) { .bp-rows { grid-template-columns: 1fr; } }
.mode-switch { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); overflow: hidden; }
.mode-switch button {
  font-family: inherit; font-size: 13px; font-weight: 600; padding: 8px 12px; border: none;
  background: var(--surface); color: var(--text-muted); cursor: pointer;
}
.mode-switch button + button { border-left: 1px solid var(--border-strong); }
.mode-switch button.active { background: var(--primary-bg); color: var(--primary-hover); }
.check-line { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-line input { margin: 0; }
.muted-small { color: var(--text-muted); font-size: 12px; }

/* --- Opération --- */
.op-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.op-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.op-commissions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.op-commission {
  display: inline-flex; align-items: center; gap: 7px; padding: 3px 10px 3px 4px; cursor: pointer;
  border: 1px solid var(--border); border-radius: 999px; background: var(--surface);
  font-family: inherit; font-size: 12.5px; color: var(--text-muted);
}
.op-commission:hover { border-color: var(--border-strong); }
.op-commission .platform-avatar, .op-commission .platform-avatar-fallback { width: 22px; height: 22px; }
.op-commission strong { color: var(--text); font-weight: 600; }
.op-commission.is-negotiated { border-color: var(--primary-border); background: var(--primary-bg); }
.op-commission.is-negotiated strong { color: var(--primary-hover); }
.commission-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.commission-row { display: flex; align-items: center; gap: 12px; }
.commission-name { flex: 1; display: flex; flex-direction: column; line-height: 1.35; font-size: 14px; }
.commission-input { display: flex; align-items: center; gap: 6px; color: var(--text-muted); }
.commission-input input { width: 80px; text-align: right; }
.line-price { width: 100px; font-weight: 700; }
input.line-rate { width: 58px; padding: 4px 8px; font-weight: 700; text-align: right; }
tr.line-changed td { background: var(--primary-bg); }
.sticky-bar {
  position: sticky; bottom: 12px; z-index: 10; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-top: 12px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); font-size: 14px;
}


/* Menu repliable : la flèche ronde sur le bord du menu, à mi-hauteur de l'écran, le réduit à une
   colonne d'icônes (la page en cours reste en surbrillance, le nom au survol) puis le rouvre. Les
   animations ne jouent qu'après le chargement (html.nav-anim, posé par setupNavToggle). */
/* Visionneuse d'images (app.js, lightbox) : l'image en grand sur fond sombre, ‹ › de part et d'autre, compteur dessous. */
dialog.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(14, 22, 20, 0.92); color: #fff; overflow: hidden; }
dialog.lightbox::backdrop { background: transparent; }
dialog.lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lb-stage { margin: 0; height: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.lb-img { max-width: calc(100vw - 180px); max-height: calc(100vh - 110px); object-fit: contain; background: #fff; border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35); }
.lb-count { font-size: 13px; color: rgba(255, 255, 255, 0.8); }
.lb-nav, .lb-close { border: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.12); display: grid; place-items: center;
  transition: background .15s ease; }
.lb-nav:hover, .lb-close:hover { background: rgba(255, 255, 255, 0.24); }
.lb-nav:focus-visible, .lb-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-nav { flex: none; width: 52px; height: 52px; margin: 0 22px; border-radius: 50%; font-size: 30px; line-height: 1; }
.lb-close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 50%; font-size: 18px; }
dialog.lightbox.is-single .lb-nav { visibility: hidden; }
@media (max-width: 760px) { .lb-nav { width: 40px; height: 40px; margin: 0 6px; font-size: 24px; } .lb-img { max-width: calc(100vw - 110px); } }

/* Retour en haut (app.js, setupBackToTop) : rond, couleur ZK, en bas à droite ; n'apparaît qu'une fois la page défilée. */
.back-to-top { position: fixed; right: 24px; bottom: 24px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: var(--primary-fill); color: #fff; box-shadow: var(--shadow-md); cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease, background .15s ease; }
.back-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.back-to-top:hover { background: var(--primary-fill-hover); }
.back-to-top:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
@media (max-width: 760px) { .back-to-top { right: 16px; bottom: 16px; width: 40px; height: 40px; } }
@media print { .back-to-top { display: none; } }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }

.nav-edge { position: fixed; top: 50%; left: var(--sidebar-w); z-index: 45; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0; cursor: pointer;
  border: 1px solid var(--primary-border); border-radius: 999px; background: var(--surface); color: var(--primary);
  box-shadow: var(--shadow-sm); }
.nav-edge:hover { color: #fff; background: var(--primary-fill); border-color: var(--primary-fill); box-shadow: 0 0 0 4px var(--primary-ring); }
.nav-edge:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--primary-ring); }
.nav-edge svg { transition: transform .22s ease; }
html.nav-closed .nav-edge svg { transform: rotate(180deg); }
html.nav-anim .sidebar { transition: width .22s ease, padding .22s ease; }
html.nav-anim .nav-edge { transition: left .22s ease, background .12s, color .12s; }
@media (min-width: 881px) {
  html.nav-closed { --sidebar-w: 64px; }
  html.nav-closed .sidebar { padding: 16px 10px; overflow-x: hidden; }
  html.nav-closed .sidebar-brand { justify-content: center; padding: 6px 0 18px; }
  html.nav-closed .sidebar-brand-name, html.nav-closed .nav-label, html.nav-closed .sidebar-user-email { display: none; }
  /* La recherche devient une loupe : un clic rouvre le menu, curseur dans le champ. */
  html.nav-closed .nav-search { margin: 0 0 12px; }
  html.nav-closed .nav-search > span { left: 50%; transform: translate(-50%, -50%); pointer-events: none; }
  html.nav-closed .nav-search input { padding: 8px 0; color: transparent; cursor: pointer; }
  html.nav-closed .nav-search input::placeholder { color: transparent; }
  html.nav-closed .sidebar-nav a { justify-content: center; padding: 10px 0; position: relative; }
  html.nav-closed .sidebar-nav a.active { background: var(--primary-fill); color: #fff; box-shadow: var(--shadow-sm); }
  html.nav-closed .sidebar-nav a.active .nav-count.is-work { background: #fff; }
  html.nav-closed .nav-count { position: absolute; top: 3px; right: 3px; margin: 0; min-width: 16px; height: 16px; padding: 0 4px;
    font-size: 10px; box-shadow: 0 0 0 2px var(--surface); }
  html.nav-closed .nav-count.is-work { min-width: 9px; width: 9px; height: 9px; padding: 0; font-size: 0; background: var(--primary); }
  html.nav-closed .sidebar-help { flex-direction: column; }
  html.nav-closed .sidebar-help .btn { padding: 8px 0; }
  html.nav-closed .sidebar-footer { flex-direction: column; gap: 6px; }
  html.nav-closed .sidebar-user { flex: none; }
}
html.in-frame .nav-edge { display: none; }

@media (max-width: 880px) {
  /* Sur petit écran, le menu est déjà une barre en haut : pas de repli. */
  .nav-edge { display: none; }
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center;
    border-right: none; border-bottom: 1px solid var(--border);
    padding: 10px 14px; gap: 4px;
  }
  .sidebar-brand { padding: 4px 10px 4px 0; }
  /* Le menu passe sur sa propre ligne et défile : il n'élargit plus la page. */
  .sidebar { flex-wrap: wrap; }
  .app-shell > * { min-width: 0; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; order: 3; flex: 1 0 100%; min-width: 0; }
  .nav-search { flex: 1; min-width: 0; margin: 0 2px; }
  .sidebar-nav a { white-space: nowrap; }
  .sidebar-footer { border-top: none; margin: 0; padding: 0; }
  .sidebar-user-email { display: none; }
  .sidebar-help { margin-top: 0; }
  .content { padding: 20px 16px 50px; }
  .field-row { flex-direction: column; align-items: stretch; }
  .stat-row { flex-wrap: wrap; }
}

/* Marketplaces → À ouvrir (_mp_prospects.html) : recherche des marketplaces où l'on ne vend pas encore. */
.pr-intro { margin: 0 0 14px; }
.pr-status-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pr-status-chip { cursor: pointer; font-family: inherit; }
.pr-status-chip strong { font-variant-numeric: tabular-nums; }
.pr-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--text-faint); flex: none; }
.pr-dot.is-interessante { background: var(--info); }
.pr-dot.is-candidature { background: var(--accent-soft); }
.pr-dot.is-en_cours { background: var(--warning-soft); }
.pr-dot.is-ouverte { background: var(--success); }
.pr-dot.is-pas_pour_nous { background: var(--border-strong); }
.pr-dot-badge { background: var(--surface-alt); border-color: var(--border); color: var(--text); }
.card.pr-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; margin-bottom: 8px; }
.pr-tools input[type=search] { flex: 1 1 260px; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.pr-tools input[type=search]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
.pr-tools select { flex: 0 1 auto; max-width: 100%; }
.pr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-muted); }
#pr-count { margin: 0 0 10px; }
.pr-list { display: flex; flex-direction: column; gap: 10px; }
.pr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); scroll-margin-top: 16px; }
.pr-card.is-closed { opacity: .7; }
.pr-head { display: grid; grid-template-columns: 64px minmax(200px, 1fr) auto auto; gap: 16px; align-items: center; padding: 14px 18px; }
.pr-score { width: 56px; height: 56px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  border: 3px solid var(--border-strong); color: var(--text-muted); }
.pr-score strong { font-size: 18px; }
.pr-score span { font-size: 10px; }
.pr-score.is-high { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.pr-score.is-mid { border-color: var(--warning-fill); color: var(--warning); }
.pr-title h3 { margin: 0 0 2px; font-size: 16px; }
.pr-title h3 a { color: inherit; }
.pr-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pr-figures { display: grid; grid-template-columns: repeat(4, minmax(90px, auto)); gap: 4px 18px; margin: 0; }
.pr-figures dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-faint); }
.pr-figures dd { margin: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.pr-more { border-top: 1px solid var(--border); }
.pr-more > summary { cursor: pointer; padding: 10px 18px; font-size: 13px; font-weight: 600; color: var(--primary); }
.pr-more[open] > summary { border-bottom: 1px solid var(--border); }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 6px 28px; padding: 6px 18px 4px; }
.pr-grid h4 { margin: 12px 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.pr-text { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
p.pr-text { padding-left: 0; }
.pr-text li + li { margin-top: 3px; }
.pr-pros li::marker { color: var(--success); }
.pr-cons li::marker { color: var(--danger); }
.pr-sources { word-break: break-all; }
.pr-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13.5px; }
.pr-facts dt { color: var(--text-muted); }
.pr-facts dd { margin: 0; }
.pr-parts { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.pr-parts li { display: grid; grid-template-columns: 1fr 80px 44px; gap: 8px; align-items: center; padding: 2px 0; }
.pr-parts strong { text-align: right; font-variant-numeric: tabular-nums; }
.pr-bar { height: 6px; border-radius: 99px; background: var(--surface-sunken); overflow: hidden; }
.pr-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.pr-follow { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; padding: 14px 18px; margin-top: 10px; background: var(--surface-alt); border-top: 1px solid var(--border); }
.pr-follow + form { padding: 0 18px 14px; background: var(--surface-alt); }
.pr-note { flex: 1 1 320px; }
.pr-follow textarea, .pr-add textarea { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); width: 100%; resize: vertical; }
.pr-add { margin-top: 18px; }
.pr-add > summary { cursor: pointer; }
.pr-add-form { margin-top: 14px; }
.pr-families { display: flex; flex-wrap: wrap; gap: 6px 16px; }
/* Campagne de contact (mp_campagne.py) : bandeau, contacts en tête du détail de chaque carte. */
.pr-camp { padding: 14px 18px; margin-bottom: 14px; display: grid; gap: 10px; }
.pr-camp .pr-camp-row { margin: 0; }
.pr-camp p { margin: 0; }
.pr-contacts { padding: 14px 18px 4px; }
.pr-contacts h4 { margin: 0 0 8px; }
.pr-contact { display: grid; grid-template-columns: minmax(220px, 1fr) 150px auto; gap: 6px 16px; align-items: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; }
.pr-contact.is-next { border-color: var(--primary-border); background: var(--primary-bg); }
.pr-tip { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.pr-contact-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.pr-inline { display: inline-flex; margin: 0; }
.pr-inline select { font: inherit; font-size: 12.5px; padding: 4px 6px; }
.pr-mail { grid-column: 1 / -1; }
.pr-mail > summary { cursor: pointer; font-size: 12.5px; color: var(--primary); }
.pr-mail-body { white-space: pre-wrap; font-size: 13px; line-height: 1.5; padding: 10px 12px; background: var(--surface-alt); border-radius: var(--radius-sm); margin-top: 6px; }
@media (max-width: 900px) {
  .pr-contact { grid-template-columns: 1fr; }
  .pr-contact-actions { justify-content: flex-start; }
  .pr-head { grid-template-columns: 56px 1fr; }
  .pr-figures { grid-column: 1 / -1; grid-template-columns: repeat(2, 1fr); }
  .pr-go { grid-column: 1 / -1; justify-self: start; }
}
.pr-excluded { margin-top: 12px; }

/* Verrou des prix d'une opération validée (page d'une opération) */
.op-lock { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 4px 0 10px; padding: 10px 14px;
           border: 1px solid var(--primary-border); background: var(--primary-bg); color: var(--primary);
           border-radius: var(--radius); font-size: 13px; }
.op-lock svg { flex: none; }
.op-lock span { flex: 1; min-width: 200px; }
.op-lock.is-open { border-color: var(--warning-border); background: var(--warning-bg); color: var(--warning); }
#lines-table.is-locked input.line-price, #lines-table.is-locked input.line-rate:not(.counter-price) {
  background: var(--surface-sunken); color: var(--text-muted); cursor: not-allowed; }

/* Contre-proposition d'une marketplace sur un deal (page d'une opération, deal_counter.py) */
.counter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 4px 0 10px; }
.counter-min { white-space: nowrap; font-size: 13px; }
#lines-table.no-counter .col-counter { display: none; }
.counter-entry + .counter-entry { margin-top: 6px; }
input.counter-price { width: 76px; }
.counter-actions { font-size: 12px; white-space: nowrap; }
.counter-comment { font-size: 12px; color: var(--text-muted); font-style: italic; max-width: 200px; white-space: normal; }

/* Case « Mode sombre » en bas du menu (setupTheme, app.js) */
.theme-switch { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 6px 8px; border-radius: var(--radius-sm);
  color: var(--text-muted); font-size: 12.5px; font-weight: 500; cursor: pointer; user-select: none; }
.theme-switch:hover { background: var(--surface-alt); color: var(--text); }
.theme-switch input, .m-menu-item input[type=checkbox] { margin: 0; accent-color: var(--primary-fill); cursor: pointer; }
.theme-switch svg { flex: none; order: -1; }
.m-menu-item input[type=checkbox] { width: 20px; height: 20px; flex: none; }
html.nav-closed .theme-switch { justify-content: center; padding: 8px 0; }
html.nav-closed .theme-switch svg { display: none; }
/* Lien « Espace patrons » (base.html) au même style, juste au-dessus : son icône reste quand le menu est réduit. */
a.theme-switch:hover { text-decoration: none; }
html.nav-closed a.theme-switch svg { display: block; }
/* Bouton soleil/lune (base.html, _mobile_shell.html, ajouté par app.js dans « Plus » d'une coque déposée) : la lune
   et « Passer en sombre » en clair, le soleil et « Passer en clair » en sombre. Ici et non dans da.css : sans la DA,
   le bouton reste propre (une icône, un libellé). */
button.theme-switch { width: 100%; border: 0; background: none; font-family: inherit; text-align: left; }
.theme-toggle .th-ico { display: inline-flex; flex: none; font-style: normal; }
.theme-toggle .th-sun, .theme-toggle .th-if-sombre,
html.theme-sombre .theme-toggle .th-moon, html.theme-sombre .theme-toggle .th-if-clair { display: none; }
html.theme-sombre .theme-toggle .th-sun { display: inline-flex; }
html.theme-sombre .theme-toggle .th-if-sombre { display: inline; }
/* Menu réduit aux icônes : l'icône reste, le libellé part. */
html.nav-closed button.theme-switch svg { display: block; }
@media (min-width: 881px) {
  html.nav-closed .sidebar .theme-toggle .nav-label { display: none; }
}

/* ========== Mode sombre : la palette de « Prix conseillés » (anthracite doux, menthe) sur toute l'appli ==========
   Les jetons du haut de ce fichier sont redéfinis ; --primary devient menthe (textes, liens, contours),
   --primary-fill garde le vert ZK sous les textes blancs. Les photos restent sur fond blanc. */
html.theme-sombre {
  color-scheme: dark;
  --bg: #242928;
  --surface: #2c3231;
  --surface-alt: #333a39;
  --surface-sunken: #1f2423;
  --border: #3a4240;
  --border-strong: #4a5452;
  --text: #f2f5f3;
  --text-muted: #aab4b0;
  --text-faint: #7d8884;
  --primary: #6ee7c8;
  --primary-hover: #9af0da;
  --primary-bg: #223b35;
  --primary-border: #2f5a50;
  --primary-ring: rgba(110, 231, 200, .22);
  --primary-fill: #1d5e55;
  --primary-fill-hover: #2a7a6e;
  --success: #22a866;
  --success-bg: rgba(34, 168, 102, .16);
  --success-border: rgba(34, 168, 102, .45);
  --warning: #e08a1e;
  --warning-bg: rgba(224, 138, 30, .15);
  --warning-border: rgba(224, 138, 30, .42);
  --danger: #ef5350;
  --danger-bg: rgba(239, 83, 80, .15);
  --danger-border: rgba(239, 83, 80, .45);
  --accent: #a78bfa;
  --accent-bg: rgba(167, 139, 250, .15);
  --accent-border: rgba(167, 139, 250, .42);
  --accent-soft: #a78bfa;
  --exclusive: #e5703a;
  --info: #6b9cf5;
  --info-bg: rgba(107, 156, 245, .25);
  --anthracite: #5b6563;
  --board-bg: linear-gradient(135deg, #17423c 0%, #1d5e55 55%, #236b5f 100%);
  --list-bg: #1f2423;
  --card-shadow: 0 1px 1px rgba(0, 0, 0, .4), 0 0 1px rgba(0, 0, 0, .5);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, .28), 0 1px 2px rgba(0, 0, 0, .2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .4), 0 2px 6px rgba(0, 0, 0, .25);
}
html.theme-sombre code { color: var(--text); }
/* Le zèbre du logo est transparent à l'intérieur de l'anneau : sans disque blanc, il disparaît sur le fond sombre. */
html.theme-sombre .zk-mark { background: #fff; border-radius: 50%; }
html.theme-sombre dialog.modal::backdrop, html.theme-sombre dialog.fix-dialog::backdrop { background: rgba(10, 13, 12, .6); }
html.theme-sombre .kb-toast { background: #3b4342; color: var(--text); }
html.theme-sombre .kb-toast.is-error { background: var(--danger); color: #fff; }
html.theme-sombre .kb-view.active { color: var(--primary-fill); }
html.theme-sombre .kb-count, html.theme-sombre .kb-placeholder { background: rgba(255, 255, 255, .08); }
html.theme-sombre .kb-icon-btn:hover, html.theme-sombre .kb-add:hover { background: rgba(255, 255, 255, .08); }
html.theme-sombre .fix-row.is-ai input, html.theme-sombre .fix-row.is-ai textarea { background: var(--accent-bg); }
html.theme-sombre .fix-row.is-problem input, html.theme-sombre .fix-row.is-problem textarea { background: var(--surface); }
html.theme-sombre .pf-tile.is-operation { background: var(--accent-bg); }
html.theme-sombre .pf-tile.is-exclusive, html.theme-sombre .badge-exclusive { background: rgba(229, 112, 58, .14); border-color: rgba(229, 112, 58, .42); }
html.theme-sombre .bf-hero { background: #1b1f1e; box-shadow: inset 0 0 0 1px var(--border); }
html.theme-sombre .m-top { background: rgba(36, 41, 40, .88); }
html.theme-sombre .m-tabs { background: rgba(36, 41, 40, .94); }

/* Changer la catégorie d'un produit chez une marketplace (static/categorie.js, mp_category_fix.py). */
dialog.cat-dialog .modal-head { margin-bottom: 8px; }
.cat-now { margin: 0 0 12px; line-height: 1.5; }
.cat-q { width: 100%; padding: 8px 10px; font-size: 13.5px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); }
.cat-results { max-height: 260px; overflow: auto; margin-top: 6px; border: 1px solid var(--border); border-radius: var(--radius); }
.cat-results > .muted-small { display: block; padding: 10px 12px; }
.cat-choice { display: block; width: 100%; text-align: left; padding: 7px 12px; border: 0; border-bottom: 1px solid var(--border);
  background: none; font: inherit; font-size: 13px; color: var(--text); cursor: pointer; }
.cat-choice:last-child { border-bottom: 0; }
.cat-choice small { display: block; color: var(--text-muted); font-size: 11.5px; }
.cat-choice:hover, .cat-choice:focus { background: var(--primary-bg); outline: none; }
.cat-choice.is-picked { background: var(--primary-bg); box-shadow: inset 3px 0 0 var(--primary); }
.cat-choice.is-now small::after { content: " · aujourd'hui"; }
.cat-picked { margin-top: 10px; font-size: 13px; }
.cat-scope { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; font-size: 13px; }
.cat-scope label { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; cursor: pointer; }
.cat-scope label .muted-small { flex-basis: 100%; padding-left: 22px; }
.cat-error { color: var(--danger); font-size: 13px; margin: 10px 0 0; }
dialog.cat-dialog .modal-actions { margin-top: 16px; }
.cat-table td { vertical-align: middle; }
.pq-cat-btn { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.pq-cat-btn:hover { color: var(--primary); }
.pq-cat-act { margin-left: 4px; padding: 1px 8px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--primary); text-decoration: none; display: inline-block; }
.pq-cat-btn:hover .pq-cat-act { border-color: var(--primary); background: var(--primary-bg); }
.cat-table tr.is-focus td { background: var(--primary-bg); }
.cat-table tr.is-focus td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
/* 10/11 : la proposition de ZK en tête, « Remettre avec sa catégorie », « À revoir », « Ce que <MP> demandera ». */
dialog.modal.cat-dialog:not(.modal-wide) { width: min(560px, calc(100vw - 32px)); }
.cat-review { margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--danger); }
.cat-apart { margin-top: 4px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.cat-proposal { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--primary-border, var(--border)); border-radius: var(--radius); background: var(--surface-alt, var(--surface)); }
.cat-proposal .cat-choice.is-proposal { margin-top: 4px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-weight: 600; }
.cat-proposal .is-sure { color: var(--success); font-weight: 700; }
.cat-proposal .is-check { color: var(--warning); font-weight: 700; }
.cat-others { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-top: 6px; }
.cat-chip { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 3px 10px; font: inherit; font-size: 12px; color: var(--text); cursor: pointer; text-align: left; }
.cat-chip:hover, .cat-chip.is-picked { border-color: var(--primary); color: var(--primary); }
.cat-needs { margin-top: 10px; padding: 8px 10px; border-radius: var(--radius); background: var(--surface-alt, var(--surface)); border: 1px solid var(--border); font-size: 13px; }
.cat-needs.is-problem { border-color: var(--danger-border); background: var(--danger-bg); }
.cat-needs-head { font-weight: 700; margin-bottom: 4px; }
.cat-needs-sub { margin: 2px 0; }
.cat-needs-bad { margin: 2px 0; color: var(--danger); }
.cat-needs-list { margin: 2px 0 4px; padding-left: 18px; line-height: 1.45; }
.cat-needs-more summary { cursor: pointer; font-size: 12.5px; color: var(--text-muted); }
.cat-needs p.muted-small { margin: 4px 0 0; }
.fix-cat-changed { margin: 0 0 8px; padding: 6px 10px; border-radius: var(--radius-sm); background: var(--primary-bg); color: var(--text); }
@media (max-width: 880px) and (pointer: coarse) {
  .cat-chip, .cat-apart .link-btn { min-height: 44px; }
  .cat-needs-more summary { min-height: 44px; display: flex; align-items: center; }
}
