/* Carrousel Rando Highlights — site web */

.rando-highlights {
    --rando-brand: #c8231e;
    --rando-brand-hover: #a81c17;
    width: 100%;
    margin: 0 auto;
}

.rando-highlights-swiper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-bottom: 36px;
}

.rando-highlights-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--rando-arrow-size, 32px);
    height: var(--rando-arrow-size, 32px);
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(69, 46, 33, 0.45);
    color: var(--rando-arrow-color, #fff);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, opacity 0.2s ease;
}

.rando-highlights-nav::after {
    content: '';
    display: block;
    width: 28%;
    height: 28%;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
}

.rando-highlights-nav--prev {
    left: 8px;
}

.rando-highlights-nav--prev::after {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.rando-highlights-nav--next {
    right: 8px;
}

.rando-highlights-nav--next::after {
    transform: rotate(45deg);
    margin-right: 3px;
}

.rando-highlights-nav:hover {
    background: rgba(69, 46, 33, 0.65);
}

.rando-highlights-nav.swiper-button-disabled {
    opacity: 0.25;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 767px) {
    .rando-highlights-nav {
        width: calc(var(--rando-arrow-size, 32px) * 0.85);
        height: calc(var(--rando-arrow-size, 32px) * 0.85);
    }

    .rando-highlights-nav--prev {
        left: 4px;
    }

    .rando-highlights-nav--next {
        right: 4px;
    }
}

.rando-highlights .swiper-wrapper {
    align-items: stretch;
}

.rando-highlights .swiper-slide {
    height: auto !important;
}

.rando-highlight-slide {
    position: relative;
    width: 100%;
    height: var(--rando-height, 280px);
    min-height: var(--rando-height, 280px);
    max-height: var(--rando-height, 280px);
    border-radius: var(--rando-radius, 20px);
    overflow: hidden;
    box-shadow: 0 7px 12px rgba(69, 46, 33, 0.18);
}

@media (max-width: 767px) {
    .rando-highlight-slide {
        height: var(--rando-height-mobile, 200px);
        min-height: var(--rando-height-mobile, 200px);
        max-height: var(--rando-height-mobile, 200px);
    }

    .rando-highlight-slide .swiper-slide-inner {
        padding: max(10px, calc(var(--rando-pad, 16px) * 0.75));
    }

    .rando-highlight-slide .elementor-slide-heading {
        font-size: min(var(--rando-title-size, 22px), 18px);
    }

    .rando-highlight-slide .elementor-slide-description {
        font-size: min(var(--rando-desc-size, 14px), 13px);
    }
}

.rando-slide-bg,
.rando-highlight-slide .swiper-slide-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.rando-slide-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, var(--rando-overlay, 0.85)) 0%, transparent 55%),
        rgba(0, 0, 0, var(--rando-dim, 0));
    pointer-events: none;
}

.rando-highlight-slide .swiper-slide-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    padding: var(--rando-pad, 16px);
    text-decoration: none;
    color: #fff;
    box-sizing: border-box;
    cursor: pointer;
    overflow: hidden;
    touch-action: pan-y;
    -webkit-user-drag: none;
    user-select: none;
}

