/* ==========================================================================
   Tik Tak PASS — DEV 1.2.99
   CSS_31_Cadran_Module_Gestion
   Autorité visuelle ciblée : GESTION > LES LIEUX et LES SHOWS.
   Ne modifie pas les autres sections GESTION ni ADMINISTRATION.
   ========================================================================== */

body.module-gestion #gestionMainTitle[hidden]{display:none !important;}

body.module-gestion #gestionMainContent.gestionLieuxMainContent{
  box-sizing:border-box !important;
  height:100% !important;
  min-height:0 !important;
  padding-top:0 !important;
  overflow:hidden !important;
}

body.module-gestion .gestionLieuxLayout{
  box-sizing:border-box;
  height:100%;
  min-height:0;
  display:grid;
  grid-template-rows:70px minmax(0,1fr) 54px;
  gap:8px;
}

body.module-gestion .gestionLieuxPane{
  box-sizing:border-box;
  min-width:0;
  min-height:0;
  border:1px solid var(--line);
  border-radius:12px;
  padding:7px 9px;
  background:rgba(255,255,255,.38);
  overflow:hidden;
}
body[data-theme="dark"].module-gestion .gestionLieuxPane{
  background:rgba(255,255,255,.018);
}

body.module-gestion .gestionLieuxPane .sectionTitle{
  margin:0 !important;
  line-height:1 !important;
  font-size:10px !important;
}

/* 2. LES LIEUX : ligne compacte ; sélecteur et 3 boutons ont exactement la même hauteur. */
body.module-gestion .gestionLieuxTopPane{
  padding:6px 9px !important;
  position:relative;
  z-index:10;
  overflow:visible !important;
}
body.module-gestion .gestionLieuxTopRow{
  display:grid;
  grid-template-columns:minmax(0,1fr) max-content;
  gap:8px;
  align-items:center;
  min-width:0;
}
body.module-gestion .gestionLieuxTopPane .sectionTitle{
  margin-bottom:8px !important;
}
body.module-gestion .gestionLieuxSearch{
  position:relative;
  min-width:0;
}
body.module-gestion .gestionLieuxSearchInput{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  height:34px !important;
  min-height:34px !important;
  border:1px solid var(--line);
  border-radius:9px !important;
  padding:4px 10px !important;
  background:var(--card);
  color:var(--ink);
  font:700 11px/1.15 Arial,sans-serif !important;
  outline:none;
}
body.module-gestion .gestionLieuxSearchInput:focus{
  border-color:var(--turq);
  box-shadow:0 0 0 2px rgba(24,167,160,.16);
}
body.module-gestion .gestionLieuxSearchList{
  position:absolute;
  z-index:50;
  left:0;right:0;top:calc(100% + 4px);
  max-height:220px;
  overflow:auto;
  padding:4px;
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--card);
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}
body.module-gestion .gestionLieuxSearchOption{
  display:block;
  width:100%;
  min-height:32px;
  border:0;
  border-radius:7px;
  padding:6px 8px;
  background:transparent;
  color:var(--ink);
  text-align:left;
  font:600 10px/1.2 Arial,sans-serif;
  cursor:pointer;
}
body.module-gestion .gestionLieuxSearchOption:hover,
body.module-gestion .gestionLieuxSearchOption.active{
  background:rgba(24,167,160,.12);
}
body.module-gestion .gestionLieuxSearchEmpty{
  padding:8px;
  font-size:10px;
  opacity:.7;
}
body.module-gestion .gestionLieuxTopActions{
  display:grid;
  grid-template-columns:repeat(4,max-content);
  gap:7px;
  align-items:center;
}
body.module-gestion .gestionLieuxTopActions .recordActionBtn{
  box-sizing:border-box;
  height:34px !important;
  min-height:34px !important;
  padding:4px 12px !important;
  font-size:9px !important;
  line-height:1 !important;
  white-space:nowrap;
}

