/* ========================================
   HERO
======================================== */

.b-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    color: var(--color-white);
    background-color: var(--color-dark);
}

/* ========================================
   MAIN CONTENT
======================================== */

.b-hero .main {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    flex: 1;
    width: 100%;
    padding: 140px 24px 130px;
}

.b-hero .main > .container {
    width: 100%;
    text-align: center;
}

/* Title */

.b-hero .title {
    margin: 0;
    font-family: var(--font-primary);
    font-size: clamp(38px, 4.2vw, 68px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.035em;
    margin-bottom: var(--spacing-medium);
}

/* Description */

.b-hero .description {
    max-width: 900px;
    margin: 15px auto 0;
    font-family: var(--font-primary);
    font-size: clamp(14px, 1.3vw, 19px);
    font-weight: 600;
    line-height: 1.5;
}

.b-hero .description p {
    margin: 0;
}

.b-hero .description p + p {
    margin-top: 12px;
}

/* ========================================
   LINKS
======================================== */

.b-hero .links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 35px 25px;
    max-width: 1100px;
    margin: var(--spacing-xlarge) auto 0;
}

.b-hero .links .link {
    position: relative;
    z-index: 1;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex: 0 0 calc((100% - 100px) / 5);
    min-width: 0;
    color: var(--color-white);
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: color 350ms ease;
}

/* Voile sombre derrière le contenu */

.b-hero .links .link::after {
    content: '';
    position: absolute;
    inset: -25px 8px;
    z-index: -1;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transform: scale(0.94);
    pointer-events: none;
    transition:
        opacity 350ms ease,
        transform 350ms ease;
}

/* Pictogramme */

.b-hero .links .link .icon {
    transition: transform 350ms ease;
}

/* Survol */

@media (hover: hover) {
    .b-hero .links .link:hover {
        color: var(--color-primary);
    }

    .b-hero .links .link:hover::after {
        opacity: 1;
        transform: scale(1);
    }

    .b-hero .links .link:hover .icon {
        transform: scale(1.12);
    }
}

/* Navigation clavier */

.b-hero .links .link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 6px;
}

.b-hero .links .link:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

.b-hero .links .link:focus-visible .icon {
    transform: scale(1.12);
}

/* Accessibilité */

@media (prefers-reduced-motion: reduce) {
    .b-hero .links .link,
    .b-hero .links .link::after,
    .b-hero .links .link .icon {
        transition: none;
    }
}

/* Pictograms */

.b-hero .links .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
}

.b-hero .links .icon svg,
.b-hero .links .icon img {
    display: block;
    width: 70px;
    height: 70px;
    object-fit: contain;
}

/* Labels */

.b-hero .links .label {
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;

    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5em;
}

/* ========================================
   SCROLL INDICATOR
======================================== */

.b-hero .scroll {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: 85px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: var(--color-white);
    text-decoration: none;
}

.b-hero .scroll span {
    /* font-family: Arial, sans-serif;
    font-size: 54px;
    font-weight: 800;
    line-height: 0.6; */
    width: 80px;
    height: 80px;
}

.b-hero .scroll span {
    animation: hero-scroll-bounce 2s ease-in-out 1;
}

.b-hero .scroll:hover {
    color: var(--color-white);
    opacity: 0.75;
}

.b-hero .scroll:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

@keyframes hero-scroll-bounce {
    0%,
    100% {
        transform: translateY(0);
    }

    25%,
    75% {
        transform: translateY(10px);
    }

    50% {
        transform: translateY(0);
    }
}

/* ========================================
   BOTTOM BANNER
======================================== */

.b-hero .banner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 13px 24px;
    color: var(--color-white);
    text-align: center;
}

.b-hero .banner .container {
    width: 100%;
    margin-inline: auto;
    font-family: var(--font-primary);
    font-size: clamp(14px, 1.4vw, 20px);
    font-weight: 800;
    line-height: 1.35;
    text-transform: uppercase;
}
.b-hero .banner.is-link {
    display: flex;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.b-hero .banner.is-link:hover {
    opacity: 0.9;
}

.b-hero .banner.is-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -3px;
}

@media (prefers-reduced-motion: reduce) {
    .b-hero .banner.is-link {
        transition: none;
    }
}

/* ========================================
   POPUP GAUCHE
======================================== */
.b-hero-popup {
    --popup-tab-width: 46px;
    --popup-panel-width: min(880px, calc(100vw - 46px));

    position: fixed;
    z-index: 99;
    top: 50%;
    left: 0;
    display: flex;
    width: var(--popup-tab-width);
    height: 310px;
    transform: translateY(-50%);
    transition: width 0.35s ease;
}

.b-hero-popup.is-open {
    width: calc(var(--popup-panel-width) + var(--popup-tab-width));
}

.b-hero-popup .popup-panel {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    visibility: hidden;
}

.b-hero-popup.is-open .popup-panel {
    visibility: visible;
}

.b-hero-popup .popup-image,
.b-hero-popup .popup-image picture {
    display: block;
    width: var(--popup-panel-width);
    height: 100%;
}

.b-hero-popup .popup-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.b-hero-popup .popup-trigger {
    flex: 0 0 var(--popup-tab-width);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    border: 0;
    color: var(--color-white);
    text-decoration: none;
    cursor: pointer;
}

.b-hero-popup .popup-trigger .text {
    font-family: var(--font-primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.b-hero-popup .popup-close {
    position: absolute;
    z-index: 3;
    top: -10px;
    right: -10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-black);
    color: var(--color-white);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.b-hero-popup .popup-trigger:focus-visible,
.b-hero-popup .popup-close:focus-visible {
    outline: 2px solid var(--color-white);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .b-hero-popup {
        transition: none;
    }
}

/* ========================================
   TABLET
======================================== */

@media (max-width: 991px) {
    .b-hero .main {
        padding: 130px 30px 110px;
    }

    .b-hero .title {
        font-size: clamp(36px, 5vw, 56px);
    }

    .b-hero .links {
        gap: 30px 20px;
        margin-top: 65px;
    }

    .b-hero-popup {
        width: 40px;
        min-height: 220px;
    }

    .b-hero-popup .text {
        font-size: 15px;
    }
}

/* ========================================
   MOBILE
======================================== */

@media (max-width: 767px) {
    .b-hero .main {
        padding: 130px 24px 110px;
    }

    .b-hero .title {
        font-size: clamp(40px, 8vw, 46px);
    }

    .b-hero .description {
        margin-top: 18px;
        font-size: 14px;
    }

    .b-hero .links {
        gap: 50px 15px;
        margin-top: 55px;
    }

    .b-hero .links .link {
        gap: 10px;
        flex: 45%;
    }

    .b-hero .links .icon {
        width: 60px;
        height: 60px;
    }

    .b-hero .links .icon svg,
    .b-hero .links .icon img {
        width: 50px;
        height: 50px;
    }

    .b-hero .links .label {
        font-size: 12px;
    }

    .b-hero-popup {
        --popup-tab-width: 34px;
        --popup-panel-width: calc(100vw - 34px);
        height: 220px;

        top: 55%;
        width: 34px;
        min-height: 180px;
    }

    .b-hero-popup .text {
        font-size: 12px;
    }

    .b-hero-popup .popup-trigger .text {
        font-size: 12px;
    }

    .b-hero .scroll {
        bottom: 85px;
    }

    .b-hero .banner {
        padding: 12px 16px;
    }

    .b-hero .banner .container {
        font-size: 13px;
    }
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    .b-hero .links .link {
        transition: none;
    }
}
