/* ============================================
   Tokens
   ============================================ */
:root {
  --color-paper: #E9F3E1;
  --color-ink: #1A1A18;
  --color-ink-soft: #5B6855;
  --color-accent: #80182E;   /* bordeaux — textes importants */
  --color-line: #CFE1C3;
  --color-placeholder: #D6E6CB;

  --font-display: 'Rubik', sans-serif;
  --font-body: 'Rubik', sans-serif;
  --font-hand: 'Rubik Scribble', var(--font-display);

  --max-width: 760px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
  color: var(--color-ink);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--gutter);
  background: rgba(233, 243, 225, 0.9);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-line);
}

.logo {
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--color-accent);
  -webkit-text-stroke: 0.4px var(--color-accent);
  font-size: 1.7rem;
  letter-spacing: 0.01em;
}

.logo-sub {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-ink-soft);
  -webkit-text-stroke: 0;
  font-size: 0.95rem;
  letter-spacing: normal;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.95rem;
  color: var(--color-ink-soft);
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  cursor: pointer;
}

/* ============================================
   Layout helpers
   ============================================ */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: 88px 0;
}

main > section:first-of-type {
  padding-top: 110px;
}

.site-footer {
  text-align: center;
  padding: 40px var(--gutter) 60px;
  color: var(--color-ink-soft);
  font-size: 0.85rem;
}

.section-title {
  font-family: var(--font-hand);
  font-weight: 700;
  color: var(--color-accent);
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  -webkit-text-stroke: 0.5px var(--color-accent);
  margin-bottom: 40px;
}

.section-intro {
  color: var(--color-ink-soft);
  margin-top: -24px;
  margin-bottom: 32px;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  padding-top: 110px;
}

.hero-eyebrow {
  color: var(--color-accent);
  font-size: 0.95rem;
  margin: 0 0 18px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  line-height: 1.25;
  max-width: 14ch;
  margin-bottom: 28px;
}

.hero-text {
  max-width: 46ch;
  color: var(--color-ink-soft);
}

/* ============================================
   À propos
   ============================================ */
.bio-content {
  max-width: 700px;
  margin-bottom: 50px;
}

.bio-photo {
  width: 500px;
}

.bio-photo img {
  display: block;
  width: 100%;
  height: auto;
}
/* ============================================
   Projects — liste, pas de cartes
   ============================================ */
.projects--page {
  /* Section plus large que <main> : titre et liste restent alignés */
  width: min(1000px, 100vw - 2 * var(--gutter));
  margin-left: 50%;
  transform: translateX(-50%);
}

.project-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.project-item {
  border-top: 1px solid var(--color-line);
}

.project-item:last-child {
  border-bottom: none;
}

.project-link {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  padding: 36px 0;
}

.project-link--static {
  cursor: default;
}

.project-year {
  display: block;
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin-bottom: 6px;
}

.project-title {
  font-size: 1.35rem;
  margin-bottom: 8px;
  transition: color 0.15s ease;
}

.project-link:hover .project-title {
  color: var(--color-accent);
}

.project-link--static:hover .project-title {
  color: var(--color-ink);
}

.project-meta {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin: 0 0 10px;
}


.project-cast {
  font-size: 0.85rem;
  color: var(--color-ink-soft);
  margin: 0 0 10px;
  font-style: italic;
}

.project-logline {
  color: var(--color-ink-soft);
  max-width: 70ch;
  margin: 0;
  font-size: 0.9rem;
}

.project-still {
  width: 288px;
  height: 180px;
  flex-shrink: 0;
  background-color: var(--color-placeholder);
  background-size: cover;
  background-position: center;
  border-radius: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-awards {
  margin-top: 18px;
  font-size: 0.7rem;
  line-height: 1.5;
  opacity: 1;
}

/* ============================================
   Photos
   ============================================ */

.photos--page {
  margin-bottom: 80px;
}

.gallery-slider {
  position: relative;
  width: 100%;
}

/* Une seule galerie visible à la fois */

.gallery-page {
  display: none;
  width: 100%;
}

.gallery-page.active {
  display: block;
}

/* Grille : toujours 2 colonnes */

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

/* Photos */

.gallery-photo {
  overflow: hidden;
}

.gallery-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Première page : photos carrées */

.gallery-page--square .gallery-photo {
  aspect-ratio: 1 / 1;
}

/* Deuxième page : photos paysage */

.gallery-page--landscape .gallery-photo {
  aspect-ratio: 3 / 2;
}

/* Légendes */

.gallery-caption {
  margin: 20px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-ink-soft);
}

.gallery-credit {
  display: block;
  margin-top: 2px;
  font-size: 0.75rem;
  opacity: 0.85;
}


/* ============================================
   Flèches
   ============================================ */

.gallery-arrow {
  position: absolute;
  top: calc(50% - 25px); /* recalé pour compenser la hauteur de la légende */
  transform: translateY(-50%);
  z-index: 2;

  width: 32px;
  height: 32px;

  border: none;
  background: transparent;

  font-family: inherit;
  font-size: 30px;
  line-height: 1;

  padding: 0;
  cursor: pointer;

  opacity: 0.65;
}

.gallery-arrow:hover {
  opacity: 1;
}

.gallery-prev {
  left: -42px;
}

.gallery-next {
  right: -42px;
}

/* ============================================
   Contact
   ============================================ */
.contact {
}

.contact-text {
  color: var(--color-ink-soft);
  max-width: 46ch;
  margin-bottom: 28px;
}

.contact-email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  border-bottom: 1px solid var(--color-ink);
  padding-bottom: 2px;
  margin-bottom: 36px;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.contact-email:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact-links {
  display: flex;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.contact-links a {
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

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

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 680px) {

  .logo-sub {
    display: none;
  }

  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-line);
  }

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

  .nav-links li {
    border-top: 1px solid var(--color-line);
  }

  .nav-links a {
    display: block;
    padding: 16px var(--gutter);
  }

  .project-link {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .project-still {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  order: -1;
}

  /* Photos */

  .gallery-grid {
    gap: 12px;
  }

  .gallery-prev {
    left: 6px;
  }

  .gallery-next {
    right: 6px;
  }

  section {
    padding: 56px 0;
  }

  .bio {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .bio-photo {
    max-width: 280px;
  }

}


/* ============================================
   Icône lecture sur les images de projets
   (uniquement sur écrans tactiles / petits écrans)
   ============================================ */

@media (hover: none), (max-width: 680px) {

  .project-link:not(.project-link--static) .project-still {
    position: relative;
  }

  .project-link:not(.project-link--static) .project-still::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background-color: rgba(233, 243, 225, 0.9);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 6.5v11l9-5.5z' fill='%2380182E'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 26px 26px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
  }

}
