/* ==========================================
   THEME & VARIABLES
   ========================================== */
:root {
    /* Couleurs issues de l'image */
    --bg-app: #EAF4FF;       /* Bleu très pâle (fond global) */
    --bg-card: #FFFFFF;      /* Blanc pur */
    --text-primary: #1F2937; /* Gris très foncé */
    --text-secondary: #6B7280; /* Gris moyen */
    --accent-blue: #3B82F6;  /* Bleu action */
    --accent-bg-hover: #F3F4F6;

    /* Statuts */
    --status-draft-bg: #F3F4F6; --status-draft-text: #4B5563;
    --status-sent-bg: #DBEAFE; --status-sent-text: #1E40AF;
    --status-interview-bg: #F3E8FF; --status-interview-text: #7E22CE;
    --status-rejected-bg: #FEE2E2; --status-rejected-text: #991B1B;

    /* Typographie */
    --font-family: 'Inter', system-ui, sans-serif;

    /* Dimensions */
    --header-height: 140px; /* Hauteur pour header + subnav */
}

/* ==========================================
   RESET & BASE
   ========================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background-color: var(--bg-app);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

/* ==========================================
   HEADER & TOPBAR
   ========================================== */
.app-header {
    background-color: var(--bg-app); /* Se fond avec le background */
    padding: 20px 40px 0 40px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Gauche: Logo, Titre et Bienvenue */
.header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-logo-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 12px;
}

.header-titles h1 {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 4px;
    letter-spacing: -0.5px;
}

.welcome-text {
    color: #4B5563;
    font-size: 14px;
    font-weight: 500;
}

.user-name {
    text-transform: uppercase;
}

/* Centre: Switcher (Modern Tabs) */
.view-switcher {
    background: #DBEAFE; /* Bleu très clair pour le fond du switch */
    padding: 4px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
}

.switch-btn {
    border: none;
    background: transparent;
    padding: 8px 16px;
    border-radius: 8px;
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 13px;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.switch-btn.active {
    background: #FFFFFF;
    color: #111827;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.switch-btn:hover:not(.active) {
    color: #374151;
    background: rgba(255,255,255,0.5);
}

/* Droite: Actions et Profil */
.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-new-candidature {
    background: transparent; /* Subtil comme sur l'image */
    border: 1px solid #E5E7EB;
    background-color: #F3F4F6;
    color: #111827;
    padding: 10px 20px;
    border-radius: 999px; /* Pill shape */
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.btn-new-candidature:hover {
    background-color: #E5E7EB;
}

.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-name-pill {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    text-transform: uppercase;
}

.chevron-down {
    color: #9CA3AF;
}

/* Menu Utilisateur Dropdown */
.user-profile-pill {
    position: relative;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid #E5E7EB;
}

.dropdown-header {
    padding: 16px;
    background: #F9FAFB;
}

.dropdown-email {
    font-size: 13px;
    color: #6B7280;
    word-break: break-all;
}

.dropdown-divider {
    height: 1px;
    background: #E5E7EB;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background: #F3F4F6;
    color: #111827;
}

.dropdown-item span {
    font-size: 16px;
}

/* Navigation Secondaire (Dashboard) */
.dashboard-nav {
    display: flex;
    gap: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid transparent; /* Garder l'espace */
}

.dashboard-nav.hidden {
    display: none;
}

.nav-item {
    text-decoration: none;
    color: #6B7280;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 8px;
    position: relative;
    transition: color 0.2s;
    cursor: pointer;
}

.nav-item.active {
    color: #111827;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #111827;
    border-radius: 2px;
}

/* ==========================================
   MAIN CONTAINER
   ========================================== */
.main-container {
    /* On laisse de la place pour le header fixe */
    padding-top: var(--header-height);
    height: 100vh;
    width: 100vw;
}

/* Ajustement hauteur header dynamique */
body.mode-map .main-container {
    padding-top: 100px; /* Moins haut car pas de subnav */
}

.view-container {
    height: 100%;
    width: 100%;
    display: none;
}

.view-container.active {
    display: block;
}

/* ==========================================
   VUE CARTE
   ========================================== */
#map-view { position: relative; height: 100%; }
#map { 
    width: calc(100% - 40px); 
    height: calc(100% - 20px); 
    border-radius: 24px 24px 0 0; 
    margin: 0 20px; 
    overflow: hidden; 
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05); 
}

/* Ajustements pour le panneau de contrôle sur la carte */
#map-view .map-control-panel {
    bottom: 30px;
    right: 30px;
}

