.design-page {
    padding-top: 4rem;
}

.design-project {
    scroll-margin-top: 6rem;
    margin-top: 2.5rem;
    padding: 1.6rem 1.6rem 1.8rem;
    border-radius: 0.9rem;
    border: 1px solid var(--line);
    background:
        radial-gradient(70% 60% at 0% 0%, rgba(255, 161, 53, 0.07), transparent 70%),
        rgba(255, 255, 255, 0.03);
}

.design-project:target {
    border-color: rgba(255, 161, 53, 0.6);
}

.design-head {
    display: grid;
    gap: 0.7rem;
    justify-items: start;
    max-width: 52rem;
}

.design-head h2 {
    font-size: clamp(2.2rem, 4vw, 3.4rem);
    letter-spacing: -0.02em;
}

.design-desc {
    margin: 0;
    color: #e7e3dd;
}

/* ---- Galerie : 3 images, chacune s'agrandit au clic ---- */
.design-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.6rem;
}

.design-fig {
    margin: 0;
}

.design-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 0.7rem;
    background: #0b0b0d;
    cursor: zoom-in;
}

.design-open img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 500ms ease;
}

.design-fig.is-light .design-open {
    background: #f4f1ea;
}

.design-fig.is-light .design-open img {
    object-fit: contain;
}

.design-open:hover img,
.design-open:focus-visible img {
    transform: scale(1.05);
}

.design-open:focus-visible {
    outline: 2px solid #ffa135;
    outline-offset: 2px;
}

.design-zoom {
    position: absolute;
    right: 0.7rem;
    bottom: 0.7rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 200ms ease, transform 200ms ease;
}

.design-open:hover .design-zoom,
.design-open:focus-visible .design-zoom {
    opacity: 1;
    transform: none;
}

.design-fig figcaption {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.design-back {
    margin: 2.2rem 0 0;
}

/* ---- Visionneuse plein écran ---- */
.design-lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text);
}

.design-lightbox[open] {
    display: grid;
    place-items: center;
}

.design-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
}

.design-lb-fig {
    margin: 0;
    display: grid;
    gap: 0.7rem;
    justify-items: center;
    max-width: calc(100vw - 9rem);
}

.design-lb-fig img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 8rem);
    max-height: calc(100dvh - 8rem);
    border-radius: 0.6rem;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
    background: #f4f1ea;
}

.design-lightbox[open] .design-lb-fig img {
    animation: lb-in 260ms ease;
}

@keyframes lb-in {
    from { opacity: 0; transform: scale(0.97); }
    to   { opacity: 1; transform: none; }
}

.design-lb-fig figcaption {
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.design-lb-close,
.design-lb-nav {
    position: absolute;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.6);
    color: var(--text);
    cursor: pointer;
}

.design-lb-close {
    top: 1rem;
    right: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1rem;
}

.design-lb-nav {
    top: 50%;
    width: 3rem;
    height: 3rem;
    transform: translateY(-50%);
    font-size: 1.8rem;
    line-height: 1;
}

.design-lb-prev { left: 1rem; }
.design-lb-next { right: 1rem; }

.design-lb-close:hover,
.design-lb-close:focus-visible,
.design-lb-nav:hover,
.design-lb-nav:focus-visible {
    background: #ffa135;
    color: #050505;
}

@media (max-width: 860px) {
    .design-gallery {
        grid-template-columns: 1fr;
    }

    .design-project {
        padding: 1.1rem 1.1rem 1.3rem;
    }

    .design-lb-fig {
        max-width: calc(100vw - 1.5rem);
    }

    .design-lb-nav {
        top: auto;
        bottom: 1rem;
        transform: none;
    }
}
