* {
    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;
}
  .card {
      background: var(--surface);
      border-radius: 1rem;
      padding: 2rem;
      box-shadow: var(--shadow-lg);
      margin: 2rem 0;
      border: 1px solid var(--border);
      backdrop-filter: blur(10px);
    }
     /* Features Section */
    .features-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 2rem;
      margin: 3rem 0;
    }

    .feature-card{
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(10px);
      border-radius: 1rem;
      padding: 2rem;
      text-align: center;
      border: 1px solid rgba(255, 255, 255, 0.2);
      transition: transform 0.3s ease;
      text-decoration: none;
      list-style: none;
      
    }
    .feature-card, li{
          text-decoration: none;
      list-style: none;
    }

    .feature-card:hover {
      transform: translateY(-5px);
    }

    .feature-icon {
      width: 4rem;
      height: 4rem;
      background: var(--gradient);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 1rem;
      color: white;
    }

    .feature-card h3 {
      color: white;
      margin-bottom: 1rem;
      font-size: 1.5rem;
    }

    .feature-card p {
      color: rgba(255, 255, 255, 0.8);
    }


    .card h2 {
      color: var(--primary);
      margin-bottom: 1.5rem;
      font-size: 2rem;
      font-weight: 700;
    }

/* 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);
}
.logo {
    font-size: 2rem;
    font-weight: bold;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 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: 35px;
    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 Layout */
main {
    padding: 2rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* Cards */
.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-gradient);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.card:hover::before {
    opacity: 0.05;
}

.card h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Form Styles */
.form-grid {
    display: grid;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.3);
    transform: scale(1.02);
}

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn {
    background: var(--primary-gradient);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    font-weight: 600;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-card {
    background: var(--dark-light);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--glass);
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #4facfe;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Operations Container */
.operations-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.operation-column h3 {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--dark-light);
    border-radius: 10px;
    text-align: center;
    border: 1px solid var(--glass-border);
}

#tabDepense,
#tabRevenu {
    background: var(--dark-light);
    border-radius: 15px;
    min-height: 200px;
    border: 1px solid var(--glass-border);
}

#listeDepense,
#listeRevenu {
    list-style: none;
    padding: 1rem;
}

#listeDepense li,
#listeRevenu li {
    background: var(--glass);
    margin-bottom: 0.5rem;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

#listeDepense li:hover,
#listeRevenu li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.15);
}

.empty-state {
    text-align: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-style: italic !important;
    padding: 3rem 1rem !important;
    display: block !important;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.delete-btn {
    cursor: pointer;
    padding: 0.3rem 0.6rem;
    background: var(--secondary-gradient);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-left: 1rem;
}

.delete-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 5px 15px rgba(245, 87, 108, 0.4);
}

/* Chart Containers */
.chart-container {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.chart-container h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    background: var(--warning-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chart-wrapper {
    position: relative;
    height: 300px;
    background: var(--dark-light);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
}
/* 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);
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}




/* Animated Background */
.bg-animated {
    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;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Shapes */
.bg-animated::before,
.bg-animated::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

.bg-animated::before {
    top: 20%;
    left: 10%;
    width: 80px;
    height: 80px;
    background: var(--success-gradient);
    animation-delay: 0s;
}

.bg-animated::after {
    top: 60%;
    right: 10%;
    width: 100px;
    height: 100px;
    background: var(--warning-gradient);
    border-radius: 20px;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* Fade-in Animation */
.fade-in {
    animation: slideUp 0.8s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom 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) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    nav a {
        padding: 0.3rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .grid-2 {
        grid-template-columns: 1fr;
        max-width: 100%;
    }
    .grid-2 {
        
        grid-template-columns: 1fr;
       
    }
    .grid-2 {
        width: 100%;
    }
    .operations-container {
        grid-template-columns: 1fr;
    }
    .chart-container ,.chart-wrapper {
        max-width: 100%;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .footer-buttons .btn {
        width: 100%;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    .chart-container {
    width: 100%;
    }
    .section-title ,h2 {
        max-width: 100%;
       
        
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Additional hover effects */
.stat-card:hover .stat-value {
    color: #43e97b;
    transform: scale(1.1);
}

.form-group input:valid {
    border-color: #43e97b;
}

/* Pulse animation for important elements */
@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(79, 172, 254, 0); }
    100% { box-shadow: 0 0 0 0 rgba(79, 172, 254, 0); }
}

.btn:hover {
    animation: pulse 1.5s infinite;
}

/* About Section */
.about-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin: 3rem 0;
    padding: 3rem 2rem;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--warning-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-item {
    background: var(--dark-light);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    text-align: center;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-item h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #4facfe;
}

.feature-item p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* Contact Section */
.contact-section {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin: 3rem 0;
    padding: 3rem 2rem;
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--dark-light);
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
    background: var(--glass);
}

.contact-item i {
    font-size: 1.5rem;
    margin-right: 1rem;
    background: var(--secondary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.contact-item div h4 {
    margin-bottom: 0.3rem;
    color: #4facfe;
}

.contact-item div p {
    opacity: 0.8;
    margin: 0;
}

/* Contact Form */
.contact-form {
    background: var(--dark-light);
    border-radius: 15px;
    padding: 2rem;
    border: 1px solid var(--glass-border);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.contact-form textarea:focus {
    outline: none;
    border-color: #4facfe;
    box-shadow: 0 0 15px rgba(79, 172, 254, 0.3);
}

.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.btn-contact {
    background: var(--warning-gradient);
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
    font-weight: 600;
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s infinite;
}

.success-message {
    background: var(--warning-gradient);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    margin-top: 1rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.success-message.show {
    opacity: 1;
    transform: translateY(0);
}
    
@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.1); }
}

/* 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);
}