:root {
    --primary: #2c3e50;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --warning: #f39c12;
    --purple: #9b59b6;
    --global-bg: #f5f7fa;
}

body {
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--global-bg);
    color: var(--dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: linear-gradient(135deg, var(--primary), #1a252f);
    color: white;
    padding: 25px 0;
    text-align: center;
    border-radius: 5px 5px 0 0;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--success), var(--secondary), var(--warning));
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
}

h1 {
    margin: 0;
    font-size: 2.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-style: italic;
    opacity: 0.9;
    margin-top: 10px;
    font-size: 1.1rem;
}

/* Nouveau menu de navigation */
.main-nav {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.3s;
    gap: 8px;
}

.main-nav a:hover {
    background-color: #f5f5f5;
    color: var(--secondary);
}

.main-nav a.active {
    background-color: var(--secondary);
    color: white;
}

/* Menu déroulant */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0 0 8px 8px;
    z-index: 1000;
    display: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* Contenu des instructions */
.language-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.lang-tab {
    padding: 10px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    border-bottom: 3px solid transparent;
}

.lang-tab.active {
    border-bottom-color: var(--secondary);
    color: var(--secondary);
}

.instruction-content {
    display: none;
}

.instruction-content.active {
    display: block;
}

.example-box {
    background: #f9f9f9;
    border-left: 4px solid var(--secondary);
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.example-box h6 {
    margin-top: 0;
    color: var(--secondary);
}

/* Styles pour les objectifs d'épargne */
.savings-goal {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.savings-goal h4 {
    margin-top: 0;
    color: var(--primary);
}

.savings-goal-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid var(--success);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    animation: slideIn 0.3s ease;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification button {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    margin-left: 10px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Case à cocher personnalisée */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    gap: 10px;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

/* Footer amélioré */
footer {
    background-color: var(--primary);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
    text-align: center;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    color: white;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    padding: 5px 0;
}

.footer-links a:hover {
    color: white;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--secondary);
}

.copyright {
    margin-top: 20px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Tableau des transactions */
#transactions-list {
    margin-top: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-section {
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }
}

@media (max-width: 480px) {
    .main-nav a {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    font-size: 1.2rem;
}

.financial-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.summary-item:hover {
    transform: scale(1.03);
}

.income {
    background-color: rgba(39, 174, 96, 0.1);
    border-left: 4px solid var(--success);
}

.expenses {
    background-color: rgba(231, 76, 60, 0.1);
    border-left: 4px solid var(--danger);
}

.assets {
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 4px solid var(--secondary);
}

.liabilities {
    background-color: rgba(243, 156, 18, 0.1);
    border-left: 4px solid var(--warning);
}

.summary-value {
    font-size: 1.6rem;
    font-weight: bold;
    margin: 10px 0;
}

.progress-container {
    margin-top: 20px;
}

.progress-bar {
    height: 30px;
    background-color: #eee;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--success), #2ecc71);
    transition: width 0.5s ease;
}

.progress-danger .progress-fill {
    background: linear-gradient(90deg, var(--danger), #e74c3c);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #666;
}

.form-section {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background-color: var(--success);
}

.btn-success:hover {
    background-color: #219653;
}

.btn-danger {
    background-color: var(--danger);
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-warning {
    background-color: var(--warning);
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-purple {
    background-color: var(--purple);
}

.btn-purple:hover {
    background-color: #8e44ad;
}

.btn {
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.table-wrapper {
    overflow-x: auto;
    width: 100%;
    margin-top: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th,
td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: var(--primary);
    color: white;
    font-weight: 600;
    position: sticky;
    top: 0;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    display: block;
}

.currency {
    font-weight: bold;
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

.quadrant-indicator {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.quadrant {
    width: 120px;
    height: 120px;
    border: 3px solid var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    position: relative;
    transition: all 0.3s;
}

.quadrant.active {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.quadrant.E {
    background-color: rgba(52, 152, 219, 0.2);
    border-color: var(--secondary);
}

.quadrant.S {
    background-color: rgba(243, 156, 18, 0.2);
    border-color: var(--warning);
}

.quadrant.B {
    background-color: rgba(39, 174, 96, 0.2);
    border-color: var(--success);
}

.quadrant.I {
    background-color: rgba(155, 89, 182, 0.2);
    border-color: var(--purple);
}

.quadrant-label {
    position: absolute;
    font-size: 0.8rem;
    font-weight: normal;
}

.top-label {
    top: -25px;
}

.bottom-label {
    bottom: -25px;
}

.left-label {
    left: -70px;
    transform: rotate(-90deg);
    width: 120px;
    text-align: center;
}

.right-label {
    right: -70px;
    transform: rotate(90deg);
    width: 120px;
    text-align: center;
}

.donation-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 350px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.5s ease;
    border-top: 5px solid var(--success);
}

.donation-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.donation-banner h3 {
    margin-top: 0;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.donation-options {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.donation-option {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.donation-option:hover {
    border-color: var(--secondary);
    background-color: #f5f9fd;
}

.donation-option.selected {
    border-color: var(--success);
    background-color: rgba(39, 174, 96, 0.1);
}

.donation-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}

.close-donation {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.close-donation:hover {
    color: var(--danger);
}

.testimonial-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--secondary);
}

.floating-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: var(--success);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1002;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    color: var(--danger);
}

.book-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    margin-bottom: 20px;
}

.book-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.book-image {
    height: 200px;
    background-color: #eee;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
}

.book-info {
    padding: 15px;
}

.book-title {
    font-weight: bold;
    margin: 0 0 5px 0;
    color: var(--primary);
}

.book-author {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Language and currency selector */
.top-controls {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.currency-selector,
.language-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-selector select,
.language-selector select {
    padding: 8px 12px;
    border-radius: 4px;
    background-color: white;
    border: 1px solid #ddd;
}

/* Improved chart containers */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.chart-title {
    text-align: center;
    margin-bottom: 15px;
    color: var(--primary);
    font-weight: 600;
}

/* Dashboard improvements */
.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--secondary);
}

.summary-card h3 {
    margin-top: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

/* Auth forms */
.auth-form {
    max-width: 500px;
    margin: 0 auto;
}

.auth-tabs {
    display: flex;
    margin-bottom: 20px;
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 15px;
    cursor: pointer;
    background-color: #f5f5f5;
    border-bottom: 3px solid transparent;
}

.auth-tab.active {
    background-color: white;
    border-bottom-color: var(--secondary);
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 42px;
    cursor: pointer;
    color: #777;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background-color: var(--secondary);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1003;
}

/* Chat container for Coach NOX */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 500px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
}

.user-message .message-content {
    background-color: var(--secondary);
    color: white;
}

.bot-message .message-content {
    background-color: white;
    border: 1px solid #ddd;
}

.chat-input {
    display: flex;
    padding: 10px;
    background-color: white;
    border-top: 1px solid #ddd;
}

.chat-input input {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 20px;
    margin-right: 10px;
}

.chat-input button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}




@media (max-width: 768px) {

    .dashboard {
        grid-template-columns: 1fr;
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }

    .main-nav ul {
        display: none;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 80%;
        height: 100%;
        background-color: white;
        z-index: 1002;
        padding-top: 60px;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }

    .main-nav ul.active {
        display: flex;
    }

    .main-nav a {
        padding: 15px 20px;
        border-bottom: 1px solid #eee;
        border-left: 4px solid transparent;
    }

    .main-nav a.active {
        border-left-color: var(--secondary);
        border-bottom-color: #eee;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .quadrant-indicator {
        flex-direction: column;
        align-items: center;
    }

    .quadrant-label {
        position: static;
        transform: none;
        width: auto;
        margin: 5px 0;
    }

    .left-label,
    .right-label {
        transform: none;
    }

    .top-controls {
        flex-direction: column;
        align-items: flex-end;
    }

    .donation-banner {
        max-width: 90%;
        right: 5%;
        left: 5%;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }

    .footer-links a {
        text-align: center;
    }
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    text-align: center;
    margin-bottom: 10px;
}

.footer-bottom-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 445px) {
    #recent-transactions {
        font-size: 0.8rem;
    }
}

@media (max-width: 1035px) {
    #history-table {
        font-size: 0.8rem;
    }
}

@media (max-width: 460px) {
    #entry button {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Confort de lecture des charts */
.chart-container canvas {
    max-height: 360px;
}

@media (max-width: 480px) {
    .chart-container canvas {
        max-height: 300px;
    }

    .book-grid {
        grid-template-columns: 1fr;
    }

    .chat-container {
        height: 400px;
    }

    .message-content {
        max-width: 85%;
    }
}

/* Mobile menu improvements */
.mobile-menu-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: white;
    z-index: 1000;
    overflow-x: hidden;
    transition: 0.3s;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
}

.mobile-menu-container.active {
    width: 50%;
}

.mobile-menu-header {
    padding: 20px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu-content {
    padding: 20px;
}

.mobile-menu-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-content li {
    margin-bottom: 15px;
}

.mobile-menu-content a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    padding: 10px;
    border-radius: 5px;
    transition: background 0.3s;
}

.mobile-menu-content a:hover {
    background: #f5f5f5;
}

.mobile-menu-content a.active {
    background: var(--secondary);
    color: white;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Mode sombre corrigé */
body.dark-mode {
    --global-bg: #1a1a1a;
    --primary: #000000;
    --secondary: #3498db;
    --success: #27ae60;
    --danger: #e74c3c;
    --light: #0a0c0f;
    --dark: #4098fdd2;
    --warning: #f39c12;
    --purple: #9b59b6;
    background-color: var(--global-bg);
    color: var(--dark);
}

body.dark-mode .card {
    background-color: #2c3e50;
    color: var(--dark);
    border: 1px solid #34495e;
}

body.dark-mode .main-nav {
    background: #2c3e50;
    border: 1px solid #34495e;
}

body.dark-mode .main-nav a {
    color: var(--dark);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #34495e;
    color: var(--dark);
    border-color: #4a6572;
}

body.dark-mode table {
    color: var(--dark);
    background-color: #2c3e50;
}

body.dark-mode th {
    background-color: var(--primary);
    color: var(--dark);
}

body.dark-mode tr:nth-child(even) {
    background-color: #34495e;
}

body.dark-mode tr:hover {
    background-color: #4a6572;
}

body.dark-mode .dropdown-menu {
    background-color: #2c3e50;
    border: 1px solid #34495e;
}

body.dark-mode .dropdown-menu a {
    color: var(--dark);
    border-bottom-color: #34495e;
}

body.dark-mode .notification {
    background-color: #2c3e50;
    color: var(--dark);
}

body.dark-mode .chat-messages {
    background-color: #2c3e50;
}

body.dark-mode .bot-message .message-content {
    background-color: #34495e;
    border-color: #4a6572;
    color: var(--dark);
}

/* Toggle du mode sombre corrigé */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #3498db;
}

input:checked+.slider:before {
    transform: translateX(26px);
}


.mobile-menu-container {
    position: fixed;
    top: 0;
    left: -100%;
    width: 70%;
    height: 100%;
    background: #34495e;
    transition: left 0.3s ease;
    z-index: 2000;
}

.mobile-menu-container.active {
    left: 0;
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    z-index: 1500;
}

.mobile-menu-overlay.active {
    display: block;
}

/* Styles pour la salutation */
.welcome-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
}

.welcome-message::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" opacity="0.1"><circle cx="50" cy="50" r="2" fill="white"/></svg>') repeat;
}

.welcome-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.welcome-icon {
    font-size: 3rem;
    animation: bounce 2s infinite;
}

.welcome-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.welcome-text h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
}

.user-name-highlight {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Styles pour la grille de badges */
.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px;
}

.badge-item {
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    color: white;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.badge-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.badge-item:hover::before {
    transform: translateX(100%);
}

.badge-item i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.badge-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.badge-item p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .welcome-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .welcome-icon {
        font-size: 2.5rem;
    }
    
    .welcome-text h3 {
        font-size: 1.3rem;
    }
    
    .welcome-text h4 {
        font-size: 1rem;
    }
    
    .badges-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .welcome-message {
        padding: 20px;
    }
    
    .badges-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 10px;
    }
    
    .badge-item {
        padding: 15px;
    }
    
    .badge-item i {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .badge-item h4 {
        font-size: 1rem;
    }
}