/* CSS vide */
/* static/css/style.css */

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #cbd2f3 0%, #d9d4e0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
}

/* Cercles animés en arrière-plan */
.circles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.circles li {
    position: absolute;
    display: block;
    list-style: none;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.2);
    animation: animate 25s linear infinite;
    bottom: -150px;
    border-radius: 50%;
}

.circles li:nth-child(1) {
    left: 25%;
    width: 80px;
    height: 80px;
    animation-delay: 0s;
}

.circles li:nth-child(2) {
    left: 10%;
    width: 20px;
    height: 20px;
    animation-delay: 2s;
    animation-duration: 12s;
}

.circles li:nth-child(3) {
    left: 70%;
    width: 20px;
    height: 20px;
    animation-delay: 4s;
}

.circles li:nth-child(4) {
    left: 40%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
    animation-duration: 18s;
}

.circles li:nth-child(5) {
    left: 65%;
    width: 20px;
    height: 20px;
    animation-delay: 0s;
}

.circles li:nth-child(6) {
    left: 75%;
    width: 110px;
    height: 110px;
    animation-delay: 3s;
}

.circles li:nth-child(7) {
    left: 35%;
    width: 150px;
    height: 150px;
    animation-delay: 7s;
}

.circles li:nth-child(8) {
    left: 50%;
    width: 25px;
    height: 25px;
    animation-delay: 15s;
    animation-duration: 45s;
}

.circles li:nth-child(9) {
    left: 20%;
    width: 15px;
    height: 15px;
    animation-delay: 2s;
    animation-duration: 35s;
}

.circles li:nth-child(10) {
    left: 85%;
    width: 150px;
    height: 150px;
    animation-delay: 0s;
    animation-duration: 11s;
}

@keyframes animate {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
        border-radius: 50%;
    }
    100% {
        transform: translateY(-1000px) rotate(720deg);
        opacity: 0;
        border-radius: 50%;
    }
}

/* Wrapper principal */
.login-wrapper {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Conteneur en verre */
.glass-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 35px 60px -15px rgba(0, 0, 0, 0.3);
}

/* En-tête */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 4rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    display: inline-block;
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-header p {
    color: #718096;
    font-size: 0.95rem;
    font-weight: 500;
}

/* Corps */
.login-body {
    width: 100%;
}

/* Alertes personnalisées */
.custom-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.custom-alert i {
    font-size: 1.2rem;
}

.alert-danger {
    background: #fff5f5;
    border-left: 4px solid #f56565;
    color: #c53030;
}

.alert-success {
    background: #f0fff4;
    border-left: 4px solid #48bb78;
    color: #22543d;
}

.alert-warning {
    background: #fffbeb;
    border-left: 4px solid #ecc94b;
    color: #744210;
}

/* Groupes de formulaire */
.form-group {
    position: relative;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.form-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #a0aec0;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    z-index: 10;
}

.form-group .form-control {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    color: #2d3748;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
}

.form-group .form-control:focus + i {
    color: #667eea;
    transform: translateY(-50%) scale(1.1);
}

.form-group .form-control::placeholder {
    color: #a0aec0;
    font-weight: 400;
    opacity: 0.8;
}

/* Options du formulaire */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 25px 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #4a5568;
    transition: color 0.3s ease;
}

.checkbox-wrapper:hover {
    color: #667eea;
}

.checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked {
    transform: scale(1.1);
}

.checkbox-wrapper span {
    user-select: none;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

.forgot-password:hover {
    color: #5a67d8;
}

.forgot-password:hover::after {
    width: 100%;
}

/* Bouton de connexion */
.btn-login {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 25px;
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-login:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.5);
}

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

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 2;
}

.btn-content i {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.btn-login:hover .btn-content i {
    transform: translateX(5px);
}

.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Version */
.version {
    text-align: center;
    color: #a0aec0;
    font-size: 0.8rem;
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.version:hover {
    color: #718096;
}

.version i {
    font-size: 0.7rem;
}

/* Validation styles */
.form-control.is-invalid {
    border-color: #f56565 !important;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.invalid-feedback {
    color: #f56565;
    font-size: 0.8rem;
    margin-top: 5px;
    padding-left: 15px;
}

/* Responsive */
@media (max-width: 480px) {
    .login-wrapper {
        padding: 10px;
    }
    
    .glass-container {
        padding: 30px 20px;
    }
    
    .login-header h1 {
        font-size: 1.5rem;
    }
    
    .login-header i {
        font-size: 3rem;
    }
    
    .form-options {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .btn-login {
        padding: 14px;
    }
}

/* Classes d'animation supplémentaires */
.animate__shakeX {
    animation: shakeX 0.5s ease;
}

@keyframes shakeX {
    from, to {
        transform: translate3d(0, 0, 0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translate3d(-10px, 0, 0);
    }
    20%, 40%, 60%, 80% {
        transform: translate3d(10px, 0, 0);
    }
}

.animate__fadeInDown {
    animation: fadeInDown 0.5s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate__fadeOutUp {
    animation: fadeOutUp 0.5s ease;
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        transform: translate3d(0, -30px, 0);
    }
}

/* Effet de focus pour les groupes de formulaire */
.form-group.focused {
    transform: scale(1.02);
}

.form-group.focused i {
    color: #667eea;
}

/* Style pour le mode hors ligne */
.offline .btn-login {
    background: linear-gradient(135deg, #a0aec0, #718096);
    cursor: not-allowed;
}

.offline .btn-login:hover {
    transform: none;
    box-shadow: none;
}

/* Style pour les états de validation */
.form-group.success .form-control {
    border-color: #48bb78;
}

.form-group.success i {
    color: #48bb78;
}

.form-group.error .form-control {
    border-color: #f56565;
}

.form-group.error i {
    color: #f56565;
}

/* Loader pour le bouton */
.btn-login.loading .btn-content span:not(.loader) {
    opacity: 0.7;
}

.btn-login.loading .loader {
    display: inline-block;
}

/* Effet de vague pour le fond */
.wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(-25%);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Tooltip personnalisé */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 8px 12px;
    background: #2d3748;
    color: white;
    font-size: 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

[data-tooltip]:hover:before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.5);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(102, 126, 234, 0.8);
}

/* Sélection de texte */
::selection {
    background: #667eea;
    color: white;
}

.badge {
        padding: 5px 10px;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 500;
    }
    
    .bg-success { background-color: #28a745 !important; }
    .bg-danger { background-color: #dc3545 !important; }
    .bg-warning { background-color: #ffc107 !important; }
    .bg-secondary { background-color: #6c757d !important; }
    .text-white { color: #fff !important; }
    .text-dark { color: #343a40 !important; }
    
    .photo-link img {
        transition: transform 0.2s, box-shadow 0.2s;
    }
    
    .photo-link img:hover {
        transform: scale(1.1);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }