*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --green:   #00FF41;
  --dark:    #0d0d0d;
  --mid:     #1a1a1a;
  --white:   #FFFFFF;
  --magenta: #FF00A8;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--dark);
  font-family: 'Almendra', serif;
  cursor: none;
}

body.loading { opacity: 0; }
body.js-ready { opacity: 1; transition: opacity 0.15s ease; }

/* ─── TICKER GLOBAL ──────────────────────────────────────── */
.site-ticker {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  overflow: hidden;
  z-index: 980;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Hammersmith One', sans-serif;
  font-size: 11px;
  letter-spacing: 9px;
  text-transform: uppercase;
  color: #333232;
}



/* ─── CANVAS THREE.JS ─────────────────────────────────────── */
#three-canvas {
  position: fixed;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 0;
  pointer-events: none;
  display: block;
}

/* ─── CURSEUR ─────────────────────────────────────────────── */
.cursor {
  position: fixed;
  width: 14px;
  height: 14px;
  background: var(--green);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  mix-blend-mode: exclusion;
  transition: width 0.15s ease, height 0.15s ease, background 0.15s ease;
  will-change: left, top;
}
.cursor.hover {
  width: 38px;
  height: 38px;
  background: var(--magenta);
}

/* ─── HUD ─────────────────────────────────────────────────── */
#hud {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 22px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
.hud-name {
  font-family: 'Hammersmith One', normal;
  font-size: 14px;
  letter-spacing: 5px;
  color: var(--green);
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: auto;
  cursor: pointer;
}
.hud-name-img {
  width: clamp(160px, 10vw, 400px);
  height: auto;
  display: block;
  margin: 2rem 2rem 20px 2rem auto;
  padding-left: 2rem;
  padding-top: 1rem;
  transition: filter 0.2s ease-in-out;
}
.hud-name:hover .hud-name-img {
  filter: drop-shadow(-1px 6px 0px #00FF41);
}
.hud-name.visible { opacity: 1; }
.hud-scene {
  font-family: 'Hammersmith One', normal;
  font-size: 13px;
  text-align: right;
  padding-top: 1rem;
  padding-right: 2rem;
  letter-spacing: 4px;
  color: #444;
  filter:invert();
  text-transform: uppercase;
}

/* ─── EMAIL FLOTTANT 3D (scène Contact) ──────────────────── */
#contact-email-hud {
  position: fixed;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  font-family: 'Almendra', serif;
  font-size: clamp(26px, 5.2vw, 66px);
  letter-spacing: 4px;
  text-decoration: none;
  color: var(--green);
  white-space: nowrap;

  /* Ancrage : centre horizontal et vertical du point projeté */
  transform: translate(-50%, -50%) rotate(-8deg);

  /* Drop shadow pour lisibilité sur le sprite */
  filter: drop-shadow(2px 3px 0px rgba(0,0,0,0.9));

  transition: opacity 0.1s ease, filter 0.45s ease, color 0.15s ease;
  cursor: pointer;
}

#contact-email-hud.visible {
  pointer-events: auto;
  opacity: 1;
}

#contact-email-hud:hover {
  color: var(--white);
  filter:drop-shadow(10px 16px 0px rgba(0,0,0,0.9));
}

/* ─── PANNEAUX DE SCÈNES (overlays) ──────────────────────── */
.scene-panel {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s ease, visibility 0s linear 0.55s;
  body:not(.js-ready) .scene-panel { visibility: hidden !important; opacity: 0 !important; }
}
.scene-panel.active {
  pointer-events: auto;
  opacity: 1;
  visibility: visible;
  transition: opacity 0s ease, visibility 0s linear 0s;
}
body:not(.js-ready) .scene-panel {
  visibility: hidden !important;
  opacity: 0 !important;
}


