/* RESET ET BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* HEADER SIMPLE */
.header-simple {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #4f46e5;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.logo:hover {
    color: #3730a3;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-btn:hover {
    color: #4f46e5;
    transform: translateX(-2px);
}

.back-btn i {
    font-size: 1.1rem;
}

/* MODAL AUTHENTIFICATION */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 2rem;
}

.modal-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(30px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* TABS */
.tabs {
    display: flex;
    background: #f8fafc;
    border-radius: 20px 20px 0 0;
    margin: 0;
    padding: 4px;
    position: relative;
}

.tab-btn {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: #64748b;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.tab-btn.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
    transform: translateY(-2px);
}

.tab-btn:hover:not(.active) {
    color: #4f46e5;
    transform: translateY(-1px);
}

/* FORM BOX */
.form-box {
    display: none;
    padding: 2.5rem;
    animation: fadeIn 0.3s ease;
}

.form-box.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header i {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 1rem;
    display: block;
}

.modal-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.modal-header p {
    color: #64748b;
    font-size: 0.95rem;
}

/* INPUT GROUPS */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    z-index: 2;
}

.input-group input {
    width: 100%;
    padding: 1.25rem 1rem 1.25rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    background: #fafbfc;
    transition: all 0.3s ease;
    color: #1e293b;
}

.input-group input:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    transform: translateY(-1px);
}

.input-group input::placeholder {
    color: #9ca3af;
}

/* BOUTONS */
.btn-login {
    width: 100%;
    padding: 1.25rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(79, 70, 229, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

/* RESPONSIVE */
@media (max-width: 480px) {
    .header-simple {
        padding: 1rem;
    }
    
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .modal-box {
        margin: 1rem;
        padding: 1rem;
        border-radius: 20px;
    }
    
    .form-box {
        padding: 1.5rem;
    }
    
    .tabs {
        margin: -1rem -1.5rem 0;
        border-radius: 16px 16px 0 0;
    }
    
    .tab-btn {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
}

@media (max-height: 700px) {
    .modal-box {
        max-height: 95vh;
        margin: 1rem;
    }
    
    .form-box {
        padding: 1.5rem;
    }
}

/* SCROLLBAR PERSONNALISÉE */
.modal-box::-webkit-scrollbar {
    width: 6px;
}

.modal-box::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.modal-box::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.modal-box::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ANIMATIONS DE CHARGEMENT (optionnel) */
.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}