/* Rapports (disposition MonPOS : vue d'ensemble + sous-rapports) */
.rap-barre{display:flex;align-items:center;gap:var(--esp-3);flex-wrap:wrap;margin:0 0 var(--esp-3)}
.rap-barre .field{flex-direction:row;align-items:center;gap:6px;margin:0}
.rap-barre .field input{width:auto}
.rap-barre .rap-onglets{margin-left:auto}
/* Cartes : 2 rangées de 4, même hauteur, titre sur une ligne */
.rap-kpis{grid-template-columns:repeat(4,minmax(0,1fr));align-items:stretch}
.rap-kpis .kpi .lab{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rap-kpis .kpi .val{white-space:nowrap}
.rap-kpis .kpi.alerte .val{color:var(--bad)}
.rap-kpis .kpi.benef{border-color:color-mix(in srgb,var(--ok) 55%,transparent)}
.rap-kpis .kpi.benef .val{color:var(--ok)}
.rap-lien{background:none;border:0;padding:0;font:inherit;font-size:var(--t-petit);color:var(--copper);cursor:pointer;font-weight:var(--g-fort)}
.rap-lien:hover{text-decoration:underline}
.rap-delta{font-weight:var(--g-fort);font-size:var(--t-petit);white-space:nowrap}
.rap-delta.bon{color:var(--ok)}
.rap-delta.mauvais{color:var(--bad)}
/* Sur la carte cuivre : flèches et « vs … » en clair */
.kpi.hero .rap-delta,.kpi.hero .rap-delta.bon,.kpi.hero .rap-delta.mauvais{color:#fff!important}
/* Grilles de deux cartes : colonnes égales, cartes de même hauteur, tableaux jamais plus larges que leur carte */
.rap-grille{grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch}
.rap-grille.rap-haut{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr)}
.rap-grille>.panel{min-width:0}
td.rap-nom{max-width:0;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rap-grille table.mini td,.rap-grille table.mini th{white-space:nowrap}
.rap-moyens{display:flex;flex-direction:column;gap:12px;margin-top:4px}
.rap-moyens>div{display:grid;grid-template-columns:110px 1fr auto;gap:10px;align-items:center;font-size:var(--t-texte)}
.rap-moyens .gauge i{background:var(--copper)}
.rap-moyens .num{white-space:nowrap}
.rap-types{display:flex;flex-direction:column;gap:14px}
.rap-type{display:flex;flex-direction:column;gap:5px}
.rap-type .gauge i{background:var(--copper)}
.rap-sous td{background:var(--panel2);font-size:var(--t-petit);color:var(--muted)}
.rap-courbe svg{width:100%;height:auto;display:block;overflow:visible}
.rap-courbe text{font-size:11px;fill:var(--muted);font-family:var(--f-num)}
.rap-courbe .grille{stroke:var(--line);stroke-width:1}
.rap-courbe .aire{fill:var(--copper-soft);stroke:none}
.rap-courbe .trait{fill:none;stroke:var(--copper);stroke-width:2.2;stroke-linejoin:round}
.rap-courbe .point{fill:var(--copper);stroke:var(--panel);stroke-width:2}
/* Impression du rapport */
.rap-imp{font-size:12px;gap:12px}
.rap-imp .rap-imp-h{margin:8px 0 2px;font-size:13px}
.rap-imp table td,.rap-imp table th{padding:5px 8px}
.rap-imp td.r,.rap-imp th.r{text-align:right}
/* Papier toujours blanc, même en mode nuit (lignes alternées très claires, lisibles en noir et blanc) */
.rap-imp table tr td,.rap-imp table tr th{background:#ffffff!important;color:#1c2428!important}
.rap-imp table tbody tr:nth-child(even) td{background:#f3f4f5!important}
@media (max-width:1100px){.rap-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.rap-barre .rap-onglets{margin-left:0}}
@media (max-width:900px){.rap-grille,.rap-grille.rap-haut{grid-template-columns:minmax(0,1fr)}}
@media (max-width:600px){.rap-barre .seg{width:100%;overflow-x:auto}.rap-barre .field{flex:1}}
/* Téléphone (Z Fold fermé 344 px → Z Fold ouvert 690 px) : rien de coupé, rien ne défile de côté ; PC inchangé */
@media (max-width:760px){
  .rap-barre>.seg,.rap-barre .rap-onglets{width:100%;flex-wrap:wrap;overflow:visible}
  .rap-barre .seg button{flex:1 1 auto;min-height:36px}
  .rap-kpis .kpi .lab{white-space:normal;overflow:visible}
  .rap-kpis .kpi .val{white-space:normal;overflow-wrap:anywhere;font-size:1.15rem}
  .rap-moyens>div{grid-template-columns:minmax(76px,auto) minmax(40px,1fr) auto}
  .panel-h:has(>.row .seg){flex-wrap:wrap}
  .panel-h>.row:has(.seg){flex-wrap:wrap;width:100%}
  .panel-h>.row .seg button{min-height:34px}
  .rap-grille table.mini td,.rap-grille table.mini th,#vue table.mini td,#vue table.mini th{padding-left:6px;padding-right:6px}
  #vue table.mini td.rap-nom{white-space:normal;overflow-wrap:anywhere}
  #vue table.mini td .plate{white-space:nowrap}
  .rap-courbe text{font-size:11px}
}
