* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-gradient: linear-gradient(135deg, #2146ee 0%, #503768 100%);
    --secondary-gradient: linear-gradient(135deg, #f7000c 0%, #c5001a 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --warning-gradient: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --dark: #1a1a2e;
    --dark-light: #16213e;
    --text-light: #e94560;
    --glass: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark);
    color: white;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* Background Pattern - Animation similaire à l'index */
.background-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background: linear-gradient(45deg, #667eea, #3b0175, #8f0f16, #6d0b18);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

.background-pattern::before,
.background-pattern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.background-pattern::before {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--success-gradient);
    animation-delay: 0s;
}

.background-pattern::after {
    top: 60%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: var(--warning-gradient);
    border-radius: 20px;
    animation-delay: 2s;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Language Switch */
.lang-switch {
    position: fixed;
    z-index: 1000;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.lang-btn:hover,
.lang-btn[aria-pressed="true"] {
    background: var(--primary-gradient);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 70, 238, 0.4);
}

/* Header */
header {
    text-align: center;
    padding: 4rem 2rem 2rem;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideUp 1s ease;
}

header h2 {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    animation: slideUp 1s ease 0.2s both;
}

/* Navigation */
nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
    animation: slideUp 1s ease 0.4s both;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(33, 70, 238, 0.4);
}

nav a::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.5s ease;
}

nav a:hover::before {
    left: 100%;
}

/* Main Content */
main {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    padding: 2rem;
}

/* Form Section */
.form-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 3rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    overflow: hidden;
    animation: slideUp 1s ease 0.6s both;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0.03;
    z-index: -1;
}

.form-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Floating Elements */
.floating-elements::before,
.floating-elements::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: var(--warning-gradient);
    opacity: 0.1;
    animation: floatSlow 8s ease-in-out infinite;
}

.floating-elements::before {
    top: 10%;
    right: 10%;
    width: 60px;
    height: 60px;
    animation-delay: 0s;
}

.floating-elements::after {
    bottom: 20%;
    left: 15%;
    width: 40px;
    height: 40px;
    animation-delay: 4s;
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

/* Form Styles */
#credit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#credit-form input {
    padding: 1.2rem;
    background: var(--glass);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    outline: none;
}

#credit-form input:focus {
    border-color: #4facfe;
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.3);
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.15);
}

#credit-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#credit-form input:valid {
    border-color: #43e97b;
}

#credit-form button {
    background: var(--primary-gradient);
    border: none;
    padding: 1.5rem;
    border-radius: 15px;
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

#credit-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(33, 70, 238, 0.4);
    animation: pulse 1.5s infinite;
}

#credit-form button:active {
    transform: translateY(-1px);
}

#credit-form button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s ease;
}

#credit-form button:active::before {
    width: 300px;
    height: 300px;
}

/* Results Section */
#resultatCredit {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--dark-light);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.3s ease;
}

#resultatCredit:hover {
    background: var(--glass);
    transform: translateY(-2px);
}

#resultatCredit p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

#resultatCredit strong {
    color: #4facfe;
    font-size: 1.4rem;
    font-weight: 700;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Footer */
footer {
    background: var(--dark);
    border-top: 1px solid var(--glass-border);
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.footer-links a:hover {
    background: var(--glass);
    color: #4facfe;
    transform: translateY(-2px);
}

footer button {
    background: var(--warning-gradient);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0.5rem;
    font-weight: 600;
}

footer button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Cookie Banner */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    z-index: 1000;
    border-top: 1px solid var(--glass-border);
    display: none;
}

#accept-cookies {
    margin-left: 1rem;
    padding: 0.8rem 1.5rem;
    border: none;
    background: var(--warning-gradient);
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

#accept-cookies:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 233, 123, 0.4);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(79, 172, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0); }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-gradient);
}

/* Responsive Design */
@media (max-width: 768px) {
    .lang-switch {
        top: 0.5rem;
        left: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    header {
        padding: 3rem 1rem 2rem;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    header h2 {
        font-size: 1rem;
    }
    
    nav {
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
    
    main {
        padding: 1rem;
        min-height: 60vh;
    }
    
    .form-section {
        padding: 2rem;
        margin-top: 1rem;
    }
    
    .form-section h2 {
        font-size: 2rem;
    }
    
    #credit-form input {
        padding: 1rem;
        font-size: 1rem;
    }
    
    #credit-form button {
        padding: 1.2rem;
        font-size: 1.1rem;
    }
    
    #resultatCredit {
        padding: 1.5rem;
    }
    
    #resultatCredit p {
        font-size: 1.1rem;
    }
    
    #resultatCredit strong {
        font-size: 1.2rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    footer button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        margin: 0.3rem;
    }
    
    .floating-elements::before,
    .floating-elements::after {
        display: none;
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .form-section h2 {
        font-size: 1.8rem;
    }
    
    nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.75rem;
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus states pour l'accessibilité */
button:focus,
input:focus,
a:focus {
    outline: 2px solid #4facfe;
    outline-offset: 2px;
}

/* Hover effects additionnels */
.form-section:hover {
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.4);
}

/* Animation pour les résultats */
#resultatCredit.updated {
    animation: resultPulse 0.6s ease;
}

@keyframes resultPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}