/* Police personnalisée NB Architekt */
@font-face {
    font-family: 'NB Architekt';
    src: url('../fonts/NBArchitektLight.woff2') format('woff2'),
         url('../fonts/NBArchitektLight.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Avenir Book';
    src: url('../fonts/Avenir-Book.woff2') format('woff2'),
         url('../fonts/Avenir-Book.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --color-background: #000000;
    --color-text: #ffffff;
    --color-accent: #ffff00;
    --padding-large: 60px;
    --padding-medium: 40px;
    --padding-small: 20px;
    --font-size-large: 2.5rem;
    --font-size-medium: 1.1875rem;
    --font-size-small: 0.9rem;
    --transition-default: 0.3s ease;

    /* Overlay header positioning variables */
    --overlay-header-top: 60px;
    --overlay-header-horizontal: 60px;

    /* BIO block dimensions & margins */
    --bio-width-desktop: calc(50vw + 10px);
    --bio-mt-desktop: 40px;
    --bio-mr-desktop: 50px;
    --bio-mb-desktop: 70px;

    --bio-width-square: calc(50vw + 10px);
    --bio-mt-square: 40px;
    --bio-mr-square: 50px;
    --bio-mb-square: 70px;

    --bio-width-mobile: calc(100vw - 120px);
    --bio-mt-mobile: 20px;
    --bio-mr-mobile: 50px;
    --bio-mb-mobile: 70px;

    /* BIO scroll margins (for bottom padding) */
    --bio-scroll-margin-desktop: 84px;
    --bio-scroll-margin-tablet: 60px;
    --bio-scroll-margin-mobile: 40px;

    --arrow-gap: 15px;           /* reduced gap above and below arrows */
}

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

html, body {
    overflow: hidden;
    color: var(--color-text);
    width: 100%;
    height: 100%;
    background-color: var(--color-background);
    font-family: 'NB Architekt', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.2;
}

/* Conteneur vidéo */
.media-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
    overflow: hidden;
}

.video-wrapper.active {
    display: block;
    opacity: 0;
    transition: opacity var(--transition-default);
}

.video-wrapper.visible {
    opacity: 1;
}

.video-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 110%;
    height: 110%;
    transform: translate(-50%, -50%);
    border: 0;
    background-color: var(--color-background);
    object-fit: cover;
}

/* Conteneur principal */
.content-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--padding-large);
    max-width: 100%;
}

/* Logo */
.logo {
    color: var(--color-accent);
    font-size: var(--font-size-large);
    font-weight: 300;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding-left: 0;
    margin-left: 20px;
}

.logo-small {
    font-size: var(--font-size-large);
}

/* Contenu inférieur */
.bottom-content {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: flex-end;
    padding: 0 5% 0 0;
    margin-left: 20px;
}

/* Navigation */
.navigation {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    width: 22%;
    padding-right: 20px;
}

.nav-item {
    margin-bottom: 10px;
    cursor: pointer;
    color: var(--color-text);
    text-decoration: none;
    font-family: 'Avenir Book', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: var(--font-size-medium);
    font-weight: 400;
    letter-spacing: 1.2px;
    transition: color var(--transition-default);
}

.nav-item:last-child {
    margin-bottom: 0;
}

.nav-item:hover, .nav-item:focus {
    color: var(--color-accent);
    outline: none;
}

/* Colonnes de créateurs */
.creators-columns {
    position: relative;
    display: flex;
    justify-content: space-between;
    width: 60%;
    margin-left: 15px;
    padding-right: 0;
}

.creators-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 31%;
    margin-right: 3%;
}

.creators-column:last-child {
    margin-right: 0;
}

.creator {
    cursor: pointer;
    font-size: var(--font-size-medium);
    letter-spacing: 0.5px;
    transition: color var(--transition-default);
    white-space: nowrap;
    overflow: visible;
    color: var(--color-text);
    width: 100%;
}

.creator:hover, .creator:focus {
    color: var(--color-accent);
    outline: none;
}

.creator.highlighted {
    color: var(--color-accent);
}

/* Bouton Son */
#soundToggle {
    position: absolute;
    top: var(--padding-large);
    right: var(--padding-large);
    font-family: 'Avenir Book', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 400;
    color: var(--color-accent);
    background: transparent;
    border: none;
    cursor: pointer;
    letter-spacing: 1.2px;
    font-size: calc(var(--font-size-medium) * 1.05);
    padding: 0;
    z-index: 100;
    text-align: right;
    transition: opacity var(--transition-default);
}

#soundToggle:hover, #soundToggle:focus {
    opacity: 0.8;
    outline: none;
}

/* Pop-up Contact */
.contact-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 500;
    display: none;
    overflow: hidden;
}

