/* ============================================
   Moment'Home — Page Projet
   Extends style.css custom properties & patterns
   ============================================ */

/* --- Project Hero --- */
.projet-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    margin-top: var(--nav-height);
}

.projet-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.projet-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projet-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(61, 43, 31, 0.92) 0%,
        rgba(61, 43, 31, 0.5) 40%,
        rgba(61, 43, 31, 0.15) 100%
    );
    z-index: 1;
}

.projet-hero__content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 60px 24px 48px;
    color: var(--white);
}

.projet-hero__badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: #2E7D32;
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 100px;
    margin-bottom: 16px;
}

.projet-hero__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.projet-hero__address {
    font-size: 1rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.projet-hero__price {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    font-weight: 700;
    margin-bottom: 24px;
}

/* Hero price row with PEB logo */
.projet-hero__price-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.projet-hero__price-row .projet-hero__price {
    margin-bottom: 0;
}

.projet-hero__peb {
    height: 44px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.projet-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background-color: var(--brown);
    color: var(--white);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
}

.projet-hero__cta:hover {
    background-color: var(--brown-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(139, 111, 71, 0.3);
}


/* --- Specs Grid --- */
.projet-specs {
    padding: 60px 0;
    background-color: var(--white);
}

.projet-specs__grid {
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.projet-specs__grid li {
    padding: 20px 16px;
    background-color: var(--cream);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.projet-specs__grid li strong {
    font-size: 1.25rem;
    color: var(--brown-dark);
}

.projet-specs__grid li span {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* PEB logo in specs grid */
.projet-specs__peb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.projet-specs__peb img {
    height: 36px;
    width: auto;
    margin-bottom: 4px;
}

@media (min-width: 480px) {
    .projet-specs__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .projet-specs__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .projet-specs__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}


/* --- Photo Gallery --- */
.projet-galerie {
    padding: 60px 0;
    background-color: var(--cream);
}

.projet-galerie h2,
.projet-renovation h2,
.projet-avant-apres h2,
.projet-localisation h2,
.projet-video h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brown-dark);
    margin-bottom: 12px;
}

.projet-galerie__subtitle,
.projet-renovation__subtitle,
.projet-avant-apres__subtitle {
    color: var(--text-light);
    margin-bottom: 32px;
    line-height: 1.7;
}

.projet-galerie__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.projet-galerie__item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
}

.projet-galerie__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.projet-galerie__item:hover img {
    transform: scale(1.05);
}

.projet-galerie__item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(61, 43, 31, 0);
    transition: background 0.3s ease;
    pointer-events: none;
}

.projet-galerie__item:hover::after {
    background: rgba(61, 43, 31, 0.08);
}

@media (min-width: 480px) {
    .projet-galerie__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (min-width: 768px) {
    .projet-galerie__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

@media (min-width: 1024px) {
    .projet-galerie__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}


/* --- Lightbox --- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox__img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.5);
}

.lightbox__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox__nav--prev {
    left: 16px;
}

.lightbox__nav--next {
    right: 16px;
}

.lightbox__counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    font-family: var(--font-body);
}


/* --- Video Section --- */
.projet-video {
    padding: 60px 0;
    background-color: var(--white);
}

.projet-video__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--brown-dark);
    cursor: pointer;
}

.projet-video__wrapper--portrait {
    padding-bottom: 0;
    max-width: 400px;
    height: auto;
    aspect-ratio: 9/16;
    margin: 0 auto;
}

.projet-video__wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.projet-video__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: var(--white);
    background: linear-gradient(135deg, var(--brown-dark) 0%, #5a3f2b 100%);
}

.projet-video__play {
    width: 72px;
    height: 72px;
    background: var(--brown);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.projet-video__wrapper:hover .projet-video__play {
    transform: scale(1.1);
    box-shadow: 0 4px 24px rgba(139, 111, 71, 0.4);
}

.projet-video__placeholder span {
    font-size: 0.95rem;
    opacity: 0.7;
}


/* --- Renovation Details --- */
.projet-renovation {
    padding: 60px 0;
    background-color: var(--cream);
}

.projet-renovation__grid {
    display: grid;
    gap: 16px;
}

.projet-renovation__item {
    background: var(--white);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(139, 111, 71, 0.08);
}

.projet-renovation__item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--brown-dark);
    margin-bottom: 8px;
}

.projet-renovation__item p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}

@media (min-width: 768px) {
    .projet-renovation__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

@media (min-width: 1024px) {
    .projet-renovation__grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}


/* --- Before/After Carousel --- */
.projet-avant-apres {
    padding: 60px 0;
    background-color: var(--white);
}

.ba-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    background: var(--cream);
}

