/* ============================================================
   GET7.FR — Design System "Light & Clean"
   Mobile-first | Fond blanc | Boutons noirs | Épuré
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800;900&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
    /* Couleur principale (noir) */
    --rouge:        #111111;
    --rouge-dark:   #000000;
    --rouge-shadow: #000000;
    --rouge-light:  #f0f0f0;

    /* Fond clair */
    --bg-body:      #f4f6f9;
    --bg-card:      #ffffff;
    --bg-card-alt:  #f9fafb;
    --bg-input:     #f3f4f6;
    --bg-elevated:  #ffffff;

    /* Texte sombre */
    --text-primary:   #111827;
    --text-secondary: #6b7280;
    --text-muted:     #9ca3af;

    /* Bordures claires */
    --border:        #e5e7eb;
    --border-strong: #d1d5db;
    --gris-fonce:    #e5e7eb;
    --gris-medium:   #9ca3af;
    --gris-clair:    #d1d5db;

    --blanc: #ffffff;
    --bleu-clair: #3b82f6;

    /* Rayons */
    --rayon:      14px;
    --rayon-lg:   18px;
    --rayon-pill: 50px;
    --rayon-xl:   22px;

    /* Ombres légères */
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
    --shadow-rouge: 0 4px 0 var(--rouge-shadow);
    --shadow-card:  0 2px 12px rgba(0,0,0,0.07), 0 0 0 1px var(--border);
    --shadow-pop:   0 8px 32px rgba(0,0,0,0.14);

    --transition: 0.15s ease;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Onest', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Layout ────────────────────────────────────────────────── */
.app-wrapper {
    max-width: 480px;
    margin: 0 auto;
    height: 100vh; /* fallback */
    height: 100dvh;
    /* Pilotée en JS via visualViewport : rétrécit quand le clavier mobile s'ouvre,
       pour que le footer (boutons Continuer/Retour) reste au-dessus du clavier. */
    height: var(--app-height, 100dvh);
    display: flex;
    flex-direction: column;
    padding: 0 0 env(safe-area-inset-bottom);
    background: var(--bg-body);
    overflow: hidden;
}

.app-header {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #111111;
    border-bottom: none;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.app-logo { height: 64px; width: auto; }

@media (min-width: 600px) {
    .app-header { justify-content: space-between; padding: 16px 20px; }
    .app-logo { height: 72px; }
}

/* ── Bouton d'installation PWA (navbar) ────────────────────── */
.install-btn {
    display: none;                 /* affiché via .is-visible (JS) */
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    color: #111111;
    background: #ffffff;
    border: none;
    border-radius: var(--rayon-pill);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.35);
    transition: transform var(--transition), background var(--transition);
    -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.install-btn.is-visible { display: inline-flex; }
.install-btn:hover { background: #f0f0f0; }
.install-btn:active { transform: scale(0.95); }
.install-btn svg { width: 16px; height: 16px; }

@media (max-width: 380px) {
    .install-btn span { display: none; }   /* icône seule sur petits écrans */
    .install-btn { padding: 8px; }
}

/* ── Modale d'instructions d'installation ──────────────────── */
.pwa-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0,0,0,0.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.pwa-modal-overlay.is-open { display: flex; }

.pwa-modal {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border-radius: var(--rayon-xl);
    padding: 28px 24px 24px;
    box-shadow: var(--shadow-pop);
    text-align: center;
    animation: pwaPop 0.22s ease;
}
@keyframes pwaPop {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.pwa-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-input);
    border-radius: 50%;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
}
.pwa-modal-icon img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}
.pwa-modal h3 { margin-top: 16px; font-size: 1.25rem; font-weight: 800; }
.pwa-modal-sub {
    margin-top: 6px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.45;
}
.pwa-steps {
    margin: 20px 0 0;
    padding-left: 0;
    list-style: none;
    counter-reset: pwa;
    text-align: left;
}
.pwa-steps li {
    counter-increment: pwa;
    position: relative;
    padding: 10px 0 10px 40px;
    font-size: 0.92rem;
    line-height: 1.4;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
}
.pwa-steps li:last-child { border-bottom: none; }
.pwa-steps li::before {
    content: counter(pwa);
    position: absolute;
    left: 0;
    top: 8px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111111;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
}
.pwa-ico {
    display: inline-block;
    font-size: 1.05rem;
    vertical-align: middle;
}