.contact-overlay.active {
    display: block;
}

.about-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 500;
    display: none;
    overflow: hidden;
}

.about-overlay.active {
    display: block;
}

.contact-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.contact-logo {
    position: absolute;
    top: var(--padding-large);
    left: calc(var(--padding-large) + 20px);
    color: var(--color-accent);
    font-size: var(--font-size-large);
    font-weight: 300;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'NB Architekt', sans-serif;
    z-index: 1;
}

.contact-logo .logo-small {
    font-size: var(--font-size-large);
}

.close-btn {
    position: absolute;
    top: var(--padding-large);
    right: var(--padding-large);
    color: var(--color-accent);
    font-size: var(--font-size-large);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'NB Architekt', sans-serif;
    font-weight: 300;
    padding: 0;
    margin: 0;
    outline: none;
    z-index: 1;
}

.close-btn:hover {
    opacity: 0.8;
}

.contact-content {
    position: absolute;
    bottom: var(--padding-large);
    left: 33.33%;
    width: 300px;
    max-width: 90%;
    z-index: 1;
}

.contact-section {
    margin-bottom: 20px;
}

.contact-section-title {
    color: var(--color-accent);
    font-size: 1.25rem;
    font-family: 'NB Architekt', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 4px;
    letter-spacing: 1.5px;
}

.contact-info {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.2;
    font-family: 'Avenir Book', -apple-system, BlinkMacSystemFont, sans-serif;
}

.contact-email {
    color: var(--color-text);
    text-decoration: none;
    transition: color var(--transition-default);
}

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

.contact-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.about-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.about-logo {
    position: absolute;
    top: var(--padding-large);
    left: calc(var(--padding-large) + 20px);
    color: var(--color-accent);
    font-size: var(--font-size-large);
    font-weight: 300;
    line-height: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: 'NB Architekt', sans-serif;
    z-index: 1;
}

.about-logo .logo-small {
    font-size: var(--font-size-large);
}

.about-content {
    position: absolute;
    bottom: var(--padding-large);
    left: 33.33%;
    width: 600px;
    max-width: 90%;
    z-index: 1;
}

.about-section {
    margin-bottom: 20px;
}

.about-section-title {
    color: var(--color-accent);
    font-size: 1.25rem;
    font-family: 'NB Architekt', sans-serif;
    font-weight: 300;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1.5px;
}

.about-text {
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: 'Avenir Book', -apple-system, BlinkMacSystemFont, sans-serif;
}

