/* ========================================
   SERVICES PAGE STYLES
   ======================================== */

/* Page Hero avec effet de vagues */
.page-hero {
    padding: calc(80px + var(--spacing-3)) 0 var(--spacing-3);
    background: linear-gradient(135deg, var(--color-off-white) 0%, var(--color-light-gray) 100%);
    position: relative;
    border-bottom: 1px solid var(--color-gray);
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg width='1200' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,20 Q150,10 300,20 T600,20 T900,20 T1200,20 L1200,40 L0,40 Z' fill='%23ffffff' opacity='0.9'/%3E%3C/svg%3E");
    background-size: 1200px 40px;
    background-repeat: repeat-x;
    background-position: bottom;
    pointer-events: none;
}

/* Service Tabs Navigation */
.service-tabs-nav {
    display: flex;
    gap: var(--spacing-2);
    padding: var(--spacing-3) 0 0 0;
    justify-content: center;
}

.service-tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-2);
    padding: var(--spacing-2) var(--spacing-4);
    background-color: var(--color-white);
    border: 2px solid var(--color-gray);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    font-weight: var(--font-weight-semibold);
    color: var(--color-dark-gray);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.service-tab-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--wave-pattern);
    background-size: 50px 10px;
    background-repeat: repeat-x;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.service-tab-btn svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-fast);
}

.service-tab-btn:hover {
    border-color: var(--color-primary-light);
    color: var(--color-primary);
    background-color: rgba(38, 82, 75, 0.03);
}

.service-tab-btn.active {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.service-tab-btn.active::before {
    opacity: 1;
}

.service-tab-btn.active svg {
    transform: scale(1.1);
}

/* Service Tab Content */
.service-tab-content {
    display: none;
}

.service-tab-content.active {
    display: block;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    text-align: center;
    margin: 0 auto;
}

.page-title {
    font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
    font-weight: var(--font-weight-bold);
    line-height: var(--leading-tight);
    color: var(--color-black);
    margin-bottom: 0;
    letter-spacing: -0.02em;
}

/* Service Detail */
.service-detail {
    scroll-margin-top: 80px;
    background-color: var(--color-white);
    position: relative;
    overflow: hidden;
}

/* Service Header - En pleine largeur au-dessus */
.service-header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto var(--spacing-6);
    position: relative;
    z-index: 1;
}

.service-detail.alt-bg {
    background-color: var(--color-off-white);
}

/* Ajouter des séparateurs visuels subtils */
.service-detail::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-gray), transparent);
    z-index: 1;
}

/* Formes décoratives subtiles */
.service-detail::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(148, 161, 135, 0.03) 0%, transparent 70%);
    z-index: 0;
}

.service-detail:nth-of-type(odd)::before {
    top: -200px;
    right: -150px;
}

.service-detail:nth-of-type(even)::before {
    bottom: -200px;
    left: -150px;
}

.service-detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-8);
    align-items: start;
    position: relative;
    z-index: 1;
}

.service-detail-content.reverse {
    direction: rtl;
}

.service-detail-content.reverse > * {
    direction: ltr;
}

.service-intro {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-4);
}

/* Service Inline CTA */
.service-inline-cta {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    padding: var(--spacing-3);
    background: linear-gradient(135deg, rgba(38, 82, 75, 0.05) 0%, rgba(148, 161, 135, 0.05) 100%);
    border-left: 4px solid var(--color-primary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-4);
    position: relative;
    overflow: hidden;
}

.service-inline-cta::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 4px;
    background: linear-gradient(180deg, transparent, var(--color-primary), var(--color-secondary), var(--color-primary), transparent);
    background-size: 100% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 0% 100%;
    }
}

.inline-cta-content {
    flex: 1;
}

.inline-cta-text {
    font-size: var(--text-base);
    font-weight: var(--font-weight-medium);
    color: var(--color-text-primary);
    margin: 0 0 var(--spacing-1) 0;
}

.inline-cta-subtext {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: var(--leading-normal);
}

.service-inline-cta .btn {
    white-space: nowrap;
}

.service-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-3);
}

.feature-box {
    padding: var(--spacing-3);
    background-color: var(--color-white);
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all var(--transition-base);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.feature-box::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--wave-pattern);
    background-size: 50px 10px;
    background-repeat: repeat-x;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-detail.alt-bg .feature-box {
    background-color: var(--color-white);
}

.feature-box:hover {
    border-color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(38, 82, 75, 0.1);
    transform: translateY(-2px);
}

.feature-box:hover::after {
    opacity: 1;
    animation: wave-flow 2s ease-in-out infinite;
}

.feature-box svg {
    color: var(--color-primary);
    margin-bottom: var(--spacing-2);
}

.feature-box h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-1);
    line-height: var(--leading-snug);
}

.feature-box p {
    font-size: var(--text-base);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

/* Visual Placeholder */
.service-detail-visual {
    position: relative;
}

.visual-placeholder {
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, var(--color-secondary-lighter) 0%, var(--color-secondary-light) 100%);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

/* Process Section */
.process-section {
    background: linear-gradient(180deg, var(--color-white) 0%, var(--color-off-white) 50%, var(--color-white) 100%);
    position: relative;
    overflow: hidden;
}

/* Motif décoratif subtil en arrière-plan */
.process-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 50px, rgba(148, 161, 135, 0.02) 50px, rgba(148, 161, 135, 0.02) 51px);
    z-index: 0;
}

.process-section .container {
    position: relative;
    z-index: 1;
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--spacing-3);
    position: relative;
    margin-top: var(--spacing-4);
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(
        to right,
        var(--color-primary) 0%,
        var(--color-primary) 50%,
        var(--color-gray) 50%,
        var(--color-gray) 100%
    );
    z-index: 0;
}

.process-step {
    position: relative;
    text-align: center;
    z-index: 1;
}

.step-number {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-3);
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    color: var(--color-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-2xl);
    font-weight: var(--font-weight-bold);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
}

.step-number::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: -1;
}

.process-step:hover .step-number::before {
    opacity: 0.3;
    animation: ripple 1.5s ease-out infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}

.process-step:hover .step-number {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.step-content h3 {
    font-size: var(--text-lg);
    font-weight: var(--font-weight-semibold);
    color: var(--color-black);
    margin-bottom: var(--spacing-1);
    line-height: var(--leading-snug);
}

.step-content p {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: var(--leading-normal);
}

/* Responsive */
@media (max-width: 1024px) {
    .service-detail-content {
        gap: var(--spacing-6);
    }

    .service-features {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        grid-template-columns: repeat(3, 1fr);
    }

    .process-timeline::before {
        display: none;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: calc(80px + var(--spacing-2)) 0 var(--spacing-2);
    }

    .service-tabs-nav {
        padding: var(--spacing-2) 0 0 0;
        gap: var(--spacing-2);
    }

    .service-tab-btn {
        font-size: var(--text-sm);
        padding: var(--spacing-2) var(--spacing-3);
        gap: var(--spacing-1);
    }

    .service-tab-btn svg {
        width: 18px;
        height: 18px;
    }

    .service-header {
        margin-bottom: var(--spacing-4);
        text-align: left;
    }

    .service-inline-cta {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-2);
    }

    .service-inline-cta .btn {
        width: 100%;
        text-align: center;
    }

    .service-detail-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }

    .service-detail-content.reverse {
        direction: ltr;
    }

    .service-detail-visual {
        order: -1;
    }

    .process-timeline {
        grid-template-columns: 1fr;
        gap: var(--spacing-6);
    }

    .step-number {
        width: 60px;
        height: 60px;
        font-size: var(--text-xl);
    }
}
