/* ── Variables ── */
:root {
  --bg: #000000;
  --cream: #f5ede6;
  --accent: #ff5a36;
  --black-font: #0a0a0a;
  --font-body: "Karla", sans-serif;
  --font-disp: "Gravitas One", serif;
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Body + grain ── */
body {
  background-color: var(--bg);
  color: var(--cream);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* ── Header ── */
header {
  width: 100%;
  padding: 28px 60px 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 160;
  transition: transform 0.4s ease;
  background: #0a0a0a; /* ← fond de base toujours présent */
}

header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.header-hidden {
  transform: translateY(-100%);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
}

.logo img {
  display: block;
  height: 25px;
  width: auto;
}

/* ── Nav ── */
nav {
  display: flex;
  align-items: center;
  gap: 44px;
}

nav a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  text-decoration: none;
  letter-spacing: 0.02em;
  position: relative;
  background: linear-gradient(to right, var(--accent) 50%, var(--cream) 50%);
  background-size: 200% 100%;
  background-position: right center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

nav a.is-hovering {
  background-position: left center;
  transition: background-position 0.4s ease;
}

nav a::after {
  display: none;
}

/* ── Ligne accent ── */
.header-line {
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Collection ── */
.collection {
  position: relative;
  width: 100%;
  margin-top: 130px;
}

.col-sticky {
  position: sticky;
  top: 40px;
  width: 100%;
  z-index: 10;
  pointer-events: none;
  height: 0;
  padding: 0 60px;
  transition: opacity 0.3s ease;
}

.col-photos {
  position: relative;
  z-index: 1;
}

.col-item {
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.col-item:first-child {
  margin-top: -40px;
}

.col-photo {
  width: auto;
  height: 100%;
  max-width: 65%;
  object-fit: cover;
  display: block;
}

.col-bar {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 28px;
}

.col-bar-title {
  font-family: var(--font-disp);
  font-size: 15px;
  color: var(--black-font);
  letter-spacing: -2px;
  background: var(--accent);
  padding: 0 14px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.col-bar-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  padding-right: 140px;
}

.col-bar-line {
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.col-bar-quote {
  font-family: var(--font-disp);
  font-size: 15px;
  color: var(--accent);
  letter-spacing: -2px;
}

.col-bar-sub {
  padding: 6px 0;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  color: var(--accent);
  letter-spacing: -0.5px;
  text-transform: uppercase;
}

.col-card {
  position: absolute;
  top: 0;
  right: 60px;
  width: 140px;
  pointer-events: all;
  display: flex;
  flex-direction: column;
}

.col-card-top {
  background: #d68e89;
  padding: 0 10px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.col-card-title {
  font-family: var(--font-disp);
  font-size: 15px;
  color: var(--cream);
  letter-spacing: -2px;
}

.col-card-img {
  background: linear-gradient(to right, #b27e7a, #d68e89);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.col-card-img img {
  width: 35px;
  height: auto;
  display: block;
}

.col-card-btn {
  background: var(--cream);
  color: var(--bg);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  padding: 10px;
  display: block;
  pointer-events: all;
  margin-top: 8px;
}

.col-card-btn {
  position: relative;
  overflow: hidden;
  transition: color 0.1s ease 0.5s; /* ← texte passe en noir après le remplissage */
}

/* Fond orange qui se remplit après le contour */
.col-card-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease 0.4s; /* ← démarre après le contour */
  z-index: 0;
}

.col-card-btn:hover::before {
  transform: scaleX(1);
}

.col-card-btn:hover {
  color: var(--black-font);
}

/* Le texte reste au-dessus du fond */
.col-card-btn span {
  position: relative;
  z-index: 1;
}

/* SVG contour */
.col-card-btn svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.col-card-btn svg rect {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  transition: stroke-dashoffset 0.4s ease;
}

.col-card-btn:hover svg rect {
  stroke-dashoffset: 0;
}

/* ── Footer ── */
footer {
  width: 100%;
  padding-top: 60px;
  overflow: hidden;
  margin-top: 310px;
}

.footer-top {
  display: grid;
  grid-template-columns: 4fr 2fr 3fr 1fr;
  padding: 0 60px 60px;
  gap: 40px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-col:first-child {
  max-width: 300px;
  align-items: flex-start;
}

.footer-logo {
  height: 28px;
  width: auto;
  margin-bottom: 20px;
}

.footer-copy {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--cream);
  opacity: 0.8;
  margin-top: 2px;
}

.footer-col a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  text-decoration: none;
  transition: none;
  position: relative;
  display: inline-block;
  width: fit-content;

  background: linear-gradient(to right, var(--accent) 50%, var(--cream) 50%);
  background-size: 200% 100%;
  background-position: right center;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.footer-col a.is-hovering {
  background-position: left center;
  transition: background-position 0.4s ease;
}

/* Supprime l'ancien ::after */
.footer-col a::after {
  display: none;
}

.footer-col a:hover::after {
  /* ← manquait */
  width: 100%;
}

.footer-col a:hover {
  color: var(--accent);
}

.footer-email {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  color: var(--cream);
}

.footer-socials {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-top: 25px;
}

.footer-social-link {
  color: var(--cream);
  transition: color 0.25s ease;
}

.footer-social-link:hover {
  color: var(--accent);
}

.footer-big-logo {
  width: 100%;
  overflow: hidden;
  margin-top: 50px;
}

.footer-big-logo img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 768px) {
  body {
    overflow-x: clip;
  }

  /* ── Header ── */
  header {
    padding: 16px 20px 0;
  }

  .logo img {
    height: 18px;
  }

  nav {
    gap: 16px;
  }

  nav a {
    font-size: 15px;
  }

  /* ── Collection ── */
  .col-sticky {
    position: -webkit-sticky; /* ← fix Safari/iOS */
    position: sticky;
    top: 0;
    height: 1px; /* ← 1px au lieu de 0 */
    padding: 0 20px;
    z-index: 10;
    overflow: visible;
  }

  .col-bar {
    position: relative;
    height: 32px;
  }

  .col-bar-title {
    font-size: 15px;
    padding: 0 8px;
  }

  .col-bar-center {
    position: absolute;
    top: 300px;
    left: 0;
    right: 0;
    padding-right: 0;
  }

  .col-bar-quote {
    font-size: 15px;
  }

  .col-bar-sub {
    font-size: 15px;
    padding: 4px 0;
  }

  .col-card {
    position: absolute;
    bottom: -650px;
    right: 20px;
    top: auto;
    pointer-events: all;
  }

  .col-card-top {
    height: 32px;
    padding: 0 8px;
  }

  .col-card-img {
    padding: 12px;
  }

  .col-card-img img {
    width: 28px;
  }

  .col-card-btn {
    font-size: 12px;
    padding: 8px;
    margin-top: 6px;
  }

  .col-item {
    height: 100vh;
  }

  .col-photo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    object-fit: cover;
    object-position: center top;
  }

  /* Swap images collection */
  .col-item[data-index="0"] .col-photo {
    content: url("images/01_innocence_tel.webp");
  }

  .col-item[data-index="1"] .col-photo {
    content: url("images/02_power_tel.webp");
  }

  .col-item[data-index="2"] .col-photo {
    content: url("images/03_obsession_tel.webp");
  }

  /* ── Footer ── */
  footer {
    margin-top: 80px;
    padding-top: 40px;
  }

  .footer-top {
    display: flex;
    flex-direction: column;
    padding: 0 24px 40px;
    gap: 50px;
  }

  .footer-col:first-child {
    order: 10;
    margin-bottom: -50px;
  }

  .footer-socials {
    margin-top: 0;
  }

  .footer-logo {
    display: none;
  }

  .footer-big-logo img {
    width: 100%;
  }
}

/* ── Burger ── */
.burger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  position: relative;
  z-index: 200;
}

.burger span {
  display: block;
  width: 24px;
  height: 1.5px;
  background: var(--cream);
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
  transform-origin: center;
}

.burger.is-open span:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

.burger.is-open span:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* ── Nav mobile overlay ── */
.nav-mobile {
  display: flex; /* ← toujours flex, plus de display: none */
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  visibility: hidden; /* ← cache sans bloquer la transition */
  transition:
    opacity 0.4s ease,
    visibility 0.4s ease;
}

.nav-mobile::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

.nav-mobile.is-open {
  opacity: 1;
  pointer-events: all;
  visibility: visible;
}

.nav-mobile nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: calc(100% - 40px); /* ← padding 20px de chaque côté */
  position: relative;
  z-index: 1;
}

.nav-mobile nav a {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 18px; /* ← plus petit */
  color: var(--cream);
  text-decoration: none;
  -webkit-text-fill-color: var(--cream);
  background: none;
  width: 100%;
  text-align: center;
  padding: 20px 0;
  border-bottom: 1.5px solid var(--accent);
  transition: color 0.25s ease;
}

.nav-mobile nav a:first-child {
  border-top: 1.5px solid var(--accent);
}

.nav-mobile nav a:hover {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

@media (max-width: 768px) {
  .burger {
    display: flex;
  }

  .nav-desktop {
    display: none;
  }
}
