/* Style du calendar : chargé par function.php */

.calendar-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  max-width: 1000px;
  margin: 10px auto;
}

.day-details {
 flex: 1;
  max-width: 300px;
  max-height: 300px;
  background: #c91517;
  border-radius: 20px;
  padding: 25px;
  display: flex;              /* active flexbox */
  flex-direction: column;     /* empile #day-name et #day-date verticalement */
  justify-content: center;    /* centrage vertical */
  align-items: center;        /* centrage horizontal */
  text-align: center;
  color: white;
}

#day-name, #day-date, #day-month {
  text-align: center;
  font-size: calc(50% + 1vw);
  margin: 0;
  white-space: nowrap;
  text-transform: uppercase;
  width: 100%;
  padding: 20px;
}

#day-date {
	font-size: calc(100% + 3vw);
}

ul.calendar {
  flex: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 0;

  background: #fff8e1;
  border-radius: 15px;
  padding: 25px;
}

ul.calendar li {
  background-color: #ffefb0;
  border-radius: 10px;
  padding: 10px;
  color: #1f1f1f;
  text-align: center;
  width: calc(25% - 10px);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

ul.calendar li:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

ul.calendar li.weekend {
  background: linear-gradient(135deg, #ffdfdf, #ff9a9a);
  color: #6a0000;
  font-weight: 600;
}

ul.calendar li.holiday {
  background: linear-gradient(135deg, #cfe8ff, #66a3ff);
  color: #00264d;
  font-weight: 700;
}

ul.calendar li.selected {
  border: 3px solid #f5b800;
  transform: scale(1.05);
}


.calendar-events{
    max-width: 1000px;
    margin: 10px auto;
}

/* Style par défaut (mobile) : les blocs sont empilés */
.calendar-evt {
  display: flex;
  flex-direction: column; /* Les éléments s'empilent verticalement */
  gap: 1rem; /* espace entre gauche et droite */
  margin-top : 20px;
  margin-bottom: 20px;
  max-height: inherit;
  overflow: visible;
}

.calendar-evt  .event-overlay{
  position : absolute;
  top  : 10px;
  left : -10px;
  z-index: 1;
}

.event-overlay .event-horaire{
  margin-top : 6px;
}



.evt-thumbnail{
  border-radius: 20px;
  overflow: hidden;
}

.calendar-events a:hover{
  color: inherit !important;
}

.calendar-events a:hover .more{
  opacity: 1;
}

.calendar-evt-right .event-dates{
  font-size: 1.2em;
}

.evt-excerpt{
  margin-top : 20px;
}

.more{
  background: white;
  color: #0098d7;
  border: 2px solid #0098d7;

  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: normal !important;
  font-family: 'Roboto';';

}

.event-break{
  padding: 10px;
  border-radius: 10px;
  display: flex;
  align-items: center;
}

.event-break::before{
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 2em;
  color: #ff9900;
  padding-right: 6px;
}

.event-break-matinee::before{
  content: "\f185"; /* fa-sun */
}

.event-break-midi::before{
  content: "\f805"; /* fa-moon */
}

.event-break-nocturne::before{
  content: "\f186"; /* fa-moon */
}

.event-break-nocturne{
  background: linear-gradient(135deg, #5e4b8b, #8c6ce4);
  color: #fff;
  text-shadow: initial;
}

.event-break-midi{
  position: relative;
  background: linear-gradient(135deg, #8B4513, #F4A460); 
  color: #fff;
  text-shadow: initial;
  overflow: hidden;
}

/* graines de sésame */
.event-break-midi::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background-image: url('data:image/svg+xml;utf8,\
<svg xmlns="http://www.w3.org/2000/svg" width="80" height="40">\
  <ellipse cx="10" cy="8" rx="4" ry="2" fill="rgba(255,255,255,0.25)" transform="rotate(-15 10 8)"/>\
  <ellipse cx="35" cy="12" rx="3.5" ry="1.5" fill="rgba(255,255,255,0.2)" transform="rotate(10 35 12)"/>\
  <ellipse cx="60" cy="6" rx="4" ry="2" fill="rgba(255,255,255,0.22)" transform="rotate(25 60 6)"/>\
  <ellipse cx="20" cy="30" rx="3.8" ry="1.7" fill="rgba(255,255,255,0.2)" transform="rotate(-10 20 30)"/>\
  <ellipse cx="50" cy="25" rx="4" ry="2" fill="rgba(255,255,255,0.25)" transform="rotate(15 50 25)"/>\
</svg>');

  background-repeat: repeat;
  background-size: 80px 40px;
  background-position: 0 4px;
}

.event-break-matinee{
  background: linear-gradient(135deg, #ffe28a, #ffb347);
  text-shadow: initial;
}



/* Desktop : les blocs sont côte à côte */
@media (min-width: 768px) {
  .calendar-evt {
    flex-direction: row; /* Met les enfants côte à côte */
    align-items: flex-start; /* Aligne le contenu en haut */
    max-height: 300px;
    position: relative;
  }

   .calendar-evt-left, .calendar-evt-right {
    overflow: hidden;
   }
  

  .calendar-evt-left {
    flex: 0 0 300px; /* largeur fixe de l'image */
    margin-right: 1rem; /* espace entre gauche et droite */
  }

  .calendar-evt-right {
    flex: 1; /* prend le reste de l'espace disponible */
    max-height: 300px;
  }

  .more {
     position: absolute;
      bottom: 0;
      right: 0;
      opacity: 0; 
      transition: opacity 0.3s ease;
  }

  .calendar-evt-left img  {
      transition: transform 0.3s ease, filter 0.3s ease; /* transition douce */
  }

  .calendar-events a:hover .calendar-evt-left img  {
      filter: saturate(2); /* 1 = normal, 1.5 = plus saturé */
      transform: scale(1.02);
  }

}

