/* L'administration : une console de travail sobre. Page blanche, rail à gauche, cartes à filet, tuiles de repères. */
:root {
	--encre: #2A1736; --texte: #5A4366; --filet: #E7DCEB; --fond: #FBF8FC; --carte: #fff;
	--prune: #3B1F4B; --corail: #FF6B4A; --safran: #FFE3A3; --lilas: #EFE8FB; --alerte: #B3261E; --bon: #1F6B4A;
	font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.45; color: var(--encre);
}
*, *::before, *::after { box-sizing: border-box }
body { margin: 0; background: var(--fond) }
[hidden] { display: none !important }
h1 { font-size: 24px; margin: 0 } h2 { font-size: 17px; margin: 0 } p { margin: 0 }
button, input, select { font: inherit; color: inherit }
button { cursor: pointer; border: 1.5px solid var(--filet); background: var(--carte); border-radius: 10px; padding: 6px 12px; font-weight: 600 }
button:hover { border-color: var(--prune) }
button.principal { background: var(--prune); color: #fff; border-color: var(--prune) }
button.danger { color: var(--alerte) }
input, select { border: 1.5px solid var(--filet); border-radius: 10px; padding: 6px 10px; background: #fff; min-height: 34px }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--corail); outline-offset: 1px }

.porte { max-width: 340px; margin: 12vh auto; background: var(--carte); border: 1.5px solid var(--filet); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 14px }
.porte label { display: flex; flex-direction: column; gap: 4px; font-weight: 600; font-size: 13px }
.porte button { background: var(--prune); color: #fff; border-color: var(--prune); padding: 10px }
.erreur { color: var(--alerte); font-weight: 600 }

.coque { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh }
.rail { background: var(--lilas); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh }
.rail__marque { font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.rail__marque span { width: 14px; height: 14px; border-radius: 50%; background: var(--corail) }
.rail__marque small { flex-basis: 100%; font-weight: 600; color: var(--texte); padding-left: 22px }
.rail__groupe { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texte); margin: 14px 8px 4px }
.rail a { display: block; padding: 7px 10px; border-radius: 10px; text-decoration: none; color: var(--encre); font-weight: 600 }
.rail a:hover { background: #fff8 } .rail a[aria-current] { background: #fff }
.rail__pied { margin-top: auto; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--texte); word-break: break-all }
.page { padding: 28px clamp(16px, 3vw, 40px) 60px; display: flex; flex-direction: column; gap: 18px; min-width: 0 }
@media (max-width: 760px) { .coque { grid-template-columns: 1fr } .rail { position: static; height: auto } }

.tete { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 10px 20px }
.tete p { color: var(--texte) }
.outils { display: flex; flex-wrap: wrap; align-items: center; gap: 8px }
.carte { background: var(--carte); border: 1.5px solid var(--filet); border-radius: 20px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0 }
.reperes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px }
.repere { border-radius: 16px; padding: 14px 16px; background: var(--lilas) }
.repere:nth-child(even) { background: var(--safran) }
.repere strong { display: block; font-size: 26px; line-height: 1.1 } .repere span { font-size: 13px; color: var(--texte) }
.repere--rouge strong { color: var(--alerte) } .repere--vert strong { color: var(--bon) }
.bandeau { border-radius: 12px; padding: 10px 14px; background: var(--safran); font-weight: 600 }
.bandeau--rouge { background: #FBE3E0; color: var(--alerte) }
.note { color: var(--texte); font-size: 13px }
.grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px }

.tableau { overflow-x: auto }
table { width: 100%; border-collapse: collapse; font-size: 14px }
th, td { text-align: left; padding: 8px 12px 8px 0; border-bottom: 1px solid var(--filet); vertical-align: top }
thead th { font-size: 12px; color: var(--texte); white-space: nowrap }
td.nombre, th.nombre { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap }
tr.total td { font-weight: 700; border-top: 2px solid var(--encre); border-bottom: 0 }
td small { display: block; color: var(--texte) }
.pastille { display: inline-block; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 700; background: var(--lilas); white-space: nowrap }
.pastille--active { background: #D9F0E4; color: var(--bon) } .pastille--attente { background: var(--safran) }
.pastille--terminee, .pastille--suspendue, .pastille--erreur { background: #FBE3E0; color: var(--alerte) }
.actions { display: flex; flex-wrap: wrap; gap: 6px }
.actions button { padding: 3px 9px; font-size: 13px }
.onglets { display: flex; gap: 4px; border-bottom: 1.5px solid var(--filet) }
.onglets button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 12px }
.onglets button[aria-selected="true"] { border-bottom-color: var(--prune) }

/* Un histogramme : une colonne par jour, la valeur en clair au survol (title) et dans le tableau voisin. */
.histo { display: flex; align-items: flex-end; gap: 2px; height: 120px; border-bottom: 1.5px solid var(--filet) }
.histo span { flex: 1; min-width: 3px; background: var(--prune); border-radius: 4px 4px 0 0; height: var(--h, 0%) }
.histo span:hover { background: var(--corail) }
.histo__axe { display: flex; justify-content: space-between; font-size: 12px; color: var(--texte) }
.barres { display: flex; flex-direction: column; gap: 8px }
.barre { display: grid; grid-template-columns: 90px minmax(0, 1fr) 110px; align-items: center; gap: 10px }
.barre i { display: block; height: 16px; border-radius: 0 4px 4px 0; background: var(--prune); width: var(--l, 0%) }
.barre--couts i { background: var(--corail) }
.barre b { text-align: right; font-variant-numeric: tabular-nums }
code { font-family: ui-monospace, monospace; font-size: 13px; overflow-wrap: anywhere }