.app-content {
    flex: 1;
    min-height: 0;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

/* ── Typographie ───────────────────────────────────────────── */
h1 { font-size: 1.9rem;  font-weight: 900; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem;  font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; }

.text-muted   { color: var(--text-secondary); font-size: 0.9rem; }
.text-rouge   { color: var(--rouge); }
.text-vert    { color: var(--rouge); }
.text-center  { text-align: center; }
.text-small   { font-size: 0.82rem; }

/* ── Boutons principaux ────────────────────────────────────── */
.btn {
    display: block;
    width: 100%;
    padding: 17px 24px;
    border: none;
    border-radius: var(--rayon-pill);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), opacity var(--transition);
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    position: relative;
}

.btn:active { transform: translateY(3px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* Rouge — action principale */
.btn-rouge {
    background: var(--rouge);
    color: #ffffff;
    box-shadow: var(--shadow-rouge);
}
.btn-rouge:active  { box-shadow: 0 1px 0 var(--rouge-shadow); }
.btn-rouge:disabled { box-shadow: none; }

/* Vert = rouge (même couleur, alias) */
.btn-vert {
    background: var(--rouge);
    color: #ffffff;
    box-shadow: var(--shadow-rouge);
}
.btn-vert:active  { box-shadow: 0 1px 0 var(--rouge-shadow); }

/* Ghost — action secondaire */
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 2px solid var(--border-strong);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-card-alt); }

.btn-sm { padding: 11px 20px; font-size: 0.88rem; }
.btn-inline { display: inline-block; width: auto; }

/* ── Boutons de choix (type de transport) ──────────────────── */
.choix-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0 24px;
}

.btn-choix {
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon-lg);
    padding: 20px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    box-shadow: var(--shadow-card);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.btn-choix .choix-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: var(--rouge-light);
    border-radius: var(--rayon);
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-choix .choix-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--rouge);
    fill: none;
}

.btn-choix .choix-text { flex: 1; }

.btn-choix .choix-text strong {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.btn-choix .choix-text small {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 3px;
}

.btn-choix .choix-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rouge);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
    box-shadow: 0 2px 0 var(--rouge-shadow);
}

.btn-choix:active {
    transform: translateY(2px);
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.btn-choix.actif {
    border-color: var(--rouge);
    box-shadow: 0 0 0 3px rgba(229,57,53,0.15);
    background: var(--rouge-light);
}

/* ── Cartes ────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--rayon-lg);
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

.card-alt { background: var(--bg-card-alt); }

/* ── Formulaires ───────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }

label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 7px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
input[type="number"],
select,
textarea {
    width: 100%;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon);
    padding: 15px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--rouge);
    background: var(--bg-card);
    box-shadow: 0 0 0 3px rgba(229,57,53,0.12);
}

input::placeholder { color: var(--text-muted); font-weight: 500; }

/* ── Input adresse avec icône ──────────────────────────────── */
.input-address-wrap { position: relative; }

.input-address-wrap .input-addr-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 1;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-address-wrap .input-addr-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--rouge);
}

.input-address-wrap input {
    padding-left: 44px;
    padding-right: 44px;
}

.input-address-wrap .input-addr-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    pointer-events: none;
    display: none;
    font-weight: 700;
}

.input-address-wrap.loading .input-addr-status { display: block; color: var(--text-muted); }
.input-address-wrap.valid   .input-addr-status { display: block; color: var(--rouge); }

