/* ─── Système typographique ──────────────────────────────────
   Desktop  : corps 16px (1rem)   | petits textes 12–14px
   Mobile   : corps 14px (.875rem)| petits textes 12px min
   1rem = 16px  |  0.875rem = 14px  |  0.75rem = 12px
   ─────────────────────────────────────────────────────────── */
:root {
    --font-body:    1rem;         /* 16px — corps de texte desktop */
    --font-body-sm: 0.875rem;     /* 14px — corps de texte mobile  */
    --font-small:   0.75rem;      /* 12px — légendes, tags, mentions */
    --font-small-md:0.875rem;     /* 14px — notes de bas de page desktop */
}

/* Reset & Base Styles */
html {
    font-size: 16px;              /* 1rem = 16px (ancre explicite) */
    /* Animation de scroll fluide */
    scroll-padding-top: 120px;
    /* Offset pour le header sticky */
}

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

html, body {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Source Code Pro', monospace;
    background-color: #ffffff;
    color: #101010;
    line-height: 1.6;
}

a, button, .logo-container, .main-nav a, .menu-burger, [role="button"] {
    text-decoration: none;
    color: inherit;
    touch-action: manipulation;
}

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

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 41px;
    /* Réduit pour rendre la barre plus fine */
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 100;
}

/* Hide checkbox and burger on desktop */
.menu-toggle-cb {
    display: none;
}

.menu-burger {
    display: none;
}

.main-logo {
    height: 48px;
    /* Selon Figma */
    object-fit: contain;
}

.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 76px;
    /* Selon Figma */
}

.main-nav a {
    font-size: 16px;
    font-weight: 400;
    padding: 0px 3px 1px;
    /* Padding selon Figma pour le hover */
}

.main-nav a:hover {
    background-color: #101010;
    color: #ffffff;
}

.btn-contact {
    position: relative;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 32px;
    box-sizing: border-box;
    z-index: 1;
}

.btn-contour {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: -1;
}

.btn-contact:hover {
    background-color: #101010;
    color: #ffffff !important;
}

/* Falling logo — zone pleine largeur jusqu’au bas du site */
.falling-logo-zone {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    min-height: max(480px, 58dvh);
    margin-top: -2rem;
    padding-bottom: 3rem;
    box-sizing: border-box;
}

.falling-logo-stage {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    overflow: hidden;
}

.falling-logo-stage--static {
    position: relative;
    inset: auto;
    z-index: auto;
    overflow: visible;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 280px;
    pointer-events: none;
}

.falling-logo {
    position: absolute;
    left: 50%;
    top: 18%;
    width: clamp(88px, 12vw, 160px);
    height: auto;
    max-width: none;
    pointer-events: auto;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
    touch-action: none;
    will-change: transform, left, top;
    visibility: visible;
    opacity: 1;
    z-index: 21;
    filter:
        drop-shadow(0 2px 0 rgba(16, 16, 16, 0.4))
        drop-shadow(0 8px 20px rgba(16, 16, 16, 0.22));
    transform: translate(-50%, -50%) rotate(0.35rad);
    transform-origin: center center;
}

.falling-logo.is-dragging {
    cursor: grabbing;
}

.falling-logo--static {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    pointer-events: none;
    cursor: default;
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 56px 0px 40px;
    gap: 10px;
    width: 100%;
    max-width: 579px;
    height: auto;
    margin: 0 auto;
}

.hero-icons {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 44px 0px;
    gap: 120px;
    width: 579px;
    height: 239px;
}

/* Bouton TOUT VOIR */
.btn-tout-voir {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 2px;
    width: 87px;
    height: 35px;
    cursor: pointer;
    user-select: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.btn-tout-voir.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.btn-tout-voir.show:hover {
    opacity: 0.5;
}

.btn-tout-voir-label {
    width: 87px;
    height: 20px;
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    color: #101010;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.btn-tout-voir-arrow {
    width: 22px;
    height: 13px;
    flex: none;
    order: 2;
    flex-grow: 0;
}

/* Tailles individuelles des Frames Figma */
#filter-illu {
    width: 127px;
    height: 141px;
}

#filter-illu .icon-image-container {
    width: 58px;
    height: 94.91px;
    overflow: visible; /* image déborde légèrement comme dans Figma */
}

