/* --- DIRECTORY LAYOUT --- */
.directory-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* --- HERO SECTION --- */
.directory-hero {
    background: linear-gradient(rgba(28, 32, 40, 0.9), rgba(28, 32, 40, 0.9)), url('/img/fond.png');
    background-size: cover;
    text-align: center;
    padding: 60px 20px;
    border-radius: 16px;
    margin-bottom: 30px;
}

.directory-hero h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 15px; }
.directory-hero p { color: var(--text-dim); max-width: 600px; margin: 0 auto 30px; line-height: 1.6; }

.search-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 12px;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    padding-left: 12px;
}

.search-input-group input {
    background: transparent;
    border: none;
    color: white;
    width: 100%;
    padding: 10px;
    outline: none;
}

.btn-publish {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-publish:hover {
    background: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* --- FILTERS --- */
.filters-area { margin-bottom: 30px; }
.filter-row { display: flex; align-items: center; gap: 20px; margin-bottom: 12px; }
.filter-label { color: var(--text-dim); font-weight: bold; min-width: 70px; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.chip {
    padding: 6px 18px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-dim);
    cursor: pointer;
    transition: 0.2s;
}

.chip.active, .chip:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* --- GRID & VIEW SWITCHER --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.view-switcher { display: flex; align-items: center; gap: 10px; color: var(--text-dim); }
.view-switcher button { background: none; border: none; color: var(--text-dim); cursor: pointer; }
.view-switcher button.active { color: white; }

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* --- USER CARD --- */
.user-card {
    padding: 24px;
    transition: all 0.2s;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.user-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
    background: var(--bg-dark);
}

.user-card-top { display: flex; justify-content: space-between; align-items: flex-start; }
.avatar-container { position: relative; }
.avatar-directory { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }

.online-badge {
    position: absolute; bottom: 5px; right: 5px;
    width: 14px; height: 14px;
    background: #10b981; border: 3px solid var(--bg-card); border-radius: 50%;
}

.btn-more-small { background: none; border: none; color: var(--text-dim); cursor: pointer; }
.btn-more-small:hover { color: white; }

.user-card-body { margin: 15px 0; }
.user-card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.user-promo-label { color: var(--primary); font-weight: bold; font-size: 0.85rem; }
.user-major-label { color: var(--text-dim); font-size: 0.85rem; margin-top: 4px; }

.user-card-footer { display: flex; gap: 10px; margin-top: 20px; }

/* Boutons secondaires (Message & Vue) */
.btn-msg-small, .user-view {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-msg-small:hover, .user-view:hover {
    background-color: var(--gold);
    color: var(--bg-dark);
    transform: translateY(-2px);
    border-color: var(--gold);
}

/* --- LIST VIEW OVERRIDE --- */
.user-grid.list-view { grid-template-columns: 1fr; }

.user-grid.list-view .user-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 15px 30px;
    text-align: left;
}

.user-grid.list-view .user-card-body { flex-grow: 1; margin: 0; }
.user-grid.list-view .user-card-footer { margin: 0; min-width: 280px; justify-content: flex-end; }

@media (max-width: 768px) {
    .user-grid.list-view .user-card { flex-direction: column; text-align: center; }
}

/* --- PAGINATION --- */
.pagination-wrapper {
    display: flex; justify-content: center; align-items: center;
    gap: 8px; margin-top: 50px;
}

.btn-page {
    width: 40px; height: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn-page.active { background: var(--primary); border-color: var(--primary); }
.btn-page:hover:not(.active) { border-color: var(--primary); }