/* Mickaël Etrillard — site portfolio comédien */
/* Direction : éditorial / cinématographique, sombre, chaleureux */

:root {
  --ink: #f2ede3;
  --ink-dim: #b8b0a0;
  --stone: #8a8272;
  --black: #0c0b09;
  --black-2: #141210;
  --accent: #c9ad7f;
  --accent-dim: #8f7a56;
  --rule: rgba(242, 237, 227, 0.12);
  --serif: "Fraunces", Georgia, serif;
  --display: "Fraunces", Georgia, serif;
  --sans: "Public Sans", -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Grain overlay --- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- Nav --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 2.1rem 2.5rem;
  mix-blend-mode: difference;
}
.nav__links { display: flex; gap: 2.2rem; }
.nav__links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  opacity: 0.96;
  transition: opacity 0.25s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__top {
  display: flex;
  align-items: center;
}
@media (max-width: 720px) {
  .nav { padding: 1.5rem 1.6rem; }
  .nav__links { display: none; }
}

/* --- Hero (bande démo en vedette) --- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--black);
}
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 28%;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.hero__video.is-ready { opacity: 1; }
/* fallback poster sous la vidéo pendant le chargement */
.hero__media::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--black) center 28% / cover no-repeat;
  background-image: image-set(url("assets/demo-poster.jpg") 1x);
}
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  /* Voile minimal : assombri seulement en bas (lisibilité du nom) et un filet en haut (nav).
     Le centre reste totalement clair pour que la bande démo soit à pleine puissance. */
  background:
    linear-gradient(to top, rgba(12,11,9,0.86) 0%, rgba(12,11,9,0.36) 17%, rgba(12,11,9,0) 40%, rgba(12,11,9,0) 85%, rgba(12,11,9,0.38) 100%);
}

.hero__overlay {
  position: relative;
  z-index: 2;
  margin-top: auto;
  width: 100%;
  max-width: 1220px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 4vw 9vh;
}
.hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.35rem;
}
.hero__name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(2.9rem, 8.5vw, 6.6rem);
  line-height: 0.97;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-shadow: 0 2px 40px rgba(0,0,0,0.45);
}
.hero__name span { display: block; }
.hero__reel {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.25s ease;
}
.hero__reel::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
  transition: width 0.25s ease;
}
.hero__reel:hover { color: var(--accent); }
.hero__reel:hover::before { width: 38px; }
.hero__reel-arrow {
  margin-left: -0.15rem;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.hero__reel:hover .hero__reel-arrow { transform: translate(2px, -2px); }
/* entrée au chargement */
.hero__overlay > * {
  opacity: 0;
  transform: translateY(20px);
  animation: heroIn 0.95s cubic-bezier(0.16,1,0.3,1) forwards;
}
.hero__eyebrow { animation-delay: 0.15s; }
.hero__name { animation-delay: 0.3s; }
.hero__reel { animation-delay: 0.55s; }
@keyframes heroIn {
  to { opacity: 1; transform: translateY(0); }
}

/* --- Bouton son --- */
.sound {
  position: absolute;
  z-index: 4;
  bottom: 9vh;
  right: 4vw;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.62rem 1.05rem 0.62rem 0.9rem;
  background: rgba(12, 11, 9, 0.42);
  border: 1px solid rgba(242, 237, 227, 0.26);
  border-radius: 100px;
  color: var(--ink);
  cursor: pointer;
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  animation: heroIn 0.95s cubic-bezier(0.16,1,0.3,1) 0.75s forwards;
  transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.sound:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(12, 11, 9, 0.6);
  transform: translateY(-1px);
}
.sound__label {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
}
.sound__off { display: block; }
.sound__eq {
  display: none;
  align-items: flex-end;
  gap: 2px;
  width: 17px;
  height: 15px;
}
.sound__eq i {
  flex: 1;
  background: currentColor;
  height: 35%;
  border-radius: 1px;
  animation: eq 0.9s ease-in-out infinite;
}
.sound__eq i:nth-child(1) { animation-delay: 0s; }
.sound__eq i:nth-child(2) { animation-delay: 0.2s; }
.sound__eq i:nth-child(3) { animation-delay: 0.4s; }
.sound__eq i:nth-child(4) { animation-delay: 0.1s; }
@keyframes eq {
  0%, 100% { height: 30%; }
  50% { height: 100%; }
}
.sound.is-on {
  color: var(--accent);
  border-color: var(--accent);
}
.sound.is-on .sound__off { display: none; }
.sound.is-on .sound__eq { display: inline-flex; }

/* --- Indicateur de défilement --- */
.hero__scroll {
  position: absolute;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
  bottom: 2.4vh;
  width: 1px;
  height: 3rem;
  background: var(--rule);
}
.hero__scroll span {
  position: absolute;
  top: 0; left: -2px;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: scrollDot 2.2s ease-in-out infinite;
}
@keyframes scrollDot {
  0% { top: 0; opacity: 1; }
  90% { opacity: 1; }
  100% { top: calc(100% - 5px); opacity: 0; }
}
@media (max-width: 820px) {
  .hero__overlay { padding: 0 1.6rem 12vh; }
  .hero__eyebrow { font-size: 0.82rem; letter-spacing: 0.26em; }
  .sound { bottom: 4vh; right: 1.6rem; }
  .hero__scroll { display: none; }
}

/* --- Sections --- */
.section {
  padding: 7rem 2.5rem;
  max-width: 1160px;
  margin: 0 auto;
  border-bottom: 1px solid var(--rule);
}
.section__label {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 3rem;
}

/* --- À propos --- */
.about__grid {
  display: grid;
  grid-template-columns: 0.82fr 1fr;
  gap: 3.5rem;
  align-items: center;
}
.about__portrait {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
}
.about__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.15) contrast(1.05);
}
.about__bio { padding-top: 0.4rem; }
.about__bio p {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--ink-dim);
  margin-bottom: 1.3rem;
  max-width: 52ch;
}
.about__bio p:last-child { margin-bottom: 0; }
.about__bio p:first-child::first-letter {
  font-family: var(--serif);
  font-style: italic;
  font-size: 3.1rem;
  line-height: 0.8;
  float: left;
  margin: 0.35rem 0.7rem 0 0;
  color: var(--accent);
}
@media (max-width: 820px) {
  .about__grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .about__portrait { max-width: 100%; }
}

