* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #09b81e;
    --secondary: #63b820;
    --dark: #1a1a1a;
    --light: #f5f5f5;
    --text: #333;
    --border: #ddd;
    --accent: #ffaa00;
    --builder: #FF6B6B;
    --miner: #4ECDC4;
    --merchant: #FFD93D;
    --farmer: #6BCB77;
    --engineer: #9D84B7;
    --enchanter: #A29BFE;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: var(--dark);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
}

.logo img {
    width: 32px;
    height: 32px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.btn-login {
    background: var(--primary);
    color: white !important;
    padding: 0.5rem 1.5rem !important;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--secondary);
    border-bottom: none !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 120px 20px;
    text-align: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Zones Section */
.zones {
    padding: 80px 20px;
    background: white;
}

.zones h2,
.residents h2,
.projets h2,
.stats h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
    text-align: center;
}

.zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.zone-card {
    background: white;
    border: 2px solid var(--primary);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.zone-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-color: var(--secondary);
}

.zone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.zone-card h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.zone-card p {
    color: #666;
    margin-bottom: 1rem;
}

.zone-stats {
    display: inline-block;
    background: var(--light);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Residents Section */
.residents {
    padding: 80px 20px;
    background: var(--light);
}

.residents-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-box {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 4px solid var(--primary);
}

.stat-box h3 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-box p {
    color: #666;
    font-size: 1rem;
}

/* Leaderboard */
.leaderboard {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.player-rank {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.player-rank:hover {
    background: var(--light);
}

.player-rank:last-child {
    border-bottom: none;
}

.rank {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 1.5rem;
}

.player-rank .name {
    flex: 1;
    font-weight: 500;
    color: var(--text);
}

.player-rank .score {
    color: var(--secondary);
    font-weight: bold;
}

/* Projets Section */
.projets {
    padding: 80px 20px;
    background: white;
}

.projets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.projet-card {
    background: var(--light);
    border-left: 5px solid var(--primary);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.projet-card:hover {
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.projet-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.progress-bar {
    background: white;
    height: 10px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.progress {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    height: 100%;
    transition: width 0.3s;
}

.projet-card > p {
    color: var(--text);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.projet-card .desc {
    color: #666;
    font-weight: normal;
    font-size: 0.95rem;
}

/* Statistiques Section */
.stats {
    padding: 80px 20px;
    background: linear-gradient(135deg, rgba(9, 184, 30, 0.1), rgba(99, 184, 32, 0.1));
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-item {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--primary);
}

.stat-item h4 {
    color: #666;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: bold;
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 20px;
    text-align: center;
}

.footer .container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1rem;
}

.footer-links a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .zones h2,
    .residents h2,
    .projets h2,
    .stats h2 {
        font-size: 2rem;
    }

    .zones-grid,
    .projets-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        gap: 0.5rem;
    }

    .logo h1 {
        display: none;
    }

    .leaderboard {
        max-height: 400px;
        overflow-y: auto;
    }

    .profiles-grid {
        grid-template-columns: 1fr;
    }

    .citizen-header {
        flex-direction: column;
    }

    .citizen-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== LOGIN SCREEN ===== */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f3460 0%, #09b81e 50%, #1a472a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    min-height: 100vh;
}

.login-screen.hidden {
    display: none;
}

.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
    gap: 4rem;
    position: relative;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.login-header h1 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 0.3rem;
}

.login-header p {
    color: #666;
    font-size: 0.95rem;
    letter-spacing: 1px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.form-group label {
    color: var(--dark);
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.label-icon {
    font-size: 1.1rem;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select {
    padding: 0.9rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(9, 184, 30, 0.1);
}

.form-group input::placeholder {
    color: #bbb;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    transition: transform 0.3s;
}

.toggle-password:hover {
    transform: scale(1.2);
}

.form-group.checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.5rem;
}

.form-group.checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.form-group.checkbox label {
    margin: 0;
    font-weight: 500;
    cursor: pointer;
    color: #666;
}

.btn-login-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(9, 184, 30, 0.3);
}

.btn-login-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(9, 184, 30, 0.4);
}

.btn-login-submit:active {
    transform: translateY(0);
}

.btn-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.login-info {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.8rem;
}

.login-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-info a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.login-warning {
    color: #999;
    font-size: 0.75rem;
    font-style: italic;
}

/* Login Decorations */
.login-decorations {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    position: absolute;
    right: 3rem;
    animation: fadeInLeft 0.8s ease-out 0.3s backwards;
}

@keyframes fadeInLeft {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.decoration-box {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    backdrop-filter: blur(10px);
    transition: all 0.3s;
    cursor: default;
}

.decoration-box:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

/* Error and Success Messages */
.form-error {
    color: #e74c3c;
    font-size: 0.85rem;
    padding: 0.8rem;
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    border-radius: 5px;
    display: none;
}

.form-error.show {
    display: block;
    animation: shake 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

/* Success Message */
.login-success {
    color: var(--primary);
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 1rem;
    background: rgba(9, 184, 30, 0.1);
    border-radius: 10px;
    display: none;
}

.login-success.show {
    display: block;
    animation: slideInDown 0.3s ease-out;
}

@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Login */
@media (max-width: 1024px) {
    .login-decorations {
        display: none;
    }
    
    .login-container {
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .login-box {
        padding: 2rem;
        max-width: 100%;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .login-logo {
        width: 40px;
        height: 40px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"],
    .form-group select {
        padding: 0.8rem;
        font-size: 16px;
    }
}
.profile-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(9, 184, 30, 0.95), rgba(99, 184, 32, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.5s ease-in;
}

.profile-modal.hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.profile-modal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem 2rem;
    max-width: 1000px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.profile-modal-content h1 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.profile-modal-content > p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2.5rem;
}

.profiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.profile-card {
    background: linear-gradient(135deg, #f5f5f5, white);
    border: 2px solid var(--border);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(9, 184, 30, 0.1), rgba(99, 184, 32, 0.1));
    transition: top 0.3s;
}

.profile-card:hover::before {
    top: 0;
}

.profile-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px rgba(9, 184, 30, 0.2);
}

.profile-emoji {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    position: relative;
    z-index: 1;
}

.profile-card h3 {
    font-size: 1.4rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 1;
}

.profile-card > p {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.profile-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.profile-stats span {
    background: var(--light);
    padding: 0.5rem;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 500;
}

.profile-note {
    color: #999;
    font-size: 0.9rem;
    margin-top: 1rem;
}

/* ===== CITIZEN SPACE ===== */
.citizen-space {
    padding: 80px 20px;
    background: white;
    display: none;
}

.citizen-space.active {
    display: block;
}

.citizen-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, rgba(9, 184, 30, 0.05), rgba(99, 184, 32, 0.05));
    padding: 2.5rem;
    border-radius: 15px;
    align-items: center;
}

.citizen-profile {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex: 1;
}

.citizen-avatar {
    font-size: 4rem;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 3px solid var(--primary);
}

.citizen-info h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 0.3rem;
}

.citizen-info p {
    color: #666;
    font-size: 1rem;
    margin-bottom: 1rem;
}

.citizen-level {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.level-badge {
    background: var(--primary);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.level-progress {
    width: 150px;
    height: 8px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
}

.level-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s;
}

.citizen-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    flex: 1;
}

.quick-stat {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-top: 3px solid var(--primary);
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Dashboard Sections */
.citizen-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.dashboard-section {
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.dashboard-section:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(9, 184, 30, 0.1);
}

.dashboard-section h3 {
    color: var(--dark);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

/* Tasks List */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light);
    border-radius: 8px;
    border-left: 3px solid var(--border);
    transition: all 0.3s;
}

.task-item.completed {
    background: rgba(9, 184, 30, 0.1);
    border-left-color: var(--primary);
}

.task-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.task-item span:nth-child(2) {
    flex: 1;
    color: var(--text);
}

.task-item.completed span:nth-child(2) {
    text-decoration: line-through;
    color: #999;
}

.task-reward {
    background: var(--primary);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

/* Projects List */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-item {
    padding: 1.2rem;
    background: var(--light);
    border-radius: 10px;
    border-left: 4px solid var(--primary);
}

.project-title {
    font-weight: bold;
    color: var(--dark);
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.project-progress {
    background: white;
    height: 8px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.5rem;
    border: 1px solid var(--border);
}

.project-progress .progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.project-info {
    font-size: 0.8rem;
    color: #666;
}

/* Rewards Grid */
.rewards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--light), white);
    border: 2px solid var(--primary);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s;
    cursor: default;
}

.badge:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(9, 184, 30, 0.15);
}

.badge-emoji {
    font-size: 2rem;
    display: block;
}

.badge-name {
    font-size: 0.8rem;
    color: var(--text);
    font-weight: 600;
}

/* Hero Section Updates */
.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-profile {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-profile:hover {
    background: var(--secondary);
    transform: translateY(-1px);
}

.nav-link {
    cursor: pointer;
}

/* ===== MESSAGERIE SECTION ===== */
.messages-section {
    padding: 80px 20px;
    background: white;
}

.messages-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
    text-align: center;
}

.messages-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    height: 600px;
    border: 1px solid var(--border);
}

/* Conversations Panel */
.conversations-panel {
    background: var(--light);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.conversations-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversations-header h3 {
    margin: 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.btn-new-message {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
}

.btn-new-message:hover {
    background: var(--secondary);
    transform: scale(1.1);
}

.conversations-list {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    padding: 1rem;
    border-bottom: 1px solid white;
    display: flex;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.conversation-item:hover {
    background: white;
}

.conversation-item.active {
    background: white;
    border-left: 4px solid var(--primary);
}

.conversation-avatar {
    font-size: 2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-info h4 {
    margin: 0 0 0.3rem 0;
    font-size: 0.95rem;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.last-message {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.message-time {
    font-size: 0.7rem;
    color: #bbb;
}

.unread-badge {
    background: var(--primary);
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    flex-shrink: 0;
}

/* Chat Panel */
.chat-panel {
    display: flex;
    flex-direction: column;
    background: white;
}

.chat-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(9, 184, 30, 0.05), rgba(99, 184, 32, 0.05));
}

.chat-user-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.chat-avatar {
    font-size: 2rem;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.chat-user-info h3 {
    margin: 0;
    color: var(--dark);
    font-size: 1.1rem;
}

.chat-user-info p {
    margin: 0;
    font-size: 0.8rem;
    color: var(--primary);
}

.btn-close-chat {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: none;
}

/* Messages List */
.messages-list {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message-date {
    text-align: center;
    color: #bbb;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.message {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.own {
    justify-content: flex-end;
}

.message-content {
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    max-width: 70%;
    word-wrap: break-word;
    font-size: 0.95rem;
    line-height: 1.4;
}

.message.own .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 0;
}

.message.other .message-content {
    background: var(--light);
    color: var(--text);
    border-bottom-left-radius: 0;
}

.message-time {
    font-size: 0.75rem;
    color: #bbb;
    display: none;
}

.message:hover .message-time {
    display: block;
}

/* Message Input */
.message-input-area {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 0.8rem;
    background: var(--light);
}

.message-input {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s;
}

.message-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(9, 184, 30, 0.1);
}

.btn-send-message {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-send-message:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

.btn-send-message:active {
    transform: translateY(0);
}

/* Notification Badge */
.notification-badge {
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.3rem;
}

.notification-badge.hidden {
    display: none;
}

/* ===== DOCUMENTS SECTION ===== */
.documents-section {
    padding: 80px 20px;
    background: var(--light);
}

.documents-section h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
    text-align: center;
}

.documents-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Sidebar */
.documents-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.documents-filter,
.documents-stats {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.documents-filter h3,
.documents-stats h3 {
    margin: 0 0 1.2rem 0;
    color: var(--dark);
    font-size: 1.1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary);
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.filter-btn {
    padding: 0.8rem 1.2rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
    transition: all 0.3s;
    text-align: left;
}

.filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.documents-stats .stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    font-size: 0.95rem;
    color: #666;
}

.documents-stats strong {
    color: var(--primary);
    font-size: 1.2rem;
}

.storage-bar {
    margin-top: 1rem;
    height: 8px;
    background: var(--light);
    border-radius: 10px;
    overflow: hidden;
}

.storage-used {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.5s;
}

/* Main Documents Area */
.documents-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.documents-toolbar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(9, 184, 30, 0.1);
}

.btn-upload {
    padding: 0.9rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.btn-upload:hover {
    background: var(--secondary);
    transform: translateY(-2px);
}

/* Documents Grid */
.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.document-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.document-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.document-icon {
    font-size: 2.5rem;
    text-align: center;
}

.document-card h4 {
    margin: 0;
    color: var(--dark);
    font-size: 1.05rem;
    word-break: break-word;
}

.doc-meta {
    margin: 0;
    font-size: 0.8rem;
    color: #999;
}

.doc-description {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.doc-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    flex: 1;
    padding: 0.6rem;
    background: var(--light);
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.doc-info {
    margin: 0;
    font-size: 0.75rem;
    color: #bbb;
    padding-top: 0.8rem;
    border-top: 1px solid var(--light);
}

/* Responsive Messages & Documents */
@media (max-width: 1024px) {
    .messages-container {
        grid-template-columns: 250px 1fr;
    }

    .documents-wrapper {
        grid-template-columns: 200px 1fr;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .messages-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    .conversations-panel {
        max-height: 200px;
    }

    .btn-close-chat {
        display: block;
    }

    .documents-wrapper {
        grid-template-columns: 1fr;
    }

    .documents-sidebar {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .documents-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .message-content {
        max-width: 85%;
    }

    .documents-toolbar {
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .btn-upload {
        width: 100%;
    }
}
