/* =========================================================
   🌀 TUNNEL — style_2.css
   Version nettoyée et optimisée
   ========================================================= */

/* =========================================================
   🌑 RESET & BASE
   ========================================================= */
html, body {
  margin: 0;
  height: 100%;
  background: #000;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  overflow-x: hidden;
  scroll-behavior: smooth;
  cursor: none !important;
}

/* =========================================================
   🎛️ SLIDERS / CONTROL PANEL
   ========================================================= */
#controlPanel {
  position: relative;
  top: 0;
  left: 0;
  width: 100vw;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  background: #000;
  color: #fff;
  font-size: 12px;
  font-family: monospace;
  padding: 4px 6px;
  z-index: 10003;
  line-height: 1;
  pointer-events: auto;
  transition: transform 0.2s ease, opacity 0.4s ease; /* ⬅️ ajouté */
}

#controlPanel label {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  color: #aaa;
}

#controlPanel input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 50%;
  height: 6px;
  background: transparent;
  cursor: pointer;
  margin: 0;
}

/* --- Piste --- */
#controlPanel input[type="range"]::-webkit-slider-runnable-track {
  height: 1px;
  background: #fff;
  border-radius: 1px;
}
#controlPanel input[type="range"]::-moz-range-track {
  height: 1px;
  background: #fff;
  border-radius: 1px;
}

/* --- Curseur --- */
#controlPanel input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 1px;
  height: 10px;
  background: white;
  border: none;
  margin-top: -5px;
}
#controlPanel input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  border: none;
}

/* --- Focus --- */
#controlPanel input[type="range"]:focus {
  outline: none;
}

/* --- Boutons couleur --- */
#colorButtons {
  display: inline-flex;
  gap: 4px;
}
#colorButtons button {
  background: none;
  border: 1px solid #fff;
  color: #fff;
  font-size: 11px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  padding: 0;
  text-align: center;
  transition: background 0.2s, color 0.2s;
}
#colorButtons button:hover,
#colorButtons button.active {
  background: #fff;
  color: #000;
}

#controlPanel select {
  background: #000;
  color: #fff;
  border: 1px solid #555;
  font-family: monospace;
  font-size: 11px;
  padding: 2px 4px;
  cursor: pointer;
}

/* =========================================================
   🎚️ MASQUAGE AUTOMATIQUE DU CONTROL PANEL
   ========================================================= 
#controlPanel.hidden {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
} */

/* =========================================================
   🧱 HEADER
   ========================================================= */
header {
  position: fixed;
  top: 40px;
  left: 0;
  width: 100vw;
  background: color-mix(in srgb, #000 100%, var(--debug-header) calc(var(--debug-mode) * 100%));
  border: calc(var(--debug-mode) * 1px) solid rgba(0, 128, 255, 0.4);
  padding: 3vw 3vw 1.5vw;
  color: #d4d4d4;
  z-index: 1 !important;
  pointer-events: none;
}

.title-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  white-space: nowrap;
  line-height: 0.84;
  text-align: left;
  width: 98vw;
  left: 1vw;
}
.title-line {
  display: block;
}

/* =========================================================
   🔻 INTRO
   ========================================================= */
#studio-intro {
  position: relative;
  isolation: isolate;
  z-index: 10001;
  color: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: normal;
  box-sizing: border-box;
  mix-blend-mode: normal;
  background: color-mix(in srgb, #000 100%, var(--debug-intro) calc(var(--debug-mode) * 100%));
  padding: 0rem 4vw 0rem 1.2rem;
  margin: 0;
  max-width: 100%;
  text-align: left;
}
#studio-intro p { margin: 0; }

/* =========================================================
   📂 MAIN / PORTFOLIO
   ========================================================= */
main {
  position: relative;
  z-index: 10001;
  background: color-mix(in srgb, #000 100%, var(--debug-main) calc(var(--debug-mode) * 100%));
  border: calc(var(--debug-mode) * 1px) solid rgba(0, 255, 0, 0.4);
  color: #fff;
  padding: 50px 1.2rem; /* marge horizontale uniforme */
  margin-top: 0;
}

/* --- Rows --- */
.project-row {
  font-size: 0.85rem;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  border-bottom: 1px solid #333;
  height: 6vh; /* 🔹 chaque ligne prend 10% de la hauteur de l’écran */
  padding: 0 0rem; /* 🔹 on supprime le padding vertical */
  cursor: pointer;
  transition: color 0.3s;
}


.project-row .year {
  justify-self: end;     /* pousse complètement à droite */
  text-align: right;     /* aligne le texte à droite */
}

.project-row:hover { color: #aaa; }
/*.project-row.open { font-weight: bold; } tempoDisable */ 


/* =========================================================
   🎞️ DÉTAILS DE PROJETS (fusion + animation)
   ========================================================= */
.project-detail {
  position: relative;
  width: 100vw;
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  opacity: 0;
  overflow: hidden;
  background: inherit;
  color: inherit;
  box-sizing: border-box;
  transition: transform 0.3s ease, opacity 0.1s ease-out;
  will-change: transform, opacity;
  max-height: 0;
  padding: 0;
}
.project-detail.open {
  transform: translateX(-50%) scaleY(1);
  opacity: 1;
  max-height: none;
}

/* --- Slider --- */
.slider-container {
  position: relative;
  width: 100%;
  height: 88vh;
  overflow: hidden;
}
.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.3 ease;
  will-change: transform;
}
.slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.slide img,
.slide video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}
.slide img.full,
.slide video.full { object-fit: cover; }
.slide img.contained,
.slide video.contained { object-fit: contain; }

