/* =========================================================
   SALTITUDE — home.css (page d'accueil)

   SOMMAIRE
     1. Base de la page
     2. Menu de navigation
     3. Écran 1 : intro animée ("Saltitude présente")
     4. Écran 1 bis : présentation du jeu (après l'animation)
     5. Écran 2 : texte du jeu + bande-annonce
     6. Écran 3 : réseaux sociaux + "Qui sont les princes ?"
     7. Pied de page (footer)
     8. Animations
     9. Responsive (adaptation aux tailles d'écran)
   ========================================================= */


/* =========================================================
   1. BASE DE LA PAGE
   ========================================================= */

/* Les tailles incluent les marges intérieures et bordures */
* {
  box-sizing: border-box;
}

/* Défilement "par écran" : la page s'arrête sur chaque section */
html {
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  overflow-x: clip;
  scrollbar-gutter: stable;
}

/* Police et image de fond du site */
body {
  font-family: "Cabinet Grotesk", sans-serif;
  overflow-x: clip;
  background: url("../images/background.jpg") center / cover fixed no-repeat;
}

/* root pour les variables globales */
:root {
    /*Variable de durée de l'animation, pour l'utiliser : var(--animDuration)*/
    --animDuration: 2.5s;
}


/* =========================================================
   2. MENU DE NAVIGATION
   ========================================================= */

/* Barre blanche fixée en haut de l'écran */
nav {
  position: fixed;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
  padding: 0 2rem;
  background-color: white;
  width: 100%;
  border-top: 2px solid #000;
  border-bottom: none;
}

/* Trait décoratif sous le menu */
nav .nav-trait {
  position: absolute;
  left: -2rem;
  top: 100%;
  width: calc(100% + 4rem);
  height: 5rem;
  z-index: 10;
  object-fit: cover;
  object-position: center 45%;
  pointer-events: none;
  transform: translateY(-10%) rotate(180deg);
}

/* Logo en haut à gauche */
nav .logo {
  position: relative;
  z-index: 3;
  height: 100%;
  width: auto;
  bottom: 0.25rem;
  left: -0.5rem;
}

/* --- Liens du menu --- */

#mobile-menu {
  position: relative;
  z-index: 3;
  margin-left: auto;
}

/* --- Boutons de langue FR / EN --- */

.lang-switch {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  margin-left: 2rem;
  padding-left: 1.5rem;
  border-left: 2px solid #290fff;
}

.lang-switch button {
  background: none;
  border: none;
  padding: 0 0.4rem;
  cursor: pointer;
  font-family: inherit;
  color: #290fff;
  font-weight: bold;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  opacity: 0.4;
}

.lang-switch button:hover {
  opacity: 0.7;
}

/* Langue actuellement choisie */
.lang-switch button.active {
  opacity: 1;
}

/* --- Liste des liens (Accueil, À propos, Contact) --- */

nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

nav ul li a {
  color: #290fff;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 0.5px;
  text-decoration: none;
}

nav ul li a:hover {
  opacity: 0.7;
}

/* --- Bouton burger (caché sur ordinateur, visible sur mobile) --- */

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 2rem;
  height: 2rem;
  padding: 0;
  margin-right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 4;
}

/* Les 3 traits du burger */
.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: #290fff;
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

/* Quand le menu est ouvert, les 3 traits forment une croix */
.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   3. ÉCRAN 1 : INTRO ANIMÉE ("Saltitude présente")
   ========================================================= */

main {
  background: url("../images/background.jpg") center / cover fixed no-repeat;
}

/* Le premier écran prend toute la hauteur de la fenêtre */
main > section:first-child {
  position: relative;
  height: 100svh;
  z-index: 2;
}

/* Réglages communs à l'intro et à l'écran du jeu
   (plein écran + arrêt du défilement sur la section) */
.home-page,
.game {
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 8rem 6.25rem 5rem;
}

/* Écran de départ : fond noir qui devient blanc après 3 secondes */
.home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  height: 100svh;
  gap: 2rem;
  animation: home-page-reveal 2s ease var(--animDuration) forwards;
}

