* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --topbar-height: 72px;
}

/* Corps */
html,
body {
  height: 100%;
  overflow: hidden;
  font-family: "Montserrat", Arial, sans-serif;
}

/* --- TOP BAR FIXE --- */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--topbar-height);
  padding: 18px 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  font-size: 12px;
  z-index: 1000;
  background: transparent;
}

.title a {
  color: white;
  text-decoration: none;
}

.top-left .title {
  color: white;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 4px;
}
.top-left .subtitles {
  color: white;
  font-weight: 400;
  font-size: 16px;
}

.menu {
  display: flex;
  gap: 12px;
  align-items: center;
}

.menu a {
  padding: 6px 16px;
  border: 2px solid white;
  border-radius: 12px;
  background: white;
  color: black;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.menu a:hover,
.menu a:focus {
  background-color: black;
  color: white;
  border: 2px solid black;
}

/* --- BURGER --- */
.burger {
  display: none;
  width: 32px;
  height: 24px;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  z-index: 1100;
}
.burger div {
  height: 3.5px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.burger.active div:nth-child(1) {
  transform: translateY(10.5px) rotate(45deg);
}
.burger.active div:nth-child(2) {
  opacity: 0;
}
.burger.active div:nth-child(3) {
  transform: translateY(-10.5px) rotate(-45deg);
}

.menu-mobile {
  display: none;
  position: fixed;
  top: calc(var(--topbar-height) + 8px);
  right: 20px;
  background: transparent;
  padding: 10px 20px;
  flex-direction: column;
  gap: 12px;
  z-index: 1050;
}
.menu-mobile a {
  padding: 8px 20px;
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.menu-mobile a:hover {
  background-color: rgba(255 255 255 / 0.8);
  color: #3f00ff;
}

/* --- CONTAINER ET PAGES --- */
.container {
  height: 100vh;
  width: 100vw;
  position: relative;
}

.pages {
  height: 100vh;
  width: 100vw;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pages::-webkit-scrollbar {
  display: none;
}

.page {
  position: relative;
  height: 100vh;
  width: 100vw;
  scroll-snap-align: start;
  color: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0 40px;
}

/* Backgrounds */
.page1 {
  background-image: url("baleine.jpg");
}
.page2 {
  background-image: url("clock.jpg");
}
.page3 {
  background-image: url("femmes.jpg");
}
.page4 {
  background-image: url("pc.jpg");
}
.page5 {
  background-image: url("mormant plage.png");
}

.page6 {
  background-image: url("domaine/img3.jpg");
}

#video-fond {
  overflow: hidden;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 0;
  filter: blur(3px);
}

.transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(24, 24, 24);
  z-index: 10;
  opacity: 1;
  transform: translateY(100%);
  transition: transform 0.6s ease-in-out;
}

.transition.active {
  transform: translateY(0);
}

#video-fond > video {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}
/* 1. Pas de support d'object-fit */
@media (min-aspect-ratio: 16/9) {
  #video-fond > video {
    height: 300%;
    top: -100%;
  }
}
@media (max-aspect-ratio: 16/9) {
  #video-fond > video {
    width: 300%;
    left: -100%;
  }
}
/* 2. En cas de support d'object-fit, écrase les règles en (1) */
@supports (object-fit: cover) {
  #video-fond > video {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    object-fit: cover;
  }
}

/* --- CONTENU DE CHAQUE PAGE --- */

/* Titre centré un peu plus haut */
.center-left {
  position: absolute;
  top: 43%; /* un peu plus haut que le centre */
  left: 40px;
  transform: translateY(-50%);
  z-index: 2;
  max-width: calc(100% - 120px);
}

.main-title {
  font-size: 60px;
  font-weight: bold;
  line-height: 1.05;
}

.subtitle {
  margin-top: 20px;
}

.center-primary {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 2;
  width: 100%;
  z-index: 1;
  text-shadow: rgb(0, 29, 2) 1px 0 10px;
}

.main-primary {
  font-size: 80px;
  font-weight: bold;
  line-height: 1.05;
  color: white;
}

.subtitle-primary {
  margin-top: 20px;
  font-family: "Playfair Display", serif;
  font-size: 24px;
  color: white;
  font-size: 30px;
}

.subtitle-primary a {
  color: white;
}

.subtitle-primary a:hover {
  color: rgb(65, 198, 255);
}

/*#animation {
background: #2A7B9B;
background: -webkit-linear-gradient(90deg, rgb(35, 145, 189) 0%, rgb(64, 180, 112) 60%, rgb(185, 173, 61) 100%);
background: -moz-linear-gradient(90deg,  rgb(35, 145, 189) 0%, rgb(64, 180, 112) 60%, rgb(185, 173, 61) 100%);
background: linear-gradient(90deg, rgb(35, 145, 189) 0%, rgb(64, 180, 112) 60%, rgb(185, 173, 61) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#2A7B9B", endColorstr="#EDDD53", GradientType=1);
}*/

.subtitle a {
  color: white;
  font-weight: 600;
  font-size: 18px;
  text-decoration: none;
}
.subtitle a:hover {
  text-decoration: underline;
}

/* Bas de page : rôles à gauche, number à droite */
.bottom-right {
  position: absolute;
  bottom: 20px;
  left: 40px;
  width: calc(100% - 80px); /* pour équilibrer le spacing */
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
}

.bottom-right .roles {
  text-align: left;
}

.bottom-right .roles-title {
  font-weight: 700;
  margin-bottom: 8px;
  position: absolute;
  left: 0;
  top: -30px;
}

.bottom-right .roles-list {
  font-size: 14px;
  line-height: 1.2;
}

/* Le grand numéro en bas à droite */
.bottom-right .number {
  font-weight: 800;
  font-size: 72px;
  line-height: 1;
  margin: 0;
  padding: 0;
}

.roles-list a {
  color: white;
  text-decoration: none;
}

.roles-list a:hover {
  color: rgb(0, 0, 0);
  text-decoration: none;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  :root {
    --topbar-height: 64px;
  }
  .top-bar {
    padding: 14px 30px;
    height: var(--topbar-height);
  }
  .center-left {
    left: 30px;
    top: 42%;
  }
  .bottom-right {
    left: 30px;
    width: calc(100% - 60px);
  }

  .center-primary {
    z-index: 1;
  }
}

@media (max-width: 768px) {
  .menu {
    display: none;
  }
  .burger {
    display: flex;
  }
  .top-bar {
    padding: 12px 20px;
  }
  .page {
    padding: 0 20px;
  }

  .center-left {
    left: 20px;
    right: 20px;
    top: 42%;
  }
  .main-title {
    font-size: 34px;
  }

  .bottom-right {
    left: 20px;
    width: calc(100% - 40px);
  }
  .bottom-right .number {
    font-size: 44px;
  }

  .page::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6); /* noir semi-transparent */
    z-index: 1;
  }

  /* le contenu reste au-dessus du filtre */
  .page > * {
    z-index: 2;
  }

  .center-primary {
    z-index: 1;
  }
}

@media (max-width: 420px) {
  .main-title {
    font-size: 30px;
  }
  .bottom-right .number {
    font-size: 38px;
  }
  .center-primary {
    z-index: 1;
  }
}

/* --- ANIMATIONS --- */
.page .top-left,
.page .center-left,
.page .bottom-right {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.page.animated .top-left,
.page.animated .center-left,
.page.animated .bottom-right {
  opacity: 1;
  transform: translateY(0) scale(1);
}
