html {
    width: 100vw;
    height: 100vh;
}

html, body {
    background-color: black;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body {
    max-height: 100%;
    overflow-x: hidden;
    /* animation: overflowYDelay 3s; */

    /* background: green;
    animation: overflowYDelay 3s;
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: auto; */
}

/* a */

/* URLs */

a {
    text-decoration: none;
}

a {
    height: 100%;
    background-color: transparent;
    color: var(--dark-accent-tertiary);
    outline: 2px solid transparent;
    border-radius: 8px;
    /* text-decoration: underline; */
    
    cursor: pointer !important;
    transition: color ease-in-out .25s, outline ease-in-out .25s;
}

a:-webkit-any-link {
    text-decoration: none;
}

a:focus-visible {
    color: #EC8609;
    outline: 2px solid var(--dark-white) !important;
    /* text-decoration: underline; */
    
    transition: color ease-in-out .25s, outline ease-in-out .25s;
}

a:hover, a:hover #language-active-text {
    color: #EC8609 !important;
    cursor: pointer !important;
    transition: color ease-in-out .25s, outline ease-in-out .25s;
}

/* Barre de navigation */

* {
    scrollbar-width: thin;
    scrollbar-color: black white;
}

*::-webkit-scrollbar {
    max-height: 8px;
    max-width: 8px;
    background-color: black;
    
    cursor: none;
}

*::-webkit-scrollbar-track {
    max-height: 8px;
    border-radius: 8px;
}

*::-webkit-scrollbar-thumb {
    max-height: 8px;
    border-radius: 8px;
    background-clip: border-box;
    background-color: white;
}

*::-webkit-scrollbar-thumb:hover {
    background-color: white;
}

/* Les liens */

#a-p {
    position: fixed;
    z-index: 1;
    display: flex;
    width: 100vw;
    height: 100vh;
    /* background-color: black; */
    background: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ap-vidéo {
    position: relative;      /* IMPORTANT */
    width: auto;
    min-width: 100%;
    height: 75vh;
    /* aspect-ratio: 4 /; */
    overflow: hidden;
    transition: background 2s ease;
    animation: fadeIn ease-in-out 2s;
}

#ap-vidéo video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    transition: filter 1s ease-out;
    animation: fadeIn ease-in-out 2s;
}

main {
    width: 100%;
    height: 100%;
    position: absolute;
    background-color: transparent;
    z-index: 9;
    display: flex;
    justify-content: center;
    align-items: center;
}

#text {
    /* user-select: none; */
}

/* #text h1 {
    -webkit-text-stroke: 2px rgba(0, 0, 0, 0.338);
    filter: drop-shadow(0px 0px 128px white) drop-shadow(0px 0px 24px #00000055);
    filter: drop-shadow(0px 0px 24px #FFFFFF48) drop-shadow(0px 0px 32px #00000022);
} */

/* #text h3 {
    filter: drop-shadow(0px 0px 12px #FFFFFF20) drop-shadow(0px 0px 16px #00000022);
    -webkit-text-stroke: 1.5px rgba(0, 0, 0, 0.164);
} */

h1 {
    margin: 48px 32px 16px 32px;
    color: white;
    mix-blend-mode: difference;
    font-family: 'Poppins';
    /* font-size: 48px; */
    font-weight: 700;
    line-height: .5;
    font-size: 92px;
    white-space: nowrap;
    text-align: center;
    text-shadow: 0px 0px 24px #00000032;
}

.h1-fr {
    line-height: 1.2;
    font-size: 64px;
}

.liste h1 {
    line-height: .6;
}

h3 {
    margin: 24px 32px 16px 32px;
    color: white;
    mix-blend-mode: difference;
    font-family: 'Poor Richard';
    font-size: 32px;
    font-weight: 100;
    line-height: .5;
    white-space: nowrap;
    text-align: center;
    text-shadow: 0px 0px 12px #00000080;
}

p {
    margin: 16px 32px;
    color: white;
    mix-blend-mode: difference;
    font-family: 'Poppins';
    /* font-size: 48px; */
    font-weight: 400;
    line-height: 1;
    font-size: 20px;
    white-space: wrap;
    text-align: center;
    text-shadow: 0px 0px 24px #00000032;
}

#et {
    font-size: 16px;
}

#magique {
    font-family: 'Rachel';
}

/* h1, h3 {
    -webkit-font-smoothing: antialiased;
    -webkit-text-stroke: 0.3px rgba(0,0,0,0.3);
} */

.min {
    font-size: 24px;
    padding-left: 8px;
    padding-right: 8px;
}

#text {
    position: relative;
    display: inline-block;
}

