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

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

html {
    scroll-behavior: smooth;
}

body {
    background: #090909;
    color: #f3f1eb;
    font-family: "DM Sans", sans-serif;
    overflow-x: hidden;
}

body.lightbox-active {
    overflow: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}


/* ==================================================
   VARIABLES
================================================== */

:root {
    --black: #090909;
    --black-soft: #151515;
    --white: #f3f1eb;
    --gray: #888;
    --gray-dark: #666;
    --line: #222;
    --lime: #d7ff3f;
}


/* ==================================================
   GLOW
================================================== */

.glow {
    position: fixed;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(215, 255, 63, 0.06);
    filter: blur(70px);
    pointer-events: none;
    transform: translate(-50%, -50%);
    z-index: -1;
}


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

header {
    position: fixed;
    z-index: 50;
    top: 0;
    width: 100%;
    height: 78px;
    padding: 0 5vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(#090909ef, transparent);
}

.logo {
    font: 700 1.35rem "Space Grotesk";
    white-space: nowrap;
}

.logo span,
em,
h2 span {
    color: var(--lime);
    font-style: normal;
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 26px;
}

nav {
    display: flex;
    align-items: center;
    gap: 30px;
    color: #999;
    font-size: 0.82rem;
}

nav a {
    transition: color 0.25s ease;
}

nav a:hover {
    color: white;
}

.cv-link-mobile {
    display: none;
}

.menu {
    display: none;
    background: none;
    border: 0;
    color: white;
    font-size: 25px;
    cursor: pointer;
}


/* ==================================================
   BUTTONS
================================================== */

.btn {
    padding: 14px 21px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 0.85rem;
    transition:
        transform 0.3s ease,
        background 0.3s ease,
        color 0.3s ease;
}

.btn:hover {
    transform: translateY(-3px);
}

.primary {
    background: var(--lime);
    color: #080808;
    border-color: var(--lime);
    font-weight: 700;
}

.cv-btn {
    padding: 10px 18px;
    font-size: 0.75rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}


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

.hero,
.section {
    max-width: 1240px;
    margin: auto;
    padding-left: 5vw;
    padding-right: 5vw;
}

.hero {
    min-height: 100vh;
    padding-top: 130px;
    padding-bottom: 80px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 60px;
    position: relative;
}

.eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: #777;
    font-weight: 700;
    margin-bottom: 27px;
}

.eyebrow::first-letter {
    color: var(--lime);
}

h1,
h2,
h3 {
    font-family: "Space Grotesk";
}

.hero h1 {
    font-size: clamp(4rem, 8vw, 7.5rem);
    line-height: 0.87;
    letter-spacing: -0.075em;
}

.lead {
    max-width: 570px;
    color: #999;
    line-height: 1.7;
    margin: 36px 0;
}

.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}


/* ==================================================
   PORTRAIT
================================================== */

.portrait {
    position: relative;
}

.visual-placeholder {
    aspect-ratio: 4 / 5;
    border: 1px solid #222;
    border-radius: 4px;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 70% 20%,
            #d7ff3f25,
            transparent 28%
        ),
        linear-gradient(
            145deg,
            #202020,
            #0c0c0c
        );
}

.visual-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

.tag {
    position: absolute;
    background: #151515ef;
    border: 1px solid #282828;
    padding: 13px 17px;
    font-size: 0.58rem;
    letter-spacing: 0.12em;
    line-height: 1.5;
    animation: float 4s ease-in-out infinite;
}

.tag strong {
    color: var(--lime);
}

.tag1 {
    left: -9%;
    top: 15%;
}

.tag2 {
    right: -9%;
    bottom: 17%;
    animation-delay: -2s;
}

@keyframes float {

    50% {
        transform: translateY(-12px);
    }

}

.scroll {
    position: absolute;
    bottom: 35px;
    color: #666;
    font-size: 0.62rem;
    letter-spacing: 0.16em;
}


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

.section {
    padding-top: 150px;
    padding-bottom: 150px;
}

