/**
 * Styles communs pour le plugin Solution Pilotage
 * Version nettoyée et organisée
 */

/* =============================================
   IMPORTS & FONTS
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Text&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

@font-face {
    font-family: 'LEMONMILK';
    src: url('../fonts/LEMONMILK-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'LEMONMILKM';
    src: url('../fonts/LEMONMILK-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'LEMONMILKB';
    src: url('../fonts/LEMONMILK-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'LEMONMILKR';
    src: url('../fonts/LEMONMILK-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
    --sp-primary-color: #829B82;
    --sp-secondary-color: #576557;
    --sp-accent-color: #B4C47B;
    --sp-bg-color: #EBECE6;
    --sp-text-color: #333;
    --sp-white: #fff;
    --sp-border-radius: 8px;
}

/* =============================================
   RESET & BASE
   ============================================= */
.sp-bibliotheque-wrapper,
.sp-pilotage-wrapper {
    box-sizing: border-box;
    font-family: 'Quicksand', sans-serif;
    background-color: var(--sp-bg-color);
}

.sp-bibliotheque-wrapper *,
.sp-pilotage-wrapper * {
    box-sizing: inherit;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.ecriture {
    font-family: 'Quicksand', sans-serif !important;
}

.titre_spe {
    font-family: 'LEMONMILKB', sans-serif !important;
    color: var(--sp-secondary-color);
}

.titre_spe2 {
    font-family: 'LEMONMILKB', sans-serif !important;
    color: var(--sp-secondary-color);
    font-size: 1.1em;
}

/* =============================================
   HEADER SECTION
   ============================================= */
.bspc-section {
    background-color: var(--sp-accent-color);
    padding: 30px 0;
    width: 100%;
    position: relative;
    z-index: 100;
}

.container22 {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.logo {
    color: white;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    font-family: 'LEMONMILKB', sans-serif;
    margin: 0;
}

/* =============================================
   NAVIGATION MENU
   ============================================= */
.menu10 {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 10px;
}

.menu10 a {
    padding: 10px 16px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid white;
    transition: background 0.3s, color 0.3s;
    font-family: 'Quicksand', sans-serif;
}

.menu10 a:hover {
    color: var(--sp-secondary-color);
    background-color: white;
}

/* =============================================
   BUTTONS
   ============================================= */
.enregistrer_fec_dans_list {
    background-color: var(--sp-primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.enregistrer_fec_dans_list:hover {
    background-color: var(--sp-secondary-color);
}

/* =============================================
   INPUTS
   ============================================= */
.les_entres,
.les_entres2 {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    background: white;
}

.les_entres:focus,
.les_entres2:focus {
    outline: none;
    border-color: var(--sp-primary-color);
}

/* =============================================
   POPUP / MODAL
   ============================================= */
.popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.popup-container:target {
    display: flex;
}

.popup-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.fermeture_pop {
    position: absolute;
    top: 10px;
    right: 15px;
}

.fermeture_pop .close {
    text-decoration: none;
    font-size: 24px;
    color: #666;
}

.fermeture_pop .close:hover {
    color: #333;
}

/* =============================================
   TAGS / BADGES
   ============================================= */
.type_fec {
    background-color: var(--sp-primary-color);
    color: white;
    padding: 5px 10px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    font-family: 'Quicksand', sans-serif;
    display: inline-block;
}

.position_text {
    padding: 4px 8px;
    font-size: 9px;
    font-weight: bold;
    border-radius: 3px;
    margin-right: 5px;
    font-family: 'Quicksand', sans-serif;
    display: inline-block;
}

.ecologie {
    background-color: #4CAF50;
    color: white;
}

.seconde_vie {
    background-color: #2196F3;
    color: white;
}

.solidaire {
    background-color: #FF9800;
    color: white;
}

.zero_dechet {
    background-color: #9C27B0;
    color: white;
}

/* =============================================
   CHECKBOX STYLES
   ============================================= */
.contour_bouton {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contour_bouton input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.div_patch_tri {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.div_patch_tri:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.ecologie2 {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    color: var(--sp-text-color);
}

/* =============================================
   LOADING & MESSAGES
   ============================================= */
.loading {
    text-align: center;
    padding: 40px;
    font-family: 'Quicksand', sans-serif;
    color: #666;
}

.no-results {
    text-align: center;
    padding: 40px;
    font-family: 'Quicksand', sans-serif;
    color: #666;
    font-size: 16px;
}

/* =============================================
   NOT LOGGED IN MESSAGE
   ============================================= */
.sp-not-logged-in {
    text-align: center;
    padding: 60px 20px;
    background: var(--sp-bg-color);
    border-radius: 10px;
    margin: 20px;
}

.sp-not-logged-in p {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--sp-text-color);
}

.sp-not-logged-in .btn-login {
    display: inline-block;
    background-color: var(--sp-primary-color);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-family: 'Quicksand', sans-serif;
    font-weight: bold;
    transition: background-color 0.3s;
}

.sp-not-logged-in .btn-login:hover {
    background-color: var(--sp-secondary-color);
}

/* =============================================
   ICONS
   ============================================= */
.icon_gestion_liste {
    width: 20px;
    height: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.icon_gestion_liste:hover {
    transform: scale(1.1);
}

/* =============================================
   MOBILE COLLAPSE (Hidden on Desktop)
   ============================================= */
.bspc-mobile-collapse__header {
    display: none;
}

/* =============================================
   RESPONSIVE - TABLET & MOBILE
   ============================================= */
@media screen and (max-width: 992px) {
    .container22 {
        width: 95%;
    }

    .menu10 {
        gap: 10px;
    }

    .menu10 a {
        padding: 8px 12px;
        font-size: 11px;
    }
}

@media screen and (max-width: 768px) {
    /* Header */
    .bspc-section {
        padding: 15px 0;
    }

    .container22 {
        width: 100%;
        padding: 0 15px;
    }

    .logo {
        font-size: 20px;
    }

    /* Mobile Menu Toggle */
    .bspc-mobile-collapse {
        width: 100%;
        background: var(--sp-accent-color);
        border: 2px solid rgba(255,255,255,0.3);
        border-radius: 10px;
        overflow: hidden;
    }

    .bspc-mobile-collapse .logo {
        display: none;
    }

    .bspc-mobile-collapse__header {
        display: flex;
        width: 100%;
        background: transparent;
        border: 0;
        color: #fff;
        padding: 14px 16px;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        font-family: 'Quicksand', sans-serif;
    }

    .bspc-mobile-collapse__left {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .bspc-mobile-collapse__title {
        font-weight: 700;
        letter-spacing: 0.5px;
        font-size: 14px;
    }

    .bspc-mobile-collapse__chevron {
        transition: transform 0.25s ease;
        font-size: 18px;
    }

    .bspc-mobile-collapse.is-open .bspc-mobile-collapse__chevron {
        transform: rotate(180deg);
    }

    /* Mobile Menu - Hidden by default */
    .bspc-mobile-collapse nav.menu10 {
        display: flex;
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease, padding 0.3s ease;
        padding: 0;
        gap: 0;
    }

    .bspc-mobile-collapse.is-open nav.menu10 {
        max-height: 500px;
        padding: 10px 0;
    }

    .bspc-mobile-collapse nav.menu10 a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        border: none;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        font-size: 14px;
    }

    .bspc-mobile-collapse nav.menu10 a:last-child {
        border-bottom: none;
    }
}
