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

.chivo-mono-kica {
  font-family: "Chivo Mono", monospace;
  font-optical-sizing: auto;
  font-weight: 100;
  font-style: normal;
}

:root {
  --black: #151415;
  --white: #ffffff;
  --font-main: "Chivo Mono",
    monospace;
  --sidebar-width: 175px;
  --sidebar-offset: 24px;
  --transition: 0.22s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  /* On permet le scroll horizontal ici */
  overflow-x: auto;
  overflow-y: hidden;
  /* On enlève smooth car le JS va gérer les deltas */
  scroll-behavior: auto;
}

body {
  background: var(--black);
  height: 100vh;
  /* On s'assure que le body ne bloque pas le scroll */
  overflow: visible;
  font-family: var(--font-main);
}

img {
  display: block;
  width: 100%;
  height: auto;
}

/* ================================
   SIDEBAR (même style que menu)
================================ */
.sidebar {
  position: fixed;
  top: 24px;
  left: var(--sidebar-offset);
  width: var(--sidebar-width);
  height: calc(100vh - 48px);
  background: var(--black);
  display: flex;
  flex-direction: column;
  padding: 24px 0 0 0;
  overflow: hidden;
  z-index: 1000;
}

.logo {
  display: flex;
  align-items: baseline;
  padding: 0 14px 32px 14px;
  cursor: default;
  user-select: none;
}

.logo-link {
  text-decoration: none;
  color: inherit;
}

.logo-text {
  font-family: var(--font-main);
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: lowercase;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-main);
  font-size: 1em;
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--white);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition: color var(--transition);
  background: var(--black);
  border: none;
  outline: none;
  line-height: 1.4;
  width: 100%;
  height: 52px;
  padding: 0 14px;
  border-top: 2px solid var(--white);
}

.nav-label {
  position: relative;
  z-index: 2;
  pointer-events: none;
  text-align: left;
}

.nav-dash {
  position: relative;
  z-index: 2;
  opacity: 1;
  font-size: 13px;
  pointer-events: none;
  transition: color var(--transition);
  flex-shrink: 0;
}

.hover-square {
  position: absolute;
  inset: 0;
  background: var(--white);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.77, 0, 0.175, 1);
  z-index: 1;
}

.nav-item:hover .hover-square {
  transform: scaleX(1);
}

.nav-item:hover .nav-label,
.nav-item:hover .nav-dash {
  color: var(--black);
}

.nav-item.active .hover-square {
  transform: scaleX(1);
}

.nav-item.active .nav-label,
.nav-item.active .nav-dash {
  color: var(--black);
}

.nav-section {
  position: relative;
}

.submenu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  background: var(--black);
}

.nav-section:hover .submenu,
.nav-section.has-active .submenu {
  max-height: 200px;
}

.nav-item--sub {
  height: 44px;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.spacer {
  flex: 1;
}

.contact-zone {
  display: flex;
  flex-direction: column;
}

.contact-line {
  width: 100%;
  height: 1px;
  background: var(--white);
  opacity: 1;
}

/* ================================
   HORIZONTAL SCROLL CONTAINER
================================ */
.horizontal-container {
  display: flex;
  height: 100vh;
  width: fit-content;
  /* On ajoute une marge à gauche pour la sidebar */
  padding-left: calc(var(--sidebar-width) + var(--sidebar-offset));
  margin-left: 0;
}

.page-conte .horizontal-container,
.page-femmesport .horizontal-container {
  flex-direction: column;
  width: 100%;
  height: auto;
  min-height: 100vh;
  padding-top: 24px;
}

.page-conte .section-2,
.page-femmesport .section-2 {
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  padding: 0 24px 8px 24px;
  margin-right: 0;
}

.page-conte .quote-text,
.page-femmesport .quote-text {
  max-width: 420px;
}

.page-conte .quote,
.page-femmesport .quote {
  font-size: 0.72em;
  line-height: 1.35;
}

.page-conte .section-3,
.page-femmesport .section-3 {
  display: flex;
  flex-direction: column;
  width: 100% !important;
  height: auto;
  min-height: 0;
  align-items: center;
  justify-content: flex-start;
  padding-top: 56px;
  padding-left: 0;
  padding-bottom: 24px;
}

.page-conte .mosaic-container,
.page-femmesport .mosaic-container {
  height: auto;
  min-height: 0;
}

.page-conte .worm-row+.worm-row,
.page-femmesport .worm-row+.worm-row {
  margin-top: 20px;
}

.page-conte .mosaic-item:hover,
.page-femmesport .mosaic-item:hover {
  transform: none !important;
}

.page-femmesport .video-thumb {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #0f0f0f;
}

.video-lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  z-index: 5000;
  padding: 24px;
}

