/* --- GLOBAL RESET --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* --- BASE --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 55%, #000 100%);
    color: #e6edf3;
    line-height: 1.6;
}

/* Container global */
.wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* --- NAVBAR --- */
.navbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-inner {
    max-width: 1000px;
    margin: 0 auto;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-weight: 650;
    letter-spacing: 0.04em;
    font-size: 0.95rem;
}

.nav-brand span {
    color: #38bdf8;
}

.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.nav-links a {
    text-decoration: none;
    font-size: 0.9rem;
    color: #cbd5f5;
    padding: 4px 0;
    position: relative;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #38bdf8;
    transition: width 0.16s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Page active (tu peux ajouter la classe .active sur le lien courant) */
.nav-links a.active {
    color: #ffffff;
}
.nav-links a.active::after {
    width: 100%;
}

.lang-toggle {
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.92);
    color: #cbd5f5;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-toggle:hover {
    border-color: #38bdf8;
    color: #38bdf8;
}

/* --- HERO (accueil ou en-tête de page) --- */
.hero {
    padding: 60px 20px 40px;
    background: linear-gradient(135deg, #020617 0%, #0b1120 35%, #111827 100%);
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}

.hero-inner {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-main {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 32px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.3rem, 4vw, 3.1rem);
    font-weight: 750;
    letter-spacing: 0.02em;
}

.hero-sub {
    margin-top: 10px;
    color: #9ca3af;
    font-size: 0.98rem;
    max-width: 520px;
}

.hero-highlight {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.85);
    font-size: 0.9rem;
}

.hero-side {
    font-size: 0.9rem;
    color: #cbd5f5;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.9);
    padding: 14px 16px;
}

.hero-side h2 {
    font-size: 1rem;
    margin-bottom: 8px;
}

/* Boutons */
.buttons {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.93rem;
    transition: transform 0.16s ease, box-shadow 0.16s ease,
    background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    background: #38bdf8;
    color: #020617;
    box-shadow: 0 12px 30px rgba(56, 189, 248, 0.35);
}

.btn-secondary {
    border: 1.5px solid #38bdf8;
    color: #e5f3ff;
    background: transparent;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.8);
    opacity: 0.96;
}

/* --- SECTIONS GÉNÉRALES --- */
.section {
    padding: 40px 0;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 18px;
    letter-spacing: 0.03em;
    position: relative;
    display: inline-block;
}

.section h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 42%;
    height: 2px;
    background: linear-gradient(to right, #38bdf8, transparent);
    opacity: 0.9;
}

.section p {
    color: #cbd5f5;
    font-size: 0.96rem;
}

/* Texte + colonnes */
.section-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.2fr);
    gap: 28px;
    margin-top: 10px;
}

/* --- TAGS / PILLS --- */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.tag {
    padding: 5px 11px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    background: rgba(15, 23, 42, 0.92);
    font-size: 0.8rem;
    white-space: nowrap;
}

/* --- SKILLS PAGE --- */
.skills-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-top: 14px;
}

.skills-group {
    padding: 16px 14px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.9);
}

.skills-group h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
}

/* --- PROJECTS PAGES --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 22px;
    margin-top: 16px;
}

.project-card {
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: radial-gradient(circle at top left, #1f2937 0, #020617 60%);
    padding: 16px 14px 14px;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.7);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; /* Durée de transition ajustée */
}

.project-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
    border-color: #38bdf8;
}

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

.project-meta {
    color: #9ca3af;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.project-description {
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.project-media {
    margin: 10px 0 6px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.project-media img,
.project-media video {
    display: block;
    width: 100%;
    height: auto;
}

.project-image-small {
    max-width: 60%;
    height: auto;
    display: block;
    margin: 0 auto;
}


.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.project-link {
    color: #38bdf8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
}

.project-link:hover {
    text-decoration: underline;
}

/* --- CONTACT --- */
.contact-list p {
    margin-bottom: 4px;
}

.contact-list a {
    color: #38bdf8;
    text-decoration: none;
}

.contact-list a:hover {
    text-decoration: underline;
}

/* --- FOOTER --- */
footer {
    text-align: center;
    color: #6b7280;
    padding: 20px 0 26px;
    border-top: 1px solid rgba(148, 163, 184, 0.3);
    margin-top: 10px;
    font-size: 0.85rem;
}

/* --- RESPONSIVE --- */
@media (max-width: 800px) {
    .hero-main {
        grid-template-columns: 1fr;
    }

    .section-columns {
        grid-template-columns: 1fr;
    }
}

/* --- MOBILE MENU --- */
.menu-toggle {
    display: none; /* Caché par défaut sur grand écran */
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 30;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background-color: #cbd5f5;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* --- RESPONSIVE (ajustements) --- */
@media (max-width: 650px) {
    .nav-inner {
        flex-direction: row; /* Reste en ligne */
        justify-content: flex-end; /* Aligne le bouton à droite */
        align-items: center;
    }

    .menu-toggle {
        display: flex; /* Affiché sur mobile */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%; /* Caché hors de l'écran */
        width: 70%;
        max-width: 280px;
        height: 100vh;
        background: rgba(2, 6, 23, 0.98);
        backdrop-filter: blur(10px);
        border-left: 1px solid rgba(148, 163, 184, 0.25);
        flex-direction: column;
        align-items: flex-start;
        padding: 60px 20px;
        gap: 18px;
        transition: right 0.35s ease-in-out;
    }

    .nav-links.open {
        right: 0; /* Apparaît à l'écran */
    }

    .buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

