/* =========================================================
   COBAT V2.1.09 — BANDEAU CHANTIER + KPI PLUS LISIBLES
   - Bandeau principal plus haut sur poste de travail.
   - Cartes KPI latérales plus lisibles à 100 %.
   - Aucun changement de structure ni de données.
   ========================================================= */

/* Base desktop : on donne davantage d'air au bandeau et aux 6 cartes KPI. */
@media (min-width:1101px){
  #v1200Shell .v12-hero-row{
    min-height:180px!important;
  }
  #v1200Shell .v12-hero,
  #v1200Shell .v12-kpi-grid{
    min-height:180px!important;
  }
  #v1200Shell .v12-kpi-grid{
    grid-template-rows:repeat(2,minmax(0,1fr))!important;
    align-content:stretch!important;
    padding:7px!important;
    gap:7px!important;
  }
  #v1200Shell .v12-kpi{
    min-height:0!important;
    height:auto!important;
    padding:7px 9px!important;
    grid-template-columns:36px minmax(0,1fr)!important;
    gap:9px!important;
  }
  #v1200Shell .v12-kpi-icon{
    width:36px!important;
    height:36px!important;
  }
  #v1200Shell .v12-kpi-icon svg{
    width:20px!important;
    height:20px!important;
  }
  #v1200Shell .v12-kpi-label{
    font-size:6.8px!important;
    line-height:1.16!important;
  }
  #v1200Shell .v12-kpi-value{
    font-size:17px!important;
    line-height:1.05!important;
    margin-top:3px!important;
  }
  #v1200Shell .v12-kpi-note{
    font-size:6.6px!important;
    line-height:1.2!important;
    margin-top:3px!important;
  }
  #v1200Shell .v12-progress-lots{
    gap:2px!important;
    margin-top:4px!important;
  }
  #v1200Shell .v12-progress-lot span{
    font-size:6.5px!important;
  }
  #v1200Shell .v12-progress-lot strong{
    font-size:11.5px!important;
  }
}

/* Écrans de bureau standards à 100 % : remplace le compactage historique à 148 px. */
@media (min-width:1101px) and (max-height:1150px){
  #v1200Shell .v12-hero-row,
  #v1200Shell .v12-hero,
  #v1200Shell .v12-kpi-grid{
    height:180px!important;
    min-height:180px!important;
    max-height:180px!important;
  }
  #v1200Shell .v12-hero-content{
    padding:14px 18px 12px!important;
  }
  #v1200Shell .v12-hero-title{
    font-size:23px!important;
  }
  #v1200Shell .v12-hero-sub{
    font-size:8.6px!important;
  }
}

/* Très faible hauteur d'écran : gain mesuré sans écraser le reste du portail. */
@media (min-width:1101px) and (max-height:720px){
  #v1200Shell .v12-hero-row,
  #v1200Shell .v12-hero,
  #v1200Shell .v12-kpi-grid{
    height:136px!important;
    min-height:136px!important;
    max-height:136px!important;
  }
  #v1200Shell .v12-hero-content{padding:9px 14px 8px!important;}
  #v1200Shell .v12-hero-title{font-size:20px!important;}
  #v1200Shell .v12-hero-sub{font-size:7.5px!important;}
  #v1200Shell .v12-kpi-grid{padding:5px!important;gap:5px!important;}
  #v1200Shell .v12-kpi{padding:4px 6px!important;grid-template-columns:31px minmax(0,1fr)!important;gap:6px!important;}
  #v1200Shell .v12-kpi-icon{width:31px!important;height:31px!important;}
  #v1200Shell .v12-kpi-icon svg{width:17px!important;height:17px!important;}
  #v1200Shell .v12-kpi-label{font-size:6px!important;}
  #v1200Shell .v12-kpi-value{font-size:15px!important;}
  #v1200Shell .v12-kpi-note{font-size:5.8px!important;}
  #v1200Shell .v12-progress-lot span{font-size:5.8px!important;}
  #v1200Shell .v12-progress-lot strong{font-size:10px!important;}
}

/* Grands écrans : le bandeau peut respirer davantage sans devenir disproportionné. */
@media (min-width:1800px) and (min-height:1151px){
  #v1200Shell .v12-hero-row,
  #v1200Shell .v12-hero,
  #v1200Shell .v12-kpi-grid{
    min-height:248px!important;
  }
  #v1200Shell .v12-kpi-label{font-size:8.6px!important;}
  #v1200Shell .v12-kpi-value{font-size:24px!important;}
  #v1200Shell .v12-kpi-note{font-size:8.2px!important;}
  #v1200Shell .v12-progress-lot span{font-size:8px!important;}
  #v1200Shell .v12-progress-lot strong{font-size:13px!important;}
}

/* Mobile / tablette : pas de forçage de hauteur. */
@media (max-width:1100px){
  #v1200Shell .v12-hero-row,
  #v1200Shell .v12-hero,
  #v1200Shell .v12-kpi-grid{
    height:auto!important;
    max-height:none!important;
  }
}

/* V2.1.45 — KPI heures d'insertion */
#v1200Shell .v12-kpi-insertion{margin-top:3px;font-size:8.5px;font-weight:800;line-height:1.2;color:#237354;white-space:normal}#v1200Shell .v12-kpi-hours .v12-kpi-note{margin-top:2px}


/* V2.1.52 — Ajustement de la taille des heures d’insertion
   La valeur reste lisible mais légèrement plus discrète sous le cumul global. */
#v1200Shell .v12-kpi-hours-content{min-width:0;display:flex;flex-direction:column;justify-content:center}
#v1200Shell .v12-kpi-hours .v12-kpi-insertion{display:flex!important;align-items:baseline;gap:4px;margin-top:3px!important;min-width:0;color:#237354!important;font-size:7.2px!important;line-height:1.08!important;white-space:nowrap!important}
#v1200Shell .v12-kpi-hours .v12-kpi-insertion span{font-weight:700;opacity:.9;flex:0 0 auto}
#v1200Shell .v12-kpi-hours .v12-kpi-insertion strong{font-size:10px!important;font-weight:900;line-height:1!important;letter-spacing:-.1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Bureau standard : valeur globale 17 px => insertion 9.8 px (57,6 %). */
@media (min-width:1101px) and (max-height:1150px){
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion{font-size:6.4px!important;margin-top:2px!important;gap:3px}
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion strong{font-size:9.8px!important}
}
/* Bureau très bas : valeur globale 15 px => insertion 8.8 px (58,7 %). */
@media (min-width:1101px) and (max-height:720px){
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion{font-size:5.9px!important}
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion strong{font-size:8.8px!important}
}
/* Grand écran : valeur globale 24 px => insertion 14 px (58,3 %). */
@media (min-width:1800px) and (min-height:1151px){
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion{font-size:9px!important}
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion strong{font-size:14px!important}
}
/* Mobile / tablette : valeur secondaire légèrement réduite. */
@media (max-width:1100px){
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion{font-size:8px!important;white-space:normal!important;flex-wrap:wrap}
  #v1200Shell .v12-kpi-hours .v12-kpi-insertion strong{font-size:12.4px!important;white-space:normal}
}
