/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #4a6051;
    --dark-green: #3d4f42;
    --light-green: #a8c5a0;
    --pale-green: #e8f3e6;
    --accent-yellow: #d9a566;
    --accent-orange: #d9824d;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --medium-gray: #d0d0d0;
    --text-dark: #2c2c2c;
    --text-light: #666666;
    
    --spacing-xs: 0.4rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 20px;
    --radius-xxl: 30px;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}


/* ===== SCOPE POUR BIODIVOTEST2 ===== */
.page-template-biodivotest2 {

    /* ===== RESET WORDPRESS STYLES ===== */
    /* Force la police système sur tous les éléments */
    * {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    }
    #page,
    .site,
    .site-content-contain,
    body {
        background-color: var(--primary-green) !important;
    }
    /* Reset des boutons WordPress */
    button,
    input[type="button"],
    input[type="submit"],
    .btn,
    .button {
        all: unset;
        box-sizing: border-box;
        cursor: pointer;
        display: inline-block;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    }
    
    /* Reset des inputs WordPress (SAUF checkboxes et radio) */
    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        all: unset;
        box-sizing: border-box;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    }
    
    /* Garder les checkboxes visibles */
    input[type="checkbox"],
    input[type="radio"] {
        appearance: auto;
        -webkit-appearance: auto;
        -moz-appearance: auto;
    }
    
    /* Restaurer les transitions sur tous les éléments */
    *,
    *::before,
    *::after {
        transition-property: all;
        transition-duration: 0.2s;
        transition-timing-function: ease;
    }
    
    /* Reset des liens WordPress */
    a {
        color: inherit;
        text-decoration: none;
    }

    body {
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
        color: var(--text-dark);
        background-color: var(--primary-green);
        line-height: 1.5;
        overflow-x: hidden;
        font-weight: 400;
    }

    .container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 0 var(--spacing-lg);
    }

    .container-main {
        max-width: 1600px;
        margin: 0 auto;
        padding: 0 var(--spacing-lg);
    }

