/* ==========================================================================
   Page : Comment ça marche — EzeMicroAssurance
   ========================================================================== */

/* --- Hero Section --- */
.hiw-hero {
    position: relative;
    padding: var(--space-20) 0;
    background-color: var(--color-surface-container-low);
    overflow: hidden;
}

.hiw-hero__grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-12);
    align-items: center;
}

.hiw-hero__content {
    position: relative;
    z-index: 2;
}

.hiw-hero__badge {
    margin-bottom: var(--space-4);
}

.hiw-hero__title {
    font-size: var(--text-headline-xl);
    font-family: var(--font-headline);
    font-weight: var(--fw-extrabold);
    color: var(--color-text-heading);
    line-height: var(--lh-headline-xl);
    margin-bottom: var(--space-6);
}

.hiw-hero__title span {
    color: var(--color-primary);
}

.hiw-hero__desc {
    font-size: var(--text-body-lg);
    color: var(--color-on-surface-variant);
    line-height: var(--lh-body-lg);
    margin-bottom: var(--space-8);
}

.hiw-hero__image-wrap {
    position: relative;
    z-index: 2;
}

.hiw-hero__image {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-xl);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
}

/* Blobs décoratifs */
.hiw-hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 1;
}

.hiw-hero__blob--blue {
    top: -10%;
    right: -10%;
    width: 300px;
    height: 300px;
    background-color: var(--color-primary);
}

.hiw-hero__blob--green {
    bottom: -10%;
    left: -10%;
    width: 300px;
    height: 300px;
    background-color: var(--color-secondary);
}

/* --- Section Parcours Etape par Etape --- */
.hiw-steps-section {
    padding: var(--space-20) 0;
    background-color: var(--color-background);
}

.hiw-steps-section__header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto var(--space-16) auto;
}

.hiw-steps-section__title {
    font-size: var(--text-headline-lg);
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-4);
}

.hiw-steps-section__desc {
    font-size: var(--text-body-md);
    color: var(--color-on-surface-variant);
}

/* Ligne de progression et étapes */
.hiw-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.hiw-timeline__line {
    position: absolute;
    top: 50px;
    bottom: 50px;
    left: 50%;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-outline-variant) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
    transform: translateX(-50%);
    z-index: 1;
}

.hiw-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    margin-bottom: var(--space-16);
    z-index: 2;
}

.hiw-timeline-item:last-child {
    margin-bottom: 0;
}

.hiw-timeline-item__content {
    background-color: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-xl);
    padding: var(--space-8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.hiw-timeline-item:hover .hiw-timeline-item__content {
    border-color: var(--color-primary-container);
    box-shadow: 0 8px 24px rgba(0, 54, 103, 0.05);
    transform: translateY(-2px);
}

.hiw-timeline-item__badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-body-sm);
    font-weight: var(--fw-bold);
    color: var(--color-primary);
    background-color: var(--color-primary-container);
    border-radius: var(--border-radius-full);
    margin-bottom: var(--space-4);
}

.hiw-timeline-item__title {
    font-size: var(--text-headline-lg);
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-3);
}

.hiw-timeline-item__desc {
    font-size: var(--text-body-md);
    color: var(--color-on-surface-variant);
    line-height: var(--lh-body-md);
}

/* Bulle centrale contenant le numéro */
.hiw-timeline-item__node {
    position: absolute;
    left: 50%;
    top: var(--space-8);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--color-surface);
    border: 4px solid var(--color-outline-variant);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-headline-md);
    font-family: var(--font-headline);
    font-weight: var(--fw-extrabold);
    color: var(--color-outline);
    transform: translateX(-50%);
    transition: all 0.3s ease;
    z-index: 3;
}

.hiw-timeline-item:hover .hiw-timeline-item__node {
    border-color: var(--color-primary);
    color: var(--color-primary);
    transform: translateX(-50%) scale(1.1);
}

/* Spécificités pour l'alternance gauche/droite */
.hiw-timeline-item--left .hiw-timeline-item__content {
    grid-column: 1;
}

.hiw-timeline-item--right .hiw-timeline-item__content {
    grid-column: 2;
}

/* --- Section Simplicité & Technologie --- */
.hiw-tech-section {
    padding: var(--space-20) 0;
    background-color: var(--color-surface-container-low);
}

.hiw-tech-section__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    align-items: center;
}

.hiw-tech-section__title {
    font-size: var(--text-headline-lg);
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-6);
}

.hiw-tech-section__desc {
    font-size: var(--text-body-md);
    color: var(--color-on-surface-variant);
    line-height: var(--lh-body-md);
    margin-bottom: var(--space-8);
}

.hiw-tech-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.tech-feature-card {
    display: flex;
    gap: var(--space-4);
    background-color: var(--color-surface);
    border: 1px solid var(--color-outline-variant);
    border-radius: var(--border-radius-xl);
    padding: var(--space-5);
}

.tech-feature-card__icon-wrap {
    color: var(--color-secondary-container);
    font-size: var(--space-8);
    flex-shrink: 0;
}

.tech-feature-card__title {
    font-size: var(--text-headline-md);
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: 1px;
}

.tech-feature-card__desc {
    font-size: var(--text-body-sm);
    color: var(--color-on-surface-variant);
    line-height: var(--lh-body-sm);
}

/* --- CTA Section --- */
.hiw-cta {
    padding: var(--space-20) 0;
    text-align: center;
}

.hiw-cta__title {
    font-size: var(--text-headline-lg);
    font-family: var(--font-headline);
    font-weight: var(--fw-bold);
    color: var(--color-text-heading);
    margin-bottom: var(--space-4);
}

.hiw-cta__desc {
    font-size: var(--text-body-lg);
    color: var(--color-on-surface-variant);
    max-width: 600px;
    margin: 0 auto var(--space-8) auto;
}

.hiw-cta__actions {
    display: flex;
    justify-content: center;
    gap: var(--space-4);
}

/* ==========================================================================
   Responsive & Adaptation Mobile
   ========================================================================== */
@media (max-width: 992px) {
    .hiw-hero__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
        text-align: center;
    }

    .hiw-hero__image-wrap {
        max-width: 500px;
        margin: 0 auto;
    }

    .hiw-tech-section__grid {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
}

@media (max-width: 768px) {
    .hiw-timeline__line {
        left: 20px;
    }

    .hiw-timeline-item {
        grid-template-columns: 1fr;
        padding-left: 50px;
        margin-bottom: var(--space-12);
    }

    .hiw-timeline-item__content {
        grid-column: 1 !important;
    }

    .hiw-timeline-item__node {
        left: 20px;
        transform: translateX(-50%);
        width: 40px;
        height: 40px;
        font-size: var(--text-body-md);
        border-width: 3px;
        top: 0;
    }

    .hiw-timeline-item:hover .hiw-timeline-item__node {
        transform: translateX(-50%) scale(1.05);
    }

    .hiw-cta__actions {
        flex-direction: column;
        align-items: stretch;
        max-width: 320px;
        margin: 0 auto;
    }
}
