/* Global */
@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@100..900&display=swap');

body {
    overflow-x: hidden; /* Empêche le scroll horizontal */
    overflow-y: hidden; /* Empêche le scroll vertical */
    height: 100vh;
    width: 100vw;
    background-color: #212121;
    background-image: url('https://oosh.fr/assets/images/background.png');
    background-size: 200% auto; /* Double la largeur pour un scroll fluide */
    background-repeat: repeat-x;
    font-family: 'Exo 2', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 40px;
    box-sizing: border-box;
    color: #ffffff;
    animation: scrollBackground 20s linear infinite;
    -webkit-animation: scrollBackground 20s linear infinite; /* Compatibilité iOS/Safari */
}

@keyframes scrollBackground {
    from {
        background-position: -200 0;
    }
    to {
        background-position: 200% 0; /* S'assure que l'image se boucle proprement */
    }
}

/* Alternative en utilisant transform pour plus de compatibilité */
.scrolling-bg {
    position: absolute;
    width: 200vw;
    height: 100vh;
    background-image: url('https://oosh.fr/assets/images/background.png');
    background-size: cover;
    animation: moveBg 20s linear infinite;
    -webkit-animation: moveBg 20s linear infinite;
}

@keyframes moveBg {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-50%);
    }
}

/* Container */
.login-container {
    font-family: 'Exo 2', sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    flex-grow: 1; /* Pour occuper tout l'espace */
    justify-content: center; /* Centre le formulaire */
}

/* Logo */
.logo {
    width: 80%;
    margin-top: -40px;
    padding: 40px;
    padding-bottom: 80px;
}

/* Form */
form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input, .btn-primary, .btn-secondary {
    font-family: 'Exo 2', sans-serif;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #2d2d2d;
    color: white;
    font-size: 16px;
    text-align: center; /* Alignement du texte */
}

input::placeholder {
    color: #3d3d3d;
}

input#email {
    max-width: 92%;
}
input#password {
    max-width: 92%;
}
/* Boutons */
.btn-primary, .btn-secondary {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.1em;
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}

.btn-primary {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.1em;
    background: #ffe598;
    color: #212121;
    font-weight: bold;
}

.btn-secondary {
    font-family: 'Exo 2', sans-serif;
    font-size: 1.1em;
    background: transparent;
    color: #414141;
    border: 1px solid #414141;
    margin-top: 10px;
    backdrop-filter: blur(5px);
}

.input-error {
    border-color: #ffe598;
}

.error-banner {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    background: #f34d4d;
    color: white;
    padding: 10px 10px 14px 10px;
    border-radius: 10px;
    display: block;
    z-index: 1000;
    width: 70%;
    text-align: center;
    font-size: 1em;
    box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
}

@media screen and (orientation: landscape) {
    body {
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      background: #212121;
      color: white;
      font-size: 20px;
      overflow-x: hidden;
      position: fixed;
    }
  
    body::before {
      content: "Veuillez tourner votre téléphone en mode portrait";
    }
  }

  /* Animation de slide de droite à gauche */
@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Animation de zoom out */
@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

/* Désactiver la sélection de texte */
* {
    -webkit-user-select: none; /* iOS/Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Standard */
}

/* Classe pour déclencher l'animation avant le changement de page */
.page-transition {
    position: fixed;
    width: 100%;
    height: 100%;
    background: #1d1c22;
    top: 0;
    left: 0;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
}

.page-transition.slide {
    animation: slideOut 0.3s forwards;
    visibility: visible;
}

.page-transition.zoom {
    animation: zoomOut 0.3s forwards;
    visibility: visible;
}