/* ============================
   TYPOGRAPHIE GLOBALE
============================ */
body {
  font-family: 'Raleway', sans-serif;
}

/* ============================
   FLOCONS DE NEIGE
============================ */
#snow-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none; /* Empêche les interactions */
  z-index: 10; /* Devant le contenu mais derrière Mario */
}

.snowflake {
  position: absolute;
  top: 0;
  width: 10px;
  height: 10px;
  background-color: white;
  border-radius: 50%;
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(100vh);
  }
}

/* ============================
   PIED DE PAGE (FOOTER)
============================ */
#footer {
  position: relative; /* Position relative pour contenir Mario */
  padding: 20px;
  text-align: center;
  overflow: visible; /* Assure que les éléments dépassant s'affichent */
}

/* Conteneur pour Mario dans le footer */
#mario-container-footer {
  position: relative;
  justify-content: flex-end; /* Place Mario à droite */
  display: flex;
  align-items: center; /* Assure que Mario est aligné avec le bas du footer */
}

/* Mario dans le footer */
.mario {
  width: 100px;
  height: auto;
  animation: bounce 2s infinite ease-in-out;
}

/* Animation de rebond */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Évite que Mario soit masqué par l'élément avant */
#footer:before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  width: 100%;
  height: 30px;
  background: white;
  border-radius: 50% 50% 0 0;
  z-index: 21; /* Derrière Mario */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}


/* ============================
   BOUTON MODE CLAIR/SOMBRE
============================ */
#theme-toggle {
  position: fixed;
  top: 150px; /* 32px sous le haut de la page */
  right: 16px;
  z-index: 50;
}

#theme-toggle img {
  width: 24px;
  height: 24px;
}

/* ============================
   COULEURS DE THÈME
============================ */
body.light .footer-primary {
  background-color: #854aa0; /* Couleur primaire (clair) */
  color: white;
}

body.dark .footer-secondary {
  background-color: #B8B8B8; /* Couleur secondaire (sombre) */
  color: black;
}

body.light .bg-primary {
  background-color: #854aa0;
  color: white;
}

body.dark .bg-secondary {
  background-color: #B8B8B8;
  color: black;
}

/* ============================
   COULEUR DU FOND
============================ */

/* Mode clair */
body.dark {
  background-color: white; /* Couleur de fond pour le mode clair */
  color: black; /* Couleur du texte */
}

/* Mode sombre */
body.light {
  background-color: black; /* Couleur de fond pour le mode sombre */
  color: white; /* Couleur du texte */
}

/* ============================
   CHAMPS PRINCIPAUX
============================ */
.container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
}

.field {
  position: relative;
  width: 100%;
  height: 300px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.field:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.field-content {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.9);
  text-align: center;
  padding: 15px;
  z-index: 1;
  color: black;

}

.field-content h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.field-content p {
  font-size: 0.875rem;
  margin-bottom: 15px;
}

/* ============================
   BOUTONS DANS LES CHAMPS
============================ */
.field-content a {
  display: inline-block;
  padding: 10px 20px;
  color: black;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  transform: scale(1);
  transition: transform 0.3s ease-in-out, background-color 0.3s ease-in-out, color 0.3s ease-in-out; 
  
}

/* Effet au survol */
.field-content a:hover {
  transform: scale(1.1); /* Agrandissement léger */
  color: white;
}

/* Mode clair */
body.light .field-content a {
  background-color: #854aa0; /* Couleur primaire (clair) */
  color: white;
}

body.light .field-content a:hover {
  background-color: #B8B8B8; /* Couleur secondaire au survol */
  color: black;
}

/* Mode sombre */
body.dark .field-content a {
  background-color: #B8B8B8; /* Couleur primaire (sombre) */
  color: black;
}

body.dark .field-content a:hover {
  background-color: #854aa0; /* Couleur secondaire au survol */
  color: white;
}

/* Logo dans les boutons */
.field-content a img.inline-logo {
  width: 32px; /* Taille du logo */
  height: 32px;
  margin-left: 8px; /* Espace entre le texte et le logo */
  vertical-align: middle; /* Aligne avec le texte */
  display: inline-block; /* Assure que le logo est sur la même ligne que le texte */
}

/* ===================================
   STYLE DES BOUTONS NINTENDO SWITCH
=================================== */
.request-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #854aa0; /* Couleur primaire */
  color: white; /* Texte noir */
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  cursor: pointer;
  border: none; /* Pas de bordure */
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.request-button:hover {
  background-color: #B8B8B8; /* Couleur secondaire */
  color: black; /* Texte blanc */
  transform: scale(1.1); /* Légère augmentation de taille */
}

