:root {
    --primary-color: #28a745;
    --primary-dark: #218838;
    --bg-white: #ffffff;
    --bg-gray: #f2f2f6;
    --text-main: #000000;
    --text-muted: #8e8e93;
    --border-color: #e5e5ea;
    --shadow: 0 -4px 16px rgba(0,0,0,0.1);
    --border-radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-gray);
}

.hidden {
    display: none !important;
}

/* Map */
#map {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Map Overlay Buttons */
.map-btn {
    position: absolute;
    background: var(--bg-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 10;
    cursor: pointer;
    color: var(--text-main);
}
.back-btn { top: 40%; left: 15px; }
.locate-btn { top: 40%; right: 15px; }

/* Center Pin for Map Picking */
.center-pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    z-index: 500;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pin-marker {
    width: 24px;
    height: 24px;
    background-color: var(--text-main);
    border: 4px solid var(--bg-white);
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    position: relative;
}
.pin-marker::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 10px;
    background-color: var(--text-main);
}
.pin-shadow {
    width: 12px;
    height: 4px;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    margin-top: 10px;
}

/* Bottom Sheet */
.bottom-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--bg-white);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    box-shadow: var(--shadow);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    max-height: 85vh;
}
.bottom-sheet.picking-mode {
    transform: translateY(calc(100% - 90px)); /* Hide mostly, show action bar */
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: #d1d1d6;
    border-radius: 2px;
    margin: 12px auto;
}

.sheet-content {
    display: none;
    flex-direction: column;
    padding: 0 20px;
    overflow-y: auto;
    padding-bottom: 90px;
}
.sheet-content.active { display: flex; }

