/* =====================================================
   Floratek – Expertises Tabs  |  Beekom Studio
   ===================================================== */

/* ── Layout ── */

.et-expertises-tabs {
    width: 100%;
}

.et-layout {
    display: flex;
    align-items: flex-start;
    gap: 64px;
    width: 100%;
}

.et-col-left {
    flex: 0 0 45%;
    max-width: 45%;
}

.et-col-right {
    flex: 1;
    min-width: 0;
}

/* ── Navigation ── */

.et-tabs-nav {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-top-style: solid;
}

.et-tab-nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-style: solid;
    padding: 18px 0;
    cursor: pointer;
    user-select: none;
}

.et-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.et-tab-title {
    flex: 1;
    font-size: 18px;
    color: #6b7a99;
    font-weight: 400;
    line-height: 1.4;
    transition: color 0.3s ease, font-weight 0.1s ease;
}

.et-tab-nav-item.active .et-tab-title {
    color: #ffffff;
    font-weight: 600;
}

/* ── Flèche accordéon (mobile) ── */

.et-tab-arrow {
    display: none;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    position: relative;
}

.et-tab-arrow::before,
.et-tab-arrow::after {
    content: '';
    position: absolute;
    background-color: #6b7a99;
    border-radius: 2px;
    transition: background-color 0.3s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.et-tab-arrow::before {
    width: 14px;
    height: 2px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.et-tab-arrow::after {
    width: 2px;
    height: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.et-tab-nav-item.active .et-tab-arrow::before,
.et-tab-nav-item.active .et-tab-arrow::after {
    background-color: #ffffff;
}

.et-tab-nav-item.active .et-tab-arrow::after {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* ── Contenu accordéon (mobile) ── */

.et-accordion-content {
    display: none;
    overflow: hidden;
}

/* ── Panneaux desktop : disposition en grille superposée ── */

.et-desktop-panels {
    display: grid;
}

.et-desktop-panel {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition:
        opacity   0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0.45s;
    pointer-events: none;
}

.et-desktop-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
    transition:
        opacity   0.45s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0s linear 0s;
}

/* ── Texte & CTA partagés ── */

.et-tab-desc {
    font-size: 15px;
    color: #ffffff;
    line-height: 1.7;
    margin: 0;
}

.et-desktop-panel .et-tab-desc {
    margin-top: 32px;
}

/* Bouton CTA — le style est géré par les classes Liquid Design du thème */
.et-tab-cta {
    display: inline-flex !important;
    margin-top: 28px;
    /* border-style indispensable pour que les contrôles Elementor (couleur + épaisseur) s'appliquent */
    border-style: solid !important;
}

/* Couleur de l'icône : transparente comme le thème, le stroke SVG porte la couleur */
.et-tab-cta .btn-icon {
    color: transparent;
}

/* ── Images : cross-fade avec CSS Grid ── */

.et-image-panels {
    display: grid;
    width: 100%;
}

.et-image-panel {
    grid-area: 1 / 1;         /* tous les panneaux se superposent */
    opacity: 0;
    transform: translateY(24px) scale(0.97);
    transition:
        opacity   0.55s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    will-change: opacity, transform;
    border-radius: 16px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.et-image-panel.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    z-index: 1;
}

.et-image-panel img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* ── Image accordéon (mobile) ── */

.et-acc-image {
    border-radius: 16px;
    overflow: hidden;
    background-color: #f0f0f0;
    margin-top: 20px;
}

.et-acc-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.et-acc-desc {
    margin-top: 20px !important;
}

/* ── Focus clavier ── */

.et-tab-nav-item:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 3px;
}

/* =====================================================
   RESPONSIVE — Tablette (< 1024px)
   ===================================================== */

@media (max-width: 1024px) {

    .et-layout {
        gap: 40px !important;
    }

    .et-col-left {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

/* =====================================================
   RESPONSIVE — Mobile (< 768px)
   ===================================================== */

@media (max-width: 767px) {

    .et-layout {
        flex-direction: column;
        gap: 0 !important;
    }

    .et-col-left {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Masquer la colonne image et les panneaux desktop */
    .et-col-right,
    .et-desktop-panels {
        display: none !important;
    }

    /* Afficher la flèche accordéon */
    .et-tab-arrow {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Ouverture de l'accordéon avec animation max-height */
    .et-accordion-content {
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .et-tab-nav-item.active .et-accordion-content {
        max-height: 900px; /* valeur haute suffisante pour tout contenu */
    }

    .et-tab-title {
        font-size: 16px !important;
    }
}
