:root {
  --ink: #15171C;
  --muted: #5B6170;
  --ground: #F4F5F7;
  --surface: #FFFFFF;
  --line: #E3E5EA;
  --line-soft: #ECEEF2;
  --accent: #2448C9;
  --accent-ink: #1F44B8;
  --accent-soft: #DCE4FA;
  --accent-pale: #C7D2F3;
  --warn: #C2410C;
  --warn-ink: #B4400B;
  --warn-dark: #8A3208;
  --warn-soft: #FBE3D3;
  --warn-pale: #FFF6F0;
  --warn-line: #F3C9AE;
  --side: #15171C;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: 'IBM Plex Sans', system-ui, sans-serif; font-size: 15px; line-height: 1.45; }
a { color: var(--accent); }
a:hover { color: #1A3596; }
h1, h2 { margin: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.up { color: var(--accent-ink); font-weight: 600; }
.down { color: var(--warn-ink); font-weight: 600; }
.neutre { color: var(--muted); }

/* ---- Structure ---- */
.app { display: flex; min-height: 100vh; }
.sidebar { flex: 0 0 232px; background: var(--side); color: #E8EAEE; padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; }
.sidebar a { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 8px; color: #C9CDD6; text-decoration: none; font-size: 14px; }
.sidebar a:hover { background: #20242C; color: #FFF; }
.sidebar a.active { background: #262A33; color: #FFF; font-weight: 500; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid #2F343E; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #A3A9B6; }
.sidebar-foot a { padding: 6px 0; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 8px 24px; }
.brand strong { font-size: 19px; font-weight: 700; color: #FFF; letter-spacing: -0.01em; }
.brand small { font-size: 12px; color: #A3A9B6; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #FFF; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.brand.dark small { color: var(--muted); }

.main { flex: 1; min-width: 0; padding: 28px 40px 48px; display: flex; flex-direction: column; gap: 22px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }
.eyebrow { font-size: 13px; color: var(--muted); letter-spacing: 0.04em; text-transform: uppercase; }

.filtres { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filtres label { font-size: 13px; color: var(--muted); }
select, input[type=text], input[type=email], input[type=password], input:not([type]) {
  height: 44px; padding: 0 12px; border: 1px solid #D5D8DF; border-radius: 8px; background: #FFF; font: inherit; font-size: 14px; color: var(--ink);
}
.btn { height: 44px; padding: 0 16px; border: 1px solid #D5D8DF; border-radius: 8px; background: #FFF; font: inherit; font-size: 14px; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-decoration: none; }
.btn:hover { border-color: #AEB4C0; color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #FFF; font-weight: 600; }
.btn-primary:hover { background: #1A3596; color: #FFF; }

.flash { padding: 12px 16px; border-radius: 8px; font-size: 14px; background: var(--accent-soft); }
.flash-erreur { background: var(--warn-soft); color: var(--warn-dark); }

/* ---- Cartes ---- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card h2 { font-size: 17px; font-weight: 600; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-head.pad { padding: 18px 22px; border-bottom: 1px solid var(--line-soft); }
.lien { font-size: 14px; font-weight: 500; align-self: flex-start; padding: 8px 0; }
.vide { align-items: flex-start; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }

/* Rang réseau */
.rang { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 24px; padding: 18px 22px; }
.rang-num .mono { font-size: 34px; font-weight: 600; }
.rang-num sup { font-size: 16px; color: var(--muted); }
.rang-barre { flex: 1 1 320px; display: flex; flex-direction: column; gap: 6px; }
.rang-barre .track { position: relative; height: 10px; border-radius: 5px; }
.rang-barre .fill { background: var(--accent-pale); border-radius: 5px; }
.rang-barre .mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.rang-legende { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.rang p { margin: 0; max-width: 300px; }

/* Indicateurs */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { gap: 10px; padding: 18px 20px; }
.kpi h2 { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi-val { font-size: 27px; font-weight: 600; }
.kpi-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.kpi-alerte { background: var(--warn-pale); border-color: var(--warn-line); }
.kpi-alerte h2 { color: var(--warn-dark); }

/* Barres horizontales */
.track { height: 14px; background: var(--line-soft); border-radius: 3px; overflow: visible; }
.fill { height: 100%; background: var(--accent); border-radius: 3px; }
.barres { display: grid; grid-template-columns: 120px minmax(0, 1fr) 96px 56px; gap: 10px 12px; align-items: center; font-size: 13px; }
td .track { height: 10px; }

/* Points d'attention */
.alertes { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.alertes li { display: flex; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--warn-pale); }
.alertes li.alerte-up { background: #EEF2FC; }
.alertes li div { display: flex; flex-direction: column; gap: 2px; }
.alertes strong { font-size: 14px; }
.puce { flex: 0 0 8px; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--warn); }
.alerte-up .puce { background: var(--accent); }

/* Stock */
.sparkbars { display: flex; align-items: flex-end; gap: 4px; height: 64px; }
.sparkbars div { flex: 1; background: var(--accent-pale); border-radius: 2px; min-height: 2px; }
.sparkbars div.courant { background: var(--accent); }
.mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; font-size: 13px; }
.mini dt { color: var(--muted); }
.mini dd { margin: 0; font-weight: 600; }
.colonnes { display: flex; gap: 10px; align-items: stretch; }
.col { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.col-zone { height: 220px; display: flex; align-items: flex-end; border-bottom: 1px solid #D5D8DF; padding-top: 20px; }
.col-barre { width: 100%; background: var(--accent-pale); border-radius: 4px 4px 0 0; display: flex; justify-content: center; min-height: 2px; }
.col-barre.courant { background: var(--accent); }
.col-barre span { font-size: 11px; margin-top: -18px; }
.col-label { font-size: 11px; color: var(--muted); text-align: center; }
.col-label.fort { color: var(--ink); font-weight: 600; }

/* Tableaux */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
.liste th, .liste td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.liste thead th { border-top: 0; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.liste tbody th { font-weight: 500; }
.liste .right { text-align: right; }
.w-34 { width: 34%; }

.matrice { min-width: 980px; }
.matrice thead th { background: #F7F8FA; padding: 14px 16px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; text-align: left; }
.matrice thead th.center { text-align: center; }
.matrice thead th.right { text-align: right; }
.matrice thead .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
.matrice tbody tr { border-top: 1px solid var(--line-soft); }
.matrice tbody th { padding: 12px 16px; text-align: left; font-weight: 600; }
.matrice td { padding: 6px; font-family: var(--mono); font-size: 13px; }
.matrice td.right { padding: 12px 16px; text-align: right; }
.matrice tr.total { border-top: 2px solid var(--ink); background: #F7F8FA; }
.cell { border-radius: 6px; padding: 8px; text-align: center; background: #F1F2F5; white-space: nowrap; }
.cell .ref { color: var(--muted); }
.cell.n2 { background: var(--accent); color: #FFF; }
.cell.n1 { background: var(--accent-soft); }
.cell.n-1 { background: var(--warn-soft); }
.cell.n-2 { background: var(--warn); color: #FFF; }
.cell.n2 .ref, .cell.n-2 .ref { color: #FFF; opacity: 0.85; }
.cell.nx { color: var(--muted); }

.intro { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; }
.intro p { margin: 0; max-width: 640px; }
.legende { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.legende span { display: flex; align-items: center; gap: 6px; }
.legende i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }
.legende .n2 { background: var(--accent); }
.legende .n1 { background: var(--accent-soft); }
.legende .n-1 { background: var(--warn-soft); }
.legende .n-2 { background: var(--warn); }
.legende .l-mag { height: 3px; background: var(--accent); }
.legende .l-res { height: 0; border-top: 2px dashed #8A90A0; }

.courbe { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.courbe svg { width: 100%; height: auto; }
.serie-magasin { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.serie-reseau { fill: none; stroke: #8A90A0; stroke-width: 1.5; stroke-dasharray: 5 4; }
.pt-magasin { fill: var(--accent); }
.axe { font-size: 11px; fill: var(--muted); font-family: 'IBM Plex Sans', sans-serif; }

/* Import */
.depot { align-items: stretch; }
.depot-zone { border: 2px dashed #B7BECB; border-radius: 12px; padding: 28px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; cursor: pointer; color: var(--muted); }
.depot-zone strong { color: var(--ink); }
.depot input[type=file] { font: inherit; font-size: 14px; }
.depot .btn { align-self: flex-end; }
.fichiers { margin: 0; padding: 0; list-style: none; }
.fichiers li { display: grid; grid-template-columns: 28px minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 2fr); gap: 12px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line-soft); font-size: 14px; }
.fichiers .statut { width: 22px; height: 22px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: #1A3596; }
.fichiers .st-alerte { background: var(--warn-pale); }
.fichiers .st-alerte .statut { background: var(--warn); color: #FFF; }
.fichiers .st-erreur .statut { background: #E8EAEE; color: var(--muted); }
.fichiers .resume { color: var(--muted); }
.fichiers .msg { font-size: 13px; color: var(--warn-dark); }
.actions { display: flex; justify-content: flex-end; gap: 12px; }
.badge { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); }
.badge.st-alerte { background: var(--warn-soft); }
.badge.st-erreur { background: #E8EAEE; }

/* Admin */
.cases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.cases label, fieldset label, form.inline label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; margin-right: 12px; }
.form { display: flex; flex-direction: column; gap: 6px; }
.form label { font-size: 13px; color: var(--muted); margin-top: 6px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; margin: 8px 0; padding: 8px 12px; }
.form .btn { align-self: flex-start; margin-top: 8px; }
.recherche { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.row { display: flex; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row-wrap label { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.row input { flex: 1; }

/* Connexion */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; }
.login { width: 100%; max-width: 400px; }
.login .nom-site { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.login form { display: flex; flex-direction: column; gap: 6px; }
.login label { font-size: 13px; color: var(--muted); margin-top: 8px; }
.login .btn { margin-top: 16px; justify-content: center; }

/* Tableaux compacts, primes */
.matrice.compacte { min-width: 900px; }
.matrice.compacte td { padding: 4px 6px; }
.matrice.compacte tbody th { padding: 10px 16px; white-space: nowrap; }
.matrice tr.fort { background: #FAFBFD; }
.matrice tr.fort th { color: var(--accent-ink); }
.cell.nu { background: transparent; text-align: right; padding: 8px 4px; }
td.right .cell { text-align: right; }
.w-20 { width: 14%; min-width: 90px; }
.pad { padding: 18px 22px; }
.champs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px 18px; }
.champs div { display: flex; flex-direction: column; gap: 4px; }
.champs label { font-size: 13px; font-weight: 500; }
.champs input { width: 100%; }
.saisie input, .saisie select { height: 40px; width: 100%; min-width: 90px; }
.saisie td { padding: 6px 8px; }
input[type=month] { height: 44px; padding: 0 12px; border: 1px solid #D5D8DF; border-radius: 8px; font: inherit; }

.objectifs { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.objectifs > div { display: flex; flex-direction: column; gap: 6px; }
.track.grand { height: 12px; border-radius: 6px; }
.fill-warn { background: var(--warn); }
@media (max-width: 860px) { .objectifs { grid-template-columns: 1fr; } }

/* Satisfaction */
.repartition { display: flex; height: 8px; border-radius: 4px; overflow: hidden; background: var(--line-soft); }
.r-pro { background: var(--accent); } .r-pas { background: #B7BECB; } .r-det { background: var(--warn); }
.onglets { display: flex; gap: 4px; flex-wrap: wrap; }
.onglets a { padding: 8px 12px; border-radius: 999px; font-size: 13px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); }
.onglets a.actif { background: var(--ink); color: #FFF; border-color: var(--ink); }
.verbatims { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.verbatims li { display: flex; gap: 14px; padding: 12px 14px; border-radius: 10px; background: #F7F8FA; border-left: 0; }
.verbatims li.v-det { background: var(--warn-pale); }
.verbatims p { margin: 4px 0 0; }
.v-note { flex: 0 0 36px; height: 36px; border-radius: 18px; display: flex; align-items: center; justify-content: center; font-weight: 600; background: var(--accent-soft); color: #1A3596; }
.v-det .v-note { background: var(--warn); color: #FFF; }
.v-pas .v-note { background: #E8EAEE; color: var(--ink); }

.bloc-sat { display: flex; flex-direction: column; gap: 16px; padding-top: 8px; scroll-margin-top: 16px; }
.titre-bloc { font-size: 21px; font-weight: 700; padding-bottom: 8px; border-bottom: 2px solid var(--ink); display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.sommaire { margin-bottom: -6px; }

/* Export PowerPoint */
.groupes-export { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.groupes-export fieldset { margin: 0; display: flex; flex-direction: column; gap: 2px; }
.groupes-export legend { font-weight: 600; padding: 0 4px; }
.groupes-export label { display: flex; gap: 8px; align-items: center; min-height: 34px; font-size: 14px; }
.lienbtn { background: none; border: 0; padding: 8px 2px; color: var(--accent); font: inherit; cursor: pointer; }

.bascule { display: inline-flex; padding: 3px; background: #E8EAEE; border-radius: 10px; gap: 2px; }
.bascule label { display: flex; align-items: center; min-height: 38px; padding: 0 12px; border-radius: 8px; font-size: 14px; color: var(--muted); cursor: pointer; }
.bascule label.actif { background: #FFF; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.bascule input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bascule label:focus-within { outline: 2px solid var(--accent); }

/* Plannings (inspiré de la vue Combo) */
.semaine-planning { margin-bottom: 4px; }
.planning { min-width: 1100px; font-size: 12px; table-layout: fixed; }
.planning th, .planning td { padding: 6px; border-top: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); vertical-align: top; text-align: left; }
.planning .col-nom { width: 170px; border-left: 0; }
.planning thead th { background: #F7F8FA; font-size: 13px; color: var(--muted); font-weight: 400; text-align: center; padding: 10px 4px; }
.planning thead th strong { color: var(--ink); margin-left: 4px; }
.planning thead th.auj span { display: inline-block; background: var(--ink); color: #FFF; border-radius: 999px; padding: 4px 12px; }
.planning thead th.auj strong { color: #FFF; }
.planning .hors { background: repeating-linear-gradient(135deg, #FAFAFB 0 6px, #F3F4F6 6px 12px); color: #A3A9B6; }
.planning tbody th { font-weight: 400; }
.planning .nom { display: block; font-weight: 600; color: var(--accent-ink); }
.planning .compteurs { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.creneau { display: flex; flex-direction: column; gap: 3px; padding: 5px 6px; margin-bottom: 4px; border-radius: 5px; border-left: 4px solid rgba(0,0,0,.25); }
.creneau .activite { font-size: 10.5px; font-weight: 600; letter-spacing: .01em; color: #15171C; line-height: 1.15; }
.creneau .horaire { align-self: flex-start; font-size: 11.5px; background: rgba(255,255,255,.85); border-radius: 4px; padding: 1px 6px; color: #15171C; font-variant-numeric: tabular-nums; }
/* Couleurs des postes, identiques à Combo */
.act-ouv { background: #9DC593; }
.act-fer { background: #F8A97D; }
.act-mut { background: #F66A80; }
.act-ven { background: #E8CC8A; }
.act-cui { background: #7B93F8; }
.act-adm { background: #94D9AB; }
.act-elr { background: #FD8277; }
.act-for { background: #E0B77E; }
.act-sol { background: #E1A0B6; }
.act-chome { background: #F9FB8B; }
.act-aut { background: #E3E5EA; }
/* Absences Combo */
.absence { padding: 5px 6px; margin-bottom: 4px; border-radius: 5px; font-size: 10.5px; font-weight: 600; color: #5B6170; border: 1px dashed #C5CAD3; }
.abs-repos { background: repeating-linear-gradient(135deg, #F1F2F5 0 5px, #E8EAEE 5px 10px); }
.abs-conge { background: #DCE6F7; border-color: #9FB5E6; color: #1F3A9E; }
.abs-autre { background: #F2E4E7; border-color: #DDB4BD; color: #8A3446; }
.planning tr.total th, .planning tr.total td { border-top: 2px solid var(--ink); background: #F7F8FA; font-weight: 600; text-align: center; }
.planning tr.total th { text-align: left; }
.liste tr.total-ligne th, .liste tr.total-ligne td { border-top: 2px solid var(--ink); background: #F7F8FA; }
@media print { .planning { min-width: 0; } .semaine-planning { break-inside: avoid; } }

/* ==========================================================================
   Thème « esprit enseigne » : fond gris clair, blocs blancs à angles droits,
   boutons noirs, rouge réservé à l'identité (menu actif, accents, action principale).
   Les indicateurs gardent bleu = mieux que le réseau, orange = moins bien.
   ========================================================================== */
/* Les espaces de Plus Jakarta Sans sont très étroites : séparateurs de milliers et espaces insécables dessinés par une police système */
@font-face { font-family: "Espaces"; src: local("Arial"), local("Helvetica"), local("Liberation Sans"), local("DejaVu Sans"); unicode-range: U+0020, U+00A0, U+2009, U+202F; }
:root {
  --ink: #161616;
  --text: #333333;
  --muted: #6B6B6B;
  --ground: #F5F5F5;
  --line: #E4E4E4;
  --line-soft: #EEEEEE;
  --accent: #005EE2;
  --accent-ink: #0050C2;
  --accent-soft: #DCE8FB;
  --accent-pale: #B5CDF6;
  --brand: #E21212;
  --brand-dark: #B80D0D;
  --side: #FFFFFF;
  --sans: 'Espaces', 'Plus Jakarta Sans', system-ui, sans-serif;
  --mono: var(--sans);
}
body { font-family: var(--sans); color: var(--text); }
.mono { font-variant-numeric: tabular-nums; }
a { color: var(--accent); }
a:hover { color: var(--brand); }
h1, h2, h3 { color: var(--ink); }

/* Menu : blanc, rubrique active sur fond rouge */
.sidebar { background: var(--side); color: var(--text); border-right: 1px solid var(--line); }
.sidebar a { border-radius: 0; color: var(--text); font-weight: 600; }
.sidebar a:hover { background: var(--ground); color: var(--ink); }
.sidebar a.active { background: var(--brand); color: #FFF; font-weight: 700; }
.sidebar-foot { border-top-color: var(--line); color: var(--muted); }
.sidebar-foot a { color: var(--text); font-weight: 500; }
.brand strong { color: var(--ink); font-weight: 800; letter-spacing: -0.02em; border-left: 4px solid var(--brand); padding-left: 10px; }

/* En-tête de page */
.page-head h1 { font-weight: 800; letter-spacing: -0.02em; }
.eyebrow { color: var(--brand); font-weight: 700; }

/* Blocs à angles droits */
.card { border-radius: 0; border-color: transparent; }
.card h2 { font-weight: 700; }
.card-head.pad { border-bottom-color: var(--line); }
.kpi-val { font-weight: 800; }
.kpi h2 { font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 0.03em; }
.flash, .alertes li, .cell, .badge, .legende i, .track, .fill, .rang-barre .track, .rang-barre .fill, .sparkbars div, .col-barre { border-radius: 0; }

/* Champs et boutons */
select, input[type=text], input[type=email], input[type=password], input:not([type]) { border-radius: 0; border-color: #8C8C8C; }
.btn { border-radius: 0; border-color: var(--text); color: var(--ink); font-weight: 600; }
.btn:hover { background: var(--ink); border-color: var(--ink); color: #FFF; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #FFF; font-weight: 700; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #FFF; }

/* Sélecteurs : élément actif en noir */
.bascule { border-radius: 0; background: #FFF; border: 1px solid var(--text); padding: 0; gap: 0; }
.bascule label { border-radius: 0; color: var(--text); font-weight: 600; }
.bascule label.actif { background: var(--ink); color: #FFF; box-shadow: none; }
.onglets a { border-radius: 0; border-color: var(--text); color: var(--text); font-weight: 600; background: #FFF; }
.onglets a.actif { background: var(--ink); border-color: var(--ink); color: #FFF; }

/* Planning */
.creneau { border-radius: 2px; }
.planning .nom { color: var(--ink); }
.planning thead th.auj span { background: var(--brand); border-radius: 0; }
.absence { border-radius: 2px; }

/* Connexion */
.login .nom-site { font-weight: 800; border-left: 4px solid var(--brand); padding-left: 10px; }

/* ---- Téléphone ---- */
@media (max-width: 860px) {
  .app { flex-direction: column; }
  .sidebar { flex: none; flex-direction: row; flex-wrap: wrap; padding: 10px 12px; gap: 2px; }
  .brand { padding: 0 8px 0 0; width: 100%; }
  .sidebar a { padding: 10px; font-size: 13px; }
  .sidebar-foot { display: none; }
  .main { padding: 20px 16px 40px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .barres { grid-template-columns: 90px minmax(0, 1fr) 50px; }
  .barres span.mono { display: none; }
  .fichiers li { grid-template-columns: 28px minmax(0, 1fr); }
  .fichiers .resume, .fichiers .msg { grid-column: 2; }
}

/* ---- Impression / export PDF (A4 paysage) ---- */
@page { size: A4 landscape; margin: 10mm; }
@media print {
  body { background: #FFF; font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .no-print, .lien, .flash { display: none !important; }
  .main { padding: 0; gap: 10px; }
  .page-head h1 { font-size: 20px; }
  .card { padding: 12px; border-color: #CCC; break-inside: avoid; }
  .kpis { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .kpi-val { font-size: 18px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .matrice { min-width: 0; }
  .table-wrap { overflow: visible; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Lecture AS400 des primes */
.as400 input { width: 92px; height: 36px; padding: 0 8px; }
.as400 select { height: 36px; min-width: 170px; max-width: 200px; }
.as400 tr.hors-vendeur th, .as400 tr.hors-vendeur input { color: var(--muted); }
.as400 tr.a-associer { background: #FFF6F0; }
.as400 input.a-verifier { border-color: #C2410C; background: #FFF6F0; }
.as400 tfoot th, .as400 tfoot td { padding: 8px 12px; border-top: 1px solid var(--line); }

/* Primes : origine des valeurs, colonnes calculées */
.legende-sources { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; color: var(--muted); }
.legende-sources span { display: flex; align-items: center; gap: 6px; }
.legende-sources i { width: 14px; height: 14px; display: inline-block; border: 1px solid #8C8C8C; }
.legende-sources .src-auto, .champ.src-auto input, td.src-auto input { background: #EEF4FD; }
.legende-sources .src-saisie, .champ.src-saisie input, td.src-saisie input { background: #FFF8E1; }
.champ { display: flex; flex-direction: column; gap: 4px; }
.prime-vente input { width: 92px; height: 36px; padding: 0 8px; }
.prime-vente td { vertical-align: top; }
.prime-vente .verse { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; text-align: right; }
.baremes { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.statut-primes h2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
