*, html, body {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    text-decoration: none;
}

:root {
    --primary-color: #f7f7f7;
    --secondary-color-025: rgba(12, 12, 12, 0.25);
    --secondary-color-050: rgba(12, 12, 12, 0.5);
    --secondary-color: #0c0c0c;
    --tertiary-color: #636363;
    --card-color: rgba(99, 99, 99, 0.05);
    --first-availability: #00a151;
    --second-availability: rgba(0, 158, 79, 0.05);
    --first-unavailability: #c63f3e;
    --second-unavailability: rgba(244, 67, 54, 0.05);
    --border-subtle: rgba(25, 24, 25, 0.15);
    --btn-credit-background: rgba(250, 250, 250, 0.6);
    --btn-credit-text: #0c0c0c;
    --pattern-ink: rgba(12, 12, 12, 0.14);
    --pattern-cross: rgba(12, 12, 12, 0.08);
}

[data-theme="dark"] {
    --primary-color: #0c0c0c;
    --secondary-color: #f7f7f7;
    --secondary-color-025: rgba(250, 250, 250, 0.25);
    --secondary-color-050: rgba(250, 250, 250, 0.5);
    --tertiary-color: #b3b3b3;
    --card-color: rgba(250, 250, 250, 0.04);
    --first-availability: #00b95d;
    --second-availability: rgba(0, 211, 105, 0.05);
    --border-subtle: rgba(250, 250, 250, 0.1);
    --pattern-ink: rgba(250, 250, 250, 0.08);
    --pattern-cross: rgba(250, 250, 250, 0.02);
}

html, body {
    width: 100%;
    overflow-x: clip;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    font-family: "Instrument Sans", sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

html.no-scroll {
    overflow: hidden !important;
    overscroll-behavior: none;
}

main,
footer {
    position: relative;
    z-index: 1;
    width: 100%;
}

main {
    background-color: transparent;
}

img, video {
    -webkit-user-drag: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: 
        radial-gradient(circle, var(--pattern-ink) 1.35px, transparent 1.45px),
        radial-gradient(circle, var(--pattern-cross) 0.9px, transparent 1px);
    background-size: 22px 22px, 88px 88px;
    background-position: 0 0, 11px 11px;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 1) 100%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 40%, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 1) 100%);
}


/* =========================================
BADGES DE DISPONIBILITÉ
========================================= */

.status-badge {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-available {
    border-color: var(--first-availability);
    color: var(--first-availability);
    background-color: var(--second-availability);
}

.status-available .status-dot {
    background-color: var(--first-availability);
    box-shadow: 0 0 8px rgba(0, 185, 93, 0.6);
    animation: pulse-green 2s infinite;
}

.status-unavailable {
    border-color: var(--first-unavailability);
    color: var(--first-unavailability);
    background-color: var(--second-unavailability);
}

.status-unavailable .status-dot {
    background-color: var(--first-unavailability);
}

@keyframes pulse-green {
    0%, 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 185, 93, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 185, 93, 0); }
}


/* =========================================
LOADER
========================================= */

.page-loader {
    position: fixed;
    inset: 0;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.6s;
}

.page-loader.hidden { 
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 25px;
}

.loader-content > img { 
    width: 100px; 
    height: auto;
    animation: pulse-logo 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-logo {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.65; transform: scale(0.98); }
}

.loader-spinner {
    width: 28px;
    height: 28px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin-smooth 1s cubic-bezier(0.6, 0.2, 0.4, 0.8) infinite;
}

@keyframes spin-smooth {
    to { transform: rotate(360deg); }
}


/* =========================================
HEADER & NAVIGATION
========================================= */

.progress_bar {
    height: 2px;
    background-color: var(--secondary-color);
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    transition: width 0.1s ease;
    z-index: 10;
}

header {
    position: sticky;
    top: 0;
    z-index: 5;
    width: 100%;
    padding: 15px 0;
    background-color: var(--primary-color);
    border-bottom: 1px solid var(--border-subtle);
}

.header-structure,
.footer-content {
    width: 87%;
    max-width: 1200px;
    margin: 0 auto;
}

.header-structure {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
    z-index: 6;
}

.header-structure > a { height: 25px; }
.header-structure > a > img { height: 100%; transition: opacity 0.3s ease; }
.header-structure > a:hover > img,
.footer-logo:hover { opacity: 0.7; }

