/* --- CSS SPÉCIFIQUE LISTING / ANNUAIRE --- */

/* Sidebar Filtres */
.filter-box {
    background-color: rgba(30, 30, 30, 0.65);
    backdrop-filter: blur(15px);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.filter-box .form-check-label {
    font-size: 0.95rem;
    color: #ccc;
    cursor: pointer;
}

.filter-box .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Base Listing Card */
.listing-card {
    background-color: rgba(30, 30, 30, 0.45);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.listing-card:hover {
    transform: translateY(-3px);
    background-color: rgba(40, 40, 40, 0.6);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: rgba(179, 157, 219, 0.2);
}

/* Avatar dans le listing */
.avatar-wrapper {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(45deg, #333, #555);
}

.avatar-wrapper img {
    border: 3px solid #1e1e1e;
    object-fit: cover;
    height: 100%;
    width: 100%;
}

.avatar-wrapper.small-avatar {
    width: 70px;
    height: 70px;
}

/* Indicateur de statut (En ligne / Hors ligne) */
.online-status {
    position: absolute;
    bottom: 5px;
    right: 5px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    border: 2px solid #1e1e1e;
}

/* --- PREMIUM CARD SPECIFICS --- */
.premium-card {
    background: linear-gradient(145deg, rgba(40, 30, 60, 0.7), rgba(30, 30, 30, 0.6));
    border: 1px solid rgba(255, 215, 0, 0.3); /* Bordure Dorée */
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.05);
}

.premium-card:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.15);
}

