:root, body, body * {
  font-family: Inter, sans-serif;
  font-feature-settings: 'liga' 1, 'calt' 1; /* Améliore le rendu typographique */
}

/* Version variable si supportée */
@supports (font-variation-settings: normal) {
  :root, body, body * {
    font-family: InterVariable, sans-serif;
  }
}

body {
  margin: 0;
  font-family: 'Arial', sans-serif;
  background: linear-gradient(to bottom, white, #B38282);
  min-height: 100vh;
  background-attachment: fixed;
}

header nav ul {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 0;
  list-style: none;
  color: #980000;
  font-size: 18px;
  margin: 0;
  gap: 180px;
}

/* Cible uniquement les li qui contiennent du texte (pas le logo) */
header nav ul li:not(:has(img)) {
  position: relative;
  transition: all 0.3s ease;
  padding: 8px 12px;
}

/* Animation au survol (texte seulement) */
header nav ul li:not(:has(img)):hover {
  transform: translateY(-3px);
  text-shadow: 0 2px 4px rgba(152, 0, 0, 0.3);
}

/* Effet de soulignement animé (texte seulement) */
header nav ul li:not(:has(img))::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #980000;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

header nav ul li:not(:has(img)):hover::after {
  width: 80%;
}

/* Animation au clic (texte seulement) */
header nav ul li:not(:has(img)):active {
  transform: translateY(1px);
  transition: all 0.1s ease;
}

/* Le logo conserve ses animations originales */
header nav ul li .logo {
  transition: transform 1s ease-in-out;
  margin: 0 30px;
}

header nav ul li .logo:hover {
  transform: rotate(560deg) scale(1.5);
  animation: spin 3.5s linear infinite;
}
nav ul li a {
  color: inherit; /* Garde la couleur du texte parent */
  text-decoration: none; /* Supprime le soulignement */
}

.logo {
  height: 80px;
  transition: transform 1s ease-in-out; /* Transition plus douce */
  margin: 0 30px;
}

.logo:hover {
  transform: rotate(560deg) scale(1.5); /* Rotation complète + léger zoom */
  animation: spin 3.5s linear infinite; /* Animation continue */
}

.content-box {
  background: rgba(46, 46, 46, 0.2);
  border-radius: 25px;
  padding: 30px;
  margin: 40px auto;
  width: 90%;
  max-width: 1200px;
  display: flex;
  gap: 30px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(5px);
}

.left-panel,
.right-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* Calendrier */
.calendar {
  background: #980000;
  color: white;
  border-radius: 20px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  width: 90%;
  margin: 0 auto;
}

.calendar table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
  border-radius: 20px;
}

.calendar th {
  background: rgba(0, 0, 0, 0.1);
  padding: 10px 8px;
  font-weight: 500;
  border-radius: 8px;
  font-size: 14px;
}

.calendar td {
  border: 2px solid rgba(0, 0, 0, 0.3);
  padding: 8px 6px;
  transition: all 0.3s ease;
  border-radius: 20px;
  font-size: 14px;
}

.calendar td:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.calendar td.selected {
  background: white;
  color: #980000;
  font-weight: bold;
}

.calendar td.inactive {
  color: rgba(255, 255, 255, 0.4);
}

.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.calendar-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
}

.cal-arrow {
  background: white;
  color: #980000;
  border: none;
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.cal-arrow:hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

/* Formulaire */
.form-section {
  display: flex;
  background: rgba(0, 0, 0, 0.151);
  border-radius: 20px;
  overflow: hidden;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-img {
  width: 120px;
  padding: 10px;
}

.article-img img {
  width: 100%;
  border-radius: 10px;
}

.form-fields {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  gap: 15px;
  width: 80%;
  align-items: stretch;
}

.form-fields input[type="text"] {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 12px;
  width: 80%;
  transition: all 0.3s ease;
}

.form-fields input[type="text"]:focus {
  border-color: #980000;
  outline: none;
  box-shadow: 0 0 0 2px rgba(152, 0, 0, 0.2);
}

.file-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.file-label {
  display: block;
  width: 120px;
  padding: 10px;
  background: #474747;
  color: white;
  text-align: center;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  font-size: 14px;
  white-space: nowrap;
}

.file-label:hover {
  background: #333333;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

input[type="file"] {
   display: none;
}

.file-name {
  flex: 1;
  color: #980000;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file {
  color: #980000;
  cursor: pointer;
  font-weight: bold;
  margin-left: 5px;
  font-size: 16px;
}

.submit-btn {
  background: #980000;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.3s ease;
  width: 50%;
  font-size: 16px;
}

.submit-btn:hover {
  background: #800000;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.carousel {
  background: none;
  border-radius: 25px;
  padding: 20px;
  text-align: center;
  position: relative;
  height: 270px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: all 0.5s ease-in-out;
}

.carousel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4); /* Effet sombre */
  backdrop-filter: blur(5px); /* Effet flou */
  transition: all 0.5s ease-in-out;
  z-index: 1;
}

.carousel:hover::before {
  background: rgba(0, 0, 0, 0.2); /* Effet moins sombre au survol */
  backdrop-filter: blur(2px);
}

.carousel img {
  max-height: 90%;
  max-width: 75%;
  border-radius: 15px;
  transition: transform 0.5s ease;
  padding: 10px;
  position: relative;
  z-index: 2;
}

.carousel-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 2;
  padding: 10px;
  transition: transform 0.3s ease;
}

