:root {
    /* Palette de couleurs moderne */
    --primary: #9caecf;
    --primary-hover: #8295cf;
    --primary-light: #8295cf;
    --success: #10b981;
    --success-light: #d1fae5;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --background: #f9fafb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --border: #9caecf;
    
    /* Système d'ombres raffiné */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.06);
    
    /* Transitions */
    --transition-base: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/*BLACK + ITALIC*/
@font-face {
    font-family: 'BrownLL-Black';
    src: url('../fonts/BrownLL-Black.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BrownLL-BlackItalic';
    src: url('../fonts/BrownLL-BlackItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* BOLD + ITALIC*/
@font-face {
    font-family: 'BrownLL-Bold';
    src: url('../fonts/BrownLL-Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'BrownLL-BoldItalic';
    src: url('../fonts/BrownLL-BoldItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* ITALIC */
@font-face {
    font-family: 'BrownLL-Italic';
    src: url('../fonts/BrownLL-Italic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Light + italic */
@font-face {
    font-family: 'BrownLL-Light';
    src: url('../fonts/BrownLL-Light.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BrownLL-LightItalic';
    src: url('../fonts/BrownLL-LightItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* MEDIUM + ITALIC*/
@font-face {
    font-family: 'BrownLL-Medium';
    src: url('../fonts/BrownLL-Medium.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BrownLL-MediumItalic';
    src: url('../fonts/BrownLL-MediumItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* REGULAR */
@font-face {
    font-family: 'BrownLL-Regular';
    src: url('../fonts/BrownLL-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* THIN + ITALIC*/
@font-face {
    font-family: 'BrownLL-Thin';
    src: url('../fonts/BrownLL-Thin.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'BrownLL-ThinItalic';
    src: url('../fonts/BrownLL-ThinItalic.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}


/* Reset moderne */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    font-family: 'BrownLL-Light', sans-serif;
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 60px;
    position: relative;
    overflow-x: hidden; /* Empêche le défilement horizontal */
}

/* Page de connexion */
.login-page {
    min-height: calc(100vh - 60px);
    background: 
        radial-gradient(circle at 100% 100%, rgba(156, 174, 207, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 0% 0%, rgba(130, 149, 207, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, var(--primary-light), #fff);
    background-size: cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem 1.5rem;
    overflow: hidden; /* Empêche le défilement des éléments décoratifs */
    width: 100%; /* Assure que la page prend toute la largeur */
}

/* Éléments décoratifs animés */
.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    width: 40vmax;
    height: 40vmax;
    border-radius: 50%;
    background: rgba(156, 174, 207, 0.1);
    animation: move 15s infinite linear;
    z-index: 0;
    pointer-events: none; /* Empêche l'interaction avec les éléments décoratifs */
}

.login-page::before {
    top: -20%;
    right: -10%;
    animation-delay: -5s;
}

.login-page::after {
    bottom: -20%;
    left: -10%;
}

@keyframes move {
    0% {
        transform: rotate(0deg) translate(2%, 2%);
    }
    50% {
        transform: rotate(180deg) translate(-2%, -2%);
    }
    100% {
        transform: rotate(360deg) translate(2%, 2%);
    }
}

/* Container de login - version unique et corrigée */
.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}

/* Media Queries */
@media (max-width: 640px) {
    .login-page {
        padding: 1rem;
    }
    
    .login-container {
        padding: 1.5rem;
        margin: 0.5rem;
    }
}

@media (max-height: 700px) {
    body {
        padding-bottom: 50px;
    }
    
    .login-page {
        min-height: calc(100vh - 50px);
        padding: 1rem;
    }
    
    .login-container {
        padding: 1.5rem;
    }
}

/* Logo avec animation raffinée */
.brand-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.brand-logo img {
    width: 90px;
    height: auto;
    transition: var(--transition-base);
}

.brand-logo img:hover {
    transform: translateY(-2px) scale(1.05);
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Formulaires élégants */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    font-family: 'BrownLL-Light', sans-serif;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.925rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    border: 1.5px solid var(--border);
    background: var(--background);
    font-size: 1rem;
    font-family: 'BrownLL-Light';
    transition: var(--transition-base);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* Champ mot de passe amélioré */
.password-toggle {
    position: relative;
}

.password-toggle i {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 50%;
    transition: var(--transition-base);
}

.password-toggle i:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* Bouton avec animations modernes */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'BrownLL-Black', sans-serif;
    transition: var(--transition-base);
    cursor: pointer;
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn i {
    margin-right: 0.625rem;
    font-size: 1.1em;
    font-family: 'BrownLL-Light', sans-serif;
}

/* Alertes stylisées */
.alert {
    border-radius: 1rem;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: var(--success-light);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-light);
    border-left: 4px solid var(--danger);
}


/* Style par défaut du lien */
.text-center a {
    color: #8295cf; /* Couleur du texte */
    text-decoration: none; /* Supprime le soulignement */
    font-weight: bold; /* Texte en gras */
    transition: color 0.3s ease, text-decoration 0.3s ease; /* Animation des effets */
}

/* Effet au survol (hover) */
.text-center a:hover {
    color: #798fd1; /* Couleur du texte au survol */
    text-decoration: underline; /* Ajoute un soulignement */
}

/* Effet au clic (focus) */
.text-center a:focus {
    color: #879fe9; /* Couleur du texte lors du focus */
    outline: none; /* Supprime la bordure par défaut */
    text-decoration: underline; /* Ajoute un soulignement */
}

/* Media Queries optimisées */
@media (max-width: 640px) {
    .login-page {
        padding: 1rem;
        justify-content: flex-start;
        padding-top: 2rem;
    }
    
    .login-container {
        padding: 1.5rem;
        border-radius: 1.25rem;
        margin: 0.5rem 0;
    }
    
    .form-control {
        padding: 0.75rem 1rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }

}

/* Pour les écrans très petits en hauteur */
@media (max-height: 700px) {
    body {
        padding-bottom: 50px; /* Footer plus petit */
    }
    
    .login-page {
        min-height: calc(100vh - 50px);
        padding: 1rem;
    }
    
    .login-container {
        padding: 1.25rem;
    }
}

/* Ajout d'un media query pour les écrans très petits */
@media (max-height: 500px) {
    .login-page {
        padding: 0.5rem;
    }
    
    .brand-logo {
        margin-bottom: 1rem;
    }
    
    .brand-logo img {
        width: 60px;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
}