/* ===== HEADER ===== */
    .main-header {
        background-color: var(--primary-green);
        padding: var(--spacing-md) 0;
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: var(--shadow-sm);
    }

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: var(--spacing-lg);
    }

    .logo {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        color: var(--white);
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .logo-text h1 {
        font-size: 1.4rem;
        font-weight: 600;
        margin: 0;
        line-height: 1.2;
    }

    .tagline {
        font-size: 0.7rem;
        opacity: 0.9;
        margin: 0;
        font-weight: 400;
    }

    .main-nav ul {
        display: flex;
        list-style: none;
        gap: var(--spacing-md);
        align-items: center;
    }

    .main-nav a {
        color: var(--white);
        text-decoration: none;
        padding: 0.5rem var(--spacing-sm);
        border-radius: var(--radius-sm);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 0.95rem;
        font-weight: 400;
    }

    .main-nav a:hover,
    .main-nav a.active {
        background-color: rgba(255, 255, 255, 0.1);
        transform: scale(1.05) !important;
    }

    .main-nav a:active {
        transform: scale(0.98) !important;
    }

    .btn-adhesion {
        background-color: var(--accent-yellow) !important;
        color: var(--text-dark) !important;
        padding: 0.5rem var(--spacing-md) !important;
        border-radius: var(--radius-md);
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .btn-adhesion:hover {
        background-color: #c99555 !important;
        transform: scale(1.08) translateY(-2px);
        box-shadow: 0 6px 16px rgba(217, 165, 102, 0.4);
    }

    .btn-adhesion:active {
        transform: scale(1.02) translateY(0);
    }

    .user-actions {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
    }

    .btn-user {
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 0.4rem;
        display: flex;
        align-items: center;
        transition: opacity 0.2s;
    }

    .btn-user:hover {
        opacity: 0.8;
    }

    .mobile-menu-toggle {
        display: none;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.4rem;
    }

    .mobile-menu-toggle span {
        width: 24px;
        height: 2px;
        background-color: var(--white);
        border-radius: 2px;
        transition: 0.3s;
    }

/* ===== BANNER ===== */
    .support-banner {
        background: linear-gradient(135deg, var(--pale-green) 0%, #d4e8cf 100%);
        padding: var(--spacing-xl) var(--spacing-md);
        margin: var(--spacing-lg) 0;
    }

    .banner-content {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--spacing-md);
        text-align: center;
    }

    .banner-text {
        max-width: 900px;
        margin: 0 auto;
    }

    .banner-intro {
        margin: 0 0 var(--spacing-md) 0;
        line-height: 1.7;
    }

    .banner-intro strong {
        color: var(--primary-green);
        font-size: 1rem;
        font-weight: 600;
        line-height: 1.7;
    }

    .banner-closing {
        margin: var(--spacing-md) 0 0 0;
    }

    .banner-closing strong {
        color: var(--primary-green);
        font-size: 1rem;
        font-weight: 600;
    }

    .banner-signature {
        font-style: italic;
        color: var(--text-light);
        font-size: 0.95rem;
    }

    .banner-icon {
        font-size: 1.5rem;
    }

    /* Responsive pour le banner */
    @media (max-width: 768px) {
        .support-banner {
            padding: var(--spacing-lg) var(--spacing-md);
        }

        .banner-text {
            max-width: 100%;
        }

        .banner-intro strong {
            font-size: 0.9rem;
            line-height: 1.6;
        }

        .banner-closing strong {
            font-size: 0.9rem;
        }

        .banner-signature {
            font-size: 0.85rem;
        }
    }

    @media (max-width: 480px) {
        .support-banner {
            padding: var(--spacing-md);
        }

        .banner-intro strong {
            font-size: 0.85rem;
            line-height: 1.5;
        }

        .banner-closing strong {
            font-size: 0.85rem;
        }

        .banner-signature {
            font-size: 0.8rem;
        }
    }

/* ===== MAIN CONTENT ===== */
    .main-content {
        background-color: var(--primary-green);
        min-height: 100vh;
        padding-bottom: var(--spacing-xl);
    }

/* ===== SEARCH SECTION ===== */
    .search-section {
        margin-bottom: var(--spacing-lg);
    }

    .search-bar {
        max-width: 700px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        background-color: var(--white);
        border-radius: var(--radius-xxl);
        padding: 0.6rem 1.5rem;
        gap: var(--spacing-sm);
        box-shadow: var(--shadow-sm);
        justify-content: space-between;
    }

    .search-icon {
        color: var(--text-light);
        flex-shrink: 0;
    }

    .search-input {
        flex: 1;
        border: none;
        outline: none;
        font-size: 0.95rem;
        color: var(--text-dark);
        font-weight: 400;
        padding: 0.3rem 0rem;
        margin: 0;
        width: 100% !important;
    }

    .search-input::placeholder {
        color: var(--text-light);
    }

    .search-input:focus {
        outline: none;
    }

    .btn-search {
        background-color: var(--light-green);
        color: var(--dark-green);
        border: 2px solid transparent;
        padding: 0.5rem var(--spacing-md);
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 500;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
    }

    .btn-search:hover {
        background-color: #98b891 !important;
        color: var(--white) !important;
        transform: scale(1.05) rotate(-1deg) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    }

    .btn-search:active {
        transform: scale(0.98) !important;
    }

/* ===== CONTROLS SECTION ===== */
    .controls-section {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-lg);
        gap: var(--spacing-md);
    }

    .controls-section::before {
      content: "";
      flex: 1;  
    }

    .category-filters {
        display: flex;
        gap: var(--spacing-sm);
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        flex: 1;
    }

    .dropdown-filter {
        position: relative;
    }

    .filter-toggle {
        background-color: var(--white);
        border: 2px solid transparent;
        padding: 0.5rem var(--spacing-md);
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .filter-toggle:hover {
        background-color: var(--pale-green);
        color: var(--primary-green);
        transform: scale(1.05) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .filter-toggle:active {
        transform: scale(0.98) !important;
    }

    .filter-toggle.active {
        background-color: var(--light-green);
        border-color: var(--dark-green);
        font-weight: 500;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 0.5rem;
        background-color: var(--white);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        min-width: 200px;
        z-index: 100;
        display: none;
        max-height: 300px;
        overflow-y: auto;
    }

    .dropdown-menu.active {
        display: block;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        padding: 0.7rem var(--spacing-md);
        cursor: pointer;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        font-size: 0.9rem;
        font-weight: 400;
    }

    .dropdown-item:hover {
        background-color: var(--pale-green) !important;
        color: var(--text-dark) !important;
        transform: translateX(4px) !important;
    }

    .dropdown-item:active {
        transform: translateX(2px) !important;
    }

    .dropdown-item:first-child {
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

    .dropdown-item:last-child {
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .dropdown-item input[type="checkbox"] {
        cursor: pointer;
    }

    .category-tags {
        display: flex;
        gap: var(--spacing-xs);
        flex-wrap: wrap;
    }

    .tag {
        background-color: var(--white);
        border: 2px solid transparent;
        padding: 0.5rem var(--spacing-md);
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        white-space: nowrap;
    }

    .tag:hover {
        background-color: var(--pale-green);
        transform: scale(1.08) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .tag:active {
        transform: scale(1.02) !important;
    }

    .tag-active {
        background-color: var(--light-green);
        border-color: var(--dark-green);
        font-weight: 500;
    }

    .view-controls {
        display: flex;
        gap: var(--spacing-sm);
        align-items: center;
        flex: 1;
        justify-content: flex-end;
    }

    .btn-control {
        background-color: var(--white);
        border: 2px solid transparent;
        padding: 0.5rem var(--spacing-md);
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 0.4rem;
        white-space: nowrap;
    }

    .btn-control:hover {
        background-color: var(--pale-green) !important;
        color: var(--primary-green) !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .btn-control:active {
        transform: scale(0.98) !important;
    }

    .btn-reset-all-filters {
        background-color: var(--white);
        border: 2px solid transparent;
        padding: 0.5rem var(--spacing-md);
        border-radius: var(--radius-xl);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        align-items: center;
        gap: 0.5rem;
        white-space: nowrap;
        color: var(--text-dark);
    }

    .btn-reset-all-filters:hover {
        background-color: var(--pale-green) !important;
        color: var(--primary-green) !important;
        transform: scale(1.05) !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    }

    .btn-reset-all-filters:active {
        transform: scale(0.98) !important;
    }

    .btn-reset-all-filters svg {
        flex-shrink: 0;
    }

    .items-per-row-control {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--white);
    }

    .select-items {
        padding: 0.4rem 0.6rem;
        border-radius: var(--radius-sm);
        border: none;
        background-color: var(--white);
        color: black;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
    }

/* ===== CONTENT WRAPPER ===== */
    .content-wrapper {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        align-items: start;
    }

    .content-wrapper.with-sidebar {
        grid-template-columns: 260px 1fr;
    }

/* ===== SIDEBAR FILTERS ===== */
    .sidebar-filters {
        background-color: var(--dark-green);
        padding: var(--spacing-md);
        border-radius: var(--radius-lg);
        color: var(--white);
        position: sticky;
        top: 90px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        display: none;
    }

    .sidebar-filters.active {
        display: block;
    }

    .filters-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-sm);
        border-bottom: 2px solid var(--pale-green);
    }

    .filters-title {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--white);
        margin: 0;
    }

    .btn-reset-filters {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0.4rem;
        color: var(--white);
        display: flex;
        align-items: center;
        transition: all 0.2s;
    }

    .btn-reset-filters:hover {
        color: var(--light-green) !important;
        transform: rotate(90deg) !important;
    }

    .btn-reset-filters svg {
        stroke: var(--white);
    }

    .filter-group {
        margin-bottom: var(--spacing-md);
    }

    .filter-header {
        width: 100%;
        background: none;
        border: none;
        color: var(--white);
        padding: 0.6rem;
        text-align: left;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-radius: var(--radius-sm);
        transition: background-color 0.2s;
        font-size: 0.9rem;  
    }

    .filter-header:hover {
        background-color: rgba(255, 255, 255, 0.08);
    }

    .filter-header h4 {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--white);
        margin: 0;
    }

    .filter-header .chevron {
        transition: transform 0.3s;
        flex-shrink: 0;
    }

    .filter-header.active .chevron {
        transform: rotate(180deg);
    }

    .filter-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding-left: 0.4rem;
    }

    .filter-content.active {
        max-height: 300px;
        padding-top: 0.4rem;
        overflow-y: auto;
    }

    .filter-search-box {
        position: relative;
        margin-bottom: 0.6rem;
        padding-right: 0.4rem;
    }

    .filter-search-input {
        width: 100%;
        padding: 0.5rem 2rem 0.5rem 0.6rem;
        border: 1px solid rgba(255, 255, 255, 0.3);
        border-radius: var(--radius-sm);
        background-color: rgba(255, 255, 255, 0.1);
        color: var(--white);
        font-size: 0.85rem;
        outline: none;
        transition: all 0.2s;
    }

    .filter-search-input::placeholder {
        color: rgba(255, 255, 255, 0.5);
    }

    .filter-search-input:focus {
        border-color: var(--light-green);
        background-color: rgba(255, 255, 255, 0.15);
    }

    .filter-search-icon {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: rgba(255, 255, 255, 0.5);
        pointer-events: none;
    }

    .editeur-list {
        max-height: 200px;
        overflow-y: auto;
    }

    .editeur-item {
        display: flex !important;
        transition: opacity 0.2s;
    }

    .editeur-item.hidden {
        display: none !important;
    }

    .checkbox-label {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.6rem;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 300;
        color: var(--white);
        transition: color 0.2s;
    }

    .checkbox-label:hover {
        color: var(--light-green);
    }

    .checkbox-label input[type="checkbox"] {
        cursor: pointer;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .checkbox-label span {
        flex: 1;
    }

    /* Count inline sur les filtres — hérite du style du texte parent */
    .filter-count {
        font-size: inherit;
        font-weight: inherit;
        color: inherit;
        background: none;
        margin-left: 0;
    }

/* ===== CASCADING CHECKBOXES ===== */
    .cascading-checkbox {
        margin-bottom: 0.5rem;
    }

    .parent-checkbox {
        font-weight: 300;
        position: relative;
    }

    .parent-checkbox .chevron {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.3s;
        cursor: pointer;
    }

    .parent-checkbox.expanded .chevron {
        transform: rotate(180deg);
    }

    .children-container {
        display: none;
        padding-left: var(--spacing-lg);
        margin-top: 0.3rem;
        border-left: 2px solid var(--pale-green);
        margin-left: 0.5rem;
    }

    .children-container.active {
        display: block;
    }

    .child-checkbox {
        font-weight: 300;
        font-size: 0.85rem;
        position: relative;
    }

    .child-checkbox .chevron {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.3s;
        cursor: pointer;
    }

    .child-checkbox.expanded .chevron {
        transform: rotate(180deg);
    }

    .grandchild-checkbox {
        font-weight: 300;
        font-size: 0.8rem;
        padding-left: var(--spacing-sm);
    }

    .grandchild-checkbox .chevron {
        margin-left: auto;
        flex-shrink: 0;
        transition: transform 0.3s;
        cursor: pointer;
    }

    .grandchild-checkbox.expanded .chevron {
        transform: rotate(180deg);
    }

    .greatgrandchild-checkbox {
        font-weight: 300;
        font-size: 0.75rem;
        padding-left: calc(var(--spacing-sm) * 1.5);
    }

    .greatgrandchild-checkbox input[type="checkbox"] {
        cursor: pointer;
        width: 14px;
        height: 14px;
        flex-shrink: 0;
        /* Force la visibilité native des checkboxes */
        appearance: auto !important;
        -webkit-appearance: auto !important;
        -moz-appearance: auto !important;
    }

/* ===== RANGE INPUTS ===== */
    .range-inputs {
        display: flex;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-sm);
    }

    .range-input-group {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .range-input-group label {
        font-size: 0.75rem;
        font-weight: 300;
        color: var(--white);
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .range-input-group input {
        padding: 0.5rem !important;
        border: 1px solid #ddd !important;
        border-radius: var(--radius-sm) !important;
        font-size: 0.9rem !important;
        font-weight: 300 !important;
        outline: none !important;
        transition: border-color 0.2s !important;
        background-color: var(--white) !important;
        color: black !important;
        display: block !important;
    }

    .range-input-group input:focus {
        border-color: var(--light-green);
    }

    .range-input-group input::placeholder {
        color: var(--text-light);
    }

    .btn-apply-filters {
        width: 100%;
        background-color: var(--accent-yellow);
        border: none;
        color: var(--text-dark);
        padding: 0.7rem;
        border-radius: var(--radius-md);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 600;
        transition: background-color 0.2s;
        margin-top: var(--spacing-md);
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .btn-apply-filters:hover {
        background-color: #c99555;
    }

/* ===== BOOKS SECTION ===== */
    .books-section {

    }

    .results-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: var(--spacing-lg);
    }

    .section-title {
        color: var(--white);
        font-size: 1.3rem;
        margin: 0;
        font-weight: 600;
    }

    .sort-controls {
        display: flex;
        gap: var(--spacing-sm);
    }

    .sort-dropdown {
        position: relative;
    }

    .btn-sort-icon {
        background: none;
        border: none;
        color: var(--white);
        cursor: pointer;
        padding: 0.4rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: opacity 0.2s;
        border-radius: var(--radius-sm);
    }

    .btn-sort-icon:hover {
        opacity: 0.8 !important;
        background-color: rgba(255, 255, 255, 0.1) !important;
    }

    .sort-menu {
        position: absolute;
        top: 100%;
        right: 0;
        margin-top: 0.5rem;
        background-color: var(--white);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
        min-width: 180px;
        z-index: 100;
        display: none;
        overflow: hidden;
    }

    .sort-menu.active {
        display: block;
    }

    .sort-menu button {
        width: 100%;
        background: none;
        border: none;
        padding: 0.7rem var(--spacing-md);
        text-align: left;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--text-dark);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sort-menu button:hover {
        background-color: var(--pale-green) !important;
        color: var(--text-dark) !important;
        transform: translateX(4px) !important;
    }

    .sort-menu button:active {
        transform: translateX(2px) !important;
    }

/* ===== BOOKS GRID - COLONNES DYNAMIQUES ===== */
.books-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* Valeur par défaut */
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Gestion dynamique du nombre de colonnes via l'attribut data-columns */
.books-grid[data-columns="2"] {
    grid-template-columns: repeat(2, 1fr);
}

.books-grid[data-columns="3"] {
    grid-template-columns: repeat(3, 1fr);
}

.books-grid[data-columns="4"] {
    grid-template-columns: repeat(4, 1fr);
}

.books-grid[data-columns="5"] {
    grid-template-columns: repeat(5, 1fr);
}

.books-grid[data-columns="6"] {
    grid-template-columns: repeat(6, 1fr);
}

/* ===== RESPONSIVE POUR LES COLONNES DYNAMIQUES ===== */
@media (max-width: 1400px) {
    .books-grid[data-columns="6"] {
        grid-template-columns: repeat(5, 1fr) !important;
    }
}

@media (max-width: 1200px) {
    .books-grid[data-columns="5"],
    .books-grid[data-columns="6"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .books-grid[data-columns="3"] {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .books-grid[data-columns="4"] {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .books-grid[data-columns="1"] {
        grid-template-columns: 1fr !important;
    }
    
    .books-grid[data-columns="3"],
    .books-grid[data-columns="4"],
    .books-grid[data-columns="5"],
    .books-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .books-grid[data-columns="1"] {
        grid-template-columns: 1fr !important;
    }
    
    .books-grid[data-columns="3"],
    .books-grid[data-columns="4"],
    .books-grid[data-columns="5"],
    .books-grid[data-columns="6"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}
    .book-card {
        background-color: var(--white);
        border-radius: var(--radius-md);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                    box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease;
        cursor: pointer;
    }

    /* Animation d'apparition initiale - sera retirée après l'animation */
    .book-card.fade-in {
        animation: fadeInUp 0.4s ease-out forwards;
    }

    .book-card:hover {
        transform: translateY(-8px) scale(1.02);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
    }

    .book-card:active {
        transform: translateY(-4px) scale(1.01);
    }

    /* Délai d'animation pour les cartes chargées dynamiquement */
    .book-card.fade-in:nth-child(1) { animation-delay: 0s; }
    .book-card.fade-in:nth-child(2) { animation-delay: 0.05s; }
    .book-card.fade-in:nth-child(3) { animation-delay: 0.1s; }
    .book-card.fade-in:nth-child(4) { animation-delay: 0.15s; }
    .book-card.fade-in:nth-child(5) { animation-delay: 0.2s; }
    .book-card.fade-in:nth-child(n+6) { animation-delay: 0.25s; }

    .book-image {
        position: relative;
        background-color: var(--light-gray);
        aspect-ratio: 5/7;
        overflow: hidden;
    }

    .book-cover {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .book-badge {
        position: absolute;
        top: var(--spacing-sm);
        left: var(--spacing-sm);
        padding: 0.3rem 0.6rem;
        border-radius: var(--radius-sm);
        font-size: 0.75rem;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* Conteneur pour gérer plusieurs badges emoji */
    .badges-container {
        position: absolute;
        top: var(--spacing-sm);
        left: var(--spacing-sm);
        display: flex;
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    /* Quand le badge est dans un conteneur, retirer le positionnement absolu */
    .badges-container .book-badge {
        position: static;
    }

    .badge-nouveaute {
        background-color: var(--accent-yellow);
        color: var(--white);
    }

    .badge-coeur {
        background-color: rgba(255, 255, 255, 0.95);
        padding: 0.4rem 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 1.3rem;
        border: 2px solid var(--primary-green);
        line-height: 1;
    }

    .badge-etoile {
        background-color: rgba(255, 255, 255, 0.95);
        padding: 0.4rem 0.5rem;
        border-radius: var(--radius-sm);
        font-size: 1.3rem;
        border: 2px solid var(--primary-green);
        line-height: 1;
    }

    .book-price {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        background-color: rgba(255, 255, 255, 0.95);
        padding: 0.3rem 0.6rem;
        border-radius: var(--radius-sm);
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--primary-green);
        border: 2px solid;
    }

    .book-info {
        padding: var(--spacing-md);
    }

    .book-title {
        font-size: 0.95rem;
        font-weight: 500;
        color: var(--text-dark);
        margin: 0 0 0.4rem 0;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .book-author {
        font-size: 0.85rem;
        font-weight: 400;
        color: var(--text-light);
        margin: 0;
    }

/* ===== PAGINATION ===== */
    .pagination-bottom {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
    }

    .page-btn {
        background-color: var(--white);
        border: 1px solid #ddd;
        min-width: 36px;
        height: 36px;
        border-radius: var(--radius-sm);
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 400;
        color: var(--text-dark);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .page-btn:hover:not(:disabled) {
        background-color: var(--pale-green) !important;
        border-color: var(--light-green) !important;
        color: var(--text-dark) !important;
        transform: scale(1.1) !important;
    }

    .page-btn:active:not(:disabled) {
        transform: scale(1.05) !important;
    }

    .page-btn.active {
        background-color: var(--primary-green);
        color: var(--white);
        border-color: var(--primary-green);
        font-weight: 500;
    }

    .page-btn:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    .page-dots {
        color: var(--text-light);
        font-size: 0.9rem;
        font-weight: 400;
        padding: 0 0.3rem;
    }

/* ===== SCROLL TO TOP ===== */
    .scroll-to-top {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 50px;
        height: 50px;
        background-color: var(--primary-green);
        color: var(--white);
        border: none;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-md);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

    .scroll-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .scroll-to-top:hover {
        transform: translateY(-6px) scale(1.1) !important;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25) !important;
    }

    .scroll-to-top:active {
        transform: translateY(-3px) scale(1.05) !important;
    }

/* ===== MODAL ===== */
    .modal {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 2000;
        display: none;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-md);
    }

    .modal.active {
        display: flex;
    }

    .modal-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
    }

    .modal-content {
        position: relative;
        background-color: var(--white);
        border-radius: var(--radius-lg);
        max-width: 900px;
        width: 100%;
        max-height: 90vh;
        overflow: hidden;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        animation: modalSlideIn 0.3s ease;
    }

    @keyframes modalSlideIn {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modal-close {
        position: absolute;
        top: var(--spacing-md);
        right: var(--spacing-md);
        background-color: var(--white);
        border: none;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        box-shadow: var(--shadow-md);
        transition: transform 0.2s;
    }

    .modal-close:hover {
        transform: scale(1.1) !important;
        background-color: var(--pale-green);
        color: var(--primary-green);
    }

    .modal-body {
        display: grid;
        grid-template-columns: 280px 1fr;
        max-height: 90vh;
        overflow: hidden;
        overflow-y: auto;
    }

    .modal-image {
        background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
        padding: var(--spacing-lg);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        position: relative;
    }

    .modal-image img {
        width: 100%;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-md);
    }

    .modal-badge-container {
        display: flex;
        gap: 0.5rem;
        flex-wrap: wrap;
        margin-bottom: var(--spacing-md);
        padding-bottom: var(--spacing-md);
        border-bottom: 1px solid var(--medium-gray);
    }
    
    /* Cacher le séparateur si le conteneur est vide */
    .modal-badge-container:empty {
        display: none;
    }
    
    /* Badges dans la modal-info */
    .modal-info .modal-badge-container {
        position: static;
    }
    
    /* Badges dans modal avec texte complet */
    .modal-info .badge-coeur,
    .modal-info .badge-etoile {
        position: static;
        font-size: 0.9rem;
        padding: 0.5rem 0.8rem;
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }
    
    /* S'assurer que les badges dans le conteneur modal ne sont pas positionnés de manière absolue */
    .modal-badge-container .book-badge {
        position: static;
    }

    .modal-info {
        padding: var(--spacing-xl);
        overflow-y: visible;
        max-height: none;
    }

    .modal-info::-webkit-scrollbar {
        width: 8px;
    }

    .modal-info::-webkit-scrollbar-track {
        background: var(--light-gray);
    }

    .modal-info::-webkit-scrollbar-thumb {
        background: var(--light-green);
        border-radius: 4px;
    }

    .modal-info h2 {
        font-size: 1.8rem;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: var(--spacing-lg);
        line-height: 1.3;
    }

    .modal-meta {
        background-color: var(--light-gray);
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        margin-bottom: var(--spacing-lg);
    }

    .meta-group {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        margin-bottom: var(--spacing-sm);
    }

    .meta-group strong {
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-light);
        letter-spacing: 0.5px;
    }

    .meta-group span {
        font-size: 1rem;
        font-weight: 400;
        color: var(--text-dark);
    }

    .meta-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-md);
    }

    .modal-separator {
        height: 1px;
        background-color: var(--medium-gray);
        margin: var(--spacing-md) 0;
    }

    .modal-price-group {
        margin-top: var(--spacing-md);
        padding-top: var(--spacing-md);
        border-top: 2px solid var(--medium-gray);
    }

    .modal-price {
        font-size: 1.5rem;
        font-weight: 400;
        color: var(--primary-green);
    }

    .btn-download-pdf-modal {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.6rem;
        margin-top: var(--spacing-md);
        padding: 0.75rem 1.5rem;
        background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
        color: var(--white);
        text-decoration: none;
        border-radius: var(--radius-md);
        font-size: 0.95rem;
        font-weight: 600;
        transition: all 0.3s ease;
        box-shadow: 0 3px 10px rgba(76, 175, 80, 0.3);
        width: 100%;
        text-align: center;
    }

    .btn-download-pdf-modal:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 5px 15px rgba(76, 175, 80, 0.4) !important;
        background: linear-gradient(135deg, var(--dark-green), var(--primary-green)) !important;
        color: var(--white) !important;
    }

    .btn-download-pdf-modal svg {
        flex-shrink: 0;
    }

    .modal-section {
        margin-bottom: var(--spacing-lg);
    }

    .modal-section h3 {
        font-size: 1.2rem;
        font-weight: 600;
        color: var(--primary-green);
        margin-bottom: var(--spacing-sm);
    }

    .modal-section p {
        color: var(--text-dark);
        font-weight: 400;
        line-height: 1.6;
        margin-bottom: 0.5rem;
    }

    #modalTableOfContents p {
        padding-left: var(--spacing-md);
        position: relative;
        margin: 4px 0;
        line-height: 1.6;
    }

    #modalTableOfContents p:first-child {
    margin-top: 0;
    }

    #modalTableOfContents p::before {
        content: '•';
        position: absolute;
        left: 0;
        color: var(--light-green);
        font-weight: bold;
    }

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Landscape */
    @media (max-width: 1200px) {
        .books-grid {
            grid-template-columns: repeat(3, 1fr) !important;
        }
    
        .content-wrapper.with-sidebar {
            grid-template-columns: 240px 1fr;
        }
    }

/* Tablet Portrait */
    @media (max-width: 1024px) and (min-width: 769px) {
        .content-wrapper {
            grid-template-columns: 1fr !important;
        }
    
        .content-wrapper.with-sidebar {
            grid-template-columns: 1fr !important;
        }
    
        .books-grid {
            grid-template-columns: repeat(2, 1fr) !important;
            gap: var(--spacing-md);
        }
    
        .sidebar-filters {
            position: static;
            max-height: none;
            margin-bottom: var(--spacing-lg);
            width: 100%;
        }
    
        .controls-section {
            flex-direction: column;
            align-items: stretch;
        }
    
        .category-filters {
            flex-direction: row;
            width: 100%;
            gap: var(--spacing-sm);
            justify-content: center;
        }
        
        .filter-toggle {
            flex: 0 1 auto;
            min-width: 150px;
            max-width: 200px;
        }
        
        .btn-control {
            flex: 0 1 auto;
            min-width: 150px;
            max-width: 200px;
        }
    
        .view-controls {
            width: 100%;
            justify-content: space-between;
        }
    }

/* Mobile */
    @media (max-width: 768px) {
        .main-nav {
            display: none;
            width: 100%;
            order: 3;
        }
    
        .main-nav.active {
            display: block;
        }
    
        .main-nav ul {
            flex-direction: column;
            gap: 0.5rem;
        }
    
        .main-nav a {
            display: block;
            width: 100%;
        }
    
        .mobile-menu-toggle {
            display: flex;
        }
    
        .header-content {
            flex-wrap: wrap;
        }
    
        .banner-content {
            flex-direction: column;
            gap: var(--spacing-sm);
        }
    
        .banner-icon:last-child {
            display: none;
        }
    
        .search-bar {
            padding: 0.5rem var(--spacing-sm);
        }
    
        .btn-search {
            padding: 0.4rem var(--spacing-sm);
            font-size: 0.85rem;
        }
    
        .controls-section {
            flex-direction: column;
            align-items: stretch;
            gap: var(--spacing-sm);
        }
    
        .category-filters {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            width: 100%;
            gap: var(--spacing-sm);
        }
        
        .filter-toggle {
            flex: 0 1 calc(50% - var(--spacing-sm) / 2);
            min-width: 140px;
        }
        
        .btn-control {
            flex: 0 1 auto;
            min-width: 140px;
            max-width: 200px;
            padding: 0.6rem var(--spacing-sm);
        }
    
        .view-controls {
            width: 100%;
            justify-content: space-between;
            flex-wrap: wrap;
        }
    
        .items-per-row-control {
            display: flex;
            flex-shrink: 0;
        }
        
        .items-per-row-control label {
            font-size: 0.85rem;
            white-space: nowrap;
        }
        
        .select-items {
            min-width: 50px;
        }
    
        .btn-reset-all-filters span {
            display: none;
        }
    
        /* Sur mobile : sidebar en colonne au-dessus des livres */
        .content-wrapper.with-sidebar {
            grid-template-columns: 1fr;
        }

        .sidebar-filters {
            position: static;
            max-height: none;
            overflow-y: visible;
            margin: 0 auto;
            width: 100%;
            max-width: 500px;
        }

        .results-header {
            flex-wrap: wrap;
            gap: var(--spacing-sm);
        }
    
        .books-grid {
            gap: var(--spacing-sm);
        }
        
        .books-grid[data-columns="2"] {
            grid-template-columns: repeat(2, 1fr) !important;
        }
    
        .book-title {
            font-size: 0.88rem;
        }
    
        .book-author {
            font-size: 0.8rem;
        }
    
        .pagination-bottom {
            flex-wrap: wrap;
        }
    
        .scroll-to-top {
            bottom: 20px;
            right: 20px;
            width: 45px;
            height: 45px;
        }
    
        .modal-body {
            grid-template-columns: 1fr;
            max-height: 90vh;
            overflow-y: auto;
        }
    
        .modal-image {
            padding: var(--spacing-md);
            max-height: none;
        }
    
        .modal-image img {
            width: 100%;
            max-width: 100%;
        }
    
        .modal-info {
            padding: var(--spacing-md);
            max-height: none;
            overflow-y: visible;
        }
    
        .modal-info h2 {
            font-size: 1.4rem;
        }
    
        .meta-row {
            grid-template-columns: 1fr;
        }
    }

/* Small Mobile */
    @media (max-width: 480px) {
        .container,
        .container-main {
            padding: 0 var(--spacing-sm);
        }
    
        .logo-text h1 {
            font-size: 1.2rem;
        }
    
        .tagline {
            font-size: 0.65rem;
        }
    
        .section-title {
            font-size: 1.2rem;
        }
    
        .books-grid {
            gap: var(--spacing-xs);
        }
    
        .sidebar-filters {
            padding: var(--spacing-sm);
        }
    
        .btn-control {
            font-size: 0.8rem;
        }
    }

/* Hide scrollbar for sidebar but keep functionality */
    .sidebar-filters::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-filters::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.05);
    }

    .sidebar-filters::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 3px;
    }