.heading h2 {
    font-size: clamp(3rem, 6vw, 6rem);
    line-height: 0.92;
    letter-spacing: -0.07em;
}


/* ==================================================
   ABOUT
================================================== */

.about-grid {
    margin-top: 80px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 90px;
}

.copy {
    max-width: 680px;
    color: #999;
    line-height: 1.8;
}

.copy .big {
    font-size: 1.55rem;
    line-height: 1.35;
    color: #eee;
    margin-bottom: 25px;
}

.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #222;
}

.stats div {
    background: #090909;
    padding: 28px 18px;
    min-height: 125px;
}

.stats b {
    display: block;
    color: var(--lime);
    font: 600 2.4rem "Space Grotesk";
    margin-bottom: 18px;
}

.stats span {
    font-size: 0.78rem;
    color: #888;
}


/* ==================================================
   SERVICES
================================================== */

.services {
    margin-top: 80px;
    border-top: 1px solid #222;
}

.service {
    display: grid;
    grid-template-columns: 70px 1fr 30px;
    gap: 25px;
    padding: 32px 0;
    border-bottom: 1px solid #222;
    align-items: center;
    transition: 0.3s;
}

.service:hover {
    padding-left: 18px;
    padding-right: 18px;
    background: rgba(215, 255, 63, 0.025);
}

.service small {
    color: #666;
}

.service h3 {
    font-size: clamp(1.5rem, 3vw, 2.3rem);
    margin-bottom: 8px;
}

