/* ===========================================
   ANNUAIRE PUBLIC - STYLES
   =========================================== */

.annuaire-page {
    overflow-x: hidden;
}

/* Header */
.annuaire-header {
    background: linear-gradient(135deg, #202d4b 0%, #4ccfde 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.annuaire-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.annuaire-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.annuaire-header-small {
    padding: 1.5rem 0;
    text-align: left;
    margin-bottom: 2rem;
}

.annuaire-header .breadcrumb a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.annuaire-header .breadcrumb a:hover {
    opacity: 1;
}

/* Container */
.annuaire-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Filtres */
.search-filters {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border: 1px solid #eef1f6;
}

.filters-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

.filters-geo {
    grid-template-columns: 1.2fr 1.5fr 0.8fr;
}

.filters-secondary {
    grid-template-columns: 1.2fr 1.5fr 0.8fr;
    padding-top: 1rem;
    border-top: 1px solid #eef1f6;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.filter-group label {
    font-weight: 600;
    color: #202d4b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-group label i {
    color: #4ccfde;
    margin-right: 0.3rem;
}

.filter-group input,
.filter-group select {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #dfe3ea;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f8f9fb;
    color: #333;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: #4ccfde;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 207, 222, 0.12);
}

/* Toggle switch consultation en ligne */
.filter-toggle {
    justify-content: flex-start;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.55rem 1rem;
    border: 1.5px solid #dfe3ea;
    border-radius: 10px;
    background: #f8f9fb;
    transition: all 0.2s;
    white-space: nowrap;
    user-select: none;
    font-weight: 500 !important;
    text-transform: none !important;
    font-size: 0.95rem !important;
    letter-spacing: 0 !important;
    color: #666 !important;
}

.toggle-switch:hover {
    border-color: #4ccfde;
    background: #fff;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    width: 36px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    position: relative;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #2e7d32;
}

.toggle-switch input:checked + .toggle-slider::after {
    transform: translateX(16px);
}

.toggle-switch input:checked ~ .toggle-label {
    color: #2e7d32 !important;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #666;
}

@media (max-width: 768px) {
    .filters-main {
        grid-template-columns: 1fr;
    }
    .filters-geo {
        grid-template-columns: 1fr;
    }
    .filters-secondary {
        grid-template-columns: 1fr 1fr;
    }
    .filters-actions {
        flex-wrap: wrap;
    }
    .filter-langue-action {
        width: 100%;
    }
    .profils-grid {
        grid-template-columns: 1fr;
    }
    .profil-card {
        flex-direction: column;
    }
    .profil-photo {
        width: 100%;
        min-width: auto;
        height: 200px;
    }
    .annuaire-header h1 {
        font-size: 1.75rem;
    }
    .annuaire-header {
        padding: 2rem 0;
    }
    .search-filters {
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 480px) {
    .filters-secondary {
        grid-template-columns: 1fr;
    }
    .search-filters {
        padding: 1rem;
    }
    .filters-actions {
        flex-direction: column;
    }
    .filters-actions .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    .annuaire-header h1 {
        font-size: 1.4rem;
    }
    .annuaire-header p {
        font-size: 1rem;
    }
    .annuaire-page .container {
        padding: 0 0.75rem;
    }
}

.filters-actions {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid #eef1f6;
    margin-top: 0.5rem;
}

.filter-langue-action {
    margin-right: auto;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 34%;
}

.filter-langue-action label {
    font-weight: 600;
    color: #202d4b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.filter-langue-action label i {
    color: #4ccfde;
    margin-right: 0.3rem;
}

.filter-langue-action select {
    padding: 0.6rem 0.9rem;
    border: 1.5px solid #dfe3ea;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f8f9fb;
    color: #333;
    transition: all 0.2s;
}

.filter-langue-action select:focus {
    border-color: #4ccfde;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(76, 207, 222, 0.12);
}

.filters-actions .btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-reset {
    color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-reset:hover {
    background: #dc3545 !important;
    color: white !important;
}

.btn-map {
    white-space: nowrap;
}

/* Results info */
.results-info {
    margin-bottom: 1.5rem;
    color: #666;
}

.results-info strong {
    color: #202d4b;
}

/* Profils grid */
.profils-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.profil-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    padding: 1rem;
    gap: 1rem;
}

.profil-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.profil-photo {
    width: 160px;
    min-width: 160px;
    height: 190px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border-radius: 8px;
}

.profil-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8e8e8 0%, #f5f5f5 100%);
}

.photo-placeholder i {
    font-size: 3rem;
    color: #ccc;
}

.photo-placeholder-large i {
    font-size: 6rem;
}

.profil-content {
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.profil-name {
    font-size: 1.1rem;
    color: #202d4b;
    margin: 0 0 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profil-title {
    color: #4ccfde;
    font-weight: 500;
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.profil-location {
    color: #666;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.profil-location i {
    color: #4ccfde;
    margin-right: 0.25rem;
}

.profil-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.tag {
    display: inline-block;
    background: #e8f7f9;
    color: #202d4b;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
}

.tag-more {
    background: #f0f0f0;
    color: #666;
}

.tag-secondary {
    background: #fff3cd;
    color: #856404;
}

.tag-tertiary {
    background: #e2e3e5;
    color: #383d41;
}

/* No results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results i {
    color: #ccc;
    margin-bottom: 1rem;
}

.no-results h3 {
    color: #202d4b;
    margin-bottom: 0.5rem;
}

/* Profil detail */
.profil-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 3rem;
}

.profil-detail-header {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-bottom: 1px solid #eee;
}

.profil-detail-photo {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    border: 4px solid #4ccfde;
}

.profil-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profil-detail-info h1 {
    font-size: 2rem;
    color: #202d4b;
    margin: 0 0 0.5rem;
}

.profil-title-large {
    font-size: 1.25rem;
    color: #4ccfde;
    font-weight: 500;
    margin: 0 0 1rem;
}

.profil-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #666;
    margin-bottom: 1rem;
}

.profil-meta i {
    color: #4ccfde;
    margin-right: 0.5rem;
}

.profil-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #d4edda;
    color: #155724;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

.profil-detail-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding: 2rem;
}

.profil-detail-main {
    min-width: 0;
}

.profil-section {
    margin-bottom: 2rem;
}

.profil-section:last-child {
    margin-bottom: 0;
}

.profil-section h2 {
    font-size: 1.25rem;
    color: #202d4b;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #4ccfde;
}

.profil-section h2 i {
    color: #4ccfde;
    margin-right: 0.5rem;
}

.profil-text {
    color: #444;
    line-height: 1.8;
}

.profil-tags-large {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profil-tags-large .tag {
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
}

/* Sidebar */
.profil-detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-card,
.location-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
}

.contact-card h3,
.location-card h3 {
    font-size: 1rem;
    color: #202d4b;
    margin: 0 0 1rem;
}

.contact-card h3 i,
.location-card h3 i {
    color: #4ccfde;
    margin-right: 0.5rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #444;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    color: #4ccfde;
    width: 20px;
    text-align: center;
}

.contact-item a {
    color: #202d4b;
    text-decoration: none;
    transition: color 0.3s;
    word-break: break-all;
}

.contact-item a:hover {
    color: #4ccfde;
}

.location-card p {
    color: #444;
    margin: 0;
    line-height: 1.6;
}

/* Réseaux sociaux */
.social-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
}

.social-card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #202d4b;
}

.social-card h3 i {
    color: #4ccfde;
    margin-right: 0.5rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: transform 0.2s, opacity 0.2s;
}

.social-link:hover {
    transform: scale(1.1);
    opacity: 0.9;
}

.social-link.linkedin {
    background: #0077b5;
}

.social-link.facebook {
    background: #1877f2;
}

.social-link.twitter {
    background: #1da1f2;
}

/* Responsive */
@media (max-width: 900px) {
    .profil-detail-body {
        grid-template-columns: 1fr;
    }
    
    .profil-detail-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .contact-card,
    .location-card {
        flex: 1;
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .profil-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .profil-detail-photo {
        width: 120px;
        height: 120px;
    }
    
    .profil-detail-info h1 {
        font-size: 1.5rem;
    }
    
    .profil-meta {
        justify-content: center;
    }
    
    .annuaire-header h1 {
        font-size: 1.75rem;
    }
    
    .profil-detail-body {
        padding: 1rem;
    }
    
    .profil-detail-header {
        padding: 1.5rem 1rem;
    }
}
