/* Variables CSS */
:root {
    --primary: #8cd7ff;
    --secondary: #e6f3ff;
    --light-text: #fff;
    --dark-text: #2c3e50;
    --gradient-bg: linear-gradient(135deg, #8cd7ff 0%, #e6f3ff 100%);
    --shadow: 0 10px 30px rgba(140, 215, 255, 0.3);
    --hover-shadow: 0 15px 40px rgba(140, 215, 255, 0.4);
}

/* Reset et base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background: var(--gradient-bg);
    min-height: 100vh;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(140, 215, 255, 0.2);
    transition: transform 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

header.hidden {
    transform: translateY(-120%);
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
}

nav a {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 600;
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    position: relative;
    overflow: hidden;
    transition: color 0.3s, transform 0.3s;
    z-index: 1;
    white-space: nowrap;
}

nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    z-index: -1;
    transition: left 0.3s;
}

nav a:hover {
    color: var(--light-text);
    transform: translateY(-2px);
}

nav a:hover::before {
    left: 0;
}

.lang-btn {
    position: absolute;
    right: 2rem;
}

/* Section GitHub Link */
#github-link {
    padding: 6rem 2rem 2rem;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Bouton GitHub spécifique */
.github-btn {
    background: linear-gradient(45deg, #24292e 0%, #0366d6 100%) !important;
    color: var(--light-text) !important;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 8px 25px rgba(3, 102, 214, 0.3);
}

.github-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(3, 102, 214, 0.4);
    background: #0366d6 !important;
}

.github-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.github-btn:hover::before {
    left: 100%;
}

/* Section Projets */
#projects {
    padding: 4rem 2rem;
    max-width: 1400px;
    margin: 2rem auto 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

#projects h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-text);
    position: relative;
}

/* Grille de projets */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Cartes de projets unifiées */
.project-card {
    background: var(--light-text);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--hover-shadow);
    border-color: var(--primary);
}

/* Images des projets */
.project-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.1);
}

.project-card h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
    text-align: center;
}

.project-card p {
    margin-bottom: 1.5rem;
    opacity: 0.8;
    line-height: 1.6;
    flex-grow: 1;
    text-align: justify;
}

.project-card a {
    margin-top: auto;
}

/* Boutons */
button {
    background: var(--primary);
    color: var(--light-text);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: var(--light-text);
    text-align: center;
    padding: 2rem;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    #projects {
        margin: 1rem;
        padding: 3rem 1.5rem;
    }
}

@media (max-width: 768px) {
    header {
        padding: 0.5rem 0;
    }

    nav {
        gap: 0.8rem;
        padding: 0 1rem;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        scrollbar-width: none;
        -ms-overflow-style: none;
        justify-content: flex-start;
    }

    nav::-webkit-scrollbar {
        display: none;
    }

    nav a {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .lang-btn {
        position: static;
        margin-left: auto;
    }

    #github-link {
        padding: 5rem 1rem 2rem;
    }

    .github-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    #projects {
        margin: 1rem 0.5rem;
        padding: 3rem 1.5rem;
        border-radius: 15px;
    }

    #projects h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .project-card {
        padding: 1.5rem;
    }

    .project-card h3 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    #github-link {
        padding: 4rem 1rem 1rem;
    }

    .github-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }

    nav {
        gap: 0.5rem;
        padding: 0 0.8rem;
        justify-content: space-between;
    }

    nav a {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    .lang-btn {
        position: static;
    }

    #about {
        padding: 7rem 1rem 1rem;
        min-height: 70vh;
    }

    #projects {
        margin: 0.5rem;
        padding: 2rem 1rem;
        border-radius: 10px;
    }

    #projects h2 {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    #projects h2::after {
        width: 60px;
        height: 3px;
    }

    .project-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .project-card img {
        width: 50px;
        height: 50px;
    }

    .project-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .project-card p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    button {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
        border-radius: 20px;
    }

    footer {
        padding: 1.5rem 1rem;
        margin-top: 1rem;
    }

    footer p {
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .lang-btn {
        position: static;
    }

    #projects {
        padding: 1.5rem 0.8rem;
    }

    #projects h2 {
        font-size: 1.4rem;
    }

    .project-card {
        padding: 0.8rem;
    }

    .project-card img {
        width: 40px;
        height: 40px;
    }

    button {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}