/**
 * Vitrine du site (index.php) – NE PAS MODIFIER
 * Feuille de style dédiée à la page d'accueil publique uniquement.
 * Toute évolution du site membre doit se faire dans css/membre.css.
 */
:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --dark-overlay: rgba(0, 0, 0, 0.5);
  --transition-speed: 0.3s;
  --vh: 1vh; /* Variable pour calculer la hauteur correctement sur mobile */
}

/* Styles généraux */
body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  overflow-x: hidden;
}

/* Logo */
.site-logo {
  position: fixed;
  top: 20px;
  left: 20px;
  max-width: 250px;
  z-index: 100;
  transition: all 0.3s ease;
  border-radius: 15px;
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.7));
  opacity: 0;
}

.site-logo.visible {
  opacity: 1;
}

/* Bouton Espace Membre */
.member-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.434);
  color: white;
  padding: 8px 20px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.member-btn:hover {
  background: #0b5dd7b2;
  color: white;
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  height: 100vh; /* Hauteur standard */
  height: calc(var(--vh, 1vh) * 100); /* Hauteur dynamique pour mobile */
  background-image: url("../images/dive-exploration.jpeg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden; /* Éviter les débordements */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-section .container {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 15px;
}

.hero-brand {
  width: 80vw; /* Largeur dynamique basée sur la largeur de la fenêtre */
  max-width: 900px; /* Limite maximale */
  min-width: 300px; /* Limite minimale */
  height: auto;
  filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.624));
  transition: all 0.3s ease;
}

/* Flèche de défilement */
.scroll-arrow {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  color: white;
  text-decoration: none;
  animation: bounce 2s infinite;
}

.scroll-arrow i {
  font-size: 2rem;
  filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.5));
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0) translateX(-50%);
  }
  40% {
    transform: translateY(-20px) translateX(-50%);
  }
  60% {
    transform: translateY(-10px) translateX(-50%);
  }
}

/* Sections */
.luxury-bg {
  background-color: #fff;
  padding: 100px 0;
}

.title-separator {
  width: 60px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 20px auto 40px;
}

.vertical-center {
  padding: 30px;
}

/* Parallax */
.parallax-bg {
  height: 400px;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  position: relative;
}

.parallax-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.parallax-content {
  position: relative;
  z-index: 1;
  color: white;
  text-align: center;
  padding: 20px;
}

/* Cards */
.card {
  transition: var(--transition-speed);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Buttons */
.btn {
  transition: var(--transition-speed);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Alerts */
.alert {
  border: none;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .site-logo {
    max-width: 120px;
    top: 10px;
    left: 10px;
  }

  .member-btn {
    top: 10px;
    right: 10px;
    font-size: 0.8rem;
    padding: 6px 15px;
    background-color: rgba(13, 109, 253, 0.8);
  }

  .hero-brand {
    width: 90vw;
    min-width: 250px;
    margin-top: -50px;
  }

  .parallax-bg {
    background-attachment: scroll !important;
    height: 250px;
  }

  .parallax-content h2 {
    font-size: 1.8rem;
  }

  .parallax-content p {
    font-size: 1rem;
  }

  .luxury-bg {
    padding: 50px 0;
  }

  .card {
    margin-bottom: 20px;
  }

  .card-body {
    padding: 15px !important;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }

  .row {
    margin-left: -10px;
    margin-right: -10px;
  }

  [class*="col-"] {
    padding-left: 10px;
    padding-right: 10px;
  }

  .d-flex {
    flex-direction: column;
  }

  .card .d-flex {
    flex-direction: row;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

@media (max-width: 480px) {
  .hero-section {
    height: 90vh;
  }

  .hero-brand {
    width: 95vw;
    min-width: 200px;
    margin-top: -30px;
  }

  .site-logo.visible {
    max-width: 100px;
  }

  .member-btn {
    padding: 5px 12px;
    font-size: 0.75rem;
  }

  .col-md-6 {
    width: 100%;
  }

  .list-group-item {
    padding: 8px 0;
  }

  .card-body p {
    font-size: 0.9rem;
  }

  .section-title {
    font-size: 1.8rem;
  }
}

@supports (-webkit-touch-callout: none) {
  .hero-section,
  .parallax-bg {
    background-attachment: scroll !important;
  }

  .member-btn {
    background-color: rgba(13, 109, 253, 0.8);
  }
}

[data-aos] {
  pointer-events: none;
}

[data-aos].aos-animate {
  pointer-events: auto;
}

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  .hero-section {
    background-attachment: scroll;
  }

  .hero-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("../images/dive-exploration.jpeg");
    background-size: cover;
    background-position: center;
    z-index: -1;
  }
}
