/* =====================================================
   ICS — Carousel Front-end  |  500px × 500px
   ===================================================== */

.ics-slider {
    position: relative;
    width: 500px;
    /* height: 270px; */
    height: 310px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 0px;
    /* background: #111; */
    /* box-shadow: 0 8px 32px rgba(0, 0, 0, .28); */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Track */
.ics-slider__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .6s cubic-bezier(.4, 0, .2, 1);
    will-change: transform;
}

/* Chaque slide : exactement 500×500 */
.ics-slide {
    min-width: 500px;
    width: 500px;
    height: 270px;
    flex-shrink: 0;
    overflow: hidden;
    position: relative;
}

/* Image cliquable */
.ics-slide img {
    width: 500px;
    height: 270px;
    object-fit: cover;
    object-position: center;
    display: block;
    cursor: zoom-in;
    transition: opacity .4s ease, transform .4s ease;
}
.ics-slide:not(.is-active) img { opacity: 1; }
.ics-slide.is-active img       { opacity: 1; }
.ics-slide.is-active img:hover { 
    /* transform: scale(1.03); */
 }

/* Icône zoom au survol */
.ics-slide-link {
    display: block;
    width: 100%;
    height: 100%;
    position: relative;
}
.ics-slide-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background .3s;
    pointer-events: none;
    z-index: 2;
}
.ics-slide.is-active .ics-slide-link:hover::after {
    /* background: rgba(0,0,0,.18); */
}
.ics-zoom-icon {
    position: absolute;
    bottom: 14px;
    right: 14px;
    z-index: 5;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255,255,255,.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(.8);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}
.ics-slide.is-active .ics-slide-link:hover .ics-zoom-icon {
    /* opacity: 1; */
    transform: scale(1);
}

/* Overlay dégradé bas */
.ics-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    /* background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,.35) 100%); */
    pointer-events: none;
    z-index: 1;
}

/* ── Boutons Précédent / Suivant ── */
.ics-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.55);
    background: rgba(0,0,0,.38);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    transition: background .2s, border-color .2s, transform .2s;
    display: none;
}
.ics-btn:hover {
    background: rgba(196, 156, 72,.7);
    border-color: #fff;
    transform: translateY(-50%) scale(1.1);
    display: none;
}
.ics-btn:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.ics-btn svg { width: 18px; height: 18px; pointer-events: none; }
.ics-btn--prev { left: 14px; }
.ics-btn--next { right: 14px; }

/* ── Dots ── */
.ics-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 20;
    align-items: center;
}
.ics-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,.4);
    border: 1.5px solid rgba(255,255,255,.55);
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: background .25s, width .3s, border-radius .3s;
}
.ics-dot.is-active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}
.ics-dot:hover:not(.is-active) { background: rgba(255,255,255,.75); }
.ics-dot:focus-visible { box-shadow: 0 0 0 2px rgba(255,255,255,.7); }



.ics-dot {
    background: rgba(196, 156, 72, 0.35);   /* #c49c48 transparent */
    border: 1.5px solid rgba(196, 156, 72, 0.6);
}
.ics-dot.is-active {
    background: #c49c48;                     /* #c49c48 plein */
    border-color: #c49c48;
    width: 26px;
    border-radius: 5px;
}
.ics-dot:hover:not(.is-active) {
    background: rgba(196, 156, 72, 0.65);
    border-color: #c49c48;
}

/* ── Compteur ── */
.ics-counter {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 20;
    background: rgba(0,0,0,.42);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .5px;
    border-radius: 20px;
    padding: 3px 11px;
    display: flex;
    align-items: center;
    gap: 3px;
    border: 1px solid rgba(255,255,255,.18);
    display: none;
}
.ics-counter__sep { opacity: .55; }

/* =====================================================
   MODAL LIGHTBOX
   ===================================================== */
.ics-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}
.ics-modal.is-open {
    display: flex;
}

/* Fond sombre animé */
.ics-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .88);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    cursor: zoom-out;
    animation: icsBackdropIn .25s ease forwards;
}
@keyframes icsBackdropIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Contenu modal */
.ics-modal__content {
    position: relative;
    z-index: 2;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: icsModalIn .3s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes icsModalIn {
    from { opacity: 0; transform: scale(.82); }
    to   { opacity: 1; transform: scale(1); }
}

/* Image dans le modal */
.ics-modal__img {
    display: block;
    max-width: 90vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    object-fit: contain;
    user-select: none;
    -webkit-user-drag: none;
}

/* Bouton fermer */
.ics-modal__close {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.3);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background .2s, transform .2s;
    outline: none;
}
.ics-modal__close:hover {
    background: rgba(255,255,255,.25);
    transform: scale(1.1) rotate(90deg);
}
.ics-modal__close:focus-visible { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }

/* Boutons prev/next dans le modal */
.ics-modal__prev,
.ics-modal__next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1.5px solid rgba(255,255,255,.3);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    outline: none;
    transition: background .2s, transform .2s;
}
.ics-modal__prev:hover,
.ics-modal__next:hover {
    background: rgba(255,255,255,.25);
}
.ics-modal__prev { left: 16px; }
.ics-modal__next { right: 16px; }
.ics-modal__prev:hover { transform: translateY(-50%) scale(1.08); }
.ics-modal__next:hover { transform: translateY(-50%) scale(1.08); }
.ics-modal__prev svg,
.ics-modal__next svg { width: 20px; height: 20px; pointer-events: none; }

/* Compteur modal */
.ics-modal__counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    padding: 5px 16px;
    letter-spacing: .5px;
    border: 1px solid rgba(255,255,255,.15);
}

/* Animation de fermeture */
.ics-modal.is-closing .ics-modal__content {
    animation: icsModalOut .2s ease forwards;
}
.ics-modal.is-closing .ics-modal__backdrop {
    animation: icsBackdropOut .2s ease forwards;
}
@keyframes icsModalOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(.88); }
}
@keyframes icsBackdropOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ── Notice shortcode ── */
.ics-notice {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    color: #795800;
    padding: 10px 16px;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    margin: 10px 0;
}

/* ── Responsive ── */
@media (max-width: 520px) {
    .ics-slider {
        width: 100%;
        /* height: auto; */
        height: 250px;
        aspect-ratio: 1 / 1;
    }
    .ics-slide { min-width: 100%; width: 100%; height: 100%; }
    .ics-slide img { 
        width: 100%; 
        /* height: 100%;  */
        height: auto; 
    }
    .ics-btn { width: 34px; height: 34px; }
    .ics-btn svg { width: 14px; height: 14px; }
    .ics-modal__prev { left: 6px; }
    .ics-modal__next { right: 6px; }
}
