@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;400;500&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

body {
    background: linear-gradient(#33279E, #110957);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 10px; /* pour éviter que le contenu touche les bords */
}

/* ----- FADE TRANSITION ----- */
.fade-transition {
    position: fixed;
    inset: 0;
    display: flex; 
    justify-content: center;
    align-items: center;
    transform: translateY(0%);
    background: linear-gradient(#33279E, #7363ff);
    pointer-events: all;
    transition: transform 0.5s ease-in-out;
    z-index: 9999;
}

.fade-transition img {
    height: 50px;
    display: block;
    margin: 0;
    padding: 5px;
}

.fade-transition .text {
    text-align: center;
    font-weight: bolder;
    font-size: xx-large;
    color: #ffffff;
}

.fade-transition.active {
    transform: translateY(0%);
    pointer-events: all;
}

.fade-transition.slide-down {
    transform: translateY(100%);
    pointer-events: none;
}

/* ----- FORMULAIRE ----- */
form {
    display: flex;
    flex-direction: column;
    background: linear-gradient(#313131, #6b6b6b);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    gap: 10px;
}

h4 {
    text-align: center;
    font-size: 20px;
    color: white;
}

h2 {
    text-align: center;
    font-size: 14px;
    color: #ccc;
}

hr {
    margin: 10px 0;
    background-color: #938f8f;
    border: 0;
    height: 1px;
    width: 100%;
}

.user-field {
    display: flex;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
}

.password-field {
  display: flex;
  align-items: center;
  gap: 5px; /* espace entre l'input et l'image */
}

input[type="text"],
input[type="password"] {
    flex: 1;
    padding: 5px;
    border-radius: 6px;
    border: 1px solid #ccc;
    background-color: #222;
    color: white;
}

input:focus {
    border: 1px solid #009bf9;
    outline: none;
}

input[type="submit"] {
    margin-top: 15px;
    padding: 10px;
    background-color: #009bf9;
    color: white;
    border: 1px solid #009bf9;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

input[type="submit"]:hover {
    background-color: #007acc;
    border-color: #007acc;
}

.toggle-img {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
}

.toggle-img img {
  width: 35px;
  height: 35px;
  transition: transform 0.2s;
}

.toggle-img img:hover {
  transform: scale(1.1);
}

p {
    text-align: center;
    margin: 5px 0;
    font-size: 14px;
    color: #ddd;
}

p a {
    text-decoration: none;
    color: #1a4864;
}

p a:hover {
    text-decoration: underline;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 480px) {
    form {
        padding: 15px;
        gap: 8px;
    }

    h4 {
        font-size: 18px;
    }

    h2 {
        font-size: 12px;
    }

    input[type="submit"] {
        font-size: 14px;
        padding: 8px;
    }
}