.bg-noise {
    top: 0;
    height: 100vh;
    width: 100vw;
    background-image: url("../ASSETS/tv-noise-01.gif");
    position: fixed;
    background-size: 200px 200px;
    background-repeat: repeat;
    background-attachment: fixed;
    object-fit: scale-down;
    -o-object-fit: cover;
    resize: none;
    mix-blend-mode: overlay;
    opacity: 0.1;
    
    pointer-events: none;
    z-index: 10 !important;
}

#primaire {
    max-height: 75vh;
    width: inherit;
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    /* background-color: yellow; */
}

.page-contacter {
    /* padding-top: 2024px; */
    padding-top: 32px;
    /* padding-bottom: 604px; */
    padding-bottom: 64px;
}

#primaire #text {
    width: 100%;
}

#primaire #text h1 {
    white-space: wrap;
}

#primaire.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

#primaire.fade-in {
    opacity: 1;
    transition: opacity 0.3s ease;
}

#contact-form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: left;
    width: 100%;
    margin-bottom: 64px;
    pointer-events: all;
}

#contact-form form {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: left;
    width: 80%;
}

#contact-form p {
    margin-bottom: 8px;
    width: 100%;
    text-align: left;
}

#contact-form input, #contact-form textarea {
    width: 100%;
    background-color: white;
    color: black;
    font-size: 24px;
    font-family: 'Poppins';
    font-weight: 400;
    border: none;
    outline: none;
}

#emballage-de-boutton-envoyer {
    width: 100%;
}

#contact-form textarea {
    resize: vertical;
}

#emballage-de-boutton-envoyer {
    margin-top: 8px;
    display: flex;
    justify-content: flex-end;
}

#contact-form button {
    min-width: 128px;
    background-color: white;
    color: black;
    font-size: 24px;
    font-family: 'Poppins';
    font-weight: 700;
    border: none;
    outline: none;
    cursor: pointer !important;
    transition: background-color ease-in-out .25s, outline ease-in-out .25s;
}

#contact-form button:hover {
    background-color: #EC8609 !important;
    cursor: pointer !important;
    transition: background-color ease-in-out .25s, outline ease-in-out .25s;
}

.bg-noir {
    position: fixed;
    background-color: black;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    opacity: 100%;
    transition: opacity 4s linear;
    display: flex;
    justify-content: center;
    align-items: center;
}

#réel-vignette img, #résumé-vignette img {
    height: 30vh;
    cursor: pointer !important;
    filter: drop-shadow(0px 0px 16px white);
    transform: scale(1);
    transition: transform .75s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#réel-vignette img:hover, #résumé-vignette img:hover {
    transform: scale(1.1);
    transition: transform .75s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#href-résumé {
    position: inherit;
    width: fit-content;
}

.href-résumé p i {
    position: relative;
    z-index: 8;
    cursor: pointer !important;
}

.cursor-pointer {
    cursor: pointer !important;
    transition: color ease-in-out .25s, outline ease-in-out .25s;
}

.cursor-pointer:hover {
    color: #f79926 !important;
    cursor: pointer !important;
    transition: color ease-in-out .25s, outline ease-in-out .25s;
}

.lien {
    cursor: pointer !important;
}

#conteneur-réel-et-résumé {
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: none;
    gap: 64px;
}

#conteneur-réel-et-résumé-montage {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 64px;
    padding-bottom: 64px;
}

#conteneur-réel-et-résumé-montage #réel-vignette img, #conteneur-réel-et-résumé-montage #résumé-vignette img {
    height: 16vw;
    min-height: 164px;
    margin: 8px 0px;
    cursor: pointer !important;
    filter: drop-shadow(0px 0px 16px white);
    transform: scale(1);
    transition: transform .75s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#conteneur-réel-et-résumé-montage #réel-vignette img:hover, #conteneur-réel-et-résumé-montage #résumé-vignette img:hover {
    transform: scale(1.1);
    transition: transform .75s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#conteneur-réel, #conteneur-résumé {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: fadeIn ease-in-out 1s;
}

.conteneur-réel-iframe {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100vw;
  height: 100vh;
  transform: translate(-50%, -50%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* make sure it sits on top of everything */
  background: transparent; /* no black overlay */
}

.conteneur-réel-iframe iframe {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border: 0;
}

/* =========================
   REEL BACKGROUND FADE-IN
========================= */

#primaire-avec-réel {
    animation: reelBgFadeIn 0.75s ease 1s forwards;
}

.conteneur-réel-iframe {
  background: transparent; /* default + final state */
  animation: reelBgFadeIn 0.75s ease 1s forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0%;
  }
  33% {
    opacity: 0%;
  }
  100% {
    opacity: 100%;
  }
}