/* --- Filmographie --- */
.filmo__list { list-style: none; }
.filmo__item {
  display: grid;
  grid-template-columns: 4rem 1fr;
  align-items: baseline;
  column-gap: 1.5rem;
  row-gap: 0.3rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.3s ease;
}
.filmo__item:last-child { border-bottom: 1px solid var(--rule); }
.filmo__item:hover { padding-left: 0.6rem; }
.filmo__year {
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  font-weight: 500;
}
.filmo__title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--ink);
}
.filmo__title em {
  font-style: italic;
  color: var(--stone);
  font-size: 0.95rem;
  margin-left: 0.4rem;
}
.filmo__dir {
  display: inline-block;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  color: var(--accent-dim);
  margin-left: 0.6rem;
}
.filmo__dir::before { content: "· "; }
.filmo__role {
  font-size: 0.95rem;
  color: var(--ink-dim);
  grid-column: 2;
}
.filmo__item--formation .filmo__title { color: var(--stone); }
@media (max-width: 640px) {
  .section { padding: 4.5rem 1.5rem; }
  .section__label { margin-bottom: 2.2rem; }
  /* Filmographie : structure verticale claire (une info par ligne, aérée) */
  .filmo__item {
    display: block;
    padding: 1.15rem 0;
  }
  .filmo__item:hover { padding-left: 0; }
  .filmo__year {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
  }
  .filmo__title {
    display: block;
    font-size: 1.2rem;
    line-height: 1.3;
  }
  .filmo__title em {
    display: block;
    margin-left: 0;
    margin-top: 0.15rem;
    font-size: 0.85rem;
  }
  .filmo__dir {
    display: block;
    margin-left: 0;
    margin-top: 0.3rem;
  }
  .filmo__dir::before { content: ""; }
  .filmo__role {
    display: block;
    grid-column: auto;
    margin-top: 0.25rem;
  }
}

/* --- CV téléchargeable --- */
.filmo__cv {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-top: 2.2rem;
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.3rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.filmo__cv:hover { color: var(--accent); border-color: var(--accent); }

/* --- Book (mise en page asymétrique éditoriale) --- */
.book__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.3rem;
}
.book__item {
  position: relative;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 4;
}
.book__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(0.25) contrast(1.05);
  transform: scale(1.02);
  transition: transform 0.6s cubic-bezier(0.16,1,0.3,1), filter 0.5s ease;
}
.book__item:hover img {
  transform: scale(1.08);
  filter: grayscale(0) contrast(1.05);
}
@media (max-width: 820px) {
  .book__grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Contact --- */
.contact { border-bottom: none; padding-bottom: 5rem; }
.contact__grid {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}
.contact__mail {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 2.2vw, 1.5rem);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, color 0.25s ease;
  width: fit-content;
}
.contact__mail:hover { color: var(--accent); border-color: var(--accent); }
.contact__links { display: flex; flex-wrap: wrap; gap: 1.6rem 2rem; }
.contact__links a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 0.2rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.contact__links a:hover { color: var(--accent); border-color: var(--accent); }

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2.5rem;
  font-size: 0.75rem;
  color: var(--stone);
  letter-spacing: 0.06em;
}

/* --- Reveal on scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1), transform 0.8s cubic-bezier(0.16,1,0.3,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(12,11,9,0.96);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
}
.lightbox__close {
  position: absolute;
  top: 1.8rem; right: 2.2rem;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 2.2rem;
  font-weight: 300;
  cursor: pointer;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__scroll span { animation: none; }
  .hero__overlay > *,
  .sound { opacity: 1; transform: none; animation: none; }
  .sound__eq i { animation: none; height: 60%; }
  .hero__video { transition: none; }
  html { scroll-behavior: auto; }
}
