/* =============================================
   Page de connexion - Split 40/60
   ============================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    overflow: hidden;
}

/* --- Partie gauche 40% : formulaire --- */
.login-form-side {
    flex: 0 0 40%;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    position: relative;
    z-index: 2;
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.login-logo img {
    height: 64px;
    margin-bottom: var(--spacing-base);
}

.login-logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-gray-800);
    margin: 0;
}

.login-logo p {
    font-size: var(--font-size-sm);
    color: var(--color-gray-400);
    margin-top: var(--spacing-xs);
}

.login-form .form-group {
    margin-bottom: var(--spacing-base);
}

.login-form .form-input {
    padding: 14px 16px;
    font-size: var(--font-size-md);
}

.login-submit {
    width: 100%;
    margin-top: var(--spacing-xl);
    padding: 14px;
    font-size: var(--font-size-md);
    font-weight: 600;
}

.login-error {
    background: var(--color-error-light);
    color: var(--color-error);
    padding: var(--spacing-md) var(--spacing-base);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    margin-bottom: var(--spacing-base);
    border: 1px solid #fecaca;
}

.login-footer {
    text-align: center;
    margin-top: var(--spacing-2xl);
    padding-top: var(--spacing-base);
    font-size: var(--font-size-xs);
    color: var(--color-gray-300);
}

/* --- Partie droite 60% : aurore boreale + particules + blobs --- */
.login-fun-side {
    flex: 0 0 60%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2xl);
    color: #fff;
    background: #0a0e27;
}

/* Aurore boreale : 3 couches de gradients coniques animes */
.aurora {
    position: absolute;
    inset: -50%;
    pointer-events: none;
    will-change: transform, opacity;
}

.aurora-1 {
    background: conic-gradient(from 180deg at 50% 50%,
        transparent 0deg,
        rgba(16, 185, 129, 0.4) 60deg,
        transparent 120deg,
        rgba(59, 130, 246, 0.4) 200deg,
        transparent 260deg,
        rgba(168, 85, 247, 0.4) 320deg,
        transparent 360deg);
    filter: blur(60px);
    animation: auroraRotate1 30s linear infinite;
}

.aurora-2 {
    background: conic-gradient(from 90deg at 50% 50%,
        transparent 0deg,
        rgba(236, 72, 153, 0.35) 90deg,
        transparent 180deg,
        rgba(20, 184, 166, 0.35) 270deg,
        transparent 360deg);
    filter: blur(80px);
    animation: auroraRotate2 45s linear infinite reverse;
    mix-blend-mode: screen;
}

.aurora-3 {
    background: radial-gradient(ellipse at 30% 50%,
        rgba(99, 102, 241, 0.5) 0%,
        transparent 50%),
    radial-gradient(ellipse at 70% 50%,
        rgba(244, 114, 182, 0.4) 0%,
        transparent 50%);
    filter: blur(40px);
    animation: auroraPulse 15s ease-in-out infinite;
}

@keyframes auroraRotate1 {
    from { transform: rotate(0deg) scale(1.2); }
    to   { transform: rotate(360deg) scale(1.2); }
}
@keyframes auroraRotate2 {
    from { transform: rotate(0deg) scale(1.4); }
    to   { transform: rotate(360deg) scale(1.4); }
}
@keyframes auroraPulse {
    0%, 100% { transform: scale(1); opacity: 0.7; }
    50%      { transform: scale(1.3); opacity: 1; }
}

/* Blobs morphiques SVG */
.blob {
    position: absolute;
    width: 55%;
    height: 55%;
    pointer-events: none;
    mix-blend-mode: screen;
    will-change: transform;
}

.blob-1 {
    top: -10%;
    left: -10%;
    animation: blobFloat1 24s ease-in-out infinite;
}

.blob-2 {
    bottom: -15%;
    right: -10%;
    animation: blobFloat2 30s ease-in-out infinite;
}

@keyframes blobFloat1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33%      { transform: translate(40px, 60px) rotate(20deg); }
    66%      { transform: translate(-30px, 30px) rotate(-15deg); }
}

@keyframes blobFloat2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50%      { transform: translate(-60px, -40px) rotate(-25deg); }
}

/* Particules flottantes */
.particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    bottom: -20px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    animation: particleRise linear infinite;
    will-change: transform;
}

@keyframes particleRise {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% { opacity: 1; }
    90% { opacity: 0.8; }
    100% {
        transform: translateY(-110vh) translateX(var(--drift, 20px)) scale(0.3);
        opacity: 0;
    }
}

.particle:nth-child(3n)  { --drift: -40px; background: rgba(236, 72, 153, 0.8); box-shadow: 0 0 12px rgba(236, 72, 153, 0.6); }
.particle:nth-child(3n+1){ --drift: 60px;  background: rgba(99, 102, 241, 0.8); box-shadow: 0 0 12px rgba(99, 102, 241, 0.6); }
.particle:nth-child(5n)  { --drift: -70px; background: rgba(16, 185, 129, 0.8); box-shadow: 0 0 12px rgba(16, 185, 129, 0.6); }

/* Noise grain subtil */
.noise {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0.08;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' seed='5'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Contenu central */
.login-fun-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    text-align: center;
}

.login-fun-emoji {
    font-size: 64px;
    margin-bottom: var(--spacing-base);
    animation: wave 2s ease-in-out infinite;
    display: inline-block;
    transform-origin: 70% 70%;
}

@keyframes wave {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(14deg); }
    20%      { transform: rotate(-8deg); }
    40%      { transform: rotate(14deg); }
    50%      { transform: rotate(0deg); }
}

.login-fun-greeting {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.login-fun-quote {
    font-size: 18px;
    line-height: 1.6;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: var(--spacing-xl);
    min-height: 60px;
    font-style: italic;
}

.login-fun-author {
    font-size: 13px;
    opacity: 0.7;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Time + weather widget */
.login-fun-meta {
    position: absolute;
    top: var(--spacing-xl);
    right: var(--spacing-xl);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;
}

.login-fun-time {
    font-size: 22px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* Responsive : mobile/tablette portrait -> stack */
@media (max-width: 900px) {
    .login-page {
        flex-direction: column;
    }
    .login-form-side {
        flex: 0 0 auto;
        order: 2;
        padding: var(--spacing-xl) var(--spacing-base);
    }
    .login-fun-side {
        flex: 0 0 240px;
        order: 1;
    }
    .login-fun-greeting { font-size: 24px; }
    .login-fun-quote { font-size: 14px; min-height: auto; }
    .login-fun-emoji { font-size: 40px; }
    .login-fun-meta { top: 12px; right: 12px; padding: 8px 12px; font-size: 11px; }
    .login-fun-time { font-size: 14px; }
}
