* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e5f3f;
    --secondary: #3d8b5c;
    --accent: #6bbd8f;
    --light: #a8ddb5;
    --dark: #0f2e1f;
    --bg: #0a1f15;
    --text: #e8f5e9;
    --gray: #b0bec5;
}

body {
    font-family: 'Arial', sans-serif;
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.3;
}

nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 31, 21, 0.95);
    backdrop-filter: blur(15px);
    z-index: 1000;
    padding: 1.2rem 0;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

nav a:hover,
nav a.active {
    color: var(--accent);
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.burger span {
    width: 25px;
    height: 3px;
    background: var(--accent);
    transition: all 0.3s;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

section {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

#accueil {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-content h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: fadeInUp 1s ease;
}

.hero-content .subtitle {
    font-size: 1.8rem;
    color: var(--gray);
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-content .description {
    font-size: 1.2rem;
    color: var(--text);
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.8;
    animation: fadeInUp 1s ease 0.4s backwards;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s backwards;
}

.btn {
    padding: 1rem 2.5rem;
    border: 2px solid var(--accent);
    background: transparent;
    color: var(--accent);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    color: var(--dark);
}

.btn.primary {
    background: var(--accent);
    color: var(--dark);
}

.btn.primary::before {
    background: var(--secondary);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid var(--accent);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    animation: scroll 2s infinite;
}

.section-title {
    font-size: 3rem;
    margin-bottom: 3rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
}

#description {
    background: rgba(15, 46, 31, 0.3);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 8rem;
    box-shadow: 0 20px 60px rgba(107, 189, 143, 0.3);
    animation: float 3s ease-in-out infinite;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 1.5rem;
    color: var(--gray);
}

#parcours {
    background: linear-gradient(180deg, rgba(15, 46, 31, 0.5), rgba(10, 31, 21, 0.8));
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), var(--secondary));
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    gap: 2rem;
    margin-bottom: 4rem;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s;
}

.timeline-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    flex: 1;
    background: rgba(61, 139, 92, 0.1);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid var(--secondary);
    backdrop-filter: blur(10px);
    text-align: left;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    border: 4px solid var(--bg);
    box-shadow: 0 0 20px var(--accent);
    z-index: 2;
}

.timeline-date {
    color: var(--accent);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.timeline-content h3 {
    color: var(--text);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-content p {
    color: var(--gray);
    line-height: 1.6;
}

#competences {
    background: linear-gradient(180deg, rgba(15, 46, 31, 0.5), rgba(10, 31, 21, 0.8));
}

.skills-container {
    display: grid;
    gap: 2rem;
}

.skill-category {
    background: rgba(61, 139, 92, 0.1);
    border: 1px solid var(--secondary);
    border-radius: 15px;
    padding: 2rem;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
}

.skill-category:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(107, 189, 143, 0.2);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.skill-header h3 {
    color: var(--accent);
    font-size: 1.8rem;
}

.skill-toggle {
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s;
}

.skill-toggle.active {
    transform: rotate(180deg);
}

.skill-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.skill-content.active {
    max-height: 600px;
    margin-top: 2rem;
}

.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    background: rgba(107, 189, 143, 0.1);
    border: 1px solid var(--accent);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s;
}

.skill-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(107, 189, 143, 0.3);
    background: rgba(107, 189, 143, 0.2);
}

.skill-icon {
    font-size: 3.5rem;
    margin-bottom: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
}

.skill-icon i {
    color: var(--accent);
}

.skill-name {
    color: var(--text);
    font-weight: 600;
    margin-top: 0.5rem;
    font-size: 1rem;
}

#projets {
    background: rgba(15, 46, 31, 0.3);
}

.projects-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.projects-subtitle i {
    color: var(--accent);
    font-size: 1.4rem;
}

.github-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.github-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.github-link:hover::after {
    width: 100%;
}

.github-link:hover {
    color: var(--light);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 3rem;
}

.project-card {
    background: rgba(61, 139, 92, 0.1);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--secondary);
    cursor: pointer;
    transition: all 0.4s;
    position: relative;
    opacity: 0;
    transform: translateY(50px);
}

.project-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.project-card:hover::before {
    opacity: 0.1;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(107, 189, 143, 0.4);
}

.project-image {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-emoji {
    font-size: 8rem;
    transition: transform 0.4s;
}

.project-card:hover .project-emoji {
    transform: scale(1.2) rotate(5deg);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 2rem;
    position: relative;
    z-index: 1;
}

.project-content h3 {
    color: var(--text);
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.project-content p {
    color: var(--gray);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    background: rgba(107, 189, 143, 0.2);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid var(--accent);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.tag i {
    font-size: 0.9rem;
}

#contact {
    background: rgba(15, 46, 31, 0.3);
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: rgba(61, 139, 92, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--secondary);
    transition: all 0.3s;
}

.contact-item:hover {
    border-color: var(--accent);
    transform: translateX(10px);
}

.contact-icon {
    font-size: 2rem;
    color: var(--accent);
}

.contact-item h4 {
    color: var(--text);
    margin-bottom: 0.3rem;
}

.contact-item a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.contact-item a:hover {
    text-decoration: underline;
}

.contact-form {
    background: rgba(61, 139, 92, 0.1);
    padding: 2.5rem;
    border-radius: 15px;
    border: 1px solid var(--secondary);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(10, 31, 21, 0.5);
    border: 1px solid var(--secondary);
    border-radius: 8px;
    color: var(--text);
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(107, 189, 143, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 46, 31, 0.95), rgba(30, 95, 63, 0.95));
    border: 2px solid var(--accent);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 3rem;
    transform: scale(0.8);
    transition: transform 0.3s;
    backdrop-filter: blur(20px);
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 2rem;
    background: rgba(107, 189, 143, 0.2);
    border: 2px solid var(--accent);
    color: var(--accent);
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--accent);
    color: var(--dark);
    transform: rotate(90deg);
}

.modal-content h3 {
    color: var(--accent);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.modal-screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.modal-screenshots img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--accent);
    transition: transform 0.3s;
    cursor: pointer;
}

.modal-screenshots img:hover {
    transform: scale(1.05);
}

.modal-content .project-detail {
    margin-bottom: 2rem;
}

.modal-content .project-detail h4 {
    color: var(--text);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-content p {
    color: var(--gray);
    line-height: 1.9;
    font-size: 1.1rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 2rem;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

@media (max-width: 968px) {
    .nav-container {
        justify-content: space-between;
    }

    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        flex-direction: column;
        background: rgba(10, 31, 21, 0.98);
        width: 100%;
        padding: 2rem;
        gap: 1.5rem;
        transition: left 0.3s;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    nav ul.active {
        left: 0;
    }

    .burger {
        display: flex;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        flex-direction: row !important;
        padding-left: 3rem;
    }

    .timeline-dot {
        left: 20px;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--dark);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}