/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  background-color: #212121;
  font-size: 14px; /* Taille de base */
  line-height: 1.6;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

img,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

h1 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

h4 {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  color: wheat;
}

section {
  margin-bottom: 100px;
}

/* WRAPPER */
.page-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #212121;
  min-height: 100vh;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* NAVIGATION */
.navigation {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem;
  flex-wrap: wrap;
  gap: 10px;
}

.navigation2 {
  justify-items: center;
  margin-bottom: 30px;
  margin-top: 30px;
}

.logoGK img {
  width: 80px;
  opacity: 70%;
}

.ginoKokolo {
  color: wheat;
  font-size: 2em;
  font-family: "Poiret One", sans-serif;
  margin-top: 20px;
}

.mail {
  margin: auto;
}

.github {
  width: 30px;
}

.github img {
  opacity: 75%;
}

.linkedin {
  width: 40px;
}

.linkedin img {
  opacity: 75%;
}

.mail a {
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-decoration: none;
  opacity: 0.7;
  font-size: 0.9em;
  padding-left: 10px;
}

/* FLEX CONTAINER */
.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  padding: 16px;
}

.flex-item {
  text-decoration: none;
  color: inherit;
  flex: 1 1 300px; /* plus flexible */
  padding: 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s, box-shadow 0.3s;
}

.flex-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}

.flex-item h2 {
  color: wheat;
  font-size: 1em;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  text-align: center;
}

/* RUBRIQUES */
.rubrique {
  padding: 20px;
  line-height: 1.5em;
  margin-bottom: 30px;
}

.rubrique h1 {
  color: #6f4c05;
  font-size: 1.5em;
  margin-bottom: 1rem;
  margin-left: 70px;
}

.rubrique h4 {
  margin-left: 100px;
}

/* LE REACTEUR */

.reacteur {
  display: flex;
  align-items: center;
  gap: 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.logo-reacteur img {
  max-width: 200px; /* taille raisonnable */
  height: auto;
  flex-shrink: 0; /* évite que l’image soit écrasée */
}

.reacteur p {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.6;
  color: wheat;
  text-align: justify;
}

/* Responsive : mobile -> logo au-dessus du texte */
@media (max-width: 768px) {
  .reacteur {
    flex-direction: column;
    text-align: center;
  }

  .logo-reacteur img {
    max-width: 150px;
    margin-bottom: 15px;
  }

  .reacteur p {
    text-align: justify;
    font-size: 1rem;
  }
}

.mern-stack {
  justify-items: center;
  padding: 15px;
}

.hard-skills-dev {
  justify-items: center;
  padding: 15px;
}

.hard-skills-crea {
  justify-items: center;
  padding: 15px;
}

.bio-timeline {
  justify-items: center;
  padding: 15px;
}

.formation-timeline {
  justify-items: center;
  padding: 15px;
}

/* TEXT */
p {
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 1rem;
  text-align: justify;
  padding-top: 10px;
}

/* RESPONSIVE TEXT */
@media (max-width: 600px) {
  .rubrique h1 {
    font-size: 1.2em;
    text-align: center;
    margin-left: 0;
  }

  p {
    font-size: 0.9rem;
  }
}

/* BIO AUDIO */
.bio-player h3 {
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  opacity: 0.5;
  text-align: center;
}

.bio-player audio {
  accent-color: black;
  width: 90%;
  max-width: 300px;
  display: block;
  margin: 10px auto;
  opacity: 0.7;
}

/* VIDEO GALLERY */

.video-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.video-item {
  flex: 1 1 45%;
  min-width: 300px;
  position: relative;
}

.video-item div {
  padding-top: 56.25%; /* 16:9 */
  position: relative;
}

.video-item iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* GALLERY (GRID) */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images par ligne sur écran web */
  gap: 20px; /* Espacement entre les images */
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto; /* Centrer la galerie */
}

.gallery-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-item img {
  max-width: 100%; /* Prend toute la largeur disponible */
  height: 65px;
  border-radius: 10px;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item img:hover {
  transform: scale(1.3); /* Légère mise à l'échelle au survol */
}

.gallery-item figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
  text-align: center;
  padding: 0 10px;
}

.gallery2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 images par ligne sur écran web */
  gap: 20px; /* Espacement entre les images */
  padding: 20px;
  max-width: 1200px;
  margin: 0 auto; /* Centrer la galerie */
}

.gallery-item2 {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-item2 img {
  max-width: 100%; /* Prend toute la largeur disponible */
  height: auto;
  border-radius: 10px;
  transition: transform 0.3s ease;
  display: block;
}

.gallery-item2 img:hover {
  transform: scale(1.1); /* Légère mise à l'échelle au survol */
}

.gallery-item2 figcaption {
  margin-top: 10px;
  font-size: 0.85rem;
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.4;
  text-align: center;
  padding: 0 10px;
}

/* Responsive tablette */
@media (max-width: 992px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr); /* 2 images par ligne sur tablette */
    gap: 15px;
  }
}

/* Responsive mobile */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: 1fr; /* 1 image par ligne sur mobile */
    gap: 10px;
  }
}

/* FOOTER */
.credits {
  text-align: center;
  color: wheat;
  opacity: 0.6;
  font-size: 0.7em;
  padding: 20px;
}

/* MOBILE RESPONSIVE NAV */
@media (max-width: 768px) {
  .navigation {
    flex-direction: wrap;
    text-align: center;
  }

  .ginoKokolo {
    margin-top: 10px;
    font-size: 1.5em;
  }

  .mail {
    margin-top: 10px;
  }
}

.caroussel {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding: 20px;
}

.box-caroussel {
  width: 300px;
  height: 200px; /* hauteur fixe du carrousel */
  flex-shrink: 0;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
}

.image-hover {
  position: relative;
  width: 100%;
  height: 100%;
}

.image-hover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Légende toujours visible */
.image-hover figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: wheat;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  padding: 0.5em;
  font-size: 0.9em;
  text-align: center;

  /* plus besoin d'opacité */
  opacity: 1;
}

/* Modale pleine page avec fondu et blur */
.modal {
  display: none;
  position: fixed;
  z-index: 100;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
  opacity: 0;
}

/* Contenu centré et responsive */
.modal-content {
  background-color: #000000;
  margin: 5% auto;
  padding: 20px;
  border-radius: 10px;
  width: 90%;
  max-width: 700px;
  text-align: center;
  transform: scale(0.7);
  transition: transform 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Texte & fermeture */
.close {
  color: #ffffff;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: rgb(8, 119, 39);
}

/* Modale visible */
.modal.show {
  display: block;
  opacity: 1;
}
.modal.show .modal-content {
  transform: scale(1);
}

/* Vidéo responsive */
video {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* Adaptation mobile */
@media screen and (max-width: 480px) {
  .modal-content {
    margin: 10% 5%;
    padding: 15px;
  }
  .close {
    font-size: 24px;
  }
}

.credits {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}
