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

:root {
    --card-border: linear-gradient(135deg, var(--logo-cyan), var(--logo-violet) 52%, var(--logo-magenta));
    --card-surface: #121514;
    --card-surface-soft: #171a19;
    --text: var(--style-white);
    --muted: rgba(255, 252, 225, 0.78);
    --icon: var(--style-white);
    --radius: 8px;
    --overlay: rgba(14, 16, 15, 0.82);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    background-color: var(--style-black);
    font-family: var(--font-main, 'Mori', sans-serif);
    font-weight: var(--type-weight-regular, 400);
    letter-spacing: var(--type-tracking, 0);
    line-height: var(--type-leading-copy, 1.3);
    color: var(--style-white);
}

html.is-modal-open {
    overflow: hidden;
}

body.is-modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
    left: 0;
    right: 0;
}

body.is-menu-open {
    position: static;
    width: 100%;
}

html.is-menu-open,
body.is-menu-open {
    overflow: hidden;
    touch-action: none;
}

#site-content {
    background-color: var(--style-white);
}

/* HERO */
.hero {
    position: relative;
    width: 100%;
    min-height: calc(88vh);
    background:
            linear-gradient(180deg, rgba(12, 216, 252, .08) 0, transparent 10rem),
            linear-gradient(135deg, rgba(108, 60, 252, .12) 0, transparent 34rem),
            var(--style-black);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding-bottom: 1rem;
}

.hero-inner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(32px, 5vw, 72px);
}

.left-content {
    flex: 1.25 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: clamp(24px, 3vw, 40px);
}

.title-wrap {
    width: 100%;
    display: flex;
    justify-content: flex-start;
}

.title-wrap svg {
    width: min(650px, 100%);
    height: auto;
    display: block;
}

.title-wrap svg path {
    fill: transparent;
    stroke: var(--style-white);
    stroke-width: 0.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    pathLength: 1000;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation:
            draw 4s ease-in-out forwards,
            fillAnim 2s ease forwards 1.7s;
}

.text {
    width: 100%;
    max-width: 900px;
    color: var(--style-white);
    perspective: 500px;
    text-align: left;
    opacity: 0;
    font-size: clamp(0.95rem, 1.1vw, 1.1rem);
    line-height: 1.45;
}

.text .char {
    display: inline-block;
    will-change: transform, opacity;
}

.text .word {
    display: inline-block;
    white-space: nowrap;
}

.right-visual {
    flex: 0.9 1 0;
    min-width: 0;
    width: 100%;
    max-width: 430px;
    aspect-ratio: 947 / 935;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.right-visual > svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.right-visual .scene-base {
    --visual-cyan-soft: #42e6ff;
    --visual-mint: #55e8c7;
    --visual-violet-soft: #7d5cff;
    --visual-violet-deep: #5132d6;
    --visual-device: #3d2aa8;
    --visual-device-dark: #2a1d78;
    --visual-laptop: #e8e1c4;
    --visual-laptop-edge: #d8d0ae;
    --visual-magenta-soft: #ff2ab6;
    --visual-skin: #f1d6b6;
    --visual-skin-shadow: #d9b493;
    --visual-ink: #0e100f;
}

.right-visual .scene-base path[fill="#7CFC00"] {
    fill: var(--visual-mint);
}

.right-visual .scene-base path[fill="#6C3CFC"] {
    fill: var(--visual-violet-soft);
}

.right-visual .scene-base #roue1,
.right-visual .scene-base #roue2 {
    fill: var(--visual-violet-deep);
    opacity: 0.72;
}

.right-visual .scene-base path[d^="M661.812"],
.right-visual .scene-base path[d^="M731.213"],
.right-visual .scene-base path[d^="M231.981"] {
    fill: var(--visual-device);
}

.right-visual .scene-base path[d^="M643.829"] {
    fill: var(--visual-device-dark);
}

.right-visual .scene-base path[d^="M561.102"],
.right-visual .scene-base path[d^="M378.951"] {
    fill: var(--visual-laptop);
    stroke: var(--visual-laptop-edge);
}

.right-visual .scene-base path[d^="M473.039"],
.right-visual .scene-base path[d^="M415.473"],
.right-visual .scene-base path[d^="M566.62"] {
    fill: var(--visual-skin);
    stroke: var(--visual-skin-shadow);
}

.right-visual .scene-base path[d^="M418.82"],
.right-visual .scene-base path[d^="M438.507"],
.right-visual .scene-base path[d^="M428.602"] {
    fill: var(--visual-ink);
    stroke: var(--visual-ink);
}

