/* ═══════════════════════════════════════════════════════════════════
   DC Itinerary — Timeline + Accordion styles
   ═══════════════════════════════════════════════════════════════════ */

/* ── Wrapper ──────────────────────────────────────────────────────── */
.dc-itinerary-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.dc-itinerary-wrapper .st-program-list {
    flex: 1;
    min-width: 0;
}

/* ── Accordion outer: pill shape ─────────────────────────────────── */
.st-program-list .accordion {
    border-radius: 45px !important;
    overflow: hidden !important;
    border: 1px solid #e4e8ef !important;
    margin-bottom: 8px !important;
    padding: 0 !important;
    transition: border-radius 0.3s ease !important;
    /* fermeture */
}

.st-program-list .accordion.dc-accordion--open {
    border-radius: 30px !important;
    /* dc-accordion--open ajouté en JS dès le début de l'ouverture → transition immédiate */
}

/* ── Accordion item: no extra border/radius ───────────────────────── */
.st-program-list .accordion-item {
    border-radius: 0 !important;
    border: none !important;
    overflow: visible !important;
}

/* ── Accordion button: no radius (outer clips), same padding open/closed ── */
.st-program-list .accordion-button,
.st-program-list .accordion-button.collapsed,
.st-program-list .accordion-button:not(.collapsed) {
    border-radius: 0 !important;
    padding: 6px 18px 6px 6px !important;
    gap: 10px !important;
    align-items: center !important;
}

/* ── Escale times ─────────────────────────────────────────────────── */
.dc-escale-times {
    margin: 0 !important;
    flex-shrink: 0;
}

.dc-accordion--sea .dc-escale-times {
    display: none !important;
}

/* ── Round thumb ──────────────────────────────────────────────────── */
.dc-acc-thumb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: width 0.35s ease, height 0.35s ease, border-radius 0.35s ease;
}

/* Thumb grows when accordion opens */
.st-program-list .accordion-button:not(.collapsed) .dc-acc-thumb {
    width: 150px;
    height: 150px;
    border-radius: 25px;
}

/* ── Accordion body ───────────────────────────────────────────────── */
.st-program-list .accordion-body {
    padding: 0 16px 16px !important;
}

/* Body quand ouvert : padding left (header image à gauche), padding right (espace chevron) */
.st-program-list .accordion.dc-accordion--open .accordion-body {
    padding: 6px 48px 24px 12px !important;
}

/* ── Open layout: contenu (titre + desc) avec fade-in ─────────────── */
.dc-open-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    animation: dcFadeIn 0.35s ease;
    margin-bottom: 20px;
    padding-right: 30px;
}

@keyframes dcFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Thumb grows to 150px when moved into the open layout */
.dc-open-layout .dc-acc-thumb {
    width: 150px !important;
    height: 150px !important;
    border-radius: 25px !important;
    flex-shrink: 0;
}

.dc-open-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 4px;
}

.dc-open-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.dc-open-desc {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.dc-open-desc p {
    margin: 0 0 4px;
}

/* ── Thumb placeholder (invisible, keeps height uniform) ──────────── */
.dc-acc-thumb-placeholder {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    display: block;
    visibility: hidden;
}

/* ── Timeline column ──────────────────────────────────────────────── */
.dc-itinerary-timeline {
    display: flex;
    flex-direction: column;
    width: 150px;
    flex-shrink: 0;
    padding-right: 14px;
}

/* ── Each row ─────────────────────────────────────────────────────── */
.dc-it-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

/* ── Spine ────────────────────────────────────────────────────────── */
.dc-it-spine {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 22px;
}

.dc-it-line {
    width: 2px;
    flex-shrink: 0;
    background: #aec6e0;
}

.dc-it-line--dashed {
    background: repeating-linear-gradient(to bottom,
            #aec6e0 0,
            #aec6e0 5px,
            transparent 5px,
            transparent 10px);
}

.dc-it-line--hidden {
    background: transparent !important;
}

/* ── Pin icons ────────────────────────────────────────────────────── */
.dc-it-pin {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dc-it-pin svg {
    width: 100%;
    height: 100%;
}

.dc-it-pin--full {
    color: #1a3a6b;
}

.dc-it-pin--port {
    color: #3b71fe;
}

.dc-it-pin--ship {
    color: #89aacc;
}

/* ── Info text ────────────────────────────────────────────────────── */
.dc-it-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.dc-it-day {
    font-size: 10px;
    color: #999;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1;
}

.dc-it-city {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.dc-it-row--sea .dc-it-city {
    font-style: italic;
    font-weight: 500;
    color: #6a8fb0;
}

.dc-it-row--sea .dc-it-day {
    color: #aac0d8;
}

.dc-it-flag {
    font-size: 14px;
    line-height: 1;
    margin-top: 1px;
}

/* ── Layout quand ouvert : header (image) à gauche, body à droite ── */
/* Classe appliquée en JS dans le même frame que dc-btn--open → 0 flash */
.st-program-list .accordion.dc-accordion--open .accordion-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.st-program-list .accordion.dc-accordion--open .accordion-header {
    flex-shrink: 0;
}

.st-program-list .accordion.dc-accordion--open .accordion-collapse {
    flex: 1;
    min-width: 0;
    display: flex !important;
    flex-direction: column;
    justify-content: flex-start;
}

/* ── Button open state ───────────────────────────────────────────── */
.st-program-list .accordion-button.dc-btn--open {
    align-items: flex-start;
    align-self: flex-start;
    padding: 6px 10px 6px 6px !important;
}

/* Cacher le ::after Bootstrap quand ouvert (remplacé par .dc-chevron-open) */
.st-program-list .accordion-button.dc-btn--open::after {
    display: none !important;
}

/* ── Vrai élément DOM chevron, positionné top-right de l'accordion ── */
.st-program-list .accordion.dc-accordion--open {
    position: relative;
}

.dc-chevron-open {
    position: absolute;
    top: 33px;
    right: 18px;
    width: 16px;
    height: 16px;
    padding: 0;
    border: none;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-size: 16px 16px;
    background-repeat: no-repeat;
    background-position: center;
    transform: rotate(-180deg);
    /* chevron pointant vers le haut = état ouvert */
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.dc-chevron-open:hover {
    opacity: 1;
}

.dc-btn-text-hidden {
    display: none !important;
}

/* Hide placeholder + times when open */
.st-program-list .accordion-button.dc-btn--open .dc-acc-thumb-placeholder,
.st-program-list .accordion-button.dc-btn--open .dc-escale-times {
    display: none !important;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* .dc-itinerary-wrapper {
        flex-direction: column;
    } */

    .dc-itinerary-timeline {
        display: none;
    }

}