/* 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. */
/* ============================================================================
   TABLETTE — DEV 1.2.5
   4 ZONES COMMUNES : HG / BG / HD / BD
   HG et BG partagent --tt-tablet-left-width.
   HG et HD partagent --tt-tablet-top-height.
   Modifier ces variables ici modifie TOUS les modules tablette.
   ============================================================================ */
@media (orientation:landscape) and (min-width:900px) {
  body.device-tablet {
    --tt-tablet-edge:8px;
    --tt-tablet-footer-height:20px;
    --tt-tablet-frame-padding:6px;
    --tt-tablet-zone-gap:7px;
    --tt-tablet-left-width:clamp(215px,17.5vw,260px);
    --tt-tablet-top-height:clamp(68px,10vh,84px);
    --tt-tablet-status-width:clamp(112px,10.5vw,142px);
    --tt-tablet-radius:12px;
    --tt-tablet-zone0-pad-v:5px;
    --tt-tablet-zone0-pad-h:8px;
    --tt-tablet-zone0-gap:6px;
    --tt-tablet-left-button-min-h:44px;
    --tt-tablet-left-button-gap:7px;
  }

  html,body { width:100%; height:100%; overflow:hidden; }
  body.device-tablet { height:100dvh; }

  /* Cadre général : les quatre zones sont enfermées dans UNE grille commune. */
  body.device-tablet .ttModuleFrame {
    position:fixed !important;
    top:var(--tt-tablet-edge) !important;
    left:var(--tt-tablet-edge) !important;
    right:var(--tt-tablet-edge) !important;
    bottom:calc(var(--tt-tablet-footer-height) + 4px) !important;
    width:auto !important;
    height:auto !important;
    max-width:none !important;
    margin:0 !important;
    padding:var(--tt-tablet-frame-padding) !important;
    border:1px solid rgba(122,138,154,.45) !important;
    border-radius:14px !important;
    background:transparent !important;
    box-shadow:none !important;
    /* DEV 1.2.14 : la grille racine et la visibilité du module actif
       appartiennent exclusivement à CSS_23_MEP_MOD_01. */
    overflow:hidden !important;
  }

  body.device-tablet .ttZoneHG { grid-area:hg !important; }
  body.device-tablet .ttZoneBG { grid-area:bg !important; }
  body.device-tablet .ttZoneHD { grid-area:hd !important; }
  body.device-tablet .ttZoneBD { grid-area:bd !important; }

  /* HG : même bloc titre dans tous les modules. */
  body.device-tablet .ttZoneHG {
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    padding:8px 10px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    align-items:flex-start !important;
    overflow:hidden !important;
  }
  body.device-tablet .ttZoneHG .ttTitleBrand {
    font-size:clamp(19px,1.8vw,24px) !important;
    line-height:1.02 !important;
  }
  body.device-tablet .ttZoneHG .moduleHeaderSubRow,
  body.device-tablet .ttZoneHG .hostessBrandSubRow,
  body.device-tablet .ttZoneHG .workspaceBrandSubRow,
  body.device-tablet .ttZoneHG .statisticsBrandSubRow {
    display:flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:6px !important;
    width:100% !important;
    margin:6px 0 0 !important;
    padding:0 !important;
  }
  body.device-tablet .ttZoneHG .ttTitleModule {
    font-size:clamp(9px,.9vw,12px) !important;
    line-height:1 !important;
    color:var(--muted) !important;
    letter-spacing:.055em !important;
  }
  body.device-tablet .ttZoneHG .ttTitleEnv {
    min-width:34px !important;
    height:18px !important;
    padding:0 7px !important;
    border:1px solid #e38d84 !important;
    background:#fff0ee !important;
    color:#a62219 !important;
    font-size:8px !important;
  }
  body[data-theme="dark"].device-tablet .ttZoneHG .ttTitleEnv {
    background:#3b2020 !important;
    color:#ffaaa3 !important;
    border-color:#7b4141 !important;
  }

  /* BG : même largeur que HG par construction + boutons communs. */
  body.device-tablet .ttZoneBG {
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    overflow:hidden !important;
  }
  body.device-tablet .ttZoneBG .modeGrid,
  body.device-tablet .ttZoneBG .hostessSidebar,
  body.device-tablet .ttZoneBG .workspaceSidebar,
  body.device-tablet .ttZoneBG .statisticsSidebar {
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:var(--tt-tablet-left-button-gap) !important;
    width:100% !important;
  }
  body.device-tablet .ttZoneBG .ttLeftMenuButton {
    width:100% !important;
    min-height:var(--tt-tablet-left-button-min-h) !important;
    margin:0 !important;
    flex:0 0 auto !important;
  }

  /* HD : une zone unique composée du cadran 0 + statut. */
  
  
  
  
  
  
  
  
  
  body.device-tablet .ttZone0 .statisticsTitleWrap { display:none !important; }

  

  /* BD : contenu spécifique, mais zone commune et sans scroll de page. */
  body.device-tablet .ttZoneBD {
    width:100% !important;
    height:auto !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  /* DEV 1.2.68 — la mise en page interne du cadran module CAISSE (BD)
     n'appartient plus au CSS commun. Autorité déplacée vers
     CSS_27_Cadran_Module_Caisse.html. */
  body.device-tablet .ttCaisseContent > .card,
  body.device-tablet .ttZoneBG.card { margin-bottom:0 !important; }

  /* HÔTESSE : show puis contenu principal dans BD. */
  body.device-tablet .ttHostessContent {
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) !important;
    gap:5px !important;
  }
  body.device-tablet .ttHostessContent > .hostessShowCard { margin:0 !important; }
  body.device-tablet .ttHostessContent > .hostessMain { min-height:0 !important; overflow:hidden !important; }

  /* STATS : filtre puis cartes. */
  body.device-tablet .ttStatisticsContent {
    display:grid !important;
    grid-template-rows:auto minmax(0,1fr) auto auto !important;
    gap:5px !important;
  }
  body.device-tablet .ttStatisticsContent > .statisticsShowCard { margin:0 !important; }
  body.device-tablet .ttStatisticsContent > .statisticsGrid { min-height:0 !important; overflow:hidden !important; }

  /* ADMIN / GESTION : le grand contenu prend toute la zone BD. */
  body.device-tablet .ttWorkspaceContent {
    width:100% !important;
    height:100% !important;
    margin:0 !important;
    overflow:hidden !important;
  }

  /* Footer tablette : une ligne réservée hors du cadre principal. */
  body.device-tablet > .kalaFooter,
  body.device-tablet .moduleKalaFooter {
    position:fixed !important;
    left:var(--tt-tablet-edge) !important;
    right:var(--tt-tablet-edge) !important;
    bottom:2px !important;
    width:auto !important;
    height:var(--tt-tablet-footer-height) !important;
    min-height:var(--tt-tablet-footer-height) !important;
    margin:0 !important;
    padding:0 4px !important;
    font-size:10px !important;
    line-height:1 !important;
    z-index:100 !important;
  }
  body.device-tablet.module-selection > .kalaFooter { display:none !important; }
}
