/* ==========================================================
   HERO
   ========================================================== */

.hero {
    padding: 56px 0 64px;
    background: var(--gradient-hero);
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.hero-main {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 64px;
    align-items: center;
}

.hero-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

/* ==========================================================
   TEXTE
   ========================================================== */ 

.hero-text {

    padding-top: 48px;
    
} 

.hero-title {

    margin: 0;

    font-size: clamp(44px, 5vw, 62px);

    font-weight: 800;

    line-height: 1.08;

    color: var(--color-text-primary);
}

.hero-description {

    max-width: 700px;

    margin-top: 22px;

    font-size: 19px;

    line-height: 1.9;

    color: var(--color-text-secondary);
}

.hero-actions {
    display: flex;

    flex-wrap: wrap;

    justify-content: center;

    gap: 18px;
}

/* ==========================================================
   BLOC CONFIANCE
   ========================================================== */

.hero-trust {
    width: 100%;

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 24px;

    text-align: center;
}

.hero-trust>div {

    flex: 1;

    min-width: 170px;
}

.hero-trust strong {

    display: block;

    margin-bottom: 6px;

    font-size: 17px;

    color: var(--color-text-primary);
}

.hero-trust span {

    color: var(--color-text-muted);

    line-height: 1.6;
}

/* ==========================================================
   VISUEL
   ========================================================== */

.hero-visual {

    display: flex;

    justify-content: center;

    align-items: center;
}

.hero-card {

    width: 100%;

    max-width: 520px;

    background: var(--color-background-elevated);

    border: 1px solid var(--color-border);

    border-radius: var(--radius-xl);

    overflow: hidden;

    box-shadow: var(--shadow-lg);
}

.hero-card-header {

    display: flex;

    gap: 8px;

    padding: 18px 22px;

    border-bottom: 1px solid var(--color-border);

    background: var(--color-background-secondary);
}

.hero-card-header span {

    width: 12px;

    height: 12px;

    border-radius: 50%;

    background: var(--color-border-strong);
}

.hero-card-body {

    padding: 36px;
}

.hero-card-body.hero-carousel {
    /* Réserver l'espace du visuel initial, indépendamment des captures. */
    height: 436px;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.hero-carousel-stage {
    position: relative;
    flex: 1;
    min-height: 0;
    min-width: 0;
    margin-inline: max(-6%, calc(-1 * var(--spacing-lg)));
}

.hero-carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 450ms ease;
}

.hero-carousel-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-carousel-controls {
    display: flex;
    flex-shrink: 0;
    justify-content: center;
}

.hero-carousel-controls[hidden] {
    display: none;
}

.hero-carousel-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
}

.hero-carousel-controls button span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-border-strong);
}

.hero-carousel-controls button[aria-pressed="true"] span,
.hero-carousel-controls button:hover span {
    background: var(--color-primary);
}

.hero-carousel-controls button:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .hero-card-body.hero-carousel {
        height: auto;
    }

    .hero-carousel-stage {
        /* Ratio de la capture la plus haute : ambk-scan-dashboard.webp (1672 × 941). */
        flex: none;
        aspect-ratio: 1672 / 941;
    }
}

@media (600px < width <= 900px) {
    .hero-card-body.hero-carousel {
        height: auto;
    }

    .hero-carousel-stage {
        /* Même cadre proportionnel sur tablette, sans modifier les deux colonnes. */
        flex: none;
        aspect-ratio: 1672 / 941;
    }
}

@media (width > 900px) {
    .hero-card-body.hero-carousel {
        height: auto;
        padding: var(--spacing-lg);
    }

    .hero-carousel-stage {
        flex: none;
        aspect-ratio: 1672 / 941;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-carousel-slide {
        transition: none;
    }
}