/* --- Navigation --- */
.nav-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  z-index: 10;
}
.nav-zone.left { left: 0; }
.nav-zone.right { right: 0; }

/* --- Indicateur --- */
.indicator {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 15;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: background 0.3s;
}
.dot.active { background: #fff; }

/* --- Description --- */
.description {
  margin-top: 2rem;
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2rem;
  display: none !important;
}

/* =========================================================
   🖱️ CURSEUR + TRAÎNÉE
   ========================================================= */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  z-index: 20000;
  pointer-events: none;
}
.cursor::before,
.cursor::after {
  content: "";
  position: absolute;
  background: #fff;
}
.cursor::before {
  width: 2px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}
.cursor::after {
  height: 2px;
  width: 100%;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.cursor.active {
  transform: translate(-50%, -50%) rotate(45deg);
  transition: transform 0.1s ease;
}

#ratioDisplay {
  position: fixed;
  top: 40px;
  right: 1rem;
  font-size: 12px;
  color: #999;
  z-index: 10001;
  font-family: monospace;
  white-space: nowrap;
  pointer-events: none;
}

#trailCanvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 2 !important;
  mix-blend-mode: normal;
  pointer-events: none;
}
/* Désactive le curseur natif uniquement sur desktop */
@media (hover: hover) and (pointer: fine) {
  body, html {
    cursor: none !important;
  }
}

/* =========================================================
   📱 RESPONSIVE
   ========================================================= */
@media (max-width: 700px) {
  main { padding: 2rem 4vw; }

  .project-row {
    grid-template-columns: 1fr 1fr 100px;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.3;
  }

  .slider-container { height: 76.2vh !important; }

  .slide img,
  .slide video {
    height: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  #trailCanvas {
    pointer-events: auto;
    touch-action: none;
  }
}

/* =========================================================
   🧩 DEBUG VISUEL
   ========================================================= */
:root {
  --debug-mode: 0;
  --debug-intro: rgba(255, 0, 0, 0.25);
  --debug-main: rgba(0, 255, 0, 0.25);
  --debug-header: rgba(0, 128, 255, 0.25);
}

/* --- Grille fine --- */
:root {
  --grid-mode: 0;
  --grid-color: rgba(255,255,255,0.2);
  --grid-size: 80px;
}
#debugGrid {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99998;
  background-image:
    linear-gradient(to right, var(--grid-color) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
  opacity: calc(var(--grid-mode) * 1);
  transition: opacity 0.1s ease;
}

/* --- Grille 12 colonnes --- */
:root {
  --grid12-mode: 0;
  --grid12-columns: 12;
  --grid12-gutter: 20px;
  --grid12-color: rgba(255, 255, 255, 0.2);
  --grid12-max-width: 1400px;
}
#debugGrid12 {
  pointer-events: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--grid12-max-width);
  height: 100vh;
  z-index: 99997;
  display: grid;
  grid-template-columns: repeat(var(--grid12-columns), 1fr);
  column-gap: var(--grid12-gutter);
  opacity: calc(var(--grid12-mode) * 1);
  transition: opacity 0.3s ease;
  padding: 0 var(--grid12-gutter);
}
#debugGrid12::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to right,
    transparent,
    transparent calc(100% / var(--grid12-columns) - var(--grid12-gutter) / 2),
    var(--grid12-color) calc(100% / var(--grid12-columns) - var(--grid12-gutter) / 2),
    var(--grid12-color) calc(100% / var(--grid12-columns) + var(--grid12-gutter) / 2)
  );
}

/* =========================================================
   🔻 FOOTER
   ========================================================= */
#contact-footer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 0rem 1.2rem;
  background: #000;
  color: #aaa;
  text-align: left;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  z-index: 10000;
}
#contact-footer a {
  color: #fff;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
#contact-footer a:hover { opacity: 0.7; }
#contact-footer .contact-line { opacity: 0.4; }
#contact-footer .contact-item { margin: 0.1rem 0; }

/* hard kill du curseur custom TEST CURSOR OFF */
#cursor { display: none !important; }
/* réactive le curseur natif si tu avais forcé none quelque part */
html, body { cursor: auto !important; }

/* 🚫 Empêche la sélection de texte partout */
* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* ✅ Réactive la sélection uniquement dans le footer */
footer, footer * {
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}