@keyframes reelBgFadeIn {
  0% {
    background: transparent;
  }
  100% {
    background: black;
  }
}

/* .conteneur-réel-iframe iframe {
  height: 100%;
  aspect-ratio: 16 / 9;
  width: auto;
  max-width: 100%;
  border: 0;
} */

.ap-video--disabled {
    background: black !important;
    transition: background 2s ease;
}

.ap-video--disabled video {
    display: none !important;
}

#primaire.fade-out {
    opacity: 0;
    transform: scale(0.995);
    transition: opacity 0.3s ease, transform 0.45s ease;
}

#primaire.fade-in {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.45s ease;
}

#ap-vidéo video {
  transition: filter 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

#ap-vidéo.ap-video--disabled video {
  display: none !important;
}

.fade-out-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.reel-back-arrow {
  position: fixed;
  top: 64px;
  left: 24px;
  z-index: 100000;

  font-family: 'Poppins';
  font-size: 28px;
  font-weight: 600;

  color: white;
  background-color: #00000032;
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;

  opacity: 0;
  transition: color .25s ease, opacity .3s ease;
  user-select: none;
  cursor: pointer !important;
}

.reel-back-arrow.visible {
  opacity: 1;
}

.reel-back-arrow:hover {
  color: #EC8609;
}

#text > h1#portefeuille-texte {
    margin-bottom: 48px;
}

#text > h1#portefeuille-texte-dmt {
    margin-bottom: 48px;
    font-size: 64px;
}

#text.liste > h1 {
  display: inline-block;
  width: auto;
}


#text.liste {
  display: flex;
  flex-direction: column;
  align-items: center; /* centers shrink-wrapped h1s */
}


/* =========================
   MOBILE HORIZONTAL LOCK — STABLE VERSION
========================= */

#mobile-viewport {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

/* Mobile: break line at the slash */
@media screen and (max-width: 1240px) {
    #text.liste > h1 {
        line-height: .9;
        font-size: 64px;
        margin-top: 0px;
    }

    .reel-back-arrow {
        transform: rotate(-270deg) !important;
        transform-origin: center !important;
        top: 0 !important;
        left: auto !important;
        bottom: auto !important;
        right: 32px !important;
        z-index: 100001 !important;
    }
}

/* =========================
   MOBILE HORIZONTAL LOCK — ROTATE CLOCKWISE
========================= */
@media screen and (max-width: 1024px) {
  #mobile-viewport {
    width: 100vh;
    height: 100vw;

    transform: rotate(90deg) translateY(-100%);
    transform-origin: top left;

    overflow: hidden;
  }

 #conteneur-réel-et-résumé-montage #conteneur-réel > p, #conteneur-réel-et-résumé-montage #conteneur-résumé p {
    font-size: 24px;
    margin: 0;
    padding: 0;
  }
  
#conteneur-réel-et-résumé-montage {
    gap: 16px;
}

#conteneur-réel-et-résumé-montage #réel-vignette img, #conteneur-réel-et-résumé-montage #résumé-vignette img {
    height: 18vw;
    margin: 8px 0px;
    min-height: 128px;
}

  /* Force all full-page fixed layers to fit rotated viewport */
  #a-p,
  main,
  .conteneur-réel-iframe,
  .bg-noise,
  .bg-noir {
    position: absolute !important;
    inset: 0;
    width: 100%;
    height: 100%;
  }

  /* Background video container */
  #ap-vidéo {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
  }

  #ap-vidéo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Reel iframe */
  .conteneur-réel-iframe iframe {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
  }

  #contact-form p {
    font-size: 16px;
  }

  /* Prevent text clipping & allow scrolling if necessary */
  #primaire {
    max-height: none;
    height: auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    box-sizing: border-box;
  }

    #text.liste > h1 {
        line-height: 1;
        font-size: 64px;
        margin-top: 0px;
    }

  /* Adjust reel thumbnail scaling */
  #réel-vignette img,
  #résumé-vignette img {
    height: 20vh;
  }
}

@media screen and (max-width: 1024px) {
  .conteneur-réel-iframe {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vh;   /* width of rotated viewport */
    height: 100vw;  /* height of rotated viewport */
    /* transform: rotate(90deg) translateY(-50%);
    transform-origin: top left; */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    background: transparent;
  }

  .conteneur-réel-iframe iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;     /* take full width of container */
    height: 100%;    /* take full height of container */
    transform: rotate(-90deg); /* counter-rotate */
    transform-origin: center center;
    border: 0;
        width: 100vw;
    height: 100vh;

    min-width: 100%;
    min-height: 100%;

    transform: scale(1.05); /* slight overscan to kill micro-bars */
  }
}