.about-text p {
    margin-bottom: 15px;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.about-video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* --- section bio --------------------------------------- */
.bio-block{width:90%;max-width:540px;margin:60px auto 120px;padding:0 2px;text-align:left;}
.bio-block h2{font-family:'NB Architekt';color:var(--color-accent);font-size:1.2rem;margin-bottom:28px;}
.bio-block p{font-family:'Avenir Book';font-size:1rem;line-height:1.45;color:var(--color-text);}


/* Media queries pour desktop */
@media (min-width: 1921px) {
    :root {
        --font-size-large: 3rem;
        --font-size-medium: 1.4375rem;
    }
}

@media (max-width: 1400px) {
    :root {
        --font-size-medium: 1.1rem;
    }
}

@media (max-width: 1200px) {
    :root {
        --font-size-medium: 1rem;
    }
    .creator {
        letter-spacing: 0.3px;
    }
    .about-content {
        left: 50%;
        transform: translateX(-50%);
        width: 60%;
    }
    .about-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 1024px) {
    :root {
        --padding-large: 40px;
        --font-size-large: 2.2rem;
        --font-size-medium: 0.95rem;
        --overlay-header-top: 40px;      /* 40px (content-wrapper) + 3% padding */
        --overlay-header-horizontal: 40px;
    }
    .content-wrapper { 
        padding: var(--padding-medium); 
    }
    .bottom-content { 
        padding: 0 3%; 
    }
    .navigation { 
        width: 25%; 
        padding-right: 15px; 
    }
    .creators-columns { 
        width: 72%; 
        margin-left: 10px;
    }
    .creators-column { 
        width: 31%; 
    }
    .logo { 
        padding-left: 3%; 
    }
    
    .overlay-title {
        margin-left: 0;  /* 1024px: logo utilise padding-left: 3% au lieu de margin */
        padding-left: 3%;  /* Match du logo padding-left */
    }
    
.overlay-bio {
  position: relative;
    max-width: 90vw;
    padding: 0 24px;
  }
}

@media (max-width: 920px) {
    :root {
        --font-size-medium: 0.9rem;
    }
    .creator { 
        font-size: var(--font-size-medium);
        letter-spacing: 0.2px;
    }
}

@media (max-width: 812px) {
    :root {
        --padding-large: 30px;
        --font-size-large: 1.8rem;
        --font-size-medium: 0.85rem;
        --overlay-header-top: 30px;      /* 812px: padding-top du content-wrapper */
        --overlay-header-horizontal: 20px;
    }
    .content-wrapper { 
        padding: 30px 30px 30px 20px; 
    }
    .creators-columns { 
        width: 67%; 
        margin-left: 8px;
    }
    .creators-column { 
        width: 30%;
        margin-right: 4%;
    }
    .navigation { 
        width: 25%; 
        margin-right: 0; 
        padding-right: 12px; 
    }
    
    .overlay-title {
        margin-left: 20px;  /* 812px: logo garde son margin-left: 20px par défaut */
    }
    
    .director-overlay .overlay-close {
        top: calc(var(--overlay-header-top) - 13px) !important;  /* Tablette: -13px au lieu de -15px (descendre de 2px) */
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-medium: 0.8rem;
    }
    .creators-columns {
        width: 70%;
        margin-left: 1px;
    }
    .creators-column {
        width: 30%;
        margin-right: 3.5%;
    }
    .navigation {
        width: 28%;
        padding-right: 5px;
    }
    .about-content {
        width: 85%;
    }
    .about-section-title {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    .about-text {
        font-size: 0.8rem;
        line-height: 1.4;
    }
}

/* Styles spécifiques pour mobile */
@media (max-width: 576px) {
    :root {
        --padding-large: 20px;
        --font-size-large: 1.5rem;
        --font-size-medium: 0.85rem;
        --overlay-header-top: 20px;      /* 20px du content-wrapper */
        --overlay-header-horizontal: 0px;  /* Mobile: aligné au bord gauche */
    }
    
    .content-wrapper {
        padding: var(--padding-small);
        position: relative;
        padding-bottom: 4vh;
    }
    
    .logo {
        margin-left: 0;
        margin-bottom: 30px;
    }
    
    .overlay-title {
        margin-left: 0;  /* Mobile: logo n'a pas de margin-left */
    }
    
    .director-overlay .overlay-close {
        top: calc(var(--overlay-header-top) - 11px) !important;  /* Mobile: -11px au lieu de -12px (descendre de 1px) */
    }
    
    .bottom-content { 
        flex-direction: column; 
        gap: 30px; 
        padding: 0; 
        margin-left: 0;
        align-items: stretch;
    }
    
    /* Navigation horizontale en bas */
    .navigation {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        order: 2;
        padding: 0;
        position: relative;
    }
    
    .navigation .nav-item {
        margin-bottom: 0;
        margin-right: 0;
        font-size: 0.65rem;
        letter-spacing: 0.4px;
        text-align: center;
    }
    
    #aboutLink {
        position: absolute;
        left: 4%;
        text-align: left;
    }
    
    #contactLink {
        position: absolute;
        left: 30%;
        text-align: center;
    }
    
    .navigation a[href="https://www.anneezero.com"] {
        position: absolute;
        right: 31%;
        text-align: center;
    }
    
    #labLink {
        position: absolute;
        right: var(--padding-small);
        text-align: right;
    }
    
    /* Colonnes de créateurs pour mobile */
    .creators-columns {
        width: auto;
        margin-left: auto;
        margin-right: var(--padding-small);
        order: 1;
        display: grid;
        grid-template-columns: auto auto;
        gap: 20px;
        padding: 0;
        justify-content: end;
        margin-bottom: 1.5vh;
    }
    
    .creators-column {
        display: flex;
        flex-direction: column;
        gap: 6px;
        width: 100%;
        margin-right: 8px;
    }
    
    .creator {
        margin-bottom: 6px;
        font-size: 0.9rem;
        letter-spacing: 0.25px;
        white-space: normal;
        word-break: normal;
        line-height: 1.2;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    #soundToggle {
        top: var(--padding-small);
        right: var(--padding-small);
        font-size: 0.65rem;
        letter-spacing: 0.4px;
    }
    
    .about-content {
        width: 90%;
        bottom: var(--padding-large);
    }
    .about-section-title {
        font-size: 0.9rem;
        letter-spacing: 1px;
    }
    .about-text {
        font-size: 0.7rem;
        line-height: 1.35;
    }
}

@media (max-width: 700px) {
  .overlay-bio {
    max-width: calc(100vw - 40px);
    margin: 10px 20px 40px auto;
    transform: translateX(20px);
    text-align: left;
  }
  .overlay-thumbs{
    /* mobile : 4 vignettes empilées, même ratio */
    display:flex;
    flex-direction:column;
    width:100vw;
    gap:0;
    margin:0;
    padding:0;
  }
  /* Mobile – toutes les vignettes (reel + thumbs) en 2:1 */
  .overlay-reel,
  .overlay-thumb{
    aspect-ratio: 2 / 1 !important;
  }
}

