/* Courtix – interface aux couleurs JG Conseils */
:root {
  --rouge: #9A1414; --rouge-f: #7A0F0F; --rouge-l: #F7E9E9;
  --texte: #1A1A1A; --t2: #3A3734; --muted: #5F5B57;
  --fond: #F6F5F3; --carte: #FFFFFF; --ligne: #E4E1DD; --ligne2: #F0EEEB;
  --ok: #1E5B33; --ok-l: #E7F1EA; --att: #7A4A06; --att-l: #FBEFD9; --info: #1D4A7A; --info-l: #E6EEF8; --off: #4A4744; --off-l: #EFEDEA;
  --r: 12px; --side: 240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--texte); font: 14px/1.5 var(--font); }
a { color: var(--rouge); text-decoration: none; }
a:hover { color: var(--rouge-f); text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 700; }
h2 { font-size: 16px; font-weight: 650; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
h3 { font-size: 14px; font-weight: 650; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.small, small { font-size: 12px; }
.center { text-align: center; }
.right { text-align: right; }
.block { display: block; }
.pre { white-space: pre-line; }
.nowrap { white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--muted); }
.err-text { color: var(--rouge) !important; }
.red { color: var(--rouge) !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ic { flex: none; vertical-align: -4px; }
[hidden] { display: none !important; }

/* ---------- Structure ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: var(--side); flex: none; background: var(--carte); border-right: 1px solid var(--ligne); display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; flex-direction: column; gap: 4px; padding: 0 8px 18px; color: var(--texte); }
.brand:hover { text-decoration: none; }
.brand img { width: 150px; height: auto; }
.brand span { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 8px 12px; border-radius: 9px; color: var(--t2); font-weight: 500; }
.nav a:hover { background: var(--fond); text-decoration: none; }
.nav a.on { background: var(--rouge-l); color: var(--rouge); font-weight: 650; }
.nav .count { margin-left: auto; background: var(--rouge); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.nav-sep { height: 1px; background: var(--ligne); margin: 10px 8px; }
.me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 6px 0; border-top: 1px solid var(--ligne); }
.me-t { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.me-t strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-t small { color: var(--muted); }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: rgba(246,245,243,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne); }
.search { flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: var(--carte); border: 1px solid var(--ligne); border-radius: 10px; padding: 0 12px; height: 44px; color: var(--muted); }
.search:focus-within { border-color: var(--rouge); box-shadow: 0 0 0 3px var(--rouge-l); }
.top .search input { border: 0; outline: 0; box-shadow: none; background: transparent; flex: 1; font: inherit; font-size: 15px; color: var(--texte); min-width: 0; min-height: 0; height: 40px; padding: 0; }
.top .btn { margin-left: auto; }
.top .menu-btn { display: none; }
.content { padding: 24px 28px 48px; display: flex; flex-direction: column; gap: 16px; max-width: 1400px; width: 100%; }
.foot { padding: 16px 28px 28px; color: var(--muted); font-size: 12px; }
.scrim { display: none; }

/* ---------- Composants ---------- */
.card { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 20px; min-width: 0; }
.card.hl { border-color: #E9C9C9; background: #FFFCFC; border-left: 4px solid var(--rouge); }
.card.accent { border-top: 4px solid var(--rouge); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.cards { gap: 16px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-head h1 { margin-top: 2px; }
.page-head p { margin: 4px 0 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.back { display: inline-block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--ligne); background: var(--carte); color: var(--texte); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #CFCAC4; color: var(--texte); }
.btn-primary { background: var(--rouge); border-color: var(--rouge); color: #fff; }
.btn-primary:hover { background: var(--rouge-f); border-color: var(--rouge-f); color: #fff; }
.btn-danger { background: #fff; border-color: var(--rouge); color: var(--rouge); }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--rouge); }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .6; cursor: wait; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--fond); color: var(--rouge); }
.link-btn { border: 0; background: none; color: var(--rouge); font: inherit; font-weight: 600; cursor: pointer; padding: 4px; display: inline-flex; align-items: center; gap: 4px; }
.chip { border: 1px solid var(--ligne); background: var(--carte); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--t2); min-height: 32px; }
.chip:hover { border-color: var(--rouge); color: var(--rouge); }

.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.b-ok { background: var(--ok-l); color: var(--ok); }
.b-attente { background: var(--att-l); color: var(--att); }
.b-info { background: var(--info-l); color: var(--info); }
.b-inactif { background: var(--off-l); color: var(--off); }
.b-neutre { background: var(--ligne2); color: var(--t2); }
.days { font-size: 12px; color: var(--muted); white-space: nowrap; }
.days.soon, .days.late { color: var(--rouge); font-weight: 700; }

.alert { padding: 12px 16px; border-radius: 10px; border: 1px solid; font-weight: 500; }
.alert.ok { background: var(--ok-l); border-color: #C6DFCD; color: var(--ok); }
.alert.err { background: var(--rouge-l); border-color: #E9C9C9; color: var(--rouge-f); }
.alert.info { background: var(--info-l); border-color: #C9D9EE; color: var(--info); }
.alert.warn { background: var(--att-l); border-color: #F0D9AE; color: var(--att); }

.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--rouge); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.avatar.sm { width: 34px; height: 34px; background: var(--rouge-l); color: var(--rouge); font-size: 12px; }
.avatar.xs { width: 26px; height: 26px; background: var(--rouge-l); color: var(--rouge); font-size: 10px; margin-right: 8px; vertical-align: middle; }

/* Tableaux */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--ligne); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--ligne2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table.small td { padding: 8px 10px; font-size: 12.5px; }
.table .ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-off td { color: var(--muted); }
.row-off td a { color: var(--muted); }
.row-warn td { background: #FFFBF3; }
.total { display: flex; justify-content: space-between; align-items: center; padding: 14px 6px 0; border-top: 1px solid var(--ligne); margin-top: 6px; }
.total strong { font-size: 18px; }

/* Listes */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ligne2); }
.list > li:last-child { border-bottom: 0; }
.list > li > div, .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list > li > div small, .grow small { color: var(--muted); }
.list li.done strong { text-decoration: line-through; color: var(--muted); }
.empty { color: var(--muted); padding: 10px 0; margin: 0; }

/* Fiches : libellé au-dessus, valeur en dessous */
.infos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.infos.cols3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-l { font-size: 12px; color: var(--muted); }
.info-v { font-weight: 550; overflow-wrap: anywhere; }
.big { display: block; font-size: 26px; font-weight: 750; letter-spacing: -0.02em; margin: 2px 0 6px; }

/* Grilles */
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--carte); border: 1px solid var(--ligne); border-radius: var(--r); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; color: var(--texte); }
a.kpi:hover { text-decoration: none; border-color: #CFCAC4; color: var(--texte); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi strong { font-size: 30px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.1; }
.kpi strong.sm { font-size: 22px; }
.kpi small { color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.contract-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.side-cards { display: flex; flex-direction: column; gap: 16px; }
.alerts-row { display: flex; gap: 12px; flex-wrap: wrap; }
.alert-card { flex: 1 1 240px; display: flex; gap: 12px; align-items: center; background: var(--att-l); border: 1px solid #F0D9AE; border-radius: var(--r); padding: 12px 16px; color: var(--att); }
.alert-card:hover { text-decoration: none; color: var(--att); filter: brightness(.98); }
.alert-card span { display: flex; flex-direction: column; }
.alert-card small { color: var(--att); opacity: .85; }
.link-card { display: flex; gap: 14px; align-items: center; color: var(--texte); }
.link-card:hover { text-decoration: none; border-color: #CFCAC4; color: var(--texte); }
.link-card .ic { color: var(--rouge); width: 22px; height: 22px; }
.link-card span { display: flex; flex-direction: column; }
.link-card small { color: var(--muted); }

.bars { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr) 90px; gap: 12px; align-items: center; }
.bar { height: 10px; background: var(--ligne2); border-radius: 5px; overflow: hidden; }
.bar div { height: 100%; background: var(--rouge); border-radius: 5px; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; color: var(--t2); }

/* En-tête client */
.client-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.client-head h1 { font-size: 24px; }

/* Onglets */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ligne); overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 600; color: var(--muted); padding: 10px 14px; min-height: 44px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.tabs button.on { color: var(--rouge); border-bottom-color: var(--rouge); }
.tabs .count { background: var(--ligne2); color: var(--t2); border-radius: 999px; font-size: 11px; padding: 0 7px; }
.tab-panel { display: flex; flex-direction: column; gap: 16px; }

.seg { display: inline-flex; background: var(--ligne2); border-radius: 10px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; align-self: flex-start; }
.seg a { padding: 8px 14px; border-radius: 8px; color: var(--t2); font-weight: 600; font-size: 13px; min-height: 36px; display: inline-flex; align-items: center; }
.seg a:hover { text-decoration: none; }
.seg a.on { background: var(--carte); color: var(--rouge); box-shadow: 0 1px 2px rgba(0,0,0,.06); }

/* Formulaires */
.form { display: flex; flex-direction: column; gap: 14px; }
.form > .card { display: flex; flex-direction: column; gap: 12px; }
.form > .card h2 { margin-bottom: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--t2); }
.field small { color: var(--muted); }
.req { color: var(--rouge); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=number], input[type=search], input:not([type]), select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--ligne); border-radius: 9px; background: #fff; font: inherit; font-size: 15px; color: var(--texte);
}
textarea { min-height: 90px; resize: vertical; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235F5B57' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--rouge); box-shadow: 0 0 0 3px var(--rouge-l); }
.code-input { font-size: 22px; letter-spacing: .3em; text-align: center; font-family: var(--mono); }
.check { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: var(--fond); border-radius: 9px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rouge); flex: none; }
.check span { display: flex; flex-direction: column; }
.check small { color: var(--muted); }
.check.small { padding: 4px 0; background: none; font-size: 12px; }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.actions { display: flex; gap: 10px; justify-content: flex-end; }
.actions.sticky { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--fond) 30%); padding: 18px 0 10px; z-index: 5; }
.danger-zone { display: flex; align-items: center; gap: 12px; padding-top: 8px; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 14px 16px; }
.filters .field { min-width: 160px; }
.filters .grow { flex: 1 1 260px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { flex: 1 1 220px; }
.mini-form select { min-height: 36px; padding: 6px 30px 6px 10px; font-size: 13px; border-radius: 999px; font-weight: 600; width: auto; }
.mini-form .sel-none, .mini-form .sel-a_contacter { background-color: var(--att-l); border-color: #F0D9AE; color: var(--att); }
.mini-form .sel-offres { background-color: var(--info-l); border-color: #C9D9EE; color: var(--info); }
.mini-form .sel-reconduit { background-color: var(--ok-l); border-color: #C6DFCD; color: var(--ok); }
.mini-form .sel-resilie { background-color: var(--off-l); color: var(--off); }

.cov-rows { display: flex; flex-direction: column; gap: 6px; }
.cov-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
.cov-row.head span { font-size: 12px; font-weight: 600; color: var(--muted); }

/* Documents */
.upload { display: flex; flex-direction: column; gap: 12px; padding-bottom: 16px; margin-bottom: 8px; border-bottom: 1px solid var(--ligne2); }
.drop { display: flex; gap: 14px; align-items: center; border: 2px dashed var(--ligne); border-radius: var(--r); padding: 18px; cursor: pointer; color: var(--muted); position: relative; }
.drop:hover { border-color: var(--rouge); color: var(--rouge); }
.drop span { display: flex; flex-direction: column; }
.drop strong { color: var(--texte); }
.drop .files { color: var(--rouge); font-weight: 600; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.doc-ic { width: 38px; height: 38px; border-radius: 9px; background: var(--rouge-l); color: var(--rouge); display: inline-flex; align-items: center; justify-content: center; flex: none; }

/* Suivi */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline > li { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--ligne2); align-items: flex-start; }
.timeline > li:last-child { border-bottom: 0; }
.tl-date { width: 84px; flex: none; font-size: 12px; color: var(--muted); padding-top: 2px; }
.timeline .grow { gap: 4px; }
.timeline p { margin: 2px 0; }
.tick { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #C9C4BE; background: #fff; cursor: pointer; flex: none; position: relative; }
.tick:hover { border-color: var(--rouge); }
.tick.on { background: var(--ok); border-color: var(--ok); }
.tick.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tasks > li { align-items: flex-start; }
.report { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.checklist { list-style: none; padding: 0; margin: 6px 0 0; display: flex; flex-direction: column; gap: 4px; }
.checklist li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mini-tick { width: 18px; height: 18px; border-radius: 5px; border: 2px solid #C9C4BE; background: #fff; cursor: pointer; padding: 0; }
.mini-tick.on { background: var(--ok); border-color: var(--ok); }

/* Sécurité */
.qr { width: 200px; max-width: 100%; padding: 8px; background: #fff; border: 1px solid var(--ligne); border-radius: 10px; }
.qr svg { display: block; width: 100%; height: auto; }
.secret { font-size: 14px; letter-spacing: .05em; word-break: break-all; }
.steps { padding-left: 18px; margin: 0 0 10px; }
.codes { columns: 2; font-family: var(--mono); font-size: 16px; font-weight: 700; padding-left: 22px; }
.codes li { margin-bottom: 6px; }
details summary { cursor: pointer; color: var(--rouge); font-weight: 600; margin: 6px 0; }

.pager { display: flex; justify-content: space-between; padding-top: 12px; }

/* ---------- Connexion ---------- */
body.auth { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: var(--carte); border: 1px solid var(--ligne); border-top: 4px solid var(--rouge); border-radius: 16px; padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.auth-card.wide { max-width: 760px; }
.auth-card h1 { font-size: 22px; }
.auth-card h2 { margin-top: 10px; }
.auth-logo { width: 200px; max-width: 70%; height: auto; margin: 0 auto 6px; display: block; }
.auth-foot { color: var(--muted); font-size: 12px; margin-top: 16px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--ligne); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: 13px; }
.checks .ok { color: var(--ok); }
.checks .ko { color: var(--rouge); font-weight: 700; }

/* ---------- Écrans moyens ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .span2, .span3 { grid-column: auto; }
  .contract-grid { grid-template-columns: minmax(0, 1fr); }
  .grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .infos.cols3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 901px) { .hide-lg { display: none; } }

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
  .side { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; box-shadow: 0 0 40px rgba(0,0,0,.15); padding-top: max(18px, env(safe-area-inset-top)); }
  body.menu-open .side { transform: none; }
  body.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 40; }
  .top .menu-btn { display: inline-flex; }
  .top { padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); }
  .hide-sm { display: none !important; }
  .content { padding: 16px 16px 40px; }
  .foot { padding: 12px 16px 24px; }
  h1 { font-size: 22px; }
  .grid2, .grid3, .kpis.three { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 16px; }
  .infos, .infos.cols3 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .bar-row { grid-template-columns: 110px minmax(0, 1fr) 70px; }
  .cov-row { grid-template-columns: minmax(0, 1fr); }
  .cov-row.head { display: none; }
  .cov-row { padding-bottom: 8px; border-bottom: 1px solid var(--ligne2); }
  .filters .field { min-width: 0; flex: 1 1 140px; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .client-head .head-actions .btn { flex: 1 1 auto; }
  .timeline > li { flex-wrap: wrap; }
  .tl-date { width: 100%; }
  .tasks > li { flex-wrap: wrap; }
  .report { width: 100%; justify-content: flex-start; padding-left: 36px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi strong { font-size: 26px; }
  .checks { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .side, .top, .foot, .actions, .btn, .icon-btn, .tabs, form { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; padding: 0; }
  body { background: #fff; }
}