.premium-card .avatar-wrapper {
    background: linear-gradient(45deg, #ffd700, #b8860b); /* Cercle doré */
    width: 110px;
    height: 110px;
}

.premium-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(90deg, #ffd700, #ffa000);
    color: #000;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 12px;
    border-bottom-left-radius: 12px;
    text-transform: uppercase;
    z-index: 2;
}

.premium-card .col-md-3 > .card-body {
    padding-top: 2rem !important;
}

/* Tags styles */
.badge-tag {
    background-color: rgba(49, 27, 146, 0.5);
    color: #d1c4e9;
    border: 1px solid rgba(179, 157, 219, 0.2);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 5px;
    display: inline-block;
}

.small-tag {
    font-size: 0.7rem;
    padding: 2px 8px;
    background-color: rgba(255,255,255,0.05);
    border: none;
    text-transform: capitalize;
}

/* Text clamp (pour couper le résumé proprement) */
.clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Scrollbar discrète pour la liste des supports */
.checkbox-group::-webkit-scrollbar {
    width: 6px;
}
.checkbox-group::-webkit-scrollbar-track {
    background: transparent;
}
.checkbox-group::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

/* --- RECHERCHE VECTORIELLE & UI --- */
/*.semantic-search-wrapper .input-group-lg .form-control {*/
/*    font-size: 1.15rem;*/
/*    padding: 1rem 1.5rem;*/
/*}*/

/*.semantic-search-wrapper .input-group-lg .input-group-text,*/
/*.semantic-search-wrapper .input-group-lg .form-control {*/
/*    background-color: rgba(20, 20, 25, 0.8) !important;*/
/*}*/

/*.semantic-search-wrapper .form-control:focus {*/
/*    border-color: var(--primary-color) !important;*/
/*    box-shadow: 0 0 15px rgba(179, 157, 219, 0.2) !important;*/
/*}*/
/* --- NOUVEAU DESIGN RECHERCHE TEXTUELLE IA --- */
.glass-search-container {
    background-color: rgba(30, 30, 30, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.glass-search-container:focus-within {
    border-color: rgba(179, 157, 219, 0.4);
    box-shadow: 0 0 20px rgba(179, 157, 219, 0.15) !important;
    background-color: rgba(40, 40, 40, 0.65);
}

.glass-search-container input {
    font-size: 1.1rem;
    padding: 0.5rem 0;
}

.glass-search-container input::placeholder {
    color: #888;
    font-weight: 300;
}

/* On applique un dégradé à l'icône pour un effet plus magique/IA */
.search-icon-wrapper i {
    background: linear-gradient(135deg, #b39ddb, #ede7f6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* --- BADGES ET TAGS DISTINGUÉS --- */
.badge-custom {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 6px;
    font-weight: 500;
}

/* Themes (Sujets abordés) -> Violet profond / Design de marque */
.badge-theme {
    background: rgba(49, 27, 146, 0.4);
    color: #ede7f6;
    border: 1px solid rgba(179, 157, 219, 0.3);
    transition: all 0.2s ease;
}

/* Supports (Outils techniques) -> Rose/Accentué */
.badge-support {
    background: transparent;
    color: #ff80ab;
    border: 1px solid rgba(255, 128, 171, 0.4);
}

/* Tags sémantiques IA (Bloc du haut) */
.tag-suggested {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s;
}

.tag-suggested:hover {
    background-color: rgba(179, 157, 219, 0.15);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.tag-active {
    background-color: var(--primary-color);
    color: #121212 !important;
    border: 1px solid var(--primary-color);
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.tag-active:hover {
    background-color: #d1c4e9;
    border-color: #d1c4e9;
}


/* Grille des Expertises (9 colonnes sur Desktop, 3 sur Mobile) */
.expertise-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 12px;
}

@media (max-width: 992px) {
    .expertise-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 576px) {
    .expertise-grid { grid-template-columns: repeat(3, 1fr); }
}

.filter-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    height: 100%;
}

.filter-tile i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.filter-tile span {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    color: #ccc;
}

.filter-tile:hover {
    background: rgba(179, 157, 219, 0.1);
    border-color: rgba(179, 157, 219, 0.4);
    transform: translateY(-2px);
}

.filter-tile.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(179, 157, 219, 0.3);
}

.filter-tile.active i,
.filter-tile.active span {
    color: #121212 !important;
}

/* Pilules pour Canaux */
.filter-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.filter-pill.active {
    background: var(--primary-color);
    color: #121212;
    border-color: var(--primary-color);
    font-weight: bold;
}

/* Utilitaires Cartes */
.border-md-end { border-right: 1px solid transparent; }
@media (min-width: 768px) {
    .border-md-end { border-right-color: rgba(255,255,255,0.1) !important; }
}

/* --- AJOUTS ET CORRECTIONS SPECIFIQUES --- */

/* État actif pour la pilule "Thème" interactive */
.interactive-theme.active {
    background: var(--primary-color) !important;
    color: #121212 !important;
    border-color: var(--primary-color) !important;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(179, 157, 219, 0.4);
    transform: translateY(-1px);
}

.interactive-theme.active i {
    color: #121212 !important;
}

/* Animation pour la barre de recherche textuelle masquée */
#search-container-wrapper {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out;
    opacity: 0;
    margin-bottom: 0;
}

#search-container-wrapper.show {
    max-height: 500px;
    opacity: 1;
    margin-bottom: 2rem;
}

/* --- PAGINATION ESOTÉRIQUE --- */
.custom-pagination .page-item {
    margin: 0 4px;
}

.custom-pagination .page-link {
    background-color: rgba(30, 30, 30, 0.45);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e0e0e0;
    border-radius: 8px !important;
    padding: 8px 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.custom-pagination .page-link:hover {
    background-color: rgba(179, 157, 219, 0.2);
    border-color: rgba(179, 157, 219, 0.4);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(179, 157, 219, 0.3);
}

.custom-pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: #121212 !important;
    border-color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(179, 157, 219, 0.5);
    font-weight: bold;
    transform: translateY(-2px);
}

.custom-pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, 0.3);
    box-shadow: none;
    cursor: default;
}
.custom-pagination .page-item.disabled .page-link:hover {
    transform: none;
    background-color: transparent;
    border-color: transparent;
}