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


/* ══════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════ */
:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #999999;
  --medium: #555555;
  --border: rgba(0,0,0,0.2);
  --pill-bg: #f0f0f0;
  --pill-text: #888888;
  --placeholder: #000000;
  --block-bg: #f7f7f7;
}

[data-theme="dark"] {
  --bg: #1c1a1a;
  --text: #eeeeee;
  --muted: #666666;
  --medium: #aaaaaa;
  --border: rgba(255,255,255,0.1);
  --pill-bg: #2a2a2a;
  --pill-text: #777777;
  --block-bg: #252323;
}

/* film.html et screening.html utilisent --muted: #888 en dark */
[data-theme="dark"] body.page-film,
[data-theme="dark"] body.page-screening {
  --muted: #888888;
}


/* ══════════════════════════════════════════
   BASE
══════════════════════════════════════════ */
html, body { height: 100%; }

html {
  background: var(--bg);
  color: var(--text);
  transition: background 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Helvetica', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: background 0.3s ease, color 0.3s ease;
}


/* ══════════════════════════════════════════
   NAV
══════════════════════════════════════════ */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
}

.nav-left {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

.theme-toggle {
  background: none;
  border: 0.5px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  color: var(--text);
  border-color: var(--text);
}


/* ══════════════════════════════════════════
   MAIN 
══════════════════════════════════════════ */
main { flex: 1; padding: 2rem 1.5rem 3rem; }



/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--muted);
  font-size: 10px;
  transition: border-color 0.3s ease;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover { color: var(--text); }

footer { padding: 1.2rem 1.5rem 1.5rem; }


/* Index — footer structuré */
.footer-left {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.footer-left a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1rem;
  transition: color 0.2s ease;
}

.footer-left a:hover { color: var(--text); }

/* .footer-right flex/gap uniquement sur index */
body.page-index .footer-right {
  display: flex;
  gap: 1.2rem;
  align-items: baseline;
}

body.page-index .footer-right a {
  font-size: 10px;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

body.page-index .footer-right a:hover { color: var(--text); }

.footer-lang {
  letter-spacing: 0.06em;
  text-transform: uppercase;
}


/* ══════════════════════════════════════════
   LABELS PARTAGÉS
══════════════════════════════════════════ */

/* .meta-label — film, screening (9px, 0.15em) */
.meta-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

/* .section-label — screening (défaut) vs about (scopé) */
.section-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1rem;
  display: block;
}

body.page-about .section-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  margin-bottom: 1.2rem;
}

/* .archive-label — archive */
.archive-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  margin-bottom: 1.5rem;
  display: block;
}


/* ══════════════════════════════════════════
   HÉRO + MÉTADONNÉES (film, screening)
══════════════════════════════════════════ */
.hero-section {
  max-width: 800px;
  margin-bottom: 1rem;
}

/* .project-title à 42px : héro (film, screening) — scopé par parent */
.hero-section .project-title {
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 0.8rem;
}

.project-subtitle {
  font-size: 22px;
  color: var(--muted);
  line-height: 1.3;
}

.metadata-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 4rem;
  padding: 1rem 0;
  margin-bottom: 0;
}

.meta-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.meta-value {
  font-size: 13px;
  color: var(--text);
  line-height: 1.4;
}

.meta-link {
  text-decoration: none;
  color: var(--text);
}

.meta-link:hover { color: var(--muted); }


/* ══════════════════════════════════════════
   FEATURE SPLIT 50/50 (film, screening)
══════════════════════════════════════════ */
.feature-split {
  display: flex;
  width: 100%;
  gap: 0;
  margin-bottom: 2rem;
}

.video-col {
  width: 50%;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
}

.video-col iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

@media (max-width: 1100px) {
  .feature-split { flex-direction: column; }
  .video-col,
  .synopsis-col,
  .quote-col { width: 100%; }
}


/* ══════════════════════════════════════════
   INDEX
══════════════════════════════════════════ */
.top-block {
  display: grid;
  grid-template-columns: 58fr 42fr;
  gap: 3rem;
  margin-bottom: 3rem;
  align-items: start;
}

.intro {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  font-weight: 400;
}

.intro a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
  transition: color 0.2s ease;
}

.intro a:hover { color: var(--muted); }

.socials {
  margin-top: 1.2rem;
  display: flex;
  gap: 1.2rem;
}

.socials a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.socials a:hover { color: var(--text); }

/* En ce moment */
.now { padding-top: 0.15rem; }

.now-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.2rem;
  display: block;
}

.now-item {
  padding: 0.8rem 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: opacity 0.2s ease;
}

.now-item:first-of-type { border-top: 0.5px solid var(--border); }
.now-item:hover { opacity: 0.5; }

.now-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.now-meta { font-size: 10px; color: var(--muted); }
.now-meta span + span::before { content: ' · '; }

/* Liste de projets */
.project-list { width: 100%; }

.project-item {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 0.95rem 0;
  border-bottom: 0.5px solid var(--border);
  cursor: pointer;
  opacity: 1;
  transition: opacity 0.3s ease;
  text-decoration: none;
  color: inherit;
}

.project-list.has-hover .project-item:not(.is-hovered) { opacity: 0.3; }

.project-num {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

/* .project-title à 13px : liste index — scopé par parent */
.project-item .project-title {
  font-size: 13px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.01em;
}

.project-cat {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}


/* ══════════════════════════════════════════
   ABOUT
══════════════════════════════════════════ */
.content { max-width: 640px; }

.portrait { margin-bottom: 2.5rem; }

.portrait img {
  width: 400px;
  display: block;
  filter: grayscale(100%);
}

.bio {
  font-family: Georgia, serif;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 4rem;
}

.bio p + p { margin-top: 1.2em; }

.bio a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 0.5px;
}

