html, body {
  font-family: "Poppins", sans-serif;
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden; /* Empêche tout scroll */
}

/* Variable CSS pour Chrome iOS */
:root {
  --vh: 1vh;
}

/* Styles spécifiques pour Chrome iOS */
.chrome-ios .bg-image {
  height: calc(var(--vh, 1vh) * 100);
}

.chrome-ios .overlay {
  height: calc(var(--vh, 1vh) * 100 - 80px);
}

/* Correction du positionnement du titre sur Chrome iOS */
.chrome-ios .title-container {
  top: 50%; /* Position plus haute sur Chrome iOS au lieu de 65% */
}

.bg-image {
  background-image: url("david_burlet_juggler_magician_comedian_jongleur_magicien_comique.jpeg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  height: 100vh;
}

.overlay {
  background: rgba(0, 0, 0, 0);
  position: absolute;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 120px; /* Laisser de l'espace pour le footer fixe */
  box-sizing: border-box;
  overflow: hidden;
}

.title-shadow {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.social-icon {
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-5px);
  filter: brightness(1.2);
}

/* Section réseaux sociaux - toujours visible en bas de l'écran */
.social-media-section {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1rem 2rem 1rem;
  background: rgba(0, 0, 0, 0);
  min-height: 120px;
  max-height: 25vh; /* Ne pas dépasser 25% de la hauteur d'écran */
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  /* S'assurer que le contenu reste visible */
  box-sizing: border-box;
  /* Support des zones sûres sur mobile */
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

.title-container {
  position: absolute;
  top: 65%; /* Position fixe sur l'image : 45% de la hauteur */
  left: 50%;
  transform: translate(-50%, -50%); /* Centre parfaitement */
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 5;
}

/* Styles pour le bouton audio */
.audio-control {
  position: fixed;
  top: 90px; /* Positionné sous le bandeau variable + marge */
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #fff;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.audio-control:hover {
  background: rgba(255, 215, 0, 0.8);
  transform: scale(1.1);
}

/* Styles pour le bouton de langue */
.lang-control {
  position: fixed;
  top: 90px; /* Positionné sous le bandeau variable + marge */
  right: 80px;
  width: 50px;
  height: 50px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid #fff;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 1000;
}

.lang-control:hover {
  background: rgba(59, 130, 246, 0.8);
  transform: scale(1.1);
}

/* Crédit photo */
.photo-credit {
  position: fixed;
  bottom: 200px;
  right: 10px;
  background: rgba(0, 0, 0, 0);
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
  transform: rotate(90deg);
  transform-origin: bottom right;
}

.photo-credit:hover {
  background: rgba(0, 0, 0, 0);
  color: rgba(255, 255, 255, 1);
  transform: rotate(-90deg) translateY(-2px);
}

.photo-credit i {
  font-size: 0.7rem;
  opacity: 0.7;
}

/* Styles pour le bandeau de textes */
.text-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 60px;
  height: auto;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  overflow: hidden;
  padding: 10px 0;
}

.banner-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 700;
  font-size: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  opacity: 0;
  white-space: nowrap;
  animation: textFade 4s ease-in-out infinite;
  text-align: center;
  max-width: 100%;
}

.banner-text.multiline {
  white-space: normal;
  line-height: 1.2;
  padding: 5px 20px;
}

@keyframes textFade {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  85% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-10px);
  }
}

@media (max-width: 768px) {
  .bg-image {
    background-attachment: scroll;
    height: 100vh;
  }
  
  .title-container {
    top: 63%; /* Position légèrement plus haute sur mobile */
  }
  
  /* Correction spécifique pour Chrome iOS mobile */
  .chrome-ios .title-container {
    top: 48%; /* Position encore plus haute sur Chrome iOS mobile */
  }
  
  /* Les corrections Chrome iOS sont maintenant gérées par JavaScript */
  .text-banner {
    min-height: 50px;
    padding: 5px 0;
  }
  
  .banner-text {
    font-size: 1.2rem;
  }
  
  .overlay {
    top: 60px;
    bottom: 100px; /* Ajuster pour le footer mobile */
    padding: 10px 0 0 0;
  }
  
  .audio-control {
    width: 40px;
    height: 40px;
    top: 70px;
    right: 15px;
  }
  
  .lang-control {
    width: 40px;
    height: 40px;
    top: 70px;
    right: 65px;
  }
  
  .photo-credit {
    bottom: 200px;
    right: 5px;
    padding: 6px 10px;
    font-size: 0.7rem;
    transform: rotate(-90deg);
    transform-origin: bottom right;
  }
  
  .photo-credit i {
    font-size: 0.6rem;
  }
  
  .social-media-section {
    padding: 0.8rem 1rem;
    min-height: 100px;
    max-height: 30vh; /* Légèrement plus sur mobile */
    background: rgba(0, 0, 0, 0);
    /* Ajustement pour petits écrans */
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
  }
  
  /* Réduire la taille des icônes sur très petits écrans */
  @media (max-height: 600px) {
    .social-media-section {
      min-height: 80px;
      max-height: 35vh;
      padding: 0.5rem 1rem;
      padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    }
    
    .social-icon {
      font-size: 1.5rem !important;
    }
    
    .social-media-section p {
      font-size: 0.75rem !important;
    }
  }
}

/* Règles spéciales pour écrans en mode paysage (hauteur réduite) */
@media (max-height: 500px) and (orientation: landscape) {
  .social-media-section {
    min-height: 60px;
    max-height: 40vh;
    padding: 0.3rem 1rem;
    padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px));
  }
  
  .social-icon {
    font-size: 1.2rem !important;
  }
  
  .social-media-section p {
    font-size: 0.7rem !important;
    margin: 0.2rem 0 !important;
  }
  
  .overlay {
    bottom: 60px;
  }
  
  .title-container {
    top: 50%;
  }
}

/* Ultra petits écrans */
@media (max-height: 400px) {
  .social-media-section {
    min-height: 50px;
    max-height: 45vh;
    padding: 0.2rem 0.5rem;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  }
  
  .social-media-section .flex {
    gap: 0.5rem !important;
  }
  
  .social-icon {
    font-size: 1rem !important;
  }
  
  .overlay {
    bottom: 50px;
  }
}