/* Ajustements supplémentaires pour très petits écrans */
@media (max-width: 360px) {
    :root {
        --font-size-medium: 0.65rem;
    }
    
    .creator {
        font-size: 0.55rem;
    }
    
    .navigation .nav-item {
        font-size: 0.6rem;
    }
}

/* Réglages fonts spécifiques */
.navigation .nav-item {
    font-family: 'Avenir Book', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 200 !important;
    letter-spacing: 0.8px !important;
}

#soundToggle {
    font-family: 'Avenir Book', sans-serif !important;
    font-size: 0.85rem !important;
    font-weight: 200 !important;
    letter-spacing: 0.8px !important;
}

@media (max-width: 1024px) {
    .navigation .nav-item, #soundToggle {
        font-size: 0.8rem !important;
        letter-spacing: 0.6px !important;
    }
}

@media (max-width: 768px) {
    .navigation .nav-item, #soundToggle {
        font-size: 0.75rem !important;
        letter-spacing: 0.5px !important;
    }
    .contact-content {
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
    }
}

@media (max-width: 576px) {
    .navigation .nav-item, #soundToggle {
        font-size: 0.75rem !important;
        letter-spacing: 0.35px !important;
    }
    
    .contact-content,
    .about-content {
        left: 50%;
        transform: translateX(-50%);
        text-align: center;
        bottom: var(--padding-medium);
        width: 80%;
    }
    
    .contact-logo, .close-btn,
    .about-logo {
        top: 20px;
        font-size: 1.5rem;
    }
    
    .contact-logo,
    .about-logo {
        left: 20px;
    }
    
    .close-btn {
        right: 20px;
    }
}

/* Alignement du bouton son responsive */
@media (min-width: 577px) {
    #soundToggle {
        right: calc(var(--padding-large) + 5%);
    }
}

@media (min-width: 993px) {
    #soundToggle {
        right: calc(var(--padding-large) + 7%);
    }
    .about-content {
        left: auto;
        right: 15%;
        transform: none;
        width: 600px;
        max-width: 35%;
    }
}

@media (min-width: 1201px) {
    #soundToggle {
        right: calc(var(--padding-large) + 8%);
    }
}

@media (min-width: 1401px) {
    #soundToggle {
        right: calc(var(--padding-large) + 10%);
    }
}

@media (max-width: 992px) {
    .about-content {
        width: 75%;
    }
    .about-section-title {
        font-size: 1.1rem;
    }
    .about-text {
        font-size: 0.85rem;
    }
}

@media (min-width: 577px) and (max-width: 992px) {
    .about-content {
        left: auto;
        right: 10%;
        transform: none;
        width: 70%;
        max-width: 550px;
    }
    .about-section-title {
        font-size: clamp(1rem, 1.3vw + 0.6rem, 1.1rem);
    }
    .about-text {
        font-size: clamp(0.8rem, 1vw + 0.5rem, 0.9rem);
        line-height: 1.45;
    }
}

/* Fluid typography for large desktop as well */
@media (min-width: 1200px) {
    .about-section-title {
        font-size: clamp(1.1rem, 0.8vw + 0.7rem, 1.25rem);
    }
    .about-text {
        font-size: clamp(0.9rem, 0.6vw + 0.6rem, 0.95rem);
    }
} 

/* === OVERLAY DIRECTOR =================================================== */
/* === OVERLAY HEADER (titre + X) ===================================== */
.overlay-header{
  position:absolute;          /* superposé au visuel, ne pousse plus le contenu */
  top:0;left:0;width:100%;
  z-index:10;
  display:flex;
  justify-content:space-between;
  padding: var(--overlay-header-top) var(--overlay-header-horizontal) 0;  /* Variables responsive */
  font-family:'NB Architekt',sans-serif;
  line-height: 0.85;          /* Cohérent avec les titres */
}

.overlay-title {
  margin-left: 20px;  /* Correspond exactement au margin-left du .logo */
}

.overlay-title .label {
  color: #fff !important;
}
.overlay-title .name {
  color: var(--color-accent) !important;
}
.overlay-close {
  font-family: 'NB Architekt', sans-serif;
  font-weight: 300;
  font-size: var(--font-size-large);    /* Cohérent avec les titres */
  line-height: 1;
  background: none;
  border: 0;
  color: #ffffff;
  cursor: pointer;
}
/* === DIRECTOR OVERLAY (contenant scrollable) ======================== */
.director-overlay{
  position:fixed;             /* couvre la fenêtre, au-dessus de la home */
  inset:0;
  width:100vw;
  height:100vh;
  background:#000;
  z-index:600;
  overflow-y:auto;            /* active le scroll interne */
  -webkit-overflow-scrolling:touch;
  display: flex;
  flex-direction: column;
  padding: 0;
}

