/* ═══════════════════════════════════════════════════════════
   ANNUAIRE — BBB Music Industry Roster
   ═══════════════════════════════════════════════════════════ */

/* ── Header ── */
.annuaire-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.annuaire-count {
    display: inline-flex;
    align-items: center;
    font-size: 0.72rem;
    font-weight: 700;
    background: #1a1a2e;
    color: #fff;
    padding: 0.22rem 0.65rem;
    border-radius: 20px;
    letter-spacing: 0.06em;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

/* ── Filter bar ── */
.annuaire-filters {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.8rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.annuaire-search-wrap {
    flex: 1;
    min-width: 220px;
    position: relative;
}

.annuaire-search-wrap .search-ico {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.75rem;
    pointer-events: none;
}

.annuaire-search-wrap input.form-control {
    padding-left: 2rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.845rem;
    background: #fafafa;
    transition:
        border-color 0.18s,
        background 0.18s;
    height: 36px;
}

.annuaire-search-wrap input.form-control:focus {
    border-color: #8f0000;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(143, 0, 0, 0.08);
}

.annuaire-filters .form-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.845rem;
    height: 36px;
    padding: 0.3rem 2rem 0.3rem 0.65rem;
    background-color: #fafafa;
    transition: border-color 0.18s;
    cursor: pointer;
}

.annuaire-filters .form-select:focus {
    border-color: #8f0000;
    box-shadow: 0 0 0 3px rgba(143, 0, 0, 0.08);
}

.annuaire-filter-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #4b5563;
    white-space: nowrap;
    user-select: none;
    cursor: pointer;
}

.annuaire-filter-check input[type='checkbox'] {
    accent-color: #8f0000;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.annuaire-filters .btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    white-space: nowrap;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}

.annuaire-filters .btn-reset:hover:not(:disabled) {
    border-color: #8f0000;
    color: #8f0000;
}

.annuaire-filters .btn-reset:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Table wrapper ── */
.annuaire-table-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}

.annuaire-table-scroll {
    overflow-x: auto;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
}

/* ── Table ── */
.annuaire-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.815rem;
    line-height: 1.4;
}

/* Sticky header */
.annuaire-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.65rem 0.875rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid #8f0000;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    user-select: none;
}

.annuaire-table thead th:last-child {
    border-right: none;
}

.annuaire-table thead th .th-inner {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Body rows */
.annuaire-table tbody tr {
    border-bottom: 1px solid #f3f4f6;
    border-left: 3px solid transparent;
    transition:
        background 0.12s,
        border-left-color 0.12s;
}

.annuaire-table tbody tr:last-child {
    border-bottom: none;
}

.annuaire-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.annuaire-table tbody tr:hover {
    background: #fff5f5;
    border-left-color: #8f0000;
}

.annuaire-table tbody td {
    padding: 0.5rem 0.875rem;
    vertical-align: middle;
}

/* ── Cells ── */

/* Nom */
.cell-nom .prenom {
    color: #6b7280;
    font-weight: 400;
}

.cell-nom .nom {
    font-weight: 700;
    color: #111827;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Role */
.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.role-pill img {
    width: 13px;
    height: 13px;
    opacity: 0.75;
}

.role-pill.cat-groupe {
    background: #eff6ff;
    color: #1d4ed8;
}
.role-pill.cat-orga {
    background: #fefce8;
    color: #854d0e;
}
.role-pill.cat-admin {
    background: #f0fdf4;
    color: #15803d;
}
.role-pill.cat-tech {
    background: #fdf4ff;
    color: #7e22ce;
}
.role-pill.cat-default {
    background: #f3f4f6;
    color: #374151;
}

/* Groupes */
.cell-groupes {
    max-width: 200px;
}

.groupe-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.14rem 0.45rem;
    border-radius: 3px;
    font-size: 0.67rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-decoration: none;
    margin: 0.07rem;
    transition:
        opacity 0.15s,
        transform 0.1s;
    white-space: nowrap;
}

.groupe-tag.referent {
    background: #8f0000;
    color: #fff;
}
.groupe-tag.membre {
    background: #374151;
    color: #fff;
}
.groupe-tag:hover {
    opacity: 0.82;
    transform: translateY(-1px);
}

/* Contact links */
.contact-info-cell {
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.79rem;
    transition: color 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 175px;
}

.contact-link:hover {
    color: #8f0000;
}

.contact-link .lnk-ico {
    flex-shrink: 0;
    width: 12px;
    color: #9ca3af;
    font-size: 0.7rem;
}

.contact-link span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Ville */
.cell-ville {
    font-size: 0.79rem;
    color: #4b5563;
    white-space: nowrap;
}

.pays-badge {
    font-size: 0.62rem;
    font-weight: 700;
    background: #fef9c3;
    color: #854d0e;
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
    margin-left: 0.25rem;
    letter-spacing: 0.04em;
}

/* Tags */
.tag-intermittent {
    display: inline-block;
    padding: 0.13rem 0.4rem;
    border-radius: 3px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #dbeafe;
    color: #1d4ed8;
}

.tag-regime {
    display: inline-block;
    padding: 0.13rem 0.4rem;
    border-radius: 3px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    background: #dcfce7;
    color: #15803d;
}

/* Notes */
.cell-notes {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #9ca3af;
    font-size: 0.75rem;
    font-style: italic;
}

/* Edit button */
.btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1.5px solid #e5e7eb;
    border-radius: 5px;
    background: transparent;
    color: #9ca3af;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.15s;
    opacity: 0;
    text-decoration: none;
}