.video-lightbox.open {
  display: flex;
}

.video-lightbox-inner {
  width: min(1500px, 96vw);
}

.video-lightbox-player {
  width: 100%;
  max-height: 92vh;
  display: block;
  background: #000;
}

.video-lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  border: 1px solid var(--white);
  background: transparent;
  color: var(--white);
  width: 38px;
  height: 38px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

body.video-open {
  overflow: hidden;
}

.section {
  height: 100vh;
  position: relative;
  flex-shrink: 0;
}



/* LE CONTENEUR : Il doit pouvoir dépasser à droite */
.wolf-container {
  position: absolute;
  bottom: 0;
  left: 0;
  height: clamp(70vh, 75vh, 90vh);
  width: 200vw;
  /* 2 viewports */
  pointer-events: none;
  z-index: 1;
}

.wolf-image {
  height: 100%;
  width: 100%;
  object-fit: contain;
}

/* ================================
   SECTION 2 — Texte + fin du loup
================================ */
/* SECTION 2 : La Quote */
/* SECTION 2 : On décale le texte pour qu'il ne soit pas SUR le loup au départ */
.section-1 {
  width: 150vw;
  /* On garde la moitié pour le début du loup */
  height: 100vh;
  flex-shrink: 0;
  position: relative;
}

.hero-name {
  position: absolute;
  top: 24px;
  left: 40px;
  z-index: 6;
  font-family: var(--font-main);
  font-size: clamp(1.7rem, 4.4vw, 4.6rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: 0.06em;
  color: var(--white);
}

.mobile-break {
  display: none;
}

.section-2 {
  width: 35vw;
  /* ON RÉDUIT ICI (au lieu de 90vw) */
  min-width: 400px;
  /* Sécurité pour le texte */
  height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  /* On aligne à gauche pour coller au loup */
  padding: 0 0 60px 40px;
  /* On réduit le padding */
  z-index: 5;
  flex-shrink: 0;
  position: relative;
  margin-right: -15vw;
}

.quote-text {
  max-width: 350px;
  border-left: 2px solid var(--white);
  padding-left: 10px;
}

.quote {
  font-family: var(--font-main);
  font-size: 0.8em;
  /* Légèrement réduit pour l'effet bloc */
  font-weight: 100;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.4;
  /* Augmenté pour une meilleure lisibilité en bloc */
}

.wolf-end {
  width: 70vw;
}

.wolf-end .wolf-image {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 100%;
  width: auto;
  object-fit: cover;
  object-position: right center;
  clip-path: inset(0 50% 0 0);
}

/* ================================
   SCROLLBAR CUSTOM
================================ */
::-webkit-scrollbar {
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: var(--white);
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #ccc;
}


/* SECTION 3 : La Mosaïque */
.section-3 {
  height: 99vh;
  display: flex;
  align-items: center;
  width: auto;
  flex-shrink: 0;
  padding-left: 0;
  /* On met à 0 pour coller direct au texte */
}

.mosaic-container {
  position: relative;
  height: 80vh;
  width: 1200px;
  /* Donne une largeur fixe ou calculée par ton JS */
}

.mosaic-item {
  position: absolute;
  /* Assure que les calculs de taille incluent la bordure */
  box-sizing: border-box;
  background: var(--black);
  /* Point d'ancrage au centre */
  transform-origin: center center;
  transition: transform 0.3s ease, z-index 0s;
  will-change: transform;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.mosaic-item {
  min-width: 34vh;
  /* Ou une valeur en vh/vw */
  height: auto;
  overflow: hidden;
}

.mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mosaic-item:hover {
  /* On garde le translate(-50%, -50%) pour ne pas que l'image saute de position au survol */
  transform: translate(-50%, -50%) scale(1.1) rotate(0deg) !important;
  z-index: 999 !important;
}

.section-contact {
  padding: 0 60px 0 0;
  margin-left: -180px;
  min-width: 400px;
  width: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--black);
  color: var(--white);
}

.section-contact h2 {
  font-size: 2em;
  margin-bottom: 20px;
  color: var(--white);
}

.contact-links a {
  color: var(--white);
}

.contact-links a:hover {
  color: #ccc;
}

.contact-links {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 30px;
  font-size: 1.2em;
}


/* Mobile */
@media (max-width: 768px) {

  html,
  body {
    overflow-y: auto;
    overflow-x: hidden;
  }

  .horizontal-container {
    flex-direction: column;
    height: auto;
    padding-left: 0;
    margin-left: 0;
    width: 100%;
  }

  .section {
    width: 100vw !important;
    height: auto;
    min-height: 100vh;
  }

  .page-illustration .section-2 {
    min-height: 0;
    align-items: flex-start;
    justify-content: flex-start;
    width: 100vw;
    padding: 88px 24px 24px 24px;
    margin-right: 0;
  }

  .page-illustration .quote-text {
    max-width: none;
    width: 100%;
  }

  .hero-name {
    display: block;
    top: 24px;
    right: 24px;
    left: auto;
    text-align: right;
  }

  .mobile-break {
    display: block;
  }

  .section-contact {
    min-width: 100vw;
    padding: 24px;
    margin-left: 0;
    align-items: flex-end;
    justify-content: flex-end;
  }

  .contact-container {
    width: 100%;
    max-width: 420px;
  }

  .section-contact h2 {
    font-size: 1.6em;
    margin-bottom: 14px;
    text-align: right;
  }

  .contact-links {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 12px;
    font-size: 1rem;
    text-align: right;
  }

  .contact-links li {
    width: 100%;
  }

  .contact-links a {
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
  }

  .mosaic-container {
    width: 100%;
    height: auto;
    min-height: 0;
    padding-top: 24px;
    padding-bottom: 8px;
  }

  .mosaic-item {
    min-width: 0;
  }

  .mosaic-item img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  body.mobile-intro-active .section-1 {
    min-height: 100vh;
    overflow: hidden;
  }

  body.mobile-intro-active .hero-name {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    font-size: clamp(1.05rem, 4.2vw, 1.35rem);
    text-align: right;
    z-index: 5;
    transition: opacity 0.08s linear;
  }

  body.mobile-intro-active.mobile-name-hidden .hero-name {
    opacity: 0 !important;
    visibility: hidden;
  }

  body.mobile-intro-active .wolf-container {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100vw;
    height: 88vh;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
    transition: transform 0.08s linear, opacity 0.08s linear;
  }

  body.mobile-intro-active .wolf-container .wolf-image {
    width: 200vw;
    max-width: none;
    height: 100%;
    margin-left: -100vw;
    object-fit: contain;
    object-position: right bottom;
  }

  body.mobile-intro-active .section-2,
  body.mobile-intro-active .section-3,
  body.mobile-intro-active .section-contact {
    position: relative;
    z-index: 4;
    background: var(--black);
  }
}

/* ================================
   VERY LARGE DESKTOP
================================ */

@media (min-width: 1600px) {

  .wolf-container {
    height: 85vh;
    /* le loup grandit */
  }

  .section-2 {
    padding: 0 120px 80px 120px;
  }

  .quote-text {
    max-width: 420px;
    /* texte un peu plus large */
  }

  .section-3 {
    padding-left: 60px;
    /* rapproche la mosaïque */
  }

}

/* ================================
   MOBILE NAV
================================ */

.burger {
  display: none;
  position: fixed;
  top: 24px;
  left: 24px;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  z-index: 2000;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.burger span {
  height: 2px;
  width: 100%;
  background: var(--white);
  display: block;
}

/* Mobile behaviour */
@media (max-width: 768px) {

  .burger {
    display: flex;
  }

  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    height: 100vh;
    width: 80%;
    padding-top: 100px;
    transition: left 0.3s ease;
  }

  body.mobile-open .sidebar {
    left: 0;
  }

  .page-home .logo,
  .page-home .logo-text,
  .page-home .logo-link {
    display: none;
  }

}

@media (max-width: 768px) {

  .section-3 {
    width: 100vw !important;
    align-items: flex-start;
    justify-content: center;
    padding-left: 0;
  }

  .mosaic-container {
    width: 100%;
    height: auto;
    margin: 0 auto;
  }

}

@media (max-width: 768px) {

  .section-3 {
    width: 100vw !important;
    align-items: flex-start;
    justify-content: center;
    padding-left: 0;
  }

  .mosaic-container {
    width: 100%;
    height: auto;
    margin: 0 auto;
    position: static;
  }

  .mosaic-item {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
  }

  .mosaic-item:hover {
    transform: none !important;
    z-index: 1 !important;
  }

}
