/* Portail du siège Harington — charte : bleu #354866, texte #222B38, fond #F2F5F9, rose #C187A1, Poppins + Roboto Slab */
:root {
  --bleu: #354866; --bleu-actif: #4A5D7D; --texte: #222B38; --texte-2: #4F5B6E; --fond: #F2F5F9;
  --bord: #D5DEEA; --trait: #E7ECF3; --rose: #C187A1; --rose-texte: #9A5577; --rose-clair: #F3E7EC;
  --vert: #2E7D5B; --rouge: #B23A3A; --rayon: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fond); color: var(--texte); font-family: Poppins, system-ui, sans-serif; font-size: 15px; }
a { color: var(--bleu); } a:hover { color: var(--texte); }
h1, h2, h3 { font-weight: 600; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; } h2 { font-size: 20px; } h3 { font-size: 16px; }
.slab { font-family: "Roboto Slab", serif; }
.muted { color: var(--texte-2); }
.small { font-size: 13px; }

.app { display: flex; flex-wrap: wrap; min-height: 100vh; }
.nav { flex: 0 0 200px; width: 200px; background: var(--bleu); color: #fff; padding: 20px 10px; display: flex; flex-direction: column; gap: 18px; font-size: 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.nav .marque { padding: 0 10px; display: flex; flex-direction: column; gap: 10px; }
.nav .marque img { width: 104px; height: auto; }
.nav .marque span { font-size: 12px; color: var(--bord); }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.nav ul ul { padding-left: 10px; margin: 2px 0 6px; }
.nav a, .nav .inactif, .nav .rubrique { display: flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 8px; color: var(--trait); text-decoration: none; }
.nav .rubrique { width: 100%; background: none; border: 0; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; justify-content: space-between; text-align: left; }
.nav .rubrique:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav .groupe.actif > .rubrique { color: #fff; font-weight: 600; }
.nav .chevron { width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; flex: none; margin-left: 8px; }
.nav .rubrique[aria-expanded="true"] .chevron { transform: rotate(45deg); }
.nav ul ul a { min-height: 34px; font-size: 13px; color: var(--bord); }
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.nav a[aria-current="page"] { background: var(--bleu-actif); color: #fff; font-weight: 600; }
.nav .inactif { color: #9FAEC8; cursor: default; justify-content: space-between; }
.nav .inactif small { font-size: 10px; }
.nav .moi { margin-top: auto; padding: 0 6px; display: flex; align-items: center; gap: 10px; }
.nav .avatar { width: 36px; height: 36px; border-radius: 18px; background: #EBD6DD; color: var(--texte); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.nav .moi div { display: flex; flex-direction: column; min-width: 0; }
.nav .moi strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; }
.nav .moi button { background: none; border: 0; padding: 0; color: var(--bord); font: inherit; font-size: 12px; text-align: left; cursor: pointer; text-decoration: underline; }

main { flex: 1 1 560px; min-width: 0; padding: 32px 40px 56px; display: flex; flex-direction: column; gap: 24px; }
@media (max-width: 700px) { main { padding: 24px 16px 40px; } .nav { flex: 1 1 100%; width: auto; height: auto; position: static; } }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.entete > div:first-child { display: flex; flex-direction: column; gap: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }

.carte { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.grille { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.tuile { background: #fff; border: 1px solid var(--bord); border-radius: var(--rayon); padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.tuile .valeur { font-size: 28px; font-weight: 600; }
.tuile .cible { font-size: 13px; color: var(--texte-2); }
.colonnes { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.colonnes > * { flex: 1 1 380px; }

.barre { height: 12px; background: var(--trait); border-radius: 6px; overflow: hidden; }
.barre > span { display: block; height: 100%; background: var(--bleu); border-radius: 6px; }
.barre.petite { height: 8px; width: 100px; }
.barre .rythme { position: relative; }
.ok { color: var(--vert); } .alerte { color: var(--rose-texte); }

label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 500; }
input, select, textarea { font: inherit; font-size: 15px; color: var(--texte); border: 1px solid var(--bord); border-radius: 8px; background: #fff; }
input, select { min-height: 44px; padding: 0 12px; }
textarea { padding: 12px; font-family: "Roboto Slab", serif; font-size: 14px; resize: vertical; min-height: 88px; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--rose); outline-offset: 1px; }
input[type="number"] { max-width: 140px; }
.champs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.bouton { min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid var(--bleu); background: var(--bleu); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.bouton.secondaire { background: #fff; color: var(--bleu); }
.bouton:disabled { opacity: 0.55; cursor: not-allowed; }
.badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 10px; background: var(--trait); color: var(--bleu); }
.badge.envoye { background: #E3F1EA; color: var(--vert); }
.badge.brouillon { background: var(--rose-clair); color: var(--rose-texte); }
.status { font-size: 14px; min-height: 20px; margin: 0; }
.status.is-ok { color: var(--vert); } .status.is-error { color: var(--rouge); }
.bandeau { background: var(--rose-clair); border: 1px solid #EBD6DD; border-radius: var(--rayon); padding: 14px 18px; font-family: "Roboto Slab", serif; font-size: 14px; line-height: 1.5; }

.tableau { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: right; font-size: 12px; font-weight: 600; color: var(--texte-2); padding: 10px; border-bottom: 1px solid var(--bord); white-space: nowrap; }
td { text-align: right; padding: 11px 10px; border-bottom: 1px solid var(--trait); white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
tr.total td { font-weight: 600; border-bottom: 0; }

.connexion { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bleu); padding: 24px; }
.connexion .carte { width: 100%; max-width: 420px; }
.connexion img { width: 150px; align-self: center; }
.cache { display: none !important; }
.nav ul[hidden] { display: none; }