/* Accessibility */
    @media (prefers-reduced-motion: reduce) {
        * {
            animation-duration: 0.01ms !important;
            transition-duration: 0.01ms !important;
        }
    }

    a:focus,
    button:focus,
    input:focus,
    select:focus {
        outline: none;
    }
}


/* ===== DESKTOP ONLY : ESPACEMENT DES BOOK CARDS ===== */
@media (min-width: 769px) {
    .page-template-biodivotest2 .books-section {
        padding: 0 4rem;
    }

    .books-grid {
        gap: 2.5rem !important;
    }
}

/* LOADER LAZY LOADING */
/* ===== LOADER DE CHARGEMENT ===== */
.books-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    gap: 1rem;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.books-loader p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

/* ===== BOUTON "CHARGER PLUS" ===== */
.btn-load-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    margin: 2rem auto;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-load-more:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4) !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    color: var(--white) !important;
}

.btn-load-more:active {
    transform: translateY(0) !important;
}

.btn-load-more svg {
    transition: transform 0.3s ease;
}

.btn-load-more:hover svg {
    transform: translateY(3px) !important;
}

.load-more-count {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}

/* ===== LOADER MINIMAL (pendant le chargement initial) ===== */
.page-template-biodivotest2 .books-loader-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
}

.page-template-biodivotest2 .books-loader-minimal .loader-spinner {
    width: 40px;
    height: 40px;
}

