/**
 * Engineering Bridge Section Styles
 * Thelis Website — harmonized with design system
 */

@import url('https://fonts.googleapis.com/css2?family=Syne:wght@300;400;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ========================================
   SECTION CONTAINER
   ======================================== */

/* ========================================
   SECTION CONTAINER - FULL WIDTH
   ======================================== */

.engineering-bridge-section {
    padding: 120px 0;
    background: #f7f5f1;
    position: relative;
    overflow: visible;  /* ← Permet le débordement */
    width: 100vw;       /* ← 100% de la largeur du viewport */
    margin-left: calc(50% - 50vw);  /* ← Truc pour centrer sur full width */
    margin-right: calc(50% - 50vw);
}

.bridge-container-wrapper {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 40px;
}

.bridge-visual-container {
    position: relative;
    margin: 0;
    max-width: 100%;
    padding: 0;  /* ← Aucun padding */
}

.bridge-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
}

/* Cards centrées */
.use-case-cards-container {
    max-width: 1000px;
    margin: 60px auto 0;
    padding: 0 20px;
}

/* ========================================
   SECTION HEADER
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(34px, 4vw, 58px);
    font-weight: 700;
    color: #111118;
    letter-spacing: -2px;
    margin-bottom: 16px;
    line-height: 1.08;
}

.section-subtitle {
    font-family: 'Syne', sans-serif;
    font-size: 17px;
    color: rgba(17, 17, 24, 0.50);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.75;
}

/* ========================================
   BRIDGE VISUALIZATION
   ======================================== */

.bridge-visual-container {
    position: relative;
    margin: 0 auto;
    max-width: 1200px;
}

.bridge-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
}

.bridge-main-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.15));
}

/* ========================================
   PILLAR HOTSPOTS
   ======================================== */

.pillar-hotspot {
    position: absolute;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

/* POSITIONS - Ajuste selon ton image */
.pillar-software {
    left: 23%;
    top: 58%;
}

.pillar-ai {
    left: 40%;
    top: 58%;
}

.pillar-embedded {
    left: 57%;
    top: 58%;
}

.pillar-hardware {
    left: 74%;
    top: 58%;
}

.pillar-hotspot:hover {
    transform: translateY(-8px);
}

/* Pulse Animation */
.hotspot-pulse {
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(232, 41, 74, 0.25);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.6;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Pillar Icon */
.pillar-icon {
    width: 56px;
    height: 56px;
    background: #E8294A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 8px 24px rgba(232, 41, 74, 0.28);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.pillar-hotspot:hover .pillar-icon {
    background: #c82333;
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(232, 41, 74, 0.38);
}

.pillar-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 700;
    color: #111118;
    text-transform: uppercase;
    letter-spacing: 2px;
    background: white;
    padding: 5px 12px;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    white-space: nowrap;
}

/* ========================================
   USE CASE CARDS
   ======================================== */

.use-case-cards-container {
    position: relative;
    margin-top: 60px;
}

.use-case-card {
    background: white;
    border-radius: 4px;
    border-top: 2px solid #E8294A;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: none;
}

.use-case-card.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    display: block;
}

/* Card Close Button */
.card-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    line-height: 1;
}

.card-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* Project Tags */
.project-tag {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
}

.tag-startup {
    background: #e3f2fd;
    color: #1976d2;
}

.tag-corporation {
    background: #f3e5f5;
    color: #7b1fa2;
}

.tag-public {
    background: #e8f5e9;
    color: #388e3c;
}

/* Case Title */
.case-title {
    font-family: 'Syne', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: #111118;
    margin-bottom: 28px;
    line-height: 1.2;
}

/* Case Content */
.case-content {
    display: grid;
    gap: 32px;
}

.case-block h4 {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #E8294A;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.block-icon {
    font-size: 16px;
}

.case-block p {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
}

/* Result List */
.result-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.result-list li {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    padding-left: 24px;
    position: relative;
    margin-bottom: 8px;
}

.result-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: 700;
}

.result-list strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Case Link */
.case-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 32px;
    font-size: 16px;
    font-weight: 600;
    color: #E8294A;
    text-decoration: none;
    transition: all 0.3s ease;
}

.case-link:hover {
    gap: 12px;
    color: #c82333;
}

.case-link span {
    transition: transform 0.3s ease;
}

.case-link:hover span {
    transform: translateX(4px);
}

/* ========================================
   QUOTE
   ======================================== */

.bridge-quote {
    text-align: center;
    margin-top: 80px;
    padding: 36px 48px;
    border-left: 3px solid #E8294A;
    background: rgba(232, 41, 74, 0.04);
    border-radius: 2px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.bridge-quote p {
    font-family: 'Syne', sans-serif;
    font-size: 24px;
    font-weight: 300;
    color: rgba(17, 17, 24, 0.55);
    font-style: italic;
    line-height: 1.6;
    margin: 0;
}

/* ========================================
   SCROLL ANIMATIONS — unified spring reveal
   ======================================== */

.fade-in-up {
    opacity: 0;
    transform: translateY(36px);
    transition:
        opacity   0.7s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 80ms),
        transform 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * 80ms);
}

.fade-in-up.animated {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-scale {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
    transition:
        opacity   0.75s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i, 0) * 80ms),
        transform 1s    cubic-bezier(0.34, 1.56, 0.64, 1) calc(var(--i, 0) * 80ms);
}

.fade-in-scale.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 1024px) {
    .section-title {
        font-size: 40px;
    }
    
    .pillar-hotspot {
        transform: scale(0.9);
    }
}

@media (max-width: 768px) {
    .engineering-bridge-section {
        padding: 80px 20px;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 18px;
    }
    
    /* Mobile: Transform to accordion */
    .bridge-image-wrapper {
        position: static;
        padding-bottom: 0;
        margin-bottom: 40px;
    }
    
    .bridge-main-image {
        position: static;
        width: 100%;
        height: auto;
    }
    
    .pillar-hotspot {
        position: static;
        margin-bottom: 16px;
        flex-direction: row;
        justify-content: flex-start;
        padding: 16px;
        background: white;
        border-radius: 4px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transform: none !important;
    }
    
    .hotspot-pulse {
        display: none;
    }
    
    .pillar-icon {
        margin-right: 12px;
    }
    
    .use-case-card {
        padding: 24px;
    }
    
    .case-title {
        font-size: 24px;
    }
    
    .bridge-quote p {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .engineering-bridge-section {
        padding: 60px 15px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .use-case-card {
        padding: 20px;
    }
    
    .case-title {
        font-size: 20px;
    }
}