.overlay-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: var(--overlay-header-top) var(--overlay-header-horizontal) 0;  /* Variables responsive */
  background: transparent;
  font-family: 'NB Architekt', sans-serif;
  line-height: 1;
  gap: 0.2em;
}

.overlay-title .label,
.overlay-title .name {
  font-family: 'NB Architekt', sans-serif;
  font-size: var(--font-size-large);     /* Utilise le système responsive comme .logo */
  text-transform: uppercase;
  color: var(--color-accent);
  letter-spacing: 1px;                   /* Correspond au .logo */
  font-weight: 300;
  line-height: 0.85;                     /* Correspond au .logo */
  display: block;
}

.overlay-close {
  position: absolute;
  top: 40px;
  right: 60px;
  font-family: 'NB Architekt', sans-serif;
  font-size: var(--font-size-large);
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  transition: color 0.2s;
  line-height: 1;
  padding: 0;
  z-index: 1000; /* S'assurer qu'il est au-dessus de tout */
  pointer-events: auto; /* Forcer les événements de pointeur */
}
.overlay-close:hover {
  color: #fff;
}

/* Grille stricte DA */
.overlay-director-grid {
  display: flex;
  flex-direction: column;
  width: 100vw;
  margin: 0;
  padding: 0;
  gap: 0;
}

/* Vignette principale : ratio 16:7 */
.overlay-reel {
  width: 100vw;
  aspect-ratio: 16/9;
  margin: 0;
  position: relative;
  overflow: hidden;
  background: #111;
  border-radius: 0;
  display: block;
}

/* Overlay sombre pour l'effet de densification au survol sur la vignette principale */
.overlay-reel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.overlay-reel:hover::before {
  background: rgba(0, 0, 0, 0.4); /* Densification de 40% */
}

.overlay-reel:hover .overlay-caption {
  opacity: 1;
}

/* Vignettes secondaires : ratio 16:9 */
.overlay-thumbs {
  display: grid;
  width: 100vw;
  gap: 0;
  margin: 0;
  padding: 0;
  background: none !important;
}

/* ===== MISE EN PAGE ADAPTATIVE SELON LE NOMBRE DE VIGNETTES ===== */

/* DESKTOP (≥1025px) - Mise en page adaptative */
@media (min-width: 1025px) {
  /* 4 vignettes : 1 principale + 3 secondaires en ligne */
  .thumbs-count-4 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
  }
  
  /* 3 vignettes : 1 principale + 2 secondaires en ligne */
  .thumbs-count-3 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
  }
  
  /* 2 vignettes : 1 principale + 1 secondaire centré */
  .thumbs-count-2 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
    justify-items: center;
  }
  
  /* 1 vignette : seulement la principale, masquer le conteneur des secondaires */
  .thumbs-count-1 .overlay-thumbs {
    display: none;
  }
  
  /* Desktop - aspect ratio 16:9 pour toutes les vignettes */
  .thumbs-count-4 .overlay-reel,
  .thumbs-count-3 .overlay-reel,
  .thumbs-count-2 .overlay-reel,
  .thumbs-count-1 .overlay-reel {
    aspect-ratio: 16 / 9;
  }
}
/********  TABLETTE / FORMATS CARRÉS 700–1024px  ********/
@media (min-width: 701px) and (max-width: 1024px) {

  /* 4 vignettes : 1 principale + 2 en ligne + 1 pleine largeur */
  .thumbs-count-4 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
  }

  .thumbs-count-4 .overlay-thumb:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }
  .thumbs-count-4 .overlay-thumb:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }
  .thumbs-count-4 .overlay-thumb:nth-child(3) {
    grid-column: 1 / span 2;
    grid-row: 2;
  }

  /* 3 vignettes : 1 principale + 2 en ligne */
  .thumbs-count-3 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
  }

  /* 2 vignettes : 1 principale + 1 secondaire centré */
  .thumbs-count-2 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    gap: 0;
    width: 100vw;
    margin: 0;
    padding: 0;
    margin-bottom: var(--arrow-gap,28px);
    background: none;
    justify-items: center;
  }

  /* 1 vignette : seulement la principale */
  .thumbs-count-1 .overlay-thumbs {
    display: none;
  }

  /* Carré – vignettes principales et 3ème en ratio 2:1 */
  .thumbs-count-4 .overlay-reel,
  .thumbs-count-3 .overlay-reel,
  .thumbs-count-2 .overlay-reel,
  .thumbs-count-1 .overlay-reel {
    aspect-ratio: 2 / 1;
  }
  
  .thumbs-count-4 .overlay-thumb:nth-child(3) {
    aspect-ratio: 2 / 1 !important;
  }



  /* Carré – vignettes 1, 3 et 4 en ratio 2:1 */

}
@media (max-width: 700px) {
  /* Mobile : toutes les vignettes en colonne */
  .thumbs-count-4 .overlay-thumbs,
  .thumbs-count-3 .overlay-thumbs,
  .thumbs-count-2 .overlay-thumbs {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, 1fr);
    margin-bottom: var(--arrow-gap,28px);
  }

  /* Mobile - aspect ratio 16:9 pour toutes les vignettes */
  .thumbs-count-4 .overlay-reel,
  .thumbs-count-3 .overlay-reel,
  .thumbs-count-2 .overlay-reel,
  .thumbs-count-1 .overlay-reel {
    aspect-ratio: 16 / 9;
  }
}