.right-visual .scene-base path[d^="M472.297"] {
    fill: var(--visual-cyan-soft);
    stroke: var(--visual-cyan-soft);
}

.right-visual .scene-base path[d^="M381.952"],
.right-visual .scene-base path[d^="M637.449"],
.right-visual .scene-base path[d^="M598.657"] {
    fill: var(--visual-violet-soft);
    stroke: var(--visual-violet-deep);
}

.right-visual .scene-base path[d^="M558.377"],
.right-visual .scene-base path[d^="M387.278"],
.right-visual .scene-base path[d^="M286.969"],
.right-visual .scene-base path[d^="M661.601"] {
    stroke: var(--visual-ink);
}

.right-visual .scene-base path[fill="#FC00A8"] {
    fill: var(--visual-magenta-soft);
}

.right-visual .scene-base path[fill="#0CD8FC"] {
    fill: var(--visual-cyan-soft);
}

#etoile1,
#etoile2,
#etoile3,
#enveloppe,
#avion,
#trajet {
    opacity: 0;
}

.svg-curve {
    fill: none;
    width: 100%;
    height: auto;
    display: block;
    margin-top: -2px;
    margin-bottom: -1px;
}

.svg-curve path {
    fill: var(--style-black);
}

/* SECTION PROJECTS */
.projects {
    background: var(--style-white);
    color: var(--style-black);
    position: relative;
    padding: 0;
    margin: 0;
}

.projects-inner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    padding-top: clamp(24px, 4vw, 48px);
    padding-bottom: clamp(70px, 8vw, 110px);
    text-align: center;
}

.projects h1 {
    margin: 0 0 16px;
    font-size: clamp(2.1rem, 3vw, 3.1rem);
    line-height: 1.1;
    font-weight: 300;
}

.projects > .projects-inner > p {
    margin: 0 auto clamp(42px, 5vw, 64px);
    max-width: 760px;
    font-size: clamp(1.15rem, 1.4vw, 1.35rem);
    line-height: 1.6;
    opacity: 0.75;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.project-card {
    position: relative;
    background:
            linear-gradient(var(--card-surface), var(--card-surface)) padding-box,
            var(--card-border) border-box;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
    box-shadow:
            0 26px 58px rgba(14, 16, 15, 0.30),
            0 10px 24px rgba(14, 16, 15, 0.22),
            -12px 0 30px rgba(12, 216, 252, 0.06),
            12px 0 34px rgba(252, 0, 168, 0.05),
            0 0 0 1px rgba(255, 252, 225, 0.05),
            inset 0 1px 0 rgba(255, 252, 225, 0.10);
    transition:
            transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
            box-shadow 0.9s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow:
            0 44px 92px rgba(14, 16, 15, 0.46),
            0 18px 38px rgba(14, 16, 15, 0.30),
            -18px 0 42px rgba(12, 216, 252, 0.20),
            18px 0 48px rgba(252, 0, 168, 0.18),
            0 0 0 1px rgba(255, 252, 225, 0.10),
            inset 0 1px 0 rgba(255, 252, 225, 0.16);
}

.project-thumb {
    position: relative;
    margin: 16px 16px 0;
    height: 215px;
    border-radius: 6px;
    overflow: hidden;
    display: block;
    cursor: zoom-in;
    background: var(--card-surface-soft);
    border: 1px solid rgba(255, 252, 225, 0.12);
    box-shadow: inset 0 0 0 1px rgba(14, 16, 15, 0.46);
}

.project-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

.project-card:hover .project-thumb img,
.project-thumb:hover img {
    transform: scale(1.08);
}

.project-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
            radial-gradient(circle at 18% 100%, rgba(12, 216, 252, 0.18), transparent 34%),
            radial-gradient(circle at 82% 100%, rgba(252, 0, 168, 0.16), transparent 36%),
            linear-gradient(
                    to bottom,
                    rgba(14, 16, 15, 0.02) 0%,
                    rgba(14, 16, 15, 0) 34%,
                    rgba(255, 252, 225, 0.12) 56%,
                    rgba(255, 252, 225, 0.36) 78%,
                    rgba(255, 252, 225, 0.62) 100%
            );
    pointer-events: none;
}

.project-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 26px 30px 26px;
}

.project-title {
    margin: 0 0 14px;
    font-size: 20px;
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: 0;
    color: var(--style-white);
}