.annuaire-table tbody tr:hover .btn-edit {
    opacity: 1;
}

.btn-edit:hover {
    background: #8f0000;
    border-color: #8f0000;
    color: #fff;
    transform: scale(1.08);
}

/* ── Loader ── */
.annuaire-loader {
    padding: 4rem;
    text-align: center;
    color: #9ca3af;
}

.annuaire-loader .spinner-border {
    width: 2rem;
    height: 2rem;
    border-width: 2px;
    color: #8f0000 !important;
}

/* ── Empty state ── */
.annuaire-empty {
    padding: 4rem;
    text-align: center;
    color: #d1d5db;
}

.annuaire-empty i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.annuaire-empty p {
    font-size: 0.875rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

/* ── Edit Modal ── */
.modal-annuaire .modal-content {
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-annuaire .modal-header {
    background: #1a1a2e;
    border-bottom: 2px solid #8f0000;
    padding: 1rem 1.25rem;
}

.modal-annuaire .modal-title {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-annuaire .modal-title i {
    color: #8f0000;
}

.modal-annuaire .btn-close {
    filter: invert(1) opacity(0.7);
    transition: opacity 0.15s;
}

.modal-annuaire .btn-close:hover {
    opacity: 1;
}

.modal-annuaire .modal-body {
    padding: 1.25rem;
    background: #fff;
}

.modal-annuaire .section-label {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-annuaire .form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6b7280;
    margin-bottom: 0.3rem;
}

.modal-annuaire .form-control,
.modal-annuaire .form-select {
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.855rem;
    padding: 0.45rem 0.7rem;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
}

.modal-annuaire .form-control:focus,
.modal-annuaire .form-select:focus {
    border-color: #8f0000;
    box-shadow: 0 0 0 3px rgba(143, 0, 0, 0.1);
}

.modal-annuaire textarea.form-control {
    resize: vertical;
    min-height: 70px;
}

.modal-annuaire .form-check-input:checked {
    background-color: #8f0000;
    border-color: #8f0000;
}

.modal-annuaire .form-check-label {
    font-size: 0.82rem;
    color: #374151;
    cursor: pointer;
}

.modal-annuaire .modal-footer {
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    padding: 0.75rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-annuaire .contact-name-display {
    font-size: 0.78rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-annuaire .contact-name-display strong {
    color: #374151;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.modal-annuaire .btn-cancel {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    border: 1.5px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.45rem 1rem;
    background: #fff;
    transition: all 0.15s;
    letter-spacing: 0.02em;
}

.modal-annuaire .btn-cancel:hover {
    border-color: #9ca3af;
    color: #374151;
}

.modal-annuaire .btn-save {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    background: #8f0000;
    border: none;
    color: #fff;
    border-radius: 6px;
    padding: 0.45rem 1.25rem;
    transition:
        background 0.15s,
        transform 0.1s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.modal-annuaire .btn-save:hover {
    background: #6d0000;
}
.modal-annuaire .btn-save:active {
    transform: scale(0.97);
}

.modal-annuaire .btn-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Saving spinner */
.modal-annuaire .btn-save .spinner-border {
    width: 0.85rem;
    height: 0.85rem;
    border-width: 1.5px;
}
