/* ===============================
   1) Police personnalisée
   =============================== */
@font-face {
  font-family: 'MaPolice';
  src: url('../font/VG5000-Regular_web.woff2') format('woff2'),
       url('../font/VG5000-Regular_web.woff')  format('woff');
  font-weight: normal;
  font-style: normal;
}

/* ===============================
   2) BODY (Supprime height: 100vh)
   =============================== */
body {
  font-family: 'MaPolice', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  /* height: 100vh; <-- retiré pour laisser la page s'adapter à la hauteur du contenu */

  background-color: #f5faff;
  background-image:
    repeating-linear-gradient(to right, transparent 0, transparent 40px, blue 40px, blue 41px),
    linear-gradient(to right, transparent 96%, blue 96%, blue 97%, transparent 97%),
    repeating-linear-gradient(to bottom, #a0c4ff 0, #a0c4ff 2px, transparent 2px, transparent 38px);
  background-repeat: repeat;
  background-size: 41px 40px;
  background-position: top left;
}

/* ===============================
   3) NAVIGATION
   =============================== */
   .nav-wrapper {
     display: flex;
     justify-content: center;
     align-items: center;
     padding: 0;
     margin: 0;
   }
   nav ul {
     display: flex;
     justify-content: center;
     list-style: none;
     padding: 20px;
     margin: 10px;
     background-color: #000000;
     border-radius: 4px; /* Tu peux ajuster la valeur selon ton besoin */

   }
   nav ul li {
     margin: 0 15px;
   }
   nav ul li a {
     font-size: 22px;
     letter-spacing: 1px;
     color: #ffffff;
     text-decoration: none;
     padding: 10px 15px;
     transition: color 0.3s ease, background-color 0.3s ease;
   }
   nav ul li a:hover {
     /* background-color: #333333; */
     color: #3AFF00;
     border-radius: 5px;
   }
   /* ===============================
      5) Bouton "invert colors"
      =============================== */
      /* #invert-colors-btn { */
        /* background: white;
        border: 2px solid #000;
        padding: 5px 10px;
        cursor: pointer;
        font-size: 20px;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 1000; */

        /* Arrondi des bords */
        /* border-radius: 4px; */
         /* Tu peux ajuster la valeur selon ton besoin */
      /* } */


   /* #invert-colors-btn:hover {
     background-color: black;
     color: #3AFF00;
   }
   .invert-colors {
     filter: invert(1);
     background-color: black !important;
   } */
/* ===============================
   5) CONTENEUR TEXTE + IMAGE
   =============================== */
/* Chaque "bloc" .text-image-container comprend .text-section + .media-section */
.text-image-container {

  display: flex;
  flex-direction: column; /* Empile le texte au-dessus des images */
  align-items: center;
  gap: 20px;
  padding: 20px;
  max-width: 800px; /* Largeur max du bloc */
  margin: 20px auto; /* Centré + marge autour */
  background-color: #000000; /* Fond noir */
  border: 2px solid #000000; /* Bordure noire */
  border-radius: 5px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Légère ombre */
}

/* La partie texte */
.text-section {
  width: 100%;
  color: #ffffff; /* texte blanc */
  font-size: 20px;
  /* text-align: center; */
}
/* La partie texte */
.titre {
  width: 100%;
  color: #ffffff; /* texte blanc */
  font-size: 35px;
  text-align: center;
}


/* La partie médias */
.media-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
}
/* ===============================
   STYLES POUR FORCER L'AFFICHAGE EN CARRÉ
   =============================== */

/* Conteneur des médias */
.media-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px;
    justify-items: center;
    align-items: center;
}

/* Forcer les images et vidéos à être carrées */
.media-section img,
.media-section video {
    width: 100%;
    aspect-ratio: 1 / 1;   /* Force le format carré */
    object-fit: cover;      /* Remplissage sans déformation */
    border: 2px solid #000;
    border-radius: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Effet de zoom au survol */
.media-section img:hover,
.media-section video:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ===============================
   MODALE POUR LES IMAGES ET VIDÉOS EN PLEIN ÉCRAN
   /* ===============================
   /* ===============================
MODALE POUR LES IMAGES ET VIDÉOS EN PLEIN ÉCRAN
=============================== */
#media-modal {
 display: none; /* Caché par défaut */
 position: fixed;
 z-index: 1000;
 left: 0;
 top: 0;
 width: 100%;
 height: 100%;
 background-color: rgba(0, 0, 0, 0.9); /* Fond sombre */
 justify-content: center;
 align-items: center;
 overflow: hidden;
}

