/* =============================================
   ASKIM - Forgot Password Page Styles
   Adapté du login.css
   ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    background: #0a0a0a;
    min-height: 100vh;
    position: relative;
}

/* Background Image */
.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bg-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1516589091380-5d8e87df6999?w=1920&h=1080&fit=crop') center/cover;
    filter: brightness(0.3);
    z-index: 1;
}

.bg-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.3) 0%, rgba(192, 57, 43, 0.5) 100%);
    z-index: 2;
}

/* Background Animation */
.floating-hearts {
    position: fixed;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 3;
}

.heart {
    position: absolute;
    color: rgba(231, 76, 60, 0.3);
    font-size: 20px;
    animation: floatUp 8s linear infinite;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Main Container */
.forgot-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 5% 80px;
    position: relative;
    z-index: 10;
}

.forgot-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 480px;
    padding: 3rem;
    position: relative;
    animation: slideIn 0.6s ease;
}

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

/* Logo Section */
.forgot-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.forgot-logo h1 {
    font-size: 2.5rem;
    color: #e74c3c;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.forgot-logo span {
    font-size: 2rem;
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Step Indicator */
.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    padding: 0 10px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0.4;
    transition: all 0.3s ease;
}

.step.active,
.step.completed {
    opacity: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #999;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.step.completed .step-number {
    background: #27ae60;
    color: white;
}

.step.completed .step-number::after {
    content: '✓';
    font-size: 16px;
}

.step.completed .step-number {
    font-size: 0;
}

.step span {
    font-size: 0.75rem;
    color: #999;
    font-weight: 600;
}

.step.active span,
.step.completed span {
    color: #2c3e50;
}

.step-line {
    width: 40px;
    height: 3px;
    background: #e0e0e0;
    margin: 0 8px;
    border-radius: 3px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.step.completed + .step-line,
.step-line.completed {
    background: #27ae60;
}

/* Titles */
.forgot-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 800;
}

.forgot-subtitle {
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.forgot-subtitle strong {
    color: #e74c3c;
}

/* Messages */
.error-message {
    background: #fee;
    border: 1px solid #fcc;
    color: #e74c3c;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.9rem;
    animation: shake 0.5s ease;
}

.success-message {
    background: #efd;
    border: 1px solid #cfc;
    color: #27ae60;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.9rem;
}

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

/* Step Content */
.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group label i {
    color: #e74c3c;
    font-size: 1rem;
}

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

.form-control:focus {
    outline: none;
    border-color: #e74c3c;
    background: white;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.form-control::placeholder {
    color: #aaa;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-control {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.toggle-password:hover {
    color: #e74c3c;
}

/* Password Strength */
.password-strength {
    display: none;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
}

.strength-bar {
    flex: 1;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.strength-text {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 50px;
}

/* Password Match */
.password-match {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

.password-match i {
    font-size: 14px;
}

/* Code Inputs */
.code-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.code-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    border: 2px solid #e0e0e0;
    border-radius: 15px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    color: #2c3e50;
}

.code-input:focus {
    outline: none;
    border-color: #e74c3c;
    background: white;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Timer */
.timer-section {
    text-align: center;
    margin: 1.5rem 0;
}

#timerText {
    font-size: 0.9rem;
    color: #7f8c8d;
}

#timer {
    font-weight: 700;
    color: #e74c3c;
}

.btn-resend {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.btn-resend:hover {
    color: #c0392b;
    transform: scale(1.05);
}

.btn-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Buttons */
.btn-submit {
    width: 100%;
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 0.5rem;
    text-decoration: none;
}

.btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
}

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

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

.btn-loader i {
    animation: spin 1s linear infinite;
}

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

/* Success Animation */
.success-animation {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    background: #efd;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounceIn 0.6s ease;
}

.success-icon i {
    font-size: 50px;
    color: #27ae60;
}

@keyframes bounceIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.btn-success-link {
    display: inline-flex;
    margin-top: 1rem;
}

/* Back to Login */
.back-to-login {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.back-to-login a {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.back-to-login a:hover {
    color: #e74c3c;
}

.back-to-login a i {
    transition: all 0.3s ease;
}

.back-to-login a:hover i {
    transform: translateX(-4px);
}

/* Responsive */
@media (max-width: 768px) {
    .forgot-container {
        padding: 2rem;
        margin: 1rem;
        max-width: none;
    }

    .forgot-logo h1 {
        font-size: 2rem;
    }

    .forgot-title {
        font-size: 1.5rem;
    }

    .step span {
        display: none;
    }

    .step-line {
        width: 30px;
    }

    .code-input {
        width: 45px;
        height: 55px;
        font-size: 1.3rem;
    }

    .forgot-section {
        padding: 80px 5% 40px;
    }
}

@media (max-width: 480px) {
    .forgot-container {
        padding: 1.5rem;
        border-radius: 20px;
    }

    .form-control {
        padding: 0.8rem;
    }

    .btn-submit {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }

    .code-inputs {
        gap: 6px;
    }

    .code-input {
        width: 40px;
        height: 50px;
        font-size: 1.2rem;
        border-radius: 10px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}
