/* ==============================================
   LAYOUT — Header, sections snap, footer
   Portfolio v2 — Apple-quality scroll snap
   ============================================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* ================================
   HEADER — Transparent sticky
   ================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(16, 23, 32, 0.6);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.5s ease, border-color 0.5s ease, box-shadow 0.5s ease;
}

/* Header scrollé — plus opaque */
.site-header--scrolled {
  background: rgba(16, 23, 32, 0.92);
  border-bottom-color: var(--c-border);
  box-shadow: 0 1px 40px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

/* Logo */
.logo {
  font-family: var(--f-mono);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.03em;
  transition: color var(--t-fast), opacity var(--t-fast);
}
.logo:hover { color: var(--c-accent); opacity: 1; }
.logo span { color: var(--c-accent); }

/* Nav */
.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-text-2);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  position: relative;
}
.nav-link:hover {
  color: var(--c-text);
  background: var(--c-accent-bg);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(45, 212, 191, 0.1);
}
.nav-link--active {
  color: var(--c-bg);
  background: var(--c-accent);
  font-weight: 600;
}
.nav-link--active:hover {
  background: var(--c-accent-dim);
  color: var(--c-bg);
}
.nav-link--ext {
  color: var(--c-accent);
  border: 1px solid var(--c-accent-border);
}
.nav-link--ext:hover {
  background: var(--c-accent-bg);
}

/* Photo button — tape-à-l'oeil */
.nav-link--photo {
  background: linear-gradient(135deg, var(--c-accent), var(--c-accent-dim));
  color: var(--c-bg);
  border: none;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 12px rgba(45, 212, 191, 0.25);
  animation: photoGlow 3s ease-in-out infinite alternate;
}
.nav-link--photo:hover {
  background: linear-gradient(135deg, var(--c-accent-dim), var(--c-accent));
  color: var(--c-bg);
  box-shadow: 0 4px 24px rgba(45, 212, 191, 0.4);
  transform: translateY(-1px);
}
@keyframes photoGlow {
  0% { box-shadow: 0 2px 12px rgba(45, 212, 191, 0.2); }
  100% { box-shadow: 0 2px 20px rgba(45, 212, 191, 0.35); }
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 30px;
  height: 30px;
}
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: center;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ================================
   SNAP SECTIONS — Full viewport
   ================================ */
.snap-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

/* Section content wrapper — légèrement remonté pour compenser le header */
.snap-section > .container {
  padding-top: calc(var(--header-h) + 20px);
  padding-bottom: 80px;
  margin-top: calc(var(--header-h) * -0.35);
}

/* Passions — remonter davantage */
#passions > .container {
  margin-top: calc(var(--header-h) * -0.7);
}

/* Section label + title system */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--c-accent);
  margin-bottom: 16px;
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
}

.section-title {
  font-size: var(--fs-2xl);
  margin-bottom: 10px;
  background: linear-gradient(135deg, var(--c-text) 0%, var(--c-text-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-desc {
  color: var(--c-text-2);
  font-size: var(--fs-md);
  max-width: 600px;
  margin-bottom: 40px;
  line-height: 1.7;
}

/* Séparateur subtil inter-sections */
.snap-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c-accent-border), transparent);
}
.snap-section:last-of-type::after { display: none; }

/* ================================
   NAV SEPARATOR (entre sections et liens externes)
   ================================ */
.nav-sep {
  display: inline-block;
  width: 1px;
  height: 20px;
  background: var(--c-border-2);
  margin: 0 4px;
  vertical-align: middle;
}

/* ================================
   SECTION DOTS — Indicateur latéral droit
   ================================ */
.section-dots {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  transition: opacity 0.6s ease;
  pointer-events: none;
}
.section-dots--visible {
  opacity: 1;
  pointer-events: auto;
}

.section-dots__item {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
}
.section-dots__item:hover {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.3);
}
.section-dots__item:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 3px;
}
.section-dots__item--active {
  background: var(--c-accent);
  border-color: var(--c-accent);
  box-shadow: 0 0 10px rgba(45, 212, 191, 0.4), 0 0 20px rgba(45, 212, 191, 0.15);
  transform: scale(1.15);
}
.section-dots__item--active:hover {
  transform: scale(1.3);
}

/* Label au hover */
.section-dots__label {
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-text-2);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateY(-50%) translateX(4px);
  background: var(--c-surface);
  padding: 3px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--c-border);
  box-shadow: var(--sh-sm);
}
.section-dots__item:hover .section-dots__label {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ================================
   FOOTER
   ================================ */
.site-footer {
  border-top: 1px solid var(--c-border);
  padding: 28px 0;
  text-align: center;
  color: var(--c-text-3);
  font-size: var(--fs-sm);
}
.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 10px;
}
.footer-links a {
  color: var(--c-text-3);
  font-weight: 500;
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--c-accent); }

/* ================================
   RESPONSIVE
   ================================ */
@media (max-width: 768px) {
  .container { padding: 0 16px; }

  /* Mobile : pas de burger, juste Accueil + Projets visibles */
  .burger { display: none; }

  .main-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  /* Cacher tout sauf Accueil et Projets */
  .nav-link--section:not([data-section="hero"]) { display: none; }
  .nav-link--photo { display: none; }
  .nav-sep { display: none; }
  .section-dots { display: none; }

  .nav-link {
    padding: 8px 14px;
    font-size: var(--fs-sm);
  }

  .section-title { font-size: var(--fs-xl); }

  /* Sur mobile, les sections s'adaptent au contenu */
  .snap-section {
    min-height: auto;
    justify-content: flex-start;
    overflow: visible;
  }
  .snap-section > .container {
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 48px;
    margin-top: 0;
  }
  /* Le hero reste plein écran sur mobile */
  .hero { min-height: 100vh; min-height: 100dvh; justify-content: center; }
}

@media (max-width: 480px) {
  .section-title { font-size: var(--fs-lg); }
  .header-inner { padding: 0 16px; }
}

/* ================================
   LARGE SCREENS — 1440px+
   ================================ */
@media (min-width: 1440px) {
  .container { padding: 0 40px; }
  .header-inner { padding: 0 40px; }
  .snap-section > .container {
    padding-top: calc(var(--header-h) + 30px);
    padding-bottom: 60px;
    margin-top: calc(var(--header-h) * -0.3);
  }
  .section-dots { right: 32px; gap: 18px; }
  .section-dots__item { width: 12px; height: 12px; }
  .site-footer { padding: 36px 0; }
}

/* ================================
   EXTRA LARGE — 1920px+
   ================================ */
@media (min-width: 1920px) {
  .container { padding: 0 56px; }
  .header-inner { padding: 0 56px; }
  .section-dots { right: 40px; }
  .nav-link { padding: 8px 18px; font-size: var(--fs-base); }
}
