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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: #0f172a;
    overflow-x: hidden;
}

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

/* Header moderne sombre */
.header {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.navbar-brand a {
    text-decoration: none;
    color: inherit;
}

.navbar-brand h1 {
    color: #f1f5f9;
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.2rem;
}

.brand-slogan {
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    font-style: italic;
    margin: 0;
    line-height: 1;
}

.navbar-nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.navbar-nav a {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: width 0.3s ease;
}

.navbar-nav a:hover {
    color: #f1f5f9;
}

.navbar-nav a:hover::after {
    width: 100%;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
    padding: 2rem 0;
}

.auth-card {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.3);
    padding: 3rem;
    width: 100%;
    max-width: 520px;
    animation: slideUp 0.6s ease-out;
}

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

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.icon-container {
    margin-bottom: 1.5rem;
}

.forgot-icon {
    font-size: 4rem;
    opacity: 0.8;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-header h1 {
    color: #f1f5f9;
    margin: 0 0 1rem 0;
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #06b6d4 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-header p {
    color: #94a3b8;
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 400px;
    margin: 0 auto;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.form-group input {
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 12px;
    color: #f1f5f9;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input::placeholder {
    color: #64748b;
}

.form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(15, 23, 42, 0.9);
}

.form-group input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.show {
    display: block;
    opacity: 1;
}

/* État de succès */
.success-state {
    text-align: center;
    animation: fadeIn 0.5s ease-out;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounceIn 0.6s ease-out;
}

@keyframes bounceIn {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.success-state h2 {
    color: #10b981;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.success-state p {
    color: #cbd5e1;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.email-sent {
    color: #60a5fa !important;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin: 1rem 0;
}

.instruction {
    color: #94a3b8 !important;
    font-size: 0.95rem;
    margin-bottom: 2rem !important;
}

.resend-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.resend-section p {
    margin-bottom: 1rem;
    color: #94a3b8;
    font-size: 0.9rem;
}

.countdown {
    color: #f59e0b;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Boutons */
.btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    width: 100%;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

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

.btn-secondary {
    background: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
    border: 1px solid rgba(71, 85, 105, 0.5);
}

.btn-secondary:hover {
    background: rgba(71, 85, 105, 0.8);
    color: #f1f5f9;
    transform: translateY(-2px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.auth-footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.auth-footer p {
    color: #94a3b8;
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    margin: 5% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.3);
    animation: scaleIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.3);
}

.modal-header h3 {
    color: #f1f5f9;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    justify-content: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

/* Étapes dans le modal */
.steps-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.step-number {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.step-content h4 {
    color: #f1f5f9;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.step-content p {
    color: #cbd5e1;
    margin: 0;
    line-height: 1.5;
}

.info-note {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.info-note p {
    color: #cbd5e1;
    margin: 0;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    color: #94a3b8;
    text-align: center;
    padding: 3rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(51, 65, 85, 0.3);
}

.footer p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* États de chargement */
.btn.loading {
    position: relative;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .navbar-brand {
        align-items: center;
        text-align: center;
    }
    
    .navbar-nav {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.75rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .steps-container {
        gap: 1rem;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
    }
    
    .forgot-icon,
    .success-icon {
        font-size: 3rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.5rem;
    }
}

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

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}