@media screen and (max-width: 1024px) {
  /* Ensure #primaire fills rotated viewport */
  /* #primaire {
    position: relative;
    width: 100vh;
    height: 100vw;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    box-sizing: border-box;
  } */

  /* Ensure text scales and wraps inside rotated viewport */
  #primaire #text {
    width: 100%;
  }

  #text > h1 {
    margin-bottom: 4px;
    line-height: .8;
  }

  #text > p {
    font-size: 28px;
  }

  #text > h3 {
    margin-top: 4px;
  }
  
  h1 {
    font-size: 10vh;
  }

  #text > h1#courriel {
    font-size: 64px;
  }

  h3, p {
    max-width: 100%;   /* allow wrapping */
    font-size: 4vh;
    line-height: 1.2;
    word-break: break-word;
    text-align: center;
  }

  /* Video container */
  #ap-vidéo {
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
  }

  #ap-vidéo video {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
}

/* Mobile: break line at the slash */
@media screen and (max-width: 1024px) {
  .bg-noir p {
    visibility: hidden;
    position: relative;
  }

  .bg-noir p::before {
    content: "Veuillez cliquer pour entrer. / \APlease press anywhere to enter.";
    white-space: pre;
    visibility: visible;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
  }
}

#primaire {
    width: 100%;
    height: 100%;
    padding: 0;
    display: flex;
}

#primaire .conteneur-réel-iframe {
    width: 100vw;
    height: 100vh;
}

@media screen and (max-width: 932px) {

  /* Stack content naturally */
  #primaire {
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    max-height: none !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 0 !important;
  }

  /* Let text breathe but not steal width */
  #primaire #text {
    width: 100% !important;
    max-width: none !important;
    margin: 0 auto 12px auto !important;
    padding: 0 16px !important;
    box-sizing: border-box;
  }

  /* FULL-WIDTH, MAX-SIZE REEL (NO CROP) */
  .conteneur-réel-iframe,
  #primaire .conteneur-réel-iframe {
    position: relative !important;
    top: auto !important;
    left: auto !important;

    width: 174vw !important;     /* ← true full width */

    aspect-ratio: 16 / 9;        /* ← preserves video ratio */
    height: auto !important;

    margin: 0 auto 0 auto !important;

    display: block !important;

    transform: none !important;
    background: transparent !important;
    z-index: auto !important;
    overflow: hidden !important; /* safe; no crop because aspect-ratio */
  }

  .conteneur-réel-iframe iframe {
    position: absolute !important;
    inset: 0 !important;

    width: 100% !important;
    height: 100% !important;

    min-width: 0 !important;
    min-height: 0 !important;

    transform: none !important;
    transform-origin: center center !important;

    border-radius: 0 !important;
  }

  /* Slightly scale text so reel feels dominant */
  #primaire #text h1 {
    font-size: 52px;
    line-height: 1.05;
    margin: 24px 0 8px 0;
  }

  #primaire #text h3 {
    font-size: 22px !important;
    margin: 8px 0 8px 0 !important;
  }

  #primaire #text p {
    font-size: 20px !important;
    line-height: 1.25 !important;
    margin: 8px 0 !important;
  }

  .conteneur-réel-iframe {
    height: 100vw !important;
    width: 100vh !important;
  }
}

@media screen and (max-width: 512px) {
    #contact-form {
        margin-bottom: 32px;
    }

    .page-contacter {
        /* padding-top: 2024px; */
        padding-top: 16px;
        /* padding-bottom: 604px; */
        padding-bottom: 32px;
    }

    #text > p {
        font-size: 20px;
        line-height: 1;
        margin: 8px 32px;
    }
    
    #text.liste > h1 {
        font-size: 48px !important;
        margin: 8px 0 8px 0 !important;
        line-height: 1;
    }

    #contact-form textarea {
        height: 64px;
    }
    
    #primaire #text #contact-form p {
        font-size: 12px !important;
        margin: 2px 0px !important;
    }
}

@media screen and (max-width: 412px) {   
    #text.liste > h1 {
        font-size: 32px !important;
        margin: 8px 0 8px 0 !important;
        line-height: 1;
    }
    
    #text > h1#portefeuille-texte {
        margin-bottom: 32px;
        font-size: 48px;
    }

    #text > h1#portefeuille-texte-dmt {
        margin-bottom: 32px;
        font-size: 48px;
    }

    #primaire #text h1#courriel {
        font-size: 40px !important;
    }
    
    #contact-form textarea {
        height: 32px;
    }
}
