:root {
    --bg-dark: #0f172a;
    --bg-panel: #1e293b;
    --bg-card: #283548;
    --bg-card-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --border: #334155;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

/* =========================================================
   SIGNATURE DÉVELOPPEURS EN BAS DE TOUTES LES PAGES
   ========================================================= */
.dev-credit-footer {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-align: center;
    padding: 8px 12px;
    border-top: 1px solid rgba(51, 65, 85, 0.6);
    background: rgba(15, 23, 42, 0.7);
    line-height: 1.35;
    flex-shrink: 0;
}

.dev-credit-footer a {
    color: #93c5fd;
    text-decoration: none;
    font-weight: 600;
}

.dev-credit-footer a:hover {
    text-decoration: underline;
}

/* =========================================================
   PAGE DE GARDE (CHOIX CHAUFFEUR / ENTREPRISE)
   ========================================================= */
.landing-screen {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #1e293b 0%, #0f172a 100%);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.landing-container {
    max-width: 820px;
    width: 100%;
    text-align: center;
    margin: auto;
}

.landing-header {
    margin-bottom: 28px;
}

.landing-logo {
    font-size: 3.4rem;
    margin-bottom: 6px;
}

.landing-header h1 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.landing-header p {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.5;
}

.role-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.role-card {
    background: var(--bg-panel);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 24px 20px;
    cursor: pointer;
    transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.role-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
}

.role-chauffeur:hover {
    border-color: var(--primary);
}

.role-entreprise:hover {
    border-color: var(--success);
}

.role-icon {
    font-size: 2.8rem;
    background: var(--bg-dark);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.role-card h2 {
    font-size: 1.3rem;
}

.role-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.45;
    flex: 1;
}

.role-cta {
    width: 100%;
    justify-content: center;
    padding: 12px;
    margin-top: 4px;
}

.role-pill {
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 99px;
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    font-weight: 700;
    text-transform: uppercase;
}

.role-pill.entreprise {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.portal-choice-block {
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-choice-block h3 {
    font-size: 0.96rem;
    color: var(--text-main);
}

.portal-choice-block p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.portal-divider {
    text-align: center;
    position: relative;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.portal-list {
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.portal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 11px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
}

.portal-item:hover {
    border-color: var(--primary);
    background: var(--bg-card-hover);
}

/* =========================================================
   BARRE SUPÉRIEURE (TITRE) & BARRE D'OUTILS DÉDIÉE
   ========================================================= */
.topbar {
    height: 54px;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    flex-shrink: 0;
    z-index: 1000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    font-size: 1.5rem;
}

.brand h1 {
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.1;
}

.brand small {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.toolbar {
    height: 48px;
    background: #152033;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    flex-shrink: 0;
    z-index: 999;
}

.toolbar-btn {
    flex: 1;
    justify-content: center;
    padding: 8px 6px !important;
    font-size: 0.84rem !important;
    white-space: nowrap;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-hover); }

.btn-secondary { background: var(--bg-card); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); }

.btn-success { background: var(--success); color: #052e16; }
.btn-danger { background: var(--danger); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text-main); background: var(--bg-card); }
.btn-small { padding: 5px 10px; font-size: 0.8rem; }

.picker-banner {
    background: var(--warning);
    color: #1e293b;
    padding: 10px 16px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1200;
}

.main-layout {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

.sidebar {
    width: 440px;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.panel-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.search-box {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}

.search-box input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 0.95rem;
}

.cards-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.ent-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.ent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}

.ent-card-title {
    font-size: 1rem;
    font-weight: 700;
}

.ent-card-city {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.ent-card-cutoff {
    font-size: 0.82rem;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.15);
    padding: 4px 8px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: inline-block;
}

.badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 99px;
    background: var(--bg-dark);
    color: var(--text-muted);
    font-weight: 600;
}

.badge-active {
    background: rgba(16, 185, 129, 0.18);
    color: #6ee7b7;
}

.badge-quai {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.detail-nav {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.detail-actions {
    display: flex;
    gap: 6px;
}

#entreprise-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-header h2 {
    font-size: 1.25rem;
    margin-bottom: 4px;
}

.detail-sub {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.gps-cta-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gps-cta-bar a,
.gps-cta-bar button {
    flex: 1;
    text-decoration: none;
    justify-content: center;
    padding: 10px;
}

.info-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
}

.info-block-danger {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
}

.info-block h3 {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.protocol-text {
    white-space: pre-line;
    line-height: 1.5;
    font-size: 0.92rem;
}

.points-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.points-actions-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.point-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-dark);
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid transparent;
}

.point-item:hover {
    border-color: var(--primary);
}

.point-item-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.point-item-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.point-item-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.verif-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-dark);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.83rem;
    color: var(--text-muted);
}