/* ===== MESSAGE AUCUN LIVRE TROUVÉ ===== */
.page-template-biodivotest2 .no-books-found {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
    gap: 1.5rem;
    grid-column: 1 / -1; /* Prend toute la largeur de la grille */
    min-height: 400px;
}

.page-template-biodivotest2 .no-books-icon {
    font-size: 5rem;
    opacity: 0.3;
    filter: grayscale(1);
}

.page-template-biodivotest2 .no-books-message {
    color: var(--white);
}

.page-template-biodivotest2 .no-books-message h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: var(--white);
}

.page-template-biodivotest2 .no-books-message p {
    font-size: 1rem;
    opacity: 0.8;
    margin: 0;
    color: var(--white);
}

.books-grid.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.books-grid.loading::after {
    content: '';
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ===== ANIMATION D'APPARITION DES LIVRES ===== */
/* Animation déplacée dans le scope principal .page-template-biodivotest2 */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Délai d'animation pour les cartes chargées dynamiquement */

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .btn-load-more {
        width: 100%;
        max-width: 300px;
    }
    
    .books-loader {
        padding: 2rem 1rem;
    }
}

/* ===== INDICATEUR DE SCROLL INFINI ===== */
.load-more-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    margin-top: 2rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.load-more-indicator:hover {
    opacity: 1;
}

