/*
 * Accueil intelligent 2026.
 * Couche isolée : elle modernise le hero et affine le rythme de la page
 * sans modifier les composants partagés ni les données du catalogue.
 */

.home-modern[data-home-intelligent] {
    background:
        radial-gradient(circle at 8% 8%, rgba(31, 201, 139, .09), transparent 28rem),
        linear-gradient(180deg, #f5faf9 0, #fff 30%, #f7fbfa 100%);
}

.home-hero-v2 {
    position: relative;
    display: block;
    min-height: 0;
    padding-block: clamp(1rem, 2vw, 1.8rem) clamp(3.4rem, 6vw, 5.5rem);
    overflow: hidden;
    background: #eef7f5;
    isolation: isolate;
}

.home-hero-v2__ambient {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(32, 201, 139, .18), transparent 24rem),
        radial-gradient(circle at 92% 72%, rgba(255, 181, 71, .17), transparent 26rem),
        linear-gradient(180deg, #eef8f6, #f9fcfb);
}

.home-hero-v2__container {
    position: relative;
}

.home-hero-v2__stage {
    --home-hero-duration: 6200ms;
    position: relative;
    min-height: clamp(700px, 80vh, 820px);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: clamp(28px, 4vw, 48px);
    background: #082634;
    box-shadow: 0 35px 90px rgba(5, 31, 42, .22);
    color: #fff;
    isolation: isolate;
    touch-action: pan-y;
}

.home-hero-v2__slides,
.home-hero-v2__slide,
.home-hero-v2__slide picture,
.home-hero-v2__slide img,
.home-hero-v2__shade {
    position: absolute;
    width: 100%;
    height: 100%;
    inset: 0;
}

.home-hero-v2__slide {
    visibility: hidden;
    opacity: 0;
    transform: scale(1.035);
    transition: opacity .75s ease, transform 1.5s cubic-bezier(.2, .65, .2, 1), visibility .75s;
}

.home-hero-v2__slide.is-active {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
}

.home-hero-v2__slide img {
    object-fit: cover;
    object-position: center;
}

.home-hero-v2__shade {
    background:
        linear-gradient(90deg, rgba(2, 20, 28, .91) 0%, rgba(2, 20, 28, .7) 43%, rgba(2, 20, 28, .17) 72%, rgba(2, 20, 28, .35) 100%),
        linear-gradient(0deg, rgba(2, 20, 28, .67), transparent 48%);
}

.home-hero-v2__stage::after {
    position: absolute;
    z-index: 2;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: inherit;
    content: "";
    pointer-events: none;
}

.home-hero-v2__content {
    position: absolute;
    z-index: 4;
    top: 50%;
    left: clamp(1.6rem, 5vw, 5.2rem);
    width: min(58%, 760px);
    transform: translateY(-50%);
}

.home-hero-v2__kicker {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    width: fit-content;
    margin-bottom: 1.15rem;
    padding: .62rem .9rem;
    border: 1px solid rgba(255, 255, 255, .23);
    border-radius: 999px;
    background: rgba(5, 37, 45, .4);
    color: #d6fff0;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .105em;
    text-transform: uppercase;
    backdrop-filter: blur(13px);
}

.home-hero-v2 h1 {
    max-width: 780px;
    margin: 0;
    color: #fff;
    font-size: clamp(3rem, 5.15vw, 5.5rem);
    font-weight: 950;
    line-height: .94;
    letter-spacing: -.068em;
    text-wrap: balance;
}

.home-hero-v2 h1 span {
    display: block;
    margin-top: .08em;
    background: linear-gradient(95deg, #78f1c4, #fff1b6 70%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
}

.home-hero-v2__lead {
    max-width: 670px;
    margin: 1.35rem 0 0;
    color: rgba(255, 255, 255, .79);
    font-size: clamp(1rem, 1.4vw, 1.18rem);
    line-height: 1.67;
    text-wrap: pretty;
}

.home-hero-v2__actions {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: 1.7rem;
    flex-wrap: wrap;
}

.home-button--hero-v2 {
    min-height: 3.75rem;
    padding-inline: 1.45rem;
}

.home-button--glass {
    border-color: rgba(255, 255, 255, .28);
    background: rgba(255, 255, 255, .11);
    color: #fff;
    backdrop-filter: blur(14px);
}

.home-button--glass:hover {
    border-color: rgba(255, 255, 255, .5);
    background: rgba(255, 255, 255, .18);
}

.home-hero-v2__trust {
    display: flex;
    gap: .65rem 1.15rem;
    margin-top: 1.25rem;
    color: rgba(255, 255, 255, .76);
    font-size: .82rem;
    font-weight: 750;
    flex-wrap: wrap;
}

.home-hero-v2__trust span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.home-hero-v2__trust i {
    color: #70e7bc;
}

.home-hero-v2__destination-panels {
    position: absolute;
    z-index: 5;
    right: clamp(1.4rem, 3.5vw, 3.5rem);
    bottom: clamp(5.4rem, 8vw, 6.4rem);
    width: min(34%, 390px);
}

.home-hero-v2__destination-panel {
    position: absolute;
    display: block;
    visibility: hidden;
    width: 100%;
    right: 0;
    bottom: 0;
    padding: 1.15rem 1.2rem 1rem;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 22px;
    background: rgba(4, 26, 35, .68);
    box-shadow: 0 20px 48px rgba(0, 0, 0, .2);
    color: #fff;
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px);
    transition: opacity .35s ease, transform .45s ease, visibility .35s;
    backdrop-filter: blur(18px);
}

.home-hero-v2__destination-panel.is-active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.home-hero-v2__destination-overline {
    display: flex;
    align-items: center;
    gap: .45rem;
    color: #baf5df;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.home-hero-v2__destination-panel > strong {
    display: block;
    overflow: hidden;
    margin-top: .45rem;
    font-size: clamp(1.6rem, 2.5vw, 2.35rem);
    font-weight: 950;
    line-height: 1;
    letter-spacing: -.04em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero-v2__destination-description {
    display: -webkit-box;
    overflow: hidden;
    margin-top: .65rem;
    color: rgba(255, 255, 255, .72);
    font-size: .82rem;
    line-height: 1.48;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.home-hero-v2__destination-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .85rem;
    padding-top: .75rem;
    border-top: 1px solid rgba(255, 255, 255, .13);
    color: rgba(255, 255, 255, .7);
    font-size: .72rem;
    font-weight: 800;
}

.home-hero-v2__destination-footer > span:last-child {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #fff;
}

.home-hero-v2__controls {
    position: absolute;
    z-index: 6;
    right: clamp(1.4rem, 3.5vw, 3.5rem);
    bottom: 1.65rem;
    display: flex;
    align-items: center;
    gap: .65rem;
}

.home-hero-v2__control {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: rgba(4, 25, 34, .47);
    color: #fff;
    cursor: pointer;
    transition: background-color .2s ease, transform .2s ease;
    backdrop-filter: blur(12px);
    place-items: center;
}

.home-hero-v2__control:hover {
    background: rgba(12, 143, 135, .88);
    transform: translateY(-2px);
}

.home-hero-v2__counter {
    display: inline-flex;
    min-width: 3.8rem;
    align-items: baseline;
    justify-content: center;
    gap: .2rem;
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}

.home-hero-v2__counter strong {
    color: #fff;
    font-size: 1rem;
}

.home-hero-v2__counter span {
    color: rgba(255, 255, 255, .58);
}

.home-hero-v2__progress {
    position: relative;
    display: block;
    width: clamp(3rem, 7vw, 6rem);
    height: 3px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
}

.home-hero-v2__progress > span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #7ceac1;
    transform: scaleX(0);
    transform-origin: left center;
}

.home-hero-v2__stage.is-autoplaying .home-hero-v2__progress > span {
    animation: homeHeroProgress var(--home-hero-duration) linear forwards;
}

@keyframes homeHeroProgress {
    to { transform: scaleX(1); }
}

.home-hero-v2__rail {
    position: relative;
    z-index: 7;
    display: flex;
    gap: .65rem;
    margin: -1.55rem clamp(1rem, 3vw, 2.8rem) 0;
    padding: .55rem;
    overflow-x: auto;
    border: 1px solid rgba(7, 27, 43, .08);
    border-radius: 20px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 50px rgba(8, 38, 48, .13);
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    backdrop-filter: blur(18px);
}

.home-hero-v2__rail::-webkit-scrollbar {
    display: none;
}

.home-hero-v2__rail-item {
    display: flex;
    min-width: clamp(165px, 17vw, 218px);
    align-items: center;
    gap: .65rem;
    padding: .45rem .75rem .45rem .45rem;
    border: 1px solid transparent;
    border-radius: 15px;
    background: transparent;
    color: var(--home-ink);
    text-align: start;
    cursor: pointer;
    scroll-snap-align: center;
    transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}

.home-hero-v2__rail-item:hover,
.home-hero-v2__rail-item.is-active {
    border-color: rgba(12, 143, 135, .14);
    background: #edf9f5;
}

.home-hero-v2__rail-item.is-active {
    box-shadow: inset 3px 0 0 var(--home-teal);
}

.home-hero-v2__rail-media {
    display: grid;
    width: 52px;
    height: 44px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 11px;
    background: var(--home-mint-soft);
    color: var(--home-teal-dark);
    place-items: center;
}

.home-hero-v2__rail-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-v2__rail-item > span:last-child {
    min-width: 0;
}

.home-hero-v2__rail-item small,
.home-hero-v2__rail-item strong {
    display: block;
}

.home-hero-v2__rail-item small {
    color: var(--home-teal-dark);
    font-size: .61rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.home-hero-v2__rail-item strong {
    overflow: hidden;
    margin-top: .18rem;
    font-size: .83rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero-v2__shortcuts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .8rem;
    margin-top: 1.15rem;
}

.home-hero-v2__shortcuts > a {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .75rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(7, 27, 43, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 32px rgba(7, 27, 43, .05);
    color: var(--home-ink);
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.home-hero-v2__shortcuts > a:hover {
    border-color: rgba(12, 143, 135, .28);
    box-shadow: 0 18px 38px rgba(7, 27, 43, .1);
    transform: translateY(-3px);
}

.home-hero-v2__shortcut-icon {
    display: grid;
    width: 2.65rem;
    height: 2.65rem;
    flex: 0 0 auto;
    border-radius: 13px;
    background: var(--home-mint-soft);
    color: var(--home-teal-dark);
    place-items: center;
}

.home-hero-v2__shortcuts > a > span:nth-child(2) {
    min-width: 0;
}

.home-hero-v2__shortcuts strong,
.home-hero-v2__shortcuts small {
    display: block;
}

.home-hero-v2__shortcuts strong {
    font-size: 1.05rem;
}

.home-hero-v2__shortcuts small {
    overflow: hidden;
    margin-top: .12rem;
    color: var(--home-ink-soft);
    font-size: .72rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-hero-v2__shortcuts > a > i {
    margin-inline-start: auto;
    color: var(--home-teal);
}

/* Rythme plus compact et continuité visuelle sur le reste de l’accueil. */
.home-modern[data-home-intelligent] .home-assurance {
    border-top: 0;
    background: #fff;
}

.home-modern[data-home-intelligent] .home-assurance__item {
    min-height: 112px;
}

.home-modern[data-home-intelligent] .home-section {
    padding-block: clamp(4rem, 7vw, 7rem);
}

.home-modern[data-home-intelligent] .home-experiences,
.home-modern[data-home-intelligent] .home-destinations,
.home-modern[data-home-intelligent] .home-editorial {
    background-image: radial-gradient(rgba(12, 143, 135, .09) .7px, transparent .7px);
    background-size: 22px 22px;
}

.home-modern[data-home-intelligent] :where(.home-category-card, .home-destination-card, .home-editorial__card) {
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease;
}

@media (hover: hover) {
    .home-modern[data-home-intelligent] :where(.home-category-card, .home-destination-card, .home-editorial__card):hover {
        transform: translateY(-7px);
    }
}

[dir="rtl"] .home-hero-v2__content {
    right: clamp(1.6rem, 5vw, 5.2rem);
    left: auto;
}

[dir="rtl"] .home-hero-v2__destination-panels,
[dir="rtl"] .home-hero-v2__controls {
    right: auto;
    left: clamp(1.4rem, 3.5vw, 3.5rem);
}

[dir="rtl"] .home-hero-v2__destination-panel {
    right: auto;
    left: 0;
}

[dir="rtl"] .home-hero-v2__shade {
    transform: scaleX(-1);
}

[dir="rtl"] .home-hero-v2__progress > span {
    transform-origin: right center;
}

[dir="rtl"] .home-hero-v2__rail-item.is-active {
    box-shadow: inset -3px 0 0 var(--home-teal);
}

[dir="rtl"] .home-hero-v2__control i,
[dir="rtl"] .home-hero-v2__destination-footer i,
[dir="rtl"] .home-hero-v2__shortcuts > a > i {
    transform: scaleX(-1);
}

@media (max-width: 1080px) {
    .home-hero-v2__stage {
        min-height: 700px;
    }

    .home-hero-v2__content {
        width: 64%;
    }

    .home-hero-v2__destination-panels {
        width: min(32%, 330px);
    }

    .home-hero-v2__destination-description {
        display: none;
    }
}

@media (max-width: 820px) {
    .home-hero-v2 {
        padding-top: .75rem;
    }

    .home-hero-v2__stage {
        min-height: 780px;
    }

    .home-hero-v2__shade {
        background:
            linear-gradient(180deg, rgba(2, 20, 28, .76) 0%, rgba(2, 20, 28, .49) 50%, rgba(2, 20, 28, .88) 100%),
            linear-gradient(90deg, rgba(2, 20, 28, .4), transparent);
    }

    .home-hero-v2__content,
    [dir="rtl"] .home-hero-v2__content {
        top: 2.2rem;
        right: 2rem;
        left: 2rem;
        width: auto;
        transform: none;
    }

    .home-hero-v2__destination-panels,
    [dir="rtl"] .home-hero-v2__destination-panels {
        right: 2rem;
        bottom: 6.3rem;
        left: 2rem;
        width: auto;
    }

    .home-hero-v2__destination-panel,
    [dir="rtl"] .home-hero-v2__destination-panel {
        right: 0;
        left: 0;
    }

    .home-hero-v2__controls,
    [dir="rtl"] .home-hero-v2__controls {
        right: 2rem;
        bottom: 1.7rem;
        left: 2rem;
        justify-content: center;
    }

    .home-hero-v2__shortcuts {
        grid-template-columns: 1fr;
    }

    .home-hero-v2__shortcuts small {
        white-space: normal;
    }
}

@media (max-width: 680px) {
    .home-hero-v2 {
        padding-bottom: 3.4rem;
    }

    .home-hero-v2__stage {
        min-height: 820px;
        border-radius: 26px;
    }

    .home-hero-v2 h1 {
        font-size: clamp(2.55rem, 10.5vw, 3.5rem);
        line-height: .96;
    }

    .home-hero-v2__lead {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .home-hero-v2__actions {
        align-items: stretch;
    }

    .home-button--hero-v2 {
        flex: 1 1 calc(50% - .4rem);
        min-width: 0;
    }

    .home-hero-v2__rail {
        margin-inline: .65rem;
        border-radius: 17px;
    }

    .home-hero-v2__rail-item {
        min-width: 155px;
    }

    .home-hero-v2__progress {
        width: min(18vw, 4.5rem);
    }
}

@media (max-width: 460px) {
    .home-hero-v2__stage {
        min-height: 875px;
    }

    .home-hero-v2 h1 {
        font-size: clamp(2.45rem, 11vw, 3rem);
    }

    .home-hero-v2__content,
    [dir="rtl"] .home-hero-v2__content {
        top: 1.35rem;
        right: 1.15rem;
        left: 1.15rem;
    }

    .home-hero-v2__kicker {
        margin-bottom: .85rem;
        padding: .52rem .7rem;
        font-size: .64rem;
    }

    .home-hero-v2__lead {
        margin-top: 1rem;
        font-size: .91rem;
        line-height: 1.55;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .home-hero-v2__actions {
        gap: .55rem;
        margin-top: 1.15rem;
    }

    .home-button--hero-v2 {
        flex-basis: 100%;
        min-height: 3.25rem;
        padding: .72rem 1rem;
        font-size: .84rem;
    }

    .home-hero-v2__trust {
        gap: .45rem .75rem;
        margin-top: .85rem;
        font-size: .69rem;
    }

    .home-hero-v2__trust span:nth-child(3) {
        display: none;
    }

    .home-hero-v2__destination-panels,
    [dir="rtl"] .home-hero-v2__destination-panels {
        right: 1.15rem;
        bottom: 5.8rem;
        left: 1.15rem;
    }

    .home-hero-v2__destination-panel {
        padding: .95rem 1rem .85rem;
        border-radius: 18px;
    }

    .home-hero-v2__destination-panel > strong {
        font-size: 1.5rem;
    }

    .home-hero-v2__destination-footer {
        font-size: .65rem;
    }

    .home-hero-v2__destination-footer > span:last-child {
        max-width: 58%;
        justify-content: flex-end;
        text-align: end;
    }

    .home-hero-v2__controls,
    [dir="rtl"] .home-hero-v2__controls {
        right: 1.15rem;
        bottom: 1.35rem;
        left: 1.15rem;
        gap: .42rem;
    }

    .home-hero-v2__control {
        width: 2.45rem;
        height: 2.45rem;
    }

    .home-hero-v2__counter {
        min-width: 3rem;
    }

    .home-hero-v2__rail-media {
        width: 46px;
        height: 40px;
    }
}

@media (max-width: 340px) {
    .home-hero-v2__stage {
        min-height: 835px;
        border-radius: 21px;
    }

    .home-hero-v2 h1 {
        font-size: 2.3rem;
    }

    .home-hero-v2__trust span:nth-child(n+2),
    .home-hero-v2__progress,
    .home-hero-v2__pause {
        display: none;
    }

    .home-hero-v2__destination-footer > span:first-child {
        display: none;
    }

    .home-hero-v2__destination-footer > span:last-child {
        max-width: none;
    }

    .home-hero-v2__rail-item {
        min-width: 138px;
        padding-right: .55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero-v2__slide,
    .home-hero-v2__destination-panel,
    .home-hero-v2__rail-item,
    .home-hero-v2__control,
    .home-hero-v2__shortcuts > a {
        transition: none;
    }

    .home-hero-v2__progress > span {
        animation: none !important;
    }
}

@media (forced-colors: active) {
    .home-hero-v2__stage,
    .home-hero-v2__destination-panel,
    .home-hero-v2__control,
    .home-hero-v2__rail,
    .home-hero-v2__rail-item,
    .home-hero-v2__shortcuts > a {
        border: 1px solid CanvasText;
    }
}
