/* --- 1. VARIABLES & RESET --- */
    :root {
      --font-display: 'Jost', sans-serif;
      --font-body: 'Mulish', sans-serif;
      --bg-color: #000000;
      --text-white: #ffffff;
      --text-grey: #cccccc;
    }

    * { box-sizing: border-box; margin: 0; padding: 0; }
    html { scroll-behavior: smooth; }
    
    body {
      font-family: var(--font-body);
      background-color: var(--bg-color);
      color: var(--text-white);
      overflow-x: hidden;
      min-height: 100vh;
    }

    /* --- 3. UTILITAIRES --- */
    .hidden { display: none !important; }

    /* --- Accessibilite : etats focus clavier --- */
    a:focus-visible, button:focus-visible {
      outline: 2px solid rgba(255,255,255,0.65);
      outline-offset: 3px;
      border-radius: 2px;
    }

    /* --- Bouton retour en haut --- */
    .back-to-top {
      position: fixed; bottom: 2rem; right: 2rem;
      width: 46px; height: 46px;
      border-radius: 50%;
      background: rgba(0,0,0,0.75);
      border: 1px solid rgba(255,255,255,0.15);
      backdrop-filter: blur(6px);
      color: #fff; font-size: 1.2rem;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; opacity: 0; pointer-events: none;
      transition: opacity 0.3s ease, transform 0.3s ease;
      z-index: 900;
      text-decoration: none;
    }
    .back-to-top.visible { opacity: 0.85; pointer-events: auto; }
    .back-to-top:hover { opacity: 1; transform: translateY(-3px); }
    @media (max-width: 768px) {
      .back-to-top { bottom: 1.2rem; right: 1.2rem; width: 42px; height: 42px; font-size: 1.1rem; }
    }
    .fade-in { animation: fadeIn 0.8s ease forwards; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

    /* --- 4. HERO --- */
    .hero {
  position: relative;
  margin-top: 90px;
  margin-bottom: 3rem;
  height: 80vh;
  overflow: hidden;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  text-align: center; padding: 0 0 3.5rem 0;

    }
    @media (max-width: 768px) {
      .hero { margin-top: 140px; height: 55vh; }
    }
    .hero-video {
      position: absolute; top: 50%; left: 50%;
      width: 100%; height: 100%;
      transform: translate(-50%, -50%);
      pointer-events: none;
      z-index: 0;
      background: #000;
      
    }
    .hero-video iframe {
      width: 100%; height: 100%;
      border: 0; display: block;
    }
    .hero-overlay {
      position: absolute; inset: 0;
      background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.75) 100%);
      pointer-events: none;
      z-index: 1;
    }
    .hero-content {
      position: relative; z-index: 2;
      color: #fff;
    }
    .hero-tag {
      font-family: var(--font-display);
      font-style: italic; font-weight: 300;
      font-size: clamp(1.3rem, 2.6vw, 2.1rem);
      letter-spacing: 0.02em;
      margin-bottom: 0;
    }
    .scroll-down {
      margin-top: 1.6rem; font-size: 1.8rem; opacity: 0.7;
      animation: float 2s infinite ease-in-out;
    }
    @keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(10px); } }

    /* --- 4b. SHOWREEL --- */
    .showreel {
      max-width: 1100px;
      margin: 0 auto;
      padding: 0 4vw 6rem 4vw;
    }
    .showreel-frame {
      position: relative;
      width: 100%;
      aspect-ratio: 16/9;
      overflow: hidden;
      box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    }
    .showreel-frame iframe {
      position: absolute; top: 0; left: 0;
      width: 100%; height: 100%;
      border: 0;
    }

    /* --- 4c. BIO --- */
    .bio {
      max-width: 1100px;
      margin: 0 auto;
      padding: 2rem 4vw 6rem 4vw;
      display: flex;
      align-items: center;
      gap: 4rem;
    }
    .bio-photo {
      flex: 0 0 320px;
      width: 320px;
      aspect-ratio: 3/4;
      overflow: hidden;
    }
    .bio-photo img {
      width: 100%; height: 100%;
      object-fit: cover;
      display: block;
    }
    .bio-text {
      flex: 1;
    }
    .bio-text h2 {
      font-family: var(--font-display);
      font-weight: 300;
      font-style: italic;
      font-size: clamp(1.8rem, 3vw, 2.5rem);
      margin-bottom: 1.5rem;
    }
    .bio-text p {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 1.05rem;
      line-height: 1.7;
      color: var(--text-grey);
    }
    .bio-text p + p { margin-top: 1.2rem; }

    @media (max-width: 768px) {
      .bio {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
      }
      .bio-photo {
        flex: 0 0 auto;
        width: 220px;
      }
    }

    /* --- 5. GRILLE FILMS --- */
    .portfolio {
      padding: 0 4vw 6rem 4vw;
      max-width: 1600px; margin: 0 auto;
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 2rem;
    }
    @media (max-width: 768px) { .grid { grid-template-columns: 1fr; } }

    .film-card {
      position: relative;
      cursor: pointer;
      width: 100%;
      aspect-ratio: 16/9;
      overflow: hidden;
      display: block;
      text-decoration: none;
      color: inherit;
    }

    .card-img {
      width: 100%; height: 100%;
      object-fit: cover;
      transition: transform 0.6s ease;
    }

    .card-overlay {
      position: absolute; inset: 0;
      background: rgba(0,0,0,0.3);
      opacity: 0; transition: opacity 0.4s ease;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    
    .card-title {
      font-family: var(--font-display);
      font-size: 1.5rem; color: #fff;
      text-align: center;
      transform: translateY(20px); transition: transform 0.4s ease;
      padding: 0 10px;
    }

    .card-info-box {
      position: absolute;
      bottom: 20px; right: 20px;
      text-align: right;
      font-family: var(--font-body);
      font-size: 0.7rem; color: #ddd;
      transform: translateY(20px); transition: transform 0.4s ease 0.1s;
    }

    /* Desktop Hover Effects */
    @media (hover: hover) {
      .film-card:hover .card-overlay { opacity: 1; }
      .film-card:hover .card-img { transform: scale(1.03); }
      .film-card:hover .card-title { transform: translateY(0); }
      .film-card:hover .card-info-box { transform: translateY(0); }
    }

    /* --- MOBILE & TOUCH FIX --- 
       On touch devices or small screens, showing the title by default 
       with a bottom gradient so the image isn't obscured. */
    @media (hover: none), (max-width: 768px) {
      .card-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 60%);
        justify-content: flex-end; /* Push text to bottom */
        padding-bottom: 3rem; /* Space for the bottom info */
      }
      .card-title, .card-info-box {
        transform: translateY(0);
      }
      .card-title {
        font-size: 1.3rem;
        margin-bottom: 0.5rem;
      }
    }

    /* --- 6. PROJET VIEW --- */
    .project-view {
      min-height: 100vh;
      background: var(--bg-color);
      padding-top: 100px;
      padding-bottom: 6rem;
    }

    .project-nav {
      position: fixed; top: 0; left: 0; right: 0;
      height: 80px; padding: 0 4vw;
      display: flex; justify-content: space-between; align-items: center;
      background: rgba(28,28,28,0.9);
      backdrop-filter: blur(10px);
      z-index: 1000;
      border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .nav-brand {
      font-family: var(--font-display);
      font-size: 1.1rem; text-transform: uppercase; letter-spacing: 0.05em;
      cursor: pointer; transition: opacity 0.3s;
    }
    .nav-brand:hover { opacity: 0.7; }
    
    .nav-close {
      font-family: var(--font-body);
      font-size: 2rem;
      cursor: pointer; opacity: 0.7; transition: opacity 0.3s;
      line-height: 1;
    }
    .nav-close:hover { opacity: 1; transform: scale(1.1); }

    .project-container { max-width: 1000px; margin: 0 auto; padding: 0 4vw; }

    .back-link {
      display: inline-block;
      margin-bottom: 2.5rem;
      font-family: var(--font-body);
      font-size: 0.78rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      color: var(--text-grey);
      text-decoration: none;
      opacity: 0.85;
      transition: opacity 0.3s, color 0.3s;
    }
    .back-link:hover { opacity: 1; color: #fff; }

    .film-pagination {
      display: flex; justify-content: space-between; gap: 2rem;
      margin-top: 5rem; padding-top: 2.5rem;
      border-top: 1px solid rgba(255,255,255,0.12);
      font-family: var(--font-body);
    }
    .film-pagination a {
      color: #fff; text-decoration: none; opacity: 0.75;
      transition: opacity 0.3s;
      display: flex; flex-direction: column; gap: 0.3rem;
    }
    .film-pagination a:hover { opacity: 1; }
    .film-pagination .pag-label {
      font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-grey);
    }
    .film-pagination .pag-title {
      font-family: var(--font-display); font-style: italic; font-size: 1.2rem;
    }
    .film-pagination .next { text-align: right; align-items: flex-end; }

    .project-header-block { margin-bottom: 2rem; text-align: left; }
    .p-title { font-family: var(--font-display); font-size: 3rem; margin-bottom: 0.5rem; }
    
    .p-meta {
      font-family: var(--font-body);
      color: var(--text-grey);
      font-size: 0.85rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      margin-bottom: 3rem;
      opacity: 0.8;
    }
    .p-meta span { margin: 0 10px; color: #555; }

    .p-desc {
      font-family: var(--font-body); 
      font-size: 1.2rem; 
      line-height: 1.5; 
      color: #e0e0e0;
      max-width: 1000px; 
      white-space: pre-line;
      font-weight: 300;
      margin-top: 4rem;
      margin-bottom: 4rem;
    }

    .p-stills { display: flex; flex-direction: column; gap: 4rem; }
    .p-img { width: 100%; height: auto; display: block; box-shadow: 0 5px 20px rgba(0,0,0,0.5); }

    .p-credits {
      margin-top: 4rem; 
      margin-bottom: 4rem;
      padding-top: 2rem; 
      border-top: 1px solid #444; 
      font-family: var(--font-body); 
      font-size: 0.9rem; 
      line-height: 2; 
      color: #bbb;
      white-space: normal;
    }

    footer {
      padding: 4rem 1rem; text-align: center;
      border-top: 1px solid rgba(255,255,255,0.1); margin-top: 4rem;
    }
    footer a { color: #fff; text-decoration: none; opacity: 0.7; margin: 0 10px; }
    footer a:hover { opacity: 1; }

    /* --- 7. SITE HEADER --- */
    .site-header {
      position: fixed; top: 0; left: 0; right: 0;
      height: 90px;
      z-index: 999;
      display: flex; align-items: center; justify-content: space-between;
      padding: 0 4vw;
      background: rgba(10,10,10,0.92);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .site-header.hidden { display: none; }

    .site-header .brand { cursor: pointer; line-height: 1.15; text-decoration: none; color: var(--text-white); display: block; }
    .site-header .brand-name {
      font-family: var(--font-display);
      font-size: 1.25rem;
      text-transform: uppercase;
      letter-spacing: 0.04em;
      font-weight: 400;
    }
    .site-header .brand-sub {
      font-family: var(--font-body);
      font-size: 0.62rem;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color: var(--text-grey);
      margin-top: 2px;
    }

    .site-nav { display: flex; gap: 2.5rem; }
    .site-nav a {
      font-family: var(--font-body);
      font-size: 0.8rem;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text-white);
      text-decoration: none;
      opacity: 0.75;
      padding-bottom: 4px;
      border-bottom: 1px solid transparent;
      transition: opacity 0.3s, border-color 0.3s;
    }
    .site-nav a:hover { opacity: 1; border-color: rgba(255,255,255,0.4); }
    .site-nav a.active { opacity: 1; border-color: rgba(255,255,255,0.85); }

    .site-social { display: flex; gap: 1.1rem; align-items: center; }
    .site-social a {
      color: var(--text-white); opacity: 0.8;
      display: flex; transition: opacity 0.3s;
    }
    .site-social a:hover { opacity: 1; }
    .site-social svg { width: 18px; height: 18px; }

    #showreel, #bio, #films, footer#contact { scroll-margin-top: 100px; }

    @media (max-width: 768px) {
      .site-header {
        flex-wrap: wrap; height: auto; row-gap: 0.7rem;
        padding: 1rem 4vw;
      }
      .site-header .brand { order: 1; }
      .site-social { order: 2; }
      .site-nav { order: 3; width: 100%; justify-content: center; gap: 1.5rem; }
      .site-nav a { font-size: 0.72rem; }
    }

    /* --- Bilingue FR/EN --- */
    html[data-lang="fr"] .lang-en { display: none; }
    html:not([data-lang="fr"]) .lang-fr { display: none; }

    .lang-toggle {
      font-family: var(--font-body);
      font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
      color: #fff; background: transparent;
      border: 1px solid rgba(255,255,255,0.35); border-radius: 20px;
      padding: 0.35rem 0.85rem; cursor: pointer;
      opacity: 0.85; transition: opacity 0.3s, border-color 0.3s;
      margin-left: 0.6rem;
    }
    .lang-toggle:hover { opacity: 1; border-color: rgba(255,255,255,0.7); }
    html:not([data-lang="fr"]) .lang-toggle .to-en { display: none; }
    html[data-lang="fr"] .lang-toggle .to-fr { display: none; }
    @media (max-width: 768px) {
      .lang-toggle { font-size: 0.68rem; padding: 0.3rem 0.7rem; }
    }

    /* --- Badges de selection festivals --- */
    .festival-badges {
      display: flex; flex-wrap: wrap; gap: 0.9rem;
      margin-top: 1.4rem;
    }
    .festival-badge {
      position: relative;
      display: inline-flex; align-items: center; justify-content: center;
      padding: 0.6rem 2.3rem;
      border: 1px solid rgba(255,255,255,0.18);
      border-radius: 3px;
      background: rgba(255,255,255,0.02);
    }
    .festival-badge::before, .festival-badge::after {
      content: '';
      position: absolute; top: 50%; transform: translateY(-50%);
      width: 12px; height: 30px;
      background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20viewBox%3D%270%200%2020%2050%27%20fill%3D%27none%27%20stroke%3D%27white%27%20stroke-width%3D%271.3%27%20stroke-linecap%3D%27round%27%3E%3Cpath%20d%3D%27M10%2048%20C10%2048%2010%2020%2010%204%27/%3E%3Cpath%20d%3D%27M10%2010%20C7%208%204%209%202%2012%27/%3E%3Cpath%20d%3D%27M10%2018%20C7%2016%204%2017%202%2020%27/%3E%3Cpath%20d%3D%27M10%2026%20C7%2024%204%2025%202%2028%27/%3E%3Cpath%20d%3D%27M10%2034%20C7%2032%204%2033%202%2036%27/%3E%3Cpath%20d%3D%27M10%2042%20C7%2040%204%2041%202%2044%27/%3E%3C/svg%3E");
      background-repeat: no-repeat; background-size: contain;
      opacity: 0.45;
    }
    .festival-badge::before { left: 9px; }
    .festival-badge::after { right: 9px; transform: translateY(-50%) scaleX(-1); }
    .festival-badge-text {
      text-align: center; line-height: 1.3;
      font-family: var(--font-body);
      font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--text-grey);
      white-space: nowrap;
    }
    .festival-badge-text strong {
      display: block;
      font-family: var(--font-display); font-style: italic; font-weight: 400;
      font-size: 1rem; text-transform: none; letter-spacing: 0;
      color: #fff;
      margin-bottom: 0.15rem;
      white-space: normal;
    }
    /* --- Lightbox stills (pages films) --- */
    .p-img { cursor: zoom-in; }
    .lightbox {
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.94);
      z-index: 2000;
      display: flex; align-items: center; justify-content: center;
      padding: 4vh 4vw;
      cursor: zoom-out;
      opacity: 0; pointer-events: none;
      transition: opacity 0.25s ease;
    }
    .lightbox.visible { opacity: 1; pointer-events: auto; }
    .lightbox img {
      max-width: 100%; max-height: 100%;
      box-shadow: 0 20px 60px rgba(0,0,0,0.7);
    }
    .lightbox-close {
      position: fixed; top: 1.5rem; right: 2rem;
      font-size: 1.8rem; color: #fff; opacity: 0.8;
      cursor: pointer; z-index: 2001;
      transition: opacity 0.3s;
    }
    .lightbox-close:hover { opacity: 1; }

    /* --- Page contact --- */
    .contact-block {
      max-width: 700px; margin: 0 auto; padding: 3rem 4vw 6rem 4vw; text-align: center;
    }
    .big-email {
      font-family: var(--font-display); font-style: italic; font-weight: 100;
      font-size: clamp(0.8rem, 2vw, 1.3rem); display: inline-block; margin: 1.5rem 0 2.5rem 0;
      color: var(--text-white); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.3);
      transition: opacity 0.3s;
    }
    .big-email:hover { opacity: 0.75; }
    .contact-block p { font-family: var(--font-body); color: var(--text-grey); font-size: 1.05rem; line-height: 1.7; }
    .contact-social { display: flex; justify-content: center; gap: 1.5rem; margin-top: 2rem; }
    .contact-social a { color: var(--text-white); opacity: 0.8; transition: opacity 0.3s; }
    .contact-social a:hover { opacity: 1; }
    .contact-social svg { width: 24px; height: 24px; }

    /* --- Pages simples (Showreel, Contact) --- */
    .simple-page { padding-top: 90px; min-height: 80vh; }
    @media (max-width: 768px) { .simple-page { padding-top: 130px; } }

    /* --- Bouton CV --- */
    .cv-button {
      display: inline-flex; align-items: center; gap: 0.5rem;
      font-family: var(--font-body);
      font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase;
      color: var(--text-white); text-decoration: none;
      padding: 0.7rem 1.3rem;
      border: 1px solid rgba(255,255,255,0.35);
      border-radius: 3px;
      transition: opacity 0.3s, border-color 0.3s;
    }
    .cv-button:hover { opacity: 0.85; border-color: rgba(255,255,255,0.7); }
    .cv-button::after {
      content: '↓';
      font-size: 0.9rem;
    }

    /* --- Filmographie --- */
    .filmography {
      max-width: 900px; margin: 0 auto;
      padding: 1rem 4vw 6rem 4vw;
    }
    .filmography h2 {
      font-family: var(--font-display); font-weight: 300; font-style: italic;
      font-size: clamp(1.4rem, 2.5vw, 1.9rem);
      margin-bottom: 1.8rem;
      border-bottom: 1px solid rgba(255,255,255,0.12);
      padding-bottom: 1rem;
    }
    .filmography-list { list-style: none; }
    .filmography-list li {
      display: flex; align-items: baseline; gap: 1.2rem;
      padding: 0.85rem 0;
      border-bottom: 1px solid rgba(255,255,255,0.06);
      font-family: var(--font-body);
    }
    .filmography-year {
      flex: 0 0 3.2rem;
      color: var(--text-grey);
      font-size: 0.85rem; letter-spacing: 0.05em;
    }
    .filmography-title {
      flex: 1;
      font-family: var(--font-display); font-style: italic; font-weight: 400;
      font-size: 1.05rem;
      color: #fff;
    }
    .filmography-role {
      color: var(--text-grey);
      font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase;
      white-space: nowrap;
    }
    @media (max-width: 600px) {
      .filmography-list li { flex-wrap: wrap; gap: 0.3rem 1.2rem; }
      .filmography-role { flex-basis: 100%; }
    }
