/* ==========================================================================
   Project Details Specific Styles
   ========================================================================== */

:root {
    --project-header-bg: #F0F7F9;
    --text-primary-color: #156C88;
    --border-light: #E2E8F0;
}

/* --- Breadcrumbs --- */
.breadcrumb-nav .breadcrumb-item a {
    color: var(--body-text);
    text-decoration: none;
    font-size: 0.9rem;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: var(--text-primary-color);
    font-weight: 500;
}

/* --- Page Hero (Breadcrumb section) --- */
.page-hero {
    background-color: #F0F7F9;
    padding: 1.5rem 0; /* Reduced from 2.75rem for consistency + user request */
    margin-bottom: 20px;
}

.page-hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--ink);
    margin: 0;
}

/* --- Project Details Body --- */
.project-details-body {
    border-top: 1px solid #E2E8F0;
    padding-top: 30px;
}

/* --- Project Intro Section (Main Hero Area) --- */
.project-intro-section {
    padding-bottom: 30px !important;
}

.project-intro-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    margin-bottom: 20px;
}

.new-project-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748B;
    margin-bottom: 20px;
}

.badge-dots {
    display: flex;
    gap: 4px;
}

.badge-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot--sante { background-color: var(--v1); }
.dot--emploi { background-color: var(--v3); }

.project-main-title {
    font-size: 2.5rem; /* 40px */
    font-weight: 800;
    line-height: 1.1;
    color: var(--ink);
    margin-bottom: 16px;
}

.project-lead-text {
    font-size: 1rem; /* 16px */
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
}

.intro-image-wrapper {
    border-radius: 32px;
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.intro-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.intro-image-wrapper:hover img {
    transform: scale(1.08);
}

/* --- Details Layout --- */
.details-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 80px;
    margin-bottom: 100px;
}

.en-bref-card {
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    position: sticky;
    top: 120px;
    height: fit-content;
}

.en-bref-title {
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--ink);
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.en-bref-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.en-bref-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px;
    font-size: 0.85rem;
}

.en-bref-label {
    font-weight: 700;
    color: var(--ink);
}

.en-bref-value {
    color: #64748B;
    line-height: 1.5;
}

.en-bref-value a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.en-bref-value a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* --- En Bref Card refinements --- */
.en-bref-item .en-bref-value {
    font-weight: 500;
    color: #64748B;
    text-align: right;
}

/* --- Productions Mini List (Matching Production Page but smaller) --- */
.productions-mini-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 30px;
}

.list-card-mini {
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    padding: 1.25rem;
    display: grid;
    grid-template-columns: 64px 1fr 140px;
    gap: 1.25rem;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none !important;
}

.list-card-mini:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.list-card-mini__icon {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.list-card-mini__icon img {
    width: 64px;
    height: 64px;
    object-fit: contain;
}

.list-card-mini__content {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.list-card-mini .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.list-card-mini .tag,
.list-card-mini a.tag {
    font-size: 0.6rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 50px;
    color: #fff;
    background: #156C88;
    text-decoration: none !important;
}

.list-card-mini .year,
.list-card-mini a.year {
    font-size: 0.6rem;
    font-weight: 800;
    color: #64748B;
    background: #F1F5F9;
    padding: 3px 10px;
    border-radius: 50px;
    text-decoration: none !important;
}

.list-card-mini .card-title-mini {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.4;
    color: #0F172A;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-card-mini .card-title-mini a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.list-card-mini .card-title-mini a:hover {
    color: var(--text-primary-color);
}

.list-card-mini .card-authors-mini {
    font-size: 0.75rem;
    color: #94A3B8;
    font-weight: 500;
}

.list-card-mini .card-dots {
    display: flex;
    gap: 5px;
    margin-top: 2px;
}

.list-card-mini .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.list-card-mini__image {
    width: 140px;
    height: 90px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.list-card-mini__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.list-card-mini:hover .list-card-mini__image img {
    transform: scale(1.08);
}

/* --- Publication Cards (Inline) - Legacy support or alternative --- */
.publication-cards-inline {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 40px;
}

.pub-card-inline {
    display: grid;
    grid-template-columns: 1fr 200px;
    background: white;
    border: 1px solid #F1F5F9;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pub-card-inline:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-color: #E2E8F0;
}

.pub-card-content {
    padding: 24px;
}

.pub-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.pub-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 8px;
    line-height: 1.4;
}

.pub-card-authors {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 12px;
}

.pub-card-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.pub-card-image {
    height: 100%;
    overflow: hidden;
}

.pub-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Volets / Tags --- */
.project-intro-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    position: relative;
    top: 0;
    left: 0;
    z-index: 5;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 5px;
}

.project-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #F1F5F9;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    transition: all 0.2s;
}

.project-tag:hover {
    background: #E2E8F0;
}

.tag-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 100px 0;
    background-color: white;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 40px;
}

.gallery-item {
    aspect-ratio: 1.5;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.gallery-item.video-item::after {
    content: '\F4F4'; /* Bootstrap bi-play-circle-fill */
    font-family: 'bootstrap-icons';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    transition: all 0.3s ease;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.gallery-item.video-item:hover::after {
    transform: translate(-50%, -50%) scale(1.1);
    color: #fff;
}

.gallery-item.video-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.2);
    z-index: 1;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
    border-radius: 12px;
}

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

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item:first-child,
.gallery-item:nth-child(7) {
    grid-column: span 1;
}

