/* ============================================
   LÉILA CHAPPEY — Portfolio
   Style global pour OVH
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=block');

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #888888;
  --nav-height: 52px;
  --page-left: 220px; /* valeur initiale, recalculée par nav.js selon l'écran */
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-weight: 300;
  font-size: 14px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:not(.nav-links a):hover { opacity: 0.55; }
img { display: block; max-width: 100%; height: auto; }

/* ============================================
   VIEW TRANSITIONS
   Nav persistante (site-nav), contenu instantané
   ============================================ */

@view-transition {
  navigation: auto;
}

/* Contenu : switch instantané, pas d'animation */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
}

/* Nav : aucune animation, reste en place */
::view-transition-old(site-nav),
::view-transition-new(site-nav) {
  animation: none;
}


/* ============================================
   NAVIGATION
   ============================================ */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  view-transition-name: site-nav;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2rem;
  padding: 0 2rem;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-name {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  opacity: 0.45;
  transition: opacity 0.2s;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-links a.active {
  opacity: 1;
}

/* ============================================
   SLIDER CENTRÉ (pages projet)
   Invisible jusqu'à ce que le JS ait calculé
   la position (.ready ajouté par slider.js)
   ============================================ */

.slider-center-wrap {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 400px;
  margin-bottom: 48px;
  visibility: hidden;
}
.slider-center-wrap.ready {
  visibility: visible;
}
.slider-center-track {
  display: flex;
  align-items: center;
  height: 100%;
  position: relative;
  gap: 20px;
  transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}
.slider-center-track img,
.slider-center-track video {
  flex: 0 0 auto;
  height: 400px;
  width: auto;
  object-fit: contain;
  display: block;
  opacity: 0.3;
  transition: opacity 0.5s;
}
.slider-center-track img   { cursor: zoom-in; }
.slider-center-track video { cursor: zoom-in; background: #000; }
.slider-center-track img.active,
.slider-center-track video.active { opacity: 1; }
.slider-center-prev,
.slider-center-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.8);
  border: none;
  font-size: 20px;
  cursor: pointer;
  padding: 10px 16px;
  color: #111;
  opacity: 0.6;
  transition: opacity 0.2s;
  z-index: 10;
}
.slider-center-prev:hover,
.slider-center-next:hover { opacity: 1; }
.slider-center-prev { left: 0; }
.slider-center-next { right: 0; }

@media (max-width: 600px) {
  .slider-center-wrap { height: 260px; }
  .slider-center-track img,
  .slider-center-track video { height: 260px; }
}

/* Hamburger — mobile only */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: #111;
  margin: 5px 0;
  transition: all 0.3s;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */

main {
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* ============================================
   ACCUEIL
   ============================================ */

.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--nav-height));
  padding: 40px;
}

.hero img {
  max-height: 80vh;
  max-width: 88vw;
  object-fit: contain;
  cursor: pointer;
}

/* ============================================
   PAGES CATÉGORIES (projets, collectif, recherches)
   ============================================ */

.category-page {
  padding: 60px calc(var(--page-left) - 12px) 80px var(--page-left);
  max-width: 1600px;
}

.category-intro {
  margin-bottom: 36px;
}

.category-intro h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
  color: #111;
}

.category-intro p {
  font-size: 13px;
  max-width: 580px;
  line-height: 1.9;
  color: #333;
}

.category-intro p + p { margin-top: 12px; }

.category-intro a {
  border-bottom: 1px solid currentColor;
}

/* Grille de projets */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px 28px;
  width: 100%;
}

.project-card {
  display: block;
  transition: opacity 0.4s;
}

.project-card:hover { opacity: 0.62; }

.project-card .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: #f5f5f5;
}

.project-card .card-title {
  display: block;
  margin-top: 10px;
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #111;
}

/* Double section (page /projets) */
.projects-section + .projects-section {
  margin-top: 72px;
}

/* ============================================
   PAGE PROJET INDIVIDUELLE
   ============================================ */

.project-page {
  padding: 50px calc(var(--page-left) - 12px) 90px var(--page-left);
  max-width: 1600px;
}

