html, body {
  height: 100%;
}

body {
  background: url(../images/bg.avif);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  text-shadow: 2px 2px var(--black-color);
  display: grid;
  grid-template-rows: auto 1fr auto;
  height: 100dvh;
  overflow: hidden;
  font-family: Arial, sans-serif;
  &::after{
    content: "";
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: -1;
  }
}

.rappel {
  display: flex;
  list-style: none;
  align-items: center;
}

ul.rappel {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1dvh 7dvh;
  margin: 1dvh 0;
}

.description {
  padding: clamp(20px, 3vw, 45px) clamp(60px, 8vw, 120px) 0 clamp(60px, 8vw, 120px);
  position: relative; /* Pour le positionnement des éléments enfants */
  margin-top: clamp(30px, 6vh, 60px); /* Ajout d'une marge en haut pour faire descendre tout le bloc */
}

h1 {
  font-size: clamp(35px, 9vw, 55px);
  font-family: serif;
  letter-spacing: 3px;
  font-weight: lighter;
  margin-bottom: 2dvh;
  color: var(--white-color) !important;
  line-height: 1.2;
  text-transform: uppercase;
}

/* Style supprimé pour h3 car nous supprimons cette section */

h5 {
  color: var(--white-color) !important;
}

/* Conteneur pour le bouton CTA aligné à gauche */
.cta-container {
  display: flex;
  justify-content: flex-start;
  margin: clamp(20px, 4vh, 40px) 0;
}

/* Nouveau bouton CTA */
.cta-button {
  display: inline-block;
  background-color: var(--main-color-button);
  color: var(--white-color); /* Changement de la couleur du texte en blanc */
  text-decoration: none;
  padding: clamp(12px, 2vw, 18px) clamp(20px, 3vw, 35px);
  border-radius: 2px;
  font-size: clamp(16px, 3vw, 20px);
  font-weight: bold;
  text-shadow: 0.5px 0.5px var(--black-color); /* Légère ombre pour améliorer la lisibilité */
  transition: all 0.3s ease;
  text-align: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border: none;
}

.cta-button:hover {
  background-color: var(--main-color-button-hover);
  transform: translateY(-2px);
}

.cta-button:active {
  background-color: var(--main-color-button-active);
  transform: translateY(1px);
}

.complement {
  display: flex;
  justify-content: flex-start; /* Aligné à gauche plutôt qu'au centre */
  align-items: flex-start; /* Aligné en haut plutôt qu'au centre */
  flex-direction: column;
  float: right;
  padding-bottom : clamp(30px, 4vw, 50px);
  padding-right: clamp(60px, 8vw, 120px);
}

.complement aside {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  text-transform: uppercase;
  text-align: center;
  margin-top: 1.5rem;
}

.complement h4 {
  display: flex;
  flex-direction: column;
  position: relative;
  margin: 2dvh;
  font-size: var(--font-size-content-M);
  &:after {
    content: "";
    border-bottom: 2px solid var(--white-color);
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translate(-50%, 0);
    width: clamp(100px, 10vw, 175px);
  }
}

.complement h5 {
  font-size: var(--font-size-content-S);
}

.genealogie span {
  font-size: var(--font-size-content-S);
}

footer {
  clear: both;
  width: 100%;
  margin-top: auto; /* Pour s'assurer que le footer reste en bas */
  padding: 1rem 0;
}

/* Augmentation de la taille du texte dans le footer */
footer p, 
footer address,
footer a {
  font-size: clamp(16px, 3vw, 22px); /* Taille légèrement réduite par rapport à avant */
}

footer a {
  position: relative;
  display: flex;
  align-items: center;
  color: var(--white-color);
  text-decoration: none;

  &::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) scaleX(0);
    transform-origin: 50% 50%;
    width: 100%;
    height: 2px;
    background-color: var(--main-color);
    transition: transform 250ms;
  }

  &:hover {
    &::after {
      transform: translateX(-50%) scaleX(1);
    }
  }
}

/* Suppression des anciens styles pour les permanences */
.schedule-container,
.schedule-item,
.schedule-label,
.schedule-label::after,
.schedule-item:hover .schedule-label::after,
.schedule-time {
  display: none;
}

/* Nouveau style minimaliste pour les horaires avec meilleur alignement */
.opening-hours {
  margin-top: clamp(40px, 5vh, 60px);
  max-width: 550px; /* Augmentation de la largeur maximale de 475px à 550px */
  width: 100%; /* S'adapte à la largeur disponible */
}