.sheet-title {
    font-size: 1.35rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

/* Address Box */
.address-container {
    background: var(--bg-white);
    margin-bottom: 20px;
}

.address-row {
    display: flex;
    align-items: center;
    padding: 12px 0;
    cursor: pointer;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--bg-white);
}
.pickup-icon { background-color: #333333; }
.dropoff-icon { background-color: transparent; color: #333333; }

.address-input {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.address-input .value {
    font-size: 1.05rem;
    color: var(--text-main);
    font-weight: 500;
}
.address-input .value.placeholder { color: var(--text-muted); }
.address-divider { height: 1px; background: var(--bg-gray); margin-left: 55px; }

/* Vehicles Scroll */
.vehicles-scroll {
    display: flex;
    overflow-x: auto;
    gap: 12px;
    padding-bottom: 10px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.vehicles-scroll::-webkit-scrollbar { display: none; }
.vehicle-card {
    min-width: 140px;
    background: var(--bg-gray);
    border: 2px solid transparent;
    border-radius: 16px;
    padding: 12px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.vehicle-card.active { background: var(--bg-gray); border-color: var(--primary-color); }
.eta {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--bg-white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    color: var(--text-main);
}
.vehicle-icon { font-size: 32px; margin-top: 15px; margin-bottom: 5px; }
.vehicle-name { font-size: 0.95rem; font-weight: 700; color: var(--text-main); margin-bottom: 2px; }
.vehicle-price { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); }

/* Forms & Step 2/3 */
.search-header, .step-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.icon-btn {
    background: var(--bg-gray);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    cursor: pointer;
}
.search-input {
    flex-grow: 1;
    background: var(--bg-gray);
    border: none;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}
.search-results {
    list-style: none;
    margin-top: 10px;
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.popular-header {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    padding: 8px 4px 6px;
    margin-top: 4px;
}
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 6px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
}
.search-item:active {
    background: #f8fafc;
}
.search-item-icon {
    font-size: 1.15rem;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 50%;
    flex-shrink: 0;
}
.search-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.search-item-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
}
.search-item-desc {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 1px;
}
.search-item-zone {
    flex-shrink: 0;
}
.search-results li {
    padding: 14px 6px;
    border-bottom: 1px solid var(--bg-gray);
    font-size: 0.95rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Client Map Custom Markers */
.client-map-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: translateY(-6px);
    pointer-events: auto;
}
.client-map-marker .marker-symbol {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 800;
    color: white;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    background: #16a34a;
}
.client-map-marker.marker-pickup .marker-symbol {
    background: #15803d;
}
.client-map-marker.marker-dropoff .marker-symbol {
    background: #0f172a;
}
.client-map-marker.marker-parcel .marker-symbol {
    background: #2563eb;
    color: #ffffff;
    font-size: 14px;
}
.client-map-marker .marker-caption {
    background: rgba(15, 23, 42, 0.88);
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 6px;
    margin-top: 3px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.driver-icon {
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.use-my-phone {
    float: right;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.form-control {
    width: 100%;
    background: var(--bg-gray);
    border: 1px solid var(--border-color);
    padding: 14px 15px;
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
}
.mt-20 { margin-top: 20px; }

/* Action Bar */
.action-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 15px 20px;
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: env(safe-area-inset-bottom, 15px);
}
.payment-method { display: flex; align-items: center; }
.cash-icon { background: var(--primary-color); color: white; width: 40px; height: 40px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.btn-primary {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    flex-grow: 1;
    margin: 0 15px;
    text-align: center;
}
.btn-primary.full-width { margin: 0; width: 100%; }
.btn-primary:active { background: var(--primary-dark); }
.options-icon { color: var(--text-main); display: flex; align-items: center; justify-content: center; cursor: pointer; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}
.modal-content {
    background: var(--bg-white);
    padding: 30px 20px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    position: relative;
    z-index: 2001;
    text-align: center;
}
.modal-content h3 { margin-bottom: 10px; }
.modal-content p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 20px; }

/* Steps 4, 5, 6 */
.text-center { text-align: center; }
.mt-10 { margin-top: 10px; }
.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 14px 20px;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
}
.pulse-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}
.pulse-bubble {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 20px rgba(40, 167, 69, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

.driver-card {
    display: flex;
    align-items: center;
    background: var(--bg-gray);
    padding: 15px;
    border-radius: 16px;
}
.driver-avatar {
    width: 50px;
    height: 50px;
    background: #d1d1d6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 15px;
}
.driver-info {
    flex-grow: 1;
}
.driver-info h4 { margin-bottom: 4px; }
.driver-info p { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 4px; }
.driver-rating { font-size: 0.8rem; font-weight: 700; color: #ffc107; }

.call-btn {
    background: var(--primary-color);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.4);
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.stars span {
    font-size: 40px;
    color: #d1d1d6;
    cursor: pointer;
    transition: color 0.2s;
}
.stars span.active {
    color: #ffc107;
}


/* ============================================================
   PWA Installation Banner & Controls
   ============================================================ */
.pwa-banner {
    position: fixed;
    top: 14px;
    left: 14px;
    right: 14px;
    max-width: 440px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 12px 14px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.06);
    z-index: 99999;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    animation: pwaSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

@keyframes pwaSlideDown {
    from {
        opacity: 0;
        transform: translateY(-25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pwa-banner.hidden {
    display: none !important;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.pwa-banner-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    flex-shrink: 0;
    object-fit: cover;
}

.pwa-banner-text {
    flex: 1;
    min-width: 0;
}

.pwa-banner-title {
    margin: 0;
    font-size: 13.5px;
    font-weight: 800;
    color: #111;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.pwa-banner-desc {
    margin: 2px 0 0 0;
    font-size: 11px;
    color: #555;
    line-height: 1.3;
}

.pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.pwa-btn-install {
    background: #28a745;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.35);
    transition: all 0.2s ease;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.pwa-btn-install:hover, .pwa-btn-install:active {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(40, 167, 69, 0.45);
}

.pwa-btn-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 18px;
    line-height: 1;
    padding: 6px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pwa-btn-close:hover {
    color: #111;
    background: rgba(0, 0, 0, 0.05);
}

/* Mini Install Pill Button */
.pwa-mini-btn {
    position: fixed;
    top: 14px;
    right: 14px;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(40, 167, 69, 0.35);
    color: #28a745;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    transition: all 0.2s ease;
    animation: pwaSlideDown 0.3s ease-out;
}

.pwa-mini-btn.hidden {
    display: none !important;
}

.pwa-mini-btn:hover {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

/* Contact Picker inside Phone Input */
.phone-input-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}
.phone-input-wrap .form-control {
    padding-right: 46px;
    width: 100%;
}
.btn-contact-picker {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #888;
    padding: 0;
    transition: color 0.2s, background 0.2s, transform 0.1s;
}
.btn-contact-picker:active {
    background: rgba(0, 0, 0, 0.06);
    color: var(--primary-color);
    transform: translateY(-50%) scale(0.92);
}

/* Client Multi-Course Navigation Bubbles */
.client-course-bubbles {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px 4px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.client-course-bubbles::-webkit-scrollbar {
    display: none;
}
.course-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #f1f2f6;
    color: #444;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid #e1e4e8;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.course-bubble:active {
    transform: scale(0.96);
}
.course-bubble.active {
    background: #28a745;
    color: #ffffff;
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.35);
}
.course-bubble-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffa500;
}
.course-bubble.active .course-bubble-dot {
    background: #ffffff;
}
.course-bubble-dot.status-accepted,
.course-bubble-dot.status-picked_up {
    background: #00d2d3;
}
.btn-new-course-bubble {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 12px;
    background: #ffffff;
    color: #28a745;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px dashed #28a745;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.btn-new-course-bubble:active {
    transform: scale(0.96);
    background: #e8f5e9;
}
.active-courses-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    color: #1b5e20;
    padding: 10px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.active-courses-banner:active {
    background: #c8e6c9;
}
.banner-link {
    font-weight: 700;
    color: #28a745;
    text-decoration: underline;
}
.retrieve-orders-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 0.82rem;
    text-decoration: underline;
    cursor: pointer;
    margin-top: 15px;
    display: block;
    width: 100%;
    text-align: center;
}


/* ========================================================
   SYSTÈME DE BOÎTE DE DIALOGUE MODALE ÉLÉGANTE (AndadoDialog)
   ======================================================== */
.andado-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.22s ease-out;
}
.andado-dialog-overlay.active {
    opacity: 1;
}
.andado-dialog-box {
    background: #ffffff;
    width: 100%;
    max-width: 380px;
    border-radius: 22px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22), 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 26px 22px 22px;
    text-align: center;
    transform: scale(0.9) translateY(12px);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    border: 1px solid rgba(0,0,0,0.06);
}
.andado-dialog-overlay.active .andado-dialog-box {
    transform: scale(1) translateY(0);
}
.andado-dialog-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}
.andado-dialog-icon.icon-info {
    background: #e8f5e9;
    color: #28a745;
}
.andado-dialog-icon.icon-success {
    background: #e8f5e9;
    color: #2e7d32;
}
.andado-dialog-icon.icon-warning {
    background: #fff8e1;
    color: #f57f17;
}
.andado-dialog-icon.icon-error {
    background: #ffebee;
    color: #d32f2f;
}
.andado-dialog-icon.icon-confirm {
    background: #e0f2fe;
    color: #0284c7;
}
.andado-dialog-icon.icon-groupage {
    background: #f0fdf4;
    color: #15803d;
}
.andado-dialog-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.andado-dialog-message {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
    white-space: pre-line;
}
.andado-dialog-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid #dcdce0;
    border-radius: 12px;
    font-size: 1rem;
    margin-bottom: 18px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    box-sizing: border-box;
}
.andado-dialog-input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
}
.andado-dialog-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.andado-dialog-btn {
    flex: 1;
    padding: 13px 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s;
    border: none;
    text-align: center;
}
.andado-dialog-btn-primary {
    background: #28a745;
    color: #ffffff;
}
.andado-dialog-btn-primary:active {
    background: #218838;
    transform: scale(0.98);
}
.andado-dialog-btn-danger {
    background: #dc3545;
    color: #ffffff;
}
.andado-dialog-btn-danger:active {
    background: #c82333;
    transform: scale(0.98);
}
.andado-dialog-btn-secondary {
    background: #f1f3f5;
    color: #495057;
}
.andado-dialog-btn-secondary:active {
    background: #e9ecef;
}

/* ========================================================
   OFFRE GROUPAGE / COLIS GROUPÉS (STYLES)
   ======================================================== */
.btn-groupage-action {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 2px solid #28a745;
    color: #166534;
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.92rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}
.btn-groupage-action:active {
    transform: scale(0.97);
    background: #dcfce7;
}
.groupage-pill {
    background: #28a745;
    color: white;
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 8px;
    font-weight: 800;
}

/* Modale de présentation tarifaire Groupage (Ultra-compacte, sans scroll) */
.groupage-info-modal-card {
    background: white;
    width: 92%;
    max-width: 420px;
    border-radius: 24px;
    padding: 26px 20px 22px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    border: 1px solid rgba(0,0,0,0.06);
    max-height: 90vh;
    overflow-y: auto;
    text-align: center;
}
.groupage-info-modal-card.compact-groupage-modal {
    width: 90%;
    max-width: 380px;
    padding: 18px 16px 14px;
    border-radius: 20px;
    text-align: left;
    max-height: none;
    overflow-y: visible;
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
}
.groupage-compact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.groupage-icon-circle {
    font-size: 1.5rem;
    background: #ecfdf5;
    border-radius: 12px;
    padding: 6px 9px;
    display: inline-block;
    line-height: 1;
}
.groupage-compact-pricing {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}
.groupage-pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
}
.groupage-pricing-row.highlight-row {
    background: #f0fdf4;
    border-color: #22c55e;
}
.row-left {
    display: flex;
    flex-direction: column;
}
.row-tag {
    font-size: 0.86rem;
    font-weight: 800;
    color: #15803d;
}
.row-tag.tag-secondary {
    color: #334155;
}
.row-desc {
    font-size: 0.70rem;
    color: #64748b;
}
.row-price {
    font-size: 1.15rem;
    font-weight: 900;
    color: #0f172a;
}
.row-price small {
    font-size: 0.70rem;
    color: #64748b;
    font-weight: 600;
}
.groupage-zone-pill-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.73rem;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 12px;
    border: 1px dashed #cbd5e1;
}
.groupage-zone-pill-box .note-highlight {
    color: #15803d;
    font-weight: 700;
}
.groupage-compact-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
}
.btn-link-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 0.80rem;
    padding: 6px;
    cursor: pointer;
    font-weight: 600;
}
.groupage-badge-hero {
    display: inline-block;
    background: #dcfce7;
    color: #15803d;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.groupage-tariff-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 18px 0;
}
.tariff-tier-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s;
}
.tariff-tier-card.highlight {
    border-color: #22c55e;
    background: #f0fdf4;
}
.tier-qty {
    font-weight: 800;
    font-size: 1rem;
    color: #1e293b;
    text-align: left;
}
.tier-tagline {
    font-size: 0.78rem;
    color: #64748b;
    margin-top: 2px;
}
.tier-price {
    font-size: 1.2rem;
    font-weight: 900;
    color: #15803d;
    text-align: right;
}
.tier-price small {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}
.groupage-advantages {
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px 14px;
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.85rem;
    color: #334155;
    line-height: 1.6;
}
.groupage-advantages div {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}
.groupage-advantages div:last-child {
    margin-bottom: 0;
}