/* 3. INFORMATIONS : 12 colonnes, trois lignes fonctionnelles.
   Ligne 1 : LIEU ID / VILLE / CODE POSTAL
   Ligne 2 : ADRESSE / NOM DU LIEU
   Ligne 3 : GPS LATITUDE / GPS LONGITUDE / CALCULER
*/
body.module-gestion .gestionLieuxInfoPane{
  display:flex;
  flex-direction:column;
}
body.module-gestion .gestionLieuxInfoHeader{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
body.module-gestion .gestionLieuxRequiredLegend{
  margin-left:auto;
  font-size:9px;
  line-height:1;
  font-weight:700;
  white-space:nowrap;
  opacity:.78;
}
body.module-gestion .gestionRequiredStar{
  font-weight:900;
}
body.module-gestion .gestionLieuInfoGrid{
  flex:1 1 auto;
  min-height:0;
  display:grid !important;
  grid-template-columns:repeat(12,minmax(0,1fr)) !important;
  grid-auto-rows:min-content;
  column-gap:10px !important;
  row-gap:12px !important;
  align-content:start;
  overflow:auto;
  padding:2px 1px 1px;
}
body.module-gestion .gestionLieuInfoGrid .editorField{
  min-width:0;
  grid-column:auto;
}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--LIEU_ID{grid-column:span 3;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--VILLE{grid-column:span 6;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--CP{grid-column:span 3;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--ADRESSE{grid-column:span 6;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--LIEU{grid-column:span 6;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--GPS_LATITUDE{grid-column:span 5;}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--GPS_LONGITUDE{grid-column:span 5;}
body.module-gestion .gestionLieuCalculateWrap{grid-column:span 2;min-width:0;display:flex;align-items:flex-end;}

body.module-gestion .gestionLieuInfoGrid .editorField label{
  margin-bottom:5px !important;
  font-size:10px !important;
  line-height:1.1 !important;
}
body.module-gestion .gestionLieuInfoGrid .editorField input,
body.module-gestion .gestionLieuInfoGrid .editorField select,
body.module-gestion .gestionLieuInfoGrid .editorField textarea{
  box-sizing:border-box;
  width:100%;
  min-width:0;
  height:44px !important;
  min-height:44px !important;
  border-radius:10px !important;
  padding:8px 11px !important;
  font-size:12px !important;
  line-height:1.2 !important;
}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--LIEU input{
  font-weight:900 !important;
}
body.module-gestion .gestionLieuInfoGrid .gestionLieuField--LIEU_ID input[readonly]{
  font-weight:800 !important;
}
body.module-gestion .gestionLieuCalculateBtn{
  box-sizing:border-box;
  width:100%;
  height:44px !important;
  min-height:44px !important;
  border-radius:10px !important;
  padding:6px 8px !important;
  font-size:9px !important;
  line-height:1 !important;
  white-space:nowrap;
}

/* Bas : aucun cadran visible. Les deux actions restent seules dans la moitié droite. */
body.module-gestion .gestionLieuxFooterPane{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  align-items:end;
  gap:10px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  padding:0 !important;
  overflow:visible !important;
}
body[data-theme="dark"].module-gestion .gestionLieuxFooterPane{
  background:transparent !important;
}
body.module-gestion .gestionLieuxFooterActions{
  grid-column:2;
  min-width:0;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:8px;
  align-items:end;
}
body.module-gestion .gestionLieuxFooterActions .recordActionBtn{
  box-sizing:border-box;
  width:100%;
  height:50px !important;
  min-height:50px !important;
  padding:7px 10px !important;
  font-size:9px !important;
  font-weight:1000 !important;
  white-space:nowrap;
  color:var(--tt-status-fg) !important;
  box-shadow:none !important;
}
body.module-gestion .gestionLieuxFooterActions .gestionLieuCancelBtn,
body[data-theme].module-gestion .gestionLieuxFooterActions .gestionLieuCancelBtn{
  background:var(--tt-status-busy-bg) !important;
  border-color:var(--tt-status-busy-border) !important;
  color:var(--tt-status-fg) !important;
}
body.module-gestion .gestionLieuxFooterActions .gestionLieuSaveBtn,
body[data-theme].module-gestion .gestionLieuxFooterActions .gestionLieuSaveBtn{
  background:var(--tt-status-ready-bg) !important;
  border-color:var(--tt-status-ready-border) !important;
  color:var(--tt-status-fg) !important;
}

/* Tablette paysage : même composition, densité resserrée. */
@media (orientation:landscape) and (min-width:900px){
  body.device-tablet.module-gestion .gestionLieuxLayout{
    grid-template-rows:62px minmax(0,1fr) 50px;
    gap:7px;
  }
  body.device-tablet.module-gestion .gestionLieuxPane{
    padding:6px 8px;
    border-radius:11px;
  }
  body.device-tablet.module-gestion .gestionLieuxPane .sectionTitle{
    font-size:9px !important;
  }
  body.device-tablet.module-gestion .gestionLieuxTopPane .sectionTitle{margin-bottom:7px !important;}
  body.device-tablet.module-gestion .gestionLieuxInfoHeader{margin-bottom:9px;}
  body.device-tablet.module-gestion .gestionLieuxRequiredLegend{font-size:8.5px;}
  body.device-tablet.module-gestion .gestionLieuxSearchInput,
  body.device-tablet.module-gestion .gestionLieuxTopActions .recordActionBtn{
    height:32px !important;
    min-height:32px !important;
    font-size:9px !important;
  }
  body.device-tablet.module-gestion .gestionLieuInfoGrid{
    column-gap:8px !important;
    row-gap:10px !important;
  }
  body.device-tablet.module-gestion .gestionLieuInfoGrid .editorField label{
    font-size:9px !important;
  }
  body.device-tablet.module-gestion .gestionLieuInfoGrid .editorField input,
  body.device-tablet.module-gestion .gestionLieuInfoGrid .editorField select,
  body.device-tablet.module-gestion .gestionLieuInfoGrid .editorField textarea,
  body.device-tablet.module-gestion .gestionLieuCalculateBtn{
    height:40px !important;
    min-height:40px !important;
    padding:6px 9px !important;
    font-size:10px !important;
  }
  body.device-tablet.module-gestion .gestionLieuCalculateBtn{font-size:8.5px !important;}
  body.device-tablet.module-gestion .gestionLieuxFooterActions .recordActionBtn{
    height:46px !important;
    min-height:46px !important;
    font-size:8.5px !important;
  }
}

/* Téléphone : empilement lisible, sans cadre inférieur. */
@media (max-width:700px){
  body.module-gestion #gestionMainContent.gestionLieuxMainContent{overflow:visible !important;height:auto !important;}
  body.module-gestion .gestionLieuxLayout{height:auto;grid-template-rows:auto auto auto;}
  body.module-gestion .gestionLieuxTopRow{grid-template-columns:1fr;}
  body.module-gestion .gestionLieuxTopActions{grid-template-columns:repeat(4,minmax(0,1fr));}
  body.module-gestion .gestionLieuInfoGrid{grid-template-columns:1fr !important;overflow:visible;}
  body.module-gestion .gestionLieuInfoGrid .editorField,
  body.module-gestion .gestionLieuCalculateWrap{grid-column:1 !important;}
  body.module-gestion .gestionLieuxFooterPane{grid-template-columns:1fr;}
  body.module-gestion .gestionLieuxFooterActions{grid-column:1;grid-template-columns:1fr 1fr;}
}


/* ==========================================================================
   GESTION > LES SHOWS — même logique visuelle validée que LES LIEUX.
   2. LES SHOWS : recherche/sélection + AJOUTER / DUPLIQUER / MODIFIER / SUPPRIMER.
   3. INFORMATIONS : 3 lignes logiques, formules de choix masquées.
   Bas : ANNULER / ENREGISTRER hors cadran, moitié droite.
   ========================================================================== */
body.module-gestion #gestionMainContent.gestionShowsMainContent{
  box-sizing:border-box !important;
  height:100% !important;
  min-height:0 !important;
  padding-top:0 !important;
  overflow:hidden !important;
}
body.module-gestion .gestionShowsLayout{
  box-sizing:border-box;height:100%;min-height:0;display:grid;
  grid-template-rows:70px minmax(0,1fr) 54px;gap:8px;
}
body.module-gestion .gestionShowsPane{
  box-sizing:border-box;min-width:0;min-height:0;border:1px solid var(--line);
  border-radius:12px;padding:7px 9px;background:rgba(255,255,255,.38);overflow:hidden;
}
body[data-theme="dark"].module-gestion .gestionShowsPane{background:rgba(255,255,255,.018);}
body.module-gestion .gestionShowsPane .sectionTitle{margin:0 !important;line-height:1 !important;font-size:10px !important;}

body.module-gestion .gestionShowsTopPane{padding:6px 9px !important;position:relative;z-index:10;overflow:visible !important;}
body.module-gestion .gestionShowsTopPane .sectionTitle{margin-bottom:8px !important;}
body.module-gestion .gestionShowsTopRow{display:grid;grid-template-columns:minmax(0,1fr) max-content;gap:8px;align-items:center;min-width:0;}
body.module-gestion .gestionShowsSearch{position:relative;min-width:0;}
body.module-gestion .gestionShowsPhoneProxy{display:none;}
body.module-gestion .gestionShowsSearchInput{
  box-sizing:border-box;width:100%;min-width:0;height:34px !important;min-height:34px !important;
  border:1px solid var(--line);border-radius:9px !important;padding:4px 10px !important;
  background:var(--card);color:var(--ink);font:700 11px/1.15 Arial,sans-serif !important;outline:none;
}
body.module-gestion .gestionShowsSearchInput:focus{border-color:var(--turq);box-shadow:0 0 0 2px rgba(24,167,160,.16);}
body.module-gestion .gestionShowsSearchList{
  position:absolute;z-index:50;left:0;right:0;top:calc(100% + 4px);max-height:240px;overflow:auto;
  padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--card);box-shadow:0 8px 22px rgba(0,0,0,.16);
}
body.module-gestion .gestionShowsSearchOption{
  display:block;width:100%;min-height:32px;border:0;border-radius:7px;padding:6px 8px;
  background:transparent;color:var(--ink);text-align:left;font:600 10px/1.2 Arial,sans-serif;cursor:pointer;
}
body.module-gestion .gestionShowsSearchOption:hover,
body.module-gestion .gestionShowsSearchOption.active{background:rgba(24,167,160,.12);}
body.module-gestion .gestionShowsSearchEmpty{padding:8px;font-size:10px;opacity:.7;}
body.module-gestion .gestionShowsTopActions{display:grid;grid-template-columns:repeat(4,max-content);gap:7px;align-items:center;}
body.module-gestion .gestionShowsTopActions .recordActionBtn{
  box-sizing:border-box;height:34px !important;min-height:34px !important;padding:4px 12px !important;
  font-size:9px !important;line-height:1 !important;white-space:nowrap;
}

body.module-gestion .gestionShowsInfoPane{display:flex;flex-direction:column;}
body.module-gestion .gestionShowsInfoHeader{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:10px;}
body.module-gestion .gestionShowInfoGrid{
  flex:1 1 auto;min-height:0;display:grid !important;grid-template-columns:repeat(12,minmax(0,1fr)) !important;
  grid-auto-rows:min-content;column-gap:10px !important;row-gap:12px !important;align-content:start;overflow:auto;padding:2px 1px 1px;
}
body.module-gestion .gestionShowInfoGrid .editorField{min-width:0;grid-column:auto;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--SHOW_ID{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--STATUT{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--DATE{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--HEURE{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--LIEU{grid-column:span 9;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--LIEU_ID{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--TARIF_SPECIAL{grid-column:span 6;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--ACTIF_RESERVATION{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--ACTIF_CAISSE{grid-column:span 3;}
body.module-gestion .gestionShowInfoGrid .editorField label{margin-bottom:5px !important;font-size:10px !important;line-height:1.1 !important;}
body.module-gestion .gestionShowInfoGrid .editorField input,
body.module-gestion .gestionShowInfoGrid .editorField select,
body.module-gestion .gestionShowInfoGrid .editorField textarea{
  box-sizing:border-box;width:100%;min-width:0;height:44px !important;min-height:44px !important;
  border-radius:10px !important;padding:8px 11px !important;font-size:12px !important;line-height:1.2 !important;
}
body.module-gestion .gestionShowInfoGrid .gestionShowField--SHOW_ID input[readonly],
body.module-gestion .gestionShowInfoGrid .gestionShowField--LIEU_ID input[readonly]{font-weight:800 !important;}
body.module-gestion .gestionShowInfoGrid .gestionShowField--LIEU select{font-weight:800 !important;}
body.module-gestion .gestionShowInfoGrid .gestionShowLieuSearchField{position:relative;}
body.module-gestion .gestionShowLieuSearch{position:relative;min-width:0;}
body.module-gestion .gestionShowLieuSearchInput{font-weight:800 !important;}
body.module-gestion .gestionShowLieuSearchInput:focus{border-color:var(--turq) !important;box-shadow:0 0 0 2px rgba(24,167,160,.16);outline:none;}
body.module-gestion .gestionShowLieuSearchList{
  position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);max-height:220px;overflow:auto;
  padding:4px;border:1px solid var(--line);border-radius:9px;background:var(--card);box-shadow:0 8px 22px rgba(0,0,0,.16);
}
body.module-gestion .gestionShowLieuSearchOption{
  display:block;width:100%;min-height:32px;border:0;border-radius:7px;padding:6px 8px;
  background:transparent;color:var(--ink);text-align:left;font:600 10px/1.2 Arial,sans-serif;cursor:pointer;
}
body.module-gestion .gestionShowLieuSearchOption:hover,
body.module-gestion .gestionShowLieuSearchOption.active{background:rgba(24,167,160,.12);}
body.module-gestion .gestionShowLieuSearchEmpty{padding:8px;font-size:10px;opacity:.7;}

body.module-gestion .gestionShowsFooterPane{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:10px;
  border:0 !important;border-radius:0 !important;background:transparent !important;padding:0 !important;overflow:visible !important;
}
body[data-theme="dark"].module-gestion .gestionShowsFooterPane{background:transparent !important;}
body.module-gestion .gestionShowsFooterActions{
  grid-column:2;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;align-items:end;
}
body.module-gestion .gestionShowsFooterActions .recordActionBtn{
  box-sizing:border-box;width:100%;height:50px !important;min-height:50px !important;padding:7px 10px !important;
  font-size:9px !important;font-weight:1000 !important;white-space:nowrap;color:var(--tt-status-fg) !important;box-shadow:none !important;
}
body.module-gestion .gestionShowsFooterActions .gestionShowCancelBtn,
body[data-theme].module-gestion .gestionShowsFooterActions .gestionShowCancelBtn{
  background:var(--tt-status-busy-bg) !important;border-color:var(--tt-status-busy-border) !important;color:var(--tt-status-fg) !important;
}
body.module-gestion .gestionShowsFooterActions .gestionShowSaveBtn,
body[data-theme].module-gestion .gestionShowsFooterActions .gestionShowSaveBtn{
  background:var(--tt-status-ready-bg) !important;border-color:var(--tt-status-ready-border) !important;color:var(--tt-status-fg) !important;
}

@media (orientation:landscape) and (min-width:900px){
  body.device-tablet.module-gestion .gestionShowsLayout{grid-template-rows:62px minmax(0,1fr) 50px;gap:7px;}
  body.device-tablet.module-gestion .gestionShowsPane{padding:6px 8px;border-radius:11px;}
  body.device-tablet.module-gestion .gestionShowsPane .sectionTitle{font-size:9px !important;}
  body.device-tablet.module-gestion .gestionShowsTopPane .sectionTitle{margin-bottom:7px !important;}
  body.device-tablet.module-gestion .gestionShowsInfoHeader{margin-bottom:9px;}
  body.device-tablet.module-gestion .gestionShowsSearchInput,
  body.device-tablet.module-gestion .gestionShowsTopActions .recordActionBtn{height:32px !important;min-height:32px !important;font-size:9px !important;}
  body.device-tablet.module-gestion .gestionShowInfoGrid{column-gap:8px !important;row-gap:10px !important;}
  body.device-tablet.module-gestion .gestionShowInfoGrid .editorField label{font-size:9px !important;}
  body.device-tablet.module-gestion .gestionShowInfoGrid .editorField input,
  body.device-tablet.module-gestion .gestionShowInfoGrid .editorField select,
  body.device-tablet.module-gestion .gestionShowInfoGrid .editorField textarea{height:40px !important;min-height:40px !important;padding:6px 9px !important;font-size:10px !important;}
  body.device-tablet.module-gestion .gestionShowsFooterActions .recordActionBtn{height:46px !important;min-height:46px !important;font-size:8.5px !important;}
}

@media (max-width:700px){
  body.module-gestion #gestionMainContent.gestionShowsMainContent{overflow:visible !important;height:auto !important;}
  body.module-gestion .gestionShowsLayout{height:auto;grid-template-rows:auto auto auto;}
  body.module-gestion .gestionShowsTopRow{grid-template-columns:1fr;}
  body.module-gestion .gestionShowsTopActions{grid-template-columns:repeat(4,minmax(0,1fr));}
  body.module-gestion .gestionShowInfoGrid{grid-template-columns:1fr !important;overflow:visible;}
  body.module-gestion .gestionShowInfoGrid .editorField{grid-column:1 !important;}
  body.module-gestion .gestionShowsFooterPane{grid-template-columns:1fr;}
  body.module-gestion .gestionShowsFooterActions{grid-column:1;grid-template-columns:1fr 1fr;}
}

body.module-gestion .gestionLieuxFooterActions .recordActionBtn:disabled,
body.module-gestion .gestionShowsFooterActions .recordActionBtn:disabled{
  background:rgba(125,133,141,.28) !important;border-color:var(--line) !important;color:var(--muted) !important;
  opacity:.72 !important;filter:grayscale(.85);cursor:default !important;
}
