:root {
  --ink: #061311;
  --ink-soft: #10211f;
  --green: #13a539;
  --green-dark: #0f8a2e;
  --green-soft: #e8f6ec;
  --alert: #e83c2e;
  --alert-soft: #fff0ee;
  --amber: #b26b00;
  --amber-soft: #fff5df;
  --blue-soft: #eef6fd;
  --surface: #ffffff;
  --surface-soft: #f4f8f6;
  --surface-strong: #eaf2ef;
  --line: #dfe9e5;
  --muted: #5c6f6b;
  --muted-light: #b8cac6;
  --shadow: 0 14px 38px rgba(6, 19, 17, 0.07);
  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 18px;
  --content: 1280px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; color: var(--ink-soft); background: var(--surface-soft); font-family: "DM Sans", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.55; }
a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .button { min-height: 42px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(19, 165, 57, 0.3); outline-offset: 2px; }
.app-header { position: sticky; top: 0; z-index: 30; color: #fff; background: rgba(6, 19, 17, 0.97); border-bottom: 1px solid rgba(255, 255, 255, 0.1); backdrop-filter: blur(12px); }
.header-inner { width: min(var(--content), calc(100% - 40px)); min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; color: #fff; flex: 0 0 auto; }
.brand-lockup:hover { color: #fff; text-decoration: none; }
.brand-logo { display: block; width: 124px; height: auto; }
.brand-product { padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.25); font-weight: 700; letter-spacing: 0.01em; }
.main-nav, .user-nav, .nav-links, .actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.main-nav { margin-left: auto; }
.main-nav a { color: var(--muted-light); font-weight: 600; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: #fff; text-decoration: none; }
.user-nav { justify-content: flex-end; }
.user-chip { padding: 6px 10px; color: #d9e6e2; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; font-size: 13px; }
.shell { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; padding: 28px 0 56px; }
.shell.login-shell { width: 100%; max-width: none; padding: 0; }
.breadcrumbs { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.breadcrumbs ol { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.breadcrumbs li:not(:last-child)::after { content: "/"; margin-left: 8px; color: #9eaaa7; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }
.campaign-tabs { display: flex; gap: 4px; margin: 0 0 24px; padding: 5px; overflow-x: auto; background: var(--surface-strong); border: 1px solid var(--line); border-radius: 10px; }
.campaign-tabs a { flex: 0 0 auto; padding: 8px 13px; color: var(--muted); border-radius: 7px; font-weight: 700; }
.campaign-tabs a:hover { color: var(--ink); text-decoration: none; }
.campaign-tabs a[aria-current="page"] { color: var(--ink); background: #fff; box-shadow: 0 2px 8px rgba(6,19,17,.06); }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.page-header-copy { min-width: 0; }
.eyebrow { margin: 0 0 8px; color: var(--green-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.page-title { margin: 0; color: var(--ink); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.04; letter-spacing: -.04em; }
.subtitle { max-width: 780px; margin: 10px 0 0; color: var(--muted); }
.page-header .actions { justify-content: flex-end; }
.hero-panel { position: relative; overflow: hidden; margin-bottom: 26px; padding: clamp(26px, 5vw, 54px); color: #fff; background: radial-gradient(circle at 78% 22%, rgba(19, 165, 57, .2), transparent 30%), radial-gradient(circle at 92% 88%, rgba(232, 60, 46, .13), transparent 26%), var(--ink); border-radius: var(--radius-lg); }
.hero-panel .page-title, .hero-panel h1, .hero-panel h2 { color: #fff; }
.hero-panel .subtitle { color: #c8d7d3; }
.hero-panel .eyebrow { color: #4fd66e; }
.panel { margin-bottom: 20px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.panel-head h2, .panel h2 { color: var(--ink); }
.panel-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.section-gap { margin-top: 26px; }
.kpi { height: 100%; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(6,19,17,.05); }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.kpi-value { margin-top: 6px; color: var(--ink); font-size: clamp(1.8rem, 3vw, 2.5rem); font-weight: 700; letter-spacing: -.04em; }
.kpi-note { margin-top: 6px; color: var(--muted); font-size: 13px; }
.kpi-link { display: block; color: inherit; }
.kpi-link:hover { text-decoration: none; }
.kpi-link:hover .kpi { border-color: var(--green); transform: translateY(-1px); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.campaign-compliance { margin: 0 0 26px; padding: 16px; color: #f4f8f6; background: var(--ink); border: 1px solid #203a35; border-radius: var(--radius-lg); box-shadow: 0 16px 40px rgba(6,19,17,.12); }
.compliance-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.compliance-kpi, .compliance-panel { background: #142925; border: 1px solid #29423d; border-radius: 12px; }
.compliance-kpi { min-height: 100px; padding: 16px; }
.compliance-kpi-label, .compliance-panel-title { margin: 0; color: #9fb5c6; font-size: 12px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }
.compliance-kpi-value { margin: 8px 0 0; color: #fff; font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.compliance-kpi-value.compliant { color: #18bd48; }
.compliance-kpi-value.danger { color: #ff4538; }
.compliance-panel { margin-top: 14px; padding: 17px 16px; }
.compliance-bar { display: flex; width: 100%; height: 16px; margin-top: 13px; overflow: hidden; background: #34504a; border-radius: 999px; }
.compliance-segment { display: block; min-width: 2px; }
.compliance-segment.compliant, .compliance-legend i.compliant { background: #18b843; }
.compliance-segment.watch, .compliance-legend i.watch { background: #f5c64e; }
.compliance-segment.non_compliant, .compliance-legend i.non_compliant { background: #ef3e32; }
.compliance-legend { display: flex; gap: 18px; margin-top: 11px; color: #c9d5d2; flex-wrap: wrap; font-size: 13px; font-weight: 700; }
.compliance-legend span { display: inline-flex; align-items: center; gap: 6px; }
.compliance-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 999px; }
.compliance-alerts ul { display: grid; gap: 9px; margin: 13px 0 0; padding: 0; list-style: none; }
.compliance-alerts li, .compliance-clear { display: flex; align-items: flex-start; gap: 9px; margin: 0; color: #f4f8f6; font-size: 13px; font-weight: 700; }
.compliance-alerts li i, .compliance-clear i { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 3px; border: 2px solid currentColor; border-radius: 50%; }
.compliance-alerts li.danger { color: #ff5a4e; }
.compliance-alerts li.warning { color: #f5c64e; }
.compliance-alerts li span, .compliance-clear span { color: #f4f8f6; }
.compliance-clear { margin-top: 13px; color: #18bd48; }
.compliance-empty { margin: 12px 0 0; color: #a9bbb7; }
.button, button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; color: var(--ink); background: var(--green); border: 1px solid var(--green); border-radius: var(--radius-sm); cursor: pointer; font-weight: 700; line-height: 1.2; }
.button:hover, button:hover { color: var(--ink); background: #2cba4f; text-decoration: none; }
.button.secondary, button.secondary { color: var(--green-dark); background: #fff; border-color: #a9c4b8; }
.button.secondary:hover, button.secondary:hover { color: var(--ink); border-color: var(--green); }
.button.ghost, button.ghost { color: var(--muted); background: transparent; border-color: transparent; }
.button.danger, button.danger { color: #9d2118; background: #fff; border-color: #e5a19b; }
button:disabled { opacity: .55; cursor: not-allowed; }
form.inline { display: inline-flex; }
.badge, .status-badge { display: inline-flex; align-items: center; gap: 6px; min-height: 27px; padding: 4px 9px; color: var(--muted); background: var(--surface-strong); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 800; line-height: 1.2; white-space: nowrap; }
.status-badge::before { width: 7px; height: 7px; content: ""; background: currentColor; border-radius: 999px; }
.badge.completed, .status-badge.compliant, .status-badge.ok { color: #087426; background: var(--green-soft); border-color: #aadbb7; }
.badge.running, .status-badge.to-confirm, .status-badge.unknown, .status-badge.subscription, .status-badge.mixed { color: #8a5600; background: var(--amber-soft); border-color: #e7c985; }
.badge.failed, .status-badge.non-compliant, .status-badge.review { color: #a2241a; background: var(--alert-soft); border-color: #eca8a1; }
.status-badge.incomplete, .status-badge.error { color: #4e6170; background: #f1f5f7; border-color: #cbd7dc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 13px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
th { color: var(--muted); background: #f8fbfa; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdfc; }
td { overflow-wrap: anywhere; }
.cell-primary { color: var(--ink); font-weight: 700; }
.cell-secondary, small { color: var(--muted); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; gap: 15px; }
.form-grid.compact { gap: 10px; }
label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="file"], input[type="number"], select, textarea { width: 100%; min-height: 44px; padding: 9px 11px; color: var(--ink-soft); background: #fff; border: 1px solid #bfcfca; border-radius: var(--radius-sm); }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--green); }
.check-label { display: inline-flex; align-items: center; gap: 8px; margin: 0; color: inherit; }
.filter-bar { margin-bottom: 18px; padding: 16px; background: var(--surface-soft); border: 1px solid var(--line); border-radius: 10px; }
.notice, .error, .callout { margin-bottom: 18px; padding: 13px 15px; border: 1px solid; border-radius: 8px; }
.notice { color: #0a6b25; background: var(--green-soft); border-color: #a8d8b4; }
.error { color: #9e251c; background: var(--alert-soft); border-color: #e8aaa4; }
.callout { color: #24526f; background: var(--blue-soft); border-color: #b8d6ea; }
.empty-state { padding: 34px 20px; text-align: center; color: var(--muted); }
.empty-state h2 { margin-bottom: 6px; color: var(--ink); }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.pagination-meta { color: var(--muted); font-size: 13px; }
.details { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; }
.details > summary { padding: 14px 16px; color: var(--ink); cursor: pointer; font-weight: 800; }
.details-body { padding: 0 16px 16px; }
.definition-list { display: grid; grid-template-columns: minmax(160px, 240px) 1fr; margin: 0; }
.definition-list dt, .definition-list dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); }
.definition-list dt { color: var(--muted); font-weight: 700; }
.definition-list dd { overflow-wrap: anywhere; }
.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(380px, .8fr); background: var(--ink); }
.login-visual { display: flex; align-items: flex-end; min-height: 100vh; padding: clamp(36px, 7vw, 90px); color: #fff; background: linear-gradient(180deg, rgba(6,19,17,.32), rgba(6,19,17,.95)), url("/static/images/visuel-watch.jpg") center / cover no-repeat; }
.login-visual-copy { max-width: 700px; }
.login-visual h1 { margin: 12px 0; font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: .98; letter-spacing: -.055em; }
.login-visual p { max-width: 600px; color: #cbd9d6; font-size: 17px; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 36px; background: #f7faf9; }
.login-card { width: min(420px, 100%); }
.login-card .brand-logo { width: 160px; margin-bottom: 30px; filter: brightness(0) saturate(100%); }
.technical-code, code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em; }
pre { overflow-x: auto; padding: 15px; background: #f7faf9; border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; word-break: break-word; }
.modal { width: min(780px, calc(100vw - 32px)); max-height: calc(100vh - 40px); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.modal::backdrop { background: rgba(6,19,17,.7); }
@media (max-width: 960px) {
  .grid.four, .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compliance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner { align-items: flex-start; padding: 15px 0; flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; margin: 0; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 38vh; }
}
@media (max-width: 680px) {
  .shell, .header-inner { width: min(100% - 24px, var(--content)); }
  .shell { padding-top: 18px; }
  .brand-logo { width: 106px; }
  .brand-product { font-size: 13px; }
  .user-chip { display: none; }
  .page-header { flex-direction: column; }
  .page-header .actions { justify-content: flex-start; }
  .grid.two, .grid.three, .grid.four { grid-template-columns: 1fr; }
  .compliance-kpis { grid-template-columns: 1fr; }
  .campaign-compliance { padding: 12px; border-radius: 12px; }
  .panel { padding: 17px; }
  .hero-panel { border-radius: 12px; }
  .login-visual { padding: 30px 24px; }
  .login-form-wrap { padding: 34px 22px; }
  .definition-list { grid-template-columns: 1fr; }
  .definition-list dt { padding-bottom: 2px; border-bottom: 0; }
  .definition-list dd { padding-top: 2px; }
  .pagination { align-items: flex-start; flex-direction: column; }
}
@media print {
  .app-header, .breadcrumbs, .campaign-tabs, .actions, .filter-bar { display: none !important; }
  body { background: #fff; }
  .shell { width: 100%; padding: 0; }
  .panel, .kpi { box-shadow: none; break-inside: avoid; }
}
