@font-face {
  font-family: "Raleway";
  src: url("./asset/static/Raleway-Bold.ttf") format("ttf");
}

.titre {
  padding-bottom: 40px;
  font-size: 24px;
  font-family: "Raleway", serif;
  font-weight: 700;
}

label {
  font-family: "Raleway", serif;
}

.header {
  position: relative;
  height: 57px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 12px 8px rgba(0, 0, 0, 0.08);
}

.logo {
  width: 180px;
}

.back-btn {
  position: absolute;
  left: 16px;

  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #ff6e14;
}

.balise {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - 60px);
}

.auth {
  padding: 15px;
  max-width: 440px;
  margin-top: 50px;
  transition: margin-top 0.3s ease;
}

.auth.compact {
  margin-top: 10px;
}

.categories.expanded {
  max-height: 91vh;
  /* après affichage */
}

.categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  height: 91vh;
  overflow: hidden;
  margin-right: -100px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.column {
  overflow: hidden;
  position: relative;
}

.track img {
  width: 100%;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 24px;
}

.up .track {
  animation: scroll-up 12s linear infinite;
}

.down .track {
  animation: scroll-down 12s linear infinite;
}

@keyframes scroll-up {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

@keyframes scroll-down {
  from {
    transform: translateY(-50%);
  }

  to {
    transform: translateY(0);
  }
}

.btn-primary {
  background: #ec5a13;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 15px;
  width: 100%;
  font-weight: 600;
  margin-top: 30px;
}

.btn-primary:hover {
  background-color: #f07b42;
}

.form-control {
  border-radius: 15px;
  padding: 8px;
  border: 1px solid #acb8c7;
}

.btn-outline {
  border: 1px solid black;
  background: white;
  padding: 7px;
  border-radius: 15px;
  width: 100%;
  margin-bottom: 20px;
}

.connexion {
  font-weight: 700;
  font-family: "Raleway", serif;
}

.lien {
  color: black;
  text-decoration: none;
  font-weight: 700;
  font-family: "Raleway", serif;
}

.lien2 {
  font-size: 12px;
  color: #565f6c;
  padding-bottom: 20px !important;
  font-family: "Raleway", serif;
}

.carousel-toggle {
  position: absolute;
  top: 91vh;
  right: 25px;

  width: 40px;
  height: 40px;
  border-radius: 15px;

  border: none;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

  cursor: pointer;
  z-index: 10;
}

.categories.paused .track {
  animation-play-state: paused;
}

.mobile {
  display: none;
}

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 60px;
}

/* Icône */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  cursor: pointer;
  color: #3a4757;
  font-size: 22px;
}

/* Séparateur vertical */
.separator {
  position: absolute;
  top: 2%;
  right: 44px;
  height: 100%;
  width: 1px;
  background-color: #acb8c7;
}

/* Trait inversé (œil barré custom) */
.toggle-password.crossed::after {
  content: "";
  position: absolute;
  width: 25px;
  height: 2px;
  background: #3a4757;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-45deg);
  border-radius: 2px;
}

.toggle-password:hover {
  color: #000;
}

.email-input:hover {
  border-color: #000;
}

.email-input:focus {
  box-shadow: none;
  outline: none;
  border: 2px solid #0000ff;
}

.password-input {
  box-shadow: none;
  outline: none !important;
  -webkit-appearance: none;
  appearance: none;
}

.password-input:focus,
.password-input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.password-wrapper:focus-within {
  outline: none;
}

/* Bordure custom (désactivée par défaut) */
.password-wrapper::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: calc(100% - 44px);
  /* arrêt au séparateur */
  border: 1px solid transparent;
  border-right: none;
  border-radius: 15px 0 0 15px;
  pointer-events: none;
}

.password-wrapper:hover::after {
  border-color: #000;
}

.password-wrapper:focus-within::after {
  border: 2px solid #0000ff;
  box-shadow: none;
  outline: none !important;
}

.password-wrapper:hover .separator {
  background-color: #000;
}

.password-wrapper:focus-within .separator {
  background-color: #0000ff;
}

.form-control.error {
  border-color: #b1342a !important;
  box-shadow: none !important;
}

/* Mobile : carrousel en background avec 2 colonnes */
@media (max-width: 768px) {
  .balise {
    display: block;
    position: relative;
    height: 100vh;
    /* occupe tout l'écran pour éviter espace blanc */
    margin: 0;
    /* supprime tout margin qui pourrait créer de l'espace */
    padding: 0;
    overflow: hidden;
    /* évite les scrollbars */
  }

  .categories {
    position: absolute;
    top: 0;
    left: 0;
    width: 600px !important;
    height: 100%;
    display: grid;
    gap: 15px;
    z-index: 0;
    pointer-events: none;
  }

  .auth {
    position: relative;
    z-index: 1;
    background: white;
    max-height: 90vh;
    /* éviter que le formulaire dépasse l'écran */
    overflow-y: auto;
    /* scroll interne si formulaire trop grand */
    padding: 20px;
    top: 50px;
    width: 100%;
  }

  .desktop {
    display: none;
  }

  .mobile {
    display: grid;
    width: 550px;
  }

  .carousel-toggle {
    position: absolute;
    top: 40px;
    right: 25px;

    width: 40px;
    height: 40px;
    border-radius: 15px;

    border: none;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    cursor: pointer;
    z-index: 10;
  }

  .categories.paused .track {
    animation-play-state: paused;
  }

  .mobile.paused .track {
    animation-play-state: paused;
  }

  @keyframes scroll-up {
    from {
      transform: translateY(0);
    }

    to {
      transform: translateY(-50%);
    }
  }

  @keyframes scroll-down {
    from {
      transform: translateY(-50%);
    }

    to {
      transform: translateY(0);
    }
  }

  /* Animation ajustée pour mobile */
  .up .track,
  .down .track {
    animation-duration: 10s;
  }
}
