/* TABLETTE HD : géométrie retirée de ce fichier en DEV 1.2.155H17.
   Autorité unique : CSS_Haut_Droite_Tablette.html.
   Les styles métier/couleurs hors géométrie restent ici. */
/* ==========================================================================
   DEV 1.2.94 — CADRAN MODULE / STATISTIQUES / TABLETTE
   Autorité spécifique au contenu STATISTIQUES après les CSS communs.
   Référence visuelle : CAISSE validée.
   - BG : rayon du cadre gauche identique au MEP commun ;
   - BD : 2.SÉLECTION = 39 px comme 2.SPECTACLE CAISSE ;
   - sélection pleine largeur utile du BD ;
   - typographie/forme des champs = CAISSE ;
   - cartes générales occupent toute la hauteur restante ;
   - notes "simulations exclues" supprimées.
   ========================================================================== */

/* Les libellés supprimés ne doivent laisser aucun espace résiduel, y compris téléphone. */
.statisticsCardNote:empty,
.statisticsOfficial:empty {
  display:none !important;
  min-height:0 !important;
  margin:0 !important;
  padding:0 !important;
}

@media (orientation:landscape) and (min-width:900px) {

  /* 1. SECTION — même rayon extérieur que CAISSE / HÔTESSE. */
  body.device-tablet.module-statistics
  #statisticsScreen > .statisticsShell.ttModuleFrame > .statisticsSidebarCard.statisticsCard.ttZoneBG {
    border-radius:var(--tt-tablet-radius) !important;
  }

  /* BD — deux rangées seulement : sélection compacte puis statistiques.
     On neutralise les anciennes grid-column/grid-row 2/3/4 héritées du layout pré-MEP. */
  body.device-tablet.module-statistics
  #statisticsScreen .ttStatisticsContent.ttZoneBD {
    display:grid !important;
    grid-template-columns:minmax(0,1fr) !important;
    grid-template-rows:39px minmax(0,1fr) !important;
    column-gap:0 !important;
    row-gap:5px !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow:hidden !important;
  }

  /* 2. SÉLECTION — même épaisseur que 2. SPECTACLE de CAISSE (39 px). */
  body.device-tablet.module-statistics
  #statisticsScreen .ttStatisticsContent > .statisticsFilterCard {
    grid-column:1 !important;
    grid-row:1 !important;
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:112px minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) !important;
    align-items:center !important;
    column-gap:8px !important;
    row-gap:0 !important;
    width:100% !important;
    min-width:0 !important;
    max-width:none !important;
    height:39px !important;
    min-height:39px !important;
    max-height:39px !important;
    margin:0 !important;
    padding:6px 8px !important;
    border-radius:var(--tt-tablet-radius) !important;
    overflow:hidden !important;
  }

  body.device-tablet.module-statistics
  #statisticsScreen .statisticsFilterHeading {
    grid-column:1 !important;
    grid-row:1 !important;
    align-self:start !important;
    justify-self:start !important;
    margin:0 !important;
    padding:0 !important;
    color:var(--muted) !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:clamp(9px,.9vw,12px) !important;
    font-weight:800 !important;
    line-height:1 !important;
    letter-spacing:.7px !important;
    text-transform:uppercase !important;
    white-space:nowrap !important;
  }

  /* Une seule section de filtre est visible à la fois, dans la colonne droite. */
  body.device-tablet.module-statistics
  #statisticsScreen .statisticsFilterCard > .statisticsFilterSection:not([hidden]) {
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:center !important;
    justify-self:stretch !important;
    width:100% !important;
    min-width:0 !important;
    margin:0 !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen .statisticsFilterCard > .statisticsFilterSection[hidden] {
    display:none !important;
  }

  /* Les sous-labels et la légende du périmètre sont inutiles dans cette version compacte. */
  body.device-tablet.module-statistics #statisticsScreen .statisticsFilterCard .statisticsShowLabel,
  body.device-tablet.module-statistics #statisticsScreen .statisticsScopeCaption {
    display:none !important;
  }

  /* Champ de sélection = paramètres typographiques CAISSE. */
  body.device-tablet.module-statistics #statisticsScreen .statisticsShowSelect,
  body.device-tablet.module-statistics #statisticsScreen .statisticsShowStatic,
  body.device-tablet.module-statistics #statisticsScreen .statisticsFilterInput,
  body.device-tablet.module-statistics #statisticsScreen .statisticsPeriodStatic,
  body.device-tablet.module-statistics #statisticsScreen .statisticsGoBtn {
    box-sizing:border-box !important;
    min-width:0 !important;
    height:27px !important;
    min-height:27px !important;
    max-height:27px !important;
    margin:0 !important;
    border-radius:9px !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:clamp(10px,.95vw,14px) !important;
    font-weight:400 !important;
    font-style:normal !important;
    line-height:normal !important;
    letter-spacing:normal !important;
  }
  body.device-tablet.module-statistics #statisticsScreen .statisticsShowSelect {
    width:100% !important;
    padding:4px 34px 4px 10px !important;
  }
  body.device-tablet.module-statistics #statisticsScreen .statisticsShowStatic,
  body.device-tablet.module-statistics #statisticsScreen .statisticsPeriodStatic {
    width:100% !important;
    padding:4px 10px !important;
    align-items:center !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
  }
  body.device-tablet.module-statistics #statisticsScreen .statisticsFilterInput {
    width:100% !important;
    padding:4px 8px !important;
  }
  body.device-tablet.module-statistics #statisticsScreen .statisticsGoBtn {
    width:100% !important;
    padding:0 8px !important;
    font-weight:800 !important;
  }

  /* Paires semaine/mois/personnaliser sur une seule ligne compacte. */
  body.device-tablet.module-statistics #statisticsScreen .statisticsFilterPair {
    display:grid !important;
    align-items:center !important;
    gap:7px !important;
  }
  body.device-tablet.module-statistics #statisticsScreen #statisticsWeekFilter {
    grid-template-columns:minmax(130px,.55fr) minmax(0,1.5fr) !important;
  }
  body.device-tablet.module-statistics #statisticsScreen #statisticsMonthFilter {
    grid-template-columns:minmax(130px,.55fr) minmax(0,1.45fr) !important;
  }
  body.device-tablet.module-statistics #statisticsScreen #statisticsCustomFilter {
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) 72px !important;
  }
  body.device-tablet.module-statistics #statisticsScreen .statisticsGoWrap {
    min-width:0 !important;
  }

  /* PRÉSENCES / ENCAISSEMENTS : juste sous la sélection et jusqu'au bas disponible. */
  body.device-tablet.module-statistics
  #statisticsScreen .ttStatisticsContent > .statisticsGrid {
    grid-column:1 !important;
    grid-row:2 !important;
    box-sizing:border-box !important;
    display:grid !important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr) !important;
    grid-template-rows:minmax(0,1fr) !important;
    align-items:stretch !important;
    align-content:stretch !important;
    width:100% !important;
    height:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    margin:0 !important;
    padding:0 !important;
    gap:8px !important;
    overflow:hidden !important;
  }

  body.device-tablet.module-statistics.statistics-view-general
  #statisticsScreen .statisticsGeneralCard {
    box-sizing:border-box !important;
    height:100% !important;
    min-height:0 !important;
    margin:0 !important;
    padding:10px !important;
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
    overflow:hidden !important;
  }
  body.device-tablet.module-statistics.statistics-view-general
  #statisticsScreen .statisticsGeneralCard > .statisticsCardNote {
    display:none !important;
    min-height:0 !important;
    margin:0 !important;
  }
  body.device-tablet.module-statistics.statistics-view-general
  #statisticsScreen .statisticsGeneralCard > .statisticsTiles {
    min-height:0 !important;
    height:100% !important;
    grid-template-rows:repeat(2,minmax(0,1fr)) !important;
  }

  /* Les mentions jugées évidentes sont supprimées. */
  body.device-tablet.module-statistics #statisticsScreen #statisticsOfficial {
    display:none !important;
  }
}

