/* Realisations Page Specific Styles */

.realisations-page,
.engineering-page {
    overflow-x: hidden;
    background-color: var(--color-bg-light);
}

.circles-section {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    transition: background-color 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.circles-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    padding: 2rem;
}

.category-circle {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background-color: var(--circle-color);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    cursor: pointer;
    position: relative;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        box-shadow 0.5s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-circle::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    border: 2px solid var(--circle-color);
    opacity: 0;
    transition: all 0.5s ease;
    transform: scale(0.9);
}

/* Proximity / Hover Effect */
.category-circle:hover {
    transform: scale(1.15);
    box-shadow: 0 0 50px var(--circle-color);
    z-index: 10;
}

.category-circle:hover::before {
    opacity: 0.5;
    transform: scale(1);
    animation: halo 2s infinite ease-out;
}

@keyframes halo {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.circle-content {
    padding: 2rem;
}

.circle-content h2 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.short-desc {
    font-size: 0.9rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
    max-height: 0;
}

.category-circle:hover .short-desc {
    opacity: 1;
    transform: translateY(0);
    max-height: 100px;
}

/* Detail View Transition State */
.realisations-page.in-detail .circles-section,
.realisations-page.in-detail .section:first-of-type,
.engineering-page.in-detail .activities-section,
.engineering-page.in-detail .realisations-section {
    display: none;
}

.detail-view {
    min-height: 100vh;
    padding: 120px 0 60px;
    color: white;
    position: relative;
    z-index: 100;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.4s, transform 0.6s ease 0.4s;
}

.realisations-page.in-detail .detail-view,
.engineering-page.in-detail .detail-view {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.detail-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem;
    padding: 0 20px;
}

#detail-title {
    font-size: 3.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.lead-desc {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.btn-back {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Project List Layout */
.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 2rem;
    width: 70%;
    margin: 0 auto;
}

.project-list-item {
    background: rgba(255, 255, 255, 0.22);
    /* Stronger frosted glass for odd items */
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 1.8rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    position: relative;
    color: white;
    /* Contrast on colored bg */
}

.project-list-item:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
    /* More transparent for even items */
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.project-list-item:hover {
    transform: translateX(15px);
    /* No background brightening as requested */
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 50px -10px rgba(255, 255, 255, 0.35),
        0 0 20px -5px rgba(255, 255, 255, 0.25);
    /* Pure White Halo Effect */
}

.project-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: var(--current-category-color, var(--color-accent));
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--current-category-color);
}

.project-split-container {
    display: flex;
    flex-grow: 1;
    align-items: stretch;
    gap: 2rem;
}

.project-part-operation {
    flex: 1.5;
    /* Opération takes more space */
}

.project-part-divider {
    width: 2px;
    background: rgba(255, 255, 255, 0.15);
    align-self: stretch;
}

.project-part-client {
    flex: 0 0 220px;
    /* Client has fixed width */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.part-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    font-weight: 800;
    color: #ffffff;
    /* Labels in white as requested */
    margin-bottom: 0.6rem;
    text-transform: uppercase;
    opacity: 0.8;
}

.client-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    line-height: 1.3;
}

.project-text h3 {
    font-size: 1.25rem;
    color: #ffffff;
    /* Bright white for title */
    margin-bottom: 0.4rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.project-text p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.4;
}

.project-arrow {
    color: white;
    opacity: 0.7;
    transition: transform 0.4s ease;
}

.project-list-item:hover .project-arrow {
    transform: translateX(8px);
    opacity: 1;
}

/* Modal Adjustments for Text-Only */
.modal-content {
    background: white;
    width: 90%;
    max-width: 850px;
    /* Wider for split header */
    border-radius: 16px;
    padding: 3.5rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 5000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    padding: 3rem;
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 2rem;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--color-primary);
}

/* Expansion Animation Background */
.expansion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 50;
    pointer-events: none;
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.expansion-overlay.active {
    transform: scale(4);
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .project-grid {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .project-grid {
        width: 100%;
        padding: 1rem;
    }

    .project-list-item {
        padding: 1.2rem;
        gap: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .project-dot {
        display: none;
        /* Hide dot on mobile to save space */
    }

    .project-split-container {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .project-part-divider {
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.1);
    }

    .project-part-client {
        flex: none;
        width: 100%;
    }

    .category-circle {
        width: 220px;
        height: 220px;
    }

    #detail-title {
        font-size: 2.2rem;
    }

    .lead-desc {
        font-size: 1rem;
    }
}