/* ============================================
   Annuaire PDRX — Styles
   Theme: Light, SAAS futuriste, propre
   ============================================ */

:root {
    --pdrx-primary: #0f6fec;
    --pdrx-primary-hover: #0b5cc7;
    --pdrx-success: #10b981;
    --pdrx-success-hover: #059669;
    --pdrx-dark: #1e293b;
    --pdrx-text: #334155;
    --pdrx-text-light: #64748b;
    --pdrx-border: #e2e8f0;
    --pdrx-bg: #f8fafc;
    --pdrx-white: #ffffff;
    --pdrx-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --pdrx-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 10px rgba(0, 0, 0, 0.06);
    --pdrx-shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
    --pdrx-radius: 12px;
    --pdrx-radius-sm: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--pdrx-text);
    background: var(--pdrx-bg);
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   MAP PAGE
   ============================================ */

#map {
    width: 100%;
    height: 100vh;
    z-index: 1;
}

/* Barre de filtres flottante */
.filtres-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 900px;
}

.filtres-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: var(--pdrx-radius);
    box-shadow: var(--pdrx-shadow-xl);
    padding: 16px 24px;
    border: 1px solid var(--pdrx-border);
    backdrop-filter: blur(20px);
}

.filtres-card .row {
    align-items: flex-end;
}

.filtres-card label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pdrx-text-light);
    margin-bottom: 4px;
    display: block;
}

/* ============================================
   CUSTOM SELECT COMPONENT
   ============================================ */

.custom-select-wrap {
    position: relative;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--pdrx-bg);
    border: 1px solid var(--pdrx-border);
    border-radius: var(--pdrx-radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--pdrx-text);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 36px;
    gap: 8px;
}

.custom-select-trigger:hover {
    border-color: #cbd5e1;
}

.custom-select-wrap.open .custom-select-trigger {
    border-color: var(--pdrx-primary);
    box-shadow: 0 0 0 3px rgba(15, 111, 236, 0.1);
}

.custom-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.custom-select-arrow {
    font-size: 10px;
    color: var(--pdrx-text-light);
    transition: transform 0.2s;
    flex-shrink: 0;
}

.custom-select-wrap.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--pdrx-white);
    border: 1px solid var(--pdrx-border);
    border-radius: var(--pdrx-radius-sm);
    box-shadow: var(--pdrx-shadow-lg);
    z-index: 1100;
    overflow: hidden;
}

.custom-select-wrap.open .custom-select-dropdown {
    display: block;
}

.custom-select-search {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--pdrx-border);
    padding: 10px 12px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    color: var(--pdrx-text);
    outline: none;
    background: var(--pdrx-bg);
}

.custom-select-search::placeholder {
    color: #94a3b8;
}

.custom-select-list {
    list-style: none;
    margin: 0;
    padding: 4px 0;
    max-height: 200px;
    overflow-y: auto;
}

.custom-select-list li {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--pdrx-text);
}

.custom-select-list li:hover {
    background: #f1f5f9;
}

.custom-select-list li.selected {
    background: #eff6ff;
    color: var(--pdrx-primary);
    font-weight: 500;
}

.custom-select-hint {
    padding: 8px 12px;
    font-size: 12px;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid var(--pdrx-border);
}

/* Scrollbar custom dans dropdown */
.custom-select-list::-webkit-scrollbar {
    width: 5px;
}

.custom-select-list::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-rechercher {
    background: var(--pdrx-primary);
    color: white;
    border: none;
    border-radius: var(--pdrx-radius-sm);
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
}

.btn-rechercher:hover {
    background: var(--pdrx-primary-hover);
}

.btn-rechercher:active {
    transform: scale(0.98);
}

.btn-reset-filtres {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    font-size: 11px;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    padding: 0;
    line-height: 1;
}

.btn-reset-filtres:hover {
    background: #dc2626;
    transform: scale(1.1);
}

.btn-reset-filtres:active {
    transform: scale(0.95);
}

/* ============================================
   LOADER
   ============================================ */

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.loader-overlay.active {
    display: flex;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--pdrx-border);
    border-top-color: var(--pdrx-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   POPUP LEAFLET
   ============================================ */

.leaflet-popup-content-wrapper {
    border-radius: var(--pdrx-radius) !important;
    box-shadow: var(--pdrx-shadow-lg) !important;
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--pdrx-border);
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 240px;
    max-width: 300px;
}

.leaflet-popup-tip {
    box-shadow: none !important;
}

.popup-card {
    padding: 16px;
}

.popup-card .popup-entreprise {
    font-size: 15px;
    font-weight: 700;
    color: var(--pdrx-dark);
    margin-bottom: 2px;
    line-height: 1.3;
}

.popup-card .popup-job {
    font-size: 12px;
    font-weight: 500;
    color: var(--pdrx-primary);
    margin-bottom: 10px;
}

