/* ================================================================
   ICT Accordion – Front-end styles
   Developed by ICT
   ================================================================ */

/* ---- Layout wrapper ---- */
.ict-accordion-wrap {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    font-family: inherit;
}

/* ---- Left column (image) ---- */
.ict-acc-image-col {
    flex: 0 0 48%;
    max-width: 48%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #e8ecf1;
    min-height: 340px;
}

.ict-acc-img-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}

.ict-acc-img-slide.ict-acc-img-active {
    opacity: 1;
    pointer-events: auto;
}

.ict-acc-img-slide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    max-width: none !important;
    max-height: none !important;
}

.ict-acc-img-placeholder {
    width: 100%;
    height: 100%;
    min-height: 340px;
    background: linear-gradient(135deg, #d0d8e4 0%, #b8c4d1 100%);
}

/* ---- Right column (accordion items) ---- */
.ict-acc-items-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---- Single item ---- */
.ict-acc-item {
    border: 2px solid #1a3a6e;
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
    padding: 0 !important;
    margin: 0;
    transition: border-radius 0.3s ease;
}

.ict-acc-item.ict-acc-item--open,
.ict-acc-item.ict-acc-item--open:hover,
.ict-acc-item.ict-acc-item--open:focus,
.ict-acc-item.ict-acc-item--open:active {
    border-radius: 20px;
    background: #1a3a6e;
    padding: 0 !important;
    margin: 0;
}

/* ---- Trigger (button) ---- */
.ict-acc-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 22px;
    background: #fff;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    cursor: pointer;
    text-align: left;
    gap: 12px;
    -webkit-appearance: none;
    appearance: none;
}

/* Bloquer tout effet hover / focus */
.ict-acc-trigger:hover,
.ict-acc-trigger:focus,
.ict-acc-trigger:active,
.ict-acc-trigger:focus-visible,
.ict-acc-trigger:focus-within {
    background: #fff;
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
}

/* État actif (item ouvert) */
.ict-acc-item--open .ict-acc-trigger,
.ict-acc-item--open .ict-acc-trigger:hover,
.ict-acc-item--open .ict-acc-trigger:focus,
.ict-acc-item--open .ict-acc-trigger:active {
    background: #1a3a6e;
    outline: none;
    box-shadow: none;
}

.ict-acc-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a3a6e;
    line-height: 1.3;
    flex: 1;
}

.ict-acc-item--open .ict-acc-title {
    color: #fff;
}

/* ---- Icon (chevron / arrow circle) ---- */
.ict-acc-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #1a3a6e;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.3s;
    position: relative;
}

.ict-acc-icon::after {
    content: '';
    display: block;
    width: 10px;
    height: 10px;
    border-right: 2.5px solid #fff;
    border-bottom: 2.5px solid #fff;
    transform: rotate(-45deg) translate(-1px, 1px);
    transition: transform 0.3s;
}

/* Open state icon: chevron down → becomes a downward caret */
.ict-acc-item--open .ict-acc-icon {
    background-color: #68AD3B;
    transform: none;
}

.ict-acc-item--open .ict-acc-icon::after {
    transform: rotate(45deg) translate(-2px, -2px);
}

/* ---- Panel ---- */
.ict-acc-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.ict-acc-panel:not([hidden]) {
    max-height: 600px;
}

.ict-acc-panel[hidden] {
    display: block !important; /* override browser hidden so CSS transition works */
    max-height: 0;
    visibility: hidden;
}

.ict-acc-panel-inner {
    padding: 0 22px 20px;
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
    font-family: 'Sora', sans-serif;
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 900px) {
    .ict-accordion-wrap {
        gap: 24px;
    }
    .ict-acc-image-col {
        flex: 0 0 42%;
        max-width: 42%;
        min-height: 280px;
    }
}

@media (max-width: 680px) {
    .ict-accordion-wrap {
        flex-direction: column;
    }
    .ict-acc-image-col {
        flex: none;
        width: 100%;
        max-width: 100%;
        position: relative;
        height: 0;
        padding-bottom: 56.25%; /* ratio 16:9 — crée une hauteur fiable pour les enfants absolus */
        min-height: unset;
    }
    .ict-acc-img-slide {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }
}