/* Dégradé sombre par-dessus l'intro, qui disparaît après 3 secondes */
.home-page::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.45) 80%,
    transparent 100%
  );
  pointer-events: none;
  animation: home-gradient-hide 1s ease var(--animDuration) forwards;
}

/* Grand logo Saltitude */
.logo-home {
  position: relative;
  z-index: 2;
  height: 70rem;
  max-height: 90%;
  width: auto;
  filter: none;
}

/* Texte "PRÉSENTE" */
.home-page h3 {
  position: relative;
  top: -5rem;
  z-index: 2;
  color: #fff;
  font-size: 1rem;
  letter-spacing: 4px;
  text-transform: uppercase;
}

/* Le logo et "PRÉSENTE" disparaissent après 3 secondes */
.logo-home,
.home-page > h3 {
  animation: home-content-hide 1s ease var(--animDuration) forwards;
}


/* =========================================================
   4. ÉCRAN 1 BIS : PRÉSENTATION DU JEU (après l'animation)
   Ce bloc est posé par-dessus l'intro et apparaît en fondu
   ========================================================= */

.home-replacement {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  height: 100%;
  padding: 3rem;
  overflow: visible;
}

/* Calque par-dessus (utilisé sur mobile pour assombrir l'image) */
.home-replacement::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* Image de fond du jeu */
.home-replacement .background {
  position: absolute;
  inset: 0;
  top: 5rem;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: home-background-show 2s ease var(--animDuration) forwards;
}

/* Logo / titre du jeu, qui flotte doucement de haut en bas */
.home-replacement .title-logo {
  position: relative;
  z-index: 2;
  width: min(35vw, 40rem);
  height: auto;
  margin-bottom: 0.5rem;
  transform: translateY(-2.5rem);
  opacity: 0;
  filter: drop-shadow(0 0 16px rgba(255, 255, 255, 0.4));
  animation:
    home-content-show 2s ease var(--animDuration) forwards,
    title-logo-float 3.5s ease-in-out infinite var(--animDuration);
}

/* --- Logos des partenaires (en bas à gauche) --- */

.home-replacement .partner {
  position: absolute;
  left: 6rem;
  bottom: 3rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  opacity: 0;
  animation: home-content-show 2s ease var(--animDuration) forwards;
}


.home-replacement .partner-logo {
  display: flex;
  align-items: center;
  gap: 2rem;
  transform: translateY(4rem);
}

/* Taille de chaque logo partenaire */
.home-replacement .team17 {
  width: 10.5rem;
  height: 10.5rem;
  object-fit: contain;
}
.home-replacement .region {
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
}
.home-replacement .cnc {
  width: 9rem;
  height: 9rem;
  object-fit: contain;
}

/* --- Texte "WISHLIST" (en bas à droite) --- */

.home-replacement h3 {
  position: absolute;
  bottom: 1rem;
  right: 6rem;
  z-index: 3;
  opacity: 0;
  transform: translateY(-10rem);
  animation: home-content-show 2s ease var(--animDuration) forwards;
  color: #fff;
  font-size: 2rem;
  text-transform: uppercase;
  font-weight: 600;
}

/* --- Bouton Steam (sous "WISHLIST") --- */

.home-replacement .steam-link {
  position: absolute;
  bottom: 0;
  right: 7rem;
  z-index: 3;
  opacity: 0;
  transform: translateY(-3rem);
  animation: home-content-show 2s ease var(--animDuration) forwards;
}

.home-replacement .steam {
  display: block;
  width: 6.5rem;
  height: 6.5rem;
  object-fit: contain;
  border-radius: 50%;
}


/* =========================================================
   5. ÉCRAN 2 : TEXTE DU JEU + BANDE-ANNONCE
   ========================================================= */

.game {
  position: relative;
  z-index: 1;
  background: url("../images/background.jpg") center / cover fixed no-repeat;
  padding: 8rem 6.25rem 5rem;
  height: 80vh;
}

/* Titre "C'est quoi ... ?" */
.game h1 {
  display: flex;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 3rem;
  margin: 1rem;
}