.indicator-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
}

.indicator-icon {
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
}

.indicator-text {
    color: #34495e;
}

.indicator-count {
    font-weight: 700;
    color: #2980b9;
    background: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Animation de chargement subtile */
.load-more-indicator.loading .indicator-content {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.02);
        opacity: 1;
    }
}

/* Style responsive */
@media (max-width: 768px) {
    .indicator-content {
        padding: 0.75rem 1.5rem;
        font-size: 0.85rem;
    }
    
    .indicator-icon {
        font-size: 1.25rem;
    }
}

/* ===================================================
   EXIT INTENT SURVEY POPUP — dans le scope .page-template-biodivotest2
   =================================================== */

.page-template-biodivotest2 {

    .survey-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(4px);
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: var(--spacing-md);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                    visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .survey-overlay.survey-visible {
        opacity: 1;
        visibility: visible;
    }

    .survey-popup {
        background: var(--white);
        border-radius: var(--radius-lg);
        padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
        max-width: 420px;
        width: 100%;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        position: relative;
        transform: translateY(-24px);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        /* Petite bordure supérieure verte pour ancrer dans la charte */
        border-top: 4px solid var(--primary-green);
    }

    .survey-overlay.survey-visible .survey-popup {
        transform: translateY(0);
    }

    /* Bouton fermer — même style que .modal-close */
    .survey-close {
        position: absolute;
        top: var(--spacing-sm);
        right: var(--spacing-sm);
        background-color: var(--white);
        border: none;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: var(--shadow-sm);
        color: var(--text-light);
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .survey-close:hover {
        transform: scale(1.1) !important;
        background-color: var(--pale-green) !important;
        color: var(--primary-green) !important;
    }

    /* En-tête */
    .survey-icon {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: var(--spacing-xs);
        line-height: 1;
    }

    .survey-title {
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--primary-green);
        text-align: center;
        margin: 0 0 0.25rem;
        line-height: 1.3;
    }

    .survey-subtitle {
        font-size: 0.82rem;
        color: var(--text-light);
        text-align: center;
        margin: 0 0 var(--spacing-lg);
        line-height: 1.4;
    }

    /* Divider entre en-tête et questions */
    .survey-subtitle::after {
        content: '';
        display: block;
        width: 40px;
        height: 2px;
        background: var(--light-green);
        border-radius: 2px;
        margin: var(--spacing-sm) auto 0;
    }

    /* Questions */
    .survey-question {
        margin-bottom: var(--spacing-md);
    }

    .survey-label {
        display: block;
        font-size: 0.87rem;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: var(--spacing-xs);
        line-height: 1.4;
    }

    .survey-optional {
        font-weight: 400;
        color: var(--text-light);
        font-size: 0.8rem;
    }

    /* Boutons radio — style pill comme les tags de la page */
    .survey-radio-group {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
    }

    .survey-radio-label {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        font-size: 0.875rem;
        color: var(--text-dark);
        cursor: pointer;
        padding: 0.45rem var(--spacing-sm);
        border-radius: var(--radius-md);
        border: 1.5px solid transparent;
        transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .survey-radio-label:hover {
        background-color: var(--pale-green) !important;
        border-color: var(--light-green) !important;
        transform: translateX(3px) !important;
    }

    .survey-radio-label:has(input:checked) {
        background-color: var(--pale-green);
        border-color: var(--primary-green);
        font-weight: 500;
        color: var(--primary-green);
    }

    .survey-radio-label input[type="radio"] {
        accent-color: var(--primary-green);
        width: 15px;
        height: 15px;
        cursor: pointer;
        flex-shrink: 0;
    }

    /* Étoiles — couleur jaune de la charte */
    .survey-stars {
        display: flex;
        gap: 0.2rem;
    }

    .survey-star {
        background: none;
        border: none;
        font-size: 1.75rem;
        cursor: pointer;
        color: var(--medium-gray);
        padding: 0;
        line-height: 1;
        transition: color 0.15s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .survey-star:hover {
        transform: scale(1.2) !important;
    }

    .survey-star.active,
    .survey-star:hover {
        color: var(--accent-yellow);
    }

    /* Textarea — même traitement que les inputs de la page */
    .survey-textarea {
        display: block;
        width: 100%;
        border: 1.5px solid var(--medium-gray);
        border-radius: var(--radius-md);
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.875rem;
        color: var(--text-dark);
        background: var(--white);
        resize: vertical;
        min-height: 72px;
        font-family: inherit;
        transition: border-color 0.2s, box-shadow 0.2s;
        box-sizing: border-box;
        line-height: 1.5;
    }

    .survey-textarea:focus {
        outline: none;
        border-color: var(--primary-green);
        box-shadow: 0 0 0 3px rgba(74, 96, 81, 0.12);
    }

    .survey-textarea::placeholder {
        color: var(--text-light);
        opacity: 0.7;
    }

    /* Actions */
    .survey-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-xs);
        margin-top: var(--spacing-lg);
        border-top: 1px solid var(--light-gray);
        padding-top: var(--spacing-md);
    }

    /* Bouton principal — même style que .btn-adhesion */
    .survey-btn-primary {
        background-color: var(--primary-green);
        color: var(--white);
        border: none;
        border-radius: var(--radius-xl);
        padding: 0.65rem var(--spacing-lg);
        font-size: 0.9rem;
        font-weight: 500;
        cursor: pointer;
        width: 100%;
        text-align: center;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .survey-btn-primary:hover {
        background-color: var(--dark-green) !important;
        transform: scale(1.02) translateY(-1px) !important;
        box-shadow: 0 6px 16px rgba(74, 96, 81, 0.35) !important;
    }

    .survey-btn-primary:active {
        transform: scale(1.0) translateY(0) !important;
    }

    /* Lien "Non merci" discret */
    .survey-btn-skip {
        background: none;
        border: none;
        color: var(--text-light);
        font-size: 0.8rem;
        cursor: pointer;
        text-align: center;
        padding: 0.25rem;
        opacity: 0.75;
        transition: opacity 0.2s;
        font-family: inherit;
    }

    .survey-btn-skip:hover {
        opacity: 1 !important;
        color: var(--text-dark) !important;
        text-decoration: underline;
    }

    /* Étapes */
    .survey-step--hidden {
        display: none;
    }

    #surveyStep2 {
        text-align: center;
        padding: var(--spacing-md) 0;
    }

    #surveyStep2 .survey-btn-primary {
        max-width: 180px;
        margin: var(--spacing-md) auto 0;
    }

    @media (max-width: 480px) {
        .survey-popup {
            padding: var(--spacing-lg) var(--spacing-md) var(--spacing-md);
            border-top-width: 3px;
        }
    }
}
/* ══════════════════════════════════════════════════════════════════════════
   BOUTON ADMIN
   ══════════════════════════════════════════════════════════════════════════ */

.btn-admin-nav {
    display: flex !important;
    align-items: center !important;
    gap: 0.45rem !important;
    background: none !important;
    border: 2px solid #4a6051 !important;
    color: #4a6051 !important;
    padding: 0.45rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    white-space: nowrap !important;
    text-decoration: none !important;
}

.btn-admin-nav:hover {
    background-color: #4a6051 !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(74,96,81,0.25) !important;
    text-decoration: none !important;
}

@media (max-width: 768px) {
    .btn-admin-nav span { display: none !important; }
    .btn-admin-nav { padding: 0.45rem !important; border-radius: 50% !important; }
}