:root { --gi: #F57C00; --bk: #111; }
.gi-plugin-wrapper { font-family: 'Poppins', sans-serif; }
.gi-grid { display: grid; gap: 20px; }
.gi-cols-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.gi-cols-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }
.gi-cols-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

/* Cartes */
.gi-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.06); cursor: pointer; transition: 0.3s; border: 1px solid #eee; }
.gi-card:hover { transform: translateY(-5px); }
.gi-card-img { position: relative; height: 200px; }
.gi-card-img img { width: 100%; height: 100%; object-fit: cover; }
.gi-badge { position: absolute; top: 10px; left: 10px; background: var(--gi); color: #fff; padding: 4px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.gi-card-body { padding: 15px; }
.gi-card-body h3 { margin: 0 0 5px; font-size: 1.1rem; }
.gi-card-loc { font-size: 13px; color: #777; display: flex; align-items: center; gap: 5px; }
.gi-card-specs { display: flex; justify-content: space-between; border-top: 1px solid #eee; margin-top: 10px; padding-top: 10px; font-weight: 600; }
.gi-card-price { color: var(--gi); }
.gi-card-footer { padding: 12px 15px; background: #fafafa; display: flex; justify-content: space-between; color: var(--gi); font-weight: 700; }

/* Single */
.gi-single-wrapper { max-width: 1100px; margin: 0 auto; padding: 20px; font-family: 'Poppins'; }
.gi-gallery-grid { display: flex; flex-direction: column; gap: 10px; }
.gi-main-img img { width: 100%; max-height: 500px; object-fit: cover; border-radius: 15px; }
.gi-thumbs { display: flex; gap: 10px; overflow-x: auto; }
.gi-tmb { width: 80px; height: 60px; object-fit: cover; border-radius: 8px; opacity: 0.5; cursor: pointer; border: 2px solid transparent; }
.gi-tmb.active { opacity: 1; border-color: var(--gi); }
.gi-info-grid { display: grid; grid-template-columns: 1fr 320px; gap: 30px; margin-top: 20px; }


/* --- NOUVEAU LAYOUT SINGLE PROJET --- */

.gi-main-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    position: relative;
    margin-top: 30px;
}

/* Colonne de gauche (Images + Texte) */
.gi-left-col {
    flex: 1;
    min-width: 0; /* Évite les débordements */
}

/* Colonne de droite (Le bloc qui reste fixe) */
.gi-right-col {
    width: 380px;
    position: -webkit-sticky; /* Support Safari */
    position: sticky;
    top: 40px; /* Distance du haut de l'écran lors du scroll */
    z-index: 10;
}

.gi-sticky-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 24px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    border: 1px solid #f0f0f0;
}

.gi-price-big {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--gi);
    margin-bottom: 20px;
    text-align: center;
}

.gi-specs-box {
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
    margin-bottom: 25px;
}

.gi-specs-box p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-weight: 500;
    color: #444;
}

.gi-specs-box .dashicons {
    color: var(--gi);
}

.gi-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gi-btn .btn-text2{display:none;}

/* --- ADAPTATION MOBILE (TAB BAR) --- */

@media (max-width: 991px) {
    .gi-btn .btn-text2{display:inline;}
    .gi-main-layout {
        flex-direction: column;
    }

    .gi-right-col {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        top: auto; /* Annule le sticky desktop */
        z-index: 9999;
        background: #fff;
        box-shadow: 0 -10px 25px rgba(0,0,0,0.1);
        padding: 10px 15px;
        border-top: 1px solid #eee;
    }

    .gi-sticky-card {
        padding: 0;
        border: none;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    
    #btn-pdf-moble-style{
        border-radius: 50px !important;
        margin-top: 10px !important;
    }

    .gi-price-big {
        font-size: 1.1rem;
        margin-bottom: 0;
        text-align: left;
        white-space: nowrap;
    }

    .gi-specs-box {
        display: none; /* On cache les détails pour gagner de la place */
    }

    .gi-actions {
        flex-direction: row;
        flex: 1;
        justify-content: flex-end;
    }

    .gi-btn {
        margin: 0;
        padding: 8px 12px;
        font-size: 13px;
        height: 42px;
        flex: 1;
    }

    .gi-btn .btn-text {
        display: none; /* On ne garde que les icônes sur mobile très petit */
    }

    /* Ajout d'une marge en bas de la page pour ne pas que la barre cache le texte */
    .gi-single-wrapper {
        padding-bottom: 100px;
    }
}


