/* =======================
   RESET & BASE
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: black;
  overflow-x: hidden;
  background-color: #d0d0d0;
}

/* =======================
   SECTION À PROPOS
======================= */
.section-3d-apropos.full-height-left {
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 4rem;

}

.apropos-text {
  max-width: 600px;
  text-align: left;
}

h2 {
  font-size: 8rem;
  margin-bottom: 1.5rem;
}

.apropos-text p {
  font-size: 1rem;
  line-height: 1.6;
}

/* =======================
   INTRO 3D
======================= */
#intro-3d {
  width: 100%;
  height: 100vh;
  background-color: #0000c2;
  overflow: hidden;
  position: relative;
}

#three-container {
  width: 100%;
  height: 100%;
}
#three-container-2 {
  width: 100%;
  height: 100%;

}
/* =======================
   GLASS EFFECT
======================= */
.glass {
  /* backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); */
  background: rgba(237, 237, 237, 0.08);


  border-radius: 20px;
  transition: all 0.3s ease;
}

.glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
}

/* =======================
   FADE ANIMATIONS
======================= */
.hidden {
  display: none;
  opacity: 0;
}

.fade-in {
  animation: fadeIn 1s forwards;
}

.fade-out {
  animation: fadeOut 1s forwards;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* =======================
   FILTRES DE TRI
======================= */
.filters {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: 2rem auto;
  padding: 1rem 2rem;
  border-radius: 20px;
  max-width: 1000px;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.filters button {
  padding: 0.5rem 1.5rem;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #e5e5e7;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease;
}

.filters button:hover {
  background: rgba(255, 255, 255, 0.2);
}

.filters button.active,
.filters button.selected {
  background: rgba(255, 255, 255, 0.3);
  font-weight: bold;
}

/* =======================
   BENTO CARDS
======================= */
.bento {
  position: relative;
  width: 100%;
  overflow: hidden;
  cursor: pointer;

  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);

  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s;
  display: inline-block;
  break-inside: avoid;
}

.bento:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
}

.bento video,
.bento img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* =======================
   OVERLAY TEXTE
======================= */
.bento .overlay {

  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, black, transparent);
  color: #fff;
  padding: 1rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  text-align: left;
}

.bento:hover .overlay {
  opacity: 1;
}

.overlay p {
  font-size: 2.5rem; /* S'adapte à la taille de la box */
  line-height: 1.4;
  font-weight: bolder;
  
}

/* =======================
   RATIOS FIXES
======================= */
.ratio-1x1::before,
.ratio-16x9::before,
.ratio-9x16::before {
  content: '';
  display: block;
}

.ratio-1x1::before {
  padding-bottom: 100%;
}

.ratio-16x9::before {
  padding-bottom: 56.25%;
}

.ratio-9x16::before {
  padding-bottom: 177.78%;
}

.bento > *:not(.overlay) {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* =======================
   MASONRY LAYOUT (Pinterest-style)
======================= */
.masonry {
  column-count: 4;
  column-gap: 1.5rem;
  padding: 2rem;

}


.masonry .bento {
  margin-bottom: 1.5rem;
}

/* =======================
   RESPONSIVE
======================= */
@media screen and (max-width: 1024px) {
  .section-3d-apropos {
    flex-direction: column;
  }
  .masonry {
    column-count: 2;
  }

  h2 {
    font-size: 4rem;
  }
  #three-container-2 {
    display: none; /* cache l'intro */
  }
}

@media screen and (max-width: 600px) {
 .apropos-viewer{
  flex-direction: column;
 }

  .masonry {
    column-count: 1;
  }

  .ratio-9x16::before {
    padding-bottom: 130%;
  }

  .bento .overlay {
    opacity: 1;
  }
  .intro-3d{ 
    display: none;
  }
  #intro-3d {
    display: none; /* cache l'intro */
  }

}

/* =======================
   FULLSCREEN VIEW
======================= */
#fullscreen-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.fullscreen-video {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-video video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#fullscreen-view.hidden {
  display: none;
}

#close-fs {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10000;
}

/* =======================
   FOOTER
======================= */
.contact {
margin: 0 auto;
padding-left: 25px;
text-align: center;
}
footer {
  color: black;
  text-align: center;
  font-size: 0.9rem;
  padding: 50px;
}
.contact-viewer {
  cursor: pointer;
}