* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root,
[data-theme="dark"] {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #0077b5;
    --text-color: #ecf0f1;
    --hover-color: #34495e;
    --card-bg: #34495e;
    --gradient-start: #1a1a2e;
    --gradient-end: #16213e;
    --navbar-bg: rgba(44, 62, 80, 0.95);
    --footer-bg: rgba(44, 62, 80, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-border: rgba(52, 152, 219, 0.1);
    --description-color: #bdc3c7;
}


/* Mode clair */

[data-theme="light"] {
    --primary-color: #34495e;
    --secondary-color: #2980b9;
    --accent-color: #0077b5;
    --text-color: #2c3e50;
    --hover-color: #ecf0f1;
    --card-bg: #ffffff;
    --gradient-start: #ecf0f1;
    --gradient-end: #bdc3c7;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: rgba(255, 255, 255, 0.95);
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-border: rgba(52, 152, 219, 0.2);
    --description-color: #7f8c8d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.3s ease, color 0.3s ease;
}


/* Navbar */

.navbar {
    background-color: var(--navbar-bg);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo h2 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link:hover {
    background-color: var(--hover-color);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.linkedin-link svg {
    transition: all 0.3s ease;
}

.linkedin-link:hover svg {
    color: var(--accent-color);
    transform: scale(1.1);
}

.home-link {
    padding: 0.5rem 0.75rem;
    color: var(--text-color);
}

.home-link svg {
    transition: all 0.3s ease;
}

.home-link:hover {
    color: var(--secondary-color);
}

.home-link:hover svg {
    transform: scale(1.15) translateY(-2px);
}


/* Theme Switcher */

.theme-switcher {
    position: relative;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    border-radius: 8px;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background-color: var(--hover-color);
    transform: translateY(-2px);
}

.theme-icon {
    display: none;
    transition: all 0.3s ease;
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 20px var(--shadow-color);
    padding: 0.5rem;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}


/* Mode sombre pour le dropdown */

:root .theme-dropdown,
[data-theme="dark"] .theme-dropdown {
    background-color: #34495e;
}

:root .theme-dropdown .theme-option,
[data-theme="dark"] .theme-dropdown .theme-option {
    color: #ecf0f1;
}

:root .theme-dropdown .theme-option:hover,
[data-theme="dark"] .theme-dropdown .theme-option:hover {
    background-color: #2c3e50;
    color: #3498db;
}


/* Mode clair pour le dropdown */

[data-theme="light"] .theme-dropdown {
    background-color: #ffffff;
}

[data-theme="light"] .theme-dropdown .theme-option {
    color: #2c3e50;
}

[data-theme="light"] .theme-dropdown .theme-option:hover {
    background-color: #ecf0f1;
    color: #2980b9;
}

.theme-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.theme-option.active {
    background-color: rgba(52, 152, 219, 0.15);
    font-weight: 600;
}

:root .theme-option.active,
[data-theme="dark"] .theme-option.active {
    color: #3498db;
}

[data-theme="light"] .theme-option.active {
    color: #2980b9;
}

.theme-option svg {
    flex-shrink: 0;
}


/* Main Content */

.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    width: 100%;
}

.hero-section {
    text-align: center;
    margin-bottom: 4rem;
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--secondary-color), #9b59b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-section p {
    font-size: 1.2rem;
    color: var(--description-color);
}


/* Projects Sections */

.projects-section {
    margin-bottom: 4rem;
}

.section-header {
    margin-bottom: 2rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.section-header h2 svg {
    color: var(--secondary-color);
}

.section-description {
    color: var(--description-color);
    font-size: 1rem;
    font-style: italic;
}


/* Cards */

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: all 0.3s ease;
    border: 1px solid var(--card-border);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.3);
    border-color: var(--secondary-color);
}

.card h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card p {
    color: var(--description-color);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.card-buttons {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    justify-content: space-between;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    min-width: 120px;
    white-space: nowrap;
}

.card-button:hover {
    background-color: #2980b9;
    transform: scale(1.05);
}

.card-button-external {
    background-color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.card-button-external:hover {
    opacity: 1;
}


/* Footer */

.footer {
    background-color: var(--footer-bg);
    text-align: center;
    padding: 1.5rem;
    margin-top: auto;
    transition: background-color 0.3s ease;
}

.footer p {
    color: var(--description-color);
    font-size: 0.9rem;
}


/* Project Pages */

.project-content {
    max-width: 900px;
    margin: 0 auto;
}

.project-section {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--card-border);
}

.project-section h2 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.project-section p {
    line-height: 1.8;
    color: var(--description-color);
    margin-bottom: 1rem;
}

.tech-list,
.features-list {
    list-style: none;
    padding: 0;
}

.tech-list li,
.features-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: rgba(52, 152, 219, 0.1);
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.tech-list li:hover,
.features-list li:hover {
    background-color: rgba(52, 152, 219, 0.2);
    transform: translateX(5px);
}

.demo-container {
    padding: 2rem;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(52, 152, 219, 0.3);
}

.demo-container p {
    color: var(--description-color);
    font-style: italic;
}

.project-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}


/* Sitemap */

.sitemap-list {
    list-style: none;
    padding: 0;
}

.sitemap-list li {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: rgba(52, 152, 219, 0.05);
    border-left: 3px solid var(--secondary-color);
    border-radius: 4px;
    color: var(--text-color);
    transition: all 0.3s ease;
}

.sitemap-list li:hover {
    background-color: rgba(52, 152, 219, 0.15);
    transform: translateX(5px);
}

.sitemap-list a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sitemap-list a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}


/* Responsive */

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    .hero-section h1 {
        font-size: 2rem;
    }
    .section-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    .cards-container {
        grid-template-columns: 1fr;
    }
    .project-section {
        padding: 1.5rem;
    }
    .project-section h2 {
        font-size: 1.5rem;
    }
    .project-actions {
        flex-direction: column;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
}