.gallery-title-wrapper {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-subtitle {
    font-size: 1.1rem;
    color: #64748B;
    margin-top: 8px;
}

.project-description {
    font-size: 1rem; /* 16px */
    line-height: 1.7;
    color: var(--body-text);
    margin-bottom: 50px;
}

.project-description p {
    margin-bottom: 20px;
}

/* --- Project Team Carousel (Exact same as members bio) --- */
.other-members-section {
    background-color: #F8FAFC;
    border-top: 1px solid var(--border-light);
    padding: 60px 0;
}

.carousel-nav .btn-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-left: 8px;
    cursor: pointer;
}

.carousel-nav .btn-nav:hover {
    background: var(--text-primary-color);
    color: white;
    border-color: var(--text-primary-color);
}

.other-members-carousel {
    overflow: hidden;
    position: relative;
}

.other-members-carousel .row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 20px;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}

.other-members-carousel .row::-webkit-scrollbar {
    display: none;
}

.member-card-mini {
    flex: 0 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-card-mini__image {
    width: 100%;
    aspect-ratio: 1/1.2;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.member-card-mini__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.member-card-mini:hover .member-card-mini__image img {
    transform: scale(1.05);
}

.mini-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-role {
    font-size: 0.8rem;
    color: #64748B;
    margin: 0;
}

/* --- Global Section Utilities --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 40px;
}

.project-details-body h1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--ink);
}

/* --- New Related Projects Design (Matching design image) --- */
.related-projects-section {
    padding: 80px 0;
    background: #F8FAFC;
}

.related-projects-section .news-card {
    border: 1px solid #E2E8F0;
    border-radius: 20px;
    overflow: hidden;
    background: #fff;
    box-shadow: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.related-projects-section .news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
}

.related-projects-section .news-card__img-wrapper {
    height: 220px;
    overflow: hidden;
    border-bottom: 3px solid #156C88; /* Dark teal accent */
}

.related-projects-section .news-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-projects-section .news-card:hover .news-card__img {
    transform: scale(1.08);
}

.related-projects-section .news-card__body {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-meta-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.related-icon {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.related-meta-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.related-meta-info .news-card__dots {
    display: flex;
    gap: 5px;
    margin: 0;
}

.related-meta-info .volet-dot {
    width: 10px;
    height: 10px;
}

.related-category {
    font-size: 0.75rem;
    font-weight: 700;
    color: #26C1F1; /* Bright blue from design */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.related-projects-section .news-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.related-projects-section .news-card__text {
    font-size: 0.9rem;
    color: #64748B;
    margin-bottom: 20px;
    line-height: 1.5;
}

.related-projects-section .news-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 12px;
}

.related-projects-section .news-card__text {
    font-size: 0.85rem;
    color: #64748B;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-projects-section .news-card__link {
    color: #26C1F1; /* Bright blue */
    font-size: 0.9rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    margin-top: auto;
}

.related-projects-section .news-card__link:hover {
    color: #156C88;
}

/* Lightbox Modal refinements */
#galleryModal .modal-content {
    background: transparent;
}

#galleryModal .btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 1060;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.4);
}

.modal-nav-btn.prev { left: -70px; }
.modal-nav-btn.next { right: -70px; }

@media (max-width: 991px) {
    .modal-nav-btn.prev { left: 10px; }
    .modal-nav-btn.next { right: 10px; }
}

/* --- CTA Section --- */
.contact-project-section {
    padding-bottom: 80px;
}

.cta-banner {
    background: linear-gradient(135deg, var(--text-primary-color) 0%, #0d4d61 100%);
    border-radius: 32px;
    padding: 60px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta-text {
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 35px auto;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.btn-cta {
    background: white;
    color: var(--text-primary-color);
    padding: 16px 36px;
    border-radius: 100px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1;
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    color: var(--text-primary-color);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .project-intro-grid,
    .details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .project-main-title {
        font-size: 2.25rem;
    }

    .en-bref-card {
        position: static;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .banner-title {
        font-size: 2rem;
    }

    .project-main-title {
        font-size: 1.75rem;
    }

    .page-hero {
        padding: 0.75rem 0;
        margin-bottom: 15px;
    }

    .page-hero__title {
        font-size: 2.75rem;
    }

    .project-intro-grid {
        gap: 30px;
        margin-bottom: 15px;
    }

    .project-intro-pills {
        justify-content: center;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        text-align: left;
    }

    .section-header .h1 {
        font-size: 1.75rem;
    }

    .carousel-nav {
        margin-left: 0;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Production Cards Responsive */
    .list-card-mini {
        grid-template-columns: 1fr;
        padding: 0;
        overflow: hidden;
    }

    .list-card-mini__icon {
        padding: 20px 20px 0;
        justify-content: flex-start;
    }

    .list-card-mini__content {
        padding: 20px;
    }

    .list-card-mini__image {
        width: 100%;
        height: 180px;
        order: -1;
        border-radius: 0;
    }

    .card-title-mini {
        font-size: 0.95rem;
    }

    .cta-banner {
        padding: 40px 24px;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .pub-card-inline {
        grid-template-columns: 1fr;
    }

    .pub-card-image {
        height: 150px;
    }
    
    .en-bref-item {
        grid-template-columns: 100px 1fr;
    }
}

@media (max-width: 480px) {
    .page-hero__title {
        font-size: 1.75rem;
    }

    .project-main-title {
        font-size: 1.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .list-card-mini__image {
        height: 150px;
    }

    .en-bref-card {
        padding: 25px;
    }

    .en-bref-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .en-bref-item .en-bref-value {
        text-align: left;
        max-width: 100%;
        white-space: normal;
    }
}
