* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  width: 100%;
  font-family: 'Poppins', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* --- Images de fond --- */
#background-container {
  position: absolute;
  inset: 0; 
  width: 100%; 
  height: 100%; 
  z-index: 1;
  overflow: hidden;
}

.background-image {
  position: absolute;
  inset: 0; 
  background-size: cover; 
  background-position: center; 
  opacity: 0;
  transform: scale(1);
  transition: opacity 2s ease-in-out, filter 20s linear; 
  will-change: opacity, transform, filter;
}

.background-image.active {
  opacity: 1;
  transform: scale(1.1); /* Zoom progressif */
}

/* --- Accessibilité: Réduction du mouvement pour le fond --- */
@media (prefers-reduced-motion: reduce) {
    .background-image {
        transition: opacity 2s ease-in-out !important; 
        transform: scale(1) !important;
    }
}

/* --- Logo --- */
img.logo {
  max-width: 20%;
  height: auto;
  margin-top: 40px;
  margin-bottom: 20px;
  display: block;
  transition: transform 0.3s ease-out, filter 0.3s ease-out;
    z-index: 1;
}
img.logo:hover {
    transform: translateY(-5px) scale(1.02); 
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
}

/* --- Bloc principal : positionné sur le tiers inférieur de la page --- */
.content {
  position: absolute;
  left: 50%;
  top: 80%; 
  transform: translate(-50%, -50%); 
  text-align: center;
  max-width: 600px;
  width: 90%;
  padding: 20px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: white;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  animation: fadeInUp 1s ease forwards;
  will-change: transform; 
    z-index: 2;
}


@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, -40%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

.content p.intro-text {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
}

/* --- Boutons --- */
.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 15px;
}

.button, .help-button {
  padding: 10px 20px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
  background-color: white;
  color: black;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button:hover, .help-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.2); 
}

/* Micro-feedback au clic (très rapide) */
.button:active, .help-button:active {
    transform: scale(0.98); 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition-duration: 0.05s; 
}

.button:hover { background-color: #28b463; color: white; }
.help-button:hover { background-color: #2ecc71; color: white; }

.button i.fa-folder-open { color: #3498db; }
.button i.fa-folder { color: #e67e22; }

/* REGLE POUR DÉSACTIVER LE BOUTON D'AIDE (gardée mais non utilisée ici) */
.disabled-link {
    pointer-events: none; 
    opacity: 0.6;        
    cursor: default;     
    transform: none !important; 
    box-shadow: none !important; 
}
.disabled-link:hover {
    background-color: white !important; 
    color: black !important;
}


/* --- Pied de page --- */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  background: rgba(255, 0, 0, 0.5);
  padding: 10px;
  font-size: 0.8rem;
  color: white;
}

/* --- Popup (Général) --- */
.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000;
}

.popup-overlay.visible { opacity: 1; visibility: visible; }

.popup-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: rgba(255, 99, 71, 0.9);
  padding: 30px;
  border-radius: 10px;
  color: white;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  width: 600px;
  max-width: 95%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1001;
}

.popup-content.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.popup-content h2 {
  margin-bottom: 15px;
  font-family: 'Permanent Marker', cursive;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}


.popup-content h1 {
  margin-bottom: 15px;
  font-family: 'Poppins', cursive;
    font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
}




/* --- Popup (Contenu Structuré) --- */
.popup-content .info-list {
    list-style: none; 
    padding: 0;
    margin: 10px 0 25px 0; 
    text-align: left;
    font-size: 0.95rem;
}

.popup-content .info-list li {
    margin-bottom: 10px;
    line-height: 1.4;
}

.popup-content .info-list li i {
    color: #ffd700; 
    margin-right: 5px;
}

/* Styles pour la section contact */
.popup-content .contact-info {
    margin-top: 15px;
    padding: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.1);
    border-radius: 5px;
}

.popup-content .contact-info p {
    margin-bottom: 8px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
}

.popup-content .email-link {
    display: block;
    font-weight: bold;
    color: #f7f7f7; 
    text-decoration: none;
    font-size: 0.8rem;
    margin-bottom: 5px;
    transition: color 0.2s;
}

.popup-content .email-link:hover {
    color: #e0e0e0;
    text-decoration: underline;
}

/* --- Popup (Bouton "J'y vais") --- */
.popup-button {
  padding: 10px 20px;
  background-color: white;
  color: black;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-top: 20px; 
}

.popup-button:hover {
  background-color: #ddd;
}

/* --- Overlay de transition --- */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 2000;
}

.page-transition-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  border: 8px solid rgba(255, 255, 255, 0.3);
  border-top: 8px solid #fff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1.2s linear infinite;
}

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

@media (max-width: 768px) {
  .content {
    top: 80%; 
    padding: 15px;
  }
}