.input-hint {
    margin-top: 7px;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

select option { background: var(--bg-card); color: var(--text-primary); }

/* ── Civilité ──────────────────────────────────────────────── */
.civilite-group {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}

.civilite-group label {
    flex: 1;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon);
    padding: 14px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition), color var(--transition);
    text-transform: none;
    letter-spacing: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    user-select: none;
}

.civilite-group label:active { transform: translateY(1px); }
.civilite-group input[type="radio"] { display: none; }
.civilite-group label.active {
    border-color: var(--rouge);
    color: var(--rouge);
    background: var(--rouge-light);
    font-weight: 800;
}

/* ── Tunnel ────────────────────────────────────────────────── */
.tunnel-etape {
    display: none;
    animation: slideInUp 0.22s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.tunnel-etape.actif { display: flex; flex-direction: column; flex: 1; min-height: 0; }

@keyframes slideInUp {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.tunnel-question {
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.tunnel-sous-titre {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
    margin-top: -12px;
    font-weight: 500;
}

.tunnel-footer {
    margin-top: auto;
    padding-top: 20px;
}

/* ── Barre de progression : cercles numérotés ──────────────── */
.progress-steps {
    display: flex;
    align-items: center;
    padding: 14px 20px 0;
    visibility: visible;
    flex-shrink: 0;
}

.ps-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.25s, transform 0.25s, box-shadow 0.25s;
}

.ps-step span {
    font-size: 0.73rem;
    font-weight: 800;
    color: var(--text-muted);
    line-height: 1;
}

.ps-step.done {
    background: rgba(229,57,53,0.14);
}
.ps-step.done span { color: #e53935; }

.ps-step.active {
    background: #e53935;
    transform: scale(1.12);
    box-shadow: 0 2px 10px rgba(229,57,53,0.4);
}
.ps-step.active span { color: #fff; }

.ps-line {
    flex: 1;
    height: 2px;
    background: var(--border);
    transition: background 0.25s;
}
.ps-line.done { background: #e53935; opacity: 0.35; }

/* ── Titre de l'étape (au-dessus des dots) ─────────────────── */
.step-title-bar {
    padding: 14px 20px 0;
    text-align: center;
    visibility: visible;
    flex-shrink: 0;
}
.step-title-text {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

/* ── Sous-titre d'étape ────────────────────────────────────── */
.etape-sous-titre {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 20px;
}

/* ── Blocs de choix (étape 1) ──────────────────────────────── */
.type-blocs {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
    min-height: 0;
}

.type-bloc {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform var(--transition), box-shadow var(--transition);
    box-shadow: 0 2px 12px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
    -webkit-tap-highlight-color: transparent;
    min-height: 120px;
}
.type-bloc:active { transform: scale(0.98); }

.type-bloc--classique { background: #fffdf0; }
.type-bloc--medicale  { background: #f0f7ff; }

/* Icône dans un carré coloré */
.type-bloc-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.type-bloc-icon--classique { background: #F5C842; }
.type-bloc-icon--classique .type-bloc-emoji { filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15)); }
.type-bloc-icon--medicale  { background: #3A9FD8; }

.type-bloc-emoji {
    font-size: 2.8rem;
    line-height: 1;
}

.type-bloc-texte { flex: 1; }

.type-bloc-texte strong {
    display: block;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.type-bloc-texte small {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-top: 4px;
    line-height: 1.4;
}

.type-bloc-arrow {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rouge);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 3px 0 var(--rouge-shadow);
}


/* ── Modal bottom-sheet (bon de transport) ─────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.48);
    z-index: 1000;
    display: none;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}
.modal-sheet {
    background: var(--bg-card);
    border-radius: var(--rayon-xl) var(--rayon-xl) 0 0;
    padding: 12px 24px calc(32px + env(safe-area-inset-bottom));
    width: 100%;
    max-width: 480px;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    margin: 0 auto 22px;
}
.modal-icon {
    width: 56px;
    height: 56px;
    background: var(--rouge-light);
    border-radius: var(--rayon-lg);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-icon svg { width: 28px; height: 28px; stroke: var(--rouge); fill: none; }
.modal-title {
    font-size: 1.25rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}
.modal-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 24px;
    line-height: 1.55;
    font-weight: 500;
}
.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-strong);
    box-shadow: none;
}
.btn-outline:hover { background: var(--bg-card-alt); }
@keyframes modalFadeIn {
    from { background: rgba(0,0,0,0); }
    to   { background: rgba(0,0,0,0.48); }
}
@keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

/* ── Affichage prix ────────────────────────────────────────── */
.prix-display {
    text-align: center;
    padding: 24px 16px;
    background: var(--rouge-light);
    border-radius: var(--rayon-lg);
    border: 1.5px solid rgba(229,57,53,0.15);
    margin-bottom: 20px;
}

.prix-montant {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    color: var(--rouge);
    letter-spacing: -0.04em;
}

.prix-montant.gratuit { color: var(--rouge); }

.prix-label {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 600;
}

.prix-ss-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--rouge-light);
    border: 1.5px solid var(--rouge);
    color: var(--rouge);
    border-radius: var(--rayon-pill);
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 14px;
}

/* ── Confirmation ──────────────────────────────────────────── */
.confirmation-icon {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: var(--rouge);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 6px 0 var(--rouge-shadow), 0 12px 28px rgba(229,57,53,0.25);
    animation: bounceIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes bounceIn {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

.confirmation-icon svg {
    width: 40px; height: 40px;
    fill: none; stroke: #ffffff; stroke-width: 3;
}

/* ── Detail course (recap) ─────────────────────────────────── */
.course-detail {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 13px 24px;
    border-bottom: 1px solid var(--border);
}

.course-detail:last-of-type { border-bottom: none; }

.course-detail-icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.course-detail-icon svg {
    width: 18px; height: 18px;
    stroke: var(--rouge);
    fill: none;
    opacity: 0.9;
}

.course-detail-content { flex: 1; }

.course-detail-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    font-weight: 700;
    margin-bottom: 3px;
}

.course-detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Tarif garanti (overlay chauffeur) ─────────────────────── */
.tarif-garanti {
    text-align: center;
    padding: 22px 24px;
    background: var(--rouge-light);
    border-top: 1.5px solid rgba(229,57,53,0.15);
    border-bottom: 1.5px solid rgba(229,57,53,0.15);
    margin: 14px 0;
}

.tarif-garanti-montant {
    font-size: 3.2rem;
    font-weight: 900;
    color: var(--rouge);
    line-height: 1;
    letter-spacing: -0.03em;
}

.tarif-garanti-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.alerte-footer {
    padding: 18px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
}

/* ── Dashboard chauffeur ───────────────────────────────────── */
.dashboard-header {
    background: #111111;
    padding: 14px 20px;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.statut-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 14px;
    border-radius: var(--rayon-pill);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border: 1.5px solid transparent;
}

.statut-badge::before {
    content: '';
    display: block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: currentColor;
    animation: pulseDot 1.5s ease infinite;
}

@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.7; }
}

.statut-badge.actif   { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.statut-badge.attente { color: var(--text-secondary); background: var(--bg-input); border-color: var(--border); }
.statut-badge.dispo   { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.statut-badge.indispo { color: var(--rouge); background: var(--rouge-light); border-color: rgba(229,57,53,0.25); }

/* ── Dropdown de disponibilité ─────────────────────────────── */
.statut-dropdown { position: relative; }

.statut-toggle,
button.statut-badge {
    cursor: pointer;
    font-family: inherit;
}
.statut-chevron {
    width: 13px;
    height: 13px;
    margin-left: 1px;
    transition: transform var(--transition);
}
.statut-dropdown.open .statut-chevron { transform: rotate(180deg); }

.statut-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 170px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon-lg);
    box-shadow: 0 12px 32px rgba(0,0,0,0.16);
    padding: 6px;
    z-index: 900;
    display: none;
}
.statut-dropdown.open .statut-menu { display: block; }

.statut-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    background: transparent;
    border-radius: var(--rayon-md, 10px);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
}
.statut-menu-item:hover { background: var(--bg-card-alt); }

.statut-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.statut-dot.dispo   { background: #16a34a; }
.statut-dot.indispo { background: var(--rouge); }

/* ── Icône de déconnexion ──────────────────────────────────── */
.btn-logout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon-md, 10px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    -webkit-tap-highlight-color: transparent;
}
.btn-logout-icon:hover { background: var(--rouge-light); color: var(--rouge); border-color: rgba(229,57,53,0.25); }
.btn-logout-icon:active { transform: translateY(1px); }
.btn-logout-icon svg { width: 19px; height: 19px; }

/* ── Onglets dashboard ─────────────────────────────────────── */
.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border);
    background: var(--bg-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 13px 8px;
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -2px;
    transition: color var(--transition), border-color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tab-btn.active { color: var(--rouge); border-bottom-color: var(--rouge); }

.tab-badge {
    background: var(--rouge);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    padding: 0 5px;
    line-height: 18px;
    display: none;
}
.tab-badge.visible { display: inline-block; }

.tab-content { display: none; padding: 14px; }
.tab-content.active { display: block; }

/* ── Cartes de courses (dashboard) ────────────────────────── */
.course-card {
    background: var(--bg-card);
    border-radius: var(--rayon-lg);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition);
}

.course-card:active { transform: translateY(1px); }

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

.course-type-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: var(--rayon-pill);
    background: var(--bg-input);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--border);
}

.course-type-badge.medicalise {
    background: var(--rouge-light);
    color: var(--rouge);
    border-color: rgba(229,57,53,0.25);
}

.course-tarif-badge {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--rouge);
}