/* Texte de présentation du jeu */
.game p {
  max-width: 70rem;
  margin: 2rem auto;
  color: white;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
}

/* Cadre de la vidéo (format 16/9) */
.trailer {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  margin-top: 0.5rem;
}

/* La vidéo remplit tout le cadre */
.trailer iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 0.75rem;
}


/* =========================================================
   6. ÉCRAN 3 : RÉSEAUX SOCIAUX + "QUI SONT LES PRINCES ?"
   ========================================================= */

.infos {
  min-height: calc(100svh - 15rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 8rem 6.25rem 5rem;
  font-weight: 900;
  gap: 2rem;
}

/* Titres de cet écran */
.infos h1 {
  display: flex;
  justify-content: center;
  font-size: 2.5rem;
  letter-spacing: 1px;
  color: white;
}

/* Textes de cet écran */
.infos p {
  max-width: 85%;
  margin: auto;
  padding-top: 3rem;
  color: white;
  text-align: center;
  font-size: 1.3rem;
  line-height: 1.6;
}

/* --- Grandes icônes des réseaux sociaux --- */

.follow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin: 3rem;
  flex-wrap: wrap;
}

/* Rond de fond derrière chaque icône */
.follow a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  gap: 2rem;
  line-height: 0;
  border-radius: 50%;
  /*background: linear-gradient(#fca0fa, #290FFF);*/    /*Pour mettre un gradient si on préfére !*/
  background: url("../images/fond-pictos.png") center / contain no-repeat;
}

/* L'icône elle-même */
.follow a img {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
}

/* --- Texte "Qui sont les princes ?" --- */

.princes p {
  max-width: 70rem;
  font-size: 22px;
  letter-spacing: 1px;
}


/* =========================================================
   7. PIED DE PAGE (FOOTER)
   Grille en 3 colonnes : adresse | copyright | icônes
   ========================================================= */

footer {
  position: relative;
  z-index: 1;
  background-color: #fff;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  min-height: 4rem;
  padding: 1rem;
  color: #000;
  font-weight: bold;

  .adress {
    padding: 0;
    text-align: left;
  }
  .mail {
    padding: 0;
    text-align: left;
  }
}

/* Colonne centrale : copyright */
.right {
  grid-column: 2;
  justify-self: center;
  align-self: center;
}

.right p {
  margin: 0;
  text-align: center;
}

.legal {
  display: flex;
  justify-content: center;
  color: #000;
}

/* Colonne gauche : adresse + mail */
footer > section:first-of-type {
  grid-column: 1;
}

/* Trait décoratif au-dessus du footer */
footer > .footer-trait,
footer > .trait {
  position: absolute;
  left: -2rem;
  top: 0;
  width: calc(100% + 4rem);
  height: 5rem;
  z-index: 2;
  object-fit: cover;
  object-position: center 45%;
  pointer-events: none;
  transform: translateY(-90%);
}

footer > section {
  position: relative;
  z-index: 3;
}

footer article {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

footer article p {
  margin: 0;
  line-height: 1.4;
}

/* Colonne droite : petites icônes des réseaux sociaux */
.pictos {
  display: flex;
  grid-column: 3;
  justify-self: end;
  align-items: center;
}

.pictos a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 5rem;
  line-height: 0;
  border-radius: 50%;
}

.pictos a img {
  display: block;
  width: 1.875rem;
  height: 1.875rem;
  object-fit: contain;
}


/* =========================================================
   8. ANIMATIONS
   Utilisées par l'intro et la présentation du jeu
   ========================================================= */

/* Fond de l'intro : noir → blanc */
@keyframes home-page-reveal {
  from {
    background-color: #000;
  }
  to {
    background-color: #fff;
  }
}