/* Mode clair */
body.light .request-button {
  background-color: #854aa0; /* Couleur primaire pour mode clair */
  color: white;
}

body.light .request-button:hover {
  background-color: #B8B8B8; /* Couleur secondaire au survol */
  color: black;
}

/* Mode sombre */
body.dark .request-button {
  background-color: #B8B8B8; /* Couleur primaire pour mode sombre */
  color: black;
}

body.dark .request-button:hover {
  background-color: #854aa0; /* Couleur secondaire au survol */
  color: white;
}

/* ============================
   RESPONSIVITÉ
============================ */
@media (max-width: 768px) {
  .container {
    grid-template-columns: 1fr; /* Un seul champ par ligne */
  }

  .video {
    opacity: 1; /* Vidéo visible par défaut */
    pointer-events: auto; /* Interaction activée */
  }
}

/* ============================
   VIDÉO DES CHAMPS
============================ */
.video-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.field:hover .video {
  opacity: 1;
}

.field-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  opacity: 0; /* Caché par défaut */
  pointer-events: none;
  transition: opacity 0.5s ease;
}

.field:hover .field-video {
  opacity: 1; /* Vidéo visible */
}


/* ============================
   IMAGE AVANT VIDEO
============================ */

.field-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transition: opacity 0.5s ease;
}

.field:hover .field-image {
  opacity: 0; /* Image cachée */
}

/* ============================
   FORMULAIRE - OVERLAY
============================ */
.form-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5); /* Fond semi-transparent */
  align-items: center;
  justify-content: center;
  z-index: 100;
  display: none; /* Caché par défaut */
  opacity: 0; /* Transparent par défaut */
  pointer-events: none; /* Désactiver les interactions */
  transition: opacity 0.3s ease; /* Transition pour le fondu */
}

/* Overlay visible */
.form-overlay.visible {
  display: flex; /* Affiche le formulaire */
  opacity: 1; /* Rendu visible */
  pointer-events: auto; /* Activer les interactions */
}

/* Bouton de fermeture (croix) */
.form-container .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px; /* Taille légèrement plus grande pour être visible */
  font-weight: bold;
  color: black; /* Noir par défaut */
  cursor: pointer;
  z-index: 10; /* Assure que la croix est au-dessus des autres éléments */
  transition: transform 0.3s ease; /* Animation au survol */
}

.form-container .close-button:hover {
  transform: scale(1.2); /* Agrandissement au survol */
}

/* ============================
   FORMULAIRE - CONTENU
============================ */
.form-container {
  background: white;
  padding: 30px;
  border-radius: 12px;
  width: 90%; /* Largeur responsive */
  max-width: 500px; /* Taille maximale */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); /* Ombre */
  transform: scale(0.8); /* Réduit au départ */
  transition: transform 0.3s ease; /* Effet d'agrandissement */
}

/* Quand le formulaire est visible */
.form-overlay.visible .form-container {
  transform: scale(1); /* Taille normale */
}

/* ============================
   TITRE DES FORMULAIRES
============================ */
.form-container h3 {
  color: black; /* Texte noir par défaut */
  font-weight: bold;
  font-size: 1.5rem; /* Taille du texte */
  margin-bottom: 20px; /* Espacement sous le titre */
  text-align: center; /* Centré */
}

/* ============================
   CHAMPS DE FORMULAIRE
============================ */
form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: black;
}

form input,
form select {
  display: block;
  width: 100%;
  padding: 10px;
  color: black; /* Texte noir */
  background-color: white; /* Fond blanc */
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box; /* Inclut padding et bordure */
}

form input::placeholder {
  color: #aaa; /* Couleur du placeholder */
}

form input:focus,
form select:focus {
  border-color: #007BFF; /* Couleur en focus */
  outline: none;
}

/* ============================
   BOUTON D'ENVOI
============================ */
.submit-button {
  background-color: #854aa0;
  color: white;
  font-weight: bold;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.submit-button:hover {
  background-color: #B8B8B8;
  transform: scale(1.1);
}

/* ============================
   POP-UP DE REMERCIEMENT
============================ */
.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  text-align: center;
  color: black; /* Texte noir */
}

.popup .close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* ============================
   STYLE SUPPLÉMENTAIRE
============================ */
.bold {
  font-weight: bold;
}