.back-link,
.next-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.2s;
}
.back-link:hover,
.next-link:hover { color: var(--text); opacity: 1; }
.back-link::before { content: '←'; font-size: 13px; }
.next-link::after  { content: '→'; font-size: 13px; }
.next-link { float: right; }

.project-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 52px;
}

.project-images.cols-1 { grid-template-columns: 1fr; max-width: 600px; }
.project-images.cols-3 { grid-template-columns: repeat(3, 1fr); }

.project-images img {
  width: 100%;
  height: auto;
  object-fit: cover;
}

.project-info {
  max-width: 640px;
}

.project-info h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.18em;
  margin-bottom: 0;
  line-height: 1.3;
  text-transform: uppercase;
}

.project-info .meta {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.project-info p {
  font-size: 13.5px;
  line-height: 1.95;
  color: #222;
  margin-bottom: 14px;
}

.project-info .tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

.project-info a { border-bottom: 1px solid #ccc; }
.project-info a:hover { border-color: #111; opacity: 1; }

.project-title {
  margin-bottom: 28px;
}
.project-title h1 {
  color: #999;
}

/* ============================================
   CONTACT
   ============================================ */

.contact-page {
  padding: 80px 4rem 80px var(--page-left);
  display: flex;
  gap: 70px;
  align-items: flex-start;
}

.contact-photo {
  width: 300px;
  height: 300px;
  object-fit: cover;
  flex-shrink: 0;
}

.contact-info {
  padding-top: 10px;
}

.contact-info h1 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 30px;
  letter-spacing: 0.06em;
  margin-bottom: 36px;
}

.contact-info .contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  margin-bottom: 14px;
}

.contact-info .contact-line a {
  border-bottom: 1px solid #ddd;
  padding-bottom: 1px;
}
.contact-info .contact-line a:hover { border-color: #111; opacity: 1; }

/* ============================================
   TALIE
   ============================================ */

.talie-page {
  display: flex;
  align-items: center;
  justify-content: center;
  height: calc(100vh - var(--nav-height));
  padding: 40px;
}

.talie-page img {
  max-height: 84vh;
  max-width: 90vw;
  object-fit: contain;
}

/* ============================================
   LIGHTBOX
   ============================================ */

#lb-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

#lb-overlay.active {
  display: flex;
}

#lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90vw;
  max-height: 90vh;
}

#lb-img {
  max-width: 88vw;
  max-height: 88vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

#lb-close {
  position: fixed;
  top: 20px;
  right: 26px;
  background: none;
  border: none;
  color: #111;
  font-size: 22px;
  cursor: pointer;
  opacity: 0.5;
  line-height: 1;
  padding: 6px;
  transition: opacity 0.2s;
  z-index: 1001;
}
#lb-close:hover { opacity: 1; }

#lb-prev,
#lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #111;
  font-size: 28px;
  cursor: pointer;
  opacity: 0.4;
  padding: 16px 20px;
  transition: opacity 0.2s;
  z-index: 1001;
  display: flex;
  align-items: center;
}
#lb-prev { left: 12px; }
#lb-next { right: 12px; }
#lb-prev:hover,
#lb-next:hover { opacity: 1; }

#lb-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(0,0,0,0.35);
  font-size: 12px;
  letter-spacing: 0.1em;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  border-top: 1px solid #ebebeb;
  padding: 24px 2rem;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 900px) {
  nav {
    padding: 0 1rem;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid #ebebeb;
    padding: 16px 0;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 12px 24px;
    font-size: 12px;
  }

  .nav-toggle { display: block; }

  .category-page,
  .project-page {
    padding: 36px 1rem 60px;
  }

  .contact-page {
    flex-direction: column;
    padding: 48px 1rem;
    gap: 36px;
  }

  .contact-photo {
    width: 100%;
    height: 280px;
  }

  .project-images,
  .project-images.cols-3 {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
  }

  footer { padding: 20px 1rem; }
}

@media (max-width: 540px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px 12px;