/* ===== VARIABLES ===== */
:root {
    --primary: #FF7A4F;
    --primary-dark: #E55A2E;
    --primary-light: #FFA07A;
    --secondary: #C6FF4F;
    --secondary-dark: #A8E035;
    --secondary-light: #DAFF8A;
    --text-dark: #1A1A1A;
    --text-light: #757575;
    --bg-light: #F8F9FA;
    --white: #FFFFFF;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    --gradient-secondary: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-dark) 100%);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #FFF5F0 0%, #FFE8E0 100%);
    color: var(--text-dark);
    min-height: 100vh;
}

/* ===== APP CONTAINER ===== */
.auth-app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== HEADER ===== */
.auth-header {
    background: var(--white);
    padding: 16px 24px;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 10;
}

.auth-header-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-dark);
}

.auth-logo i {
    color: var(--primary);
    font-size: 28px;
}

.auth-logo span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.back-to-home {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-light);
    border-radius: 40px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 14px;
    transition: var(--transition);
}

.back-to-home:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateX(-4px);
}

.back-to-home i {
    font-size: 14px;
}

/* ===== MAIN CONTENT ===== */
.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-container {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--white);
    border-radius: 40px;
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    /* Animation douce de fondu */
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== LEFT SIDE ===== */
.auth-left {
    background: var(--gradient-primary);
    padding: 48px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.auth-illustration {
    position: relative;
    height: 200px;
    margin-bottom: 40px;
}

.floating-icon {
    position: absolute;
    font-size: 64px;
    animation: float 6s ease-in-out infinite;
    opacity: 0.2;
}

.floating-icon.pizza {
    top: 20px;
    left: 20px;
    animation-delay: 0s;
    font-size: 80px;
}

.floating-icon.burger {
    top: 60px;
    right: 20px;
    animation-delay: 1.5s;
    font-size: 70px;
}

.floating-icon.sushi {
    bottom: 20px;
    left: 40px;
    animation-delay: 3s;
    font-size: 60px;
}

.floating-icon.fries {
    bottom: 40px;
    right: 40px;
    animation-delay: 4.5s;
    font-size: 65px;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(3deg); }
}

.illustration-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    z-index: 2;
    width: 100%;
}

.illustration-content h1 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.illustration-content p {
    font-size: 18px;
    opacity: 0.9;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 2;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--white);
    /* Animation de fondu simple */
    opacity: 0;
    animation: fadeInFeature 0.5s ease forwards;
}

.feature-item:nth-child(1) { animation-delay: 0.1s; }
.feature-item:nth-child(2) { animation-delay: 0.2s; }
.feature-item:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInFeature {
    from { opacity: 0; }
    to { opacity: 1; }
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    background: rgba(255,255,255,0.3);
}

.feature-text h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 14px;
    opacity: 0.8;
}

/* ===== RIGHT SIDE ===== */
.auth-right {
    padding: 48px 40px;
    background: var(--white);
    /* Animation de fondu simple */
    opacity: 0;
    animation: fadeInRight 0.5s ease 0.1s forwards;
}

@keyframes fadeInRight {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
    padding: 8px;
    background: var(--bg-light);
    border-radius: 60px;
}

.auth-tab {
    flex: 1;
    padding: 14px 24px;
    border: none;
    background: transparent;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.auth-tab i {
    font-size: 18px;
}

.auth-tab:hover {
    color: var(--text-dark);
}

.auth-tab.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

/* Forms */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeInForm 0.3s ease;
}

@keyframes fadeInForm {
    from { opacity: 0; }
    to { opacity: 1; }
}

.auth-form h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.auth-subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
    font-size: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.form-group label i {
    color: var(--primary);
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--bg-light);
    border-radius: 16px;
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:hover {
    border-color: var(--primary-light);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(255, 122, 79, 0.1);
}

/* Password Input */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.strength-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-light);
    border-radius: 4px;
    transition: var(--transition);
}

.strength-bar.active {
    background: var(--primary);
}

.strength-text {
    font-size: 12px;
    color: var(--text-light);
    min-width: 45px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.remember-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
}

.remember-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.forgot-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Terms Checkbox */
.terms-group {
    margin-bottom: 32px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    accent-color: var(--primary);
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.auth-submit {
    width: 100%;
    padding: 16px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 60px;
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.auth-submit::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.auth-submit:hover::before {
    width: 300px;
    height: 300px;
}

.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.auth-submit i {
    transition: var(--transition);
}

.auth-submit:hover i {
    transform: translateX(4px);
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--bg-light);
    z-index: 1;
}

.auth-divider span {
    position: relative;
    z-index: 2;
    background: var(--white);
    padding: 0 16px;
    color: var(--text-light);
    font-size: 14px;
}

/* Google Auth */
.google-auth {
    width: 100%;
    padding: 16px;
    background: var(--white);
    border: 2px solid var(--bg-light);
    border-radius: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.google-auth:hover {
    border-color: var(--primary);
    background: var(--bg-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.google-auth img {
    width: 20px;
    height: 20px;
}

/* Auth Switch */
.auth-switch {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: var(--transition);
}

.auth-switch a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Forgot Password */
.back-to-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.back-to-login:hover {
    color: var(--primary);
}

.back-to-login i {
    transition: var(--transition);
}

.back-to-login:hover i {
    transform: translateX(-4px);
}

/* ===== FOOTER ===== */
.auth-footer {
    background: var(--white);
    padding: 24px;
    text-align: center;
    border-top: 1px solid var(--bg-light);
}

.auth-footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.auth-footer-links a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.auth-footer-links a:hover {
    color: var(--primary);
}

.auth-footer-links .dot {
    color: var(--text-light);
    font-size: 12px;
}

.auth-footer-copyright {
    color: var(--text-light);
    font-size: 13px;
}

/* ===== NOTIFICATION ===== */
.auth-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--white);
    color: var(--text-dark);
    padding: 16px 24px;
    border-radius: 60px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1000;
    animation: slideUp 0.3s ease;
    border-left: 4px solid var(--primary);
}

.auth-notification i {
    color: var(--primary);
    font-size: 20px;
}

.auth-notification.success {
    border-left-color: #4CAF50;
}

.auth-notification.success i {
    color: #4CAF50;
}

.auth-notification.error {
    border-left-color: #F44336;
}

.auth-notification.error i {
    color: #F44336;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* ===== LOADING SPINNER ===== */
.auth-spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 600px;
    }
    
    .auth-left {
        display: none;
    }
    
    .auth-right {
        padding: 40px 32px;
    }
}

@media (max-width: 768px) {
    .auth-header-container {
        flex-direction: column;
        gap: 16px;
    }
    
    .auth-main {
        padding: 20px 16px;
    }
    
    .auth-right {
        padding: 32px 20px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-tabs {
        flex-direction: column;
        gap: 8px;
    }
    
    .auth-form h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .form-options {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .auth-footer-links {
        gap: 12px;
    }
    
    .auth-footer-links a {
        font-size: 13px;
    }
}