.leaflet-container { background: #f8f9fa; } /* Couleur de fond de chargement */

/* ==========================================
   VUE DASHBOARD
   ========================================== */
#list-view {
    overflow-y: auto;
    padding: 0 40px 60px 40px;
}

.container.dashboard-content {
    max-width: 1600px;
    margin: 0 auto;
}

/* KPIs Cards - Style "Soft" */
.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.kpi-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 120px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.kpi-label {
    font-size: 14px;
    font-weight: 600;
    color: #4B5563;
}

.kpi-value {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    margin-top: auto; /* Pousse vers le bas */
}

/* Icônes rondes colorées */
.kpi-icon-sm {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    background: #F3F4F6; /* Gris par défaut */
}

.icon-blue { background: #E0F2FE; color: #0284C7; }
.icon-purple { background: #F3E8FF; color: #9333EA; }
.icon-green { background: #DCFCE7; color: #16A34A; }


/* ==========================================
   GRID OFFRES
   ========================================== */
.jobs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 24px;
}

/* Card Offre */
.job-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    border: 1px solid transparent;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}

.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    border-color: #E5E7EB;
}

.job-card.popup-mode {
    padding: 0;
    box-shadow: none;
    border-radius: 0;
}

/* Badge Nouveau */
.badge-new {
    background: #DBEAFE;
    color: #1E40AF;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    margin-left: auto;
}

/* Badges Status (Candidatures) */
.status-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    margin-left: auto;
}

.status-draft { background: var(--status-draft-bg); color: var(--status-draft-text); }
.status-sent { background: var(--status-sent-bg); color: var(--status-sent-text); }
.status-interview { background: var(--status-interview-bg); color: var(--status-interview-text); }

.card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
    line-height: 1.4;
}

.card-company {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #4B5563;
    margin-bottom: 16px;
}

.card-meta-row {
    display: flex;
    gap: 12px;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 16px;
}

.meta-tag {
    display: flex;
    align-items: center;
    gap: 4px;
}

.card-desc {
    font-size: 14px;
    color: #4B5563;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    margin-top: auto;
}

.tech-tag {
    background: #F3F4F6;
    color: #374151;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #E5E7EB;
}

/* Footer Actions */
.card-actions {
    display: flex;
    gap: 12px;
    border-top: 1px solid #F3F4F6;
    padding-top: 16px;
}