.service p {
    color: #888;
    max-width: 650px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.service > b {
    font-size: 1.2rem;
    transition:
        transform 0.3s ease,
        color 0.3s ease;
}

.service:hover > b {
    color: var(--lime);
    transform: translate(4px, -4px);
}


/* ==================================================
   PROJECTS
================================================== */

.split {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
}

.filters {
    display: flex;
    gap: 8px;
    margin: 50px 0 30px;
    flex-wrap: wrap;
}

.filters button {
    border: 1px solid #222;
    background: transparent;
    color: #888;
    border-radius: 999px;
    padding: 9px 15px;
    font-size: 0.72rem;
    cursor: pointer;
    transition: 0.25s;
}

.filters button.active,
.filters button:hover {
    background: var(--lime);
    color: #090909;
    border-color: var(--lime);
}

.projects {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 55px 24px;
}


/* ==================================================
   PROJECT IMAGES
================================================== */

.project-img {
    position: relative;
    aspect-ratio: 4 / 3;
    border: 1px solid #222;
    background:
        radial-gradient(
            circle at 70% 25%,
            #d7ff3f1c,
            transparent 25%
        ),
        linear-gradient(
            145deg,
            #1d1d1d,
            #0d0d0d
        );
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

.project.large .project-img {
    aspect-ratio: 4 / 4.5;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.7s ease;
}

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

.project-img span {
    position: absolute;
    z-index: 2;
    color: #555;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.project-img img[src] + span {
    opacity: 0;
}

.project h3 {
    font-size: 1.3rem;
    margin-top: 16px;
}

.project h3 i {
    float: right;
    font-style: normal;
}

.project small {
    display: block;
    color: #777;
    margin-top: 7px;
}

.project.hidden {
    display: none;
}


/* ==================================================
   MARQUEE
================================================== */

.marquee {
    overflow: hidden;
    border-block: 1px solid #222;
    padding: 28px 0;
    white-space: nowrap;
    color: #eee;
    font: 600 2rem "Space Grotesk";
}

.marquee div {
    display: inline-block;
    animation: marquee 18s linear infinite;
}

@keyframes marquee {

    to {
        transform: translateX(-50%);
    }

}


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

.contact {
    min-height: 75vh;
    display: flex;
    align-items: center;
    text-align: center;
}

.contact > div {
    width: 100%;
}

.contact .eyebrow {
    text-align: center;
}

.contact h2 {
    font-size: clamp(3.5rem, 8vw, 8rem);
    line-height: 0.9;
    letter-spacing: -0.08em;
}

.contact > div > p:not(.eyebrow) {
    color: #888;
    max-width: 450px;
    margin: 32px auto;
    line-height: 1.6;
}

.contact-links {
    max-width: 600px;
    margin: auto;
}

.contact-links a {
    display: flex;
    justify-content: space-between;
    padding: 20px 0;
    border-bottom: 1px solid #222;
    transition: 0.25s;
}

.contact-links a:hover {
    color: var(--lime);
    padding-inline: 10px;
}


/* ==================================================
   FOOTER
================================================== */

footer {
    max-width: 1240px;
    margin: auto;
    border-top: 1px solid #222;
    padding: 28px 5vw 40px;
    color: #666;
    font-size: 0.7rem;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

footer a {
    transition: color 0.25s ease;
}

footer a:hover {
    color: var(--lime);
}


/* ==================================================
   SCROLL REVEAL
================================================== */

.reveal {
    opacity: 0;
    transform: translateY(45px);
    transition:
        opacity 0.8s ease,
        transform 0.8s cubic-bezier(
            0.2,
            0.75,
            0.2,
            1
        );
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

.delay {
    transition-delay: 0.15s;
}


/* ==================================================
   POPUP COMMERCIALE
   VISIBLE PAR DÉFAUT
================================================== */

.portfolio-popup {
    position: fixed;
    z-index: 200;
    right: max(28px, env(safe-area-inset-right) + 14px);
    bottom: max(28px, env(safe-area-inset-bottom) + 14px);
    width: min(390px, calc(100vw - 56px));
    padding: 24px;
    background: rgba(17, 17, 17, 0.97);
    border: 1px solid rgba(215, 255, 63, 0.35);
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(215, 255, 63, 0.04);

    /*
       Pas de transform,
       pas de visibility:hidden,
       pas d'opacité à 0.

       Le popup existe immédiatement.
    */

    overflow: hidden;
    border-radius: 4px;

    animation: popupFloat 5s ease-in-out infinite;
}

.portfolio-popup.popup-hidden {
    display: none;
}

@keyframes popupFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }

}

.popup-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    right: -45px;
    top: -45px;
    border-radius: 50%;
    background: var(--lime);
    opacity: 0.09;
    filter: blur(4px);
    pointer-events: none;
}

.popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    background: none;
    border: 0;
    color: #888;
    font-size: 16px;
    line-height: 1;
    padding: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.popup-close:hover {
    color: var(--lime);
}

.popup-content {
    position: relative;
    z-index: 2;
    padding-right: 18px;
}

.popup-label {
    display: inline-block;
    color: var(--lime);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    margin-bottom: 11px;
}

.popup-content h3 {
    font-size: 1.5rem;
    line-height: 1.05;
    letter-spacing: -0.045em;
    max-width: 310px;
}

.popup-content h3 em {
    color: var(--lime);
    font-style: normal;
}

.popup-content p {
    color: #888;
    font-size: 0.76rem;
    line-height: 1.5;
    margin: 12px 0 17px;
    max-width: 300px;
}

.popup-button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--lime);
    border-radius: 999px;
    background: var(--lime);
    color: #090909;
    font-size: 0.72rem;
    font-weight: 700;
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.popup-button:hover {
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(215, 255, 63, 0.16);
}

.popup-button span {
    font-size: 1rem;
}


/* ==================================================
   LIGHTBOX
================================================== */

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(6, 6, 6, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 300;
    padding: 6vw;
    cursor: zoom-out;
}

.lightbox.open {
    display: flex;
}

.lightbox img {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.55);
    cursor: default;
}

.lightbox-close {
    position: absolute;
    top: 22px;
    right: 5vw;
    color: #f3f1eb;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: 0;
}

.lightbox-close:hover {
    color: var(--lime);
}


/* ==================================================
   RESPONSIVE — TABLETTE / MOBILE
================================================== */