/* Image positionnée exactement comme dans Figma: left:0.24, top:-1.73 */
#filter-illu .icon-image-container .icon-default,
#filter-illu .icon-image-container .icon-hover {
    position: absolute;
    width: 59.15px;
    height: 99px;
    left: 0.24px;
    top: -1.73px;
    object-fit: fill;
}

#filter-charte {
    width: 87px;
    height: 148.68px;
}

#filter-charte .icon-image-container {
    width: 58px;
    height: 98.68px;
}

#filter-comm {
    width: 125px;
    height: 151px;
}

#filter-comm .icon-image-container {
    width: 82px;
    height: 101px;
}

/* Styles communs */
.icon-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px;
    gap: 10px;
    cursor: pointer;
}

.icon-image-container {
    position: relative;
}

.icon-default,
.icon-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-hover {
    opacity: 0;
}

.icon-item:hover .icon-default,
.icon-item.active .icon-default {
    opacity: 0;
}

.icon-item:hover .icon-hover,
.icon-item.active .icon-hover {
    opacity: 1;
}

/* ── Eyes Follow Mouse — Pixel-perfect Figma positions ─────── */
.icon-eyes-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.eye-pair {
    position: relative;
    width: 100%;
    height: 100%;
}

.eye-wrapper {
    position: absolute;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.3s ease;
}

.icon-item:hover .eye-wrapper,
.icon-item.active .eye-wrapper {
    transform: scale(1.2);
    filter: drop-shadow(0px 2px 5px rgba(0, 0, 0, 0.25));
}

.eye-outline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

.pupil {
    position: absolute;
    object-fit: fill;
    will-change: transform;
    /* JS sets transform: translate(calc(-50% + Xpx), calc(-50% + Ypx)) */
}

/* ── Illu — container: 58×94.91px ────────────────────────────── */
/* Œil 1 */
.eye-wrapper[data-eye-id="1"] {
    left:   10.49px;
    top:    76.77px;
    width:  14.26px;
    height: 14.26px;
}
.pupil[data-eye="1"] {
    /* Figma: pupille at (14.05, 76.98) — eye at (10.49, 76.77) */
    top:    0.21px;
    left:   3.56px;
    width:  8.81px;
    height: 7.97px;
}

/* Œil 2 */
.eye-wrapper[data-eye-id="2"] {
    left:   35.24px;
    top:    76.77px;
    width:  14.26px;
    height: 14.26px;
}
.pupil[data-eye="2"] {
    /* Figma: pupille at (37.54, 78.24) — eye at (35.24, 76.77) */
    top:    1.47px;
    left:   2.30px;
    width:  9.23px;
    height: 7.97px;
}

/* ── Charte (ID) — container: 58×98.68px ─────────────────────── */
/* Œil 3 */
.eye-wrapper[data-eye-id="3"] {
    left:   29px;
    top:    34.04px;
    width:  11.35px;
    height: 10.09px;
}
.pupil[data-eye="3"] {
    /* Figma: pupille at (33.2, 34.04) — eye at (29, 34.04) */
    top:    0px;
    left:   4.20px;
    width:  7.14px;
    height: 5.88px;
}

/* ── Comm — container: 82×101px ──────────────────────────────── */
/* Œil 4 */
.eye-wrapper[data-eye-id="4"] {
    left:   12.62px;
    top:    19.77px;
    width:  29.86px;
    height: 31.13px;
}
.pupil[data-eye="4"] {
    /* Figma: pupille at (19.35, 20.61) — eye at (12.62, 19.77) */
    top:    0.84px;
    left:   6.73px;
    width:  21.45px;
    height: 20.19px;
}

/* Œil 5 */
.eye-wrapper[data-eye-id="5"] {
    left:   49.84px;
    top:    17.25px;
    width:  28.60px;
    height: 31.97px;
}
.pupil[data-eye="5"] {
    /* Figma: pupille at (58.47, 17.25) — eye at (49.84, 17.25) */
    top:    0px;
    left:   8.63px;
    width:  18.93px;
    height: 21.03px;
}

.icon-item p {
    font-family: 'Source Code Pro', monospace;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    color: #101010;
}

#filter-illu p {
    width: 127px;
    height: 36px;
}

#filter-charte p {
    width: 87px;
    height: 40px;
}

#filter-comm p {
    width: 125px;
    height: 40px;
}