.map-container {
    flex: 1;
    height: 100%;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    background: #0b1120;
}

.custom-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.45);
    font-size: 16px;
}

.user-gps-dot {
    width: 18px;
    height: 18px;
    background: #3b82f6;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(59, 130, 246, 0.35), 0 2px 6px rgba(0,0,0,0.5);
}

/* =========================================================
   MODALES & STRUCTURE WIZARD FIXE (EN-TÊTE ET BOUTONS ÉPINGLÉS)
   ========================================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 10px;
}

.modal-card {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 100%;
    max-width: 640px;
    max-height: 94vh;
    max-height: 94dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.modal-small {
    max-width: 460px;
}

.modal-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 1.05rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px 8px;
}

/* Permet au formulaire de garder le footer ancré en bas sans jamais scroller pour l'atteindre */
.wizard-form-layout {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.modal-body {
    padding: 14px 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
    min-height: 0;
}

.form-row {
    display: flex;
    gap: 10px;
}

/* Grille 2 colonnes qui reste côte à côte même sur mobile pour éviter de scroller */
.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.82rem;
    color: #cbd5e1;
    font-weight: 600;
    line-height: 1.25;
}

.form-group input,
.form-group select,
.form-group textarea,
#portal-search-input,
#qrcode-url-input {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    color: var(--text-main);
    font-size: 0.92rem;
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
#portal-search-input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: #152033;
    flex-shrink: 0;
}

.modal-footer .btn {
    padding: 10px 16px;
    font-size: 0.92rem;
}

.address-search-wrapper {
    position: relative;
    background: rgba(59, 130, 246, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed var(--primary);
}

.ban-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--primary);
    border-radius: 8px;
    max-height: 190px;
    overflow-y: auto;
    z-index: 2500;
    box-shadow: 0 8px 20px rgba(0,0,0,0.6);
}

.ban-item {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    font-size: 0.86rem;
}

.ban-item:hover {
    background: var(--bg-card-hover);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
    margin-top: 6px;
}

.photo-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-dark);
    cursor: pointer;
}

.photo-card img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    display: block;
}

.photo-card-caption {
    font-size: 0.72rem;
    padding: 4px 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-muted);
}

.lightbox-container {
    position: relative;
    max-width: 95vw;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-container img {
    max-width: 95vw;
    max-height: 82vh;
    border-radius: 8px;
    object-fit: contain;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.lightbox-close {
    align-self: flex-end;
    margin-bottom: 8px;
}

.lightbox-caption {
    margin-top: 8px;
    font-weight: 600;
    color: #fff;
    text-align: center;
}

/* =========================================================
   BOUTONS VISUELS DE SÉLECTION DE REPÈRE GPS (ÉTAPE 3 & MODALE)
   ========================================================= */
.point-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr));
    gap: 6px;
}

.pt-type-btn {
    background: var(--bg-dark);
    border: 2px solid var(--border);
    border-radius: 8px;
    padding: 6px 4px;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    transition: all 0.15s ease;
    text-align: center;
}

.pt-type-btn:hover {
    border-color: var(--primary);
    color: var(--text-main);
}

.pt-type-btn.active {
    background: rgba(16, 185, 129, 0.22);
    border-color: var(--success);
    color: #ffffff;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.pt-type-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.user-pt-edit-card {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.user-pt-edit-top {
    display: flex;
    gap: 6px;
    align-items: center;
}

.user-pt-edit-top select {
    padding: 6px 8px;
    font-size: 0.8rem;
    font-weight: 700;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: auto;
    flex: 1;
}

.user-pt-edit-top input {
    padding: 6px 8px;
    font-size: 0.82rem;
    font-weight: 700;
    background: var(--bg-panel);
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-main);
    flex: 1.4;
}

.user-pt-edit-bottom input {
    padding: 6px 8px;
    font-size: 0.78rem;
    background: var(--bg-panel);
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 100%;
}

/* =========================================================
   BADGES VISUELS EPI, CONTRAINTES MÉTIER & PARTAGE
   ========================================================= */
