/* Animation de fond dynamique */
body {
    position: relative;
    overflow-x: hidden;
    background: linear-gradient(-45deg, #f5f7fa, #e4e8f0, #e0e7ff, #ede9fe);
    background-size: 400% 400%;
    animation: authGradientShift 20s ease infinite;
}

/* Animation des couleurs de fond */
@keyframes authGradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* SVG Animation en fond */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Conteneur du formulaire avec effet verre + halo animé */
.auth-container {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 1rem;
    transition: all 0.3s ease;
    animation: glowPulse 6s ease-in-out infinite;
}

/* Halo subtil autour du conteneur */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
    }
}

/* Animation de fond d’ornement */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.05) 0%, transparent 20%),
        radial-gradient(circle at 90% 30%, rgba(139, 92, 246, 0.07) 0%, transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(236, 72, 153, 0.05) 0%, transparent 20%);
    z-index: -1;
}

/* Tu peux laisser le reste de ton CSS inchangé ici (formulaires, boutons, etc.) */


/* Form Styles */
.form-input {
    @apply w-full py-2 px-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 transition duration-200;
    background-color: #F9FAFC;
}

/* Submit Buttons */
.submit-btn {
    @apply transition-all duration-300 transform hover:-translate-y-1 shadow-md hover:shadow-lg;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
}

.submit-btn:hover {
    background: linear-gradient(to right, #4f46e5, #7c3aed);
}

/* Tab Buttons */
.auth-tabs {
    background: linear-gradient(to right, #eef2ff, #ede9fe);
    position: relative;
    overflow: hidden;
}

.tab-btn {
    color: #6b7280;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.tab-btn::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #6366f1, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-btn.active {
    color: #4f46e5;
    font-weight: 600;
}

.tab-btn.active::after {
    transform: scaleX(1);
}

/* Tab Content Animation */
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease forwards;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Login Buttons */
.social-btn {
    color: #4b5563;
    transition: all 0.3s ease;
}

.social-btn:hover {
    background-color: #f3f4f6;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.social-btn:nth-child(1) {
    color: #1877f2;
}

.social-btn:nth-child(2) {
    color: #db4437;
}

.social-btn:nth-child(3) {
    color: #333;
}

/* Password Strength Indicator */
.password-strength span {
    transition: all 0.3s ease;
}

.password-strength.weak span:nth-child(1) {
    background-color: #ef4444;
}

.password-strength.medium span:nth-child(1),
.password-strength.medium span:nth-child(2) {
    background-color: #f59e0b;
}

.password-strength.strong span:nth-child(1),
.password-strength.strong span:nth-child(2),
.password-strength.strong span:nth-child(3) {
    background-color: #10b981;
}

.password-strength.very-strong span {
    background-color: #10b981;
}

/* Mobile App Buttons */
.app-store-btn,
.google-play-btn {
    transition: all 0.3s ease;
}

.app-store-btn:hover,
.google-play-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    background-color: #1a1a1a;
}

/* Form Focus Animations */
.form-group {
    position: relative;
}

.form-group label {
    transition: all 0.3s ease;
}

.form-input:focus + label {
    color: #4f46e5;
}

/* Show Password Toggle */
.toggle-password {
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-password:hover {
    color: #4f46e5;
}

/* Form Checkbox Styling */
.form-checkbox {
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

/* Responsive Styles */
@media (max-width: 640px) {
    .container {
        padding: 1rem;
    }
}

/* Loading Animation for Submit Button */
.submitting .submit-btn {
    position: relative;
    color: transparent;
}

.submitting .submit-btn::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Animation for validation error messages */
.error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    animation: shakeX 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}