.course-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.course-row:last-of-type { border-bottom: none; }
.course-row-icon { width: 20px; flex-shrink: 0; text-align: center; font-size: 1rem; }
.course-row-val  { color: var(--text-primary); font-weight: 600; }

.course-actions {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.course-actions .btn {
    flex: 1;
    padding: 12px 8px;
    font-size: 0.82rem;
}

.tel-link {
    color: var(--rouge);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

/* ── Boutons ACCEPTER / REFUSER demandes ───────────────────── */
.btn-accepter {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 8px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    background: #16a34a;
    color: #fff;
    box-shadow: 0 3px 0 #14532d;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-accepter:active { transform: translateY(2px); box-shadow: 0 1px 0 #14532d; }

.btn-refuser {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 8px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    background: #dc2626;
    color: #fff;
    box-shadow: 0 3px 0 #991b1b;
    transition: transform 0.1s, box-shadow 0.1s;
}
.btn-refuser:active { transform: translateY(2px); box-shadow: 0 1px 0 #991b1b; }

/* ── Card clickable (acceptées) ────────────────────────────── */
.course-card--clickable { cursor: pointer; }
.course-card--clickable:active { transform: scale(0.98); }

.course-card-hint {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: right;
    font-style: italic;
}

/* ── Popup détail course ───────────────────────────────────── */
.detail-sheet {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    padding: 0 0 env(safe-area-inset-bottom);
    animation: modalSlideUp 0.25s cubic-bezier(0.34, 1.2, 0.64, 1);
}
.detail-handle {
    width: 40px; height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 12px auto 0;
}
.detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}
.detail-title { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.detail-close {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-input);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}
.detail-body { padding: 8px 20px 4px; }
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.detail-row:last-child { border-bottom: none; }
.detail-icon { font-size: 1.2rem; margin-top: 1px; flex-shrink: 0; }
.detail-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 500; margin-bottom: 2px; }
.detail-value { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.detail-tarif {
    margin: 12px 0 8px;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}
.detail-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px 20px 20px;
}

/* ── Overlay alerte course ─────────────────────────────────── */
.alerte-overlay {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: var(--bg-body);
    display: flex;
    flex-direction: column;
    padding: 0 0 env(safe-area-inset-bottom);
    animation: slideUpBounce 0.35s cubic-bezier(0.34, 1.2, 0.64, 1);
    overflow-y: auto;
    max-width: 480px;
    margin: 0 auto;
}

@keyframes slideUpBounce {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.alerte-header {
    background: linear-gradient(135deg, #111111, #333333);
    padding: 28px 24px;
    text-align: center;
}

.alerte-titre {
    font-size: 1.3rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffffff;
    animation: shake 0.5s ease 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%       { transform: translateX(-5px); }
    40%       { transform: translateX(5px); }
    60%       { transform: translateX(-3px); }
    80%       { transform: translateX(3px); }
}

/* ── Flash messages ────────────────────────────────────────── */
.flash-msg {
    padding: 14px 18px;
    border-radius: var(--rayon);
    font-weight: 700;
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 14px;
    animation: slideInUp 0.2s ease;
    border: 1.5px solid transparent;
}

.flash-msg.erreur { background: var(--rouge-light); border-color: var(--rouge); color: var(--rouge); }
.flash-msg.succes { background: #f0fdf4; border-color: #16a34a; color: #15803d; }
.flash-msg.info   { background: var(--bg-card); border-color: var(--border); color: var(--text-secondary); }

/* ── Veille chauffeur ──────────────────────────────────────── */
.veille-screen {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    gap: 14px;
}

.veille-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    margin-bottom: 6px;
    animation: pulseGlow 2.5s ease infinite;
    box-shadow: var(--shadow-md);
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: var(--shadow-md); }
    50%       { box-shadow: var(--shadow-md), 0 0 0 18px rgba(229,57,53,0.06); }
}

/* ── Toast notifications ───────────────────────────────────── */
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon);
    padding: 13px 16px;
    margin-bottom: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    box-shadow: var(--shadow-pop);
    animation: toastIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: auto;
    color: var(--text-primary);
}

.toast.succes { border-color: #16a34a; color: #15803d; }
.toast.erreur { border-color: var(--rouge); color: var(--rouge); }
.toast.info   { border-color: #f59e0b; color: #d97706; }

@keyframes toastIn {
    from { transform: translateY(16px) scale(0.92); opacity: 0; }
    to   { transform: translateY(0)    scale(1);    opacity: 1; }
}

/* ── Autocomplete adresses ─────────────────────────────────── */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    border-radius: var(--rayon);
    list-style: none;
    z-index: 500;
    overflow: hidden;
    box-shadow: var(--shadow-pop);
}

.autocomplete-list li {
    padding: 13px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    line-height: 1.4;
    transition: background var(--transition);
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.autocomplete-list li:last-child { border-bottom: none; }

.autocomplete-list li .ac-icon {
    flex-shrink: 0;
    margin-top: 2px;
    opacity: 0.6;
    width: 17px;
    height: 17px;
    display: flex;
    align-items: flex-start;
}
.autocomplete-list li .ac-icon svg { width: 17px; height: 17px; stroke: var(--text-secondary); }

.poi-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 4px;
    white-space: nowrap;
    margin-top: 2px;
}
.poi-badge--gare        { background: #1a4e8a; color: #fff; }
.poi-badge--hopital     { background: #111111; color: #fff; }
.poi-badge--discotheque { background: #6a0dad; color: #fff; }
.poi-badge--aeroport    { background: #1565c0; color: #fff; }
.poi-badge--lieu        { background: #455a64; color: #fff; }

.autocomplete-list li .ac-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-primary);
}

.autocomplete-list li .ac-text span {
    display: block;
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.autocomplete-list li:hover,
.autocomplete-list li.active {
    background: var(--rouge-light);
}
.autocomplete-list li:hover .ac-text strong,
.autocomplete-list li.active .ac-text strong { color: var(--rouge); }

/* ── Écran récapitulatif (étape 9) ────────────────────────── */
.recap-header {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--rouge-light);
    border: 1px solid rgba(229,57,53,0.15);
    border-radius: var(--rayon-lg);
    padding: 16px 18px;
    margin-bottom: 16px;
}

.recap-check {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rouge);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 0 var(--rouge-shadow);
}

.recap-check svg {
    width: 22px; height: 22px;
    stroke: #fff;
    fill: none;
    stroke-width: 2.5;
}

.recap-header-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.recap-header-sub {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 2px;
}

.recap-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--border);
}

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

.recap-row-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recap-row-icon svg {
    width: 18px; height: 18px;
    stroke: var(--text-muted);
    fill: none;
}

.recap-row-label {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
}

.recap-row-value {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: right;
    max-width: 55%;
    word-break: break-word;
}

.recap-row-value.accent { color: var(--rouge); }

/* ── Sélecteur nombre de passagers ────────────────────────── */
.passagers-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.passager-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid var(--border-strong);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition), transform var(--transition);
    -webkit-tap-highlight-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.passager-btn:hover { background: var(--rouge-light); border-color: var(--rouge); color: var(--rouge); }

.passager-btn.actif {
    background: var(--rouge);
    border-color: var(--rouge);
    color: #ffffff;
    box-shadow: 0 3px 0 var(--rouge-shadow);
}

.passager-btn.actif:active,
.passager-btn:active { transform: translateY(2px); }

/* ── Sélecteur de civilité ─────────────────────────────────── */
.civilite-selector {
    display: flex;
    gap: 10px;
}

.civilite-btn {
    flex: 1;
    height: 48px;
    border-radius: var(--rayon);
    border: 1.5px solid var(--border-strong);
    background: var(--bg-input);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition),
                color var(--transition), box-shadow var(--transition), transform var(--transition);
    -webkit-tap-highlight-color: transparent;
}