#media-modal .modal-content {
 margin: auto;
 display: block;
 max-width: 90%;
 max-height: 90%;
 border: 2px solid #fff;
 border-radius: 10px;
 object-fit: contain;
}

#media-modal .close {
 position: absolute;
 top: 20px;
 right: 30px;
 color: #fff;
 font-size: 40px;
 font-weight: bold;
 cursor: pointer;
 transition: color 0.3s ease;
}

#media-modal .close:hover,
#media-modal .close:focus {
 color: #ff9900;
}

/* ===============================
STYLES POUR FORCER L'AFFICHAGE EN CARRÉ DES MÉDIAS
=============================== */
.media-section {
 display: grid;
 grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
 gap: 15px;
 padding: 10px;
 justify-items: center;
 align-items: center;
}

.media-section img,
.media-section video {
 width: 100%;
 aspect-ratio: 1 / 1;   /* Force le format carré */
 object-fit: cover;      /* Remplit le cadre sans déformation */
 border: 2px solid #000;
 border-radius: 5px;
 transition: transform 0.3s ease, box-shadow 0.3s ease;
 cursor: pointer;
 box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.media-section img:hover,
.media-section video:hover {
 transform: scale(1.05);
 box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* (Le reste de votre CSS pour la mise en page reste inchangé) */
/* ===============================
   6) FOOTER (Retirer position fixed)
   =============================== */
   footer {
     position: fixed;
     left: 0;
     bottom: 0;
     width: 100%;
     /* Conserve tes autres propriétés */
     text-align: center;
     padding: ;
     background-color: #000000;
     color: #ffffff;

     z-index: 999; /* pour s'assurer qu'il passe au-dessus si besoin */
   }

/* ===============================
   7) MEDIA QUERY POUR MOBILE
   =============================== */
@media (max-width: 600px) {
  .text-image-container {
    margin: 10px;
    padding: 10px;
  }
  .text-section {
    font-size: 14px;
  }
  .media-section {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  nav ul {
    padding: 10px;
    margin: 0;
  }
  nav ul li a {
    font-size: 18px;
  }

  /* 1. Navigation : on passe la barre en colonne */
  .nav-wrapper nav ul {
    flex-direction: column;
    align-items: center;
    padding: 10px;
    margin: 0;
  }
  .nav-wrapper nav ul li {
    margin: 5px 0;
  }
  .nav-wrapper nav ul li a {
    font-size: 18px;
    padding: 8px 10px;
  }

  /* 2. Stickie : repositionnement et redimensionnement */
  .stickie {
    position: static;      /* Pour qu'il s'intègre dans le flux normal de la page */
     width: 90%;            /* Largeur relative à l'écran */
     aspect-ratio: 1 / 1;   /* Force le rapport largeur/hauteur à 1, c'est-à-dire carré */
     margin: 20px auto;     /* Centre l'élément et ajoute un espacement vertical */
     transform: none;       /* On retire les transformations */
     padding: 15px;
     font-size: 18px;
  }

  /* 3. Footer : positionnement statique */
    footer {
       position: fixed;
       left: 0;
       bottom: 0;
       width: 100%;

       padding: 10px;
       text-align: center;
       background-color: #000000;
       color: #ffffff;
       z-index: 999;
       font-size: 10px;  /* Taille de police adaptée pour mobile */

     }

     /* Optionnel : ajouter un padding-bottom sur le body pour éviter que le contenu soit caché par le footer */
     body {
     }
  }

  /* 4. Ajustements généraux */
  body {
    overflow-y: auto; /* Autorise le scroll si le contenu dépasse */
    font-size: 16px;  /* Taille de police adaptée pour mobile */
  }
}
