/* ===== HAITI MAP MODAL ===== */

.hmap-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.hmap-modal.hmap-visible {
    display: flex;
}
.hmap-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}
.hmap-container {
    position: relative;
    background: #fff;
    border-radius: 20px;
    width: 95%;
    max-width: 680px;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1;
    padding: 32px 28px 28px;
    animation: hmapSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    scrollbar-width: thin;
}
@keyframes hmapSlideIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Close btn */
.hmap-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: background 0.2s;
    line-height: 1;
}
.hmap-close:hover { background: #e2e8f0; }

/* Step indicator */
.hmap-header { margin-bottom: 20px; }
.hmap-step-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.hmap-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    transition: all 0.3s;
}
.hmap-step-dot.active {
    background: #2563eb;
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.hmap-step-dot.done {
    background: #10b981;
    color: white;
}
.hmap-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    max-width: 60px;
}
.hmap-step-line.active { background: #10b981; }

.hmap-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}
.hmap-subtitle {
    color: #64748b;
    margin: 0;
    font-size: 14px;
}

/* Geo Button */
.hmap-geo-btn-wrap { margin-bottom: 14px; }
.hmap-geo-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #2563eb;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.hmap-geo-btn:hover { background: #dbeafe; }
.hmap-geo-btn:disabled { opacity: 0.7; cursor: wait; }

/* SVG Map */
.hmap-map-wrap {
    background: #f0f9ff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}
.hmap-svg {
    width: 100%;
    height: auto;
    display: block;
}
.hmap-shape {
    fill: #dbeafe;
    stroke: white;
    stroke-width: 2;
    cursor: pointer;
    transition: fill 0.2s, transform 0.15s;
    transform-origin: center;
}
.hmap-dept-shape:hover .hmap-shape {
    fill: #93c5fd;
}
.hmap-dept-shape.active .hmap-shape {
    fill: #2563eb;
}
.hmap-dept-label {
    font-size: 9.5px;
    font-weight: 700;
    fill: #1e3a5f;
    text-anchor: middle;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
}
.hmap-dept-shape.active .hmap-dept-label { fill: white; }
.hmap-dept-sublabel {
    font-size: 8px;
    fill: #3b82f6;
    text-anchor: middle;
    pointer-events: none;
    font-family: 'Poppins', sans-serif;
}
.hmap-dept-shape.active .hmap-dept-sublabel { fill: #bfdbfe; }

/* Dept selected info */
.hmap-dept-info {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}
.hmap-dept-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 600;
}
.hmap-dept-selected svg { color: #16a34a; }

/* Dept pills */
.hmap-dept-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.hmap-dept-pill {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
}
.hmap-dept-pill:hover { background: #eff6ff; border-color: #93c5fd; color: #2563eb; }
.hmap-dept-pill.active { background: #2563eb; border-color: #2563eb; color: white; }

/* Zones Grid */
.hmap-zones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}
.hmap-zone-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.hmap-zone-card:hover { border-color: #93c5fd; background: #eff6ff; transform: translateY(-2px); }
.hmap-zone-card.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }
.hmap-zone-name { font-weight: 700; font-size: 14px; color: #1e293b; margin-bottom: 4px; }
.hmap-zone-quartiers { font-size: 11px; color: #94a3b8; line-height: 1.4; }

/* Plans Grid */
.hmap-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}
.hmap-plan-card {
    position: relative;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.hmap-plan-card:hover { border-color: #93c5fd; transform: translateY(-3px); box-shadow: 0 8px 20px rgba(37,99,235,0.1); }
.hmap-plan-card.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.hmap-plan-card.popular { border-color: #f59e0b; background: #fffbeb; }
.hmap-plan-card.popular:hover { border-color: #d97706; }
.hmap-plan-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: #f59e0b;
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.hmap-plan-name { font-weight: 700; font-size: 15px; color: #1e293b; margin-bottom: 8px; margin-top: 6px; }
.hmap-plan-price { font-size: 20px; font-weight: 800; color: #2563eb; margin-bottom: 4px; }
.hmap-plan-desc { font-size: 11px; color: #94a3b8; margin-bottom: 8px; }
.hmap-plan-duration {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 11px;
    color: #64748b;
}

/* Payment */
.hmap-payment-summary { margin-bottom: 20px; }
.hmap-summary-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}
.hmap-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    color: #475569;
}
.hmap-summary-row strong { color: #1e293b; }
.hmap-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: #eff6ff;
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.hmap-summary-total strong { color: #2563eb; font-size: 20px; }

.hmap-payment-methods { margin-bottom: 20px; }
.hmap-payment-methods h3 { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0 0 12px; }
.hmap-payment-options { display: flex; gap: 12px; }
.hmap-pay-btn {
    flex: 1;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 64px;
    font-weight: 700;
    font-size: 16px;
}
.hmap-pay-btn:hover { border-color: #93c5fd; background: #eff6ff; }
.hmap-pay-btn.selected { border-color: #2563eb; background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,0.15); }
.hmap-pay-btn img { max-height: 36px; max-width: 100%; object-fit: contain; }

.hmap-contact { margin-bottom: 20px; }
.hmap-contact label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; margin-top: 12px; }
.hmap-contact input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
.hmap-contact input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }

/* Buttons */
.hmap-btn-next {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}
.hmap-btn-next:hover:not(:disabled) { background: #1d4ed8; transform: translateY(-1px); }
.hmap-btn-next:disabled { background: #cbd5e1; cursor: not-allowed; transform: none; }

.hmap-btn-confirm {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    font-family: 'Poppins', sans-serif;
}
.hmap-btn-confirm:hover:not(:disabled) { background: #1d4ed8; }
.hmap-btn-confirm:disabled { background: #cbd5e1; cursor: wait; }

.hmap-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
}
.hmap-back-btn:hover { color: #2563eb; }

/* Spinner */
@keyframes hmapSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.hmap-spin { animation: hmapSpin 0.8s linear infinite; }

/* ===== PLANS PAGE - Zone/Map Filter ===== */
.plans-map-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 32px;
}
.plans-map-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}
.plans-map-header h3 { font-size: 18px; font-weight: 700; color: #0f172a; margin: 0; }

.plans-map-mini { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.plans-map-mini-svg { flex: 0 0 auto; width: 260px; }

.dept-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    align-content: flex-start;
}
.dept-filter-pill {
    background: white;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
}
.dept-filter-pill:hover { border-color: #93c5fd; color: #2563eb; background: #eff6ff; }
.dept-filter-pill.active { background: #2563eb; border-color: #2563eb; color: white; }

.plans-dept-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    flex-wrap: wrap;
}
.plans-dept-badge {
    background: #2563eb;
    color: white;
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 14px;
    font-weight: 700;
}
.plans-dept-subtitle { color: #64748b; font-size: 14px; }

/* Responsive */
@media (max-width: 640px) {
    .hmap-container { padding: 24px 16px 20px; border-radius: 16px 16px 0 0; align-self: flex-end; max-height: 92vh; }
    .hmap-modal { align-items: flex-end; }
    .hmap-plans-grid { grid-template-columns: repeat(2, 1fr); }
    .hmap-zones-grid { grid-template-columns: repeat(2, 1fr); }
    .plans-map-mini-svg { width: 100%; }
}