.sqelm-comm {
    --sqelm-slide-w: 64%;
    --sqelm-card-h: 380px;
    --sqelm-radius: 6px;
    --sqelm-flou-h: 50%;
    --sqelm-flou-b: 14px;
    --sqelm-flou-c: rgba(0, 0, 0, 0.3);
    --sqelm-icon-s: 22px;
    --sqelm-icon-box: 40px;
    --sqelm-icon-c: #3a3a2e;
    --sqelm-icon-bg: #fff;
    --sqelm-arrow-s: 32px;
    --sqelm-arrow-bg: #fff;
    --sqelm-arrow-c: #222;
    position: relative;
}

.sqelm-comm__swiper {
    overflow: hidden;
    width: 100%;
}

.sqelm-comm .sqelm-comm__slide {
    width: var(--sqelm-slide-w);
    height: var(--sqelm-card-h);
    flex-shrink: 0;
}

/* Ratio mode: height follows the card width */
.sqelm-comm.sqelm-comm--ratio .swiper-wrapper {
    align-items: flex-start;
    height: auto;
}

.sqelm-comm.sqelm-comm--ratio .sqelm-comm__slide {
    height: auto;
    aspect-ratio: var(--sqelm-ratio, 9 / 5);
}

.sqelm-comm__carte {
    position: relative;
    isolation: isolate; /* keep the card's layers ordered inside it */
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: var(--sqelm-radius);
    overflow: hidden;
    background: #ddd;
}

.sqelm-comm .sqelm-comm__image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
    border-radius: 0;
    z-index: 0;
}

/* Progressive blur: stacked layers, each blur doubling, each masked to its own band */
.sqelm-comm__flou,
.sqelm-comm__teinte {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--sqelm-flou-h);
    pointer-events: none;
    z-index: 1;
}

.sqelm-comm__flou > span {
    position: absolute;
    inset: 0;
}

.sqelm-comm__flou > span:nth-child(1) {
    -webkit-backdrop-filter: blur(calc(var(--sqelm-flou-b) / 8));
    backdrop-filter: blur(calc(var(--sqelm-flou-b) / 8));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 25%, #000 50%, rgba(0, 0, 0, 0) 75%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, #000 25%, #000 50%, rgba(0, 0, 0, 0) 75%);
}

.sqelm-comm__flou > span:nth-child(2) {
    -webkit-backdrop-filter: blur(calc(var(--sqelm-flou-b) / 4));
    backdrop-filter: blur(calc(var(--sqelm-flou-b) / 4));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 25%, #000 50%, #000 75%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 25%, #000 50%, #000 75%, rgba(0, 0, 0, 0) 100%);
}

.sqelm-comm__flou > span:nth-child(3) {
    -webkit-backdrop-filter: blur(calc(var(--sqelm-flou-b) / 2));
    backdrop-filter: blur(calc(var(--sqelm-flou-b) / 2));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, #000 75%, #000 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, #000 75%, #000 100%);
}

.sqelm-comm__flou > span:nth-child(4) {
    -webkit-backdrop-filter: blur(var(--sqelm-flou-b));
    backdrop-filter: blur(var(--sqelm-flou-b));
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 75%, #000 100%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 75%, #000 100%);
}

/* Dark tint for text contrast, separate from the blur */
.sqelm-comm__teinte {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, var(--sqelm-flou-c) 100%);
}

/* Clickable image zone, under the content */
.sqelm-comm__zone {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: block;
    -webkit-user-drag: none;
}

.sqelm-comm__zone:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -6px;
    border-radius: var(--sqelm-radius);
}

.sqelm-comm__contenu {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    pointer-events: none; /* clicks on the text fall through to the image zone */
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
}

.sqelm-comm__texte {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.sqelm-comm__icone {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sqelm-icon-box);
    height: var(--sqelm-icon-box);
    background: var(--sqelm-icon-bg);
    border-radius: 4px;
    color: var(--sqelm-icon-c);
    line-height: 0;
}

.sqelm-comm__icone svg,
.sqelm-comm__icone img {
    display: block;
    width: var(--sqelm-icon-s);
    height: var(--sqelm-icon-s);
    object-fit: contain;
}

.sqelm-comm__icone svg {
    fill: currentColor;
}

