/* Portfolio Jean-Baptiste Villechaize — feuille de style */
:root {
  --bg: #0b0b0b;
  --fg: #f2f0ec;
  --muted: #8d8a85;
  --line: #262626;
  --accent: #f2f0ec;
  --font: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* En-tête */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px clamp(16px, 4vw, 48px);
  transition: background .3s, padding .3s;
}
.header.scrolled { background: rgba(11,11,11,.88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav a { white-space: nowrap; }
.brand { font-size: 13px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; }
.brand small { display: block; font-size: 10px; letter-spacing: .3em; color: var(--muted); font-weight: 300; }
.nav { display: flex; gap: clamp(14px, 3vw, 36px); font-size: 11px; letter-spacing: .25em; text-transform: uppercase; }

/* Vidéo star */
.hero { position: relative; height: 100vh; height: 100svh; overflow: hidden; background: #000; }
.hero iframe {
  position: absolute; top: 50%; left: 50%;
  width: 100vw; height: 56.25vw; min-height: 100%; min-width: 177.78vh;
  transform: translate(-50%, -50%); border: 0; pointer-events: none;
}
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%); }
.hero-info {
  position: absolute; left: clamp(16px, 4vw, 48px); right: clamp(16px, 4vw, 48px); bottom: clamp(28px, 6vh, 64px);
  z-index: 2; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.hero-info h1 { font-size: clamp(26px, 4.4vw, 56px); font-weight: 300; letter-spacing: .02em; line-height: 1.1; }
.hero-info p { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: #d6d3ce; margin-top: 10px; }
.btn {
  font-size: 11px; letter-spacing: .25em; text-transform: uppercase;
  border: 1px solid rgba(255,255,255,.6); padding: 12px 22px; background: transparent; color: var(--fg); cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--fg); color: var(--bg); }

/* Sections */
section { padding: clamp(64px, 10vw, 120px) clamp(16px, 4vw, 48px); }
.section-title { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); margin-bottom: 40px; }

/* Grille vidéos */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: clamp(16px, 2vw, 28px); }
.card { cursor: pointer; }
.thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #161616; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .3s;
  font-size: 11px; letter-spacing: .3em; text-transform: uppercase;
}
.card:hover .play { opacity: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; }
.card-meta h3 { font-size: 15px; font-weight: 400; }
.card-meta span { font-size: 11px; letter-spacing: .15em; text-transform: uppercase; color: var(--muted); white-space: nowrap; padding-top: 3px; }
.card-meta .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; letter-spacing: 0; text-transform: none; }

/* À propos / CV */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(32px, 6vw, 96px); border-top: 1px solid var(--line); }
.about .bio p { font-size: clamp(17px, 1.6vw, 21px); line-height: 1.65; margin-bottom: 1em; }
.cv-list { list-style: none; }
.cv-list li { display: grid; grid-template-columns: 1fr auto; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cv-list li:first-child { border-top: 1px solid var(--line); }
.cv-list .t { font-weight: 400; }
.cv-list .d { color: var(--muted); font-size: 12px; display: block; }
.cv-list .y { color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.cv-group + .cv-group { margin-top: 40px; }
.cv-group h4 { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; font-weight: 400; margin-bottom: 14px; }

/* Contact */
.contact { border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 40px; }
.contact h4 { font-size: 11px; letter-spacing: .25em; text-transform: uppercase; color: var(--muted); font-weight: 400; margin-bottom: 14px; }
.contact p { font-size: 16px; line-height: 1.9; }

footer { padding: 32px clamp(16px, 4vw, 48px); font-size: 11px; color: var(--muted); letter-spacing: .15em; text-transform: uppercase; display: flex; justify-content: space-between; border-top: 1px solid var(--line); }

/* Lecteur plein écran */
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.96); display: none; align-items: center; justify-content: center; padding: clamp(16px, 5vw, 80px); }
.lightbox.open { display: flex; }
.lightbox .frame { width: min(100%, calc((100vh - 140px) * 16 / 9)); aspect-ratio: 16 / 9; }
.lightbox iframe { width: 100%; height: 100%; border: 0; }
.lightbox .close { position: absolute; top: 20px; right: clamp(16px, 4vw, 48px); background: none; border: 0; color: var(--fg); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; cursor: pointer; }
.lightbox { flex-direction: column; gap: 18px; }
.lightbox .frame { width: min(100%, calc((100vh - 280px) * 16 / 9)); }
.lightbox .caption { width: min(100%, 760px); text-align: center; color: var(--muted); max-height: 160px; overflow-y: auto; }
.lb-title { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--fg); }
.lb-legende { margin-top: 10px; font-size: 13px; line-height: 1.7; white-space: pre-line; }

