/**
 * Styles du Menu à Plat des Catégories pour Elementor
 */

.efcm-container {
    width: 100%;
    box-sizing: border-box;
}

.efcm-container ul.efcm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    box-sizing: border-box;
}

.efcm-item {
    margin: 0;
    padding: 0;
    list-style: none;
    box-sizing: border-box;
}

.efcm-item-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: all 0.25s ease-in-out;
    cursor: pointer;
}

.efcm-item-link:hover,
.efcm-item-link:focus {
    text-decoration: none;
}

.efcm-text-wrap {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    line-height: 1.2;
}

.efcm-title {
    font-weight: inherit;
    font-size: inherit;
}

.efcm-thumb {
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 50%;
}

.efcm-desc {
    display: block;
    width: 100%;
    font-size: 0.8em;
    opacity: 0.75;
    margin-top: 3px;
}

/* =========================================================================
   Badges du Compteur
   ========================================================================= */
.efcm-count {
    display: inline-block;
    font-size: 0.8em;
    line-height: 1;
}

.efcm-count-badge {
    background-color: rgba(0, 0, 0, 0.08);
    color: inherit;
    padding: 3px 7px;
    border-radius: 999px;
    font-weight: 600;
}

.efcm-item.is-active .efcm-count-badge {
    background-color: rgba(255, 255, 255, 0.25);
}

.efcm-count-brackets {
    opacity: 0.75;
}

/* =========================================================================
   Positions de l'image
   ========================================================================= */
.efcm-img-top .efcm-item-link {
    flex-direction: column;
    text-align: center;
}

.efcm-img-top .efcm-text-wrap {
    justify-content: center;
}

.efcm-img-right .efcm-item-link {
    flex-direction: row-reverse;
}

/* =========================================================================
   1. Preset : Pills (Pilules / Badges)
   ========================================================================= */
.efcm-layout-pills .efcm-list {
    flex-wrap: wrap;
    align-items: center;
}

/* =========================================================================
   2. Preset : Barre défilante horizontale (Horizontal Scroll)
   ========================================================================= */
.efcm-layout-horizontal_scroll .efcm-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    padding-bottom: 6px;
    cursor: grab;
}

.efcm-layout-horizontal_scroll .efcm-list:active {
    cursor: grabbing;
}

.efcm-layout-horizontal_scroll .efcm-item {
    flex-shrink: 0;
}

.efcm-hide-scrollbar .efcm-list {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.efcm-hide-scrollbar .efcm-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* =========================================================================
   3. Preset : Inline Links (Menu en ligne avec séparateurs)
   ========================================================================= */
.efcm-layout-inline_links .efcm-list {
    flex-wrap: wrap;
    align-items: center;
}

.efcm-layout-inline_links .efcm-item {
    display: inline-flex;
    align-items: center;
}

.efcm-layout-inline_links .efcm-item-link {
    background: transparent;
    padding: 4px 6px;
    border-radius: 0;
}

.efcm-separator {
    display: inline-block;
    user-select: none;
    font-size: 0.9em;
}

/* =========================================================================
   4. Preset : Groupe de boutons attachés (Segmented)
   ========================================================================= */
.efcm-layout-buttons_group .efcm-list {
    flex-wrap: wrap;
    align-items: stretch;
}

.efcm-layout-buttons_group .efcm-item .efcm-item-link {
    border-radius: 0;
}

.efcm-layout-buttons_group .efcm-item:first-child .efcm-item-link {
    border-top-left-radius: 6px;
    border-bottom-left-radius: 6px;
}

.efcm-layout-buttons_group .efcm-item:last-child .efcm-item-link {
    border-top-right-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* =========================================================================
   5. Presets : Grille et Cartes (Grid & Cards)
   ========================================================================= */
.efcm-grid-layout {
    display: grid !important;
    width: 100%;
}

.efcm-layout-grid .efcm-item-link,
.efcm-layout-cards .efcm-item-link {
    width: 100%;
    justify-content: center;
}

.efcm-layout-cards .efcm-item-link {
    flex-direction: column;
    text-align: center;
    padding: 16px;
    border-radius: 8px;
}

/* =========================================================================
   6. Preset : Liste verticale
   ========================================================================= */
.efcm-layout-vertical_list .efcm-list {
    flex-direction: column;
    width: 100%;
}

.efcm-layout-vertical_list .efcm-item {
    width: 100%;
}

.efcm-layout-vertical_list .efcm-item-link {
    width: 100%;
    justify-content: space-between;
}

/* Message si vide */
.efcm-no-categories {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9em;
    padding: 10px 0;
}