/* Vignettes bord à bord, pas de fond noir, pas de marge */
.overlay-thumb {
  aspect-ratio: 16/9;
  width: 100%;
  height: auto;
  position: relative;
  overflow: hidden;
  margin: 0;
  border-radius: 0;
  background: none !important; /* Correction ici */
  display: block;
  position:relative;
}

/* Overlay sombre pour l'effet de densification au survol */
.overlay-thumb::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  z-index: 1;
  pointer-events: none;
}

.overlay-thumb:hover::before {
  background: rgba(0, 0, 0, 0.4); /* Densification de 40% */
}

.overlay-thumb img,
.overlay-reel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #000;
  border-radius: 0;
}

/* Caption principale : alignement et couleur stricts */
.overlay-caption{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:auto;
  max-width:90%;
  padding:0;
  background:none;
  color:#fff;
  font-family:'Avenir Book',sans-serif;
  display:flex;
  flex-direction:column;      /* two‑line vertical layout */
  align-items:center;         /* center caption block */
  justify-content:center;
  gap:0.2em;                 /* vertical spacing between title & credit        */
  text-align:center;
  opacity:0;
  transition:opacity .25s ease;
  z-index: 2; /* Au-dessus de l'overlay sombre */
}

.overlay-thumb:hover .overlay-caption {
  opacity: 1;
}

.overlay-caption .title {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.25rem;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
  padding: 0;
}

.overlay-caption .credit {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.25rem;
  color: #ffffff;
  opacity: 1;
  line-height: 1.05;
  margin: 0 0 0 6em;        /* increased horizontal offset */
  padding: 0;
  white-space: nowrap;
}

.overlay-thumb .overlay-caption{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  width:auto;
  max-width:90%;
  padding:0;
  background:none;
  opacity:0;                   /* toujours masqué par défaut */
  transition:opacity .2s;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:0.15em;
  text-align:center;
}
.overlay-reel:hover .overlay-caption,
.overlay-thumb:hover .overlay-caption,
.overlay-thumb:focus .overlay-caption {
  opacity: 1;
  transition: opacity 0.25s ease;
}

.overlay-thumb .title {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.1rem;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
  padding: 0;
}
.overlay-thumb .credit {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.1rem;
  color: #ffffff;
  opacity: 1;
  line-height: 1.05;
  margin: 0 0 0 4.5em;      /* keep similar proportion for thumbs */
  padding: 0;
  white-space: nowrap;
}

/* --- make hero/vignette principale caption identical to thumbs --- */
.overlay-reel .title {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.1rem;
  color: var(--color-accent);
  letter-spacing: 0.04em;
  font-weight: 300;
  line-height: 1.1;
  margin: 0;
  padding: 0;
}
.overlay-reel .credit {
  font-family: 'NB Architekt', sans-serif;
  font-size: 1.1rem;
  color: #ffffff;
  opacity: 1;
  line-height: 1.05;
  margin: 0 0 0 4.5em; /* same horizontal offset as thumbs */
  padding: 0;
  white-space: nowrap;
}

/* Scroll-arrow overlays fixed at bottom center */
.scroll-arrow{
  position: relative;                 /* reste dans le flux, défile avec la page */
  display: block;
  margin: var(--arrow-gap,28px) auto; /* centre horizontal + espace vertical      */
  width: clamp(24px, 1.6vw + 18px, 48px);
  height: clamp(24px, 1.6vw + 18px, 48px);
  border: none;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0.9;
  z-index: 750;
}

/* arrow-down: fixed 20px above bottom of window */
.scroll-arrow.down {
    position: fixed !important;          /* fixe par rapport à la fenêtre */
    bottom: var(--arrow-gap, 28px);      /* écart depuis le bas */
    left: 50%;                           /* centre horizontal */
    transform: translateX(-50%);         /* ajustement précis */
    display: block !important;           /* toujours visible */
    width: clamp(24px, 1.6vw + 18px, 48px);
    height: clamp(24px, 1.6vw + 18px, 48px);
    z-index: 750;                        /* au-dessus du contenu */
}

/* arrow-up : fixe, centré, entre thumbs et bio */
.scroll-arrow.up {
    position: relative !important;              /* remain in flow */
    display: block !important;                  /* ensure shown */
    margin: var(--arrow-gap, 15px) auto 0 !important; /* gap above, centre */
    width: clamp(24px, 1.6vw + 18px, 48px);
    height: clamp(24px, 1.6vw + 18px, 48px);
    z-index: 750;                               /* above content */
}

/* image interne flèche */
.scroll-arrow > img{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* === Responsive header typography (director overlay) === */
.overlay-title .label,
.overlay-title .name {
    font-family: 'NB Architekt', sans-serif;
    font-size: var(--font-size-large);    /* Identique à .logo */
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 1px;                  /* Identique à .logo */
    line-height: 0.85;          /* same rhythm as “ANNÉEZÉRO / CONTENT” */
    display: block;
    white-space: normal;       /* allow internal <br> split */
}

/* Close‑icon also scales with viewport width */
.overlay-close {
    color: #ffffff;
    font-size: var(--font-size-large);    /* Cohérent avec les titres */
}

/* === Header pinned over director overlay, stays fixed while scrolling === */
.overlay-header{
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 700;          /* higher than everything inside overlay */
  padding-top: var(--overlay-header-top);     /* Responsive positioning */
}
/* === Unified responsive caption typography (title + credit) ============ */
/* === Unified responsive caption typography (title + credit) ============ */
.overlay-caption .title,
.overlay-thumb .title,
.overlay-reel .title {
  font-size: clamp(0.8rem, 1vw + 0.3rem, 1.6rem);
  line-height: 1.05;
}

.overlay-caption .credit,
.overlay-thumb .credit,
.overlay-reel .credit {
  font-size: clamp(0.8rem, 1vw + 0.3rem, 1.6rem);
  margin: 0 0 0 4.5em;
  line-height: 1.05;
}
/* === Canonical BIO layout (per DA) ===================================== */

/* Base overlay-bio: always reserve space for arrow */
.overlay-bio {
  /* existing properties… */
  padding-top: var(--arrow-gap, 15px); /* always reserve space for arrow */
}

/* Bio scroll padding for responsive bottom margins */
.bio-scroll-padding {
  padding-bottom: var(--bio-scroll-margin-desktop);
}

/* ----- Desktop ≥1025px ------------------------------------------------- */
@media (min-width: 1025px) {
  /* Desktop – bio aligned so its left edge is the viewport centre
     and its right edge stays 50 px from the right border */
  .overlay-bio {
    position: relative;
    width: var(--bio-width-desktop);
    margin: 0 var(--bio-mr-desktop) var(--bio-mb-desktop) auto;
    text-align: left;
    transform: none;
    /* Add top padding for combined margin and arrow gap */
    padding-top: calc(var(--bio-mt-desktop) + var(--arrow-gap));
  }
  /* Desktop – hero vignette (reel) wider ratio 2:1 */
  .overlay-reel{
    aspect-ratio: 2 / 1;          /* 2:1 (width twice the height) */
  }
}

/* ----- Carré / Tablette 701–1024px ------------------------------------ */
@media (min-width: 701px) and (max-width: 1024px) {
  .overlay-bio {
    width: var(--bio-width-square);
    margin: 0 var(--bio-mr-square) var(--bio-mb-square) auto;
    text-align: left;
    transform: none;
    padding-top: calc(var(--bio-mt-square) + var(--arrow-gap));
  }
  
  .bio-scroll-padding {
    padding-bottom: var(--bio-scroll-margin-tablet);
  }
}

/* ----- Mobile ≤700px --------------------------------------------------- */
@media (max-width: 700px) {
  .overlay-bio {
    width: var(--bio-width-mobile);
    margin: 0 var(--bio-mr-mobile) var(--bio-mb-mobile) auto;
    text-align: left;
    transform: none;
    padding-top: calc(var(--bio-mt-mobile) + var(--arrow-gap));
  }
  
  .bio-scroll-padding {
    padding-bottom: var(--bio-scroll-margin-mobile);
  }
}

/* ==== TYPOGRAPHIE BIO – DESKTOP ≥1025px ==== */
@media (min-width: 1025px) {
  .overlay-bio {
    font-family: 'Avenir Book', sans-serif;
    font-size: 0.9rem;        /* ajustable */
    font-weight: 200;       /* Avenir-Book normal */
    line-height: 1.55;      /* réglage DA */
    text-align: left;
  }
  .overlay-bio .bio-title {
    font-family: 'NB Architekt', sans-serif;
    font-size: 1.15rem;     /* ajustable */
    font-weight: 200;       /* NBARCHITEKTLIGHT */
    line-height: 1.1;       /* ajustement vertical */
    margin-bottom: 28px;
  }
}

/* ==== TYPOGRAPHIE BIO – CARRÉ 701–1024px ==== */
@media (min-width: 701px) and (max-width: 1024px) {
  .overlay-bio {
    font-family: 'Avenir Book', sans-serif;
    font-size: 0.9rem;        /* même réglage que desktop */
    font-weight: 200;
    line-height: 1.55;
    text-align: left;
  }
  .overlay-bio .bio-title {
    font-family: 'NB Architekt', sans-serif;
    font-size: 1.05rem;
    font-weight: 200;
    line-height: 1.1;
    margin-bottom: 28px;
  }
}

/* ==== TYPOGRAPHIE BIO – MOBILE ≤700px ==== */
@media (max-width: 700px) {
  .overlay-bio {
    font-family: 'Avenir Book', sans-serif;
    font-size: 0.75rem;     /* taille spécifique mobile */
    font-weight: 200;       /* light Avenir-Book */
    line-height: 1.45;      /* interlignage réduit */
    text-align: left;
  }
  .overlay-bio .bio-title {
    font-family: 'NB Architekt', sans-serif;
    font-size: 0.9rem;      /* ajustable mobile */
    font-weight: 200;
    line-height: 1.05;
    margin-bottom: 20px;
  }
}
/* === VIDEO LIGHTBOX === */
.video-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  overflow: hidden;
}

