/* Bloc Calendrier Location — assets du bloc. États fournis, préfiltre visuel sans calcul métier. */
:root{--body-bg:#f6f0e6;--body-panel:#fff;--body-ink:#22343a;--body-muted:#6b7478;--body-line:#ded4c3;--body-accent:#0f6f78;--body-soft:#eef7f8;--body-ok:#2f6f46;--body-danger:#9b2c2c;--body-shadow:0 18px 40px rgba(34,52,58,.16)}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--body-bg)}body{padding:0;font-family:Arial,sans-serif;color:var(--body-ink)}
.gti-body-block{font-family:Arial,sans-serif;color:var(--body-ink)}.gti-body-title{margin:0;font-size:22px}.gti-location-calendar{background:var(--body-panel);border:0;border-radius:0;padding:12px;min-height:100vh}.gti-location-calendar-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px}.gti-calendar-season-label{margin:5px 0 0;color:var(--body-muted);font-size:13px}.gti-location-calendar-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.gti-location-calendar-legend{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}.gti-legend-item{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--body-line);border-radius:999px;padding:6px 10px;color:var(--body-muted);font-size:12px;font-weight:bold;background:#fff}.gti-legend-dot{width:10px;height:10px;border-radius:999px;display:inline-block}.gti-calendar-toolbar{display:flex;flex-wrap:wrap;gap:10px;align-items:end;margin:0 0 10px;padding:10px;border:1px solid var(--body-line);border-radius:14px;background:var(--body-soft)}.gti-filter-field{display:grid;gap:5px;font-size:12px;font-weight:bold;color:var(--body-muted)}.gti-filter-field-wide{min-width:250px}.gti-filter-control{min-height:36px;border:1px solid var(--body-line);border-radius:10px;padding:7px 10px;background:#fff;color:var(--body-ink);font:inherit}.gti-btn,.gti-floor-button{min-height:36px;border:1px solid var(--body-line);border-radius:999px;padding:7px 14px;font-weight:bold;cursor:pointer;background:#fff;color:var(--body-muted);font:inherit}.gti-btn-primary,.gti-floor-button.is-active{background:var(--body-accent);border-color:var(--body-accent);color:#fff}.gti-btn-secondary{border-color:var(--body-accent);color:var(--body-accent)}.gti-btn-reset{background:#fff}.gti-floor-buttons{display:flex;gap:8px;flex-wrap:wrap}.gti-location-calendar-scroll{overflow:auto;border:1px solid var(--body-line);border-radius:14px;background:#fff}.gti-location-calendar-table{width:100%;min-width:1040px;border-collapse:separate;border-spacing:0}.gti-location-calendar-table th,.gti-location-calendar-table td{border-right:1px solid var(--body-line);border-bottom:1px solid var(--body-line);padding:0;text-align:center}.gti-location-calendar-table th:last-child,.gti-location-calendar-table td:last-child{border-right:0}.gti-location-calendar-table thead th{background:var(--body-soft);padding:10px;color:var(--body-ink);font-size:12px}.gti-calendar-corner,.gti-calendar-logement{text-align:left!important;min-width:120px}.gti-calendar-logement{background:var(--body-soft);padding:10px!important;font-weight:bold}.gti-calendar-group-row th{padding:10px 12px!important;text-align:left!important;background:#fff;color:var(--body-accent);font-weight:bold}.gti-week-label{display:block;white-space:nowrap}.gti-calendar-slot{width:100%;min-width:118px;min-height:44px;border:0;padding:10px;text-align:center;font:inherit;font-size:12px;font-weight:bold;cursor:pointer;background:#fff}.gti-calendar-slot:focus-visible{outline:3px solid rgba(15,111,120,.28);outline-offset:-3px}.state-free{background:#e4f3ea;color:var(--body-ok)}.state-booked{background:#fde8e8;color:var(--body-danger)}.state-blocked{background:#edf1f2;color:var(--body-muted)}.gti-calendar-hidden{display:none!important}.gti-modal[hidden]{display:none!important}.gti-modal{position:fixed;inset:0;z-index:50;display:grid;place-items:center;padding:18px}.gti-modal-backdrop{position:absolute;inset:0;background:rgba(34,52,58,.42)}.gti-modal-panel{position:relative;width:min(460px,100%);background:#fff;border:1px solid var(--body-line);border-radius:16px;box-shadow:var(--body-shadow);padding:16px}.gti-modal-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.gti-modal-head h3{margin:0;font-size:18px}.gti-modal-close{border:1px solid var(--body-line);background:#fff;border-radius:999px;width:34px;height:34px;font-size:22px;line-height:1;cursor:pointer}.gti-season-form{display:grid;gap:12px}.gti-modal-help{margin:0;color:var(--body-muted);font-size:13px;line-height:1.4}.gti-modal-actions{display:flex;justify-content:flex-end;gap:10px}
.gti-status-prefilters{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end}
.gti-prefilter{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--body-line);border-radius:999px;padding:6px 10px;color:var(--body-muted);font-size:12px;font-weight:bold;background:#fff;cursor:pointer;font:inherit}
.gti-prefilter.is-active{border-color:var(--body-accent);color:var(--body-accent);box-shadow:0 0 0 2px rgba(15,111,120,.10)}
.state-all{background:var(--body-accent)}
.filter-free .gti-calendar-slot:not(.state-free),
.filter-booked .gti-calendar-slot:not(.state-booked),
.filter-blocked .gti-calendar-slot:not(.state-blocked){opacity:.22}
.gti-calendar-slot{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.gti-slot-state{display:block}
.gti-slot-dates{display:inline-block;border:1px solid currentColor;border-radius:999px;padding:2px 6px;font-size:10px;font-weight:bold;line-height:1.2;background:rgba(255,255,255,.55)}
@media(max-width:720px){body{padding:12px}.gti-location-calendar-head{display:grid}.gti-location-calendar-actions{justify-content:flex-start}.gti-location-calendar-legend{justify-content:flex-start}.gti-status-prefilters{justify-content:flex-start}.gti-location-calendar-table{min-width:860px}.gti-filter-field-wide{min-width:100%}}
/* Restore stable — affichage des jours loués dans la cellule, sans calcul métier. */
.gti-calendar-slot{white-space:pre-line;line-height:1.25;min-height:54px}
.state-pending{background:#fff;color:var(--body-muted)}


/* Toggle standard RISC-GTI — aligné sur le gabarit bandeau desktop */
.azm-toggle-bar{width:100%;border:0;background:transparent;color:inherit;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:0 0 14px;cursor:pointer;text-align:left}
.azm-toggle-title{min-width:0;display:flex;flex-direction:column;gap:4px}
.azm-toggle-title strong{font-size:16px;line-height:1.15;color:var(--body-ink)}
.azm-toggle-title small{font-size:13px;line-height:1.2;color:var(--body-muted)}
.azm-toggle-summary{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-left:auto;white-space:nowrap;color:var(--body-muted);font-size:12px;font-weight:bold}
.azm-toggle-icon{width:34px;height:34px;flex:0 0 34px;border:1px solid var(--body-line);border-radius:12px;background:#fff;display:grid;place-items:center;font-size:16px;font-weight:800;color:var(--body-muted)}
.azm-toggle-content{border-top:1px solid var(--body-line);padding-top:14px;background:transparent}
.azm-toggle-content.is-hidden{display:none!important}
@media(max-width:720px){.azm-toggle-bar{align-items:flex-start;flex-wrap:wrap}.azm-toggle-summary{order:3;width:100%;justify-content:flex-start}}

.gti-calendar-slot.is-selected{outline:3px solid var(--body-accent);outline-offset:2px;box-shadow:0 0 0 4px rgba(15,111,120,.14)}

/* Production UI calendrier modal compact */
.gti-calendar-close{margin-left:2px}
.azm-toggle-content{border-top:0;padding-top:0}
@media(max-width:720px){.gti-location-calendar{padding:8px}.gti-calendar-close{width:100%}}


/* UX opérationnelle réelle — conserve le moteur calendrier existant */
body{
  background:#f7f3ec;
  overflow:hidden;
}
.gti-location-calendar{
  min-height:100vh;
  padding:10px 12px 12px;
  background:#fffdf9;
}
.gti-location-calendar-head{
  position:sticky;
  top:0;
  z-index:20;
  align-items:center;
  padding:8px 4px 10px;
  margin-bottom:6px;
  background:#fffdf9;
  border-bottom:1px solid rgba(222,212,195,.75);
}
.gti-calendar-identity{
  display:grid;
  gap:2px;
  min-width:220px;
}
.gti-calendar-titleline{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--body-ink);
  font-size:17px;
  line-height:1.1;
}
.gti-calendar-icon{
  font-size:18px;
  line-height:1;
}
.gti-calendar-season-label{
  margin:0;
  font-size:12px;
}
.gti-location-calendar-actions{
  flex:1;
  justify-content:flex-end;
  gap:8px;
}
.gti-status-prefilters{
  order:1;
  gap:7px;
}
.gti-location-calendar-actions > [data-action="open-season-modal"]{
  order:0;
}
.gti-calendar-close{
  order:2;
  margin-left:10px;
  min-width:78px;
  border-color:var(--body-accent);
  background:#fff;
  color:var(--body-accent);
}
.gti-calendar-toolbar{
  position:sticky;
  top:55px;
  z-index:19;
  align-items:center;
  padding:10px 12px;
  margin-bottom:10px;
  border-radius:12px;
  background:#eef8f9;
  box-shadow:0 1px 0 rgba(0,0,0,.03);
}
.gti-filter-field span{
  font-size:11px;
  text-transform:none;
}
.gti-filter-control{
  min-height:34px;
  border-radius:10px;
}
.gti-btn,.gti-floor-button,.gti-prefilter{
  min-height:34px;
  padding:7px 13px;
}
.gti-location-calendar-scroll{
  height:calc(100vh - 128px);
  border-radius:12px;
}
.gti-location-calendar-table{
  min-width:1280px;
}
.gti-location-calendar-table thead th{
  position:sticky;
  top:0;
  z-index:10;
  background:#f0f8f9;
  font-size:12px;
  padding:9px 8px;
}
.gti-calendar-corner,
.gti-calendar-logement{
  position:sticky;
  left:0;
  z-index:11;
  box-shadow:1px 0 0 var(--body-line);
}
.gti-calendar-corner{
  background:#f0f8f9!important;
}
.gti-calendar-logement{
  min-width:128px;
  background:#eff8f9!important;
  font-size:15px;
  color:#112f39;
}
.gti-calendar-group-row th{
  position:sticky;
  left:0;
  z-index:12;
  background:#fffdf9!important;
  color:var(--body-accent);
  font-size:15px;
  border-top:1px solid var(--body-line);
}
.gti-calendar-slot{
  min-width:118px;
  min-height:50px;
  line-height:1.15;
  transition:filter .12s ease, outline .12s ease, transform .12s ease;
}
.gti-calendar-slot:hover{
  filter:saturate(1.12) contrast(1.03);
  outline:2px solid rgba(15,111,120,.22);
  outline-offset:-2px;
}
.state-free{
  background:#e6f5ec;
  color:#086b37;
}
.state-booked{
  background:#fde7e7;
  color:#a41515;
}
.state-blocked{
  background:#e2e7ea;
  color:#52626a;
}
.state-blocked::before{
  content:'⛔ ';
}
.gti-slot-state{
  font-size:12px;
}
.gti-slot-dates{
  font-size:10px;
  background:#fffdf9;
}
.gti-prefilter.is-active,
.gti-floor-button.is-active{
  background:var(--body-accent);
  color:#fff;
  border-color:var(--body-accent);
  box-shadow:none;
}
.filter-free .gti-calendar-slot:not(.state-free),
.filter-booked .gti-calendar-slot:not(.state-booked),
.filter-blocked .gti-calendar-slot:not(.state-blocked){
  opacity:.18;
  filter:grayscale(.25);
}
.gti-calendar-slot.is-selected{
  outline:3px solid var(--body-accent);
  outline-offset:-3px;
  box-shadow:inset 0 0 0 2px #fff;
}
@media(max-width:900px){
  body{overflow:auto}
  .gti-location-calendar-head,.gti-calendar-toolbar{position:static}
  .gti-location-calendar-scroll{height:auto;max-height:none}
  .gti-location-calendar-actions{justify-content:flex-start}
  .gti-calendar-close{margin-left:0}
}

/* RISC-GTI — diagonales bornes 10h corrigées
   Transition entre cellules voisines.
   Dominante réservée 80/20.
   Couleurs réelles des cellules adjacentes. */
:root{
  --gti-free-cell-bg:#e6f5ec;
  --gti-booked-cell-bg:#fde7e7;
  --gti-blocked-cell-bg:#e2e7ea;
}

.gti-calendar-slot.state-booked.is-period-start,
.gti-calendar-slot.state-booked.is-period-middle,
.gti-calendar-slot.state-booked.is-period-end,
.gti-calendar-slot.state-booked.is-period-single{
  position:relative;
  overflow:hidden;
  border-radius:0;
  background:var(--gti-booked-cell-bg)!important;
}

/* Début période : petit triangle état précédent */
.gti-calendar-slot.state-booked.is-period-start{
  background:
    linear-gradient(135deg,
      var(--gti-before-state-color,var(--gti-free-cell-bg)) 0 12%,
      var(--gti-booked-cell-bg) 12% 100%)!important;
}

/* Milieu */
.gti-calendar-slot.state-booked.is-period-middle{
  background:var(--gti-booked-cell-bg)!important;
}

/* Fin période : petit triangle état suivant */
.gti-calendar-slot.state-booked.is-period-end{
  background:
    linear-gradient(135deg,
      var(--gti-booked-cell-bg) 0 88%,
      var(--gti-after-state-color,var(--gti-free-cell-bg)) 88% 100%)!important;
}

/* Séjour contenu dans une seule cellule */
.gti-calendar-slot.state-booked.is-period-single{
  background:
    linear-gradient(135deg,
      var(--gti-before-state-color,var(--gti-free-cell-bg)) 0 10%,
      var(--gti-booked-cell-bg) 10% 90%,
      var(--gti-after-state-color,var(--gti-free-cell-bg)) 90% 100%)!important;
}

.gti-calendar-slot.state-booked.is-period-start .gti-slot-state,
.gti-calendar-slot.state-booked.is-period-middle .gti-slot-state,
.gti-calendar-slot.state-booked.is-period-end .gti-slot-state,
.gti-calendar-slot.state-booked.is-period-single .gti-slot-state,
.gti-calendar-slot.state-booked.is-period-start .gti-slot-dates,
.gti-calendar-slot.state-booked.is-period-middle .gti-slot-dates,
.gti-calendar-slot.state-booked.is-period-end .gti-slot-dates,
.gti-calendar-slot.state-booked.is-period-single .gti-slot-dates{
  position:relative;
  z-index:2;
}

@media print{
  .gti-calendar-slot.state-booked.is-period-start,
  .gti-calendar-slot.state-booked.is-period-middle,
  .gti-calendar-slot.state-booked.is-period-end,
  .gti-calendar-slot.state-booked.is-period-single{
    background:#fff!important;
    color:#000!important;
  }
}

/* RISC-GTI — contexte période affichée / impression */
.gti-calendar-print-context{
  flex:1 1 420px;
  align-self:stretch;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  flex-wrap:wrap;
  min-height:42px;
  margin:0 8px 0 18px;
  padding:8px 14px;
  border:1px solid #ded4c3;
  border-radius:10px;
  background:#fff8df;
  color:#22343a;
  font:700 13px/1.25 Arial,sans-serif;
}
.gti-calendar-print-context strong{font-size:14px;color:#0f6f78}
.gti-calendar-print-context span{color:#59676d;font-weight:700}

@media(max-width:900px){
  .gti-calendar-print-context{
    flex-basis:100%;
    margin:4px 0 0;
    justify-content:flex-start;
  }
}

@media print{
  @page{size:A4 landscape;margin:8mm}
  html,body{width:auto!important;height:auto!important;overflow:visible!important;background:#fff!important}
  .gti-location-calendar{transform:none!important;width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;padding:0!important;background:#fff!important}
  .gti-location-calendar-head{position:static!important;padding:0 0 6px!important;margin:0 0 6px!important;border-bottom:1px solid #000!important}
  .gti-location-calendar-actions,.gti-calendar-toolbar > label,.gti-calendar-toolbar > .gti-filter-field-wide,.gti-calendar-toolbar > [data-action="reset-calendar-filters"],.gti-modal,.risc-gti-calendar-debug-badge,.risc-gti-calendar-debug-panel{display:none!important}
  .gti-calendar-toolbar{display:block!important;position:static!important;top:auto!important;padding:0!important;margin:0 0 6px!important;border:0!important;background:#fff!important;box-shadow:none!important}
  .gti-calendar-print-context{display:flex!important;margin:0!important;padding:6px 8px!important;border:1px solid #000!important;border-radius:0!important;background:#fff!important;color:#000!important;page-break-after:avoid;justify-content:flex-start}
  .gti-calendar-print-context strong,.gti-calendar-print-context span{color:#000!important}
  .gti-location-calendar-scroll{height:auto!important;max-height:none!important;overflow:visible!important;border:1px solid #000!important;border-radius:0!important}
  .gti-location-calendar-table{width:100%!important;min-width:0!important;font-size:9px!important;border-collapse:collapse!important}
  .gti-location-calendar-table th,.gti-location-calendar-table td{border:1px solid #777!important}
  .gti-location-calendar-table thead th,.gti-calendar-corner,.gti-calendar-logement,.gti-calendar-group-row th{position:static!important;left:auto!important;top:auto!important;box-shadow:none!important}
  .gti-calendar-slot{min-width:0!important;min-height:30px!important;padding:3px!important;font-size:8px!important}
  .gti-slot-dates{font-size:7px!important;padding:1px 3px!important}
}

/* RISC-GTI — bouton imprimer + occupation + impression A4 semaine */
.gti-calendar-print{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-width:auto;
}

.gti-calendar-occupation-percent{
  display:inline-flex;
  align-items:center;
  width:max-content;
  margin-top:4px;
  padding:3px 8px;
  border:1px solid rgba(15,111,120,.22);
  border-radius:999px;
  background:#eef8f9;
  color:#0f6f78;
  font-size:12px;
  font-weight:800;
}

@media print{
  @page{
    size:A4 landscape;
    margin:7mm;
  }

  html,body{
    width:auto!important;
    height:auto!important;
    overflow:visible!important;
    background:#fff!important;
  }

  .gti-location-calendar{
    transform:none!important;
    width:100%!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    padding:0!important;
    background:#fff!important;
  }

  .gti-location-calendar-actions,
  .gti-calendar-toolbar > label,
  .gti-calendar-toolbar > .gti-filter-field-wide,
  .gti-calendar-toolbar > [data-action="reset-calendar-filters"],
  .gti-calendar-print,
  .gti-modal,
  .risc-gti-calendar-debug-badge,
  .risc-gti-calendar-debug-panel{
    display:none!important;
  }

  .gti-location-calendar-head{
    position:static!important;
    display:block!important;
    padding:0 0 5mm!important;
    margin:0 0 3mm!important;
    border-bottom:1px solid #000!important;
    background:#fff!important;
  }

  .gti-calendar-titleline strong{
    font-size:14pt!important;
  }

  .gti-calendar-season-label,
  .gti-calendar-occupation-percent{
    display:inline-flex!important;
    margin-right:8mm!important;
    color:#000!important;
    border:0!important;
    background:#fff!important;
    padding:0!important;
    font-size:9pt!important;
  }

  .gti-calendar-toolbar{
    display:block!important;
    position:static!important;
    top:auto!important;
    padding:0!important;
    margin:0 0 3mm!important;
    border:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }

  .gti-calendar-print-context{
    display:flex!important;
    margin:0!important;
    padding:2mm!important;
    border:1px solid #000!important;
    border-radius:0!important;
    background:#fff!important;
    color:#000!important;
    justify-content:flex-start!important;
    page-break-after:avoid;
    font-size:9pt!important;
  }

  .gti-calendar-print-context strong,
  .gti-calendar-print-context span{
    color:#000!important;
  }

  .gti-location-calendar-scroll{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    border:1px solid #000!important;
    border-radius:0!important;
  }

  .gti-location-calendar-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
    border-collapse:collapse!important;
    font-size:8pt!important;
  }

  .gti-location-calendar-table th,
  .gti-location-calendar-table td{
    border:1px solid #777!important;
    padding:0!important;
  }

  .gti-location-calendar-table thead th,
  .gti-calendar-corner,
  .gti-calendar-logement,
  .gti-calendar-group-row th{
    position:static!important;
    left:auto!important;
    top:auto!important;
    box-shadow:none!important;
  }

  .gti-calendar-corner,
  .gti-calendar-logement{
    width:22mm!important;
  }

  .gti-calendar-group-row th{
    font-size:9pt!important;
    padding:1.5mm!important;
  }

  .gti-calendar-slot{
    min-width:0!important;
    width:100%!important;
    min-height:12mm!important;
    padding:1mm!important;
    font-size:7pt!important;
  }

  .gti-slot-dates{
    font-size:6pt!important;
    padding:.5mm 1mm!important;
  }
}


/* =========================
   RISC-GTI PRINT MODE V2
   ========================= */

@media print{

  /* Impression lisible uniquement */
  body{
    background:#fff!important;
    color:#000!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }

  /* Toolbar UI masquée */
  .gti-calendar-toolbar button,
  .gti-calendar-toolbar select,
  .gti-calendar-toolbar .gti-btn,
  .gti-calendar-print,
  .risc-gti-calendar-debug-badge,
  .risc-gti-calendar-debug-panel{
    display:none!important;
  }

  /* Mode saison interdit */
  body.gti-print-season-forbidden .gti-location-calendar-table{
    display:none!important;
  }

  body.gti-print-season-forbidden::before{
    content:"Impression saison complète interdite : utiliser une vue semaine ou étage.";
    display:block;
    margin:20mm;
    padding:10mm;
    border:2px solid #000;
    font-size:18pt;
    font-weight:700;
  }

  /* Tableau */
  .gti-location-calendar-table{
    border-collapse:collapse!important;
    width:100%!important;
    table-layout:fixed!important;
  }

  .gti-location-calendar-table th,
  .gti-location-calendar-table td{
    border:1px solid #777!important;
  }

  /* Etats imprimables réels */
  .gti-calendar-slot{
    min-height:14mm!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    flex-direction:column!important;
    font-size:8pt!important;
    font-weight:700!important;
    padding:1mm!important;
  }

  /* LIBRE */
  .gti-calendar-slot.state-free{
    background:#fff!important;
    color:#006c45!important;
  }

  /* RESERVE */
  .gti-calendar-slot.state-booked{
    background:#d9d9d9!important;
    color:#000!important;
  }

  .gti-calendar-slot.state-booked .gti-slot-state{
    font-weight:800!important;
    font-size:9pt!important;
  }

  /* BLOQUE */
  .gti-calendar-slot.state-blocked{
    background:
      repeating-linear-gradient(
        -45deg,
        #e5e5e5,
        #e5e5e5 4px,
        #cfcfcf 4px,
        #cfcfcf 8px
      )!important;
    color:#000!important;
  }

  /* SUPPRESSION DIAGONALES */
  .gti-calendar-slot.is-period-start,
  .gti-calendar-slot.is-period-middle,
  .gti-calendar-slot.is-period-end,
  .gti-calendar-slot.is-period-single{
    background:#d9d9d9!important;
  }

  /* Bornes séjour papier */
  .gti-calendar-slot.is-period-start .gti-slot-state::before{
    content:"▶ ";
    font-weight:900;
  }

  .gti-calendar-slot.is-period-end .gti-slot-state::after{
    content:" ◀";
    font-weight:900;
  }

  /* Dates */
  .gti-slot-dates{
    font-size:6.5pt!important;
    border:1px solid #666!important;
    background:#fff!important;
    color:#000!important;
    border-radius:10px!important;
    padding:.5mm 1.5mm!important;
    margin-top:1mm!important;
  }

  /* Bandeau période */
  .gti-calendar-print-context{
    border:2px solid #000!important;
    background:#f3f3f3!important;
    color:#000!important;
    padding:3mm!important;
    margin-bottom:3mm!important;
    font-size:10pt!important;
    font-weight:700!important;
  }

  /* Occupation */
  .gti-calendar-occupation-percent{
    border:1px solid #000!important;
    background:#fff!important;
    color:#000!important;
    font-weight:800!important;
  }

}


/* =========================================
   RISC-GTI PRINT COMPACT A4 SINGLE PAGE
   ========================================= */

@media print{

  @page{
    size:A4 landscape;
    margin:4mm;
  }

  html,body{
    margin:0!important;
    padding:0!important;
  }

  .gti-location-calendar{
    padding:0!important;
  }

  /* Bandeau haut compact */
  .gti-location-calendar-head{
    margin:0 0 2mm!important;
    padding:0 0 1.5mm!important;
  }

  .gti-calendar-titleline strong{
    font-size:12pt!important;
    line-height:1!important;
  }

  .gti-calendar-season-label,
  .gti-calendar-occupation-percent{
    font-size:7pt!important;
    line-height:1!important;
    margin:0 4mm 0 0!important;
  }

  .gti-calendar-print-context{
    padding:1.2mm 2mm!important;
    margin:0 0 2mm!important;
    font-size:7pt!important;
    line-height:1!important;
  }

  /* Tableau ultra compact */
  .gti-location-calendar-table{
    table-layout:fixed!important;
    font-size:6pt!important;
  }

  .gti-location-calendar-table th,
  .gti-location-calendar-table td{
    padding:0!important;
  }

  /* colonne logement */
  .gti-calendar-corner,
  .gti-calendar-logement{
    width:16mm!important;
    min-width:16mm!important;
    max-width:16mm!important;
    font-size:6.5pt!important;
  }

  /* headers jours */
  .gti-location-calendar-table thead th{
    height:5mm!important;
    font-size:6pt!important;
    line-height:1!important;
    font-weight:700!important;
  }

  /* ligne étage */
  .gti-calendar-group-row th{
    height:4mm!important;
    min-height:4mm!important;
    padding:0 1mm!important;
    font-size:6pt!important;
    line-height:1!important;
    background:#f0f0f0!important;
  }

  /* cellules */
  .gti-calendar-slot{
    min-height:8mm!important;
    height:8mm!important;
    padding:.4mm!important;
    gap:.2mm!important;
    line-height:1!important;
    font-size:6pt!important;
  }

  /* texte statut */
  .gti-slot-state{
    font-size:6pt!important;
    font-weight:800!important;
    line-height:1!important;
  }

  /* badge dates */
  .gti-slot-dates{
    margin-top:.4mm!important;
    padding:0 .8mm!important;
    font-size:5pt!important;
    line-height:1!important;
    border-radius:5px!important;
    white-space:nowrap!important;
  }

  /* réserver compact */
  .gti-calendar-slot.state-booked .gti-slot-state{
    font-size:6pt!important;
  }

  /* bloqué compact */
  .gti-calendar-slot.state-blocked{
    background:
      repeating-linear-gradient(
        -45deg,
        #ececec,
        #ececec 2px,
        #d6d6d6 2px,
        #d6d6d6 4px
      )!important;
  }

  /* éviter coupures */
  tr,td,th{
    page-break-inside:avoid!important;
  }

}

/* RISC-GTI CALENDRIER — DEBUG TECHNIQUE PLUGIN */
.risc-gti-calendar-debug-badge{position:fixed;right:14px;bottom:14px;z-index:99999;width:44px;height:44px;border-radius:999px;border:2px solid #8b8f95;background:#fff;color:#1f2d34;font:700 12px/1 Arial,sans-serif;box-shadow:0 8px 24px rgba(0,0,0,.20);cursor:pointer}
.risc-gti-calendar-debug-badge.is-ok{border-color:#18834f;color:#18834f}
.risc-gti-calendar-debug-badge.is-warn{border-color:#c47a00;color:#9a5d00}
.risc-gti-calendar-debug-badge.is-ko{border-color:#b42318;color:#b42318}
.risc-gti-calendar-debug-badge.is-open{box-shadow:0 0 0 4px rgba(15,111,120,.22),0 8px 24px rgba(0,0,0,.20)}
.risc-gti-calendar-debug-panel{position:fixed;right:14px;bottom:68px;z-index:99999;width:min(520px,calc(100vw - 28px));max-height:min(640px,calc(100vh - 96px));overflow:auto;border:1px solid #d8d2c6;border-radius:16px;background:#fffdf9;color:#22343a;box-shadow:0 18px 60px rgba(0,0,0,.28);font-family:Arial,sans-serif}
.risc-gti-calendar-debug-head{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #ded4c3;background:#fffdf9}
.risc-gti-calendar-debug-head strong{font-size:15px}.risc-gti-calendar-debug-head button{width:30px;height:30px;border:1px solid #ded4c3;border-radius:999px;background:#fff;cursor:pointer;font-size:18px;line-height:1}
.risc-gti-calendar-debug-status{padding:10px 14px;border-bottom:1px solid #eee5d8;font-weight:700;color:#4b5b62}
.risc-gti-calendar-debug-list{display:grid;gap:8px;padding:10px 14px}
.risc-gti-calendar-debug-item{border:1px solid #ded4c3;border-radius:10px;background:#fff;overflow:hidden}
.risc-gti-calendar-debug-item summary{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:9px 10px;cursor:pointer;font-size:13px}
.risc-gti-calendar-debug-item.is-ok summary b{color:#18834f}.risc-gti-calendar-debug-item.is-ko summary b{color:#b42318}
.risc-gti-calendar-debug-item pre{margin:0;padding:10px;border-top:1px solid #eee5d8;max-height:210px;overflow:auto;background:#f8f5ef;font-size:11px;line-height:1.35;white-space:pre-wrap}
.risc-gti-calendar-debug-actions{position:sticky;bottom:0;display:flex;gap:8px;justify-content:flex-end;padding:12px 14px;border-top:1px solid #ded4c3;background:#fffdf9}
.risc-gti-calendar-debug-actions button{min-height:34px;border:1px solid #0f6f78;border-radius:999px;background:#fff;color:#0f6f78;padding:7px 12px;font-weight:700;cursor:pointer}


/* =========================================
   RISC-GTI DEBUG SCOPED MODALE CALENDRIER
   ========================================= */

/* Neutralise ancien bandeau global */
.risc-gti-debug-bar,
.risc-gti-debug-toolbar,
.risc-gti-debug-header{
  display:none!important;
}

/* Badge DBG attaché à la modale calendrier */
.gti-location-calendar{
  position:relative;
}

.gti-location-calendar .risc-gti-calendar-debug-badge{
  position:absolute!important;
  right:14px!important;
  bottom:14px!important;
  z-index:5000!important;
  width:52px!important;
  height:52px!important;
  border-radius:999px!important;
  border:2px solid #8f979d!important;
  background:#ffffff!important;
  color:#202830!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  font-size:14px!important;
  font-weight:900!important;
  cursor:pointer!important;
  box-shadow:0 6px 18px rgba(0,0,0,.18)!important;
}

/* panneau debug docké dans la modale */
.gti-location-calendar .risc-gti-calendar-debug-panel{
  position:absolute!important;
  inset:72px 14px 72px 14px!important;
  z-index:4999!important;
  border-radius:16px!important;
  border:1px solid rgba(15,111,120,.22)!important;
  background:#0f1720!important;
  color:#d7e0ea!important;
  overflow:auto!important;
  box-shadow:0 12px 40px rgba(0,0,0,.35)!important;
}

/* overlay limité à la modale */
.gti-location-calendar .risc-gti-calendar-debug-overlay{
  position:absolute!important;
  inset:0!important;
  z-index:4998!important;
  background:rgba(0,0,0,.28)!important;
  border-radius:22px!important;
}

/* debug header */
.gti-location-calendar .risc-gti-calendar-debug-panel-header{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  padding:12px 14px!important;
  background:#13202b!important;
  border-bottom:1px solid rgba(255,255,255,.08)!important;
}

/* empêcher débordement hors modale */
body .risc-gti-calendar-debug-panel{
  max-width:none!important;
}

/* print */
@media print{
  .risc-gti-calendar-debug-badge,
  .risc-gti-calendar-debug-panel,
  .risc-gti-calendar-debug-overlay{
    display:none!important;
  }
}


/* DEBUG SCOPED — PAGE DEBUGUÉE : CALENDRIER */
.gti-calendar-debug-scope[hidden] {
  display: none !important;
}

.gti-calendar-debug-scope {
  margin: 10px 0;
  border: 2px solid rgba(15,111,120,.35);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(34,52,58,.16);
}

.gti-calendar-debug-scope__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: #0f6f78;
  color: #fff;
  font-size: 13px;
}

.gti-calendar-debug-scope__head strong {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  padding: 4px 8px;
  letter-spacing: .04em;
}

.gti-calendar-debug-scope__head span {
  font-weight: 800;
  text-transform: uppercase;
}

.gti-calendar-debug-scope__head button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.gti-calendar-debug-scope__body {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
}

.gti-calendar-debug-line {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.gti-calendar-debug-line b {
  color: #22343a;
}

.gti-calendar-debug-line span {
  min-width: 0;
  overflow-wrap: anywhere;
  border-radius: 8px;
  padding: 5px 8px;
  background: #eef7f8;
  color: #22343a;
}

.gti-calendar-debug-line span.is-ok {
  background: #e8f6ed;
  color: #17643a;
  font-weight: 800;
}

.gti-calendar-debug-line span.is-ko {
  background: #fde8e8;
  color: #9b2c2c;
  font-weight: 800;
}

.gti-calendar-debug-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gti-calendar-debug-actions button {
  border: 1px solid var(--body-line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  color: var(--body-accent);
}

.gti-calendar-debug-scope pre {
  max-height: 240px;
  overflow: auto;
  margin: 0;
  border-radius: 12px;
  padding: 10px;
  background: #172126;
  color: #eaf7f8;
  font: 11px/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media print {
  .gti-calendar-debug-scope {
    display: none !important;
  }
}
