/* Polices de la charte Sanelio, hébergées localement (aucun appel à un service tiers) */
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url(fonts/inter-400.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url(fonts/inter-500.woff2) format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600 700; font-display: swap; src: url(fonts/inter-600.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap; src: url(fonts/manrope-500.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(fonts/manrope-600.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700 800; font-display: swap; src: url(fonts/manrope-700.woff2) format("woff2"); }

/* ==========================================================================
   SANELIO GESTION S — Interface
   Charte : Bleu Sanelio #005B7F · Vert Santé #6CC48A · Bleu clair #A7D8E8
            Gris doux #E5EAF0 · Anthracite #2B2E34 — Manrope / Inter
   ========================================================================== */

:root {
  --brand: #005B7F;
  --brand-600: #004E6D;
  --brand-700: #003B55;
  --brand-050: #EAF4F8;
  --brand-100: #D3E9F1;
  --green: #6CC48A;
  --green-ink: #2E7D4A;
  --sky: #A7D8E8;
  --grey-soft: #E5EAF0;
  --ink: #2B2E34;
  --ink-2: #555B66;
  --ink-3: #7D8491;
  --bg: #F3F6F9;
  --surface: #FFFFFF;
  --surface-2: #F8FAFC;
  --line: #E3E8EF;
  --line-2: #D5DCE5;
  --shadow: 0 1px 2px rgba(20, 40, 60, .06), 0 4px 16px rgba(20, 40, 60, .05);
  --shadow-lg: 0 10px 40px rgba(10, 30, 50, .16);
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar: #00344C;
  --sidebar-2: #004A69;
  --sidebar-ink: #CFE3EC;
  /* tons (badges) */
  --t-blue-bg: #E3F0F7; --t-blue: #0B5F85;
  --t-green-bg: #E3F4E9; --t-green: #23733F;
  --t-teal-bg: #DFF2F2; --t-teal: #146B6B;
  --t-orange-bg: #FCEEDF; --t-orange: #9A4F10;
  --t-red-bg: #FBE5E5; --t-red: #A42828;
  --t-purple-bg: #EEE8F7; --t-purple: #5B3E8F;
  --t-grey-bg: #EEF1F5; --t-grey: #5A6270;
  /* graphiques (palette validée daltonisme, 2 séries) */
  --on-brand: #FFFFFF;
  --c1: #0072A3;
  --c1-soft: #9CCBE0;
  --c2: #C2662A;
  --grid: #E6EBF1;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #4FA9D1; --brand-600: #3A97C0; --brand-700: #2B7FA6; --brand-050: #12303D; --brand-100: #173B4B;
    --green-ink: #7FD49C; --ink: #E7EBF0; --ink-2: #B7C0CB; --ink-3: #8D97A4;
    --bg: #0F1419; --surface: #171D24; --surface-2: #1C232B; --line: #27303A; --line-2: #33404C;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
    --sidebar: #0B1A23; --sidebar-2: #10283A; --sidebar-ink: #A9C2CF;
    --t-blue-bg: #14334A; --t-blue: #8CC8EA; --t-green-bg: #163B26; --t-green: #8ED9A8;
    --t-teal-bg: #133A3A; --t-teal: #86D3D3; --t-orange-bg: #3F2A14; --t-orange: #F2B77E;
    --t-red-bg: #451E1E; --t-red: #F2A1A1; --t-purple-bg: #2E2445; --t-purple: #C7B2EC;
    --t-grey-bg: #252C35; --t-grey: #B3BCC8;
    --c1: #2A92C4; --c1-soft: #1F5570; --c2: #D2793A; --grid: #26303A; --on-brand: #04202D;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #4FA9D1; --brand-600: #3A97C0; --brand-700: #2B7FA6; --brand-050: #12303D; --brand-100: #173B4B;
  --green-ink: #7FD49C; --ink: #E7EBF0; --ink-2: #B7C0CB; --ink-3: #8D97A4;
  --bg: #0F1419; --surface: #171D24; --surface-2: #1C232B; --line: #27303A; --line-2: #33404C;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.5);
  --sidebar: #0B1A23; --sidebar-2: #10283A; --sidebar-ink: #A9C2CF;
  --t-blue-bg: #14334A; --t-blue: #8CC8EA; --t-green-bg: #163B26; --t-green: #8ED9A8;
  --t-teal-bg: #133A3A; --t-teal: #86D3D3; --t-orange-bg: #3F2A14; --t-orange: #F2B77E;
  --t-red-bg: #451E1E; --t-red: #F2A1A1; --t-purple-bg: #2E2445; --t-purple: #C7B2EC;
  --t-grey-bg: #252C35; --t-grey: #B3BCC8;
  --c1: #2A92C4; --c1-soft: #1F5570; --c2: #D2793A; --grid: #26303A; --on-brand: #04202D;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .title-font { font-family: "Manrope", system-ui, sans-serif; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.12rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
h4 { font-size: .92rem; font-weight: 600; margin: .8em 0 .3em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
p { margin: 0 0 .6em; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.ic { flex-shrink: 0; vertical-align: -3px; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
::selection { background: var(--sky); color: #00263A; }

/* --------------------------------------------------------------- Layout */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; background: linear-gradient(90deg, var(--sidebar-2) 264px, transparent 264px); }
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-ink); position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 14px; color: #fff; text-decoration: none !important; }
.brand-mark { width: 38px; height: 38px; flex-shrink: 0; }
.brand-name { font-family: "Manrope", sans-serif; font-weight: 700; font-size: 1.05rem; line-height: 1.1; }
.brand-name small { display: block; font-weight: 500; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green); margin-top: 3px; }
/* Logo de l'outil (comme Sanelio Avocats) : le mot « sanelio » puis un encart plein violet « Gestion ». */
.brand.marque-outil { gap: 8px; }
.brand.marque-outil img { height: 24px; width: auto; display: block; }
.brand.marque-outil .produit { font-weight: 600; font-size: 13px; line-height: 1; padding: 5px 8px; border-radius: 7px; color: #fff; background: #7A5AF8; white-space: nowrap; }
.struct-card { margin: 4px 14px 12px; padding: 10px 12px; border-radius: 11px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.struct-card strong { color: #fff; font-size: .88rem; display: block; line-height: 1.25; }
.struct-card span { font-size: .72rem; color: var(--sky); text-transform: uppercase; letter-spacing: .06em; }
.nav { padding: 4px 10px 24px; flex: 1; }
.nav-section { margin-top: 10px; }
.nav-title {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  font: 600 .68rem/1 "Manrope", sans-serif; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(207,227,236,.55); padding: 10px 10px 6px; background: none; border: 0; cursor: pointer;
}
.nav-title .ic { transition: transform .2s; opacity: .6; }
.nav-section.collapsed .nav-title .ic { transform: rotate(-90deg); }
.nav-section.collapsed .nav-items { display: none; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px;
  color: var(--sidebar-ink); font-size: .9rem; text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: rgba(108,196,138,.16); color: #fff; box-shadow: inset 3px 0 0 var(--green); }
.nav a.active .ic { color: var(--green); }
.sidebar-foot { padding: 12px 20px 18px; font-size: .72rem; color: rgba(207,227,236,.5); border-top: 1px solid rgba(255,255,255,.06); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.menu-toggle { display: none; }
.search-box { flex: 1; max-width: 520px; position: relative; }
.search-box input {
  width: 100%; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  padding: 0 14px 0 40px; color: var(--ink); font: inherit;
}
.search-box input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.search-box .ic { position: absolute; left: 13px; top: 11px; color: var(--ink-3); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  position: relative; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; color: var(--ink-2); cursor: pointer; text-decoration: none !important;
}
.icon-btn:hover { color: var(--brand); border-color: var(--line-2); }
.icon-btn .dot-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: #D64545; color: #fff; font: 700 .68rem/19px "Inter", sans-serif; text-align: center;
}
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); font: inherit; }
.user-btn .who { text-align: left; line-height: 1.15; }
.user-btn .who small { display: block; color: var(--ink-3); font-size: .72rem; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 250px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 50;
}
.dropdown.open { display: block; }
.dropdown a, .dropdown button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 11px; border-radius: 8px; color: var(--ink); font: inherit; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--surface-2); text-decoration: none; }
.dropdown .sep { height: 1px; background: var(--line); margin: 5px 0; }
.alerts-panel { width: 380px; max-height: 70vh; overflow: auto; }
.alert-item { display: flex; gap: 11px; align-items: flex-start; padding: 10px 11px; border-radius: 9px; color: var(--ink); }
.alert-item:hover { background: var(--surface-2); text-decoration: none !important; }
.alert-item .ai-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }

.content { padding: 26px 28px 60px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .sub { color: var(--ink-3); margin-top: 4px; font-size: .92rem; }
.breadcrumbs { font-size: .8rem; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.breadcrumbs a { color: var(--ink-3); }
.actions-bar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* --------------------------------------------------------------- Cartes & grilles */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 0; flex-wrap: wrap; }
.card-head h2 { display: flex; align-items: center; gap: 9px; }
.card-head h2 .ic { color: var(--brand); }
.card-body { padding: 16px 20px 20px; }
.card-body.flush { padding: 0; }
.card + .card { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.stack > * + * { margin-top: 18px; }
.mt { margin-top: 18px; }
.mb { margin-bottom: 18px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi .k-label { font-size: .8rem; color: var(--ink-3); font-weight: 600; display: flex; align-items: center; gap: 7px; padding-right: 40px; }
.kpis.compact { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.kpi .k-value { font: 700 1.65rem/1.15 "Manrope", sans-serif; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: .8rem; color: var(--ink-3); margin-top: 3px; }
.kpi .k-ic { position: absolute; right: 14px; top: 14px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-050); color: var(--brand); }
.kpi.tone-green .k-ic { background: var(--t-green-bg); color: var(--t-green); }
.kpi.tone-orange .k-ic { background: var(--t-orange-bg); color: var(--t-orange); }
.kpi.tone-red .k-ic { background: var(--t-red-bg); color: var(--t-red); }
.kpi.tone-purple .k-ic { background: var(--t-purple-bg); color: var(--t-purple); }
.kpi.tone-teal .k-ic { background: var(--t-teal-bg); color: var(--t-teal); }
a.kpi { color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.hero {
  border-radius: 18px; padding: 24px 26px; color: #fff; margin-bottom: 20px; position: relative; overflow: hidden;
  background: radial-gradient(1200px 300px at 90% -40%, rgba(108,196,138,.45), transparent 60%), linear-gradient(120deg, #00415D 0%, #005B7F 55%, #0A7299 100%);
}
.hero h1 { font-size: 1.5rem; }
.hero p { color: #D6ECF4; margin: 6px 0 0; }
.hero .hero-meta { display: flex; gap: 22px; margin-top: 16px; flex-wrap: wrap; }
.hero .hero-meta div { font-size: .82rem; color: #BFE0EC; }
.hero .hero-meta strong { display: block; font: 700 1.25rem "Manrope", sans-serif; color: #fff; }
.hero svg.hero-deco { position: absolute; right: -30px; bottom: -40px; opacity: .12; }

/* --------------------------------------------------------------- Boutons */
.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 10px;
  border: 1px solid transparent; font: 600 .88rem "Inter", sans-serif; cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-600); box-shadow: 0 4px 14px rgba(0,91,127,.25); }
.btn-green { background: var(--green); color: #0B3A1E; }
.btn-green:hover { filter: brightness(.95); }
.btn-secondary { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--brand); }
.btn-danger { background: var(--surface); border-color: #E7B4B4; color: #B33636; }
.btn-danger:hover { background: #B33636; color: #fff; border-color: #B33636; }
.btn-sm { height: 31px; padding: 0 11px; font-size: .82rem; border-radius: 8px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: .76rem; border-radius: 7px; gap: 4px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-group { display: inline-flex; border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; }
.btn-group a { padding: 0 12px; height: 36px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: .85rem; text-decoration: none; background: var(--surface); }
.btn-group a + a { border-left: 1px solid var(--line-2); }
.btn-group a.on { background: var(--brand-050); color: var(--brand); font-weight: 700; }

/* --------------------------------------------------------------- Badges, chips */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; line-height: 1.6; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.badge-ic::before { display: none; }
.badge.badge-ic { padding: 4px 6px; }
.badge-blue { background: var(--t-blue-bg); color: var(--t-blue); }
.badge-green { background: var(--t-green-bg); color: var(--t-green); }
.badge-teal { background: var(--t-teal-bg); color: var(--t-teal); }
.badge-orange { background: var(--t-orange-bg); color: var(--t-orange); }
.badge-red { background: var(--t-red-bg); color: var(--t-red); }
.badge-purple { background: var(--t-purple-bg); color: var(--t-purple); }
.badge-grey { background: var(--t-grey-bg); color: var(--t-grey); }
.chips { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); font-size: .78rem; }
.yes { color: var(--green-ink); font-weight: 700; display: inline-flex; gap: 4px; align-items: center; }
.due.overdue { color: var(--t-red); font-weight: 700; }
.due.soon { color: var(--t-orange); font-weight: 700; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 5px; border: 1px solid var(--line-2); vertical-align: middle; }
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--av, var(--brand));
  color: #fff; font: 700 .78rem "Manrope", sans-serif; flex-shrink: 0;
}
.avatar.sm { width: 26px; height: 26px; font-size: .64rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.who-cell { display: flex; align-items: center; gap: 10px; }

/* --------------------------------------------------------------- Tableaux */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
table.data th {
  text-align: left; font: 600 .74rem "Manrope", sans-serif; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  padding: 11px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0;
}
table.data th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
table.data th a.sorted { color: var(--brand); }
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr.clickable { cursor: pointer; }
table.data tfoot td { font-weight: 700; background: var(--surface-2); }
table.data td.actions-cell { text-align: right; white-space: nowrap; }
table.data .title-link { font-weight: 700; color: var(--ink); }
table.data .title-link:hover { color: var(--brand); }
table.data tr:last-child td { border-bottom: 0; }
table.compact td, table.compact th { padding: 7px 10px; }
.empty { padding: 42px 20px; text-align: center; color: var(--ink-3); }
.empty .ic { color: var(--line-2); margin-bottom: 10px; }
.empty strong { display: block; color: var(--ink-2); font-size: 1rem; margin-bottom: 4px; }

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filters .input { height: 36px; width: auto; min-width: 150px; }
.filters .search-inline { position: relative; }
.filters .search-inline input { padding-left: 34px; min-width: 230px; }
.filters .search-inline .ic { position: absolute; left: 11px; top: 9px; color: var(--ink-3); }
.presets { display: flex; gap: 6px; flex-wrap: wrap; padding: 12px 16px 0; }
.preset { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); font-size: .82rem; color: var(--ink-2); background: var(--surface); text-decoration: none !important; }
.preset:hover { border-color: var(--brand); color: var(--brand); }
.preset.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.list-foot { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); flex-wrap: wrap; gap: 10px; font-size: .85rem; color: var(--ink-3); }
.pagination { display: flex; gap: 4px; }
.pagination a, .pagination span { min-width: 32px; height: 32px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); color: var(--ink-2); font-size: .85rem; text-decoration: none; }
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* --------------------------------------------------------------- Formulaires */
.form-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px 18px; }
.fg { grid-column: span 6; min-width: 0; }
.fg.w-full { grid-column: 1 / -1; }
.fg.w-third { grid-column: span 4; }
.fg.w-quarter { grid-column: span 3; }
.fg.w-twothird { grid-column: span 8; }
.fg label.lbl { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 6px; color: var(--ink-2); }
.fg label.lbl .req { color: #C23B3B; margin-left: 2px; }
.fg .help { font-size: .78rem; color: var(--ink-3); margin-top: 5px; }
.fg .err { font-size: .8rem; color: #C23B3B; margin-top: 5px; font-weight: 600; }
.form-section { grid-column: 1 / -1; font: 600 .78rem "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); padding-top: 10px; border-top: 1px solid var(--line); margin-top: 4px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface);
  color: var(--ink); font: inherit; font-size: .93rem; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 90px; }
select.input { padding-right: 30px; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-050); }
.input.is-invalid { border-color: #D64545; }
.input-affix { position: relative; }
.input-affix .affix { position: absolute; right: 12px; top: 10px; color: var(--ink-3); font-size: .9rem; pointer-events: none; }
.input-affix .input { padding-right: 30px; }
.input-color { width: 70px; padding: 4px; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 14px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; max-height: 240px; overflow: auto; }
.check { display: flex; gap: 8px; align-items: center; font-size: .88rem; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; height: 40px; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .slider { width: 42px; height: 24px; border-radius: 12px; background: var(--line-2); position: relative; transition: background .2s; }
.switch .slider::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px var(--brand-050); }
.switch-label { font-size: .88rem; color: var(--ink-2); }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.form-actions .left { margin-right: auto; }
.inline-form { display: inline; }
.dropzone { display: block; cursor: pointer; border: 1.5px dashed var(--line-2); border-radius: 11px; padding: 14px; text-align: center; color: var(--ink-3); font-size: .85rem; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--brand); background: var(--brand-050); }

/* --------------------------------------------------------------- Messages */
.flash { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 11px; margin-bottom: 14px; font-size: .92rem; border: 1px solid; }
.flash-success { background: var(--t-green-bg); color: var(--t-green); border-color: color-mix(in srgb, var(--t-green) 25%, transparent); }
.flash-error { background: var(--t-red-bg); color: var(--t-red); border-color: color-mix(in srgb, var(--t-red) 25%, transparent); }
.flash-warning { background: var(--t-orange-bg); color: var(--t-orange); border-color: color-mix(in srgb, var(--t-orange) 25%, transparent); }
.flash-info { background: var(--t-blue-bg); color: var(--t-blue); border-color: color-mix(in srgb, var(--t-blue) 25%, transparent); }
.flash .close { margin-left: auto; background: none; border: 0; color: inherit; cursor: pointer; opacity: .7; }
.callout { padding: 14px 16px; border-radius: 11px; background: var(--brand-050); border: 1px solid var(--brand-100); font-size: .9rem; }
.callout.warn { background: var(--t-orange-bg); border-color: transparent; color: var(--t-orange); }
.callout.danger { background: var(--t-red-bg); border-color: transparent; color: var(--t-red); }
.callout.ok { background: var(--t-green-bg); border-color: transparent; color: var(--t-green); }

/* --------------------------------------------------------------- Fiche détail */
.detail-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.detail-head .dh-ic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-050); color: var(--brand); display: grid; place-items: center; }
.detail-head .dh-main { flex: 1; min-width: 240px; }
.detail-head .dh-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
dl.props { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin: 0; }
dl.props > div { padding: 11px 0; border-bottom: 1px solid var(--line); padding-right: 14px; min-width: 0; }
dl.props > div.full { grid-column: 1 / -1; }
dl.props dt { font-size: .76rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
dl.props dd { margin: 0; overflow-wrap: anywhere; }
.props-group { font: 600 .78rem "Manrope", sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin: 18px 0 2px; }
.props-group:first-child { margin-top: 0; }
.rich p { margin: 0 0 .4em; }
.rich ul { margin: .2em 0 .6em; padding-left: 1.2em; }
.rich h4 { color: var(--brand); }
.file-list { list-style: none; margin: 0; padding: 0; }
.file-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .88rem; }
.file-list li:last-child { border-bottom: 0; }
.file-ext { width: 38px; height: 38px; border-radius: 9px; background: var(--brand-050); color: var(--brand); font: 700 .66rem "Manrope", sans-serif; display: grid; place-items: center; flex-shrink: 0; }
.file-list .fmeta { flex: 1; min-width: 0; }
.file-list .fmeta a { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.comments .cmt { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comments .cmt:last-child { border-bottom: 0; }
.comments .cmt-head { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--ink-3); margin-bottom: 4px; }
.comments .cmt-head strong { color: var(--ink); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 12px 12px; font-size: .83rem; }
.timeline li::before { content: ""; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand); }
.timeline li small { display: block; color: var(--ink-3); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--ink-3); font-weight: 700; font-size: .88rem; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--brand); border-bottom-color: var(--brand); }

/* --------------------------------------------------------------- Kanban */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 10px; min-height: 200px; }
.kcol.drop { border-color: var(--brand); background: var(--brand-050); }
.kcol-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; font-weight: 700; font-size: .86rem; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; margin-bottom: 8px; box-shadow: var(--shadow); cursor: grab; font-size: .86rem; }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .5; }
.kcard a.kt { font-weight: 700; color: var(--ink); display: block; margin-bottom: 5px; }
.kcard .kmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--ink-3); font-size: .78rem; }