.hours-info {
  display: flex;
  flex-direction: column;
  gap: 20px; /* Augmentation de l'espacement vertical de 16px à 20px */
  margin-bottom: 20px;
  width: 100%; /* S'adapte à la largeur disponible */
}

.hour-line {
  display: grid;
  grid-template-columns: 200px 90px auto; /* Augmentation de 180px/70px à 200px/90px */
  align-items: center;
  padding-bottom: 12px;
  position: relative;
  column-gap: 25px; /* Augmentation de l'espacement entre colonnes de 15px à 25px */
}

.hour-line::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, var(--white-color) 0%, rgba(255,255,255,0.2) 100%);
}

.day {
  font-weight: bold;
  color: var(--white-color);
  text-transform: uppercase;
  font-size: clamp(16px, 3vw, 18px); /* Taille augmentée pour correspondre au footer */
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.time {
  color: var(--white-color);
  font-weight: 600;
  font-size: clamp(16px, 3vw, 18px); /* Taille augmentée pour correspondre au footer */
  white-space: nowrap;
}

.activity {
  color: var(--white-color);
  font-size: clamp(16px, 3vw, 18px); /* Taille augmentée pour correspondre au footer */
  text-align: right;
  white-space: nowrap;
}

/* Ajustements responsifs améliorés */
@media (max-width: 768px) {
  .opening-hours {
    max-width: 500px; /* Largeur adaptée pour tablettes, augmentée de 400px à 500px */
  }
  
  .hour-line {
    grid-template-columns: 180px 80px auto; /* Augmentation de 170px/65px à 180px/80px */
    column-gap: 15px;
  }
}

@media (max-width: 600px) {
  .opening-hours {
    max-width: 100%; /* Utilise toute la largeur disponible */
    margin-top: 30px;
  }
  
  .hour-line {
    grid-template-columns: 45% 25% auto; /* Colonnes proportionnelles */
    column-gap: 8px;
  }
  
  .day {
    font-size: clamp(13px, 4vw, 15px);
  }
  
  .time {
    font-size: clamp(13px, 4vw, 15px);
  }
  
  .activity {
    font-size: clamp(12px, 3.5vw, 14px);
    text-align: right;
  }
}

@media (max-width: 480px) {
  .opening-hours {
    margin-top: 25px;
  }
  
  .hours-info {
    gap: 12px;
  }
  
  .hour-line {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas:
      "day time"
      "activity activity";
    gap: 6px;
    padding-bottom: 10px;
    margin-bottom: 5px;
  }
  
  .day {
    grid-area: day;
    font-size: 14px; /* Taille fixe pour plus de lisibilité */
  }
  
  .time {
    grid-area: time;
    text-align: right;
    font-size: 14px; /* Taille fixe pour plus de lisibilité */
  }
  
  .activity {
    grid-area: activity;
    text-align: left;
    margin-top: 3px;
    font-size: 13px; /* Taille fixe pour plus de lisibilité */
  }
}

@media (max-width: 1050px) {
  article h1{
    margin-bottom: 1dvh;
  }
  .description {
    padding: clamp(20px, 5vw, 40px);
    padding-bottom: 0;
  }

  .complement {
    padding: clamp(20px, 5vw, 40px) clamp(10px, 3vw, 20px) 0 clamp(20px, 5vw, 40px);
  }
  
  .cta-button {
    width: 100%; /* Pleine largeur sur mobile */
  }
}

@media (max-width: 768px) {
  /* Réduction du texte du footer pour les tablettes et grands téléphones */
  footer p, 
  footer address,
  footer a {
    font-size: clamp(14px, 2.8vw, 18px);
  }
  
  ul.rappel {
    gap: 1dvh 4dvh; /* Espacement réduit entre les éléments du footer */
  }
}

@media (max-width: 480px) {
  /* Réduction encore plus pour les petits téléphones */
  footer p, 
  footer address,
  footer a {
    font-size: clamp(13px, 2.5vw, 16px);
  }
  
  ul.rappel {
    gap: 1dvh 3dvh;
  }
}

@media (max-width: 400px) and (max-height: 700px) {
  .complement {
    padding: 0 clamp(10px, 3vw, 20px) clamp(20px, 3vw, 40px) clamp(10px, 3vw, 20px);
  }
  
  /* Adaptations pour les petits écrans */
  footer p, 
  footer address,
  footer a {
    font-size: clamp(16px, 4vw, 20px); /* Légèrement réduit pour s'adapter */
  }
}