.bio a:hover { color: var(--muted); }

/* Contact */
.contact-section { margin-bottom: 4rem; }

.email-protected {
  font-size: 13px;
  color: var(--text);
  cursor: default;
  user-select: all;
}

.email-protected::before { content: attr(data-user); }
.email-protected::after  { content: "@papillon.wtf"; }

/* Festivals & Presse */
.festivals,
.press { margin-bottom: 4rem; }

.festivals-flow,
.press-flow { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.festival-entry,
.press-entry {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.festival-name { font-size: 12px; color: var(--muted); }

.press-name {
  font-size: 12px;
  color: var(--text);
  text-decoration: none;
}

.press-name::after { content: " ↗"; font-size: 10px; opacity: 0.8; }

.festival-pill,
.press-pill {
  font-size: 9px;
  color: var(--pill-text);
  background: var(--pill-bg);
  border-radius: 100px;
  padding: 2px 7px;
  font-variant-numeric: tabular-nums;
}

.press-entry:hover .press-pill {
  background: var(--text);
  color: var(--bg);
}


/* ══════════════════════════════════════════
   FILM
══════════════════════════════════════════ */
.synopsis-col {
  width: 50%;
  background: var(--block-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}

.synopsis-inner {
  max-width: 450px;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.8;
  text-align: center;
}

.synopsis-inner p + p { margin-top: 1.5rem; }

/* Data grid */
.data-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5rem;
  margin-bottom: 2rem;
}

.data-column { display: flex; flex-direction: column; gap: 1.5rem; }
.data-list { list-style: none; }
.data-list a{ color:var(--text); }
.data-list a:hover{ color:var(--medium); }
.data-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  margin-bottom: 0.8rem;
  text-decoration: none;
  color: var(--medium);
}

.data-row .year {
  font-size: 9px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tech-item {
  font-size: 12px;
  line-height: 1.8;
  margin-bottom: 0.8rem;
}

.tech-item span {
  color: var(--muted);
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.tech-item b {
  color: var(--muted);
  font-weight: normal;
}

/* Galeries */
.gallery-section { margin-top: 0; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 10px 0 0rem; 
}

.img-box {
  cursor: zoom-in;
  margin-bottom: 0;
}
.img-box img {
  width: 100%;
  aspect-ratio: 16/9; 
  object-fit: cover;
  display: block; 
  transition: filter 0.3s ease;
  background: var(--block-bg); 
}


.img-caption {
  margin-top: 1rem;
  margin-bottom: 1rem;
  padding: 0 1rem;
  line-height: 1.4;
}
.caption-text {
  display: block;
  font-size: 12px; 
  color: var(--text);
  font-weight: 400;
}
.caption-sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* Lightbox */
#lightbox {
  border: none;
  background: transparent;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  outline: none;
}

#lightbox[open] { display: flex; }

#lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

#lightbox::backdrop {
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
}

@media (max-width: 900px) { .data-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 800px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); } }

/* Grille de vidéos */
.video-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
}

.video-item {
    width: 100%;
}

/* Si le dernier élément est seul (index impair), il prend toute la largeur */
.video-item:last-child:nth-child(odd) {
    grid-column: span 2;
}

/* Container pour garder le ratio 16/9 propre */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    height: 0;
    overflow: hidden;
    background: var(--block-bg);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(100%);
    transition: filter 0.4s ease;
}

.video-item:hover iframe {
    filter: grayscale(0%);
}

/* Mobile */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    .video-item:last-child:nth-child(odd) {
        grid-column: span 1;
    }
}

/* ══════════════════════════════════════════
   ARCHIVE
══════════════════════════════════════════ */
.archive-title {
  font-size: 42px;
  font-weight: 400;
  letter-spacing: -0.02em;
  margin-bottom: 3rem;
}

.archive-section {
  max-width: 640px;
  margin-bottom: 5rem;
}

.archived-projects-list { width: 100%; }

.archived-project-item {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1rem 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s ease;
}

.archived-project-item:hover { opacity: 0.5; }

.archived-project-year { font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.archived-project-name { font-size: 13px; font-weight: 400; color: var(--text); }
.archived-project-type { font-size: 11px; color: var(--muted); font-style: italic; }

.archived-screenings-list { display: flex; flex-direction: column; }

.archived-screening-row {
  display: grid;
  grid-template-columns: 5.5rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 0.5px solid var(--border);
  text-decoration: none;
  color: var(--text);
  transition: opacity 0.2s ease;
}

.archived-screening-row.is-hidden { display: none; }
.archived-screening-row:hover { opacity: 0.5; }

.archived-screening-date {
  font-size: 10px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}

.archived-screening-film { font-size: 13px; font-weight: 400; }
.archived-screening-city { font-size: 11px; color: var(--muted); text-align: right; }

.load-more-container { display: flex; justify-content: center; margin-top: 3rem; }

#load-more {
  background: none;
  border: 0.5px solid var(--muted);
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

#load-more:hover { border-color: var(--text); color: var(--text); }
#load-more.is-hidden { display: none; }


/* ══════════════════════════════════════════
   SCREENING
══════════════════════════════════════════ */
.quote-col {
  width: 50%;
  background: var(--block-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
}

.quote-inner {
  max-width: 400px;
  text-align: center;
}

.quote-text {
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 20px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.quote-source {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.past-section {
  max-width: 640px;
  margin: 0;
}


