:root {
  --fond: #f6f5f2; --panneau: #fff; --texte: #1f1e1c; --discret: #6b6862; --ligne: #e3e0da;
  --vert: #2f7d4f; --rouge: #b3412e; --accent: #2c5d8a; --rayon: 8px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--texte); background: var(--fond);
}
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; display: flex; flex-direction: column; gap: 24px; }
a { color: var(--accent); }
h1 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.9rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 4px; }
h3 { font-size: .8rem; color: var(--discret); font-weight: 600; margin: 0 0 6px; text-transform: none; }
.discret { color: var(--discret); }
.petit { font-size: .85rem; }
.pos { color: var(--vert); } .neg { color: var(--rouge); }
.barre { display: flex; align-items: center; gap: 20px; padding: 12px 20px; background: var(--panneau); border-bottom: 1px solid var(--ligne); }
.barre a { text-decoration: none; color: var(--texte); }
.barre .marque { font-weight: 700; }
.droite { margin-left: auto; }
button, .bouton { font: inherit; background: var(--accent); color: #fff; border: 0; border-radius: var(--rayon); padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block; }
button.lien { background: none; color: var(--accent); padding: 0; }
select, input { font: inherit; padding: 7px 9px; border: 1px solid var(--ligne); border-radius: var(--rayon); background: #fff; }
label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--discret); }
.carte { background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 18px; }
.carte-fpc { border-color: var(--vert); }
.entete { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.entete p { margin: 6px 0 0; }
.synthese { max-width: 65ch; line-height: 1.5; color: var(--texte); }
.filtres { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.tuiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.gros { font-family: Georgia, serif; font-size: 1.9rem; margin: 2px 0 6px; font-variant-numeric: tabular-nums; }
.tuiles .petit { margin-top: 3px; font-variant-numeric: tabular-nums; }
.deux { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.deux ol, .deux ul { margin: 8px 0 0; padding-left: 1.3em; line-height: 1.7; font-variant-numeric: tabular-nums; }
.defile { overflow-x: auto; }
.tableau { width: 100%; border-collapse: collapse; background: var(--panneau); font-size: .85rem; font-variant-numeric: tabular-nums; }
.tableau th, .tableau td { padding: 8px 10px; border-bottom: 1px solid var(--ligne); text-align: right; white-space: nowrap; }
.tableau th:first-child, .tableau td:first-child { text-align: left; }
.tableau th { color: var(--discret); font-weight: 600; background: #faf9f7; }
.tableau tbody tr:hover { background: #faf9f7; }
.etiquette { display: inline-block; font-size: .7rem; padding: 0 6px; border: 1px solid var(--ligne); border-radius: 4px; color: var(--discret); }
.etiquette.cat-agent { background: #1f3a5f; border-color: #1f3a5f; color: #fff; font-weight: 600; }
.etiquette.cat-eurorepar { background: #e8730c; border-color: #e8730c; color: #fff; font-weight: 600; }
.etiquette.cat-mra { background: #f5c518; border-color: #f5c518; color: #3a2f00; font-weight: 600; }
.graphe { display: flex; flex-direction: column; gap: 4px; background: var(--panneau); border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 14px; }
.g-ligne { display: grid; grid-template-columns: minmax(120px, 260px) 1fr 90px; align-items: center; gap: 10px; font-size: .82rem; }
.g-lib { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-barre { width: 100%; height: 18px; }
.g-val { text-align: right; font-variant-numeric: tabular-nums; }
.g-axe { stroke: var(--ligne); stroke-width: .6; }
.g-neg { fill: var(--rouge); } .g-pos { fill: var(--vert); }
.flash { margin: 0; padding: 10px 14px; border-radius: var(--rayon); background: #eef3f8; }
.flash-ok { background: #e9f4ee; } .flash-erreur { background: #f8e9e6; color: var(--rouge); } .flash-attention { background: #fbf3e2; }
.connexion { max-width: 360px; margin: 10vh auto 0; display: flex; flex-direction: column; gap: 12px; }
.connexion form { display: flex; flex-direction: column; gap: 12px; }
.journal { list-style: none; padding: 0; margin: 0; line-height: 1.7; }
details summary { cursor: pointer; }
@media (max-width: 640px) { .g-ligne { grid-template-columns: 110px 1fr 74px; } h1 { font-size: 1.5rem; } }
.objectif h2 { margin-bottom: 12px; }
.objectif-grille { display: grid; grid-template-columns: minmax(220px, 280px) 1fr; gap: 24px; align-items: start; }
.objectif-form { display: flex; flex-direction: column; gap: 10px; }
.objectif-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 10px; }
.moyen { font-family: Georgia, serif; font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.jauge { width: 100%; height: 14px; display: block; }
.jauge-fond { fill: var(--ligne); } .jauge-ok { fill: var(--vert); } .jauge-encours { fill: var(--accent); }
.jauge-rythme { stroke: var(--texte); stroke-width: .6; }
@media (max-width: 720px) { .objectif-grille { grid-template-columns: 1fr; } }

.barre .logo { height: 40px; width: auto; display: block; }
.barre .marque { padding-left: 14px; border-left: 1px solid var(--ligne); }
.connexion .logo { width: 100%; max-width: 320px; height: auto; margin: 0 auto 4px; display: block; }
@media (max-width: 640px) { .barre .logo { height: 28px; } .barre { gap: 12px; } }
@media (max-width: 640px) { .barre .marque { display: none; } .barre { flex-wrap: wrap; row-gap: 8px; } }
#pneus h2 { margin-bottom: 12px; }
.pn-tuiles { margin-bottom: 14px; }
.pn-compare { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 16px; }
.pn-ligne { display: grid; grid-template-columns: 170px 1fr 50px; gap: 10px; align-items: center; font-size: .85rem; font-variant-numeric: tabular-nums; }
.pn-ligne b { text-align: right; }
.pn-barre { width: 100%; height: 16px; display: block; }
.pn-fond { fill: var(--fond); } .pn-n { fill: var(--accent); } .pn-n1 { fill: #b9b4ab; }
.pn-titre { margin-top: 4px; }
.pn-hist { display: flex; gap: 14px; align-items: flex-end; overflow-x: auto; padding: 6px 0; }
.pn-col { text-align: center; min-width: 54px; }
.pn-mini { width: 40px; height: 60px; display: block; margin: 0 auto 4px; }
@media (max-width: 640px) { .pn-ligne { grid-template-columns: 110px 1fr 40px; } }
button.secondaire { background: #fff; color: var(--accent); border: 1px solid var(--accent); }
.lien-suppr { background: none; color: var(--rouge); padding: 0; font-size: .8rem; }
.lien-suppr:hover { text-decoration: underline; }
button.danger { background: var(--rouge); color: #fff; }
button.danger-txt { color: var(--rouge); border-color: var(--rouge); }
.voile { position: fixed; inset: 0; background: rgba(20, 20, 18, .45); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 50; }
.dialogue { max-width: 460px; width: 100%; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.dialogue h2 { margin-bottom: 8px; }
.dialogue-choix { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.dialogue-page { margin: 8vh auto 0; }
a.bouton.secondaire { background: #fff; color: var(--accent); border: 1px solid var(--accent); text-align: center; }
a.bouton.danger-txt { color: var(--rouge); border-color: var(--rouge); }
.form-profil { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; }
.barre .qui { margin-right: 12px; }
.barre form.droite { display: flex; align-items: center; }
.tableau.gauche th, .tableau.gauche td { text-align: left; }
.societes { display: flex; gap: 4px; background: var(--fond); border: 1px solid var(--ligne); border-radius: 999px; padding: 3px; }
.societes button { background: none; color: var(--discret); border-radius: 999px; padding: 5px 12px; font-size: .85rem; }
.societes button.actif { background: var(--accent); color: #fff; }
.logos-connexion { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 6px; }
.logos-connexion img { max-width: 280px; width: 100%; height: auto; }
.cases { border: 1px solid var(--ligne); border-radius: var(--rayon); padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 14px; margin: 0; }
.cases legend { font-size: .85rem; color: var(--discret); padding: 0 4px; }
.case { flex-direction: row; align-items: center; gap: 6px; color: var(--texte); font-size: .9rem; }
.case input { width: auto; }
.societes button, .barre a, .barre .qui { white-space: nowrap; }
@media (max-width: 900px) { .barre .qui { display: none; } }
.tableau tr.total td { font-weight: 600; background: #faf9f7; }
.pile { display: flex; flex-direction: column; gap: 24px; }
.form-ligne { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 12px; }
.form-ligne label { min-width: 150px; }
.carte .tableau td:first-child, .carte .tableau td:nth-child(2) { white-space: normal; min-width: 140px; }

.recherche { display: flex; align-items: center; gap: 12px; margin: 4px 0 10px; flex-wrap: wrap; }
.recherche input { flex: 0 1 420px; min-width: 220px; padding: 8px 12px; font-size: .95rem; }