.project-category {
    display: inline-flex;
    width: fit-content;
    margin: 0 0 12px;
    padding: 5px 10px;
    border: 1px solid rgba(12, 216, 252, 0.28);
    border-radius: 999px;
    color: var(--logo-cyan);
    background: rgba(12, 216, 252, 0.08);
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-text {
    margin: 0;
    font-size: 17px;
    line-height: 1.48;
    color: var(--muted);
    text-align: start;
}

.project-role {
    margin-top: 12px;
}

.project-role strong {
    color: var(--style-white);
}

.project-points {
    display: grid;
    gap: 8px;
    margin: 16px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.42;
    text-align: start;
}

.project-points li {
    position: relative;
    padding-left: 16px;
}

.project-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.66em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--logo-cyan), var(--logo-magenta));
    transform: translateY(-50%);
}

.project-points strong {
    color: var(--style-white);
}

.project-footer {
    display: flex;
    gap: 18px;
    align-items: center;
    margin-top: auto;
    padding-top: 22px;
    flex-wrap: wrap;
}

.project-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--icon);
    border-radius: 50%;
    background:
            linear-gradient(var(--card-surface), var(--card-surface)) padding-box,
            var(--card-border) border-box;
    border: 1px solid transparent;
    box-shadow: 0 0 18px rgba(12, 216, 252, 0.10);
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.project-icon:hover {
    transform: translateY(-2px);
    color: var(--logo-cyan);
    box-shadow:
            0 0 16px rgba(12, 216, 252, 0.22),
            0 0 18px rgba(252, 0, 168, 0.16);
}

.project-icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
    display: block;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: var(--overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity 320ms ease;
    z-index: 999;
}

.lightbox.open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 18px;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fffce1;
    color: #0e100f;
    font-size: 24px;
    cursor: pointer;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.lightbox.open .lightbox-close {
    opacity: 0;
    pointer-events: none;
}

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: #fffce1;
    color: #0e100f;
    font-size: 28px;
    cursor: pointer;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox.open .lightbox-nav {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-prev {
    left: 18px;
}

.lightbox-next {
    right: 18px;
}

.lightbox-zoomed {
    position: fixed;
    z-index: 1001;
    margin: 0;
    display: block;
    pointer-events: none;
    object-fit: cover;
    object-position: top center;
    transform-origin: top left;
    will-change: transform, width, height;
    backface-visibility: hidden;
}

/* ANIMATIONS */
@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes fillAnim {
    from {
        fill: transparent;
    }
    to {
        fill: var(--style-white);
    }
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .page-template-page-mes-realisations .hero {
        padding-top: clamp(64px, 7svh, 92px);
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
    }

    .project-card {
        min-height: 520px;
    }
}
@media (max-width: 640px) and (orientation: portrait) {
    .page-template-page-mes-realisations .hero {
        height: auto;
        display: block;
        min-height: calc(88svh + clamp(78px, 9svh, 110px));
    }

    .hero-inner {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 32px 0 24px;
        gap: 20px;
    }

    .left-content {
        gap: 24px;
    }

    .title-wrap svg {
        width: min(100%, 460px);
    }

    .text {
        font-size: 0.98rem;
        line-height: 1.6;
        text-align: left;
        text-justify: auto;
    }

    .right-visual {
        width: min(320px, 84vw);
    }

    .projects-inner {
        width: calc(100% - 24px);
        padding-top: 36px;
        padding-bottom: 56px;
    }

    .projects h1 {
        margin-bottom: 12px;
    }

    .projects > .projects-inner > p {
        margin-bottom: 36px;
    }

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

    .project-card {
        min-height: auto;
        border-radius: var(--radius);
    }

    .project-thumb {
        margin: 14px 14px 0;
        height: 210px;
        border-radius: 6px;
    }

    .project-content {
        padding: 22px 18px 20px;
    }

    .project-title {
        margin-bottom: 12px;
        font-size: 18px;
    }

    .project-category {
        margin-bottom: 10px;
        font-size: 11px;
    }

    .project-text {
        font-size: 16px;
        line-height: 1.5;
    }

    .project-points {
        gap: 7px;
        font-size: 15px;
    }

    .project-footer {
        gap: 14px;
        padding-top: 18px;
    }

    .lightbox-close {
        top: 12px;
        right: 12px;
        width: 42px;
        height: 42px;
        font-size: 22px;
    }

    .lightbox-nav {
        width: 42px;
        height: 42px;
        font-size: 24px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }
}
