/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* ============================================
   PAGE LOGIN
   ============================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 50px 40px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: fadeInUp 0.6s ease;
}

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

.fingerprint-image {
    width: 150px;
    height: 150px;
    margin: 0 auto 30px;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.fingerprint-image:hover {
    transform: scale(1.05) rotate(5deg);
}

.fingerprint-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.login-title {
    font-size: 28px;
    color: #0D4F8B;
    margin-bottom: 10px;
    font-weight: 600;
}

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 14px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-group input:focus {
    outline: none;
    border-color: #4A90C5;
    background: white;
    box-shadow: 0 0 0 3px rgba(74, 144, 197, 0.1);
}

.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
}

.remember-me input[type="checkbox"] {
    margin-right: 8px;
    width: auto;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #4A90C5 0%, #0D4F8B 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 79, 139, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 79, 139, 0.4);
}

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

.forgot-password {
    margin-top: 20px;
    text-align: center;
}

.forgot-password a {
    color: #4A90C5;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-password a:hover {
    color: #0D4F8B;
    text-decoration: underline;
}

.error-message {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.stats-container {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stats-container img {
    max-width: 300px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.stats-container img:hover {
    transform: scale(1.05);
}

/* ============================================
   PAGE PRINCIPALE
   ============================================ */
.main-container {
    min-height: 100vh;
    background: linear-gradient(to bottom, #E8F1F8 0%, #C5D9E8 100%);
}

.header {
    background: linear-gradient(135deg, #0D4F8B 0%, #4A90C5 100%);
    padding: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    color: white;
    font-size: 36px;
    font-weight: 700;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.site-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-style: italic;
    margin-top: 5px;
}

.user-info {
    color: white;
    text-align: right;
}

.welcome-message {
    font-size: 16px;
    margin-bottom: 5px;
}

.visit-counter {
    font-size: 13px;
    opacity: 0.9;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 20px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    display: inline-block;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.welcome-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.welcome-section h2 {
    color: #0D4F8B;
    margin-bottom: 15px;
    font-size: 24px;
}

.welcome-section p {
    color: #666;
    line-height: 1.6;
}

.buttons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.button-card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
}

.button-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-color: #4A90C5;
}

.button-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #4A90C5;
}

.button-title {
    color: #0D4F8B;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
}

.button-description {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* ============================================
   PAGE MOT DE PASSE OUBLIÉ
   ============================================ */
.reset-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.reset-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 100%;
    animation: fadeInUp 0.6s ease;
}

.reset-title {
    font-size: 24px;
    color: #0D4F8B;
    margin-bottom: 10px;
    text-align: center;
}

.reset-description {
    color: #666;
    margin-bottom: 30px;
    text-align: center;
    font-size: 14px;
}

.back-to-login {
    text-align: center;
    margin-top: 20px;
}

.back-to-login a {
    color: #4A90C5;
    text-decoration: none;
    font-size: 14px;
}

.back-to-login a:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .login-box {
        padding: 40px 30px;
    }
    
    .site-title {
        font-size: 28px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .user-info {
        text-align: center;
        margin-top: 15px;
    }
    
    .buttons-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        flex-direction: column;
    }
    
    .stats-container img {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .fingerprint-image {
        width: 120px;
        height: 120px;
    }
    
    .login-title {
        font-size: 24px;
    }
    
    .site-title {
        font-size: 24px;
    }
}