/* --------------------------------------------------------------- Agenda */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toolbar h2 { min-width: 220px; }
.cal-week { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-week .ch { padding: 10px 6px; text-align: center; font-weight: 700; font-size: .82rem; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.cal-week .ch.today { color: var(--brand); }
.cal-week .ch small { display: block; font-weight: 400; color: var(--ink-3); }
.cal-hours { position: relative; }
.cal-hours div { height: 48px; font-size: .7rem; color: var(--ink-3); text-align: right; padding-right: 6px; border-top: 1px solid var(--line); }
.cal-day { position: relative; border-left: 1px solid var(--line); background-image: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 48px); }
.cal-day.today { background-color: color-mix(in srgb, var(--brand-050) 60%, transparent); }
.cal-ev {
  position: absolute; left: 3px; right: 3px; border-radius: 7px; padding: 3px 6px; font-size: .72rem; line-height: 1.25; overflow: hidden;
  border-left: 3px solid var(--ev, var(--brand)); background: color-mix(in srgb, var(--ev, var(--brand)) 14%, var(--surface)); color: var(--ink);
  text-decoration: none !important;
}
.cal-ev:hover { z-index: 5; box-shadow: var(--shadow-lg); }
.cal-ev strong, .cal-ev span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-allday { grid-column: 2 / -1; }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.cal-month .mh { padding: 8px; text-align: center; font-weight: 700; font-size: .78rem; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-month .md { min-height: 112px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 5px; font-size: .74rem; }
.cal-month .md:nth-child(7n+1) { border-left: 0; }
.cal-month .md.out { background: var(--surface-2); color: var(--ink-3); }
.cal-month .md.today .dn { background: var(--brand); color: #fff; }
.cal-month .dn { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; margin-bottom: 3px; }
.cal-month .mev { display: block; border-radius: 5px; padding: 1px 5px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: color-mix(in srgb, var(--ev, var(--brand)) 14%, var(--surface)); border-left: 3px solid var(--ev, var(--brand)); color: var(--ink); text-decoration: none; }
.cal-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); margin-top: 10px; }
.cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ev); margin-right: 5px; }

/* Planning du personnel */
.roster { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .85rem; }
.roster th, .roster td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); padding: 6px; text-align: center; }
.roster th { background: var(--surface-2); font-size: .76rem; position: sticky; top: 0; z-index: 2; }
.roster td.name { text-align: left; white-space: nowrap; position: sticky; left: 0; background: var(--surface); z-index: 1; min-width: 210px; }
.roster select { border: 0; background: transparent; font: 700 .82rem "Inter", sans-serif; width: 100%; text-align: center; cursor: pointer; color: var(--ink); padding: 6px 2px; border-radius: 7px; }
.roster td.c-M { background: var(--t-blue-bg); } .roster td.c-S { background: var(--t-purple-bg); } .roster td.c-J { background: var(--t-teal-bg); }
.roster td.c-N { background: var(--t-grey-bg); } .roster td.c-CP { background: var(--t-green-bg); } .roster td.c-F { background: var(--t-orange-bg); }
.roster td.c-AM { background: var(--t-red-bg); } .roster th.we, .roster td.we { box-shadow: inset 0 0 0 999px rgba(0,0,0,.02); }
.roster tfoot td { font-weight: 700; background: var(--surface-2); }

/* Occupation (plan des chambres) */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.room { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; background: var(--surface); font-size: .8rem; min-height: 92px; position: relative; }
.room .rn { font: 700 .95rem "Manrope", sans-serif; display: flex; justify-content: space-between; align-items: center; }
.room.free { border-style: dashed; background: var(--surface-2); }
.room.free .rn { color: var(--green-ink); }
.room.off { opacity: .6; background: repeating-linear-gradient(45deg, var(--surface-2) 0 6px, var(--surface) 6px 12px); }
.room .occ { display: block; margin-top: 5px; color: var(--ink); font-weight: 700; }
.room .occ small { font-weight: 400; color: var(--ink-3); }
.floor-title { font: 600 .8rem "Manrope", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 0 8px; }