.btn-card {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-outline {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.btn-outline:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-add {
    background: #DBEAFE;
    color: #1E40AF;
    border: none;
}

.btn-add:hover {
    background: #BFDBFE;
}

/* Section Stats (Simple) */
.stats-container {
    background: white;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    color: #6B7280;
}

.stats-placeholder-graph {
    height: 200px;
    background: #F3F4F6;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    align-items: end;
    justify-content: space-around;
    padding: 0 20px;
}

.graph-bar {
    width: 40px;
    background: #DBEAFE;
    border-radius: 8px 8px 0 0;
}

/* Chargement */
.loading {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: white; padding: 20px; border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    z-index: 3000;
    text-align: center;
}
.loading.hidden { display: none; }
.spinner { border: 3px solid #f3f3f3; border-top: 3px solid #3B82F6; border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto 10px; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ==========================================
   POPUP CARTE MODERNE
   ========================================== */
.modern-popup .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: none;
}

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

.modern-popup .leaflet-popup-tip {
    background: white;
    box-shadow: none;
}

.modern-popup .leaflet-popup-close-button {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 20px;
    color: #9CA3AF;
    background: #F3F4F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modern-popup .leaflet-popup-close-button:hover {
    background: #E5E7EB;
    color: #374151;
}

/* Carte Popup */
.map-popup-card {
    padding: 20px;
    background: white;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.popup-badge {
    background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin-bottom: 12px;
}

.popup-company {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.popup-location {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
    margin-bottom: 12px;
}

.company-icon, .location-icon, .deadline-icon {
    font-size: 14px;
}

.popup-deadline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #DC2626;
    background: #FEF2F2;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.popup-deadline strong {
    color: #991B1B;
}

.popup-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #F3F4F6;
}

.popup-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    font-family: var(--font-family);
}

.popup-btn-outline {
    background: white;
    border: 1px solid #E5E7EB;
    color: #374151;
}

.popup-btn-outline:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.popup-btn-primary {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    color: white;
    border: none;
}

.popup-btn-primary:hover {
    background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ==========================================
   CUSTOM MAP MARKERS
   ========================================== */
.pulsing-icon-container {
    background: transparent;
    border: none;
}

.pulsing-marker {
    position: relative;
    width: 20px;
    height: 20px;
}

.pulsing-marker .dot {
    width: 12px;
    height: 12px;
    background-color: #3B82F6;
    border-radius: 50%;
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.pulsing-marker .ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(59, 130, 246, 0.4);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    z-index: 1;
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ==========================================
   CARTE CANDIDATURE (NOUVEAU DESIGN)
   ========================================== */
.application-card {
    background: white;
    border-radius: 20px;
    padding: 24px;
    border: 1px solid #F3F4F6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
}

.app-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.app-card-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    max-width: 70%;
}

.status-pill {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 99px;
    border: 1px solid #E5E7EB;
    background: white;
    color: #4B5563;
}

.status-brouillon { color: #6B7280; border-color: #D1D5DB; }
.status-envoyé { color: #2563EB; border-color: #BFDBFE; background: #EFF6FF; }

.app-card-company {
    font-size: 15px;
    color: #4B5563;
    font-weight: 500;
    margin-bottom: 16px;
}

.app-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6B7280;
}

.meta-item .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.app-card-divider {
    height: 1px;
    background: #F3F4F6;
    margin-bottom: 16px;
    margin-top: auto;
}

.app-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #4B5563;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.action-btn:hover {
    background: #F9FAFB;
    color: #111827;
}

.action-btn .icon {
    font-size: 16px;
}

.action-btn.btn-favorite.active {
    color: #F59E0B;
}

/* Select Status dans la carte */
.status-select {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 99px;
    border: 1px solid #E5E7EB;
    background: white;
    color: #4B5563;
    cursor: pointer;
    outline: none;
    transition: all 0.2s;
}

.status-select:hover {
    border-color: #3B82F6;
}

.status-select.status-brouillon { color: #6B7280; }
.status-select.status-envoyé { color: #2563EB; background: #EFF6FF; border-color: #BFDBFE; }
.status-select.status-entretien { color: #7C3AED; background: #F5F3FF; border-color: #DDD6FE; }
.status-select.status-refus { color: #DC2626; background: #FEF2F2; border-color: #FECACA; }
.status-select.status-offre { color: #059669; background: #ECFDF5; border-color: #A7F3D0; }

/* Priority Badge */
.priority-badge {
    font-size: 14px;
    margin-right: 6px;
}

.title-row {
    display: flex;
    align-items: center;
    max-width: 70%;
}

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal-container {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 24px 28px;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.modal-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #F3F4F6;
    border-radius: 10px;
    font-size: 24px;
    color: #6B7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #E5E7EB;
    color: #111827;
}

.modal-body {
    padding: 28px;
    overflow-y: auto;
    flex: 1;
}

/* ==========================================
   FORMULAIRE CANDIDATURE
   ========================================== */
.form-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    font-family: var(--font-family);
    color: #111827;
    background: #FAFAFA;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3B82F6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #F3F4F6;
    margin-top: 10px;
}

.btn-primary {
    background: #3B82F6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #2563EB;
}

.btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #E5E7EB;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

/* ==========================================
   DETAILS MODAL
   ========================================== */
.details-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.details-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 12px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-item label {
    font-size: 12px;
    color: #9CA3AF;
    display: block;
    margin-bottom: 4px;
}

.detail-item p {
    font-size: 15px;
    color: #111827;
    font-weight: 500;
}

.description-text,
.notes-text {
    font-size: 14px;
    line-height: 1.6;
    color: #4B5563;
    background: #F9FAFB;
    padding: 12px;
    border-radius: 8px;
}

/* ==========================================
   BARRE DE RECHERCHE & FILTRES
   ========================================== */
.search-filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    flex: 1;
    min-width: 280px;
    position: relative;
}

.search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.search-box input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    background: white;
    transition: all 0.2s;
}

.search-box input:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    background: white;
    color: #374151;
    cursor: pointer;
    min-width: 140px;
}

.filter-select:focus {
    outline: none;
    border-color: #3B82F6;
}

/* Filtre visible uniquement sur candidatures */
.filter-applications-only {
    display: none;
}

/* Style pour filtre actif */
.filter-select:not([value=""]) {
    border-color: #3B82F6;
    background: #EFF6FF;
    color: #1D4ED8;
}

/* ==========================================
   TOAST NOTIFICATIONS
   ========================================== */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 14px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    min-width: 280px;
}

.toast.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #10B981;
}

.toast-error {
    border-left: 4px solid #EF4444;
}

.toast-info {
    border-left: 4px solid #3B82F6;
}

.toast-icon {
    font-size: 18px;
}

.toast-message {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

/* ==========================================
   PAGINATION
   ========================================== */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 24px 0;
    margin-top: 24px;
}

.pagination-info {
    font-size: 14px;
    color: #6B7280;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pagination-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-btn:hover:not(.disabled) {
    background: #F9FAFB;
    border-color: #3B82F6;
    color: #3B82F6;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pagination-num {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-num:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.pagination-num.active {
    background: linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
    border-color: transparent;
    color: white;
}

.pagination-ellipsis {
    padding: 0 8px;
    color: #9CA3AF;
    font-weight: 600;
}

@media (max-width: 640px) {
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    .pagination-num {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 20px;
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.empty-state p {
    color: #6B7280;
    margin-bottom: 24px;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: #6B7280;
    font-size: 15px;
}

/* ==========================================
   MAP CONTROL PANEL (Bottom Right - Collapsible)
   ========================================== */
.map-control-panel {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    min-width: 200px;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Panel Header (toujours visible) */
.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.panel-header:hover {
    background: #F9FAFB;
}

.panel-title {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.panel-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #F3F4F6;
    color: #6B7280;
    transition: all 0.3s ease;
}

.panel-toggle svg {
    transition: transform 0.3s ease;
}

.map-control-panel.collapsed .panel-toggle svg {
    transform: rotate(180deg);
}

.map-control-panel.collapsed .panel-header {
    border-bottom-color: transparent;
}

.map-control-panel:not(.collapsed) .panel-header {
    border-bottom-color: #E5E7EB;
}

/* Panel Content (collapsible) */
.panel-content {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 300px;
    opacity: 1;
    transition: all 0.3s ease;
}

.map-control-panel.collapsed .panel-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    overflow: hidden;
}

.map-filter-dropdown label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B7280;
    margin-bottom: 8px;
}

.map-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: white;
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.map-select:hover {
    border-color: #3B82F6;
}

.map-select:focus {
    outline: none;
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Légende inline */
.map-legend-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-top: 10px;
    border-top: 1px solid #E5E7EB;
}

/* Couleurs des points par type de contrat */
.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.cdi { background: #3B82F6; } /* Bleu */
.legend-dot.cdd { background: #10B981; } /* Vert */
.legend-dot.stage { background: #F59E0B; } /* Orange */
.legend-dot.alternance { background: #8B5CF6; } /* Violet */
.legend-dot.other { background: #6B7280; } /* Gris */

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #6B7280;
    font-weight: 500;
}

/* Compteur d'offres (toujours visible) */
.map-offers-counter {
    text-align: center;
    padding: 10px 16px;
    border-top: 1px solid #E5E7EB;
    background: #FAFAFA;
}

.map-offers-counter span {
    font-size: 11px;
    font-weight: 600;
    color: #3B82F6;
    background: #EFF6FF;
    padding: 5px 12px;
    border-radius: 20px;
}

.map-control-panel.collapsed .map-offers-counter {
    border-top-color: transparent;
}

/* ==========================================
   COLORED MAP MARKERS
   ========================================== */
.marker-icon {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    border: 2px solid white;
    transition: transform 0.2s ease;
}

.marker-icon:hover {
    transform: scale(1.3);
}

.marker-icon.cdi { background: #3B82F6; }
.marker-icon.cdd { background: #10B981; }
.marker-icon.stage { background: #F59E0B; }
.marker-icon.alternance { background: #8B5CF6; }
.marker-icon.other { background: #6B7280; }

/* Pulse animation for markers */
.marker-pulse {
    position: relative;
}

.marker-pulse::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border-radius: 50%;
    background: inherit;
    opacity: 0.3;
    animation: marker-pulse 2.5s infinite;
}

@keyframes marker-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.3;
    }
    50% {
        opacity: 0.15;
    }
    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* Popup badge couleur contrat */
.popup-contract-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 8px;
}

.popup-contract-badge.cdi { background: #DBEAFE; color: #1E40AF; }
.popup-contract-badge.cdd { background: #D1FAE5; color: #065F46; }
.popup-contract-badge.stage { background: #FEF3C7; color: #92400E; }
.popup-contract-badge.alternance { background: #EDE9FE; color: #5B21B6; }
.popup-contract-badge.other { background: #F3F4F6; color: #374151; }

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
    
    .search-filters-bar {
        flex-direction: column;
    }
    
    .filter-buttons {
        width: 100%;
    }
    
    .filter-select {
        flex: 1;
    }
    
    /* Map control panel responsive */
    .map-control-panel {
        bottom: 20px;
        right: 20px;
        left: 20px;
        min-width: auto;
    }
    
    .map-legend-inline {
        justify-content: center;
    }
}