.carousel-btn:hover {
  transform: scale(1.1);
}

.carousel-btn:active {
  transform: scale(0.95);
}

.arrow-circle {
  background-color: #980000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease;
}

.arrow-circle:hover {
  background-color: #800000;
  transform: scale(1.1);
}

.arrow {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-top: 3px solid white;
  border-right: 3px solid white;
}

.arrow.left {
  transform: rotate(-135deg);
  margin-left: 4px;
}

.arrow.right {
  transform: rotate(45deg);
  margin-right: 4px;
}

.dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 3;
}

.dots div {
  width: 12px;
  height: 12px;
  background-color: #ddd;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dots div:hover {
  background-color: #980000;
}

.dots .active {
  background-color: #980000;
  transform: scale(1.2);
}

/* Description */
.description {
  display: flex;
  flex-direction: column;
  background: none;
  border-radius: 25px;
  padding: 27px;
  gap: 20px;
  backdrop-filter: blur(5px);
  background-color: none;

}

.desc-text-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  
}

.desc-text-btn h2 {
  color: #980000;
  margin: 0;
  font-size: 28px;
  letter-spacing: 2px;
  text-align: justify;
}

.reserve-btn {
  background-color: #980000;
  color: white;
  font-weight: bold;
  padding: 12px 25px;
  border: none;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.reserve-btn:hover {
  background-color: #800000;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.reserve-btn:active {
  transform: translateY(-1px);
}

.desc-text {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
  .content-box {
    flex-direction: column;
  }
  
  header nav ul {
    flex-wrap: wrap;
    gap: 15px;
  }
  
  .form-section {
    flex-direction: column;
  }
  
  .article-img {
    width: 100%;
    text-align: center;
  }
  
  .form-fields {
    width: 100%;
    align-items: center;
  }
  
  .file-input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }
  
  .file-label {
    width: 100%;
  }
  
  .file-name, .remove-file {
    text-align: center;
    margin-top: 5px;
  }
}

/* Ajoutez ceci à votre CSS */
.submit-btn {
  transition: all 0.3s ease, transform 0.15s ease, box-shadow 0.3s ease;
}

.submit-btn:active {
  transform: translateY(1px) scale(0.98);
}

/* Ajoutez à la fin de votre CSS */
input[readonly] {
    background-color: #f0f0f0;
    border-color: #ddd;
}

.file-label.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.submit-btn.modified {
    background-color: #4CAF50 !important;
}

/* Styles pour les messages */
.reservation-message {
  padding: 8px;
  border-radius: 4px;
  margin-top: 10px;
  animation: fadeIn 0.3s ease;
}

.reservation-message.success {
  background-color: rgba(76, 175, 80, 0.2);
  border-left: 3px solid #4CAF50;
}

.reservation-message.error {
  background-color: rgba(255, 0, 0, 0.2);
  border-left: 3px solid #FF0000;
}

#finalReserveBtn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #cccccc !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Ajoutez à la fin de votre CSS */
#finalReserveBtn:disabled {
  background-color: #cccccc !important;
  color: #666666;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#finalReserveBtn:disabled:hover {
  background-color: #cccccc !important;
}

#success-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

#overlay-logo {
  width: 100px;
  height: auto;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

#overlay-text {
  color: white;
  margin-top: 20px;
  font-size: 1.5rem;
  text-align: center;
  opacity: 0;
  animation: fadeInText 0.5s ease forwards 0.5s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeInText {
  to {
    opacity: 1;
  }
}
