@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ========================================
   RESET
======================================== */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "Inter", sans-serif;
    color: #111;
    background: #fff;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* ========================================
   CONTAINER
======================================== */

.container {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}


/* ========================================
   HEADER
======================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background:
        linear-gradient(rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0.75)),
        url('../img/header-bg.jpg') center/cover no-repeat;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-inner {
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: block;
    flex-shrink: 0;
}

.header-logo img {
    width: 40px;
    height: 45px;
    object-fit: contain;
    border-radius: 8px;
}

.navigation {
    display: flex;
}

.header-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.header-menu a {
    display: block;
    padding: 12px 16px;
    color: #111;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 8px;
    transition:
        background 0.25s ease,
        color 0.25s ease;
}

.header-menu a:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #2926ee;
}

.header-menu li:last-child a {
    background: #4f4f5e;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.header-menu li:last-child a:hover {
    background: #2926ee;
    color: #fff;
}


/* ========================================
   HAMBURGER
======================================== */

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    margin: 5px auto;
    background: #111;
    transition: 0.3s ease;
}


/* ========================================
   HERO
======================================== */


.hero-quote {
    margin-top: 22px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}


.hero {
    position: relative;
    min-height: 100svh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: #000;
}

.hero-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(55%);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            180deg,
            rgba(0, 0, 0, 0.25),
            rgba(0, 0, 0, 0.55)
        );
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(900px, calc(100% - 40px));
    text-align: center;
    color: #fff;
}

.hero-small-title {
    margin-bottom: 15px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3em;
}

.hero h1 {
    font-size: clamp(2.8rem, 8vw, 6rem);
    line-height: 1.05;
    font-weight: 800;
}

.hero-subtitle {
    margin-top: 20px;
    font-size: clamp(1.3rem, 3vw, 2.2rem);
    font-weight: 300;
}

.hero-subtitle span {
    font-weight: 700;
}

.hero-button {
    display: inline-block;
    margin-top: 35px;
    padding: 15px 25px;
    color: #fff;
    background: #2926ee;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition:
        transform 0.25s ease,
        background 0.25s ease;
}

.hero-button:hover {
    background: #1d1ab8;
    transform: translateY(-3px);
}


/* ========================================
   SECTIONS
======================================== */

.section {
    padding: clamp(65px, 9vw, 110px) 0;
}

.section-dark {
    background: #050505;
    color: #fff;
}

#apropos,
#realisations {
    background:
        linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
        url('../img/header-bg.jpg') center/cover no-repeat;
}

.section-heading {
    margin-bottom: 55px;
}

.section-heading.center {
    text-align: center;
}

.section-heading h2 {
    margin-top: 8px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.section-heading p {
    max-width: 650px;
    margin: 18px auto 0;
    color: #777;
    font-size: 1.05rem;
    line-height: 1.7;
}

.section-dark .section-heading p {
    color: #aaa;
}


/* ========================================
   À PROPOS
======================================== */

.about {
    display: grid;
    grid-template-columns: minmax(250px, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(40px, 8vw, 100px);
    align-items: start;
}

.about-title h2 {
    margin-top: 10px;
    font-size: clamp(2rem, 5vw, 3.5rem);
    line-height: 1.1;
}

.about-content p {
    margin-bottom: 20px;
    color: #040417;
    font-size: clamp(1rem, 2vw, 1.15rem);
    line-height: 1.8;
    font-weight: 500;
}

.about-content p:last-child {
    margin-bottom: 0;
}


/* ========================================
   COMPÉTENCES
======================================== */

.skills-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.skill-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #e4ffff;
    border-radius: 18px;
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.skill-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}


/* IMAGE DES COMPÉTENCES */

.skill-image {
    height: 150px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 20px 25px 0;
}

.skill-image img {
    width: 75%;
    height: 75%;
    object-fit: contain;
    object-position: left top;
}


/* CONTENU */

.skill-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
}

.skill-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.skill-title h3 {
    margin: 0;
    color: #000;
    font-size: 1.3rem;
}

.skill-title span {
    flex-shrink: 0;
    color: #69798d;
    font-size: 0.9rem;
    font-weight: 600;
}

.skill-card p {
    margin-top: 12px;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.6;
}


/* ========================================
   BARRES DE PROGRESSION
======================================== */

.skill-progress {
    margin-top: auto;
    padding-top: 22px;
}

.progress-bar {
    width: 100%;
    height: 7px;
    overflow: hidden;
    background: #c9d0d5;
    border-radius: 20px;
}

.progress-fill {
    height: 100%;
    border-radius: 20px;

    /* Animation */
    transition: width 0.6s ease;
}


/* ========================================
   COULEURS DES BARRES
======================================== */

