/* ====== Police ====== */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/Archivo-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
}
@font-face {
  font-family: 'Archivo';
  src: url('fonts/Archivo-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
}

/* ====== Variables ====== */
:root{
  --text-size: clamp(32px, 8vw, 96px);
  --lh: 1.05;
  --gutter: 40px;

  --arrow-size: calc(var(--text-size) * 0.80);
  --gallery-gap: clamp(180px, 20vh, 420px);
}

/* ====== Base ====== */
*, *::before, *::after { box-sizing: border-box; }
figure { margin: 0; }

html, body{
  margin: 0;
  padding: 0;
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body{
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: var(--text-size);
  line-height: var(--lh);
  -webkit-tap-highlight-color: transparent;
  color: #fff;
  background: #000;

  /* anti "grossissement auto" iOS sur texte */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Liens neutres */
.link{ color: inherit; text-decoration: none; cursor: pointer; }
.link:visited{ color: inherit; }
.link:hover, .link:focus-visible{ text-decoration: underline; outline: none; }

/* ===== Canvas / Panels ===== */
.app-canvas{
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
  z-index: 0;
  contain: paint;
  cursor: auto;
}
@media (pointer: coarse){
  .app-canvas{ cursor: auto; }
}

.panels{
  position: static;
  width: 100%;
  min-height: 100vh;
  overflow: visible;
}

.panel{
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  opacity: 1;
  pointer-events: auto;
  background: #000;
}

/* Espaces entre panneaux */
.panel + .panel{ margin-top: 14vh; }
.panel.home + .panel.works{ margin-top: 8vh; }
.panel.works + .panel.about{ margin-top: 20vh; }

/* Overlay / anim */
.panel.overlay{
  z-index: 100;
  will-change: transform;
  backface-visibility: hidden;
  contain: paint;
  opacity: 1;
  pointer-events: auto;
}
.panel.anim{ transition: transform 300ms ease; }

@media (prefers-reduced-motion: reduce){
  .panel.anim{ transition: none; }
}

/* Poignées */
.sp-edge{ display: none; }

/* Hauteurs */
.panels { min-height: 100vh; }
.panel.home, .panel.works { min-height: 100vh; }
.panel.about, .panel.clients, .panel.contact{ min-height: auto; }

/* ===== Home ===== */
.panel.home{
  display: flex;
  align-items: flex-end;
  font-size: calc(var(--text-size) * 0.80);
  line-height: var(--lh);
}

.panel.home .identity{
  position: relative;
  margin: 0 0 var(--gutter) var(--gutter);

  opacity: 0;
  transform: translateY(18px);
  animation: heroFadeInUp 900ms ease-out 220ms forwards;
}

.identity p.spaced{
  margin: 0.4em 0 0 0;   /* ✅ espace normal sous le nom */
  font-size: 0.50em;
  max-width: 70ch;
  line-height: 1.05;
  display: inline-block;

  font-family: 'Archivo', sans-serif;
  font-weight: 700;
}

.name{
  display: block;
  white-space: nowrap;        /* 🔥 force une seule ligne */
  font-size: 2.1em;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0;
  padding: 0;
}

.logo-name {
  display: block;
  max-width: min(80vw, 1100px);
  height: auto;
}

.no-drag {
  -webkit-user-drag: none;
  pointer-events: none;
}

@keyframes heroFadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .panel.home .identity {
    animation: none !important;
    opacity: 1;
    transform: none;
  }
}

/* ===== WORKS ===== */
.panel.works{
  --text-size: clamp(30px, 4.5vw, 60px);
  --lh: 1.22;
  font-size: var(--text-size);
  line-height: var(--lh);
}

/* Desktop / tablette : vidéo cadrée avec gutters */
.panel.works .works-inner{
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;

  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.panel.works .works-video{
  width: 100%;
  height: 120%;
  display: block;
  object-fit: cover;
  max-width: none;
}

/* ===== À PROPOS ===== */
.panel.about{
  --text-size: clamp(16px, 2.2vw, 28px);
  --lh: 1.28;
  font-size: var(--text-size);
  line-height: var(--lh);
}

.panel.about .about-title{
  position: static;
  margin: var(--gutter) var(--gutter) 0 var(--gutter);
  font-size: 5.0em;
  letter-spacing: 0em;
  text-transform: uppercase;
  text-align: right;
  pointer-events: none;

  opacity: 0;
  transform: translateY(18px);
}

.panel.about .about-title.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

.panel.about .about-main{
  max-width: 80ch;
  margin: 0;
  padding: var(--gutter);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.6em;

  opacity: 0;
  transform: translateY(18px);

  font-family: 'Archivo', sans-serif;
  font-weight: 400;
}

.panel.about .about-main.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

/* ===== CLIENTS ===== */
.panel.clients{
  --text-size: clamp(16px, 2.2vw, 28px);
  --lh: 1.28;
  font-size: var(--text-size);
  line-height: var(--lh);
}

.panel.clients .clients-title{
  position: static;
  margin: var(--gutter) var(--gutter) 0 var(--gutter);
  font-size: 5.0em;
  letter-spacing: 0em;
  text-transform: uppercase;
  text-align: right;
  pointer-events: none;

  opacity: 0;
  transform: translateY(18px);
}

.panel.clients .clients-title.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

.panel.clients .clients-main{
  max-width: 80ch;
  margin: 0;
  padding: var(--gutter);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.6em;

  opacity: 0;
  transform: translateY(18px);
}

.panel.clients .clients-main.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

.clients-intro-text {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
}

/* ===== CONTACT ===== */
.panel.contact{
  --text-size: clamp(16px, 2.2vw, 28px);
  --lh: 1.28;
  font-size: var(--text-size);
  line-height: var(--lh);
}

.panel.contact .contact-title{
  position: static;
  margin: var(--gutter) var(--gutter) 0 var(--gutter);
  font-size: 5.0em;
  letter-spacing: 0em;
  text-transform: uppercase;
  text-align: right;
  pointer-events: none;

  opacity: 0;
  transform: translateY(18px);
}

.panel.contact .contact-title.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

.panel.contact .contact-main{
  max-width: 80ch;
  margin: 0;
  padding: var(--gutter);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 0.6em;

  opacity: 0;
  transform: translateY(18px);
}

.panel.contact .contact-main.is-visible{
  animation: heroFadeInUp 900ms ease-out 0ms forwards;
}

.contact-intro-text {
  font-family: 'Archivo', sans-serif;
  font-weight: 400;
}

.contact-coords {
  font-size: 2.5em;
  line-height: 1.0;
}

/* ===== Désactiver la sélection de texte globale ===== */
.dragging, .dragging *{ user-select: none; }

html, body, .panel, .about-main, .identity {
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

input, textarea, [contenteditable="true"], .allow-select {
  -webkit-user-select: text;
  -ms-user-select: text;
  user-select: text;
  -webkit-touch-callout: default;
}

::selection { background: transparent; color: inherit; }
::-moz-selection { background: transparent; color: inherit; }

/* ===== Scroll indicator ===== */
.scroll-indicator {
  position: fixed;
  right: calc(var(--gutter) + 20px);
  bottom: var(--gutter);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;

  opacity: 0;
  transform: translateY(18px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.scroll-indicator-arrow {
  width: 18px;
  height: 18px;
  border-left: 5px solid #fff;
  border-bottom: 5px solid #fff;
  transform: rotate(-45deg);
  animation: scroll-indicator-bounce 1.2s ease-in-out infinite;
}

.scroll-indicator.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-indicator.is-hidden { opacity: 0; }

@keyframes scroll-indicator-bounce {
  0%, 100% { transform: translateY(0) rotate(-45deg); }
  50%      { transform: translateY(6px) rotate(-45deg); }
}

/* ==================== ORIENTATION LOCK ==================== */
.orientation-lock {
  display: none;
  position: fixed; inset: 0;
  background: #fff;
  color: #000;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: 'FGrotesk','Archivo',sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 4vw, 28px);
  line-height: 1.3;
  padding: 20px;
}
.orientation-lock .ol-inner { max-width: 400px; margin: auto; }
@media screen and (max-width: 1024px) and (orientation: landscape) {
  .orientation-lock { display: flex; }
}

/* ================= CADRE À 4 POINTS ================= */
.frame-dots {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 250;
  --frame-top: 120px;
  --frame-height: calc(100vh - 240px);
  --frame-inset-x: calc(var(--gutter) * 0.7);
}

.frame-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  transform: translate3d(0,0,0);
  transition:
    top 260ms ease-out,
    bottom 260ms ease-out,
    transform 260ms ease-out,
    opacity 200ms ease-out;
}

.frame-dot--tl { left: var(--frame-inset-x); top: var(--frame-top); }
.frame-dot--tr { right: var(--frame-inset-x); top: var(--frame-top); }
.frame-dot--bl { left: var(--frame-inset-x); top: calc(var(--frame-top) + var(--frame-height)); }
.frame-dot--br { right: var(--frame-inset-x); top: calc(var(--frame-top) + var(--frame-height)); }

.frame-dots.is-hidden .frame-dot { opacity: 0; }

/* =========================================================
   ====== MOBILE (≤700px) ======
   Objectifs :
   - plein écran (safe viewport)
   - pas de zoom (au max : meta viewport + touch-action)
   - WORKS = full-bleed (100vw, sans gutters)
   ========================================================= */
@media (max-width: 700px){

  :root{
    --gutter: 22px;
    --text-size: clamp(20px, 6.2vw, 46px);
  }

  html, body,
  .app-canvas, .panels, .panel{
    min-height: 100svh;
  }

  html, body{
    /* 👉 on s'assure que ça scrolle vraiment */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    /* tu peux garder ça si tu veux limiter les gestures horizontales */
    touch-action: pan-y;

    /* enlève overscroll-behavior pour l’instant, ça peut créer des effets chelous */
    /* overscroll-behavior: none; */
  }

  .name { white-space: normal; }

  /* ===== ABOUT ===== */
  .panel.about{ --text-size: clamp(16px, 4.4vw, 22px); --lh: 1.3; }
  .panel.about .about-main{
    padding:
      calc(var(--gutter) + env(safe-area-inset-top))
      var(--gutter)
      calc(var(--gutter) + env(safe-area-inset-bottom));
    gap: .6em;
  }
  .panel.about .about-title{
    margin-bottom: 0.6em;
    text-align: left;
  }

  /* ===== CLIENTS ===== */
  .panel.clients{ --text-size: clamp(16px, 4.4vw, 22px); --lh: 1.3; }
  .panel.clients .clients-main{
    padding:
      calc(var(--gutter) + env(safe-area-inset-top))
      var(--gutter)
      calc(var(--gutter) + env(safe-area-inset-bottom));
    gap: .6em;
  }
  .panel.clients .clients-title{
    margin-bottom: 0.6em;
    text-align: left;
  }
  .panel.clients .clients-main p[style]{
    font-size: 1.8em !important;
    line-height: 1.05;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* ===== CONTACT ===== */
  .panel.contact{ --text-size: clamp(16px, 4.4vw, 22px); --lh: 1.3; }
  .panel.contact .contact-main{
    padding:
      calc(var(--gutter) + env(safe-area-inset-top))
      var(--gutter)
      calc(var(--gutter) + env(safe-area-inset-bottom));
    gap: .6em;
  }
  .panel.contact .contact-title{
    margin-bottom: 0.6em;
    text-align: left;
  }

  /* Wrap mobile */
  .panel.about .about-main,
  .panel.clients .clients-main,
  .panel.contact .contact-main {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .contact-coords{
    font-size: 1.4em !important;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
  }
  #email{
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  /* Home spacing */
  .panel.home .identity{
    margin: 0 var(--gutter) calc(var(--gutter) * 1.4) var(--gutter);
  }

  /* Scroll indicator */
  .scroll-indicator{
    width: 24px;
    height: 24px;
    bottom: calc(env(safe-area-inset-bottom) + 12px);
    right: calc(var(--gutter) * 1.0);
  }
  .scroll-indicator-arrow{
    width: 14px;
    height: 14px;
    border-width: 4px;
  }

  /* Frame dots */
  .frame-dots { --frame-inset-x: calc(var(--gutter) * 0.3); }
  .frame-dot { width: 8px; height: 8px; }

  .panel.about .about-title,
  .panel.clients .clients-title,
  .panel.contact .contact-title{
    font-size: 3.2em;
    letter-spacing: -0.03em;
    max-width: 100%;
  }

  /* =====================================================
     ✅ WORKS FULL BLEED MOBILE (le point clé)
     - on enlève les gutters
     - on force 100vw
     - on prend 100svh
     ===================================================== */
  .panel.works{
    margin-top: 0; /* optionnel : si tu veux vraiment collé au panel home */
  }

  .panel.works .works-inner{
    padding-left: 0;
    padding-right: 0;
    width: 100vw;
    height: 100svh;
    /* garantit que ça colle au bord même si un parent a du padding */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
  }

  .panel.works .works-video{
    width: 100vw;
    height: 100svh;
    object-fit: cover;
    display: block;
  }
}

  /* Empêche le texte de se faire couper dans HOME */
  .panel.home{
    overflow: visible;              /* au lieu de hidden */
    min-height: 100svh;             /* mieux que 100vh sur mobile */
  }

  /* Sécurise la zone safe-area en bas */
  .panel.home .identity{
    margin-bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  }