/* Formulaire simplifie Step Groupage */
.package-stepper-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 8px 14px;
    margin-top: 8px;
}
.stepper-btn {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: none;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    font-size: 1.4rem;
    font-weight: 700;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.stepper-btn:active {
    transform: scale(0.92);
    background: #f1f5f9;
}
.stepper-input {
    width: 80px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 900;
    border: none;
    background: transparent;
    color: #15803d;
    outline: none;
}
.groupage-price-box {
    background: #f0fdf4;
    border: 1.5px solid #86efac;
    border-radius: 16px;
    padding: 16px;
    margin: 18px 0;
    text-align: center;
}
.groupage-price-val {
    font-size: 1.7rem;
    font-weight: 900;
    color: #15803d;
}
.groupage-price-detail {
    font-size: 0.85rem;
    color: #166534;
    margin-top: 4px;
    font-weight: 600;
}
.groupage-tier-badge {
    display: inline-block;
    margin-top: 8px;
    background: #22c55e;
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Styles additionnels sélecteur véhicule Groupage */
.groupage-vehicle-selector {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
.groupage-vehicle-card {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    text-align: left;
}
.groupage-vehicle-card.active {
    border-color: #28a745;
    background: #f0fdf4;
    box-shadow: 0 2px 8px rgba(40,167,69,0.15);
}
.g-veh-icon {
    font-size: 1.5rem;
}
.g-veh-name {
    font-weight: 800;
    font-size: 0.88rem;
    color: #1e293b;
}
.g-veh-sub {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 2px;
}
.tariff-vehicle-header {
    text-align: left;
    font-size: 0.8rem;
    font-weight: 800;
    color: #1e293b;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

/* Groupage Parcel Builder */
.groupage-parcels-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 14px 0;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}
.groupage-parcel-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    position: relative;
}
.groupage-parcel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 6px;
    flex-wrap: wrap;
}
.groupage-parcel-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 6px;
}
.parcel-zone-badge {
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.parcel-zone-badge.zone-same {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.parcel-zone-badge.zone-close {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fcd34d;
}
.parcel-zone-badge.zone-gap {
    background: #ffedd5;
    color: #c2410c;
    border: 1px solid #fdba74;
}
.parcel-zone-badge.zone-multi {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}
.parcel-zone-badge.zone-grand {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #86efac;
}
.parcel-zone-badge.zone-pending {
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.parcel-zone-badge.zone-out {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.btn-remove-parcel {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    margin-left: auto;
}
.btn-remove-parcel:hover {
    background: #fee2e2;
}
.btn-add-parcel {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: 1.5px dashed #28a745;
    background: #f0fdf4;
    color: #15803d;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 6px;
}
.btn-add-parcel:active {
    transform: scale(0.98);
    background: #dcfce7;
}
.parcel-grid-inputs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.parcel-address-wrap {
    position: relative;
    width: 100%;
}
.parcel-address-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.parcel-addr-input {
    flex: 1;
}
.btn-parcel-map {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}
.btn-parcel-map:active {
    background: #e2e8f0;
    transform: scale(0.95);
}
.parcel-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    max-height: 210px;
    overflow-y: auto;
    z-index: 1000;
}
.parcel-suggestion-item {
    padding: 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    font-size: 0.85rem;
    color: #1e293b;
    transition: background 0.12s;
}
.parcel-suggestion-item:last-child {
    border-bottom: none;
}
.parcel-suggestion-item:hover, .parcel-suggestion-item:active {
    background: #f1f5f9;
}
.parcel-sug-left {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.parcel-warning-box {
    background: #fef2f2;
    border: 1.5px solid #f87171;
    color: #991b1b;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.35;
}