/* 1 — BUILD : VERT */

.skill-card:nth-child(1) .progress-fill {
    width: 45%;
    background: #4CAF50;
}


/* 2 — REDSTONE : ROUGE */

.skill-card:nth-child(2) .progress-fill {
    width: 28%;
    background: #ef4444;
}


/* 3 — LOGICIELS : BLEU */

.skill-card:nth-child(3) .progress-fill {
    width: 8%;
    background: #2196F3;
}


/* ========================================
   RÉALISATIONS
======================================== */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.project {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 18px;
    background: #111;
}

.project a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.project img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(55%);
    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}

.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    text-align: center;
    color: #fff;
    pointer-events: none;
}

.project-overlay h3 {
    font-size: clamp(1.1rem, 2vw, 1.6rem);
}

.project:hover img {
    transform: scale(1.08);
    filter: brightness(85%);
}


/* ========================================
   CONTACT
======================================== */

.contact-section {
    position: relative;
    overflow: hidden;
}

.contact-background {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(45%);
}

.contact-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.contact-content {
    position: relative;
    z-index: 2;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 800px;
    margin-inline: auto;
}

.contact-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 18px;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition:
        transform 0.3s ease,
        background 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    background: rgba(41, 38, 238, 0.8);
}

.contact-icon {
    font-size: 35px;
    margin-bottom: 15px;
}

.contact-label {
    font-size: 1.2rem;
    font-weight: 700;
}

.contact-value {
    margin-top: 8px;
    max-width: 100%;
    overflow-wrap: anywhere;
    color: #ccc;
    font-size: 0.95rem;
}


/* ========================================
   MUSIC DE FOND
======================================== */

#music-button {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 2000;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: #4f4f5e;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

#music-button:hover {
    transform: scale(1.1);
}


/* ========================================
   TABLETTE
======================================== */

@media (max-width: 900px) {

    .container {
        width: min(100% - 32px, 700px);
    }

    .header-inner {
        min-height: 65px;
    }

    .header-logo img {
        width: 100px;
        height: 45px;
    }

    .header-menu a {
        padding: 10px;
        font-size: 0.85rem;
    }

    .about {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .skills-grid,
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 650px) {

    html {
        scroll-padding-top: 65px;
    }

    .container {
        width: min(100% - 28px, 500px);
    }


    /* HEADER */

    .header-inner {
        min-height: 65px;
    }

    .menu-toggle {
        display: block;
    }

    .navigation {
        position: absolute;
        top: 65px;
        left: 0;
        width: 100%;
        padding: 10px 14px 18px;
        background:
            linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)),
            url('../img/header-bg.jpg') center/cover no-repeat;
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition:
            opacity 0.25s ease,
            transform 0.25s ease,
            visibility 0.25s ease;
    }

    .navigation.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .header-menu {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 2px;
    }

    .header-menu a {
        width: 100%;
        padding: 14px;
        text-align: center;
        font-size: 1rem;
    }


    /* HERO */

    .hero {
        min-height: 100svh;
    }

    .hero-content {
        width: calc(100% - 30px);
    }

    .hero h1 {
        font-size: clamp(2.3rem, 12vw, 3.5rem);
    }

    .hero-subtitle {
        margin-top: 12px;
        font-size: 1.3rem;
    }

    .hero-small-title {
        font-size: 0.7rem;
        letter-spacing: 0.2em;
    }

    .hero-button {
        width: 100%;
        max-width: 300px;
        margin-top: 28px;
        padding: 15px 18px;
    }


    /* SECTIONS */

    .section {
        padding: 65px 0;
    }

    .section-heading {
        margin-bottom: 35px;
    }

    .section-heading h2,
    .about-title h2 {
        font-size: 2rem;
    }

    .section-heading p {
        font-size: 0.95rem;
    }


    /* ABOUT */

    .about {
        gap: 25px;
    }

    .about-content p {
        font-size: 1rem;
        line-height: 1.7;
    }


    /* SKILLS */

    .skills-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .skill-image {
        height: 160px;
    }

    .skill-content {
        padding: 20px;
    }


    /* PROJECTS */

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project {
        aspect-ratio: 4 / 3;
        border-radius: 15px;
    }

    .project-overlay h3 {
        font-size: 1.35rem;
    }


    /* CONTACT */

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-card {
        padding: 25px 15px;
    }
}


/* ========================================
   TRÈS PETITS TÉLÉPHONES
======================================== */

@media (max-width: 380px) {

    .container {
        width: calc(100% - 22px);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section {
        padding: 50px 0;
    }

    .section-heading h2,
    .about-title h2 {
        font-size: 1.8rem;
    }
}