.gi-box { background: #f9f9f9; padding: 20px; border-radius: 15px; }
.gi-price-big { font-size: 1.5rem; font-weight: 700; color: var(--gi); border-top: 1px solid #ddd; margin-top: 10px; padding-top: 10px; }
.gi-btn { display: block; width: 100%; padding: 15px; margin-top: 10px; border-radius: 50px; text-align: center; color: #fff; font-weight: 700; border: none; cursor: pointer; text-decoration: none; }
.gi-wa { background: #25D366; }
.gi-ml { background: var(--gi); }

/* Modal */
.gi-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9999; display: none; align-items: center; justify-content: center; }
.gi-modal-box { background: #fff; padding: 30px; border-radius: 20px; width: 90%; max-width: 450px; position: relative; }
.gi-modal-box input, .gi-modal-box textarea { width: 100%; margin-bottom: 10px; padding: 12px; border: 1px solid #ddd; border-radius: 10px; }
#gi-submit { width: 100%; background: var(--bk); color: #fff; padding: 15px; border-radius: 10px; border: none; cursor: pointer; font-weight: 700; }
.gi-close { position: absolute; top: 10px; right: 15px; font-size: 30px; cursor: pointer; }


/* Barre de filtres */
.gi-filter-bar { 
    display: flex; 
    gap: 12px; 
    justify-content: start; 
    margin-bottom: 40px; 
    flex-wrap: wrap; 
}

/* Style des boutons par défaut (non actifs) */
.gi-btn-filter { 
    padding: 10px 24px; 
    border-radius: 50px; 
    border: 2px solid #eeeeee; /* Bordure légère */
    background-color: #f9f9f9; /* Fond gris très clair */
    color: #666666; 
    font-weight: 600; 
    font-family: 'Poppins', sans-serif;
    cursor: pointer; 
    transition: all 0.3s ease; /* Animation fluide */
    outline: none;
}

/* Style au survol (Hover) */
.gi-btn-filter:hover {
    border-color: var(--gi);
    color: var(--gi);
}

/* STYLE DU FILTRE ACTIF (La pièce maîtresse) */
.gi-btn-filter.active { 
    background-color: var(--gi) !important; /* Couleur orange Groupe Ivoire */
    border-color: var(--gi) !important;
    color: #ffffff !important; /* Texte blanc pour le contraste */
    box-shadow: 0 4px 12px rgba(245, 124, 0, 0.3); /* Légère lueur orange */
    transform: translateY(-2px); /* Petit soulèvement */
}


/* Animation de chargement (Spinner) */
.gi-loader {
    display: none; /* Caché par défaut */
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.gi-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--gi); /* Votre couleur orange */
    border-radius: 50%;
    animation: gi-spin 0.8s linear infinite;
}

@keyframes gi-spin {
    to { transform: rotate(360deg); }
}

/* Conteneur de grille relatif pour positionner le loader */
.gi-plugin-wrapper { position: relative; min-height: 200px; }


.gi-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; /* Espace entre l'icône et le texte */
}
.gi-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Reduction des tailles des tires de détails projet */
.gi-header h1{font-size: 30px;}

.gi-section-title {font-size: 27px;}

@media (max-width: 768px) { .gi-info-grid { grid-template-columns: 1fr; } .gi-grid { grid-template-columns: 1fr !important; } }