/* General */

body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
  background: #f8f8f8;
  color: #333;
}

header, section {
  padding: 2em;
  max-width: 960px;
  margin: auto;
  background: #fff;
  margin-bottom: 1em;
  border-radius: 10px;
}

footer {
  display: flex;
  padding: 1em;
  max-width: 960px;
  margin: auto;
  margin-bottom: 1em;
  border-radius: 10px;
}

/* En-tête */

.main-header {
  background: linear-gradient(to bottom, #e6f0f3, #ffffff);
  padding: 2em 1em;
  text-align: center;
  border-bottom: 2px solid #ddd;
}

.subtitle {
  font-size: 1.2em;
  color: #555;
  margin: 0.3em 0 0.6em;
}

.language-switcher {
  text-align: center;
  margin-top: 10px;
  font-size: 0.9em;
}

.language-switcher a {
  color: inherit;
  text-decoration: none;
  margin: 0 5px;
  font-weight: bold;
}

.header-logo {
  width: 30vw;
  max-width: 300px;
}

/* Galerie */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1em;
}

.gallery-grid img {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.button {
  display: inline-block;
  padding: 10px 20px;
  background: #2a4a5c;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  margin-top: 1em;
}

.button:hover {
  background: #3b6275;
}

.slider-container {
  position: relative;
  overflow: hidden;
  max-width: 100%;
  height: 400px;
  border-radius: 10px;
}

.slider {
  display: flex;
  transition: transform 0.6s ease;
  width: 100%;
}

.slider img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Responsive – ajuster la hauteur pour les grands écrans */
@media (min-width: 768px) {
  .slider-container {
    height: 600px;
  }

  .slider img {
    height: 600px;
  }
}

@media (min-width: 1200px) {
  .slider-container {
    height: 700px;
  }

  .slider img {
    height: 700px;
  }
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.7);
  border: none;
  font-size: 2rem;
  padding: 0 0.5em;
  cursor: pointer;
  z-index: 10;
  border-radius: 6px;
}

.slider-btn:hover {
  background: rgba(255,255,255,0.9);
}

/* Cacher les boutons de navigation sur petits écrans */
@media (max-width: 768px) {
  .slider-btn {
    display: none;
  }
}

.prev { left: 10px; }
.next { right: 10px; }

/* Description */

ul {
  list-style: none;
  padding-left: 2vw;
}

ul li::before {
  content: "";
}

/* Calendier */

#calendar {
  min-height: 477px;
  text-align: center;
}

.calendar-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1em;
  margin-bottom: 1em;
}

.calendar-nav {
  padding: 0.5em 1em;
  background: #2a4a5c;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.calendar-nav:hover {
  background: #3b6275;
}

#calendar-month {
  font-weight: bold;
}

.calendar-error {
  color: red;
  text-align: center;
  margin-top: 1em;
}

.calendar-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 350px;
  margin: 0 auto;
}

.day {
  padding: 10px;
  box-sizing: border-box;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 12px;
  background-color: #f0f0f0;
  border-radius: 4px;
}

.past-day {
  background-color: #eee;
  color: #ccc;
}

.available-day {
  background-color: #8cba2f;
  color: #fff;
}

.unavailable-day {
  background-color: #de4a4f;
  color: #fff;
}

.buffer-day {
  background: repeating-linear-gradient(45deg, rgba(140, 186, 47, 0.7), rgba(140, 186, 47, 0.7) 4px, #8cba2f 4px, #8cba2f 8px) !important;
  color: #fff !important;
  opacity: 0.7 !important;
}

.calendar-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin-top: 1em;
  color: #2a4a5c;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #ccc;
  border-top: 2px solid #2a4a5c;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.calendar-month-display {
  cursor: pointer;
  font-weight: bold;
  padding: 0.2em 0.4em;
  border-radius: 4px;
}

.calendar-month-display:hover {
  background-color: #eef3f5;
}

.calendar-selector {
  padding: 0.5em;
  text-align: center;
  font-size: 1em;
  border-radius: 5px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.calendar-header {
  display: contents; /* Utilise les colonnes du parent grid */
  font-weight: bold;
  font-size: 12px;
  color: #444;
}

.calendar-header div {
  text-align: center;
  font-weight: bold;
}

.calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1em;
  margin-top: 1em;
  font-size: 0.85em;
  color: #444;
}

.calendar-legend div {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.legend-box {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: inline-block;
}

/* On réutilise les classes existantes pour garder la même couleur */
.legend-box.available-day { 
  background-color: #8cba2f; 
}

.legend-box.unavailable-day { 
  background-color: #de4a4f; 
}

.legend-box.buffer-day {
  background: repeating-linear-gradient(45deg, rgba(140, 186, 47, 0.7), rgba(140, 186, 47, 0.7) 4px, #8cba2f 4px, #8cba2f 8px);
}

.legend-box.past-day { 
  background-color: #eee; border: 1px solid #ccc; 
}