/* =====================================================================
   Cockpit des interventions de l'agence (Components/CockpitAgence.razor), vue
   « Interventions » du tableau de bord du chef de centre (2026-10-12).
   Les tuiles reprennent les classes cc-kpi / cc-panel du tableau de bord (style inline de
   ChefCentre.razor) ; ici seulement ce qui est propre au cockpit (préfixe ca-) et le
   commutateur de vue (cc-vue).
   ===================================================================== */

.cc-vue { display: inline-flex; gap: .35rem; padding: .25rem; border-radius: 12px; background: #f3f0ef; }
.cc-vue .cc-mois-btn { display: inline-flex; align-items: center; gap: .4rem; border-color: transparent; background: transparent; }
.cc-vue .cc-mois-btn--active { background: #C61E26; border-color: #C61E26; color: #fff; }

.ca { display: flex; flex-direction: column; gap: 1.25rem; }
.ca-tete { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.ca-titre { margin: .15rem 0 .25rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; }
.ca-sous { margin: 0; color: var(--c-muted, #6b7280); font-size: .9rem; }

.ca-kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
a.ca-kpi { text-decoration: none; color: inherit; }
.ca-kpi--alerte { border-color: #C61E26 !important; background: #fff5f5 !important; }
.ca-kpi--alerte .cc-kpi__value { color: #C61E26; }
.ca-kpi__icon--vert { background: #e6f6f1 !important; color: #1fa38a !important; }
.ca-kpi__icon--rouge { background: #fde8e9 !important; color: #C61E26 !important; }
.ca-kpi__n1 { font-size: .8rem; font-weight: 500; color: var(--c-muted, #6b7280); }
.ca-kpi--annee .cc-kpi__value, .ca-kpi--objectif .cc-kpi__value { display: flex; align-items: baseline; gap: .35rem; flex-wrap: wrap; }
/* Tuile « Objectif CA » (2026-10-19) : barre de progression vers l objectif de la direction. */
.ca-objectif__piste { height: 6px; margin: .35rem 0 .25rem; border-radius: 999px; background: #eef0f4; overflow: hidden; }
.ca-objectif__piste > span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #C61E26, #ff6b6b); transition: width .6s ease; }
.ca-kpi--atteint .ca-objectif__piste > span { background: #16a34a; }
.ca-kpi--atteint .cc-kpi__value { color: #15803d; }

.ca-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.ca-panel { padding: 1rem 1.15rem; }
.ca-panel--jour { grid-row: span 2; }
.ca-panel--alerte { border-color: #f3b2b6 !important; }
.ca-panel__tete { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .6rem; }
.ca-panel__tete h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.ca-lien { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 600; color: #C61E26; text-decoration: none; white-space: nowrap; }
.ca-lien:hover { text-decoration: underline; }
.ca-vide { margin: .25rem 0 0; color: var(--c-muted, #6b7280); font-size: .88rem; }
.ca-note { margin: .6rem 0 0; color: var(--c-muted, #6b7280); font-size: .78rem; }

/* Aujourd'hui par technicien */
.ca-techs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ca-tech { padding: .55rem .7rem; border: 1px solid var(--c-border, #e5e7eb); border-radius: 10px; background: #fff; }
.ca-tech__tete { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.ca-tech__nom { font-weight: 600; }
.ca-tech__meta { color: var(--c-muted, #6b7280); font-size: .8rem; }
.ca-tech__resume { margin-left: auto; color: var(--c-muted, #6b7280); font-size: .8rem; white-space: nowrap; }
.ca-tech__rien { margin-top: .3rem; color: var(--c-muted, #6b7280); font-size: .82rem; font-style: italic; }
.ca-presence { width: 9px; height: 9px; border-radius: 50%; background: #cfd4da; flex: none; }
.ca-presence--active { background: #1fa38a; box-shadow: 0 0 0 3px rgba(31, 163, 138, .18); }
.ca-occ { list-style: none; margin: .4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.ca-occ__ligne { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; align-items: center; gap: .6rem; padding: .25rem .4rem; border-radius: 6px; font-size: .84rem; color: inherit; text-decoration: none; }
.ca-occ__ligne:hover { background: #f6f2f1; }
.ca-occ__client { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-occ__plus { color: var(--c-muted, #6b7280); font-size: .8rem; padding-left: .4rem; }

/* Listes à traiter */
.ca-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .25rem; }
.ca-liste__ligne { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: .15rem .7rem; padding: .4rem .5rem; border-radius: 8px; color: inherit; text-decoration: none; border-left: 3px solid transparent; }
.ca-liste__ligne:hover { background: #f6f2f1; }
.ca-liste__ligne--urgent { border-left-color: #C61E26; }
.ca-liste__num { font-weight: 600; font-size: .84rem; }
.ca-liste__client { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-liste__meta { grid-column: 1 / -1; color: var(--c-muted, #6b7280); font-size: .78rem; }

/* Ce mois, état par état */
.ca-barres { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.ca-barre { display: grid; grid-template-columns: 150px minmax(0, 1fr) 40px; align-items: center; gap: .6rem; font-size: .86rem; }
.ca-barre__lib { color: inherit; text-decoration: none; }
.ca-barre__lib:hover { color: #C61E26; }
.ca-barre__piste { height: 10px; border-radius: 999px; background: #f0ecea; overflow: hidden; }
.ca-barre__rempli { display: block; height: 100%; border-radius: 999px; background: var(--df-st-couleur, #C61E26); }
.ca-barre__nb { text-align: right; font-weight: 700; }

@media (max-width: 991.98px) {
    .ca-grille { grid-template-columns: 1fr; }
    .ca-panel--jour { grid-row: auto; }
    .ca-tech__resume { margin-left: 0; width: 100%; }
}