.rando-highlight-slide .elementor-slide-heading {
    font-size: var(--rando-title-size, 22px);
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 6px;
    color: #fff;
    overflow-wrap: break-word;
    word-wrap: break-word;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rando-highlight-slide .elementor-slide-description {
    font-size: var(--rando-desc-size, 14px);
    line-height: 1.4;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    overflow-wrap: break-word;
    word-wrap: break-word;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rando-highlight-slide .elementor-slide-description:empty {
    display: none;
}

/* 9 ancres texte */
.rando-pos-top-left .swiper-slide-inner { justify-content: flex-start; align-items: flex-start; text-align: left; }
.rando-pos-top-center .swiper-slide-inner { justify-content: flex-start; align-items: center; text-align: center; }
.rando-pos-top-right .swiper-slide-inner { justify-content: flex-start; align-items: flex-end; text-align: right; }
.rando-pos-middle-left .swiper-slide-inner { justify-content: center; align-items: flex-start; text-align: left; }
.rando-pos-middle-center .swiper-slide-inner { justify-content: center; align-items: center; text-align: center; }
.rando-pos-middle-right .swiper-slide-inner { justify-content: center; align-items: flex-end; text-align: right; }
.rando-pos-bottom-left .swiper-slide-inner { justify-content: flex-end; align-items: flex-start; text-align: left; }
.rando-pos-bottom-center .swiper-slide-inner { justify-content: flex-end; align-items: center; text-align: center; }
.rando-pos-bottom-right .swiper-slide-inner { justify-content: flex-end; align-items: flex-end; text-align: right; }

.rando-highlights-pagination {
    bottom: 0 !important;
}

.rando-highlights-pagination .swiper-pagination-bullet {
    background: var(--rando-brand, #c8231e);
    opacity: 0.35;
}

.rando-highlights-pagination .swiper-pagination-bullet-active {
    opacity: 1;
}

/* Popup article */
.rando-highlight-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.rando-highlight-modal[hidden] {
    display: none !important;
}

.rando-highlight-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;
}

.rando-highlight-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(480px, 100%);
    max-height: min(85vh, 640px);
    overflow-y: auto;
    padding: 20px;
    border-radius: var(--rando-radius, 20px);
    background: #fff;
    box-shadow: 0 16px 40px rgba(69, 46, 33, 0.28);
    box-sizing: border-box;
}

.rando-highlight-modal__image {
    width: 100%;
    height: 180px;
    margin: -4px 0 16px;
    border-radius: calc(var(--rando-radius, 20px) - 4px);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.rando-highlight-modal__image[hidden] {
    display: none !important;
}

.rando-highlight-modal__title {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    color: #452e21;
}

.rando-highlight-modal__desc {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.5;
    color: #5c4a3d;
    white-space: pre-wrap;
}

.rando-highlight-modal__desc:empty {
    display: none;
}

.rando-highlight-modal__cta {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 12px 24px;
    border-radius: 999px;
    background: var(--rando-brand, #c8231e);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease;
}

.rando-highlight-modal__cta:hover {
    background: var(--rando-brand-hover, #a81c17);
    color: #fff;
}

.rando-highlight-modal__cta[hidden] {
    display: none !important;
}

body.rando-highlight-modal-open {
    overflow: hidden;
}

/* V2: real article links and a readable paper card, with legacy HTML kept inert. */
.rando-highlights-app-source[hidden] { display: none !important; }
.rando-highlights--modern {
    --rando-brand: #b62d28;
    --rando-brand-hover: #92221f;
    --rando-paper: #fffdf9;
    --rando-ink: #35291f;
    color: var(--rando-ink);
    padding: 8px 0;
}
.rando-highlights--modern *, .rando-article-page * { box-sizing: border-box; }
.rando-news-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.rando-highlights--modern .rando-news-eyebrow { margin: 0; color: #35291f; font-family: "Poppins", sans-serif; font-size: clamp(24px, 3vw, 32px); font-weight: 600; line-height: 1.25; letter-spacing: -.02em; text-transform: none; }
.rando-news-controls { display: flex; align-items: center; gap: 9px; }
.rando-highlights--modern .rando-highlights-nav {
    position: static; transform: none; width: 42px; height: 42px;
    border: 1px solid #e5d8c9; background: #fffaf2; color: #8f2823;
}
.rando-highlights--modern .rando-highlights-nav:hover { background: #b62d28; border-color: #b62d28; color: #fff; }
.rando-highlights--modern .rando-highlights-nav.swiper-button-disabled { opacity: .35; }
.rando-highlights--modern .rando-highlights-swiper { padding: 2px 2px 34px; }
.rando-highlights--modern .swiper-wrapper { display: flex; align-items: flex-start; }
.rando-highlights--modern .rando-news-card {
    position: relative; height: auto !important; min-height: 0; max-height: none;
    border-radius: var(--rando-radius, 20px); border: 1px solid #eadfce; background: var(--rando-paper);
    box-shadow: 0 4px 16px rgba(66, 40, 24, .055); overflow: hidden;
}
.rando-highlights--modern .rando-news-card .swiper-slide-inner {
    display: flex; height: auto; flex-direction: column; padding: 0;
    overflow: visible; text-decoration: none; color: var(--rando-ink); user-select: auto;
}
.rando-news-image { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; background: #dfcbb1; }
.rando-highlights--modern .swiper-slide-bg { transition: transform .35s ease; }
.rando-news-image--empty { background: radial-gradient(circle at 72% 35%, #e7b85f 0 16%, transparent 17%), linear-gradient(135deg, #dcb97c, #c85135); }
.rando-news-badge { position: absolute; left: 18px; top: 18px; z-index: 1; padding: 6px 11px; border-radius: 100px; background: #fffaf1; color: #8d2420; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.rando-news-body { display: flex; flex: 1; width: 100%; flex-direction: column; align-items: stretch; padding: 18px 22px 16px; }
.rando-highlights--modern .rando-news-card .elementor-slide-heading { display: block; color: #35291f; font-size: clamp(22px, 2.5vw, 30px); font-weight: 800; line-height: 1.15; margin: 0 0 12px; overflow: visible; letter-spacing: -.025em; }
.rando-highlights--modern .rando-news-card .elementor-slide-description { color: #6e5d50; font-size: 15px; line-height: 1.65; margin: 0 0 12px; -webkit-line-clamp: 3; }
.rando-news-cta { margin-top: 0; padding-top: 10px; border-top: 1px solid #eee4d6; display: flex; justify-content: space-between; gap: 12px; color: #a82c26; font-size: 13px; font-weight: 800; }
.rando-news-cta > span { font-size: 21px; line-height: 1; }
.rando-news-card:hover .swiper-slide-bg { transform: scale(1.025); }
.rando-highlights--modern a:focus-visible, .rando-highlights--modern button:focus-visible, .rando-highlights-swiper:focus-visible { outline: 3px solid #a82c26; outline-offset: -3px; }
.rando-highlights--modern .rando-highlights-pagination { text-align: center; }
/* Usable horizontal cards when the external slider library is unavailable. */
.rando-highlights--modern:not([data-rando-initialized="1"]) .rando-highlights-swiper { overflow-x: auto; scroll-snap-type: x mandatory; }
.rando-highlights--modern:not([data-rando-initialized="1"]) .swiper-wrapper { gap: var(--rando-gap, 14px); }
.rando-highlights--modern:not([data-rando-initialized="1"]) .rando-news-card { flex: 0 0 min(85%, 430px); scroll-snap-align: start; }
.rando-highlights--modern:not([data-rando-initialized="1"]) .rando-news-controls { visibility: hidden; }
.rando-article-page { width: 100%; background: #faf6ee; padding: clamp(28px, 6vw, 80px) 20px; color: #35291f; }
.rando-article { max-width: 880px; margin: 0 auto; }
.rando-article-back { display: inline-block; margin-bottom: 42px; color: #a82c26; text-decoration: none; font-size: 14px; font-weight: 700; }
.rando-article h1 { font-size: clamp(32px, 6vw, 64px); font-weight: 800; line-height: 1.06; letter-spacing: -.04em; color: #35291f; margin: 12px 0 22px; overflow-wrap: anywhere; }
.rando-article-summary { font-size: clamp(18px, 2.5vw, 23px); line-height: 1.6; color: #6e5d50; max-width: 740px; }
.rando-article-image { display: block; width: 100%; max-height: 580px; object-fit: cover; margin: 36px 0; border-radius: 22px; }
.rando-article-body { max-width: 720px; margin: 36px auto; font-size: 18px; line-height: 1.8; overflow-wrap: anywhere; }
.rando-article-body p { margin: 0 0 1.25em; }
.rando-article-button { display: inline-block; padding: 14px 24px; border-radius: 100px; background: #b62d28; color: #fff !important; text-decoration: none; font-weight: 750; }
.rando-article a:focus-visible { outline: 3px solid #a82c26; outline-offset: 5px; }
@media (max-width: 767px) {
    .rando-news-toolbar { margin-bottom: 12px; }
    .rando-highlights--modern .rando-highlights-nav { width: 38px; height: 38px; }
    .rando-news-body { padding: 16px 18px 14px; }
    .rando-highlights--modern .rando-news-card .elementor-slide-description { font-size: 14px; }
    .rando-article-back { margin-bottom: 28px; }
    .rando-article-image { border-radius: 14px; margin: 26px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .rando-highlights *, .rando-highlights *::before, .rando-highlights *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
