/* ---------------------- GLOBAL ---------------------- */
html, body {
  margin: 0;
  height: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-y: auto;
  font-family: Arial, Helvetica, sans-serif;
}

body.zoom-out {
  transform: scale(1.2);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* ---------------------- CONTAINER ---------------------- */
.container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
}

/* ---------------------- PANELS ---------------------- */
.panel {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  justify-content: center;
  position: relative;
}

/* ⚠️ important : PAS de centrage vertical global */
.panel:not(.about) {
  align-items: center;
}

/* ---------------------- LABEL SIHTTAM ---------------------- */
.panel::before {
  content: "SIHTTAM";
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 0.9rem;
  letter-spacing: 0.15em;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 10;
  pointer-events: none;
}

.sound-design::before { background: #ff0055; color: #00ff99; }
.films::before        { background: #fff;     color: #000; }
.music::before        { background: #000066;  color: #ffff99; }
.about::before        { background: #00ff99;  color: #cc0066; }

/* ---------------------- TITRES ---------------------- */
.panel h1 {
  font-size: 2.2rem;
  letter-spacing: 0.4em;
  padding: 12px 22px;
  font-weight: 500;
  margin: 0;
  transition: transform 0.3s ease, letter-spacing 0.3s ease;
  display: inline-block;
  cursor: pointer;
}

.panel h1:hover {
  transform: scale(1.05);
  letter-spacing: 0.5em;
}

/* ---------------------- COULEURS DES PANELS ---------------------- */
.sound-design { background: #00ff99; }
.sound-design h1 { background: #ff0055; color: #00ff99; }

.films { background: #000; }
.films h1 { background: #fff; color: #000; }

.music { background: #ffff99; }
.music h1 { background: #000066; color: #ffff99; }

.about { 
  background: #cc0066;
  align-items: flex-start;
  justify-content: center;
  align-items: center;
}

/* ---------------------- ABOUT ---------------------- */
.about-box {
  background: #00ff99;
  color: #cc0066;
  letter-spacing: 0.4em;
  cursor: pointer;
  transition: transform 0.3s ease;

  /* 🔑 SCROLL INTERNE */
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;

  display: inline-block;
}

.about-box:hover {
  transform: scale(1.05);
}

.about-description {
  max-height: 60vh;
  overflow-y: auto;
  margin-top: 12px;
  width: 90vw;
  box-sizing: border-box;
  text-align: center;
  letter-spacing: normal;
  line-height: 1.6;
}

.about-description a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.about-description a:hover {
  color: #fff;
}

.hidden {
  display: none;
}

/* ---------------------- NAV FIXE ---------------------- */
.nav {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav button {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: #fff;
  padding: 6px 10px;
  cursor: pointer;
  letter-spacing: 0.2em;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.nav button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.nav button.active {
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  transform: translateY(-3px) scale(1.02);
}

.nav .swatch {
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.12);
}

.nav button[data-target="sound-design"] .swatch { background: #ff0055; }
.nav button[data-target="films"] .swatch        { background: #fff; }
.nav button[data-target="music"] .swatch        { background: #000066; }
.nav button[data-target="about"] .swatch        { background: #00ff99; }

/* ---------------------- LOUPE ---------------------- */
.loupe {
  position: fixed;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  backdrop-filter: invert(1);
  -webkit-backdrop-filter: invert(1);
  border: 2px solid rgba(255,255,255,0.6);
  box-shadow: 0 0 25px rgba(0,0,0,0.25);
}

/* ---------------------- MOBILE ---------------------- */
@media (max-width: 600px) {

  .container {
    scroll-snap-type: y mandatory;
  }

  .panel h1 {
    font-size: 1.6rem;
    letter-spacing: 0.25em;
  }

  .about-box {
    margin-top: 60px;
    max-height: calc(100vh - 110px);
  }

  .about-description {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .loupe {
    display: none;
  }
}
