/* Variables par défaut */
.chs {
    --chs-badge-top: 72px;
    --chs-badge-right: 24px;
    --chs-badge-size: 72px;
    --chs-dot-size: 10px;
    --chs-dot-radius: 9999px;
    --chs-dot-bg: rgba(0,0,0,.25);
    --chs-dot-bg-active: #000;
    --chs-panel-nav-bottom: 16px;
}

/* Layout de base */
.chs {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: visible;
    --chs-tx: 0;
    --chs-ty: 0;
}

/* Alignement horizontal global du slider */
.chs-align-left .chs {
    margin-left: 0;
    margin-right: auto;
}

.chs-align-center .chs {
    margin-left: auto;
    margin-right: auto;
}

.chs-align-right .chs {
    margin-left: auto;
    margin-right: 0;
}

.chs.chs--ratio-16-9 {
    aspect-ratio: 16 / 9;
    height: auto !important;
}

.chs.chs--ratio-4-3 {
    aspect-ratio: 4 / 3;
    height: auto !important;
}



.chs.chs--ratio-1-1 {
    aspect-ratio: 1 / 1;
    height: auto !important;
}

.chs .chs__viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.chs .chs__track {
    display: flex;
    height: 100%;
    transition: transform .5s ease;
    will-change: transform;
}

.chs .chs__slide {
    position: relative;
    flex: 0 0 100%;
    height: 100%;
    overflow: hidden;
}

/* BG pour variante contenu */
.chs .chs__bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 0;
}

.chs .chs__overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* ========= Variante image simple ========= */

.chs .chs__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chs .chs__img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    margin: auto;
}

.chs.chs--variant-image_simple .chs__slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

.chs.chs--variant-image_simple .chs__overlay,
.chs.chs--variant-image_simple .chs__panel,
.chs.chs--variant-image_simple .chs__badge {
    display: none !important;
}

.chs.chs--variant-image_simple.chs--fit-contain .chs__img {
    object-fit: contain;
    object-position: center;
}

.chs.chs--variant-image_simple.chs--fit-cover .chs__img {
    object-fit: cover;
    object-position: center;
}

/* ========= Variante contenu ========= */

/* panneau */
.chs .chs__panel {
    position: absolute;
    color: #fff;
    width: 38%;
    min-height: auto;
    z-index: 2;
    pointer-events: auto;
    box-sizing: border-box;
    transform: translate(var(--chs-tx), var(--chs-ty));
}

/* Alignement vertical */
.chs.chs--v-middle .chs__panel {
    top: 50%;
    bottom: auto;
    --chs-ty: -50%;
}

.chs.chs--v-top .chs__panel {
    top: 0;
    bottom: auto;
    --chs-ty: 0;
}

.chs.chs--v-bottom .chs__panel {
    bottom: 0;
    top: auto;
    --chs-ty: 0;
}

/* Alignement horizontal */
.chs.chs--pos-left .chs__panel {
    left: 0;
    right: auto;
    --chs-tx: 0;
}

.chs.chs--pos-center .chs__panel {
    left: 50%;
    right: auto;
    --chs-tx: -50%;
}

.chs.chs--pos-right .chs__panel {
    right: 0;
    left: auto;
    --chs-tx: 0;
}

/* contenu panneau */
.chs .chs__panel-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.chs .chs__title {
    margin: 0;
    font-weight: 800;
    line-height: 1.05;
    font-size: clamp(28px, 4vw, 56px);
}

.chs .chs__text {
    margin: 0;
    font-size: clamp(14px, 1.6vw, 18px);
    opacity: .95;
}

.chs .chs__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px 16px;
    border-radius: 0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    background: #fff;
    color: #2c3e50;
}

/* Badge */
.chs .chs__badge {
    position: absolute;
    top: var(--chs-badge-top);
    right: var(--chs-badge-right);
    width: var(--chs-badge-size);
    height: auto;
    z-index: 3;
    pointer-events: none;
}

.chs .chs__badge img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Nav sous le bouton */
.chs .chs__panel-navrow {
    position: absolute;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    bottom: var(--chs-panel-nav-bottom, 16px);
}

.chs.chs--picto-right .chs__panel-navrow {
    right: 0;
    left: auto;
}

.chs.chs--picto-left .chs__panel-navrow {
    left: 0;
    right: auto;
}

.chs.chs--picto-outside .chs__panel-navrow {
    bottom: calc(-1 * var(--chs-panel-nav-bottom, 16px));
}

.chs .chs__panel-dotnav {
    width: auto;
    height: auto;
    border: none;
    background: transparent;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    color: #fff;
    cursor: pointer;
    box-shadow: none;
    font-size: 22px;
}

.chs .chs__panel-dotnav i,
.chs .chs__panel-dotnav svg {
    width: 1em;
    height: 1em;
    display: inline-block;
}

/* Nav externe */
.chs .chs__nav {
    display: grid;
    place-items: center;
    cursor: pointer;
}

.chs .chs__footer-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.chs .chs__footer-nav .chs__dots {
    position: static;
    transform: none;
    left: auto;
    bottom: auto;
    z-index: 2;
}

.chs .chs__ext-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chs .chs__ext-nav .chs__nav {
    position: static;
    transform: none;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    border: 1px solid #1f1f1f;
    background: transparent;
    color: #1f1f1f;
    font-size: 28px;
    line-height: 1;
    padding: 0;
}

/* Dots */
.chs .chs__dots {
    display: flex !important;
    gap: 10px;
    pointer-events: auto;
}

.chs .chs__dots .chs__dot {
    width: var(--chs-dot-size);
    height: var(--chs-dot-size);
    border-radius: var(--chs-dot-radius);
    background: var(--chs-dot-bg);
    display: block;
    padding: 0;
    line-height: 0;
    border: none;
    cursor: pointer;
}

.chs .chs__dots .chs__dot[aria-current="true"] {
    background: var(--chs-dot-bg-active);
}

.chs {
    aspect-ratio: 2 / 1;
    height: auto; /* important */
}

