/* Animations d'apparition */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Cartes formations (mêmes effets que nos_services) */
.formation-card {
    transition: opacity 300ms ease, transform 300ms ease, filter 300ms ease;
}

.formation-card.card-hidden {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(1px);
    pointer-events: none;
}

.formation-card.hidden {
    display: none !important;
}

/* La description courte reste visible ; le programme complet est dans le détail. */
.formation-card .p-6 > p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.formation-card .p-6 > ul,
.formation-card .p-6 > .border-t {
    display: none;
}

/* Fenêtre des détails d'une formation */
.formation-dialog {
    width: min(92vw, 720px);
    max-height: 90vh;
    padding: 0;
    color: #1e1b1a;
    background: #fff8f6;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 70px rgba(39, 19, 16, 0.25);
    overflow: hidden;
}

.formation-dialog::backdrop {
    background: rgba(39, 19, 16, 0.6);
    backdrop-filter: blur(4px);
}

.formation-dialog__content {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.formation-dialog__image {
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.formation-dialog__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    width: 2.5rem;
    height: 2.5rem;
    color: #271310;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 9999px;
    font-size: 1.1rem;
}

@media (max-width: 640px) {
    .formation-dialog__content {
        scrollbar-width: none;
    }

    .formation-dialog__content::-webkit-scrollbar {
        display: none;
    }

    .formation-dialog__image {
        height: 170px;
    }
}

/* Panneau de filtres (mobile / desktop) */
#filter-panel {
    display: block;
}

@media (min-width: 768px) {
    #filter-panel {
        display: none;
    }
    #filter-panel.open {
        display: block;
    }
}

/* Masquer la barre de scroll des filtres */
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Rotation de l'icône FAQ */
.faq-icon {
    transition: transform 0.3s ease;
}
.faq-icon.rotate-45 {
    transform: rotate(45deg);
}

/* Retirer la flèche par défaut des <details> */
details > summary {
    list-style: none;
}
details > summary::-webkit-details-marker {
    display: none;
}