html {
  -webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Style global de base */
body {
  --cab360-shell-gutter: clamp(10px, 1.8vw, 24px);
  margin: 0;
  background: #f6f6f9;
  color: #1a233a;
  font-family: 'Segoe UI', Arial, sans-serif;
}

img,
svg {
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

textarea {
  max-width: 100%;
}

/* Global link hover */
a{
  transition: transform .15s ease, filter .15s ease;
}
a:hover{
  transform: translateY(-1px);
  filter: brightness(0.95);
}

/* Marque Cab360 commune */
.cab360-logo-shell{
  width: 78px;
  height: 78px;
  flex: 0 0 78px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.96);
  box-shadow: 0 18px 38px rgba(2,6,23,.24), inset 0 0 0 1px rgba(15,23,42,.08);
}
.cab360-logo-svg{
  width: 62px;
  height: 62px;
  display: block;
  overflow: visible;
}
.cab360-logo-spin{
  transform-box: view-box;
  transform-origin: center;
  animation: cab360LogoSpin 12s linear infinite;
}
.cab360-logo-spin.green{animation-duration:13s;}
.cab360-logo-spin.red{animation-duration:9.5s;animation-direction:reverse;}
.cab360-logo-spin.blue{animation-duration:7s;}
.cab360-logo-ring{
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
  filter: drop-shadow(0 2px 4px rgba(15,23,42,.18));
}
.cab360-logo-ring.green{stroke:#22c55e;}
.cab360-logo-ring.red{stroke:#ef4444;}
.cab360-logo-ring.blue{stroke:#2563eb;}
.cab360-logo-core{
  fill: #ffffff;
  stroke: #0f172a;
  stroke-width: 2;
}
@keyframes cab360LogoSpin{
  to{transform:rotate(360deg);}
}
@media (prefers-reduced-motion: reduce){
  .cab360-logo-spin{animation:none;}
}

/* Table styling shared across dashboards */
.table-modern{
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15,23,42,0.04);
}
.table-modern thead th{
  background: #f8fafc;
  color: #0f172a;
  font-weight: 600;
  padding: 11px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}
.table-modern tbody td{
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.95rem;
  color: #1f2937;
}
.table-modern tbody tr:hover{
  background: #f9fafb;
  transition: background-color 0.15s ease-in-out;
}
.table-modern tbody tr:last-child td{
  border-bottom: none;
}
.table-modern tbody a{
  color: inherit;
  font-weight: 500;
  text-decoration: none;
}
.table-modern tbody a:hover{
  text-decoration: underline;
}

/* Unified block component */
.u-block {
  --accent: #64748b;      /* left border color */
  --bg-soft: #ffffff;     /* card background */
  --bd: rgba(148,163,184,0.35); /* outline */
  background: var(--bg-soft);
  border: 1px solid var(--bd);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 8px 18px rgba(15,23,42,0.06);
}

/* Accent helpers (optional) */
.accent-amber  { --accent:#d97706; --bg-soft:#fff3e0; }
.accent-emerald{ --accent:#059669; --bg-soft:#ecfdf5; }
.accent-iris   { --accent:#7c3aed; --bg-soft:#f5f3ff; }
.accent-sky    { --accent:#0284c7; --bg-soft:#e3f2fd; }
.accent-rose   { --accent:#e11d48; --bg-soft:#fce7f3; }
.accent-slate  { --accent:#334155; --bg-soft:#f1f5f9; }

.cab360-page-banner {
  --cab360-page-banner-bg: linear-gradient(135deg,#0f766e 0%,#0f5f7a 48%,#1d4ed8 100%);
  --cab360-page-banner-mask: linear-gradient(180deg,rgba(15,118,110,.98) 0%,rgba(15,95,122,.95) 54%,rgba(29,78,216,.78) 100%);
  --cab360-page-banner-text: #fff;
  --cab360-page-banner-muted: rgba(255,255,255,.78);
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 520px) minmax(120px, 1fr);
  align-items: center;
  gap: 14px;
  width: calc(100% + (clamp(16px, 1.8vw, 30px) * 2));
  margin: -2px calc(-1 * clamp(16px, 1.8vw, 30px)) 18px;
  padding: 13px clamp(16px, 1.8vw, 30px);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 0 0 18px 18px;
  background:
    radial-gradient(circle at top right,rgba(255,255,255,.18),transparent 30%),
    radial-gradient(circle at bottom left,rgba(250,204,21,.16),transparent 34%),
    var(--cab360-page-banner-bg);
  box-shadow: 0 18px 38px rgba(15,23,42,.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 120;
  box-sizing: border-box;
  isolation: isolate;
}
.cab360-page-banner::before {
  content: "";
  position: absolute;
  left: -1px;
  right: -1px;
  top: -82px;
  height: calc(100% + 82px);
  border-radius: 0 0 18px 18px;
  background: var(--cab360-page-banner-mask);
  backdrop-filter: blur(18px) saturate(1.05);
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  pointer-events: none;
  z-index: -1;
}
@media (min-width:1025px) {
  .cab360-page-banner {
    position: sticky;
    top: 46px;
  }
}

@media (min-width:1025px) {
  :is(
    .compta-hero-banner,
    .ocr-hero-banner,
    .juridique-hero,
    .fec-analysis-hero,
    .presentation-hero
  ) {
    position: sticky !important;
    top: 46px;
    z-index: 125;
    align-self: start;
  }
}
.cab360-page-banner-title {
  min-width: 0;
}
.cab360-page-banner .page-title,
.page-title {
  margin: 0 0 12px;
  font-size: 1.6rem;
  font-weight: 800;
  color: #0f172a;
}
.cab360-page-banner .page-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 !important;
  line-height: 1.12;
  letter-spacing: 0;
  color: var(--cab360-page-banner-text) !important;
}
.cab360-page-banner-filter {
  display: flex;
  justify-content: center;
  min-width: 0;
}
.cab360-page-banner-filter:empty {
  display: block;
}
.cab360-page-banner-filter .cab360-dossier-filter-chip {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 40px;
  grid-template-rows: 46px auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 6px;
  width: min(100%, 520px);
  min-height: 66px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  box-sizing: border-box;
}
.cab360-page-banner-filter .cab360-dossier-filter-chip::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  z-index: 2;
  background: #475569;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cab360-page-banner-filter .cab360-dossier-filter-chip label {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0 0 0 14px;
  color: #fff;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(15,23,42,.22);
}
.cab360-page-banner-filter .cab360-dossier-filter-chip input,
.cab360-page-banner-filter .cab360-dossier-filter-chip select,
.cab360-page-banner-filter .cab360-dossier-filter-chip .filter-select {
  grid-column: 1 / -1;
  grid-row: 1;
  min-width: 120px;
  max-width: none;
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background-color: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(15,23,42,.16), inset 0 0 0 1px rgba(255,255,255,.92);
  padding: 9px 54px 9px 42px;
  font-size: .94rem;
  font-weight: 900;
  color: #111827;
}
.cab360-page-banner-filter .cab360-dossier-filter-chip select,
.cab360-page-banner-filter .cab360-dossier-filter-chip .filter-select:is(select) {
  -webkit-appearance: none;
  appearance: none;
  background-image: none;
}
.cab360-page-banner-filter .cab360-dossier-filter-chip::after {
  content: "→";
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  border-radius: 999px;
  background: #facc15;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15,23,42,.22);
  font-size: 1.08rem;
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
  z-index: 2;
}
.cab360-page-banner-actions {
  min-width: 0;
}

.cab360-floating-page-banner .filters-panel,
.cab360-floating-page-banner .fec-toolbar,
.cab360-floating-page-banner .filters {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.cab360-floating-page-banner .filters-row > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"]),
.cab360-floating-page-banner form > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"]) {
  position: relative;
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 40px;
  grid-template-rows: 46px auto;
  align-items: center;
  column-gap: 8px !important;
  row-gap: 6px;
  width: min(100%, 520px);
  min-height: 66px;
  margin: 0 auto !important;
}
.cab360-floating-page-banner .filters-row > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"])::before,
.cab360-floating-page-banner form > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"])::before {
  content: "";
  grid-column: 1;
  grid-row: 1;
  width: 18px;
  height: 18px;
  margin-left: 14px;
  z-index: 2;
  background: #475569;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.cab360-floating-page-banner .filters-row > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"])::after,
.cab360-floating-page-banner form > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"])::after {
  content: "→";
  grid-column: 3;
  grid-row: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 38px;
  height: 38px;
  margin-right: 4px;
  border-radius: 999px;
  background: #facc15;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15,23,42,.22);
  font-size: 1.08rem;
  font-weight: 900;
  pointer-events: none;
  z-index: 2;
}
.cab360-floating-page-banner :is(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"]) {
  grid-column: 1 / -1;
  grid-row: 1;
  width: 100% !important;
  height: 46px;
  border: 0 !important;
  border-radius: 999px !important;
  background-color: rgba(255,255,255,.96) !important;
  background-image: none !important;
  box-shadow: 0 10px 24px rgba(15,23,42,.16), inset 0 0 0 1px rgba(255,255,255,.92) !important;
  padding: 9px 54px 9px 42px !important;
  font-size: .94rem;
  font-weight: 900;
  color: #111827 !important;
}
.cab360-floating-page-banner .filters-row > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"]) label,
.cab360-floating-page-banner form > div:has(input[id*="dossier"], input[name*="dossier"], select[id*="dossier"], select[name*="dossier"]) label {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0 0 0 14px !important;
  color: #fff !important;
  font-size: .82rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(15,23,42,.22);
}

.container {
  width: calc(100% - (var(--cab360-shell-gutter) * 2));
  max-width: none !important;
  margin: 24px auto;
}

/* Carte générique (alignée avec Portefeuille) */
.content-wrapper, .card {
  width: calc(100% - (var(--cab360-shell-gutter) * 2));
  max-width: none !important;
  margin: 24px auto;
  background-color: #ffffff;
  padding: 20px clamp(16px, 1.8vw, 30px);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

/* Style global responsive pour mobile */

@media (max-width: 768px) {
  /* Header et navigation */
  header { padding: 10px 14px !important; }
  header nav { 
    overflow-x: auto; 
    white-space: nowrap; 
    gap: 8px !important;
  }
  header nav a { font-size: 0.9rem !important; padding: 6px 8px; }

  /* Conteneurs génériques */
  .container {
    width: calc(100% - (var(--cab360-shell-gutter) * 2)) !important;
    max-width: none !important;
    margin: 12px auto !important;
    padding: 12px !important;
  }
  .content-wrapper,
  .card {
    width: calc(100% - (var(--cab360-shell-gutter) * 2)) !important;
    max-width: none !important;
    margin: 16px auto !important;
    padding: 16px !important;
    border-radius: 14px;
  }
  .page-title {
    font-size: 1.35rem;
    line-height: 1.15;
    margin-bottom: 10px;
  }
  .cab360-page-banner {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    margin: -2px 0 14px;
    padding: 12px;
    border-radius: 14px;
  }
  .cab360-page-banner .page-title {
    font-size: 1.28rem;
  }
  .cab360-page-banner-filter {
    justify-content: stretch;
  }
  .cab360-page-banner-filter .cab360-dossier-filter-chip {
    width: 100%;
    border-radius: 14px;
    align-items: stretch;
    flex-wrap: wrap;
  }
  .cab360-page-banner-filter .cab360-dossier-filter-chip label {
    width: 100%;
  }
  .cab360-page-banner-filter .cab360-dossier-filter-chip::after {
    align-self: center;
  }
  .table-modern thead th,
  .table-modern tbody td {
    padding: 9px 10px;
    font-size: 0.9rem;
  }
  .stacked-form-row { flex-direction: column; }
  .stacked-form input,
  .stacked-form select,
  .filter-select {
    width: 100%;
    max-width: 100%;
  }
  .btn-primary,
  .btn-secondary,
  .btn-light {
    min-height: 40px;
  }

  /* Cartes génériques (index / actions) */
  .cards { gap: 10px !important; }
  .action-card { min-width: auto !important; max-width: 100% !important; flex: 1 1 100% !important; }
  .card-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .head-right { align-items: flex-start !important; }
  .card-title { font-size: 1rem !important; }

  /* Listes horizontales d’actions */
  .actions-strip-inner { padding-bottom: 6px; }

  /* Board missions/tâches */
  .missions-board { flex-direction: column; overflow-x: visible; gap: 18px; }
  .mission-column { flex: 1 1 auto; }
  .mission-column { scroll-snap-align: unset; }
}

/* Petits écrans très étroits */
@media (max-width: 420px) {
  header nav a { font-size: 0.85rem !important; }
  .content-wrapper,
  .card {
    margin: 12px 10px !important;
    padding: 14px !important;
  }
  .page-title { font-size: 1.2rem; }
  .table-modern thead th,
  .table-modern tbody td {
    padding: 8px 9px;
    font-size: 0.86rem;
  }
}

/* Admin tâches */
.admin-taches {
  display: block;
}

.admin-taches-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.page-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

.page-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  max-width: 720px;
  line-height: 1.5;
}

.head-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.head-stats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.admin-header-block {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 28px;
}
.head-stats li {
  background: #f1f5f9;
  border-radius: 12px;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
  text-align: center;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.head-stats li .stat-label {
  margin-top: 4px;
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: #1f2937;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
}

/* Form controls */
.filter-select{
  -webkit-appearance: none;
  appearance: none;
  background-color: #fff;
  border: 1px solid #d0d7de;
  border-radius: 7px;
  padding: 5px 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(16,24,40,.05);
  min-height: 32px;
}
.filter-select:focus{
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}

/* Matrix tables (suivi annuel) */
.wrapper{
  max-width: 1400px;
  margin: 24px auto;
  padding: 20px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}

.table-card{
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
}

.filters{
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.filters label{
  font-weight: 700;
  color: #1f2937;
}

.matrix-scroll{
  overflow: auto;
  max-height: 70vh;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}

table.table-matrix,
table.matrix{
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

table.table-matrix thead th,
table.matrix thead th{
  position: sticky;
  top: 0;
  z-index: 3;
  background: linear-gradient(180deg,#f8fafc 0%,#f1f5f9 100%);
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
  font-size: 0.85rem;
  color: #1f2937;
}

table.table-matrix thead th:first-child,
table.matrix thead th:first-child{
  text-align: left;
  left: 0;
  z-index: 4;
  width: 220px;
  border-right: 1px solid #e2e8f0;
}

table.table-matrix tbody td,
table.matrix tbody td{
  border-bottom: 1px solid #eef2ff;
  border-right: 1px solid #eef2ff;
  padding: 10px 8px;
  text-align: center;
  vertical-align: middle;
}

table.table-matrix tbody td:first-child,
table.matrix tbody td:first-child{
  text-align: left;
  font-weight: 600;
  background: #f8fafc;
  color: #0f172a;
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 2px 0 6px rgba(148,163,184,.25);
  border-right: 1px solid #e2e8f0;
  width: 220px;
  min-width: 220px;
}

table.table-matrix tbody tr:nth-child(even) td:first-child,
table.matrix tbody tr:nth-child(even) td:first-child{
  background: #f1f5f9;
}

.cell-stack{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cell-flags{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cell-flags .flag{
  margin-bottom: 0;
}

.cell-empty{
  color: #cbd5f5;
  font-style: italic;
}

.flag{
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 999px;
  padding: 2px 8px;
  margin-bottom: 2px;
  color: #fff;
}

.flag-disabled{
  background: #e2e8f0;
  color: #94a3b8;
  display: block;
  font-size: 0.74rem;
  padding: 2px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  margin-bottom: 2px;
}

.flag-ac { background:#f97316; }
.flag-ve { background:#0ea5e9; }
.flag-bq { background:#10b981; }
.flag-ac:hover,
.flag-ve:hover,
.flag-bq:hover { filter: brightness(1.08); }

.check{
  display: block;
  font-size: 1.1rem;
  margin-top: 4px;
}
.check.done{ color:#10b981; font-weight:700; }
.check.todo{ color:#cbd5f5; }

.cell-amount{
  font-size: .85rem;
  font-weight: 700;
  color: #0f172a;
  margin-top: 2px;
}

.flag-saisie{ background:#f59e0b; }
.flag-validee{ background:#2563eb; }
.flag-declaree{ background:#16a34a; }
.flag-valide{ background:#2563eb; }
.flag-paye{ background:#16a34a; }
.flag-transmise{ background:#16a34a; }
.flag-envoyee{ background:#16a34a; }

.legend{
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  font-size: .85rem;
  color: #475569;
  flex-wrap: wrap;
}
.legend span{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend .flag,
.legend .flag-disabled,
.legend .check{
  margin: 0;
  display: inline-flex;
}

/* Inline edit (pages de suivi) */
.cab360-editbar{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin:10px 0 14px;
}
.cab360-editbar .cab360-edit-toggle.is-on{
  background:#0f172a;
  border-color:#0f172a;
  color:#fff;
}

body.cab360-edit-mode{
  background:
    radial-gradient(circle at top right, rgba(220, 38, 38, 0.12), transparent 30%),
    linear-gradient(180deg, #fff7f7 0%, #fff 26%, #fff5f5 100%);
}
body.cab360-edit-mode::before{
  content:'MODE EDITION';
  position:fixed;
  top:14px;
  right:18px;
  z-index:5000;
  padding:9px 14px;
  border-radius:999px;
  background:linear-gradient(135deg, #b91c1c, #dc2626);
  color:#fff;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.08em;
  box-shadow:0 14px 28px rgba(127, 29, 29, 0.26);
  pointer-events:none;
}
body.cab360-edit-mode header.cab360-header{
  background:linear-gradient(180deg, #fff1f2 0%, #fff 100%) !important;
  box-shadow:0 8px 24px rgba(127, 29, 29, 0.12) !important;
  outline:1px solid rgba(220, 38, 38, 0.14);
}
body.cab360-edit-mode .subheader{
  background:rgba(254, 242, 242, 0.92);
  border-radius:14px;
  box-shadow:inset 0 0 0 1px rgba(220, 38, 38, 0.14);
}
body.cab360-edit-mode .subheader a.active,
body.cab360-edit-mode .page-title,
body.cab360-edit-mode .cab360-header nav a.active{
  color:#991b1b !important;
}
body.cab360-edit-mode .panel,
body.cab360-edit-mode table.modern,
body.cab360-edit-mode .content-wrapper > .panel{
  box-shadow:0 10px 28px rgba(127, 29, 29, 0.08);
}
body.cab360-edit-mode .cab360-editbar{
  padding:10px 12px;
  border:1px solid rgba(220, 38, 38, 0.14);
  border-radius:14px;
  background:rgba(254, 242, 242, 0.85);
}
body.cab360-edit-mode .cab360-editbar .cab360-edit-toggle.is-on{
  background:linear-gradient(135deg, #b91c1c, #dc2626);
  border-color:#b91c1c;
  color:#fff;
  box-shadow:0 10px 22px rgba(185, 28, 28, 0.24);
}

body.cab360-edit-mode td[data-cab360-editable="1"]{
  cursor:pointer;
  position:relative;
}
body.cab360-edit-mode td[data-cab360-editable="1"]:hover{
  background:rgba(220,38,38,0.08);
  box-shadow:inset 0 0 0 2px rgba(220,38,38,0.24);
}
body.cab360-edit-mode td[data-cab360-editable="1"]:hover::after{
  content:'✎';
  position:absolute;
  top:6px;
  right:8px;
  font-size:.75rem;
  font-weight:900;
  color:rgba(185,28,28,0.75);
  pointer-events:none;
}
body.cab360-edit-mode td.cab360-cell-selected{
  outline:2px solid rgba(220,38,38,0.52);
  outline-offset:-2px;
  background:rgba(254, 242, 242, 0.95);
}
td.cab360-cell-selected{
  outline:2px solid rgba(37,99,235,0.45);
  outline-offset:-2px;
}
td.cab360-cell-saving{
  opacity:.70;
}
td.cab360-cell-error{
  background:#fef2f2 !important;
  box-shadow:inset 0 0 0 2px rgba(239,68,68,0.55) !important;
}

input.cab360-cell-editor,
select.cab360-cell-editor,
textarea.cab360-cell-editor{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  padding:7px 8px;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
  font-weight:800;
  color:#0f172a;
  outline:none;
}
textarea.cab360-cell-editor{min-height:64px;resize:vertical}
input.cab360-cell-editor:focus,
select.cab360-cell-editor:focus,
textarea.cab360-cell-editor:focus{
  border-color:#2563eb;
  box-shadow:0 0 0 3px rgba(37,99,235,0.18);
}
body.cab360-edit-mode input.cab360-cell-editor:focus,
body.cab360-edit-mode select.cab360-cell-editor:focus,
body.cab360-edit-mode textarea.cab360-cell-editor:focus{
  border-color:#dc2626;
  box-shadow:0 0 0 3px rgba(220,38,38,0.14);
}

.cab360-inline-toast{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%) translateY(10px);
  background:#0f172a;
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  box-shadow:0 18px 40px rgba(15,23,42,.25);
  font-weight:800;
  font-size:.9rem;
  z-index:9999;
  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease, transform .18s ease;
}
.cab360-inline-toast.is-show{
  opacity:1;
  transform:translateX(-50%) translateY(0);
}
.cab360-inline-toast.is-error{background:#991b1b}


.admin-taches-forms {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 32px;
}

.admin-card {
  flex: 1 1 320px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.admin-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.admin-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(99, 102, 241, 0.2), rgba(56, 189, 248, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.admin-card-text {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #475569;
}

.admin-card-bullets {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
}

.admin-card-highlight {
  background: linear-gradient(165deg, #eef2ff 0%, #ffffff 100%);
  border: 1px solid rgba(99, 102, 241, 0.25);
  box-shadow: 0 18px 32px rgba(79, 70, 229, 0.12);
}

.admin-card-title {
  margin: 0 0 14px;
  font-size: 1.05rem;
  font-weight: 600;
  color: #111827;
}

.stacked-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stacked-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: #334155;
}

.stacked-form input,
.stacked-form select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 0.95rem;
  color: #111827;
}

.stacked-form-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-light,
.btn-chip {
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  padding: 10px 14px;
  background: #2563eb;
  color: #ffffff;
  border: 1px solid #2563eb;
}

.btn-secondary {
  padding: 8px 12px;
  background: #f3f4f6;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-light {
  padding: 8px 12px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d1d5db;
}

.btn-chip {
  padding: 4px 8px;
  font-size: 0.8rem;
  background: #fbbf24;
  color: #1f2937;
  border-radius: 999px;
}

.btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary:hover {
  background: #e2e8f0;
}

.btn-light:hover {
  background: #f9fafb;
}

.btn-chip:hover {
  background: #f59e0b;
}

.icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f3f4f6;
  text-decoration: none;
  font-size: 0.95rem;
}

.icon-link.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.icon-link:hover {
  background: #e5e7eb;
}

.icon-link.danger:hover {
  background: #fecaca;
}

.missions-board {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
}

.missions-board::-webkit-scrollbar {
  height: 8px;
}

.missions-board::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.mission-column {
  flex: 0 0 360px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
  border: 1px solid #e0e7ff;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.09);
  scroll-snap-align: start;
}

.mission-column-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mission-column-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mission-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
}

.mission-column-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mission-column-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: #eef2ff;
  color: #4338ca;
}

.chip-soft {
  background: #f8fafc;
  color: #475569;
}

.chip-muted {
  background: #e2e8f0;
  color: #475569;
}

.mission-empty {
  margin: 0;
  font-size: 0.95rem;
  color: #475569;
  font-style: italic;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.task-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 14px 24px rgba(15, 23, 42, 0.08);
}

.task-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.task-card-titles {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.task-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #0f172a;
}

.task-card-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.pill-type {
  background: rgba(59, 130, 246, 0.18);
  color: #1d4ed8;
  text-transform: uppercase;
}

.pill-recurrente {
  background: rgba(34, 197, 94, 0.18);
  color: #047857;
}

.pill-ponctuelle {
  background: rgba(251, 191, 36, 0.25);
  color: #b45309;
}

.pill-soft {
  background: #e0f2fe;
  color: #0369a1;
}

.task-meta-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.task-meta-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #475569;
}

.task-meta-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #1f2937;
}

.task-meta-form .btn-light {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.05);
}

.action-item-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.action-label {
  flex: 1;
  font-weight: 600;
  color: #1e293b;
}

.action-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #cbd5f5;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4338ca;
}

.action-item-ops {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.action-item .inline-form {
  display: inline-flex;
}

.action-empty {
  margin: 0;
  font-size: 0.9rem;
  color: #64748b;
}

.action-add {
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px dashed #c7d2fe;
}

.action-add-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
}

.action-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.action-add-form input[type="text"],
.action-add-form input[type="number"],
.action-add-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 0.95rem;
}

.action-item .row-edit {
  background: #ffffff;
  border: 1px dashed #cbd5f5;
  border-radius: 12px;
  padding: 12px;
}
.task-table .td-ops{ text-align:right; }
.task-table .td-ops .inline-form, .task-table .td-ops a, .task-table .td-ops .row-edit-btn{ vertical-align:middle; }
.task-title{ margin:0 0 2px; }
.task-badges{ display:flex; gap:6px; flex-wrap:wrap; }
.td-task-wrap{ display:flex; flex-direction:column; gap:8px; }
.task-meta-actions{ display:flex; justify-content:flex-end; margin-top:8px; }
.row-add{ background:#f8fafc; }
.td-type-task, .td-period{ text-align:center; font-weight:600; color:#334155; }
.task-meta-form{ margin-top:10px; }
.task-meta-fields{ display:flex; gap:8px; flex-wrap:wrap; align-items:flex-end; margin-top:6px; }
.task-meta-fields label{ display:flex; flex-direction:column; gap:4px; font-size:.8rem; color:#4b5563; }
.task-meta-fields select{ border:1px solid #cbd5e1; border-radius:6px; padding:6px 8px; font-size:.9rem; }
.row-add-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-add-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-add-form input[type="text"], .row-add-form input[type="number"], .row-add-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.row-edit td{ background:#f8fafc; }
.row-edit-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-edit-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-edit-form input[type="text"], .row-edit-form input[type="number"], .row-edit-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.row-edit-form .btn-light{ padding:6px 10px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; }
.row-edit-form .btn-secondary{ padding:6px 10px; border:1px solid #d1d5db; background:#f3f4f6; border-radius:8px; }
.row-edit-btn{ border:none; background:#fff; border:1px solid #d1d5db; border-radius:6px; padding:4px 8px; cursor:pointer; }
.row-edit-btn:hover{ background:#e5e7eb; }

.task-visual {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

.task-node {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-node-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #f1f5f9;
  border-radius: 16px;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 1px #e2e8f0;
}

.task-node-title {
  font-weight: 600;
  color: #0f172a;
}

.task-node-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.task-node-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-node-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.task-node-form select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #1f2937;
}

.badge-soft {
  background: #f1f5f9;
  color: #475569;
}

.badge-type.badge-recurrente {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-type.badge-ponctuelle {
  background: #fef3c7;
  color: #b45309;
}


.action-lane {
  --lane-color: #94a3b8;
  --lane-color-light: rgba(148, 163, 184, 0.22);
  position: relative;
  padding-left: 48px;
}

.action-lane::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 48px;
  height: 28px;
  border-top: 4px solid var(--lane-color);
  border-left: 4px solid var(--lane-color);
  border-top-left-radius: 28px;
  transform: translateY(-50%);
}

.lane-number {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--lane-color);
  color: #fff;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.lane-body {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lane-color-light), rgba(255,255,255,0));
  border: 2px solid var(--lane-color);
}

.lane-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
}

.lane-type {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--lane-color);
}

.lane-actions {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}
.lane-actions .lane-edit-btn{
  border:none; background:transparent; cursor:pointer; color:#64748b; font-weight:700; padding:2px 4px; border-radius:6px;
}
.lane-actions .lane-edit-btn:hover{ background:#e5e7eb; color:#111827; }

.lane-toggle {
  border: none;
  background: transparent;
  color: var(--lane-color);
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.lane-toggle:hover {
  text-decoration: underline;
}

.lane-delete {
  font-weight: 600;
  color: #ef4444;
  text-decoration: none;
  font-size: 1rem;
  padding: 0 4px;
}

.lane-delete:hover {
  color: #b91c1c;
}
.lane-edit{ margin:8px 0 0 48px; }
.lane-edit-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:10px; }
.lane-edit-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.lane-edit-form input[type="text"], .lane-edit-form input[type="number"], .lane-edit-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }
.lane-edit-form .btn-light{ padding:6px 10px; border:1px solid #e5e7eb; background:#fff; border-radius:8px; }
.lane-edit-form .btn-secondary{ padding:6px 10px; border:1px solid #d1d5db; background:#f3f4f6; border-radius:8px; }
.flex-1{ flex:1; min-width:200px; }
.is-hidden{ display:none !important; }

.lane-1 {
  --lane-color: #f97316;
  --lane-color-light: rgba(249, 115, 22, 0.18);
}

.lane-2 {
  --lane-color: #38bdf8;
  --lane-color-light: rgba(56, 189, 248, 0.2);
}

.lane-3 {
  --lane-color: #a855f7;
  --lane-color-light: rgba(168, 85, 247, 0.2);
}

.lane-4 {
  --lane-color: #34d399;
  --lane-color-light: rgba(52, 211, 153, 0.2);
}

.lane-5 {
  --lane-color: #f87171;
  --lane-color-light: rgba(248, 113, 113, 0.2);
}

.task-lanes {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-lanes-empty {
  margin: 0;
  color: #94a3b8;
  font-style: italic;
}


.lane-body {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #f1f5f9;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.25);
}

.lane-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 500;
  color: #1f2937;
}



.lane-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.lane-add {
  --lane-color: #94a3b8;
  --lane-color-light: rgba(148, 163, 184, 0.16);
  background: transparent;
  padding: 6px 0;
}


.lane-add .lane-body {
  background: rgba(148, 163, 184, 0.08);
  border-style: dashed;
}

.lane-add input,
.lane-add select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.lane-add .btn-secondary {
  white-space: nowrap;
}











.order-input {
  width: 60px;
  padding: 6px 4px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  text-align: center;
}

.badge-type.badge-core {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-type.badge-periphery {
  background: #fef3c7;
  color: #b45309;
}

.inline-form {
  display: inline;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1024px) {
  .task-node-form {
    flex-direction: column;
    align-items: flex-start;
  }
  .task-node-form button {
    align-self: flex-start;
  }
  .action-lane .lane-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}

@media (max-width: 720px) {
  .admin-taches-forms {
    flex-direction: column;
  }
  .task-visual {
    flex-direction: column;
  }
  .order-input {
    width: 100%;
  }
}

.task-head-row td{ background:#eef2ff; border-bottom:1px solid #dbeafe; }
.task-head{ display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; align-items:flex-start; }
.task-head-main{ display:flex; flex-direction:column; gap:4px; }
.task-head-badges{ display:flex; gap:6px; flex-wrap:wrap; }
.task-head-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; margin-left:auto; }
.task-head-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.task-head-form select{ border:1px solid #cbd5e1; border-radius:6px; padding:6px 8px; font-size:.9rem; }
.row-add-form{ display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.row-add-form label{ display:flex; flex-direction:column; gap:4px; font-size:.85rem; color:#4b5563; }
.row-add-form input[type="text"], .row-add-form input[type="number"], .row-add-form select{ border:1px solid #cbd5e1; border-radius:8px; padding:6px 8px; font-size:.95rem; }

/* --- Admin Tâches Kanban --- */
.admin-taches-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 32px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.admin-taches-grid .admin-card {
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.1);
  padding: 22px;
}

.admin-card .stacked-form label span {
  font-weight: 600;
  color: #1f2937;
}

.admin-card .stacked-form input,
.admin-card .stacked-form select {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.06);
}

.admin-card .btn-primary {
  align-self: flex-start;
  box-shadow: 0 10px 18px rgba(79, 70, 229, 0.2);
}


.kanban-board {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  overflow-x: auto;
  padding: 4px 4px 32px;
  scroll-snap-type: x proximity;
}

.kanban-board::-webkit-scrollbar {
  height: 8px;
}

.kanban-board::-webkit-scrollbar-thumb {
  background: #cbd5f5;
  border-radius: 999px;
}

.kanban-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: linear-gradient(145deg, rgba(79, 70, 229, 0.12) 0%, rgba(244, 245, 255, 1) 100%);
  border-radius: 28px;
  border: 1px solid rgba(79, 70, 229, 0.18);
  padding: 28px;
  box-shadow: 0 26px 48px rgba(79, 70, 229, 0.15);
}

.content-wrapper.admin-taches .kanban-wrapper{
  padding: 18px;
  gap: 16px;
  border-radius: 22px;
}

.content-wrapper.admin-taches .kanban-wrapper-texts h2{font-size:1.15rem;}
.content-wrapper.admin-taches .kanban-wrapper-texts p{font-size:.85rem;margin-top:4px;}
.content-wrapper.admin-taches .kanban-board{gap:12px;padding:2px 2px 18px;}
.content-wrapper.admin-taches .kanban-column{max-height:calc(100vh - 260px);}
.content-wrapper.admin-taches .kanban-board{cursor:grab;}
.content-wrapper.admin-taches .kanban-board.is-grabbing{cursor:grabbing;user-select:none;}
.content-wrapper.admin-taches .kanban-board.is-grabbing *{user-select:none;}

/* Admin: réduire le bloc "Nouvelle tâche / Nouvelle action" */
.content-wrapper.admin-taches .kanban-card-add{
  margin-top: 8px;
  padding: 10px;
  border-radius: 12px;
}
.content-wrapper.admin-taches .kanban-card-add-toggle{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  color: #0f172a;
}
.content-wrapper.admin-taches .kanban-card-add-toggle .label{font-size:.9rem;}
.content-wrapper.admin-taches .kanban-card-add-toggle .plus{
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: rgba(255,255,255,.85);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
  font-size: 0.95rem;
  line-height: 1;
}
.content-wrapper.admin-taches .kanban-card-add.is-collapsed{padding:8px 10px;}
.content-wrapper.admin-taches .kanban-card-add.is-collapsed .kanban-card-add-form{display:none;}
.content-wrapper.admin-taches .kanban-card-add-form{gap:8px;}
.content-wrapper.admin-taches .kanban-card-add-form label{gap:3px;font-size:.8rem;}
.content-wrapper.admin-taches .kanban-card-add-grid{gap:8px;grid-template-columns:repeat(auto-fit, minmax(140px, 1fr));}
.content-wrapper.admin-taches .kanban-card-add-form input[type="text"],
.content-wrapper.admin-taches .kanban-card-add-form select{
  padding: 5px 8px;
  font-size: 0.9rem;
  border-radius: 8px;
}
.content-wrapper.admin-taches .kanban-card-add-form .btn-secondary{
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: 10px;
}

/* Tableau des missions (admin_taches.php) : colonnes + grandes */
.content-wrapper.admin-taches .kanban-board.is-compact .kanban-column[data-mission-id]{flex:0 0 320px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column[data-mission-id]{flex:0 0 420px;}
.content-wrapper.admin-taches .kanban-column[data-mission-id]{max-height:calc(100vh - 220px);}

.kanban-wrapper-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.kanban-wrapper-texts h2 {
  margin: 0;
  font-size: 1.35rem;
  color: #1f2937;
}

.kanban-wrapper-texts p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 0.95rem;
}

.kanban-sync-indicator {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
  color: #475569;
  font-size: 0.85rem;
  font-weight: 600;
}

.kanban-sync-indicator .indicator-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

.kanban-sync-indicator.is-active {
  display: inline-flex;
}

.kanban-sync-indicator.is-success .indicator-dot {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.kanban-sync-indicator.is-error {
  display: inline-flex;
  background: rgba(248, 113, 113, 0.18);
  color: #b91c1c;
}

.kanban-sync-indicator.is-error .indicator-dot {
  background: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25);
}

.kanban-column {
  position: relative;
  flex: 0 0 360px;
  --accent-main: #4f46e5;
  --accent-dark: #3730a3;
  --accent-soft: rgba(79, 70, 229, 0.12);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-top: 6px solid var(--accent-main);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  scroll-snap-align: start;
  overflow: hidden;
}

/* Compact view for Trello-like small blocks */
.kanban-board.is-compact .kanban-column {
  flex: 0 0 280px;
  padding: 8px;
  gap: 8px;
}

.kanban-board.is-compact .kanban-column-head{gap:4px;}
.kanban-board.is-compact .kanban-column-title{gap:3px;}
.kanban-board.is-compact .kanban-column-meta{gap:6px;}
.kanban-board.is-compact .mission-title{font-size:.88rem;line-height:1.15;}
.kanban-board.is-compact .chip{font-size:.72rem;padding:2px 8px;}

.kanban-board.is-compact .kanban-column-body {
  gap: 5px;
  min-height: 60px;
}

.kanban-board.is-compact .kanban-handle {
  padding: 1px 5px;
  font-size: 0.75rem;
}

.kanban-board.is-compact .kanban-card {
  padding: 6px 8px;
  border-radius: 10px;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
}

.kanban-board.is-compact .kanban-card-head {
  padding-bottom: 0;
  border-bottom: 0;
  gap: 8px;
  align-items: center;
}

.kanban-board.is-compact .kanban-card-title {
  gap: 8px;
  min-width: 0;
}

.kanban-board.is-compact .kanban-card-text {
  gap: 2px;
  min-width: 0;
}

.kanban-board.is-compact .kanban-card-bubble {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  font-size: 0.78rem;
  box-shadow: 0 6px 10px rgba(79, 70, 229, 0.22);
}

.kanban-board.is-compact .task-title {
  font-size: 0.84rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.kanban-board.is-compact .kanban-card-meta {
  display: none;
}

.kanban-board.is-compact .kanban-card-actions {
  gap: 6px;
}

.kanban-board.is-compact .btn-compact {
  padding: 3px 7px;
  font-size: 0.78rem;
  border-radius: 6px;
}

.kanban-board.is-compact .icon-link {
  width: 22px;
  height: 22px;
  font-size: 0.82rem;
}

.kanban-board.is-compact .kanban-card-add {
  margin-top: 8px;
  padding: 8px;
}

.kanban-board.is-compact .kanban-card-add-form{gap:8px;}
.kanban-board.is-compact .kanban-card-add-form label{font-size:.8rem;}
.kanban-board.is-compact .kanban-card-add-form input[type="text"],
.kanban-board.is-compact .kanban-card-add-form select{padding:5px 8px;font-size:.9rem;}

/* Admin (vue détaillée) : réduire la hauteur des cartes au maximum */
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column{
  padding: 8px;
  gap: 8px;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column-head{gap:4px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column-title{gap:3px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column-meta{gap:6px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .mission-title{font-size:.9rem;line-height:1.15;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .chip{font-size:.72rem;padding:2px 8px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-column-body{
  gap: 5px;
  min-height: 60px;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card{
  padding: 6px 8px;
  gap: 6px;
  border-radius: 10px;
  box-shadow: 0 8px 14px rgba(15, 23, 42, 0.12);
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 16px 22px rgba(15, 23, 42, 0.14);
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-head{
  padding-bottom: 0;
  border-bottom: 0;
  gap: 8px;
  align-items: center;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-title{gap:8px;min-width:0;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-text{gap:8px;min-width:0;flex-direction:row;align-items:center;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-bubble{
  width: 22px;
  height: 22px;
  border-radius: 9px;
  font-size: 0.74rem;
  box-shadow: 0 6px 10px rgba(79, 70, 229, 0.2);
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .task-title{
  font-size: 0.86rem;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-meta{gap:4px;flex-wrap:nowrap;flex:0 0 auto;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-meta .pill{
  font-size: 0.6rem;
  padding: 2px 6px;
  white-space: nowrap;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .kanban-card-actions{gap:6px;}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .btn-compact{
  padding: 3px 7px;
  font-size: 0.78rem;
  border-radius: 6px;
}
.content-wrapper.admin-taches .kanban-board:not(.is-compact) .icon-link{
  width: 22px;
  height: 22px;
  font-size: 0.82rem;
}

.kanban-column::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, var(--accent-soft), transparent 65%);
  opacity: 0.7;
  pointer-events: none;
}

.mission-accent {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mission-accent.dragging-column {
  opacity: 0.5;
  box-shadow: none;
}

.mission-accent-iris { --accent-main: #4f46e5; --accent-dark: #3730a3; --accent-soft: rgba(79, 70, 229, 0.14); }
.mission-accent-sky { --accent-main: #0284c7; --accent-dark: #0369a1; --accent-soft: rgba(14, 165, 233, 0.14); }
.mission-accent-emerald { --accent-main: #059669; --accent-dark: #047857; --accent-soft: rgba(16, 185, 129, 0.16); }
.mission-accent-amber { --accent-main: #d97706; --accent-dark: #b45309; --accent-soft: rgba(217, 119, 6, 0.18); }
.mission-accent-rose { --accent-main: #e11d48; --accent-dark: #be123c; --accent-soft: rgba(225, 29, 72, 0.22); }
.mission-accent-slate { --accent-main: #334155; --accent-dark: #1e293b; --accent-soft: rgba(51, 65, 85, 0.14); }

.kanban-column-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-column-title {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-column-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mission-accent .chip {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.mission-accent .chip-muted {
  background: rgba(248, 250, 252, 0.95);
  color: #475569;
}

.kanban-handle {
  border: 1px dashed rgba(148, 163, 184, 0.6);
  background: rgba(255, 255, 255, 0.6);
  color: #475569;
  border-radius: 8px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  cursor: grab;
}

.kanban-handle:focus {
  outline: 2px solid var(--accent-main);
  outline-offset: 2px;
}

.kanban-handle.is-dragging,
.kanban-handle:active {
  cursor: grabbing;
  background: var(--accent-soft);
  border-color: var(--accent-main);
}

.kanban-column-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 120px;
}

.kanban-column-body:empty::before {
  content: 'Déposez une tâche ici';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: #64748b;
  font-style: italic;
  background: rgba(148, 163, 184, 0.12);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  border-radius: 12px;
  min-height: 92px;
}

.kanban-card {
  position: relative;
  z-index: 1;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
  border-left: 4px solid var(--accent-main);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kanban-card::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%);
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.kanban-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 26px 42px rgba(15, 23, 42, 0.16);
}

.kanban-card:hover::after {
  opacity: 1;
}

.kanban-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.kanban-card-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.kanban-card-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kanban-card-bubble {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--accent-main), var(--accent-dark));
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 18px rgba(79, 70, 229, 0.35);
}

.kanban-card.dragging {
  opacity: 0.6;
  box-shadow: none;
}

.kanban-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kanban-card-meta .pill {
  font-size: 0.72rem;
  padding: 4px 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mission-accent .pill-type {
  background: rgba(255, 255, 255, 0.92);
  color: var(--accent-dark);
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.kanban-card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-compact {
  border: 1px solid #d1d5db;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #1f2937;
  cursor: pointer;
}

.btn-compact:hover {
  background: #f3f4f6;
}

.kanban-card-actions .btn-light {
  background: rgba(148, 163, 184, 0.14);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #1e293b;
}

.kanban-card-actions .btn-light:hover {
  background: var(--accent-soft);
  border-color: var(--accent-main);
}

.mission-edit-form,
.task-edit-form {
  background: #ffffff;
  border: 1px dashed #cbd5f5;
  border-radius: 16px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mission-edit-grid,
.task-edit-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.mission-edit-form label,
.task-edit-form label,
.kanban-card-add-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: #4b5563;
}

.mission-edit-form input[type="text"],
.mission-edit-form input[type="number"],
.task-edit-form input[type="text"],
.task-edit-form select,
.kanban-card-add-form input[type="text"],
.kanban-card-add-form select {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.95rem;
  color: #1f2937;
}

.mission-edit-actions,
.task-edit-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.kanban-card-add {
  margin-top: 12px;
  border-top: 1px dashed #cbd5f5;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 14px;
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.12);
}

.mission-accent .kanban-card-add {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

.kanban-card-add-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-card-add-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.kanban-card-add-form .btn-secondary {
  align-self: flex-start;
}

.mission-accent .kanban-card-add-form .btn-secondary {
  background: var(--accent-main);
  border-color: var(--accent-main);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.15);
}

.mission-accent .kanban-card-add-form .btn-secondary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.kanban-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #cbd5f5;
  border-radius: 20px;
  background: #f8fafc;
  padding: 32px;
  color: #475569;
  font-size: 1rem;
  text-align: center;
}

@media (max-width: 960px) {
  .kanban-column {
    flex: 0 0 85vw;
  }
}

/* --- Kanban visual refinements --- */
.content-wrapper.admin-taches {
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: linear-gradient(180deg, #eef2ff 0%, #ffffff 45%, #f8fafc 100%);
  padding: 32px 28px 40px;
  border-radius: 28px;
}

.content-wrapper.admin-taches .admin-taches-head {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 18px 30px rgba(79, 70, 229, 0.08);
  padding: 18px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.content-wrapper.admin-taches .admin-taches-head .head-left {
  max-width: 440px;
}

.content-wrapper.admin-taches .admin-taches-head .head-stats {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.content-wrapper.admin-taches .admin-taches-head .head-stats li {
  list-style: none;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  min-width: 92px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}


@media (max-width: 720px) {
  .content-wrapper.admin-taches {
    padding: 20px 16px 28px;
    border-radius: 0;
  }

  .kanban-board {
    padding: 16px;
  }
}

/* --- Overrides to ensure unified block background applies even if other card styles set background later --- */
.task-card.u-block,
.bloc-tache.u-block,
.action-card.u-block {
  background: var(--bg-soft) !important;
  border-left: 4px solid var(--accent) !important;
}

/* --- Dark theme --- */
html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #0b1220 !important;
  color: #e5edf7 !important;
}

html[data-theme="dark"] .page-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .cab360-page-banner {
  border-color: rgba(51,65,85,.78);
  background:
    linear-gradient(180deg, rgba(15,23,42,.96), rgba(17,24,39,.92)),
    radial-gradient(circle at 12% 0%, rgba(96,165,250,.18), transparent 34%);
  box-shadow: 0 18px 38px rgba(0,0,0,.32);
}

html[data-theme="dark"] .cab360-page-banner::before {
  background:
    linear-gradient(180deg, rgba(11,18,32,.98) 0%, rgba(11,18,32,.94) 54%, rgba(11,18,32,.78) 100%);
}

html[data-theme="dark"] .cab360-page-banner-filter .cab360-dossier-filter-chip {
  border-color: transparent;
  background: transparent;
}

html[data-theme="dark"] .cab360-page-banner-filter .cab360-dossier-filter-chip label {
  color: #fff;
}

html[data-theme="dark"] .cab360-page-banner-filter .cab360-dossier-filter-chip input,
html[data-theme="dark"] .cab360-page-banner-filter .cab360-dossier-filter-chip select,
html[data-theme="dark"] .cab360-page-banner-filter .cab360-dossier-filter-chip .filter-select {
  background-color: rgba(255,255,255,.96);
  color: #111827;
  box-shadow: 0 10px 24px rgba(0,0,0,.24), inset 0 0 0 1px rgba(255,255,255,.92);
}

html[data-theme="dark"] body.cab360-edit-mode .page-title,
html[data-theme="dark"] body.cab360-edit-mode .subheader a.active,
html[data-theme="dark"] body.cab360-edit-mode .cab360-header nav a.active {
  color: #f87171 !important;
}

html[data-theme="dark"] [style^="color:#b91c1c"],
html[data-theme="dark"] [style^="color: #b91c1c"],
html[data-theme="dark"] [style^="color:#991b1b"],
html[data-theme="dark"] [style^="color: #991b1b"],
html[data-theme="dark"] [style^="color:#dc2626"],
html[data-theme="dark"] [style^="color: #dc2626"],
html[data-theme="dark"] [style^="color:#ef4444"],
html[data-theme="dark"] [style^="color: #ef4444"],
html[data-theme="dark"] [style*=";color:#b91c1c"],
html[data-theme="dark"] [style*="; color:#b91c1c"],
html[data-theme="dark"] [style*=";color:#991b1b"],
html[data-theme="dark"] [style*="; color:#991b1b"],
html[data-theme="dark"] [style*=";color:#dc2626"],
html[data-theme="dark"] [style*="; color:#dc2626"],
html[data-theme="dark"] [style*=";color:#ef4444"],
html[data-theme="dark"] [style*="; color:#ef4444"] {
  color: #f87171 !important;
}

html[data-theme="dark"] .page-eyebrow,
html[data-theme="dark"] .page-subtitle,
html[data-theme="dark"] .muted {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .content-wrapper,
html[data-theme="dark"] .card,
html[data-theme="dark"] .u-block,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .admin-header-block,
html[data-theme="dark"] .task-card,
html[data-theme="dark"] .action-card {
  background: #111827 !important;
  color: #e5edf7 !important;
  border-color: #243041 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .task-card.u-block,
html[data-theme="dark"] .bloc-tache.u-block,
html[data-theme="dark"] .action-card.u-block {
  background: linear-gradient(180deg, #162033 0%, #101826 100%) !important;
  color: #e5edf7 !important;
  border-left-color: #60a5fa !important;
  border-color: #243041 !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] .action-card.u-block .infos-pill,
html[data-theme="dark"] .action-card.u-block .infos-pill strong,
html[data-theme="dark"] .action-card.u-block .deadline-text,
html[data-theme="dark"] .action-card.u-block .tva-calculated-chip {
  color: #e5edf7 !important;
}

html[data-theme="dark"] .action-card.u-block .infos-pill {
  background: #172033 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .action-card.u-block .tva-calculated-chip {
  display: inline-flex;
  align-items: center;
  margin-left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid #475569;
  background: #172033 !important;
  font-size: .78em;
}

html[data-theme="dark"] .content-wrapper.admin-taches {
  background: linear-gradient(180deg, #0f172a 0%, #111827 52%, #0b1220 100%) !important;
}

html[data-theme="dark"] .content-wrapper.admin-taches .admin-taches-head {
  background: #111827 !important;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .content-wrapper.admin-taches .admin-taches-head .head-stats li {
  background: #1e293b !important;
  color: #c7d2fe !important;
}

html[data-theme="dark"] .wrapper,
html[data-theme="dark"] .container,
html[data-theme="dark"] .section,
html[data-theme="dark"] .suivi-bilan-table-wrap,
html[data-theme="dark"] .lm-table-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .table-scroll,
html[data-theme="dark"] .matrix-scroll,
html[data-theme="dark"] .pa-scroll,
html[data-theme="dark"] .workload-scroll {
  background: #111827 !important;
  color: #e5edf7 !important;
  border-color: #243041 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .table-modern,
html[data-theme="dark"] table.modern {
  background: #0f172a !important;
  border-color: #243041 !important;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] table {
  background: #0f172a !important;
  color: #e5edf7 !important;
}

html[data-theme="dark"] table thead th {
  background: #172033 !important;
  color: #f8fafc !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] table tbody td {
  background: #111827 !important;
  color: #dbe4f0 !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] table tbody tr:hover td {
  background: #162033 !important;
}

html[data-theme="dark"] .pa-table a,
html[data-theme="dark"] .lm-dossier-link,
html[data-theme="dark"] .suivi-bilan-table a,
html[data-theme="dark"] .workload-table a {
  color: #f8fafc !important;
}

html[data-theme="dark"] .pa-table a:hover,
html[data-theme="dark"] .lm-dossier-link:hover,
html[data-theme="dark"] .suivi-bilan-table a:hover,
html[data-theme="dark"] .workload-table a:hover {
  color: #bfdbfe !important;
}

html[data-theme="dark"] .suivi-bilan-table-wrap,
html[data-theme="dark"] .lm-table-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .table-scroll,
html[data-theme="dark"] .matrix-scroll,
html[data-theme="dark"] .pa-scroll,
html[data-theme="dark"] .workload-scroll {
  background: #111827 !important;
  border-color: #243041 !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .suivi-bilan-table tbody td:first-child,
html[data-theme="dark"] .lm-table tbody td:first-child,
html[data-theme="dark"] table.matrix tbody td:first-child,
html[data-theme="dark"] table.pa-table tbody td:first-child,
html[data-theme="dark"] table.workload-table tbody td:first-child,
html[data-theme="dark"] table.table-actions tbody td:first-child {
  background: #111827 !important;
  color: #f8fafc !important;
}

html[data-theme="dark"] .table-modern thead th,
html[data-theme="dark"] table.modern th {
  background: #172033 !important;
  color: #e5edf7 !important;
  border-bottom-color: #243041 !important;
}

html[data-theme="dark"] .table-modern tbody td,
html[data-theme="dark"] table.modern td {
  background: transparent !important;
  color: #dbe4f0 !important;
  border-bottom-color: #1f2937 !important;
}

html[data-theme="dark"] .table-modern tbody tr:hover,
html[data-theme="dark"] table.modern tbody tr:hover {
  background: #162033 !important;
}

html[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="file"]),
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f172a !important;
  color: #e5edf7 !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .filter-select {
  background: #0f172a !important;
  color: #e5edf7 !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .filter-select::placeholder {
  color: #64748b !important;
}

html[data-theme="dark"] .btn-link:not([style]),
html[data-theme="dark"] .btn-light,
html[data-theme="dark"] .btn-secondary {
  background: #172033 !important;
  color: #e5edf7 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .feedback {
  background: #052e16 !important;
  border-color: #166534 !important;
  color: #dcfce7 !important;
}

html[data-theme="dark"] .feedback.is-error {
  background: #3f1212 !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .badge {
  background: #052e16 !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .badge.is-closed {
  background: #172033 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .row-current {
  background: #062b1f !important;
}

html[data-theme="dark"] .results-block,
html[data-theme="dark"] .suggestions-list {
  background: #0f172a !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .panel.panel-edit-exercice {
  background: #3a2310 !important;
  border-color: #c2410c !important;
}

html[data-theme="dark"] .panel.panel-edit-exercice .section-title {
  color: #fdba74 !important;
}

html[data-theme="dark"] .deadline-text.deadline-overdue {
  color: #f87171 !important;
}

html[data-theme="dark"] .deadline-text.deadline-urgent {
  color: #fbbf24 !important;
}

html[data-theme="dark"] .deadline-text.deadline-soon {
  color: #4ade80 !important;
}

html[data-theme="dark"] .cab360-footer {
  background-color: #111827 !important;
  border: 1px solid #243041 !important;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .cab360-footer-main {
  color: #f8fafc !important;
}

html[data-theme="dark"] .cab360-footer-sub {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .cab360-footer a {
  color: #93c5fd !important;
}

html[data-theme="dark"] .cab360-footer-sep {
  border-top-color: rgba(148, 163, 184, 0.35) !important;
}

html[data-theme="dark"] .outils-card {
  background: linear-gradient(180deg, #162033 0%, #101826 100%) !important;
  border-color: #243041 !important;
  color: #e5edf7 !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] .outils-card:hover {
  border-color: rgba(96, 165, 250, 0.55) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32) !important;
}

html[data-theme="dark"] .outils-card-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .outils-card-desc {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .beta-tag,
html[data-theme="dark"] .beta-pill {
  background: #172033 !important;
  border-color: #334155 !important;
  color: #fdba74 !important;
}

/* Dark theme refinements for the main dossier pages */
html[data-theme="dark"] .fec-chip,
html[data-theme="dark"] .presentation-chip,
html[data-theme="dark"] .fec-analysis-chip {
  background: #172033 !important;
  color: #e5edf7 !important;
  border: 1px solid #334155 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .fec-chip.soft,
html[data-theme="dark"] .presentation-chip.soft,
html[data-theme="dark"] .fec-analysis-chip.soft {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] .presentation-chip.is-ok,
html[data-theme="dark"] .presentation-accounting-check-value.is-ok,
html[data-theme="dark"] .fec-analysis-badge.ok,
html[data-theme="dark"] .juridique-pes-state.ready {
  background: #052e16 !important;
  color: #bbf7d0 !important;
  border-color: #166534 !important;
}

html[data-theme="dark"] .presentation-chip.is-negative,
html[data-theme="dark"] .presentation-accounting-check-value.is-warning,
html[data-theme="dark"] .fec-analysis-badge.warning,
html[data-theme="dark"] .juridique-pes-state.warning {
  background: #3f2a06 !important;
  color: #fde68a !important;
  border-color: #b45309 !important;
}

html[data-theme="dark"] .presentation-delta.is-positive {
  background: #052e16 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .presentation-delta.is-negative {
  background: #3f1212 !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .presentation-delta.is-neutral {
  background: #172033 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .dossier-active-badge {
  background: #111827 !important;
  color: #bfdbfe !important;
  border-color: #334155 !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .dossier-active-badge .label {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .dossier-picker-row h3,
html[data-theme="dark"] .juridique-field label,
html[data-theme="dark"] .fec-field label,
html[data-theme="dark"] .presentation-toolbar .dossier-picker-row h3,
html[data-theme="dark"] .presentation-toolbar label,
html[data-theme="dark"] .fec-panel label {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .suggestions-list {
  background: #0f172a !important;
  border-color: #334155 !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.30) !important;
}

html[data-theme="dark"] .suggestion-item {
  color: #e5edf7 !important;
}

html[data-theme="dark"] .suggestion-item:hover,
html[data-theme="dark"] .suggestion-item.active {
  background: #162033 !important;
}

html[data-theme="dark"] .suggestion-code {
  color: #93c5fd !important;
}

html[data-theme="dark"] .suggestion-name {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .dossier-filter-loading {
  color: #dbe4f0 !important;
}

html[data-theme="dark"] .dossier-filter-spinner {
  border-color: rgba(148, 163, 184, 0.35) !important;
  border-top-color: #e5edf7 !important;
}

html[data-theme="dark"] .compta-hero-banner {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.20), transparent 30%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.16), transparent 32%),
    linear-gradient(135deg, #0b1120 0%, #132b5e 48%, #1d4ed8 100%) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(96, 165, 250, 0.22) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .compta-hero-banner .compta-hero-kicker,
html[data-theme="dark"] .compta-hero-banner .compta-hero-name,
html[data-theme="dark"] .compta-hero-banner .compta-hero-lead {
  color: rgba(226, 232, 240, 0.86) !important;
}

html[data-theme="dark"] .compta-hero-banner .compta-hero-code {
  color: #f8fafc !important;
}

html[data-theme="dark"] .compta-hero-banner a {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .compta-hero-banner a[href*="dossier_ocr.php"] {
  background: #f59e0b !important;
  color: #111827 !important;
  border-color: #f59e0b !important;
}

html[data-theme="dark"] .compta-manual-hero {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  border-color: #243041 !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] .compta-manual-kicker {
  color: #93c5fd !important;
}

html[data-theme="dark"] .compta-manual-hero-title,
html[data-theme="dark"] .compta-manual-hero-text,
html[data-theme="dark"] .compta-manual-rule-title,
html[data-theme="dark"] .compta-manual-rule-text,
html[data-theme="dark"] .compta-manual-meta-title,
html[data-theme="dark"] .compta-manual-meta-caption,
html[data-theme="dark"] .compta-manual-summary-title,
html[data-theme="dark"] .compta-manual-summary-text,
html[data-theme="dark"] .compta-manual-summary-card > span,
html[data-theme="dark"] .compta-manual-summary-card > strong,
html[data-theme="dark"] .compta-manual-main-field > span,
html[data-theme="dark"] .compta-manual-main-field small {
  color: #e5edf7 !important;
}

html[data-theme="dark"] .compta-manual-rule,
html[data-theme="dark"] .compta-manual-meta-card,
html[data-theme="dark"] .compta-manual-main-field,
html[data-theme="dark"] .compta-manual-summary-card {
  background: #111827 !important;
  border-color: #243041 !important;
  color: #e5edf7 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] .compta-manual-rule-index {
  background: #1d4ed8 !important;
  color: #fff !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-debit {
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.20) 0%, #111827 100%) !important;
  border-color: rgba(59, 130, 246, 0.28) !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-credit {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.18) 0%, #111827 100%) !important;
  border-color: rgba(16, 185, 129, 0.26) !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-status,
html[data-theme="dark"] .compta-manual-summary-card.is-waiting {
  background: linear-gradient(180deg, rgba(148, 163, 184, 0.14) 0%, #111827 100%) !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-balanced {
  background: linear-gradient(180deg, rgba(5, 46, 22, 0.55) 0%, #111827 100%) !important;
  border-color: rgba(22, 163, 74, 0.26) !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-warning {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.46) 0%, #111827 100%) !important;
  border-color: rgba(220, 38, 38, 0.26) !important;
}

html[data-theme="dark"] .compta-manual-summary-card.is-unbalanced {
  background: linear-gradient(180deg, rgba(127, 29, 29, 0.55) 0%, #111827 100%) !important;
  border-color: rgba(239, 68, 68, 0.26) !important;
}

html[data-theme="dark"] .ocr-hero-banner {
  background:
    radial-gradient(circle at top right, rgba(251, 146, 60, 0.20), transparent 30%),
    radial-gradient(circle at bottom left, rgba(249, 115, 22, 0.16), transparent 32%),
    linear-gradient(135deg, #0b1120 0%, #7c2d12 44%, #f59e0b 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(245, 158, 11, 0.24) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .ocr-hero-banner a {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .ocr-hero-banner a[href*="ocr_engine=server"] {
  background: #f59e0b !important;
  color: #111827 !important;
  border-color: #f59e0b !important;
}

html[data-theme="dark"] .ocr-page-shell .dossier-active-badge {
  background: #111827 !important;
  color: #bfdbfe !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .ocr-page-shell .dossier-active-badge .label {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .ocr-page-shell .dossier-picker-row h3 {
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .juridique-hero {
  background:
    radial-gradient(circle at top right, rgba(96, 165, 250, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.14), transparent 32%),
    linear-gradient(135deg, #0b1120 0%, #102a72 42%, #1d4ed8 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(59, 130, 246, 0.22) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .juridique-hero a {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .fec-panel {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  color: #e5edf7 !important;
  border-color: #243041 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .fec-panel h2,
html[data-theme="dark"] .fec-panel h3,
html[data-theme="dark"] .fec-panel h4,
html[data-theme="dark"] .fec-panel .fec-hint {
  color: #e5edf7 !important;
}

html[data-theme="dark"] .fec-callout {
  background: #111827 !important;
  border-color: #243041 !important;
  color: #dbe4f0 !important;
}

html[data-theme="dark"] .fec-callout.error {
  background: #3f1212 !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .fec-callout.success {
  background: #052e16 !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .fec-analysis-hero {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.20), transparent 34%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.18), transparent 36%),
    linear-gradient(135deg, #0b1120 0%, #111c4f 50%, #0f3f8a 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(59, 130, 246, 0.20) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .fec-analysis-stat {
  background: rgba(15, 23, 42, 0.62) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .fec-analysis-stat-label {
  color: #bfdbfe !important;
}

html[data-theme="dark"] .fec-analysis-stat-value {
  color: #f8fafc !important;
}

html[data-theme="dark"] .fec-analysis-badge {
  background: #172033 !important;
  color: #e5edf7 !important;
}

html[data-theme="dark"] .fec-analysis-badge.ok {
  background: #052e16 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .fec-analysis-badge.warning {
  background: #3f2a06 !important;
  color: #fde68a !important;
}

html[data-theme="dark"] .fec-analysis-badge.critical {
  background: #3f1212 !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .fec-analysis-badge.info {
  background: #172554 !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] .fec-analysis-finding,
html[data-theme="dark"] .fec-analysis-test-row,
html[data-theme="dark"] .fec-analysis-focus-card,
html[data-theme="dark"] .fec-analysis-account-card,
html[data-theme="dark"] .fec-analysis-expert-cycle,
html[data-theme="dark"] .fec-analysis-expert-summary-card,
html[data-theme="dark"] .fec-analysis-catalog-cycle,
html[data-theme="dark"] .fec-analysis-catalog-block,
html[data-theme="dark"] .fec-cycle-nav-panel,
html[data-theme="dark"] .fec-correctif-card,
html[data-theme="dark"] .fec-suspens-panel {
  background: #111827 !important;
  border-color: #243041 !important;
  color: #e5edf7 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .fec-analysis-cycle-head,
html[data-theme="dark"] .fec-analysis-expert-cycle-head,
html[data-theme="dark"] .fec-analysis-catalog-head,
html[data-theme="dark"] .fec-suspens-head,
html[data-theme="dark"] .fec-analysis-test-row[open] > summary {
  background: #162033 !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] .fec-analysis-cycle-head h3,
html[data-theme="dark"] .fec-analysis-focus-card-title,
html[data-theme="dark"] .fec-analysis-account-card-title,
html[data-theme="dark"] .fec-analysis-expert-cycle-head h3,
html[data-theme="dark"] .fec-analysis-catalog-head h3,
html[data-theme="dark"] .fec-cycle-nav-link,
html[data-theme="dark"] .fec-suspens-title {
  color: #f8fafc !important;
}

html[data-theme="dark"] .fec-analysis-test-summary-meta,
html[data-theme="dark"] .fec-analysis-focus-card-meta,
html[data-theme="dark"] .fec-analysis-focus-card-detail,
html[data-theme="dark"] .fec-analysis-account-card-meta,
html[data-theme="dark"] .fec-analysis-account-card-detail,
html[data-theme="dark"] .fec-analysis-expert-summary-meta,
html[data-theme="dark"] .fec-analysis-finding-summary,
html[data-theme="dark"] .fec-analysis-empty,
html[data-theme="dark"] .fec-suspens-detail,
html[data-theme="dark"] .fec-suspens-meta,
html[data-theme="dark"] .fec-cycle-nav-index,
html[data-theme="dark"] .fec-analysis-catalog-list,
html[data-theme="dark"] .fec-analysis-overview-table td:first-child {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .fec-cycle-nav-link {
  background: #111827 !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] .fec-cycle-nav-link:hover {
  background: #162033 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .fec-cycle-nav-link.is-active {
  background: #172554 !important;
  color: #bfdbfe !important;
  border-color: #2563eb !important;
}

html[data-theme="dark"] .fec-cycle-nav-progress {
  background: #172033 !important;
}

html[data-theme="dark"] .fec-cycle-nav-progress-bar {
  background: linear-gradient(90deg, #38bdf8, #2563eb) !important;
}

html[data-theme="dark"] .fec-analysis-code {
  background: #172554 !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] .fec-analysis-log {
  background: #020617 !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .presentation-hero {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.18), transparent 30%),
    radial-gradient(circle at bottom left, rgba(37, 99, 235, 0.14), transparent 30%),
    linear-gradient(135deg, #0b1120 0%, #0f766e 46%, #0ea5e9 100%) !important;
  color: #fff !important;
  border: 1px solid rgba(45, 212, 191, 0.20) !important;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34) !important;
}

html[data-theme="dark"] .presentation-hero a {
  background: rgba(255, 255, 255, 0.10) !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .presentation-hero-card {
  background: rgba(15, 23, 42, 0.60) !important;
  border-color: rgba(148, 163, 184, 0.18) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .presentation-thumb-header,
html[data-theme="dark"] .presentation-stage-toolbar,
html[data-theme="dark"] .presentation-empty-card,
html[data-theme="dark"] .presentation-slide,
html[data-theme="dark"] .presentation-panel,
html[data-theme="dark"] .presentation-compare-item,
html[data-theme="dark"] .presentation-sig-card,
html[data-theme="dark"] .presentation-overview-card,
html[data-theme="dark"] .presentation-kpi-card,
html[data-theme="dark"] .presentation-compare-bar,
html[data-theme="dark"] .presentation-takeaway,
html[data-theme="dark"] .presentation-thumb,
html[data-theme="dark"] .presentation-callout {
  background: #111827 !important;
  border-color: #243041 !important;
  color: #e5edf7 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28) !important;
}

html[data-theme="dark"] .presentation-thumb:hover {
  border-color: #334155 !important;
}

html[data-theme="dark"] .presentation-thumb.is-active {
  background: linear-gradient(180deg, #172554 0%, #111827 100%) !important;
  border-color: #0ea5e9 !important;
}

html[data-theme="dark"] .presentation-thumb-index {
  background: #172033 !important;
  color: #e5edf7 !important;
}

html[data-theme="dark"] .presentation-thumb.is-active .presentation-thumb-index {
  background: #0ea5e9 !important;
  color: #fff !important;
}

html[data-theme="dark"] .presentation-slide {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.08), transparent 28%),
    linear-gradient(180deg, #111827 0%, #0f172a 100%) !important;
  min-height: 640px;
}

html[data-theme="dark"] .presentation-stage-btn {
  background: #172033 !important;
  border-color: #334155 !important;
  color: #e5edf7 !important;
}

html[data-theme="dark"] .presentation-chip {
  background: #172033 !important;
  color: #e5edf7 !important;
  border-color: #334155 !important;
}

html[data-theme="dark"] .presentation-chip.soft {
  background: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: #243041 !important;
}

html[data-theme="dark"] .presentation-chip.is-ok {
  background: #052e16 !important;
  color: #bbf7d0 !important;
  border-color: #166534 !important;
}

html[data-theme="dark"] .presentation-overview-label,
html[data-theme="dark"] .presentation-overview-note,
html[data-theme="dark"] .presentation-thumb-summary,
html[data-theme="dark"] .presentation-stage-title small,
html[data-theme="dark"] .presentation-slide-subtitle,
html[data-theme="dark"] .presentation-kpi-note,
html[data-theme="dark"] .presentation-metric-line-label,
html[data-theme="dark"] .presentation-bar-foot,
html[data-theme="dark"] .presentation-compare-item-family,
html[data-theme="dark"] .presentation-compare-item-values span,
html[data-theme="dark"] .presentation-sig-family,
html[data-theme="dark"] .presentation-sig-meta,
html[data-theme="dark"] .presentation-empty-card p {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .presentation-slide-title,
html[data-theme="dark"] .presentation-overview-value,
html[data-theme="dark"] .presentation-kpi-value,
html[data-theme="dark"] .presentation-compare-bar-label,
html[data-theme="dark"] .presentation-compare-item-label strong,
html[data-theme="dark"] .presentation-sig-title,
html[data-theme="dark"] .presentation-sig-value,
html[data-theme="dark"] .presentation-empty-card h2,
html[data-theme="dark"] .presentation-accounting-check-value {
  color: #f8fafc !important;
}

html[data-theme="dark"] .presentation-accounting-check-value.is-ok {
  color: #86efac !important;
}

html[data-theme="dark"] .presentation-accounting-check-value.is-warning {
  color: #fdba74 !important;
}

html[data-theme="dark"] .presentation-delta.is-positive {
  background: #052e16 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] .presentation-delta.is-negative {
  background: #3f1212 !important;
  color: #fecaca !important;
}

html[data-theme="dark"] .presentation-delta.is-neutral {
  background: #172033 !important;
  color: #cbd5e1 !important;
}

html[data-theme="dark"] .presentation-compare-bar-track,
html[data-theme="dark"] .presentation-compare-item-track,
html[data-theme="dark"] .presentation-thumb-preview-track,
html[data-theme="dark"] .presentation-bar-track {
  background: #172033 !important;
}

html[data-theme="dark"] .presentation-compare-bar-track .prev,
html[data-theme="dark"] .presentation-compare-item-track .prev {
  background: rgba(148, 163, 184, 0.36) !important;
}

html[data-theme="dark"] .presentation-compare-bar-track .curr,
html[data-theme="dark"] .presentation-compare-item-track .curr {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8) !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) {
  color: #e5edf7 !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="color:#0f172a"], [style*="color: #0f172a"], [style*="color:#1f2937"], [style*="color: #1f2937"]) {
  color: #f8fafc !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="color:#334155"], [style*="color: #334155"], [style*="color:#475569"], [style*="color: #475569"], [style*="color:#64748b"], [style*="color: #64748b"], [style*="color:#6b7280"], [style*="color: #6b7280"], [style*="color:#9ca3af"], [style*="color: #9ca3af"]) {
  color: #94a3b8 !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="background:#fff"], [style*="background: #fff"], [style*="background:#ffffff"], [style*="background: #ffffff"], [style*="background:#f8fafc"], [style*="background: #f8fafc"]) {
  background: #111827 !important;
  border-color: #243041 !important;
  color: #e5edf7 !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22) !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="background:#fff7ed"], [style*="background: #fff7ed"]) {
  background: #3f2a06 !important;
  border-color: #b45309 !important;
  color: #fde68a !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="background:#fff1f2"], [style*="background: #fff1f2"], [style*="background:#fef2f2"], [style*="background: #fef2f2"]) {
  background: #3f1212 !important;
  border-color: #7f1d1d !important;
  color: #fecaca !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="background:#ecfdf5"], [style*="background: #ecfdf5"]) {
  background: #052e16 !important;
  border-color: #166534 !important;
  color: #bbf7d0 !important;
}

html[data-theme="dark"] :is(.compta-page-shell, .ocr-page-shell, .juridique-shell, .fec-analysis-shell, .presentation-shell) :is([style*="background:#eff6ff"], [style*="background: #eff6ff"]) {
  background: #172554 !important;
  border-color: #1d4ed8 !important;
  color: #bfdbfe !important;
}

.cab360-mobile-table-wrap {
  width: 100%;
  position: relative;
}

.cab360-mobile-table-hint {
  display: none;
}

@media (max-width: 768px) {
  .cab360-mobile-table-wrap {
    overflow-x: auto !important;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 rgba(226, 232, 240, 0.72);
    padding-bottom: 8px;
  }

  .cab360-mobile-table-wrap::-webkit-scrollbar {
    height: 8px;
  }

  .cab360-mobile-table-wrap::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.72);
    border-radius: 999px;
  }

  .cab360-mobile-table-wrap::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
  }

  .cab360-mobile-table-wrap > table {
    margin: 0;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table {
    width: max-content;
    min-width: 100%;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table thead th,
  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table tbody td {
    white-space: nowrap;
    min-width: 118px;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table thead th:first-child,
  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    min-width: 154px;
    max-width: 220px;
    white-space: normal;
    background: #ffffff;
    box-shadow: 10px 0 18px rgba(148, 163, 184, 0.16);
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table thead th:first-child {
    z-index: 4;
    background: #f8fafc;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="matrix"] > table {
    width: max-content;
    min-width: 720px;
    table-layout: auto !important;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="matrix"] > table thead th,
  .cab360-mobile-table-wrap[data-mobile-table-kind="matrix"] > table tbody td {
    min-width: 88px;
    white-space: nowrap;
  }

  .cab360-mobile-table-wrap[data-mobile-table-kind="matrix"] > table thead th:first-child,
  .cab360-mobile-table-wrap[data-mobile-table-kind="matrix"] > table tbody td:first-child {
    width: 160px !important;
    min-width: 160px !important;
    max-width: 160px;
  }

  .cab360-mobile-table-wrap.is-scrollable .cab360-mobile-table-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: sticky;
    left: 10px;
    bottom: 0;
    margin: 8px 0 0 10px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.78);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
    z-index: 5;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.18);
  }

  .cab360-mobile-table-wrap.is-scrolled-x .cab360-mobile-table-hint {
    opacity: 0.55;
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap {
    scrollbar-color: #475569 rgba(31, 41, 55, 0.9);
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap::-webkit-scrollbar-track {
    background: rgba(31, 41, 55, 0.9);
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap::-webkit-scrollbar-thumb {
    background: #475569;
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table thead th:first-child {
    background: #172033 !important;
    color: #f8fafc !important;
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap[data-mobile-table-kind="standard"] > table tbody td:first-child {
    background: #111827 !important;
    color: #f8fafc !important;
  }

  html[data-theme="dark"] .cab360-mobile-table-wrap .cab360-mobile-table-hint {
    background: rgba(8, 15, 28, 0.88);
    color: #e5edf7;
  }
}