.popup-card .popup-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pdrx-text);
    margin-bottom: 5px;
}

.popup-card .popup-info i {
    color: var(--pdrx-text-light);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.popup-card .popup-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 10px;
}

.popup-card .popup-label-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 20px;
    color: #fff;
    line-height: 1.4;
}

.popup-card .popup-limited {
    margin-top: 10px;
    padding: 6px 10px;
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: var(--pdrx-radius-sm);
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    text-align: center;
}

.popup-card .popup-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
    align-items: center;
}

.popup-card .popup-actions .btn-popup {
    padding: 7px;
    border-radius: var(--pdrx-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: opacity 0.2s;
    border: none;
    cursor: pointer;
    width: 34px;
    height: 34px;
}

.popup-card .popup-actions .btn-popup.btn-profil {
    width: auto;
    padding: 7px 12px;
    font-size: 12px;
    flex: 1;
}

.popup-card .popup-actions .btn-popup:hover {
    opacity: 0.8;
}

.btn-popup.btn-sms {
    background: #dbeafe;
    color: #1e40af;
}

.btn-popup.btn-tel {
    background: #d1fae5;
    color: #065f46;
}

.btn-popup.btn-mail {
    background: #fce7f3;
    color: #9d174d;
}

.btn-popup.btn-profil {
    background: var(--pdrx-primary);
    color: #fff;
}

/* ============================================
   PROFIL PAGE
   ============================================ */

.profil-page {
    min-height: 100vh;
    background: var(--pdrx-bg);
}

.profil-navbar {
    background: var(--pdrx-white);
    border-bottom: 1px solid var(--pdrx-border);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.profil-navbar .navbar-brand {
    font-weight: 700;
    font-size: 18px;
    color: var(--pdrx-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profil-navbar .navbar-brand span {
    color: var(--pdrx-primary);
}

.profil-navbar .btn-retour {
    font-size: 13px;
    font-weight: 500;
    color: var(--pdrx-text-light);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.profil-navbar .btn-retour:hover {
    color: var(--pdrx-primary);
}

.profil-header {
    background: var(--pdrx-white);
    border-bottom: 1px solid var(--pdrx-border);
    padding: 40px 0;
}

.profil-avatar-placeholder {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--pdrx-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 36px;
    font-weight: 700;
}

.profil-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--pdrx-dark);
    margin-bottom: 4px;
}

.profil-entreprise {
    font-size: 16px;
    font-weight: 500;
    color: var(--pdrx-primary);
    margin-bottom: 6px;
}

.profil-location {
    font-size: 14px;
    color: var(--pdrx-text-light);
    display: flex;
    align-items: center;
    gap: 4px;
}

.profil-badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 8px;
}

.profil-content {
    padding: 30px 0 60px;
}

.profil-section {
    background: var(--pdrx-white);
    border-radius: var(--pdrx-radius);
    border: 1px solid var(--pdrx-border);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--pdrx-shadow);
}

.profil-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--pdrx-text-light);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pdrx-border);
}

.profil-info-row {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
}

.profil-info-row:last-child {
    border-bottom: none;
}

.profil-info-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--pdrx-text-light);
    min-width: 160px;
}

.profil-info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--pdrx-dark);
}

.profil-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.profil-label-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    color: #fff;
}

.profil-lang-badge {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    background: #eef2ff;
    color: #3730a3;
}

.profil-contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: var(--pdrx-radius-sm);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
}

.profil-contact-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.profil-contact-btn.btn-tel-lg {
    background: #d1fae5;
    color: #065f46;
}

.profil-contact-btn.btn-sms-lg {
    background: #dbeafe;
    color: #1e40af;
}

.profil-contact-btn.btn-mail-lg {
    background: #fce7f3;
    color: #9d174d;
}

.profil-contact-btn.btn-site-lg {
    background: var(--pdrx-primary);
    color: #fff;
}

#profil-map {
    height: 280px;
    border-radius: var(--pdrx-radius-sm);
    border: 1px solid var(--pdrx-border);
}

/* Popup profil map — vert premium */
.profil-map-popup {
    padding: 12px 16px;
}

.profil-map-popup .popup-entreprise {
    font-size: 14px;
    font-weight: 700;
    color: var(--pdrx-dark);
    margin-bottom: 2px;
}

.profil-map-popup .popup-city {
    font-size: 12px;
    color: var(--pdrx-text-light);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .filtres-container {
        width: 95%;
        top: 10px;
    }

    .filtres-card {
        padding: 12px 16px;
    }

    .popup-card .popup-actions .btn-popup {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .popup-card .popup-actions .btn-popup.btn-profil {
        width: auto;
    }

    .profil-name {
        font-size: 22px;
    }

    .profil-info-row {
        flex-direction: column;
        gap: 2px;
    }

    .profil-info-label {
        min-width: auto;
    }
}