.logo-light-mode,
.footer-icon-wrapper.footer-icon-light,
.toggle-icon.icon-moon,
.nav-desktop,
[data-theme="dark"] .logo-dark-mode,
[data-theme="dark"] .footer-icon-wrapper.footer-icon-dark,
[data-theme="dark"] .toggle-icon.icon-sun {
    display: none;
}

.logo-dark-mode,
.footer-icon-wrapper.footer-icon-dark,
[data-theme="dark"] .logo-light-mode,
[data-theme="dark"] .footer-icon-wrapper.footer-icon-light {
    display: block;
    height: 100%;
}

.toggle-icon.icon-sun,
[data-theme="dark"] .toggle-icon.icon-moon {
    display: flex;
}

.burger {
    width: 24px; 
    height: 24px;
    display: flex; 
    justify-content: center; 
    align-items: center;
    cursor: pointer;
    position: relative;
}

.burger svg {
    color: var(--secondary-color);
    width: 22px;
    height: 22px;
    position: absolute;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.burger.active svg.open { opacity: 0; transform: rotate(180deg); }
.burger svg.close { opacity: 0; }
.burger.active svg.close { opacity: 1; transform: rotate(180deg); }

.nav-mobile {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: calc(100vh - 56px);
    height: calc(100dvh - 56px);
    background-color: var(--primary-color);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.35s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.35s;
    z-index: 4;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nav-mobile.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.nav-mobile-inner {
    width: 87%;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 32px 0 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
}

.nav-mobile-top {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.nav-mobile-eyebrow {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tertiary-color);
}

.nav-mobile-list {
    display: flex;
    flex-direction: column;
    list-style: none;
    width: 100%;
    border-top: 1px solid var(--border-subtle);
}

.nav-mobile-list > li {
    border-bottom: 1px solid var(--border-subtle);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-mobile.active .nav-mobile-list > li {
    opacity: 1;
    transform: translateY(0);
}

.nav-mobile.active .nav-mobile-list > li:nth-child(1) { transition-delay: 0.04s; }
.nav-mobile.active .nav-mobile-list > li:nth-child(2) { transition-delay: 0.08s; }
.nav-mobile.active .nav-mobile-list > li:nth-child(3) { transition-delay: 0.12s; }
.nav-mobile.active .nav-mobile-list > li:nth-child(4) { transition-delay: 0.16s; }

.nav-mobile-link {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 0;
    color: var(--secondary-color);
    transition: opacity 0.25s ease;
}

.nav-mobile-link:active,
.nav-mobile-link:hover {
    opacity: 0.65;
}

.nav-mobile-num {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--tertiary-color);
    font-variant-numeric: tabular-nums;
    min-width: 28px;
}

.nav-mobile-label {
    font-size: 1.35rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    color: var(--secondary-color);
    line-height: 1.15;
    margin-right: auto;
}

.nav-mobile-link > i {
    font-size: 1.15rem;
    color: var(--tertiary-color);
    align-self: center;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), color 0.25s ease;
}

.nav-mobile-link:hover > i {
    transform: translate(2px, -2px);
    color: var(--secondary-color);
}

.nav-mobile-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 18px;
    border-top: 1px solid var(--border-subtle);
}

.nav-mobile-theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-mobile-theme-label {
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--tertiary-color);
}

.nav-mobile-theme-row .toggle-icon svg {
    width: 20px;
    height: 20px;
}

.dark_mode {
    display: flex;
    align-items: center;
}

.theme-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    -webkit-tap-highlight-color: transparent;
    transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-toggle:hover {
    opacity: 0.7;
    transform: rotate(15deg);
}

.toggle-icon {
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.toggle-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}


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

footer {
    background-color: var(--primary-color);
    padding: 35px 0 28px;
    border-top: 1px solid var(--border-subtle);
}

.footer-content {
    display: flex;
    flex-direction: column;
}

.upper-footer {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 22px;
}

.footer-logo {
    display: inline-block;
    height: 28px;
    width: fit-content;
    transition: opacity 0.3s ease;
}

.footer-icon-wrapper {
    height: 100%;
}

.footer-icon-wrapper > img {
    height: 100%;
    width: auto;
    display: block;
}

.middle-footer {
    display: flex;
    flex-direction: column;
    gap: 26px;
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px 0;
}

.middle-footer > div {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-heading {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.nav-footer > nav > ul,
.nav-res > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 18px;
    row-gap: 8px;
    list-style: none;
}

.nav-link,
.social-link,
.legal-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--secondary-color);
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    transition: color 0.25s ease, opacity 0.25s ease;
}

.social-link {
    text-transform: uppercase;
    gap: 5px;
}

