/* ============================================
   LOGIN REACTBIT STYLE - Design Moderne & Interactif
   Style inspiré de React/Next.js moderne avec effets visuels avancés
   ============================================ */

:root {
    --reactbit-primary: #6366f1;
    --reactbit-primary-dark: #4f46e5;
    --reactbit-primary-light: #818cf8;
    --reactbit-secondary: #ec4899;
    --reactbit-accent: #f59e0b;
    --reactbit-bg-dark: #0f172a;
    --reactbit-bg-darker: #020617;
    --reactbit-text-light: #e2e8f0;
    --reactbit-text-gray: #94a3b8;
    --reactbit-border: rgba(148, 163, 184, 0.1);
    --reactbit-glow: rgba(99, 102, 241, 0.5);
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Effet de particules animées en arrière-plan */
.login-container::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(245, 158, 11, 0.1) 0%, transparent 50%);
    z-index: 0;
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { 
        opacity: 0.6; 
        transform: scale(1) translate(0, 0); 
    }
    33% { 
        opacity: 0.9; 
        transform: scale(1.2) translate(50px, -50px); 
    }
    66% { 
        opacity: 0.7; 
        transform: scale(0.9) translate(-30px, 30px); 
    }
}

/* Grille animée en arrière-plan */
.login-grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.5;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Éléments flottants avec glow */
.login-floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: floatNeon 30s ease-in-out infinite;
    opacity: 0.6;
}

.floating-element.el-1 {
    width: 500px;
    height: 500px;
    top: -250px;
    left: -250px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4), transparent);
    animation-delay: 0s;
}

.floating-element.el-2 {
    width: 450px;
    height: 450px;
    bottom: -225px;
    right: -225px;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.4), transparent);
    animation-delay: 10s;
}

.floating-element.el-3 {
    width: 400px;
    height: 400px;
    top: 50%;
    right: -200px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent);
    animation-delay: 20s;
}

@keyframes floatNeon {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg) scale(1); 
        opacity: 0.4;
    }
    33% { 
        transform: translate(100px, -100px) rotate(120deg) scale(1.2); 
        opacity: 0.7;
    }
    66% { 
        transform: translate(-60px, 60px) rotate(240deg) scale(0.8); 
        opacity: 0.5;
    }
}

/* Wrapper de la carte */
.login-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    animation: cardEntrance 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.9) rotateX(10deg);
        filter: blur(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
        filter: blur(0);
    }
}

/* Carte de login avec glassmorphism et effets 3D */
.login-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 0;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.login-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Glow effect autour de la carte */
.login-card-glow {
    position: absolute;
    inset: -3px;
    border-radius: 24px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(236, 72, 153, 0.5));
    opacity: 0;
    filter: blur(30px);
    transition: opacity 0.5s ease;
    z-index: -1;
    pointer-events: none;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.login-card:hover .login-card-glow {
    opacity: 0.8;
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* Gradient border effect animé */
.login-card-border-gradient {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 2px;
    background: linear-gradient(135deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    background-size: 200% 200%;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 0;
    pointer-events: none;
    animation: gradientShift 3s ease infinite;
}

.login-card:hover .login-card-border-gradient {
    opacity: 1;
}

/* Shine effect on hover */
.login-card::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg);
    transition: all 0.8s ease;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
}

.login-card:hover::after {
    opacity: 1;
    animation: shine 2s ease-in-out;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* En-tête de la carte */
.login-card-header {
    padding: 40px 32px 32px 32px;
    position: relative;
    text-align: center;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
    z-index: 2;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.login-brand-text {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Titre avec effet néon */
.login-main-title {
    font-size: 32px;
    font-weight: 800;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.03em;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.login-main-title .chim {
    color: #e2e8f0;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textGlow 3s ease-in-out infinite;
}

.login-main-title .couleurs {
    color: #ec4899;
    background: linear-gradient(135deg, #ec4899 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    animation: textGlow 3s ease-in-out infinite 0.5s;
    filter: drop-shadow(0 0 10px rgba(236, 72, 153, 0.6));
}

@keyframes textGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.8));
    }
}

.login-sub-title {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin: 0;
    opacity: 0.8;
}

.login-year {
    font-size: 11px;
    color: #64748b;
    margin: 0;
    font-weight: 500;
    letter-spacing: 1px;
    opacity: 0.7;
}

/* Corps de la carte */
.login-card-body {
    padding: 32px;
    background: rgba(15, 23, 42, 0.5);
    position: relative;
    z-index: 2;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Champs de formulaire avec style moderne */
.form-field {
    position: relative;
}

.field-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.field-icon {
    color: #6366f1;
    font-size: 16px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 5px rgba(99, 102, 241, 0.5));
}

.form-field:focus-within .field-icon {
    color: #818cf8;
    transform: scale(1.2) rotate(5deg);
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.8));
}

.input-container {
    position: relative;
}

.input-container input {
    width: 100%;
    padding: 16px 20px;
    font-size: 15px;
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.6);
    color: #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    backdrop-filter: blur(10px);
}

.input-container input::placeholder {
    color: #64748b;
}

.input-container input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(30, 41, 59, 0.8);
    box-shadow: 
        0 0 0 4px rgba(99, 102, 241, 0.2),
        0 8px 24px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.input-border {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: linear-gradient(90deg, #6366f1 0%, #ec4899 50%, #f59e0b 100%);
    background-size: 200% 100%;
    border-radius: 0 0 14px 14px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradientShift 2s ease infinite;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

.input-container input:focus + .input-border {
    width: 100%;
}

/* Message d'erreur avec style moderne */
.error-message {
    padding: 16px 20px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(220, 38, 38, 0.1) 100%);
    color: #fca5a5;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid rgba(239, 68, 68, 0.3);
    box-shadow: 
        0 4px 16px rgba(239, 68, 68, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    animation: errorPulse 0.6s ease;
    backdrop-filter: blur(10px);
}

@keyframes errorPulse {
    0%, 100% { 
        transform: scale(1); 
        box-shadow: 0 4px 16px rgba(239, 68, 68, 0.2);
    }
    50% { 
        transform: scale(1.02); 
        box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
    }
}

/* Bouton de soumission avec style reactbit */
.login-submit-btn {
    position: relative;
    padding: 18px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 100%;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 24px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    margin-top: 8px;
    font-family: 'Inter', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    z-index: 2;
    animation: gradientShift 3s ease infinite;
}

.login-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.login-submit-btn:hover::before {
    left: 100%;
}

.login-submit-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 12px 32px rgba(99, 102, 241, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 0 40px rgba(99, 102, 241, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    background-position: 100% 0;
}

.login-submit-btn:active {
    transform: translateY(-2px) scale(1);
}

.btn-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.btn-label {
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-arrow {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.login-submit-btn:hover .btn-arrow {
    transform: translateX(8px) scale(1.1);
}

.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 1;
}

.login-submit-btn:hover .btn-shine {
    left: 100%;
}

/* Responsive */
@media (max-width: 768px) {
    .login-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }

    .login-card {
        border-radius: 20px;
    }

    .login-card-header {
        padding: 36px 28px 28px 28px;
    }

    .login-card-body {
        padding: 28px;
    }

    .login-main-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .login-card-header {
        padding: 32px 24px 24px 24px;
    }

    .login-card-body {
        padding: 24px 20px;
    }

    .login-main-title {
        font-size: 24px;
    }

    .login-sub-title {
        font-size: 0.7rem;
    }
}