.sqelm-comm__icone svg *:not([fill="none"]) {
    fill: currentColor;
}

.sqelm-comm__icone svg [stroke]:not([stroke="none"]) {
    stroke: currentColor;
}

.sqelm-comm__libelles {
    min-width: 0;
}

.sqelm-comm .sqelm-comm__titre {
    margin: 0;
    padding: 0;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 400;
    color: #fff;
}

.sqelm-comm .sqelm-comm__note {
    margin: 2px 0 0;
    padding: 0;
    font-size: 12px;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.85);
}

.sqelm-comm .sqelm-comm__bouton {
    flex: 0 0 auto;
    display: inline-block;
    padding: 8px 14px;
    background: #fff;
    color: #222;
    font-size: 13px;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 3px;
    pointer-events: auto;
    -webkit-user-drag: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sqelm-comm a.sqelm-comm__bouton:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Text for screen readers only */
.sqelm-comm__sr {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Pause button: hidden until reached with the keyboard */
.sqelm-comm__pause {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 6;
    padding: 8px 14px;
    border: 0;
    border-radius: 3px;
    background: #fff;
    color: #222;
    font-size: 13px;
    line-height: 1.2;
    cursor: pointer;
    transform: translateX(-50%);
    clip-path: inset(50%);
    opacity: 0;
    pointer-events: none;
}

.sqelm-comm button.sqelm-comm__pause:hover,
.sqelm-comm button.sqelm-comm__pause:active {
    background: #fff;
    color: #222;
}

.sqelm-comm__pause:focus,
.sqelm-comm__pause:focus-visible {
    background: #fff;
    color: #222;
    clip-path: none;
    opacity: 1;
    pointer-events: auto;
    outline: 2px solid #222;
    outline-offset: 2px;
}

/* Arrows sit on the edges of the centered card */
.sqelm-comm__fleche {
    position: absolute;
    top: 50%;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--sqelm-arrow-s);
    height: var(--sqelm-arrow-s);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--sqelm-arrow-bg);
    color: var(--sqelm-arrow-c);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.sqelm-comm__fleche svg {
    width: 55%;
    height: 55%;
}

.sqelm-comm__fleche--prev {
    left: calc((100% - var(--sqelm-slide-w)) / 2);
    transform: translate(-50%, -50%);
}

.sqelm-comm__fleche--next {
    right: calc((100% - var(--sqelm-slide-w)) / 2);
    transform: translate(50%, -50%);
}

/* Higher specificity than theme resets like button:hover / button:focus */
.sqelm-comm button.sqelm-comm__fleche,
.sqelm-comm button.sqelm-comm__fleche:hover,
.sqelm-comm button.sqelm-comm__fleche:focus,
.sqelm-comm button.sqelm-comm__fleche:active {
    background: var(--sqelm-arrow-bg);
    color: var(--sqelm-arrow-c);
    border: 0;
}

.sqelm-comm__fleche:focus-visible {
    outline: 2px solid var(--sqelm-arrow-c);
    outline-offset: 2px;
}

.sqelm-comm__fleche--prev:hover { transform: translate(-50%, -50%) scale(1.08); }
.sqelm-comm__fleche--next:hover { transform: translate(50%, -50%) scale(1.08); }

.sqelm-comm__fleche.swiper-button-disabled {
    opacity: 0.35;
    cursor: default;
}

.sqelm-comm__vide {
    padding: 24px;
    border: 1px dashed #c4c4c4;
    text-align: center;
    font-size: 14px;
    color: #666;
}

@media (max-width: 767px) {
    /* 3 blur layers on phones */
    .sqelm-comm__flou > span:nth-child(1) {
        display: none;
    }

    .sqelm-comm__contenu {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sqelm-comm__fleche,
    .sqelm-comm__bouton { transition: none; }
}

/* No backdrop-filter support: keep the tint only */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .sqelm-comm__flou { display: none; }
}

/* iOS Safari: while the carousel slides, WebKit can paint backdrop-filter layers
   above later siblings for a frame. Promoting the content (and the click zone)
   to their own GPU layers keeps them on top during the animation. */
.sqelm-comm__contenu,
.sqelm-comm__zone {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.sqelm-comm__flou > span {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}