/* Projects Section */
.projects-section {
    padding: 10px 5% 6rem;
    display: flex;
    justify-content: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    /* Selon Figma (726 - 706) */
    max-width: 1432px;
    width: 100%;
}

.project-item {
    display: block;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    background: #ffffff;
    /* Fond blanc pour que l'image s'éclaircisse avec l'opacité */
    aspect-ratio: 706 / 493;
    /* Force la proportion exacte Figma */
    border-radius: 8px; /* Border radius requested by user */
    border: 1px dashed transparent;
    transition: border-color 0.4s ease;
}



.hidden-project {
    display: none !important;
}

/* Base state */
.project-base {
    width: 100%;
    height: 100%;
}

.project-base img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}



/* Hover image container — applies the gooey distortion to the masked child */
.project-hover-bg {
    position: absolute;
    top: -60px;
    left: -60px;
    width: calc(100% + 120px);
    height: calc(100% + 120px);
    z-index: 1;
    filter: url(#holy-grail-gooey);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* liquid-texture warps the HD image pixels, and the SVG mask cuts it into a gooey blob */
.project-hover-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: url(#liquid-texture);
    -webkit-mask-image: radial-gradient(circle at calc(var(--mask-x, 50%) + 60px) calc(var(--mask-y, 50%) + 60px), black 0%, black var(--mask-radius, 0px), transparent calc(var(--mask-radius, 0px) + 2px));
    mask-image: radial-gradient(circle at calc(var(--mask-x, 50%) + 60px) calc(var(--mask-y, 50%) + 60px), black 0%, black var(--mask-radius, 0px), transparent calc(var(--mask-radius, 0px) + 2px));
    will-change: mask-image, -webkit-mask-image, filter;
    transform-origin: center center;
}

/* Réduction spécifique du zoom pour la miniature illustration pour éviter de trop couper l'image */
.project-item[data-category="illu"] .project-hover-bg img {
    -webkit-transform: scale(1.04);
    transform: scale(1.04);
}

/* Hover content container — no filter here to keep text/icon crisp */
.project-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.project-hover-content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    transition: opacity 0.4s ease;
}

@media (hover: hover) {
    .project-item:hover .project-hover-content {
        opacity: 1;
    }
}

.project-hover-title {
    font-family: 'Source Code Pro', monospace;
    font-weight: 700;
    font-size: 35.7165px;
    line-height: 45px;
    color: #101010;
    margin-bottom: 8px;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.project-hover-subtitle {
    font-family: 'Source Code Pro', monospace;
    font-weight: 700;
    font-size: 16px;
    line-height: 20px;
    color: #101010;
    margin-bottom: 20px;
    max-width: 80%;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.4);
}

.project-hover-icon {
    object-fit: contain;
    /* subtle dynamic pop in the mask */
    transform: scale(var(--mask-icon-scale, 0.8));
    opacity: var(--mask-icon-opacity, 0);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

/* Precision icon heights according to Figma */
.project-hover-icon[src*="Illustration.webp"] {
    height: 94.91px;
}

.project-hover-icon[src*="Charte.webp"] {
    height: 98.68px;
}

.project-hover-icon[src*="Comm.webp"],
.project-hover-icon[src*="Comm-color.webp"] {
    height: 101px;
}

/* Photographie & Lucky Cart Theme Colors */
.project-hover[data-theme="photographie"] .project-hover-title,
.project-hover[data-theme="photographie"] .project-hover-subtitle,
.project-hover[data-theme="lucky-cart"] .project-hover-title,
.project-hover[data-theme="lucky-cart"] .project-hover-subtitle {
    color: #BAB4FF;
    text-shadow: none;
}

.project-detail-page {
    min-height: calc(100vh - 200px);
    background-color: #ffffff;
}

/* Footer */
.site-footer {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0px 0px 70px;
    width: 100%;
    max-width: 1432px;
    height: 357.99px;
    margin: 0 auto;
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

/* Footer – Line */
.footer-line-img {
    width: 100%;
    max-width: 1432px;
    margin: 0;
    display: block;
    height: auto;
    object-fit: contain;
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Frame 12 */
.footer-frame-12 {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 0px 40px;
    box-sizing: border-box;
    gap: 0px;
    width: 100%;
    max-width: 1432px;
    height: 267.99px;
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Logo primaire dans le footer */
.footer-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 120px;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.footer-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

/* Frame 11 */
.footer-frame-11 {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0px;
    gap: 20px;
    width: 100%;
    max-width: 1432px;
    height: 90px;
    flex: none;
    order: 1;
    flex-grow: 0;
}


.footer-frame-17 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 3px 0px;
    gap: 20px;
    max-width: 1272px;
    height: 90px;
}

.contact-info {
    display: flex;
    align-items: center;
    padding: 0px;
    gap: 19px;
    height: 32px;
}

.contact-icon {
    width: 32px;
    height: 32px;
}

.img-icon {
    object-fit: contain;
}

.footer-frame-16 {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0px;
    gap: 26px;
    width: 90px;
    height: 32px;
}

.social-link {
    position: relative;
    width: 32px;
    height: 32px;
    display: inline-block;
}

.social-icon,
.social-icon-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s ease;
}

.social-icon-hover {
    opacity: 0;
}

.social-link:hover .social-icon {
    opacity: 0;
}

.social-link:hover .social-icon-hover {
    opacity: 1;
}

.icon-image-container .icon-default {
    opacity: 1;
}

.icon-image-container .icon-hover {
    opacity: 0;
}

/* Hover when not active: show color */
.icon-image-container:hover:not(.active) .icon-default {
    opacity: 0;
}

.icon-image-container:hover:not(.active) .icon-hover {
    opacity: 1;
}

/* Active state: keep color */
.icon-image-container.active .icon-default {
    opacity: 0;
}

.icon-image-container.active .icon-hover {
    opacity: 0;
}


/* Hover while active: show blur */
.icon-image-container.active:hover .icon-hover {
    opacity: 0;
}

.icon-image-container.active:hover .icon-blur {
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-nav ul {
        gap: 40px;
    }

    .hero-icons {
        gap: 80px;
    }

    /* About & Contact Tablet Overrides */
    .about-section {
        padding: 100px 0 0 0 !important;
        gap: 120px !important;
    }

    .about-hero {
        flex-direction: row !important;
        justify-content: center !important;
        align-items: flex-start !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        padding: 0 40px !important;
        gap: 40px !important;
    }

    .about-bloc1 {
        width: auto !important;
        flex: 1 1 auto !important;
        height: auto !important;
    }

    .about-bloc2 {
        width: 300px !important;
        flex: 0 0 300px !important;
        height: auto !important;
    }

    .about-profile-img {
        display: block !important;
        width: 300px !important;
        height: auto !important;
        max-height: 428px !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }

    .desktop-only-contact {
        display: none !important;
    }

    .mobile-tablet-only-contact {
        display: flex !important;
        flex-direction: row !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: 15px !important;
        margin-top: 20px !important;
        width: 100% !important;
        height: auto !important;
    }

    .projects-section {
        padding: 10px 20px 4rem !important;
    }

    .projects-grid {
        gap: 36px 20px !important;
    }

    /* Mobile & Tablet Homepage Project Thumbnails Caption Styling */
    .project-item {
        display: flex !important;
        flex-direction: column !important;
        aspect-ratio: auto !important;
        overflow: visible !important;
        background: transparent !important;
        border: none !important;
        text-decoration: none !important;
    }

    .project-base {
        width: 100% !important;
        aspect-ratio: 706 / 493 !important;
        height: auto !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        position: relative !important;
        flex-shrink: 0 !important;
    }

    .project-base img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 8px !important;
        display: block !important;
    }

    .project-hover-bg {
        display: none !important;
    }

    .project-hover {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        height: auto !important;
        display: block !important;
        pointer-events: auto !important;
        transform: none !important;
        z-index: 1 !important;
    }

    .project-hover-content {
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        padding: 12px 10px 0 10px !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    .project-hover-title {
        font-family: 'Source Code Pro', monospace !important;
        font-weight: 700 !important;
        font-size: clamp(16px, 3.5vw, 20px) !important;
        line-height: 1.3 !important;
        color: #101010 !important;
        margin: 0 0 6px 0 !important;
        text-shadow: none !important;
    }

    .project-hover-subtitle {
        font-family: 'Source Code Pro', monospace !important;
        font-weight: 500 !important;
        font-size: clamp(12px, 2.6vw, 14px) !important;
        line-height: 1.4 !important;
        color: #444444 !important;
        margin: 0 !important;
        max-width: 100% !important;
        text-shadow: none !important;
    }

    .project-hover-icon {
        display: none !important;
    }

    .about-contact-form {
        width: 90% !important;
        max-width: 550px !important;
        height: auto !important;
        padding: 40px 50px !important;
    }
}

@media (max-width: 950px) {
    .about-hero {
        flex-direction: column-reverse !important;
        align-items: center !important;
        padding: 0 20px 0 20px !important;
        gap: 30px !important;
        position: relative !important;
    }
    
    .about-bloc1 {
        width: 100% !important;
        max-width: 500px !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .about-h1 {
        text-align: center !important;
    }
    
    .about-desc, .about-skills {
        text-align: center !important;
    }
    
    .about-rs {
        display: flex !important;
        justify-content: center !important;
    }
    
    .about-bloc2 {
        width: 100% !important;
        align-items: center !important;
    }
    
    .about-profile-img {
        width: 240px !important;
        height: 342px !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }
    
    .about-contact-info {
        position: static !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        margin-top: 20px !important;
    }

    .projects-grid {
        grid-template-columns: 1fr !important;
        max-width: 650px !important;
        margin: 0 auto !important;
        gap: 32px !important;
    }
}

@media (max-width: 768px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 15px 5%;
        position: relative;
    }

    /* Show burger menu on mobile */
    .menu-burger {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 16px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 101;
    }

    .burger-bar {
        width: 100%;
        height: 2px;
        background-color: #101010;
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Animating the burger into X on check */
    .menu-toggle-cb:checked ~ .menu-burger .burger-bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle-cb:checked ~ .menu-burger .burger-bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .menu-toggle-cb:checked ~ .menu-burger .burger-bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile Nav Drawer Dropdown */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #ffffff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #f0f0f0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99;
    }


    .menu-toggle-cb:checked ~ .main-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav ul {
        flex-direction: column;
        padding: 24px 5%;
        gap: 20px;
        align-items: center;
    }

    .hero {
        padding: 10px 20px 30px;
    }

    .hero-icons {
        flex-direction: row !important;
        gap: 0px !important;
        justify-content: center !important;
        align-items: center !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 20px 0px !important;
    }

    .icon-item {
        transform: scale(0.72) !important;
        transform-origin: center center !important;
        flex: 0 0 auto !important;
    }

    .footer-frame-12 {
        height: auto;
    }

    .footer-frame-11 {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        height: auto;
    }

    .footer-frame-17 {
        align-items: center;
        height: auto;
    }

    /* Stack project thumbnails vertically on mobile */
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        gap: 8px !important;
        height: auto !important;
    }

    .contact-info a {
        font-size: 12px !important;
    }
    
    .contact-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .footer-frame-16 {
        width: auto !important;
        height: auto !important;
        gap: 15px !important;
    }

    .social-link {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Active Icon Button Styles */
.icon-item.active .button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 2px;
    width: 87px;
    height: 35px;
    flex: none;
    order: 2;
    flex-grow: 0;
}

.icon-item.active .button .label {
    width: 87px;
    height: 20px;
    font-family: 'Source Code Pro';
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #101010;
    flex: none;
    order: 0;
    flex-grow: 0;
}

.icon-item.active .button .line {
    display: none;
    width: 84.53px;
    height: 0.12px;
    border: 1px solid #101010;
    transform: rotate(0.08deg);
    flex: none;
    order: 1;
    flex-grow: 0;
}

.icon-item.active .button .arrow {
    width: 13px;
    height: 22px;
    transform: rotate(-90deg);
    flex: none;
    order: 2;
    flex-grow: 0;
}

.icon-item.active .button .arrow .vector {
    position: absolute;
    left: 6.69%;
    right: 12.5%;
    top: 6.79%;
    bottom: 2.25%;
    background: #101010;
    border: 1px solid #101010;
    transform: rotate(-90deg);
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Default hidden button */
.button {
    display: none;
}

/* Button image styling */
.button-img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* =====================================================
   Section À Propos & Contact
   ===================================================== */
.about-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 158px 0 0 0;
    gap: 200px; /* Increased from 96px for more space */
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #FFFFFF;
}

.about-hero {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 0px 40px;
    box-sizing: border-box;
    gap: clamp(40px, 8vw, 175px);
    width: 100%;
    max-width: 1267px;
    height: auto;
    min-height: 652px;
    scroll-margin-top: calc(50vh - 326px); /* Centers the 652px block vertically */
}

/* Bloc 1: Text */
.about-bloc1 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 0px;
    gap: 21px;
    width: 100%;
    max-width: 620px;
    height: auto;
}

.about-h1 {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 3rem);
    line-height: 1.25;
    color: #101010;
    margin: 0;
    width: 100%;
    max-width: 620px;
    height: auto;
}

.about-desc {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(12px, 1.1vw, 14px);
    line-height: 1.45em;
    color: #101010;
    margin: 0;
    width: 100%;
    max-width: 618px;
    height: auto;
}

.about-skills {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 800;
    font-size: clamp(12px, 1.1vw, 14px);
    line-height: 1.45em;
    color: #101010;
    margin: 0;
    width: 100%;
    max-width: 576px;
    height: auto;
}

.about-rs {
    position: relative;
    width: 58px;
    height: 56px;
}
.about-rs-bg {
    position: absolute;
    width: 57px;
    height: 56px;
    left: 0px;
    top: 0px;
    background: #101010;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.3s ease;
}
.about-rs-bg:hover {
    transform: scale(1.05);
}
.about-rs-icon {
    width: 32px;
    height: 32px;
    filter: invert(1);
    display: block;
}

/* Bloc 2: Image & Contact Info */
.about-bloc2 {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    gap: 28px;
    width: 100%;
    max-width: 467px;
    height: auto;
}

.about-profile-img {
    width: 100%;
    max-width: 408px;
    height: auto;
    aspect-ratio: 408 / 586;
    object-fit: cover;
}

.about-contact-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 3px 0px;
    gap: 20px;
    width: 100%;
    max-width: 467px;
    height: auto;
    justify-content: center;
}