.video-lightbox iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  max-width: 100%;
  max-height: 100%;
  border: none;
  z-index: 0;
}

/* Fullscreen video lightbox close button – same as director overlay */
.video-lightbox .overlay-close {
  position: absolute;
  top: 40px;
  right: 60px;
  font-family: 'NB Architekt', sans-serif;
  font-weight: 300;
  font-size: var(--font-size-large);
  line-height: 1;
  background: none;
  border: none;
  color: #ffffff;
  cursor: pointer;
  z-index: 10001;
}

/* === VIDEO LIGHTBOX SOUND TOGGLE BUTTON === */
.video-lightbox .overlay-sound-toggle {
  position: absolute;
  /* match lightbox-caption bottom */
  bottom: calc((100vh - (100vw * 9 / 16)) / 2 + 20px);  /* match lightbox-caption bottom */
  right: 20px;
  font-family: 'Avenir Book', sans-serif;
  font-size: clamp(0.6rem, 0.8vw + 0.3rem, 0.8rem);
  color: var(--color-accent);
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10002;
}
.video-lightbox .overlay-sound-toggle:hover {
  opacity: 0.8;
}

/* === VIDEO LIGHTBOX CAPTION (title + credits) === */
.video-lightbox .lightbox-caption {
  position: absolute !important;
  bottom: calc((100vh - (100vw * 9 / 16)) / 2 + 20px) !important;
  left: 20px !important;
  z-index: 2 !important;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2em;
  max-width: 90vw;
  text-align: left;
  transform: scale(0.5);
  transform-origin: bottom left;
}

.video-lightbox .lightbox-caption .title,
.video-lightbox .lightbox-caption .credit {
  font-family: 'NB Architekt', sans-serif;
  font-size: clamp(1.2rem, 2vw + 0.4rem, 2.4rem);
  font-weight: 300;
  line-height: 1.05;
  margin: 0;
}
.video-lightbox .lightbox-caption .title {
  color: var(--color-accent);
}
.video-lightbox .lightbox-caption .credit {
  color: #ffffff;
  margin-left: 3em;
}

/* Force le bouton de fermeture à être cliquable dans tous les cas */
.director-overlay .overlay-close {
  position: absolute !important;
  top: calc(var(--overlay-header-top) - 15px) !important;  /* -15px pour remonter encore de 5px */
  right: calc(var(--overlay-header-horizontal) + 20px) !important;  /* +20px pour décaler à gauche de 5px supplémentaires */
  z-index: 9999 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
  color: #ffffff !important;
  font-family: 'NB Architekt', sans-serif !important;
  font-size: var(--font-size-large) !important;
  padding: 10px !important;
  line-height: 1 !important;
}

.director-overlay .overlay-close:hover {
  color: var(--color-accent) !important;
}