.civilite-btn:hover { background: var(--rouge-light); border-color: var(--rouge); color: var(--rouge); }

.civilite-btn.actif {
    background: var(--rouge);
    border-color: var(--rouge);
    color: #ffffff;
    box-shadow: 0 3px 0 var(--rouge-shadow);
}

.civilite-btn.actif:active,
.civilite-btn:active { transform: translateY(2px); }

/* ── Note sécurité ─────────────────────────────────────────── */
.securite-note {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card-alt);
    border: 1px solid var(--border);
    border-radius: var(--rayon);
    padding: 11px 14px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-top: 4px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.securite-note svg { stroke: var(--text-muted); opacity: 0.8; }

/* ── Spinner ───────────────────────────────────────────────── */
.spinner {
    width: 20px; height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.btn-ghost .spinner {
    border-color: rgba(0,0,0,0.12);
    border-top-color: var(--text-secondary);
}

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

/* ── Empty state ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 52px 24px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    display: block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-7px); }
}

.empty-state p { font-size: 0.95rem; font-weight: 600; }
.empty-state p + p { font-size: 0.8rem; margin-top: 7px; color: var(--text-muted); }

/* Statuts cartes */
.statut-attribue { color: #16a34a; font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.statut-refuse   { color: var(--rouge); font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.statut-prise    { color: var(--text-muted); font-size: 0.78rem; font-style: italic; }

/* ── Admin ─────────────────────────────────────────────────── */
.admin-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 12px;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.admin-nav::-webkit-scrollbar { display: none; }

.admin-nav a {
    flex-shrink: 0;
    padding: 9px 18px;
    border-radius: var(--rayon-pill);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1.5px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: background var(--transition), color var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-nav a.actif,
.admin-nav a:hover { background: var(--rouge); color: #fff; border-color: var(--rouge); box-shadow: 0 2px 0 var(--rouge-shadow); }

.table-wrapper { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 600px; }

thead th {
    text-align: left;
    padding: 11px 14px;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    border-bottom: 2px solid var(--border);
    background: var(--bg-card-alt);
}

tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:hover { background: var(--bg-card-alt); }
tbody td { padding: 13px 14px; color: var(--text-primary); vertical-align: middle; font-weight: 500; }

.badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: var(--rayon-pill);
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1.5px solid transparent;
}

.badge-vert   { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.badge-rouge  { background: var(--rouge-light); color: var(--rouge); border-color: rgba(229,57,53,0.25); }
.badge-gris   { background: var(--bg-input); color: var(--text-secondary); border-color: var(--border); }
.badge-orange { background: #fffbeb; color: #d97706; border-color: #fde68a; }

/* ── Lien déconnexion ──────────────────────────────────────── */
.lien-deconnexion {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    display: block;
    margin-top: 6px;
    transition: color var(--transition);
}

.lien-deconnexion:hover { color: var(--rouge); }

/* ── Utilitaires ───────────────────────────────────────────── */
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.gap-12 { gap: 12px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

.divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

/* ── Responsive desktop ────────────────────────────────────── */
@media (min-width: 600px) {
    .app-wrapper {
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        box-shadow: 0 0 40px rgba(0,0,0,0.1);
    }
}

/* ── Safe area (encoche iPhone) ────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .app-wrapper { padding-bottom: env(safe-area-inset-bottom); }
    .alerte-footer { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }

    /* Encoche/barre de statut iPhone : le header noir remplit la safe-area haute
       (status-bar-style black-translucent → le contenu passe sous l'encoche). */
    .app-header    { padding-top: env(safe-area-inset-top); }
    .dashboard-header { padding-top: calc(14px + env(safe-area-inset-top)); }
}

/* ── Thème sombre (admin + chauffeur) ──────────────────────── */
body.dark {
    --bg-body:      #111111;
    --bg-card:      #1c1c1c;
    --bg-card-alt:  #222222;
    --bg-input:     #2a2a2a;
    --bg-elevated:  #242424;

    --text-primary:   #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-muted:     #666666;

    --border:        #2e2e2e;
    --border-strong: #3a3a3a;
    --gris-fonce:    #2e2e2e;
    --gris-medium:   #555555;
    --gris-clair:    #444444;

    --shadow-sm:   0 1px 3px rgba(0,0,0,0.4);
    --shadow-md:   0 4px 16px rgba(0,0,0,0.5);
    --shadow-card: 0 2px 12px rgba(0,0,0,0.4), 0 0 0 1px var(--border);
    --shadow-pop:  0 8px 32px rgba(0,0,0,0.6);
}

body.dark thead th {
    background: #1a1a1a;
    border-bottom-color: #2e2e2e;
}

body.dark tbody tr:hover { background: #222222; }

body.dark .badge-vert   { background: #052e16; color: #4ade80; border-color: #166534; }
body.dark .badge-rouge  { background: #1f0000; color: #f87171; border-color: #7f1d1d; }
body.dark .badge-gris   { background: #1c1c1c; color: #a0a0a0; border-color: #2e2e2e; }
body.dark .badge-orange { background: #1c1200; color: #fbbf24; border-color: #78350f; }

body.dark input,
body.dark select,
body.dark textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-strong);
}

body.dark .card { box-shadow: var(--shadow-card); }

body.dark .tabs-nav {
    background: #1c1c1c;
    border-bottom-color: #2e2e2e;
}

body.dark .tab-btn { color: #a0a0a0; }
body.dark .tab-btn.active { color: #f0f0f0; border-bottom-color: #f0f0f0; }