/* ============================================================================
   DEV 1.2.94 — STATISTIQUES / CORRECTIF FINAL HD + SÉLECTION MULTI-SHOW
   1) HD : neutralise les anciennes règles très spécifiques de CSS_12 qui
      forçaient encore REFRESH/GÉNÉRAL/DÉTAIL en colonnes 4/5/6 et créaient
      une 6e colonne implicite, responsable du clipping symétrique de MODULES
      et DÉTAIL. Le gabarit réel est : MODULES + espace + REFRESH + GÉNÉRAL + DÉTAIL.
   2) BD : PAR SHOW reste strictement à 39 px. Pour toutes les autres sections,
      2.SÉLECTION gagne une seconde ligne réservée au résumé de périmètre.
   ============================================================================ */
@media (orientation:landscape) and (min-width:900px) {
  /* HD — sélecteurs volontairement aussi spécifiques que les anciens overrides
     de CSS_12_Statistiques afin de reprendre réellement l'autorité. */
  

  
  
  
  
  body.device-tablet.module-statistics #statisticsScreen
  .statisticsShell.ttModuleFrame #statisticsLogoutBtn {
    display:none !important;
  }

  /* PAR SHOW : hauteur compacte actuelle conservée telle quelle. */
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeShow .ttStatisticsContent.ttZoneBD {
    grid-template-rows:39px minmax(0,1fr) !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeShow .statisticsFilterCard {
    height:39px !important;
    min-height:39px !important;
    max-height:39px !important;
    grid-template-rows:minmax(0,1fr) !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeShow .statisticsScopeCaption {
    display:none !important;
  }

  /* Toutes les autres sections : une ligne supplémentaire pour le résumé.
     Le résumé commence exactement au même bord gauche que le champ de sélection. */
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeMulti .ttStatisticsContent.ttZoneBD {
    grid-template-rows:62px minmax(0,1fr) !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeMulti .statisticsFilterCard {
    height:62px !important;
    min-height:62px !important;
    max-height:62px !important;
    grid-template-columns:112px minmax(0,1fr) !important;
    grid-template-rows:27px minmax(0,1fr) !important;
    column-gap:8px !important;
    row-gap:3px !important;
    padding:6px 8px 5px !important;
    overflow:hidden !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeMulti .statisticsFilterHeading {
    grid-column:1 !important;
    grid-row:1 / span 2 !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeMulti .statisticsFilterCard > .statisticsFilterSection:not([hidden]) {
    grid-column:2 !important;
    grid-row:1 !important;
    align-self:center !important;
  }
  body.device-tablet.module-statistics
  #statisticsScreen.statisticsScopeMulti .statisticsScopeCaption {
    display:block !important;
    grid-column:2 !important;
    grid-row:2 !important;
    align-self:start !important;
    justify-self:stretch !important;
    width:100% !important;
    min-width:0 !important;
    min-height:0 !important;
    max-height:21px !important;
    margin:0 !important;
    padding:0 !important;
    color:var(--muted) !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:9px !important;
    font-weight:700 !important;
    line-height:1.15 !important;
    text-align:left !important;
    white-space:normal !important;
    overflow:hidden !important;
  }
}



/* DEV 1.2.155H — AUTORITÉ FINALE HD : ne plus écraser CSS_25 commun. */
@media (orientation:landscape) and (min-width:900px) {
  
  
  
  
  
  
  
}


/* DEV 1.2.155H2 — TOTALS PRÉSENCE / ENCAISSÉ sur la ligne de titre. */
.statisticsCardTitleRow{
  display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;
}
.statisticsCardTitleRow .statisticsCardTitle{margin-bottom:4px;min-width:0;}
.statisticsCardTotal{
  flex:0 0 auto;display:flex;align-items:baseline;gap:7px;min-height:26px;
  padding:4px 9px;border:1px solid var(--line);border-radius:10px;
  background:rgba(255,255,255,.58);color:var(--ink);font-weight:1000;white-space:nowrap;
}
.statisticsCardTotal span{font-size:10px;letter-spacing:.06em;color:var(--muted);}
.statisticsCardTotal strong{font-size:20px;line-height:1;font-weight:1000;}
.statisticsCardMoneyTotal strong{font-size:18px;}
body[data-theme="dark"] .statisticsCardTotal{background:#171f29;border-color:#394655;}
@media(max-width:700px){
  .statisticsCardTitleRow{gap:7px;}
  .statisticsCardTotal{padding:4px 7px;}
  .statisticsCardTotal strong{font-size:17px;}
  .statisticsCardMoneyTotal strong{font-size:15px;}
}

/* DEV 1.2.155H10 — TOTALS STATS : même composant et alignement vertical. */
.statisticsCardTitleRow{align-items:center!important;min-height:38px!important;margin-bottom:8px!important;}
.statisticsCardTitleRow .statisticsCardTitle{margin:0!important;display:flex!important;align-items:center!important;min-height:32px!important;}
.statisticsCardTotal,.statisticsCardMoneyTotal{
  box-sizing:border-box!important;display:grid!important;grid-template-columns:auto auto!important;align-items:center!important;justify-content:center!important;
  column-gap:8px!important;height:32px!important;min-height:32px!important;padding:4px 9px!important;border-radius:10px!important;
}
.statisticsCardTotal span,.statisticsCardTotal strong,.statisticsCardMoneyTotal span,.statisticsCardMoneyTotal strong{
  display:flex!important;align-items:center!important;height:100%!important;line-height:1!important;margin:0!important;
}
@media(max-width:700px){
  .statisticsCardTitleRow{min-height:36px!important;margin-bottom:7px!important;}
  .statisticsCardTotal,.statisticsCardMoneyTotal{height:30px!important;min-height:30px!important;padding:3px 7px!important;}
}