/* ─── INTRO ───────────────────────────────────────────────── */
#panel-intro {
  justify-content: center;
  text-align: center;
}
.intro-content {
  width: min(90vw, 900px); margin: 0 auto;
  text-align: center;
  width: min(90vw, 900px);
  margin: 0 auto;
}
.intro-name {
  font-family: 'Almendra', serif;
  font-size: clamp(56px, 9.5vw, 140px);
  color: var(--white);
  letter-spacing: 6px;
  text-transform: uppercase;
  line-height: 1;
  -webkit-text-stroke: 3px #000;
  paint-order: stroke fill;
  filter: drop-shadow(4px 6px 0px rgba(0,0,0,0.8));
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 10px;
}
.intro-name span {
  display: inline-block;
  transform: rotate(var(--rot, 0deg));
}
.click-prompt {
  margin-top: 30%;
  font-size: 19px;
  color: var(--white);
  letter-spacing: 3px;
  padding: 9px 40px 50px;
  display: block; width: clamp(160px, 28vw, 400px); height: auto; margin-left: auto; margin-right: auto;
  width: clamp(160px, 28vw, 400px);
  height: auto;
  margin-left: auto;
  margin-right: auto;
  animation: blink 1.3s ease-in-out infinite;
  cursor: pointer;
}

/* ─── IMAGE TITRE INTRO ───────────────────────────────────── */
.intro-title-img {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(4px 6px 0px rgba(0,0,0,0.85));
}

/* ─── IMAGES NAV (remplacement du texte) ─────────────────── */
.nav-img {
  height: clamp(42px, 6.5vw, 88px);
  width: auto;
  max-width: 100%;
  display: block;
  transition: 0.12s ease;
  position: relative;
  z-index: 1;
  height: clamp(58px, 5.5vw, 78px);
}

.nav-item:hover .nav-img {
  filter: drop-shadow(2px 3px 0px rgb(0, 0, 0));
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}

/* ─── PANEL LEFT (colonnes menu / vidéo / contact) ───────── */
.panel-left {
  padding-left: max(68px, 19vw);
  display: flex;
  flex-direction:unset;
  gap: 20px;
  max-width: min(860px, 80vw);
  /* pointer-events hérite du parent .scene-panel (none → auto selon .active) */
}

/* ─── NAVIGATION PRINCIPALE ──────────────────────────────── */
.main-nav {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  position: fixed;
  top: 55%;
  left: max(68px, 19vw);
  transform: translateY(-50%);
  gap: clamp(40px, 4vw, 52px);
  z-index: 1;
}
.nav-item {
  position: relative;                     /* contexte pour .nav-textbox */
  text-decoration: none;
  cursor: pointer;
}
.nav-item:hover { color: var(--green); }



/* Textbox SVG (derrière le texte, apparaît au hover avec wiggle saccadé) */
.nav-textbox {
  position: absolute;
  top: 2px;
  left: -8px;
  width: calc(100% + 16px);
  height: auto;
  z-index: 3;
  opacity: 0;
mix-blend-mode: difference;
pointer-events: none;
}
.nav-item:hover .nav-textbox {
  opacity: 1;
  animation: textbox-wiggle 0.2s steps(4) infinite;
}
@keyframes textbox-wiggle {
  0%   { transform: rotate(-2.5deg) translate(-2px,  1px) ; }
  25%  { transform: rotate( 2.0deg) translate( 2px, -1px); }
  50%  { transform: rotate(-1.5deg) translate(-1px, -2px); }
  75%  { transform: rotate( 3.0deg) translate( 1px,  2px); }
}
@keyframes highlight-wiggle {
  0%   { transform:  scale(1.5, 0.5) ;transform-origin: 0% 0% 100% 50%;}
  25%  { transform:  skew(-20deg, 6deg)scale(1, 0.5);transform-origin: 0% 0% 100% 50%;}
  75%  { transform:  skew(10deg, 2deg)scale(1, 1) ;transform-origin: 0% 0% 100% 50%;}
  100%   { transform:  scale(1.5, 0.5) ;transform-origin: 0% 0% 100% 50%;}

}

#navHighlight {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-3deg);
  z-index: 0;
  pointer-events: none;
  
}
.nav-highlight-dup {
  transform-box: fill-box;
  transform-origin: right;
  animation: highlight-wiggle 1s linear infinite;
  mix-blend-mode: difference;
}


/* ─── LABEL DE SECTION ───────────────────────────────────── */
.section-label {
position: absolute;
top:20%;
width: auto;
height: auto;
}