@media (max-width: 800px) {

    .glow {
        display: none;
    }


    /* HEADER */

    header {
        height: 70px;
        padding:
            0 5vw;

        background:
            linear-gradient(
                #090909f5,
                #09090900
            );
    }

    .logo {
        font-size: 1rem;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 62vw;
    }

    nav {
        position: fixed;
        inset: 0;
        background: #090909;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        transform: translateY(-100%);
        transition: transform 0.4s ease;
        z-index: 90;
    }

    nav.open {
        transform: translateY(0);
    }

    .cv-btn {
        display: none;
    }

    .cv-link-mobile {
        display: block;
        color: var(--lime);
        margin-top: 10px;
    }

    .menu {
        display: block;
        position: relative;
        z-index: 100;
    }


    /* HERO */

    .hero {
        grid-template-columns: 1fr;
        padding-top: 115px;
    }

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

    .portrait {
        max-width: 330px;
        margin-left: 7vw;
    }

    .scroll {
        display: none;
    }


    /* ABOUT */

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

    .section {
        padding-top: 100px;
        padding-bottom: 100px;
    }


    /* PROJECTS */

    .split {
        display: block;
    }

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


    /* SERVICES */

    .service {
        grid-template-columns: 40px 1fr 20px;
        gap: 10px;
    }


    /* TAGS */

    .tag1 {
        left: -5%;
    }

    .tag2 {
        right: -5%;
    }


    /* FOOTER */

    footer {
        flex-direction: column;
        gap: 12px;
    }


    /* POPUP */

    .portfolio-popup {
        right: max(16px, env(safe-area-inset-right) + 8px);
        bottom: max(16px, env(safe-area-inset-bottom) + 8px);
        width: calc(100vw - 32px);
        padding: 20px;

        /*
           Safari iPhone :
           on évite le backdrop-filter
           qui peut coûter cher en rendu.
        */

        backdrop-filter: none;
        -webkit-backdrop-filter: none;

        animation: none;
    }

    .popup-content h3 {
        font-size: 1.35rem;
    }

}


/* ==================================================
   PETITS SMARTPHONES
================================================== */

@media (max-width: 480px) {

    .hero {
        padding-left: 6vw;
        padding-right: 6vw;
    }

    .hero h1 {
        font-size:
            clamp(
                3.25rem,
                16vw,
                5rem
            );
    }

    .lead {
        font-size: 0.88rem;
    }

    .portrait {
        margin-left: 4vw;
        max-width: 300px;
    }

    .tag {
        padding: 10px 12px;
        font-size: 0.5rem;
    }

    .tag1 {
        left: -4%;
    }

    .tag2 {
        right: -4%;
    }

    .heading h2 {
        font-size:
            clamp(
                2.8rem,
                14vw,
                4.5rem
            );
    }

    .copy .big {
        font-size: 1.25rem;
    }

    .service {
        padding: 26px 0;
    }

    .service h3 {
        font-size: 1.35rem;
    }

    .service p {
        font-size: 0.78rem;
    }

    .filters {
        gap: 6px;
    }

    .filters button {
        font-size: 0.65rem;
        padding: 8px 12px;
    }

    .project h3 {
        font-size: 1.1rem;
    }

    .marquee {
        font-size: 1.45rem;
    }

    .contact h2 {
        font-size:
            clamp(
                3rem,
                15vw,
                5rem
            );
    }


    /* POPUP PETIT IPHONE */

    .portfolio-popup {
        right: max(10px, env(safe-area-inset-right) + 6px);
        bottom: max(10px, env(safe-area-inset-bottom) + 6px);
        width: calc(100vw - 20px);
        padding: 17px;
        border-radius: 8px;
    }

    .popup-label {
        font-size: 0.5rem;
        padding-right: 15px;
    }

    .popup-content h3 {
        font-size: 1.2rem;
        max-width: 280px;
    }

    .popup-content p {
        font-size: 0.69rem;
        margin: 9px 0 13px;
    }

    .popup-button {
        padding: 11px 14px;
        font-size: 0.68rem;
    }

}


/* ==================================================
   RÉDUCTION DES ANIMATIONS
================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    html {
        scroll-behavior: auto !important;
        animation: none !important;
        transition: none !important;
    }

}
