/* front/assets/style/availability-calendar.css */
/* Calendrier front — style inspiré de ton contact.css (scopé, ne casse rien ailleurs) */

.front-availability{
  width: 910px;
  max-width: 100%;
  margin: 10px auto 80px;
  padding: 22px 22px 18px;

  background-color: #4c4c30;
  border-radius: 10px;

  box-shadow: rgba(50, 50, 93, 0.25) 0 50px 100px -20px,
              rgba(0, 0, 0, 0.3) 0 30px 60px -30px,
              rgba(10, 37, 64, 0.35) 0 -2px 6px 0 inset;
}

.front-availability h2{
  margin: 0 0 14px;
  font-size: 22px;
  text-align: center;
  color: #f4decb;
  font-family: "Montserrat Alternates", sans-serif;
  letter-spacing: .2px;
}

/* Header mois + nav */
.front-cal-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}

.front-cal-month{
  flex: 1;
  text-align: center;

  padding: 10px 16px;
  border-radius: 10px;

  background: #e7d4c7;
  color: #4c4c30;

  font-family: "Montserrat Alternates", sans-serif;
  font-size: 16px;
  font-weight: 600;
}

/* Boutons façon ton submit (mais plus discret) */
.front-cal-nav{
  width: 48px;
  height: 44px;
  border: none;
  border-radius: 999px;

  background: #ca5900;
  color: #fff;

  cursor: pointer;
  font-size: 18px;
  line-height: 44px;

  box-shadow: 0 10px 22px rgba(0,0,0,.22);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.front-cal-nav:hover{
  background: #e06c09;
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0,0,0,.26);
}

/* Jours de semaine */
.front-cal-weekdays{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;

  font-family: "Montserrat Alternates", sans-serif;
  font-size: 12px;
  color: #f4decb;
  opacity: .95;
}
.front-cal-weekdays div{
  text-align: center;
  padding: 6px 0;
}

/* Grille */
.front-cal-grid{
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

/* Cellule jour */
.front-cal-day{
  border-radius: 10px;
  padding: 10px 10px 12px;
  background: rgba(231, 212, 199, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.10);
  position: relative;

  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 86px;

  /* IMPORTANT: autorise les enfants à shrink + empêche dépassements */
  min-width: 0;
  overflow: hidden;
}
.front-cal-day:hover{
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0,0,0,.18);
}

.front-cal-day-number{
  font-family: "Montserrat Alternates", sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #4c4c30;
  opacity: .95;
}

/* Jours hors mois */
.front-cal-day--outside{
  background: rgba(231, 212, 199, 0.28);
  border-style: dashed;
  opacity: .55;
  box-shadow: none;
}
.front-cal-day--outside:hover{
  transform: none;
}

/* Badge statut */
.front-cal-badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;

  /* IMPORTANT: shrink réel dans un flex item */
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;

  padding: 6px 10px;
  border-radius: 999px;

  font-family: "Montserrat Alternates", sans-serif;
  font-size: 12px;
  font-weight: 700;

  border: 1px solid rgba(0,0,0,.15);
  background: rgba(255,255,255,.35);
  color: #4c4c30;

  /* pas de retour à la ligne */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Codes statut (sans changer ton HTML) */
.front-cal-badge--free{
  border-color: rgba(42, 170, 42, 0.5);
  background: rgba(23, 94, 23, 0.4);
  color: rgb(22, 92, 22);
}
.front-cal-badge--busy{
  border-color: rgba(202,89,0,.55);
  background: rgba(202,89,0,.10);
  color: rgb(202, 88, 0);
}
.front-cal-badge--off{
  border-color: rgba(0,0,0,.25);
  background: rgba(0,0,0,.08);
  color: rgb(0, 0, 0);
}

/* Petit indicateur visuel sur le côté (propre et discret) */
.front-cal-day[data-status="free"]::after,
.front-cal-day[data-status="busy"]::after,
.front-cal-day[data-status="off"]::after{
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.15);
}
.front-cal-day[data-status="free"]::after{
  background: rgba(34, 139, 34, 0.6);
}
.front-cal-day[data-status="busy"]::after{
  background: rgba(202,89,0,.55);
}
.front-cal-day[data-status="off"]::after{
  background: rgba(0,0,0,.35);
}

/* Légende */
.front-cal-legend{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;

  font-family: "Montserrat Alternates", sans-serif;
  font-size: 12px;
  color: #f4decb;
  opacity: .95;
}
.front-cal-dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
  border: 1px solid rgba(34, 139, 34, 0.6);
  margin-right: 6px;
  vertical-align: -1px;
}
.front-cal-dot--free{ background: rgba(34, 139, 34, 0.6); }
.front-cal-dot--busy{ background: rgba(202,89,0,.65); }
.front-cal-dot--off{  background: rgba(0,0,0,.35); }

/* ========================= */
/*  TABLETTE (<= 1024px)     */
/* ========================= */
@media (max-width: 1024px){
  .front-availability{
    margin: 10px 16px 70px;
    width: auto;
  }
  .front-cal-grid,
  .front-cal-weekdays{
    gap: 8px;
  }
}

/* ========================= */
/*  MOBILE (<= 700px)        */
/* ========================= */
@media (max-width: 800px){

  .front-cal-grid,
  .front-cal-weekdays{
    gap: 6px;
  }

  .front-cal-day{
    min-height: 64px;
    padding: 8px 8px 10px;
    gap: 6px;
  }

  /* badge compact, toujours dans la case */
  .front-cal-badge{
    width: 100%;              /* ✅ plus de dépassement latéral */
    border-radius: 10px;      /* plus "tag" que pill, tient mieux */
    padding: 4px 6px;
    font-size: 0;             /* on masque le texte original */
  }

  /* ✅ On remplace par 1 lettre (ça rentre dans n’importe quelle case) */
  .front-cal-day[data-status="free"] .front-cal-badge::before{
    content: "D"; /* Dispo */
    font-size: 11px;
    font-weight: 800;
  }
  .front-cal-day[data-status="busy"] .front-cal-badge::before{
    content: "C"; /* Complet */
    font-size: 11px;
    font-weight: 800;
  }
  .front-cal-day[data-status="off"] .front-cal-badge::before{
    content: "F"; /* Fermé */
    font-size: 11px;
    font-weight: 800;
  }
}
@media (max-width: 480px){
.front-cal-day[data-status="free"]::after,
.front-cal-day[data-status="busy"]::after,
.front-cal-day[data-status="off"]::after{
display: none;
}
}

/* ========================= */
/*  SLOTS (front)            */
/* ========================= */
.front-slots{
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  background: rgba(231, 212, 199, 0.12);
}

.front-slots-title{
  margin: 0 0 10px;
  font-size: 16px;
  color: #f4decb;
  text-align: center;
  font-family: "Montserrat Alternates", sans-serif;
}

.front-slots-list{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.front-slot-btn{
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 999px;
  background: #ca5900;
  color: #fff;
  font-weight: 700;
  font-family: "Montserrat Alternates", sans-serif;
  transition: transform .15s ease;
}
.front-slot-btn:hover{ transform: translateY(-1px); }
.front-slot-btn.is-selected{
  outline: 2px solid rgba(244,222,203,.75);
}

.front-slots-hint{
  margin: 10px 0 0;
  text-align: center;
  color: #f4decb;
  opacity: .9;
  font-size: 13px;
  font-family: "Montserrat Alternates", sans-serif;
}