/* Tablette */
@media (max-width: 1000px) {
  .about { grid-template-columns: 1fr; }
}

/* Mobile */
@media (max-width: 640px) {
  .header { padding: 14px 16px; gap: 12px; }
  .brand { font-size: 10px; letter-spacing: .14em; white-space: nowrap; }
  .brand small { font-size: 8px; letter-spacing: .18em; }
  .nav { gap: 10px; font-size: 9px; letter-spacing: .1em; }
  .hero { height: 78svh; min-height: 460px; }
  .hero-info { flex-direction: column; align-items: flex-start; gap: 18px; bottom: 28px; }
  .hero-info p { font-size: 11px; letter-spacing: .14em; }
  .btn { padding: 11px 18px; }
  section { padding: 56px 16px; }
  .section-title { margin-bottom: 24px; }
  .filters { gap: 6px 18px; margin-bottom: 24px; }
  .grid { gap: 32px; }
  .card-meta h3 { font-size: 14px; }
  .about .bio p { font-size: 17px; }
  .cv-list li { font-size: 13px; }
  .contact { gap: 28px; }
  .contact p { font-size: 15px; }
  footer { flex-direction: column; gap: 10px; }
  .lightbox { padding: 0; }
  .lightbox .frame { width: 100%; }
  .lightbox .caption { padding: 0 16px; }
  .lb-title { letter-spacing: .12em; }
}

/* Filtres */
.filters { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 36px; }
.filters button { background: none; border: 0; color: var(--muted); font: inherit; font-size: 11px; letter-spacing: .25em; text-transform: uppercase; cursor: pointer; padding: 4px 0; border-bottom: 1px solid transparent; }
.filters button:hover { color: var(--fg); }
.filters button.on { color: var(--fg); border-color: var(--fg); }
.thumb img:not([src]) { visibility: hidden; }
.card-meta .legende { display: block; font-size: 12px; color: var(--muted); margin-top: 6px; font-style: italic; letter-spacing: 0; text-transform: none; }

/* Vignettes animées */
.thumb .preview { position: absolute; top: 50%; left: 50%; width: 100%; height: 100%; transform: translate(-50%, -50%); border: 0; pointer-events: none; opacity: 0; }
.thumb .preview.on { opacity: 1; }
.thumb .play { z-index: 2; }
@media (hover: none) { .thumb .play { display: none; } }
section[id] { scroll-margin-top: 64px; }
@media (max-width: 360px) { .nav a[href="#travaux"] { display: none; } }

/* Textes vivants au survol */
.nav a, .contact a, footer a { position: relative; display: inline-block; opacity: .75; transition: opacity .3s, letter-spacing .4s, transform .4s; }
.nav a::after, .contact a::after, footer a::after {
  content: ""; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .45s cubic-bezier(.2,.7,.2,1);
}
.nav a:hover, .contact a:hover, footer a:hover { opacity: 1; }
.nav a:hover::after, .contact a:hover::after, footer a:hover::after { transform: scaleX(1); transform-origin: left; }
.contact a { opacity: .9; }
.contact a:hover { transform: translateX(4px); }
.brand { transition: letter-spacing .5s cubic-bezier(.2,.7,.2,1); }
.brand:hover { letter-spacing: .34em; }
.filters button { transition: color .3s, letter-spacing .4s, border-color .3s; }
.filters button:hover { letter-spacing: .32em; }
.card-meta > span { transition: color .4s; }
.card:hover .card-meta > span { color: var(--fg); }
.cv-list li { transition: padding-left .4s cubic-bezier(.2,.7,.2,1); }
.cv-list li:hover { padding-left: 8px; }
.cv-list li:hover .t { color: #fff; }
.btn { transition: background .3s, color .3s, letter-spacing .4s; }
.btn:hover { letter-spacing: .32em; }
.empty { color: var(--muted); font-size: 14px; padding: 40px 0; }
@media (max-width: 640px) { .brand:hover { letter-spacing: .14em; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.thumb img.scope { transform: scale(1.345); }
.card.joue .thumb img { visibility: hidden; } /* la vidéo tourne : l'image fixe disparaît complètement */
.thumb { background: #000; }