/* Disparition du dégradé de l'intro */
@keyframes home-gradient-hide {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Disparition du logo et de "PRÉSENTE" */
@keyframes home-content-hide {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Apparition en fondu des éléments du jeu */
@keyframes home-content-show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Apparition en fondu de l'image de fond du jeu */
@keyframes home-background-show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Logo du jeu qui monte et descend en boucle */
@keyframes title-logo-float {
  0%,
  100% {
    transform: translateY(-2.5rem) translateY(-8px);
  }
  50% {
    transform: translateY(-2.5rem) translateY(8px);
  }
}


/* =========================================================
   9. RESPONSIVE (adaptation aux tailles d'écran)
   ========================================================= */

/* ---------------------------------------------------------
   Ordinateur (écrans de 1040px et plus)
   --------------------------------------------------------- */
@media (min-width: 65rem) {
  /* Contenu centré verticalement dans les écrans 2 et 3 */
  .infos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0;
  }
  .game {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .game h1 {
    margin: 1rem;
  }
}

/* ---------------------------------------------------------
   Grands écrans (1920px et plus)
   --------------------------------------------------------- */
@media (min-width: 120rem) {
  .game {
    height: 100svh;
    min-height: 100svh;
    overflow: hidden;
  }
}

/* ---------------------------------------------------------
   Très grands écrans (2560px et plus) : tout en plus grand
   --------------------------------------------------------- */
@media (min-width: 160rem) {
  /* Menu */
  nav {
    height: 6rem;
  }

  nav .logo {
    height: 6rem;
  }

  /* Présentation du jeu */
.home-replacement .title-logo {
  width: min(50vw, 50rem);
}
.home-replacement .background {
  top: 6.5rem;
}

  /* Bande-annonce */
.trailer {
  width: 100%;
  max-width: 900px; 
}

  /* Grandes icônes réseaux */
  .follow {
    gap: 2rem;
  }
  .follow a {
    width: 10rem;
    height: 10rem;
  }
  .follow a img {
    width: 5rem;
    height: 4rem;
  }

  /* Traits décoratifs du menu et du footer */
  nav .nav-trait,
  footer > .footer-trait,
  footer > .trait {
    width: calc(100% + 5.333rem);
    height: 6.667rem;
  }

  /* Liens du menu et boutons de langue */
  nav ul {
    padding-right: 0.5rem;
    gap: 2rem;
  }
nav ul li a {
  font-size: 1rem;
}
.lang-switch button {
  font-size: 1rem;
}

  /* Titres */
.game h1 {
    font-size: 4rem;
}
.infos {
  gap: 2rem;
}
.infos h1 {
font-size: 4rem;
}

}

/* ---------------------------------------------------------
   Tablette (1024px et moins)
   --------------------------------------------------------- */
@media (max-width: 64rem) {
  /* Menu un peu plus compact */
  nav {
    padding-inline: 1.5rem;
  }

  nav ul {
    gap: 1.1rem;
  }

  .lang-switch {
    margin-left: 1.1rem;
    padding-left: 1.1rem;
  }

  /* Logo du jeu et logos partenaires plus petits */
  .home-replacement .title-logo {
    width: min(40vw, 28rem);
  }

  .home-replacement .team17,
  .home-replacement .region,
  .home-replacement .cnc {
    width: 6rem;
    height: 6rem;
  }

  /* Footer */
  footer {
    padding: 1.5rem 2rem;
  }
}

/* ---------------------------------------------------------
   Mobile (768px et moins)
   --------------------------------------------------------- */
@media (max-width: 48rem) {
  body {
    overflow-x: clip;
  }

  /* --- Menu : passage au burger --- */

  nav {
    padding-inline: 1rem;
  }

  nav ul {
    gap: 0.6rem;
  }

  nav ul li a {
    font-size: 0.65rem;
  }

  /* Le burger devient visible */
  .burger {
    display: flex;
    order: 2;
  }

  .lang-switch {
    margin-left: auto;
    margin-right: 1rem;
    padding-left: 0;
    border-left: none;
  }

  /* Menu déroulant, fermé par défaut */
  #mobile-menu {
    margin-left: 0;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background-color: white;
    border-bottom: 2px solid #000;
    transition: max-height 0.3s ease;
    z-index: 9;
  }

  /* Menu déroulant ouvert (après clic sur le burger) */
  #mobile-menu.open {
    max-height: 20rem;
  }

  /* Liens empilés verticalement */
  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem 0;
  }

  nav ul li a {
    font-size: 0.9rem;
  }

  nav .nav-trait {
    left: -1rem;
    width: calc(100% + 2rem);
    height: 3rem;
    transform: translateY(-60%);
  }

  /* --- Écran 1 : intro --- */

  .logo-home {
    height: auto;
    width: min(70vw, 22rem);
  }

  /* --- Écran 1 bis : tout est empilé et centré --- */

  .home-replacement {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5.5rem 1.25rem 2rem;
    text-align: center;
    gap: 1rem;
    overflow-y: auto;
  }

  .home-replacement .background {
    position: absolute;
    inset: 0;
    z-index: 0;
  }

  /* Dégradé sombre pour rendre le texte lisible sur l'image */
  .home-replacement::after {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.55) 45%,
      rgba(0, 0, 0, 0.9) 100%
    );
  }

  /* Ordre d'affichage : logo du jeu (1), WISHLIST (2), Steam (3), partenaires (4) */
  .home-replacement .title-logo {
    position: relative;
    z-index: 2;
    width: min(70vw, 22rem);
    margin: 1rem 0 0;
    transform: none;
    animation: home-content-show 2s ease 3s forwards;
    order: 1;
  }

  .home-replacement h3 {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none;
    font-size: 1.1rem;
    margin-top: 0.5rem;
    order: 2;
  }

  .home-replacement .partner {
    position: relative;
    left: auto;
    bottom: auto;
    align-items: center;
    margin-top: 1rem;
    order: 4;
    transform: translateY(1.5rem);
  }

  .home-replacement .partner h3 {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    font-size: 1.1rem;
  }

  .home-replacement .partner-logo {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    transform: none;
  }

  .home-replacement .team17,
  .home-replacement .region,
  .home-replacement .cnc {
    width: 4.5rem;
    height: 4.5rem;
  }

  .home-replacement .steam-link {
    position: relative;
    right: auto;
    bottom: auto;
    transform: none;
    margin-top: 0.5rem;
    order: 3;
  }

  /* --- Écran 2 : jeu + bande-annonce --- */

  .game {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: auto;
    min-height: 100svh;
    padding: 6rem 1.25rem 3rem;
  }

  .game p {
    margin: 1.5rem auto;
  }

  /* Les sauts de ligne du texte sont ignorés sur mobile */
  .game p br {
    display: none;
  }

  .trailer {
    margin-top: 2rem;
  }

  /* --- Écran 3 : réseaux + princes --- */

  .infos {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100svh - 15rem);
    padding: 1rem 1.25rem 1rem;
    scroll-snap-stop: normal;
  }

  .infos p {
    max-width: 100%;
    padding-top: 1rem;
  }

  .princes p {
    font-size: 1rem;
  }

  .follow {
    margin: 1rem auto;
  }

  /* Icônes réseaux (grandes et petites) plus petites */
  .follow a,
  .pictos a {
    width: 3.5rem;
    height: 3.5rem;
  }

  .follow a img,
  .pictos a img {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* --- Footer sur une seule colonne, centré --- */

  footer {
    scroll-snap-align: start;
    scroll-snap-stop: always;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }

  footer > section:first-of-type,
  .right,
  .pictos {
    grid-column: 1;
  }

  footer .adress,
  footer .mail {
    text-align: center;
  }

  .pictos {
    justify-self: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  footer article {
    flex-direction: row;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
  }

  footer > .footer-trait,
  footer > .trait {
    left: -1rem;
    width: calc(100% + 2rem);
    height: 3rem;
    transform: translateY(-60%);
  }
}

/* ---------------------------------------------------------
   Petit mobile (480px et moins) : tailles réduites
   --------------------------------------------------------- */
@media (max-width: 30rem) {
  .home-replacement .title-logo {
    width: min(80vw, 18rem);
  }

  .home-replacement .team17,
  .home-replacement .region,
  .home-replacement .cnc {
    width: 3.75rem;
    height: 3.75rem;
  }

  .game h1 {
    font-size: 1.4rem;
  }

  .game p {
    font-size: 0.95rem;
  }

  .infos h1 {
    font-size: 1.15rem;
  }

  .princes p {
    font-size: 0.9rem;
  }
}