.ba-carousel__track {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ba-slide {
    min-width: 100%;
    padding: 20px;
}

/* Standard pair: side by side */
.ba-slide__pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ba-slide__side {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.ba-slide__side img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    display: block;
}

.ba-slide__label {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 5px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 4px;
    color: var(--white);
}

.ba-slide__label--avant {
    background: rgba(61, 43, 31, 0.8);
}

.ba-slide__label--apres {
    background: rgba(46, 125, 50, 0.85);
}

/* Special slide: 1 pièce → 2 pièces */
.ba-slide__note {
    text-align: center;
    font-size: 0.9rem;
    color: var(--brown-dark);
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
}

.ba-slide__trio {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.ba-slide__side--single {
    display: flex;
    align-items: center;
}

.ba-slide__side--single img {
    aspect-ratio: 4/3;
}

.ba-slide__side-group {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
}

.ba-slide__side-group .ba-slide__side img {
    aspect-ratio: 4/3;
}

/* Controls */
.ba-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px 4px;
}

.ba-carousel__btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(139, 111, 71, 0.2);
    background: var(--white);
    color: var(--brown-dark);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.ba-carousel__btn:hover {
    background: var(--brown);
    color: var(--white);
    border-color: var(--brown);
}

.ba-carousel__caption {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--brown-dark);
    font-weight: 600;
    text-align: center;
    min-width: 0;
    flex: 1;
}

.ba-carousel__counter {
    font-size: 0.8rem;
    color: var(--text-light);
    flex-shrink: 0;
}

/* Dots */
.ba-carousel__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px 20px;
}

.ba-carousel__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(139, 111, 71, 0.2);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}

.ba-carousel__dot.active {
    background: var(--brown);
    transform: scale(1.3);
}

/* Touch swipe feedback */
.ba-carousel__track.dragging {
    transition: none;
}

@media (min-width: 768px) {
    .ba-slide {
        padding: 28px;
    }

    .ba-slide__pair,
    .ba-slide__trio {
        gap: 16px;
    }

    .ba-slide__label {
        font-size: 0.8rem;
        padding: 6px 16px;
    }

    .ba-carousel__caption {
        font-size: 1.15rem;
    }
}

@media (min-width: 1024px) {
    .ba-slide {
        padding: 36px;
    }

    .ba-slide__pair,
    .ba-slide__trio {
        gap: 20px;
    }
}


/* --- Location --- */
.projet-localisation {
    padding: 60px 0;
    background-color: var(--cream);
}

.projet-localisation__content {
    display: grid;
    gap: 32px;
}

.projet-localisation__address {
    font-size: 1.1rem;
    color: var(--brown-dark);
    font-weight: 600;
    margin-bottom: 16px;
}

.projet-localisation__list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.projet-localisation__list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-light);
    font-size: 0.95rem;
}

.projet-localisation__list li svg {
    flex-shrink: 0;
    color: var(--brown);
}

.projet-localisation__map {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: var(--white);
    border: 1px solid rgba(139, 111, 71, 0.1);
}

.projet-localisation__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (min-width: 768px) {
    .projet-localisation__content {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}


/* --- Project Contact --- */
.projet-contact {
    padding: 60px 0;
    background-color: var(--brown-dark);
    color: var(--white);
}

.projet-contact__inner {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.projet-contact__title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.projet-contact__subtitle {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
    line-height: 1.7;
}

.projet-contact__cards {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.projet-contact__card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: var(--white);
    transition: all 0.2s;
}

.projet-contact__card:hover {
    background-color: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.projet-contact__card svg {
    flex-shrink: 0;
    color: var(--brown-light);
}

.projet-contact__card strong {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    margin-bottom: 2px;
}

.projet-contact__card span {
    font-size: 1.1rem;
    font-weight: 600;
}

.projet-contact__socials {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.projet-contact__socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s;
}

.projet-contact__socials a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}


/* --- Responsive type scale --- */
@media (min-width: 768px) {
    .projet-hero__title {
        font-size: 2.6rem;
    }

    .projet-hero__price {
        font-size: 3rem;
    }

    .projet-galerie h2,
    .projet-renovation h2,
    .projet-avant-apres h2,
    .projet-localisation h2,
    .projet-video h2,
    .projet-contact__title {
        font-size: 2.2rem;
    }

    .projet-contact__cards {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .projet-hero {
        min-height: 75vh;
    }

    .projet-hero__content {
        padding: 80px 24px 60px;
    }

    .projet-hero__title {
        font-size: 3rem;
    }

    .projet-specs,
    .projet-galerie,
    .projet-video,
    .projet-renovation,
    .projet-avant-apres,
    .projet-localisation,
    .projet-contact {
        padding: 80px 0;
    }
}