/* --------------------------------------------------------------- Graphiques */
.chart-wrap { position: relative; }
svg.chart { width: 100%; height: auto; display: block; overflow: visible; }
svg.chart .grid { stroke: var(--grid); stroke-width: 1; }
svg.chart .baseline { stroke: var(--line-2); stroke-width: 1; }
svg.chart .axis { fill: var(--ink-3); font: 11px "Inter", sans-serif; }
svg.chart .bar { transition: opacity .15s; }
svg.chart .bar-c1 { fill: var(--c1); }
svg.chart .bar-c2 { fill: var(--c2); }
svg.chart .bar-soft { fill: var(--c1-soft); }
svg.chart .hit { fill: transparent; cursor: default; }
svg.chart .hit:hover { fill: color-mix(in srgb, var(--ink) 5%, transparent); }
svg.chart .line { fill: none; stroke: var(--c1); stroke-width: 2; stroke-linejoin: round; }
svg.chart .area { fill: var(--c1); opacity: .08; }
svg.chart .dot { fill: var(--c1); stroke: var(--surface); stroke-width: 2; }
svg.chart .target { stroke: var(--c2); stroke-width: 1.5; stroke-dasharray: 5 4; }
svg.chart .target-label { fill: var(--c2); font-weight: 700; }
svg.chart .val-label { fill: var(--ink); font: 700 12px "Inter", sans-serif; }
.legend { display: flex; gap: 16px; font-size: .8rem; color: var(--ink-2); margin-bottom: 6px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend i.bar-c1 { background: var(--c1); } .legend i.bar-c2 { background: var(--c2); } .legend i.bar-soft { background: var(--c1-soft); }
.empty-chart { padding: 40px; text-align: center; color: var(--ink-3); font-size: .88rem; }
.hbars { display: grid; gap: 8px; }
.hbar-row { display: grid; grid-template-columns: minmax(110px, 38%) 1fr auto; gap: 10px; align-items: center; font-size: .84rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.hbar-track { height: 10px; background: var(--grid); border-radius: 5px; overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--c1); border-radius: 5px; }
.hbar-fill.alt { background: var(--c2); }
.hbar-val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.ring { position: relative; width: 84px; display: inline-grid; justify-items: center; }
.ring svg circle { fill: none; stroke-width: 9; }
.ring .ring-bg { stroke: var(--grid); }
.ring .ring-fg { stroke: var(--c1); stroke-linecap: round; transition: stroke-dashoffset .6s; }
.ring.good .ring-fg { stroke: #3A9D5D; }
.ring.warn .ring-fg { stroke: var(--c2); }
.ring .ring-val { position: absolute; top: 27px; font: 700 1.05rem "Manrope", sans-serif; }
.ring .ring-val small { font-size: .65rem; }
.ring .ring-label { font-size: .75rem; color: var(--ink-3); text-align: center; margin-top: 4px; }
.progress { display: inline-block; width: 100%; min-width: 60px; height: 8px; background: var(--grid); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.progress > span { display: block; height: 100%; background: var(--c1); border-radius: 4px; }
.progress.good > span { background: #3A9D5D; }
.progress.warn > span { background: var(--c2); }
.tooltip { position: fixed; z-index: 100; pointer-events: none; background: #1D2733; color: #fff; padding: 7px 10px; border-radius: 8px; font-size: .78rem; white-space: pre-line; box-shadow: var(--shadow-lg); max-width: 280px; opacity: 0; transition: opacity .1s; }
.tooltip.show { opacity: 1; }

/* Listes simples */
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain > li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-plain > li:last-child { border-bottom: 0; }
.list-plain .li-main { flex: 1; min-width: 0; }
.list-plain .li-main a { font-weight: 700; color: var(--ink); }
.list-plain .li-main small { display: block; color: var(--ink-3); }
.date-chip { width: 46px; flex-shrink: 0; text-align: center; border-radius: 10px; background: var(--brand-050); color: var(--brand); padding: 4px 0; line-height: 1.1; }
.date-chip b { display: block; font: 700 1.1rem "Manrope", sans-serif; }
.date-chip span { font-size: .66rem; text-transform: uppercase; font-weight: 700; }

/* ACI */
.aci-axis { margin-top: 20px; }
.aci-axis h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.ind-row td { vertical-align: top; }
.ind-code { font: 700 .75rem "Manrope", sans-serif; color: var(--ink-3); }
.ind-lib { font-weight: 700; }
.proof-bar { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-3); }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.check-list li.ok span.lbl { text-decoration: line-through; color: var(--ink-3); }
.check-list input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--green-ink); }

/* Modale */
.modal-backdrop { position: fixed; inset: 0; background: rgba(8, 20, 30, .45); z-index: 80; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 440px; padding: 22px; }
.modal h3 { margin-bottom: 8px; }
.modal .modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }

/* --------------------------------------------------------------- Connexion */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-visual {
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: radial-gradient(900px 500px at 110% 10%, rgba(108,196,138,.35), transparent 60%), radial-gradient(700px 400px at -10% 110%, rgba(167,216,232,.25), transparent 60%), linear-gradient(135deg, #00324A, #005B7F);
}
.auth-visual h1 { font-size: 2.1rem; max-width: 520px; line-height: 1.2; }
.auth-visual p.lead { color: #CFE6EF; font-size: 1.05rem; max-width: 480px; margin-top: 14px; }
.auth-feats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin-top: 30px; }
.auth-feats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; font-size: .88rem; color: #E3F1F6; display: flex; gap: 10px; align-items: center; }
.auth-feats .ic { color: var(--green); }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 400px; }
.auth-box h2 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-box .fg { margin-bottom: 14px; }
.auth-box .btn { width: 100%; justify-content: center; height: 44px; }
.signature { font-family: "Manrope", sans-serif; font-size: .82rem; color: #BFE0EC; letter-spacing: .04em; }

/* Impression */
.print-page { background: #fff; color: #111; max-width: 900px; margin: 0 auto; padding: 30px; font-size: 13px; }
.print-page h1 { font-size: 20px; color: #005B7F; }
.print-page table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.print-page th, .print-page td { border: 1px solid #C9D2DC; padding: 6px 8px; text-align: left; vertical-align: top; }
.print-page th { background: #EEF3F7; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 3px solid #005B7F; padding-bottom: 12px; margin-bottom: 18px; }
.print-actions { position: fixed; top: 14px; right: 14px; display: flex; gap: 8px; }
.sign-cell { height: 38px; min-width: 150px; }
@media print {
  .print-actions, .no-print { display: none !important; }
  body { background: #fff; }
  .print-page { padding: 0; max-width: none; }
  .sidebar, .topbar { display: none; }
  .app { display: block; }
  .card { box-shadow: none; }
}

/* --------------------------------------------------------------- Responsive */
@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; background: none; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); transition: transform .25s; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .menu-toggle { display: inline-grid; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 760px) {
  .content { padding: 18px 16px 50px; }
  .topbar { padding: 10px 16px; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 14px; }
  .kpi .k-value { font-size: 1.25rem; }
  .kpi .k-ic { display: none; }
  .kpi .k-label { padding-right: 0; }
  .hero { padding: 20px; }
  .hero .hero-meta { gap: 14px; }
  .fg, .fg.w-third, .fg.w-quarter, .fg.w-twothird { grid-column: 1 / -1; }
  dl.props { grid-template-columns: 1fr; }
  .user-btn .who { display: none; }
  .search-box { max-width: none; }
  .alerts-panel { width: calc(100vw - 32px); }
  .hbar-row { grid-template-columns: 1fr auto; }
  .hbar-row .hbar-track { grid-column: 1 / -1; grid-row: 2; }
  .cal-week { grid-template-columns: 40px repeat(7, minmax(80px, 1fr)); overflow-x: auto; }
  h1 { font-size: 1.3rem; }
}

/* Lien « Signaler un problème » (assistance Sanelio) */
.sidebar-aide { color: inherit; display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px; text-decoration: underline; text-underline-offset: 3px; }

/* Œil des champs de mot de passe (demande du 03/10/2026) */
.mdp-boite { position: relative; display: block; }
.mdp-boite.mdp-ajuste { display: inline-block; max-width: 100%; }
.mdp-boite > input { padding-right: 42px !important; }
.mdp-boite > input::-ms-reveal { display: none; }
.mdp-oeil { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); width: 32px; height: 32px; padding: 0; margin: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: transparent; color: inherit; opacity: .6; cursor: pointer; }
.mdp-oeil:hover { opacity: 1; }
.mdp-oeil:focus-visible { opacity: 1; outline: 2px solid currentColor; outline-offset: 1px; }