.legal-link {
    text-transform: uppercase;
    width: fit-content;
}

.nav-link > i,
.legal-link > i {
    font-size: 0.9rem;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover > i,
.legal-link:hover > i {
    transform: translate(2px, -2px);
}

.social-link > i {
    font-size: 0.88rem;
}

.lower-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding-top: 22px;
    color: var(--secondary-color);
}

.footer-credits {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.footer-credits .copyright {
    font-size: 0.76rem;
    font-weight: 400;
    letter-spacing: -0.015em;
    color: var(--secondary-color);
}

.footer-credits .made-by {
    font-size: 0.68rem;
    font-weight: 400;
    letter-spacing: -0.01em;
    color: var(--tertiary-color);
}

.credit-name {
    color: var(--secondary-color);
    font-weight: 500;
}


/* =========================================
GRILLE & CARTES PROJETS (COMMUN)
========================================= */

.project-gallery {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 25px;
    width: 100%;
}

.project-item {
    display: block;
    width: 100%;
}

.project-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.project-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--border-subtle);
}

.project-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image > img {
    transform: scale(1.02);
}

.project-content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px 13px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 2;
    pointer-events: none;
}

.meta-project {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-self: flex-end;
}

.meta-project > span {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    color: #f7f7f7;
    background-color: rgba(97, 97, 97, 0.274);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 5px;
    padding: 4px 7px;
}

.meta-project > span.badge-new {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    font-weight: 700;
}

.meta-project > span.badge-new i {
    font-size: 0.65rem; 
    line-height: 1;
}

.project-card h4 {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #f7f7f7;
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.project-card h4 > i {
    font-size: 1.25rem;
    transition: transform 0.5s ease;
}

.project-card:hover h4 > i {
    transform: rotate(-45deg);
}

.no-results {
    width: 100%;
    padding: 40px 0;
    text-align: center;
    color: var(--tertiary-color);
    font-size: 0.92rem;
}


/* =========================================
MEDIA QUERIES
========================================= */

@media screen and (min-width: 425px) {
    .header-structure > a { height: 27px; }
    .burger svg { width: 24px; height: 24px; }
    .meta-project > span { font-size: 0.65rem; padding: 4px 8px; }
}

@media screen and (min-width: 600px) {
    .middle-footer {
        flex-direction: row;
        gap: 65px;
    }
}

@media screen and (min-width: 768px) {
    /* Loader */
    .loader-content { gap: 35px; }
    .loader-content > img { width: 130px; }
    .loader-spinner { width: 34px; height: 34px; border-width: 2px; }

    /* Grille projets */
    .project-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Footer */
    footer { padding: 40px 0 30px; }
    .upper-footer { padding-bottom: 24px; }
    .footer-logo { height: 32px; }
    .middle-footer { gap: 90px; padding: 28px 0; }
    .footer-heading { font-size: 0.95rem; }
    .nav-link, .social-link, .legal-link { font-size: 0.8rem; }
    .footer-credits .copyright { font-size: 0.78rem; }
    .footer-credits .made-by { font-size: 0.7rem; }
    .lower-footer { padding-top: 24px; gap: 18px; }
}

@media screen and (min-width: 1024px) {
    /* Header */
    header { padding: 18px 0; }
    .header-structure > a { height: 29px; }
    .burger, .nav-mobile { display: none !important; }
    .nav-desktop { display: block; }
    .nav-desktop-onglets { display: flex; align-items: center; gap: 30px; list-style: none; flex-wrap: nowrap; }
    .onglet { font-size: 0.88rem; font-weight: 500; letter-spacing: -0.02em; color: var(--secondary-color); transition: opacity 0.3s ease; }
    .onglet:hover { opacity: 0.7; }
    .toggle-icon svg { width: 18px; height: 18px; }

    /* Grille projets */
    .project-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .project-image { border-radius: 16px; }
    .project-card h4 { font-size: 1.08rem; }

    /* Footer */
    footer { padding: 45px 0 35px; }
    .upper-footer { padding-bottom: 26px; }
    .footer-logo { height: 36px; }
    .middle-footer { gap: 110px; padding: 30px 0; }
    .middle-footer > div { gap: 12px; }
    .footer-heading { font-size: 1rem; }
    .nav-footer > nav > ul, .nav-res > ul { column-gap: 22px; }
    .nav-link, .social-link, .legal-link { font-size: 0.82rem; }
    .footer-credits .copyright { font-size: 0.8rem; }
}

@media screen and (min-width: 1280px) {
    .project-card h4 { font-size: 1.12rem; }
}