@import url('https://fonts.googleapis.com/css2?family=Krub:wght@400&display=swap');

/* ========================== Structure générale ========================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Krub', sans-serif;
    background-color: #0b2c19;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 7em; /* pour ne pas passer sous le header */
    z-index: 1;
}


h1 {
    margin-top: 10px;
    position: center;
    color: #ffff /* Espacement inférieur pour séparer l'en-tête du formulaire */
}

/* ========================== Animation de fond ========================== */

.animated-bg {
    background-color: #0b2c19;
    position: absolute;  /* Absolu pour qu'il prenne toute la page */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* Toujours derrière les autres éléments */
    overflow: hidden;
}


.animated-bg::before {
    content: '';
    position: absolute;
    top: var(--y, 50%);
    left: var(--x, 50%);
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 80%);
    pointer-events: none;
    transition: top 0.1s ease, left 0.1s ease;
    z-index: -2;
}

/* ========================== Connexion ========================== */

.login-container {
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    width: 300px;
    text-align: center;
    display: flex;
    flex-direction: column;
    margin-top: 1em;
    position: relative;  /* Assure que l'élément soit bien au-dessus */
    z-index: 1;  /* S'assurer qu'il est au-dessus du fond animé */
}


input[type="text"],
input[type="password"] {
    width: 100%; /* Prendre toute la largeur du conteneur */
    padding: 10px; /* Espacement intérieur */
    margin: 10px 0; /* Espacement externe */
    border: 1px solid #ccc; /* Bordure grise */
    border-radius: 5px; /* Bordures arrondies */
}


.error-message {
    color: red; /* Couleur rouge pour les messages d'erreur */
}

/* ========================== Header / Navigation ========================== */
nav{
    position:fixed;
    top: 0;
    width: 100%;
    background-color: whitesmoke;
    display : flex;
    flex-direction: row;
    height : 7em;
    align-items: center;
    justify-content: end;
    align-items: center;
    font-family: "Krub";
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo_header{
    margin-left: 1em; 
    margin-bottom: 1.5em;
    object-fit: cover;
    height: 60%;
    display: flex;
    align-items: left;
}

.logo{
    height: 100%;
    object-fit: contain;
}

#logo_slow{
    margin-right: auto; 
    margin-left: 3em;
    margin-top: 2em;
    height: 40%;
}

button{
    font-family: "Krub";
    border : 2px;
    background-color: whitesmoke;
    font-size: 1em;
}

.header_button{
    margin : 1em;
    padding: 1em;
    border-radius: 0.5em;
}

.header_button:hover{
    background-color: #d1cfcf;
}

.header_button.active{
    font-weight: bold;
}

.profile_button{
    margin : 1em;
    padding : 1em;
    border-radius:  0.5em;
    background-color: #0b2c19;
    color:whitesmoke;
}

.profile_button:hover{
    opacity: 0.7;
}

.profile_button.active{
    font-weight: bold;
}



/* ========================== Footer ========================== */
#footer {
    background-color: whitesmoke;
    padding: 2em;
    text-align: center;
    border-radius: 1em;
    margin-top: 3em;
}

#footer h2 {
    font-size: 1em;
    margin-bottom: 1em;
    color: var(--color-primary);
}

#logo_footer {
    max-width: 120px;
    height: auto;
}

.footer_button {
    display: inline-block;
    margin-top: 1em;
    padding: 0.7em 1.5em;
    background-color: var(--color-secondary);
    color: var(--color-octonary);
    border-radius: 0.5em;
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.3s, transform 0.2s;
}

.footer_button:hover {
    background-color: var(--color-primary);
    transform: translateY(-2px);
}