/* ─── REEL PANEL ─────────────────────────────────────────── */
.reel-panel {
  background: #0a0a0a;
  border: 3px solid var(--white);
  width: 100%;
}
.reel-tabs { display: flex; }
.reel-tab {
  font-family: 'Almendra', serif;
  font-size: 15px;
  padding: 7px 18px;
  background: var(--dark);
  color: var(--white);
  border-bottom: 3px solid var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.reel-tab.active {
  background: var(--green);
  color: #000;
  border-bottom-color: var(--green);
}
.reel-tab:hover:not(.active) { background: #1a1a1a; }
.reel-list { padding: 2px 0; }
.reel-item {
  display: flex;
  align-items: center;
  padding: 11px 14px;
  border-bottom: 1px solid #1e1e1e;
  gap: 12px;
  cursor: pointer;
  transition: background 0.12s;
}
.reel-item:last-child { border-bottom: none; }
.reel-item:hover { background: #141414; }

.reel-info { flex: 1; min-width: 0; }
.reel-title {
  font-family: 'Almendra', static, serif;
  font-size: 13px;
  color: var(--white);
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reel-meta {
  font-family: 'Hammersmith One', serif;
  font-size: 11px;
  font-optical-sizing: auto;
  font-weight: 500;
  font-style: normal;
  color: #555;
  margin-top: 2px;
  letter-spacing: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reel-play {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.reel-play::after {
  content: '';
  border-left: 8px solid var(--white);
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  margin-left: 2px;
}
a.reel-play {
  text-decoration: none;
}

/* ─── FORMULAIRE CONTACT ─────────────────────────────────── */
.contact-card {
  padding: 24px 26px;
  width: 100%;
}
.contact-subtitle {
  
  font-family: 'Almendra', serif;
  font-size: 11px;
  letter-spacing: 4px;
  color: var(--green);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.subtitle-bar {
  display: block;
  width: 18px;
  height: 3px;
  background: var(--green);
  flex-shrink: 0;
}
.contact-field { margin-bottom: 16px; }
.contact-field label {
  display: block;
  font-family: 'Almendra', serif;
  font-size: 10px;
  letter-spacing: 3px;
  color: #555;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  background: var(--mid);
  border: none;
  border-bottom: 2px solid #333;
  color: var(--white);
  font-family: 'Almendra', serif;
    text-transform: uppercase;
  font-size: 14px;
  padding: 8px 10px;
  outline: none;
  transition: border-color 0.2s;
  cursor: text;
}
.contact-field input:focus,
.contact-field textarea:focus { border-bottom-color: var(--green); }
.contact-field textarea { resize: none; height: 76px; }
.contact-submit {
  font-family: 'Almendra', serif;
  font-size: 17px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #000;
  background: var(--green);
  border: none;
  padding: 11px 30px;
  cursor: pointer;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
  transition: background 0.15s, transform 0.12s;
}
.contact-submit:hover { background: var(--white); transform: translateY(-2px); }

/* ─── BOUTON RETOUR ──────────────────────────────────────── */
.back-btn {
  color: var(--white);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: color 0.15s;
}
.back-btn::before { content: '→'; font-size: 6rem; }
.back-btn:hover { color: var(--green); }

/* Back btn video + contact : position fixe identique */
#backFromVideo,
#backFromContact {
  position: fixed;
  bottom: 70px;
  right: 10%;
  z-index: 20;
}

/* ─── VIDEO PANEL CONTENT ────────────────────────────────── */
.video-panel-content {
  position: fixed;
  left: max(50px, 8vw);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: clamp(260px, 32vw, 480px);
}

.video-section-label {
  width: 80%;
  padding-bottom: 2rem;
  height: auto;
  display: block;
}

/* ─── REEL BOX WRAPPER — taille fixe, même dimensions pour les 2 SVG ── */
.reel-box-wrapper {
  position: relative;
  width: 120%;
  aspect-ratio: 1 / 1;
}

.reel-box-bg {
  position: absolute;
  inset: 0;
  width: 120%;
  height: 120%;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
  display: block;
}


/* ─── ONGLETS INVISIBLES (zones cliquables sur SVG) ──────── */
.reel-box-wrapper .reel-tabs {
  position: absolute;
  top: 0;
  left: 0;
  width: 120%;
  height: 20%;
  z-index: 2;
  opacity: 0;
  display: block;
  border: none;
}

/* Zone Reels : décoration SVG à x 3-25%, y 2-20% du SVG */
.reel-box-wrapper .reel-tab[data-tab="reels"] {
  position: absolute;
  left: 3%;
  top: 0;
  width: 23%;
  height: 100%;
  cursor: pointer;
}

/* Zone YouTube : décoration SVG à x 29-47%, y 4-17% du SVG */
.reel-box-wrapper .reel-tab[data-tab="youtube"] {
  position: absolute;
  left: 29%;
  top: 0;
  width: 19%;
  height: 100%;
  cursor: pointer;
}

/* Contenu ancré dans la zone sombre du SVG (sous les onglets, dans le cadre) */
.reel-inner {
  position: absolute;
  left: 10%;
  top: 25%;
  right: 2%;
  bottom: -10%;
  z-index: 1;
  overflow: hidden;
}

/* ─── ANIMATION STRETCH AU CLIC D'ONGLET ────────────────── */
@keyframes reelbox-stretch {
  0%   { transform: scaleY(1); }
  40%  { transform: scaleY(1.10); }
  72%  { transform: scaleY(0.97); }
  100% { transform: scaleY(1); }
}
.reel-box-bg.stretching {
  transform-origin: top center;
  animation: reelbox-stretch 0.1s steps(1);
}

/* ─── ZONE SCROLLABLE DES PROJETS ────────────────────────── */
.reel-scroll-area {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--green) #1a1a1a;
}
.reel-scroll-area::-webkit-scrollbar { width: 4px; }
.reel-scroll-area::-webkit-scrollbar-track { background: #1a1a1a; }
.reel-scroll-area::-webkit-scrollbar-thumb { background: var(--green); }

/* ─── CONTACT PANEL CONTENT (miroir du video panel) ─────── */
.contact-panel-content {
  position: fixed;
  left: max(50px, 8vw);
  top: 60%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: clamp(260px, 32vw, 480px);
}

.contact-section-label {
  width: 82%;
  height: auto;
  display: block;
  padding-bottom: 0.5rem;
}

/* ─── CONTACT BOX (miroir du reel-box-wrapper) ───────── */
.contact-box-wrapper {
  position: relative;
  width: 120%;
}

.contact-box-bg {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  object-fit: fill;
  z-index: 0;
  pointer-events: none;
  display: block;
}

.contact-inner {
  position: relative;
  z-index: 1;
  padding: 20px 22px 22px;
}


/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE (≤ 768px)
   Priorité mobile : navigation, overlays, sprites Three.js
═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

  /* ─── Curseur custom désactivé sur écran tactile ─────── */
  html, body { cursor: auto; }
  .cursor { display: none; }

  /* ─── HUD ─────────────────────────────────────────────── */
  #hud { padding: auto;
    justify-content: center;
 }
  .hud-name-img {
  width: clamp(160px, 54vw, 200px);
  margin: 1.2rem auto;
  justify-content: center;
  padding: 0;
  }
  .hud-scene {
display: none;
  }
  #contact-email-hud {
    transform: translate(-140%, -400%) rotate(-3deg) scale(1.5);

  }

  /* ─── Ticker ──────────────────────────────────────────── */
  .site-ticker {
    color: rgba(255, 255, 255, 0.4);
    justify-content: center;
    font-size: clamp(1px, 7px, 26px);
    letter-spacing: 2px;
    background: rgba(0, 0, 0, 0.85);
  }

  /* ─── INTRO ───────────────────────────────────────────── */
  .intro-content { width: min(92vw, 900px); }
  .intro-title-img { max-width: 60vw; }
  .click-prompt {
    width: clamp(230px, 46vw, 280px);
    margin-top: 18%;
  }

  /* ─── NAV PRINCIPALE — centrée sur mobile ────────────── */
  .panel-left {
    padding-left: 0;
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
  .main-nav {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .nav-img {
    height: clamp(50px, 15vw, 78px);
  }
  #navHighlight {
    transform: translate(0%, -10%) rotate(-3deg);
  }

  /* ─── VIDEO PANEL ─────────────────────────────────────── */
  .video-panel-content {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(88vw, 360px);
  }
  /* Reel box : ramener à 100% pour éviter le débordement */
  .reel-box-wrapper {
    width: 110%;
  }
  .reel-box-bg {
    width: 100%;
  }
  .reel-box-wrapper .reel-tabs {
    width: 110%;
  }
  .reel-inner {
    top: 28%;
    left: 8%;
    right: 18%;
    bottom:-2%;
  }
  /* Scroll tactile natif pour la liste */
  .reel-scroll-area {
    -webkit-overflow-scrolling: touch;
    overflow-y: scroll;
  }
  .reel-title { font-size: 12px; }
  .reel-meta  { font-size: 10px; }

  /* ─── CONTACT PANEL ───────────────────────────────────── */
  .contact-panel-content {
    visibility:hidden;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(88vw, 360px);
  }
  .contact-box-wrapper { width: 100%; }
  .contact-inner { padding: 14px 16px 16px; }
  .contact-card  { padding: 14px 16px; }
  .contact-field input,
  .contact-field textarea { font-size: 13px; }
  .contact-submit { padding: 10px 26px; font-size: 15px; }

  /* ─── BOUTONS RETOUR ──────────────────────────────────── */
  #backFromVideo,
  #backFromContact {
    bottom: 100px;
    left: 10%;
  }
  .back-btn::before { font-size: 3.5rem; }

  /* ─── EMAIL HUD (scène Contact) ───────────────────────── */
  #contact-email-hud {
    font-size: clamp(13px, 3.8vw, 22px);
    letter-spacing: 2px;
  }
}

/* ─── Très petit écran (≤ 390px) ──────────────────────────── */
@media (max-width: 390px) {
  .video-panel-content,
  .contact-panel-content { width: 94vw; }
  .reel-title { font-size: 11px; }
  .contact-field input,
  .contact-field textarea { font-size: 12px; }
  .contact-submit { padding: 9px 20px; font-size: 14px; }
  .back-btn::before { font-size: 2.8rem; }
}

/* ═══════════════════════════════════════════════════════════
   PANNEAU MOBILE DÉDIÉ (#panel-mobile)
   Page unique téléphone — Reels & YouTube en onglets
═══════════════════════════════════════════════════════════ */

/* Caché sur desktop */
#panel-mobile { display: none; }

@media (max-width: 768px) {
  #panel-mobile { display: flex; }
}

.mob-panel-inner {
  position: fixed;
  left: 0;
  right: 0;
  top: 85px;
  bottom: 34px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Barre d'onglets ────────────────────────────────────── */
.mob-tab-bar {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 0;
  margin-left: 18px;
  padding: 0 20px;
  flex-shrink: 0;
}

.mob-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  padding: 30px 16px 10px;
  opacity: 0.8;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: -1px;
  transition: opacity 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mob-tab.active {
  opacity: 1;
  border-bottom-color: var(--green);
}

.mob-tab-reels {
  height: 34px;
  width: auto;
  display: block;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.952));
  }

.mob-tab-yt {
  height: 36px;
  width: auto;
  display: block;
  filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, 0.952));
}



/* ─── Zone scrollable ────────────────────────────────────── */
.mob-scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--green) transparent;
  background: rgba(0, 0, 0, 0.8);
}

.mob-scroll-area::-webkit-scrollbar { width: 3px; }
.mob-scroll-area::-webkit-scrollbar-track { background: transparent; }
.mob-scroll-area::-webkit-scrollbar-thumb { background: var(--green); }

/* Hérite des styles .reel-item — ajustements tactiles */
.mob-list .reel-item {
  padding: 13px 20px;
  position: relative;
}

.mob-list .reel-item .reel-play {
  width: 30px;
  height: 30px;
  position: static;
}

/* Zone de tap étendue à toute la ligne */
.mob-list .reel-item .reel-play::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
}

.mob-list .reel-title { font-size: 13px; }
.mob-list .reel-meta  { font-size: 10px; }