.mobile-tablet-only-contact {
    display: none !important;
}

.contact-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 19px;
    border: none;
    padding: 0px 12px;
    height: 32px;
    box-sizing: border-box;
    text-decoration: none;
    color: #101010;
    transition: background-color 0.3s, color 0.3s;
}

.email-contact {
    width: 320px;
}

.phone-contact {
    width: 180px;
}

.contact-item:hover {
    background-color: #101010;
    color: #FFFFFF;
}

.contact-item:hover .contact-item-icon {
    filter: invert(1);
}

.contact-item-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: filter 0.3s;
}
.contact-item span {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
}

/* Marquee / Form Area */
.about-contact-area {
    position: relative;
    width: 100%;
    /* Form overlaps marquee */
    padding-bottom: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.marquee-container {
    width: 100vw;
    height: 127px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    background: #FFFFFF;
}

.marquee-text {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 700;
    font-size: 72.57px;
    line-height: 91px;
    white-space: nowrap;
    animation: marquee 20s linear infinite;
    color: transparent;
    -webkit-text-stroke: 2px #101010;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Contact Form */
.about-contact-form {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 50px 80px 67px 80px;
    gap: 28px;
    position: relative;
    margin-top: -63px; /* Overlaps with marquee according to spec */
    width: 782px;
    height: 861px;
    background: #FFFFFF;
    border: 1px solid #101010;
    z-index: 10;
}

.form-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 13px;
    width: 100%;
}

.form-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.form-group label {
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 20.6px;
    line-height: 26px;
    color: #101010;
}

.form-group input, .form-group textarea {
    box-sizing: border-box;
    width: 100%;
    background: #FFFFFF;
    border: 1.4px solid #101010;
    font-family: 'Source Code Pro', monospace;
    font-size: 16px;
    padding: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus, .form-group textarea:focus {
    border-color: #555555;
}

.form-group input {
    height: 69px;
}

.form-group textarea {
    height: 203px;
    resize: none;
}

.form-btn {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 305px;
    height: 69px;
    background: #101010;
    color: #FFFFFF;
    font-family: 'Source Code Pro', monospace;
    font-style: normal;
    font-weight: 400;
    font-size: 20.6px;
    line-height: 26px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}
.form-btn:hover {
    background: #7c7c7c;
}
.marquee-img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

/* =====================================================
   Mobile Responsive Overrides (Appliquées en fin de fichier)
   ===================================================== */
@media (max-width: 768px) {
    .about-section {
        padding: 60px 0 0 0 !important;
        gap: 60px !important;
    }

    .about-hero {
        flex-direction: column-reverse !important;
        justify-content: flex-start !important;
        align-items: center !important;
        height: auto !important;
        width: 100% !important;
        padding: 0 15px 0 15px !important;
        gap: 25px !important;
        position: relative !important;
    }

    .about-bloc1 {
        width: 100% !important;
        flex: none !important;
        max-width: 320px !important;
        height: auto !important;
        align-items: center !important;
        text-align: center !important;
        gap: 8px !important;
    }

    .about-h1 {
        width: 100% !important;
        height: auto !important;
        text-align: center !important;
    }

    .about-desc {
        width: 100% !important;
        height: auto !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .about-skills {
        width: 100% !important;
        height: auto !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .about-rs {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
        height: 35px !important;
        margin: 0 !important;
    }
    
    .about-rs-bg {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        width: 36px !important;
        height: 35px !important;
    }
    
    .about-rs-icon {
        width: 20px !important;
        height: 20px !important;
    }

    .about-bloc2 {
        width: 100% !important;
        flex: none !important;
        height: auto !important;
        gap: 0 !important;
        align-items: center !important;
    }

    .about-profile-img {
        width: 180px !important;
        height: 257px !important;
        object-fit: cover !important;
        border-radius: 6px !important;
    }

    .about-contact-info {
        position: static !important;
        width: 100% !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 8px !important;
        height: auto !important;
        padding: 0 !important;
        justify-content: center !important;
        margin-top: 20px !important;
    }
    
    .email-contact,
    .phone-contact {
        width: auto !important;
        max-width: 100% !important;
        gap: 8px !important;
        padding: 4px 12px !important;
        height: 38px !important;
    }
    
    .contact-item-icon {
        width: 18px !important;
        height: 18px !important;
    }
    
    .contact-item span {
        font-size: 12px !important;
        line-height: 16px !important;
    }

    /* Marquee mobile overrides */
    .marquee-container {
        height: 60px !important;
    }
    
    .marquee-text {
        font-size: 32px !important;
        line-height: 40px !important;
        -webkit-text-stroke: 1px #101010 !important;
    }

    /* Contact Form mobile overrides */
    .about-contact-form {
        width: calc(100% - 30px) !important;
        max-width: 440px !important;
        height: auto !important;
        padding: 30px 20px 40px 20px !important;
        margin-top: -30px !important;
        gap: 20px !important;
    }

    .form-row {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .form-group {
        gap: 6px !important;
    }

    .form-group label {
        font-size: 12px !important;
        line-height: 16px !important;
    }

    .form-group input {
        height: 48px !important;
        font-size: 12px !important;
        padding: 10px !important;
    }

    .form-group textarea {
        height: 120px !important;
        font-size: 12px !important;
        padding: 10px !important;
    }

    .form-btn {
        width: 100% !important;
        max-width: 240px !important;
        height: 48px !important;
        font-size: 12px !important;
        line-height: 16px !important;
        margin-top: 10px !important;
    }
}


/* ========================================================
   MOBILE/TABLET : Navigation instantanée et zéro latence
   ======================================================== */
@media (hover: none), (max-width: 1024px) {

    /* 1. Suppression totale de toutes les transitions sur mobile —
          aucun fondu, aucun délai entre le touch et l'action */
    *, *::before, *::after {
        transition: none !important;
        animation-delay: 0s !important;
        transition-delay: 0s !important;
    }

    /* 2. Éliminer le délai de 300ms du navigateur sur tous les éléments cliquables
          (touch-action: manipulation est la seule méthode CSS fiable) */
    a, button, label, .logo-container, .main-nav a, .menu-burger,
    [role="button"], a img, button img, .nav-arrow, .nav-arrow img {
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent !important;
        user-select: none !important;
        -webkit-user-select: none !important;
    }

    /* 3. Feedback visuel instantané au touch (sans transition) */
    a:active, button:active, .logo-container:active,
    .nav-arrow:active, .btn-contact:active {
        opacity: 0.6 !important;
        transform: scale(0.96) !important;
    }
}

/* Base wrapper to strictly prevent any horizontal scrolling and element layout breaks on mobile devices */
.app-wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    position: relative;
}