.epi-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.epi-chip,
.metier-chip,
.manut-chip,
.service-chip {
    background: var(--bg-card);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.epi-chip.selected {
    background: rgba(245, 158, 11, 0.22);
    color: #fde68a;
    border-color: var(--warning);
    box-shadow: 0 0 0 1px var(--warning);
}

.metier-chip.selected {
    background: rgba(14, 165, 233, 0.22);
    color: #bae6fd;
    border-color: #38bdf8;
    box-shadow: 0 0 0 1px #38bdf8;
}

.manut-chip.selected {
    background: rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
    border-color: #a855f7;
    box-shadow: 0 0 0 1px #a855f7;
}

.service-chip.selected {
    background: rgba(16, 185, 129, 0.22);
    color: #a7f3d0;
    border-color: var(--success);
    box-shadow: 0 0 0 1px var(--success);
}

.epi-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.badge-epi {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-epi-mini {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(245, 158, 11, 0.16);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
    font-weight: 600;
}

.badge-metier {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 8px;
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
    border: 1px solid rgba(14, 165, 233, 0.4);
}

.badge-metier-mini {
    font-size: 0.72rem;
    padding: 2px 7px;
    border-radius: 99px;
    background: rgba(14, 165, 233, 0.16);
    color: #7dd3fc;
    border: 1px solid rgba(14, 165, 233, 0.3);
    font-weight: 600;
}

.share-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.share-bar .btn {
    flex: 1;
    justify-content: center;
}

/* =========================================================
   WIZARD 10 ÉTAPES & CARTES EMBARQUÉES DANS LA MODALE
   ========================================================= */
.modal-wizard {
    max-width: 700px;
}

.wizard-subtitle {
    font-size: 0.78rem;
    color: #93c5fd;
    font-weight: 600;
    margin-top: 2px;
}

.wizard-progress-bar {
    width: 100%;
    height: 5px;
    background: var(--bg-dark);
    flex-shrink: 0;
}

.wizard-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--success));
    transition: width 0.25s ease;
}

.wizard-page {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wizard-embedded-map {
    width: 100%;
    height: 230px;
    border-radius: 10px;
    border: 2px solid var(--border);
    background: #0b1120;
    z-index: 10;
}

.photo-del-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    cursor: pointer;
}

/* =========================================================
   CONSOLE DE PROGRESSION DU SCAN GPS MULTI-BASES
   ========================================================= */
.scan-progress-panel {
    margin-top: 8px;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scan-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #93c5fd;
}

.scan-progress-bar-bg {
    width: 100%;
    height: 6px;
    background: #1e293b;
    border-radius: 99px;
    overflow: hidden;
    border: 1px solid #334155;
}

.scan-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #10b981);
    border-radius: 99px;
    transition: width 0.3s ease;
}

/* =========================================================
   ERGONOMIE MOBILE PLEIN ÉCRAN & COMPACITÉ DU WIZARD
   ========================================================= */
.mobile-tabs {
    display: none;
}

@media (max-width: 900px) {
    .role-cards-grid {
        grid-template-columns: 1fr;
    }

    .landing-header h1 {
        font-size: 1.7rem;
    }

    .main-layout {
        height: calc(100dvh - 164px);
    }

    .sidebar {
        width: 100%;
        height: 100%;
        border-right: none;
        padding-bottom: 62px;
    }

    .map-container {
        display: none;
        position: fixed;
        top: 102px;
        left: 0;
        right: 0;
        bottom: 62px;
        height: auto;
        z-index: 500;
    }

    body.mobile-map-active .sidebar {
        display: none;
    }

    body.mobile-map-active .map-container {
        display: block;
    }

    .mobile-tabs {
        display: flex !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 62px;
        background: #0f172a;
        border-top: 2px solid var(--border);
        z-index: 1500;
        box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.5);
    }

    .mobile-tab {
        flex: 1;
        border: none;
        background: none;
        color: var(--text-muted);
        font-weight: 700;
        font-size: 0.95rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .mobile-tab.active {
        color: #ffffff;
        background: rgba(59, 130, 246, 0.2);
        border-top: 3px solid var(--primary);
    }

    /* Modale plein écran sur téléphone pour que tout tienne sans scroller */
    .modal-backdrop {
        padding: 0;
        align-items: stretch;
    }

    .modal-card.modal-wizard {
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
        border: none;
    }

    .modal-header {
        padding: 10px 12px;
    }

    .modal-body {
        padding: 10px 12px;
        gap: 8px;
    }

    .wizard-embedded-map {
        height: 185px;
    }

    .point-type-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
    }

    .pt-type-btn {
        padding: 5px 2px;
        font-size: 0.7rem;
    }

    .pt-type-icon {
        font-size: 1.05rem;
    }

    .epi-chip,
    .metier-chip,
    .manut-chip,
    .service-chip {
        padding: 6px 9px;
        font-size: 0.76rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 0.88rem;
    }

    .modal-footer {
        padding: 10px 12px;
    }
}