/* =========================
   BASE
========================= */

@media (max-width: 768px){

  /* On laisse la page scroller naturellement */
  html, body{
    height: auto;
    overflow-y: auto;
  }

  /* Sur mobile, surtout pas d'absolu : ça coupe la hauteur */
  #calendrier{
    position: relative !important;
    top: auto !important;
    left: auto !important;

    width: 100% !important;
    min-width: 0 !important;

    height: auto !important;
    overflow: visible !important;
  }

  /* Si ton layout desktop est en colonnes/flex, on neutralise */
  .container{
    display: block !important;
    height: auto !important;
  }

  .column, .column1, .column2{
    height: auto !important;
    overflow: visible !important;
  }

  /* Ton flux mobile */
  .calendar-mobile{
    height: auto !important;
    overflow: visible !important;
    padding-bottom: 30px; /* un peu d'air en bas */
  }
}

/* =========================
   CALENDRIER DESKTOP
========================= */

/* #calendrier {
  position: relative;
  width: 100%;
  background-color: #f2f2f2;
} */

/* TABLE */

#calendrier table {
  width: 100%;
  border-collapse: collapse;
}

#calendrier th,
#calendrier td {
  border: 1px solid #ccc;
  text-align: center;
  padding: 5px;
  position: relative;
  white-space: nowrap;
}

#calendrier td {
  cursor: pointer;
}

/* =========================
   NAVIGATION MOIS (DESKTOP)
========================= */

.nav-mois {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.moisannee {
  font-size: 2em;
  text-align: center;
  width: 100%;
}

/* Boutons flèches */

.nav-btn {
  width: 60px;
  height: 60px;
  border: 3px solid #000;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn i {
  font-size: 42px;
  color: #000;
}

.nav-btn:hover {
  background: #000;
}

.nav-btn:hover i {
  color: #00aa00;
}

/* =========================
   CELLULES / GÎTES
========================= */

.defaut {
  background-color: #2876b6;
  color: #ffffff;
  margin: 2px;
  padding: 2px;
  text-align: left;
  letter-spacing: 2px;
  text-indent: 3px;
}

.theday {
  font-size: 2em;
  color: #ffffff !important;
  background-color: #000 !important;
  text-align: center !important;
}

/* Couleurs gîtes */

.gabizos { background-color: #773a3a; color: #fff; }
.viscos  { background-color: #3a776f; color: #fff; }
.hautacam{ background-color: #674b9b; color: #fff; }
.rue     { background-color: #2876b6; color: #fff; }

/* =========================
   VERSION MOBILE
========================= */

@media (max-width: 768px) {

  /* IMPORTANT : autorise sticky */
  #calendrier {
    overflow: visible;
  }

  /* NAVIGATION MOBILE STICKY */
  .nav-mois.mobile {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #f2f2f2;
    padding: 8px;
    border-bottom: 2px solid #ccc;
  }

  /* CONTENEUR MOBILE */
  .calendar-mobile {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 10px;
  }

  /* CARTE JOUR */
  .day-card {
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    padding: 10px;
  }

  .day-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 1.1em;
    margin-bottom: 8px;
    text-transform: capitalize;
  }

  .day-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  /* GÎTES MOBILE */
  .day-body .defaut {
    font-size: 0.9em;
    border-radius: 4px;
  }

  /* NAV BTN MOBILE LÉGÈREMENT PLUS PETITS */
  .nav-btn {
    width: 52px;
    height: 52px;
  }

  .nav-btn i {
    font-size: 34px;
  }
}

/* =========================
   DIVERS (inchangé)
========================= */

.liste-sans-puces {
  list-style-type: none;
}

.centrer {
  text-align: center;
}



.small {
    font-size: 1.2rem;
}


@media (max-width: 768px){

  /* le scroll doit être celui du navigateur */
  html, body{
    height: auto !important;
    overflow-y: auto !important;
  }

  /* le parent ne doit pas limiter la hauteur */
  #main{
    height: auto !important;
    overflow: visible !important;
    display: block !important;
  }

  /* le calendrier doit rester dans le flux (sinon ça coupe) */
  #calendrier{
    position: relative !important;
    top: auto !important;
    left: auto !important;

    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* ton flux mobile doit pouvoir grandir */
  .calendar-mobile{
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 80px; /* marge de confort pour la fin de mois */
  }
}
