/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Background photo fixe */
.hero-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/bg_login.jpg') center/cover no-repeat;
    z-index: 1;
}

/* Overlay léger */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.2) 100%);
    z-index: 2;
}



/* Container principal */
.main-container {
    position: relative;
    height: 100vh;
    display: flex;
    z-index: 3;
}

/* Section gauche - Hero content */
.hero-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    color: white;
    position: relative;
}

.hero-content {
    max-width: 600px;
    animation: slideInLeft 1.2s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2rem;
    width: fit-content;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-highlight {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 3rem;
    font-weight: 300;
}

.hero-features {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.feature-icon {
    width: 20px;
    height: 20px;
    padding: 4px;
    background: rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    color: #60a5fa;
}

/* Section droite - Login */
.login-section {
    width: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(40px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.login-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%);
    z-index: -1;
}

.login-container {
    animation: slideInRight 1.2s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Logo company simplifié */
.company-logo {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

.login-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.login-subtitle {
    color: #64748b;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    line-height: 1.5;
}

/* Alerte d'erreur */
.alert {
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.alert.error {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}



/* Bouton principal SSO */
.sso-button {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border: none;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    margin-bottom: 2rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.sso-button::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.6s;
}

.sso-button:hover::before {
    left: 100%;
}

.sso-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
    color: white;
    text-decoration: none;
}

/* Section info sécurité */
.security-info {
    padding: 1.5rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.security-title {
    font-size: 1rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.security-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.security-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #64748b;
    font-size: 0.9rem;
}

.security-icon {
    width: 16px;
    height: 16px;
    color: #10b981;
}

/* Floating elements décoratifs */
.floating-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 8s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 15%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 70%;
    left: 25%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    top: 40%;
    left: 5%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
    50% { transform: translateY(-20px) rotate(180deg); opacity: 1; }
}

/* Footer */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 4;
    padding: 1rem 0;
}

.footer-content {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .sso-button {
    background: #94a3b8;
}

/* Responsive amélioré - correction scroll mobile */
@media (max-width: 1024px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
    }
    
    .main-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        position: relative;
    }
    
    .hero-section {
        flex: 0;
        min-height: 50vh;
        padding: 2rem;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .login-section {
        width: 100%;
        padding: 2rem;
        box-shadow: none;
        min-height: auto;
        background: rgba(255, 255, 255, 0.95);
        position: relative;
    }
    
    .company-logo {
        width: 100px;
        height: 100px;
    }
    
    .logo-img {
        width: 100px;
        height: 100px;
    }
    
    .page-footer {
        position: relative;
        background: rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
    }
    
    .hero-section {
        min-height: 40vh;
        padding: 1.5rem;
        position: relative;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-features {
        justify-content: center;
        gap: 1rem;
    }
    
    .login-section {
        padding: 1.5rem;
        min-height: auto;
        position: relative;
    }
    
    .login-title {
        font-size: 2rem;
    }
    
    .login-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .company-logo {
        width: 80px;
        height: 80px;
        margin-bottom: 1.5rem;
    }
    
    .logo-img {
        width: 80px;
        height: 80px;
    }
    
    .sso-button {
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
    
    .security-info {
        padding: 1.25rem;
    }
    
    .page-footer {
        position: relative;
        background: rgba(0, 0, 0, 0.8);
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 1rem;
        min-height: 35vh;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .login-section {
        padding: 1rem;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
    
    .company-logo {
        width: 70px;
        height: 70px;
    }
    
    .logo-img {
        width: 70px;
        height: 70px;
    }
    
    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}