/* Tafuta ? Styles principaux (inspir? Yango) */
:root {
    --tafuta-red: #E53935;
    --tafuta-red-dark: #C62828;
    --tafuta-bg: #F5F5F5;
    --tafuta-card: #FFFFFF;
    --tafuta-text: #212121;
    --tafuta-muted: #757575;
    --tafuta-border: #E0E0E0;
    --tafuta-salmon: #FF8A80;
    /* Goutti?res pages ? serr?es sur mobile */
    --page-gutter: 10px;
    --page-gutter-y: 8px;
    /* Encoches / barre d??tat ? env() seul est souvent 0 sur Android install? */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
}
html.tafuta-standalone {
    --safe-top: max(28px, env(safe-area-inset-top, 0px));
    --safe-bottom: max(10px, env(safe-area-inset-bottom, 0px));
    --safe-left: max(0px, env(safe-area-inset-left, 0px));
    --safe-right: max(0px, env(safe-area-inset-right, 0px));
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Outfit', 'Segoe UI', sans-serif;
    background: var(--tafuta-bg);
    color: var(--tafuta-text);
    -webkit-font-smoothing: antialiased;
}

/* Auth flow */
#auth-flow {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2000;
    background: #fff;
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    box-sizing: border-box;
}
#auth-flow.hidden { display: none; }
.auth-screen { display: none; flex-direction: column; min-height: 100%; height: 100%; }
.auth-screen.active { display: flex; }

/* Splash */
#auth-splash {
    background:
        radial-gradient(ellipse 90% 70% at 50% 18%, rgba(255,255,255,0.16), transparent 55%),
        linear-gradient(165deg, var(--tafuta-red) 0%, var(--tafuta-red-dark) 100%);
    color: #fff;
    align-items: center;
    justify-content: center;
}
.splash-content { text-align: center; padding: 24px; }
.splash-mark {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 18px;
    background: #fff;
    color: var(--tafuta-red);
    font-size: 2.4rem;
    font-weight: 900;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    animation: splashMarkIn 0.55s ease-out both;
}
.splash-logo {
    font-size: clamp(2.4rem, 10vw, 3.2rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.03em;
    animation: splashLogoIn 0.6s 0.08s ease-out both;
}
.splash-loading {
    margin-top: 18px;
    opacity: 0.88;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    animation: splashFade 0.5s 0.25s ease-out both;
}
@keyframes splashMarkIn {
    from { opacity: 0; transform: scale(0.82) translateY(8px); }
    to { opacity: 1; transform: none; }
}
@keyframes splashLogoIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
@keyframes splashFade {
    from { opacity: 0; }
    to { opacity: 0.88; }
}

.auth-header {
    display: flex;
    align-items: center;
    padding: 12px 12px 12px 8px;
    min-height: 56px;
    flex-shrink: 0;
    gap: 4px;
}
.auth-logo {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    font-size: clamp(1.15rem, 4.8vw, 1.4rem);
    font-weight: 900;
    color: var(--tafuta-red);
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.auth-back {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--tafuta-text);
    -webkit-tap-highlight-color: transparent;
}
.auth-body { flex: 1; padding: 18px var(--page-gutter); }
.auth-body-center { display: flex; flex-direction: column; justify-content: center; }
.auth-title { font-size: 1.6rem; font-weight: 800; line-height: 1.25; margin: 0 0 10px; letter-spacing: -0.02em; }
.auth-sub { color: var(--tafuta-muted); font-size: 0.95rem; margin: 0 0 20px; line-height: 1.4; }
.auth-footer { padding: 12px var(--page-gutter) 18px; flex-shrink: 0; }
.btn-primary-full {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    background: var(--tafuta-red);
    color: #fff;
    font-size: 1.02rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(229, 57, 53, 0.32);
    letter-spacing: 0.01em;
}
.btn-primary-full:active { opacity: 0.92; transform: scale(0.985); background: var(--tafuta-red-dark); }
.btn-link {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: none;
    background: none;
    color: var(--tafuta-muted);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
}
.auth-legal { font-size: 0.75rem; color: var(--tafuta-muted); text-align: center; margin-top: 16px; line-height: 1.5; }
.auth-legal a { color: var(--tafuta-red-dark); text-decoration: none; font-weight: 600; }
.text-red { color: var(--tafuta-red); }

/* ?? Accueil / Welcome (brand-first) ?? */
.welcome-screen {
    background: #fff;
    overflow: hidden;
}
.welcome-stage {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    position: relative;
}
.welcome-visual {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(18, 12, 12, 0.15) 0%, rgba(18, 12, 12, 0.55) 100%),
        linear-gradient(145deg, #E53935 0%, #B71C1C 48%, #7A1212 100%);
}
.welcome-visual-glow {
    position: absolute;
    width: 140%;
    height: 70%;
    left: -20%;
    top: -18%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.22), transparent 62%);
    animation: welcomeGlow 7s ease-in-out infinite alternate;
}
.welcome-visual-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 78%);
    -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 78%);
    animation: welcomeGrid 18s linear infinite;
}
.welcome-visual-horizon {
    position: absolute;
    left: -10%;
    right: -10%;
    bottom: 18%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
    box-shadow: 0 0 40px 8px rgba(255, 200, 180, 0.15);
}
.welcome-visual-mark {
    position: absolute;
    left: 50%;
    top: 38%;
    transform: translate(-50%, -50%);
    width: min(42vw, 168px);
    height: min(42vw, 168px);
    border-radius: 36px;
    background: rgba(255,255,255,0.12);
    border: 1.5px solid rgba(255,255,255,0.28);
    color: #fff;
    font-size: clamp(4.2rem, 18vw, 6.2rem);
    font-weight: 900;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: -0.04em;
    backdrop-filter: blur(8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.22);
    animation: welcomeMark 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.welcome-copy {
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding: 28px 24px 20px;
    color: #fff;
    animation: welcomeCopy 0.65s 0.12s ease-out both;
}
.welcome-brand {
    margin: 0 0 10px;
    font-size: clamp(2.35rem, 9.5vw, 3.1rem);
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.035em;
    line-height: 0.95;
    text-shadow: 0 2px 18px rgba(0,0,0,0.25);
}
.welcome-headline {
    margin: 0 0 8px;
    font-size: clamp(1.15rem, 4.4vw, 1.35rem);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: rgba(255,255,255,0.95);
    max-width: 18em;
}
.welcome-sub {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255,255,255,0.78);
    max-width: 22em;
}
.welcome-actions {
    flex-shrink: 0;
    padding: 18px 20px 20px;
    background: #fff;
    border-radius: 22px 22px 0 0;
    margin-top: -18px;
    position: relative;
    z-index: 2;
    box-shadow: 0 -8px 28px rgba(80, 20, 20, 0.08);
    animation: welcomeActions 0.55s 0.18s ease-out both;
}
.btn-welcome-secondary {
    width: 100%;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #e8e0df;
    background: #fff;
    color: var(--tafuta-text);
    font-size: 0.98rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}
.btn-welcome-secondary:active { background: #faf6f5; border-color: var(--tafuta-red); color: var(--tafuta-red-dark); }
.welcome-google {
    margin: 0 0 12px;
    display: flex;
    justify-content: center;
    min-height: 44px;
}
.welcome-install {
    margin-top: 4px;
    color: var(--tafuta-red);
}
.welcome-support {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--tafuta-ink, #1a1f28);
    text-decoration: none;
}
.welcome-support:hover { color: var(--tafuta-red); text-decoration: underline; }
.welcome-hint {
    margin-top: 10px;
    font-size: 0.78rem;
    color: #8a9199;
}
@keyframes welcomeGlow {
    from { transform: translateY(0) scale(1); opacity: 0.9; }
    to { transform: translateY(12px) scale(1.06); opacity: 1; }
}
@keyframes welcomeGrid {
    from { background-position: 0 0, 0 0; }
    to { background-position: 0 42px, 42px 0; }
}
@keyframes welcomeMark {
    from { opacity: 0; transform: translate(-50%, -42%) scale(0.88); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
@keyframes welcomeCopy {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@keyframes welcomeActions {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}
@media (min-width: 720px) {
    .welcome-stage { max-width: 520px; margin: 0 auto; width: 100%; }
    .welcome-actions { max-width: 520px; margin: -18px auto 0; width: 100%; }
}
/* Legacy welcome hero (si encore r?f?renc?) */
.welcome-hero { flex: 1; display: flex; align-items: center; padding: 24px 20px; }
.welcome-hero h1 { font-size: 2rem; font-weight: 800; line-height: 1.15; margin: 0; }
.phone-input-wrap, .email-input-wrap { display: flex; align-items: center; background: #F5F5F5; border-radius: 12px; padding: 4px 12px; gap: 8px; }
.phone-input-wrap .tafuta-phone-row { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.phone-input-wrap .tafuta-phone-dial { flex: 0 0 auto; max-width: 42%; min-width: 108px; border: none; background: transparent; font-weight: 600; font-size: .95rem; padding: 12px 4px; outline: none; color: var(--tafuta-text); }
.phone-input-wrap .tafuta-phone-national { flex: 1; min-width: 0; border: none; background: transparent; padding: 16px 8px; font-size: 1.1rem; outline: none; }
.phone-input, .email-input { flex: 1; border: none; background: transparent; padding: 16px 8px; font-size: 1.1rem; outline: none; }
.phone-clear { background: none; border: none; color: var(--tafuta-muted); cursor: pointer; font-size: 1rem; padding: 8px; }
.email-icon { font-size: 1.2rem; }
.otp-inputs { display: flex; gap: 8px; justify-content: center; margin: 24px 0; }
.otp-digit { width: 48px; height: 56px; border: 2px solid var(--tafuta-border); border-radius: 10px; text-align: center; font-size: 1.5rem; font-weight: 700; outline: none; }
.otp-digit:focus { border-color: var(--tafuta-red); }
.otp-paste-hint { text-align: center; color: var(--tafuta-muted, #888); font-size: .85rem; margin: -8px 0 12px; }
.location-status { display: flex; align-items: center; gap: 16px; margin-top: 32px; padding: 16px; background: #F5F5F5; border-radius: 12px; }
.empty-state .icon ons-icon { font-size: 64px; color: #BDBDBD; }
.ride-status .icon-big ons-icon { font-size: 72px; color: var(--tafuta-red); }
.search-bar ons-icon { font-size: 22px; color: var(--tafuta-muted); flex-shrink: 0; }
.profile-avatar ons-icon { font-size: 42px; }
.menu-card-item .icon ons-icon { font-size: 22px; color: var(--tafuta-muted); }
.menu-card-dark .menu-card-item .icon ons-icon { color: #FFC107; }
.section-title-dark { color: var(--tafuta-muted); padding: 12px var(--page-gutter) 6px; font-weight: 600; font-size: 0.85rem; text-transform: uppercase; }
.location-icon ons-icon { font-size: 28px; color: var(--tafuta-muted); }
.splash-loading ons-icon { vertical-align: middle; margin-right: 6px; }
.auth-back ons-icon { font-size: 24px; }
.phone-flag-icon { font-weight: 700; font-size: 0.85rem; color: var(--tafuta-muted); background: #eee; padding: 4px 8px; border-radius: 4px; }
.email-input-wrap ons-icon, .phone-input-wrap ons-icon { font-size: 22px; color: var(--tafuta-muted); }
.phone-clear ons-icon { font-size: 18px; }
.chat-btn ons-icon { font-size: 22px; }
.notif-alert ons-icon { font-size: 20px; flex-shrink: 0; }
.welcome-taxi-icon { display: inline-block; vertical-align: middle; margin-left: 8px; }
.welcome-taxi-icon ons-icon { font-size: 36px; color: var(--tafuta-red); }
.menu-chevron ons-icon { font-size: 20px; color: #BDBDBD; }
.card-star ons-icon { font-size: 14px; color: #FFC107; vertical-align: middle; }
.location-label { font-size: 0.8rem; color: var(--tafuta-muted); }
.location-value { font-weight: 600; margin-top: 2px; }
.btn-tafuta { background: var(--tafuta-red) !important; color: #fff !important; border-radius: 12px !important; width: 100%; margin-top: 8px; }
.btn-tafuta-outline { background: transparent !important; color: var(--tafuta-red) !important; border: 2px solid var(--tafuta-red) !important; border-radius: 12px !important; width: 100%; margin-top: 8px; }

/* App shell */
html, body { height: 100%; }
#app-main { display: none; }
#app-main.visible {
    display: block;
    position: absolute;
    top: var(--safe-top);
    right: var(--safe-right);
    bottom: var(--safe-bottom);
    left: var(--safe-left);
    z-index: 1;
}
ons-splitter { height: 100%; display: block; }
ons-splitter-content { height: 100%; display: block; position: relative; z-index: 2; }
.app-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 100%;
    background: var(--tafuta-bg);
}
.app-banners {
    flex-shrink: 0;
    margin: 12px 12px 8px;
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.06);
    overflow: hidden;
}
.app-banners.is-mini .app-banner-body { display: none; }
.app-banner-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 6px 8px 6px 12px;
}
.app-banner-title {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}
.app-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.bn-btn {
    appearance: none;
    -webkit-appearance: none;
    height: 32px;
    margin: 0;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font: 700 0.78rem/1 Outfit, sans-serif;
    cursor: pointer;
    flex-shrink: 0;
    text-decoration: none;
}
.bn-btn svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }
.bn-btn-icon { width: 32px; height: 32px; padding: 0; }
.bn-btn-danger { background: #fee2e2; color: #b91c1c; }
.bn-btn-primary {
    height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    background: #E53935;
    color: #fff;
    font-size: 0.95rem;
}
.app-banner-sheet-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}
.app-banner-sheet-actions .bn-btn { flex: 1; height: 44px; border-radius: 12px; font-size: 0.92rem; }
.app-banner-body { position: relative; }
.app-banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    height: 112px;
}
.app-banner-track::-webkit-scrollbar { display: none; }
.app-banner-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    height: 112px;
    border: 0;
    padding: 0;
    background: #f3f4f6 center/cover no-repeat;
    cursor: pointer;
}
.app-banner-slide img {
    width: 100%;
    height: 112px;
    object-fit: cover;
    display: block;
}
.app-banner-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}
.app-banner-dots span {
    width: 6px;
    height: 6px;
    border-radius: 99px;
    background: rgba(17, 24, 39, 0.28);
    box-shadow: 0 0 0 1px rgba(255,255,255,.8);
}
.app-banner-dots span.is-on { background: #E53935; }
.app-banner-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
}
.app-banner-sheet {
    width: min(520px, 100%);
    max-height: min(88vh, 760px);
    overflow: auto;
    background: #fff;
    border-radius: 18px;
    padding: 14px 14px 16px;
}
.app-banner-sheet-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.app-banner-sheet-bar h2 {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.3;
}
.app-banner-sheet img {
    width: 100%;
    max-height: 48vh;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 12px;
    display: block;
}
.app-banner-sheet p {
    margin: 12px 0 0;
    white-space: pre-wrap;
    line-height: 1.45;
    color: #374151;
}
#tab-panel-taxi .app-banners + .taxi-layout {
    height: auto;
}
#tab-content,
.app-shell-content {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.tab-panel {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-panel.is-active,
.tab-panel:not([hidden]) {
    display: flex;
}
.tab-panel[hidden] {
    display: none !important;
}
#tab-content.tab-taxi-active {
    overflow: hidden;
}
#tab-content.tab-taxi-active #tab-panel-taxi {
    overflow: hidden;
}

/* Header */
.tafuta-header {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px 10px 6px;
    background: #fff;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
    min-height: 52px;
}
.tafuta-header .logo {
    flex: 1 1 auto;
    min-width: 4.2rem;
    text-align: center;
    font-size: clamp(1.15rem, 5vw, 1.45rem);
    font-weight: 900;
    color: var(--tafuta-red);
    font-style: italic;
    letter-spacing: -0.02em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.tafuta-header .menu-btn {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}
.tafuta-header .menu-btn ons-icon { font-size: 24px; color: var(--tafuta-text); pointer-events: none; }
.tafuta-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    margin-right: 2px;
}
.header-settings-btn { display: none !important; }
.header-icon-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    opacity: 1;
}
.header-icon-btn .header-icon-wrap {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f2f5;
    transition: background 0.15s ease, transform 0.15s ease;
}
.header-icon-btn ons-icon {
    font-size: 21px !important;
    color: #54656f !important;
    pointer-events: none;
}
.header-icon-btn:active .header-icon-wrap {
    background: #e7e9ec;
    transform: scale(0.94);
}
.header-icon-btn.has-unread .header-icon-wrap {
    background: rgba(211, 47, 47, 0.1);
}
.header-icon-btn.has-unread ons-icon {
    color: var(--tafuta-red) !important;
}
.header-icon-btn.header-chat-btn.has-unread .header-icon-wrap {
    background: rgba(229, 57, 53, 0.12);
}
.header-icon-btn.header-chat-btn.has-unread ons-icon {
    color: var(--tafuta-red) !important;
}
.header-icon-btn.hidden { display: none !important; }
.header-icon-badge {
    position: absolute;
    top: -3px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    border-radius: 9px;
    background: var(--tafuta-red);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    z-index: 2;
}
.header-chat-btn .header-icon-badge {
    background: var(--tafuta-red);
}
.header-icon-badge.hidden { display: none; }

/* Search bar */
.search-bar { margin: var(--page-gutter-y) var(--page-gutter); background: #EEEEEE; border-radius: 12px; padding: 12px 12px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.search-bar input { border: none; background: transparent; flex: 1; font-size: 1rem; outline: none; }
.search-placeholder { color: var(--tafuta-muted); }

/* Cards */
.shop-tabs {
    display: flex; gap: 4px; margin: 0 var(--page-gutter) 12px; padding: 4px;
    background: #fff; border-radius: 14px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.shop-tab {
    flex: 1; border: 0; background: transparent; color: #667; border-radius: 11px;
    padding: 10px 8px; font: inherit; font-weight: 800; cursor: pointer;
}
.shop-tab.active { background: #111418; color: #fff; }
.shop-stage { padding: 0 var(--page-gutter) 110px; }
.shop-section { margin: 16px 0 8px; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8b919a; }
.shop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shop-card {
    display: flex; flex-direction: column; align-items: stretch; text-align: left;
    border: 0; background: #fff; border-radius: 18px; padding: 0; overflow: hidden;
    box-shadow: 0 8px 24px rgba(17,20,24,.06); cursor: pointer; font: inherit; color: inherit;
}
.shop-card:active { transform: scale(.985); }
.shop-visual { position: relative; display: block; background: #f3f4f6; aspect-ratio: 1; }
.shop-visual img, .shop-visual .shop-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-visual .shop-ph, .shop-hero .shop-ph {
    display: flex; align-items: center; justify-content: center; font-weight: 800; color: #90a4ae; font-size: 1.8rem;
    background: linear-gradient(160deg, #f7f8fa, #e6eaee);
}
.shop-flag {
    position: absolute; top: 8px; left: 8px; z-index: 1;
    background: #e53935; color: #fff; border-radius: 999px; padding: 3px 7px;
    font-size: .68rem; font-weight: 800; letter-spacing: .02em;
}
.shop-flag--muted { left: auto; right: 8px; background: rgba(17,20,24,.72); }
.shop-copy { display: flex; flex-direction: column; gap: 2px; padding: 10px 10px 12px; min-width: 0; }
.shop-copy strong {
    font-size: .92rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.shop-seller { color: #8b919a; font-size: .74rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-price { display: flex; align-items: baseline; gap: 6px; margin-top: 4px; }
.shop-price em { font-style: normal; font-weight: 800; color: #111418; font-size: .95rem; }
.shop-price s { color: #b0b6bf; font-size: .72rem; }
.shop-store {
    display: block; background: #fff; border-radius: 20px; overflow: hidden; margin-bottom: 12px;
    box-shadow: 0 8px 24px rgba(17,20,24,.06); cursor: pointer;
}
.shop-store:active { transform: scale(.99); }
.shop-store-cover { position: relative; height: 148px; background: #eceff1; }
.shop-store-cover img, .shop-store-cover .shop-ph { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-store-cover .shop-ph { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: #90a4ae; }
.shop-store.is-closed .shop-store-cover img { filter: grayscale(.4); }
.shop-store-body { padding: 12px 14px 14px; }
.shop-store-body h3 { margin: 0 0 4px; font-size: 1.05rem; }
.shop-store-body p { margin: 0 0 8px; color: #6b7280; font-size: .84rem; }
.shop-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.shop-pill {
    display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 8px;
    background: #f3f4f6; color: #445; font-size: .72rem; font-weight: 700;
}
.shop-pill.is-open { background: #e8f5e9; color: #1b7a4a; }
.shop-pill.is-closed { background: #eceff1; color: #546e7a; }
.shop-hero { position: relative; background: #f3f4f6; }
.shop-hero img, .shop-hero .shop-ph { width: 100%; height: 320px; object-fit: cover; display: block; }
.shop-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--page-gutter) 0; }
.shop-thumb { flex: 0 0 auto; border: 2px solid transparent; padding: 0; border-radius: 12px; overflow: hidden; background: #fff; cursor: pointer; }
.shop-thumb.active { border-color: #111418; }
.shop-thumb img { width: 62px; height: 62px; object-fit: cover; display: block; }
.shop-sheet {
    margin-top: -18px; position: relative; background: #fff; border-radius: 22px 22px 0 0;
    padding: 18px var(--page-gutter) 150px; box-shadow: 0 -8px 24px rgba(17,20,24,.04);
}
ons-toolbar .shop-back,
ons-toolbar-button.shop-back {
    pointer-events: auto;
    position: relative;
    z-index: 3;
}
.shop-back {
    appearance: none;
    border: 0;
    background: transparent;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    color: inherit;
    font-size: 32px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.shop-add-btn {
    display: block; width: 100%; margin: 16px 0 0; border: 0; cursor: pointer;
    background: var(--tafuta-red); color: #fff; border-radius: 14px; padding: 16px 18px;
    font: inherit; font-weight: 800;
}
.shop-add-btn:disabled { background: #e5e7eb; color: #9ca3af; cursor: default; }
.shop-kicker { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.shop-kicker button {
    border: 0; background: #fff5f5; color: #c62828; border-radius: 999px; padding: 6px 10px;
    font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer;
}
.shop-sheet h2 { margin: 0 0 8px; font-size: 1.45rem; letter-spacing: -.02em; line-height: 1.15; }
.shop-detail-price { margin: 0; font-size: 1.55rem; font-weight: 800; letter-spacing: -.03em; }
.shop-detail-price s { color: #b0b6bf; font-size: .95rem; font-weight: 600; margin-right: 8px; }
.shop-detail-desc { color: #4b5563; line-height: 1.5; margin: 14px 0 0; }
.shop-buybar {
    position: fixed; left: 0; right: 0; bottom: calc(84px + var(--safe-bottom)); z-index: 39;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px var(--page-gutter) calc(12px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
    border-top: 1px solid #eee; box-shadow: 0 -8px 24px rgba(17,20,24,.06);
}
.shop-buybar small { display: block; color: #8b919a; font-size: .72rem; font-weight: 700; }
.shop-buybar strong { font-size: 1.05rem; }
.shop-buybar button {
    border: 0; background: #111418; color: #fff; border-radius: 14px; padding: 14px 18px;
    font: inherit; font-weight: 800; cursor: pointer; min-width: 168px;
}
.shop-buybar button:disabled { background: #e5e7eb; color: #9ca3af; }
.shop-store-hero { position: relative; height: 180px; background: #eceff1; }
.shop-store-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-store-card {
    margin: -36px var(--page-gutter) 8px; position: relative; background: #fff; border-radius: 18px;
    padding: 14px; box-shadow: 0 10px 28px rgba(17,20,24,.08);
}
.shop-store-card h2 { margin: 6px 0 4px; font-size: 1.25rem; }
.shop-store-card p { margin: 0; color: #6b7280; font-size: .86rem; line-height: 1.4; }
.card-list { padding: 0 var(--page-gutter) 88px; }
.card-item { background: var(--tafuta-card); border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.08); cursor: pointer; }
.card-item:active { opacity: 0.85; }
/* Liste restaurants (style livraison) */
.rl-card {
    display: flex; gap: 10px; align-items: stretch;
    background: var(--tafuta-card); border-radius: 14px; padding: 8px;
    margin-bottom: 8px; box-shadow: 0 1px 6px rgba(0,0,0,.07); cursor: pointer;
}
.rl-card:active { transform: scale(.985); }
.rl-media {
    position: relative; width: 92px; flex-shrink: 0; border-radius: 12px; overflow: hidden;
    background: #eceff1;
}
.rl-cover { width: 100%; height: 92px; object-fit: cover; display: block; }
.rl-cover--ph {
    height: 92px; display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem; font-weight: 800; color: #90a4ae;
    background: linear-gradient(145deg, #eceff1, #cfd8dc);
}
.rl-logo {
    position: absolute; left: 6px; bottom: 6px; width: 28px; height: 28px;
    border-radius: 8px; object-fit: cover; border: 2px solid #fff; background: #fff;
}
.rl-body { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 2px 2px 2px 0; }
.rl-title { margin: 0 0 4px; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.rl-sub {
    margin: 0 0 8px; color: var(--tafuta-muted); font-size: .82rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rl-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.rl-chip {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: .72rem; font-weight: 600; color: #455a64;
    background: #f1f3f5; padding: 3px 8px; border-radius: 999px;
}
.rl-chip--fee { background: #ffebee; color: var(--tafuta-red); }
.rl-status {
    position: absolute; top: 6px; right: 6px; z-index: 2;
    font-size: .65rem; font-weight: 800; letter-spacing: .02em;
    padding: 3px 7px; border-radius: 999px; line-height: 1.2;
    box-shadow: 0 1px 4px rgba(0,0,0,.18);
}
.rl-status.is-open { background: #e8f5e9; color: #1b7a4a; }
.rl-status.is-closed { background: #eceff1; color: #546e7a; }
.rl-card--closed .rl-cover, .rl-card--closed .rl-cover--ph { filter: grayscale(.35); opacity: .9; }
.card-item .rl-status { position: static; display: inline-flex; margin-left: 6px; vertical-align: middle; box-shadow: none; }
.card-item--closed { opacity: .88; }
.rm-open-badge {
    display: inline-block; margin-left: 8px; vertical-align: middle;
    font-size: .68rem; font-weight: 800; padding: 3px 8px; border-radius: 999px;
}
.rm-open-badge.is-open { background: #e8f5e9; color: #1b7a4a; }
.rm-open-badge.is-closed { background: #eceff1; color: #546e7a; }
.rm-closed-banner {
    margin: 8px 0 0; padding: 8px 10px; border-radius: 10px;
    background: #fff3e0; color: #8a5a00; font-size: .82rem; line-height: 1.35;
}
.shop-status-bar {
    margin: 6px var(--page-gutter) 0; padding: 8px 10px; border-radius: 10px;
    font-size: .85rem; font-weight: 600;
}
.shop-status-bar.is-open { background: #e8f5e9; color: #1b7a4a; }
.shop-status-bar.is-closed { background: #eceff1; color: #546e7a; }
.qty-btn--disabled {
    opacity: .35; pointer-events: none; cursor: not-allowed;
}

/* Fiche restaurant ? profil type Facebook / WhatsApp */
.rm-shell { padding-bottom: 150px; }
.rm-profile {
    background: #fff;
    margin-bottom: 4px;
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.rm-cover {
    position: relative; height: 160px; overflow: hidden; background: #cfd8dc;
}
.rm-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rm-cover-img--ph {
    width: 100%; height: 100%;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(229,57,53,.28), transparent 55%),
        linear-gradient(160deg, #90a4ae, #546e7a);
}
.rm-profile-bar {
    display: flex; align-items: flex-end; gap: 10px;
    padding: 0 var(--page-gutter) 8px; margin-top: -36px; position: relative; z-index: 2;
}
.rm-avatar {
    width: 78px; height: 78px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.18); background: #fff;
}
.rm-avatar--ph {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; font-weight: 800; color: var(--tafuta-red);
    background: #fff5f5;
}
.rm-profile-text {
    flex: 1; min-width: 0; padding: 36px 0 4px;
}
.rm-name {
    margin: 0; font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em;
    line-height: 1.15; color: #111; text-shadow: none;
}
.rm-tagline {
    margin: 4px 0 0; color: var(--tafuta-muted); font-size: .84rem; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden;
}
.rm-profile-body { padding: 0 var(--page-gutter) 10px; }
.rm-head-meta {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px 2px;
    font-size: .82rem; color: #546e7a; line-height: 1.35; margin-bottom: 8px;
}
.rm-rating-bits {
    display: inline-flex; align-items: center; gap: 2px; flex-wrap: wrap;
}
.rm-meta-dot { color: #b0bec5; margin: 0 4px; font-weight: 700; }
.rm-meta-item { color: #546e7a; }
.rm-score {
    display: inline-flex; align-items: center; gap: 3px;
    border: 0; background: transparent; padding: 0; margin: 0;
    font: inherit; color: #37474f; cursor: pointer; font-weight: 700;
}
.rm-score strong { font-size: .9rem; font-weight: 800; color: #263238; }
.rm-score-star { color: #f9a825; font-size: .95rem; line-height: 1; }
.rm-score-n { color: var(--tafuta-muted); font-weight: 600; }
.rm-score--new {
    color: #2e7d32; background: #e8f5e9; font-size: .72rem; font-weight: 700;
    padding: 2px 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em;
    cursor: default;
}
.rm-rate-link {
    border: 0; background: transparent; color: var(--tafuta-red);
    font: inherit; font-size: .82rem; font-weight: 700;
    padding: 0 0 0 6px; cursor: pointer; white-space: nowrap;
}
.rm-head-about {
    margin: 0 0 10px; color: var(--tafuta-muted); font-size: .86rem; line-height: 1.45;
}
.rm-head-actions {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.rm-head-act {
    display: inline-flex; align-items: center; gap: 5px;
    font: inherit; font-size: .8rem; font-weight: 600; color: #455a64; text-decoration: none;
    background: #fafafa; border: 1px solid var(--tafuta-border);
    padding: 7px 12px; border-radius: 999px; cursor: pointer;
}
.rm-head-act ons-icon { color: var(--tafuta-red); }
.rm-head-act--muted {
    color: var(--tafuta-muted); cursor: default; background: transparent; border-color: transparent;
    padding-left: 4px;
}
.rm-head-act--muted ons-icon { color: #90a4ae; }
.rm-pill {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .75rem; font-weight: 600; color: #455a64;
    background: #fff; border: 1px solid var(--tafuta-border);
    padding: 4px 10px; border-radius: 999px;
}
.rm-receive {
    margin: 6px var(--page-gutter) 4px; padding: 10px 12px;
    background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.rm-receive-label {
    margin: 0 0 10px; font-size: .8rem; font-weight: 700; color: var(--tafuta-muted);
    text-transform: uppercase; letter-spacing: .04em;
}
.rm-receive-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rm-receive-btn {
    border: 1.5px solid var(--tafuta-border); background: #fafafa; border-radius: 14px;
    padding: 12px 10px; text-align: left; cursor: pointer; font: inherit;
    display: flex; flex-direction: column; gap: 2px; transition: border-color .15s, background .15s;
}
.rm-receive-btn strong { font-size: .92rem; color: var(--tafuta-text); }
.rm-receive-btn span { font-size: .75rem; color: var(--tafuta-muted); }
.rm-receive-btn.active {
    border-color: var(--tafuta-red); background: #fff5f5;
}
.rm-receive-btn.active strong { color: var(--tafuta-red); }
.rm-receive-btn:disabled { opacity: .45; cursor: not-allowed; }
.rm-menu-toolbar {
    padding: 10px var(--page-gutter) 6px; display: flex; flex-direction: column; gap: 8px;
}
.rm-menu-head {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
}
.rm-menu-title { margin: 0; font-size: 1.15rem; font-weight: 800; }
.rm-menu-count { font-size: .8rem; color: var(--tafuta-muted); font-weight: 600; }
.rm-menu-tools {
    display: flex; align-items: center; gap: 8px;
}
.rm-search {
    flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
    background: #fff; border: 1px solid var(--tafuta-border); border-radius: 12px;
    padding: 0 12px; height: 42px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.rm-search-ico { display: flex; color: var(--tafuta-muted); flex-shrink: 0; }
.rm-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    font: inherit; font-size: .92rem; color: var(--tafuta-text); height: 100%;
}
.rm-search input::placeholder { color: #9e9e9e; }
.rm-view-toggle {
    flex-shrink: 0; display: inline-flex; background: #fff;
    border: 1px solid var(--tafuta-border); border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.rm-view-btn {
    width: 42px; height: 42px; border: 0; background: transparent;
    color: var(--tafuta-muted); display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0;
}
.rm-view-btn + .rm-view-btn { border-left: 1px solid var(--tafuta-border); }
.rm-view-btn.active {
    background: #fff5f5; color: var(--tafuta-red);
}
.rm-info-title { margin: 0 0 10px; font-size: 1.05rem; font-weight: 800; }
.rm-cats {
    display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 8px var(--page-gutter) 4px; position: sticky; top: 0; z-index: 5;
    background: var(--tafuta-bg); scrollbar-width: none;
}
.rm-cats::-webkit-scrollbar { display: none; }
.rm-cat {
    flex: 0 0 auto; border: 1px solid var(--tafuta-border); background: #fff;
    color: var(--tafuta-text); font: inherit; font-size: .82rem; font-weight: 600;
    padding: 8px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.rm-cat.active {
    background: var(--tafuta-red); color: #fff; border-color: var(--tafuta-red);
}
.rm-menu { padding: 4px var(--page-gutter) 12px; display: flex; flex-direction: column; gap: 10px; }
.rm-menu .rm-dish.hidden,
.rm-menu .rm-section.hidden,
.rm-cat.hidden,
#rm-menu-empty.hidden { display: none !important; }

/* Menu ? mode grille (2 colonnes) */
.rm-menu--grid .rm-section-list {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.rm-menu--grid .rm-dish-track img,
.rm-menu--grid .rm-dish-gallery--empty,
.rm-menu--grid .rm-dish-ph { height: 112px; }
.rm-menu--grid .rm-dish-body { padding: 10px; gap: 3px; }
.rm-menu--grid .rm-dish-title { font-size: .88rem; }
.rm-menu--grid .rm-dish-desc { -webkit-line-clamp: 1; font-size: .75rem; }
.rm-menu--grid .rm-dish-price strong { font-size: .9rem; }
.rm-menu--grid .rm-add { width: 28px; height: 28px; font-size: 1.15rem; }
.rm-menu--grid .rm-badge { font-size: .58rem; padding: 2px 5px; }
.rm-menu--grid .rm-dish-count { font-size: .62rem; padding: 3px 6px; right: 6px; bottom: 6px; }

@media (max-width: 340px) {
    .rm-menu--grid .rm-section-list { grid-template-columns: 1fr; }
}

/* Avis clients ? style Play Store */
.rm-reviews {
    margin: 6px var(--page-gutter) 100px; padding: 12px;
    background: #fff; border-radius: 14px; box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.rm-reviews-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px;
}
.rm-reviews-head .rm-info-title { margin: 0; }
.rm-reviews-write {
    border: 0; background: #fff5f5; color: var(--tafuta-red);
    font: inherit; font-size: .82rem; font-weight: 700;
    padding: 8px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.rm-reviews-summary {
    display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: center;
    margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #f0f0f0;
}
.rm-reviews-score { text-align: center; }
.rm-reviews-avg {
    display: block; font-size: 2.4rem; font-weight: 800; line-height: 1; letter-spacing: -.03em;
}
.rm-reviews-count { display: block; margin-top: 4px; font-size: .78rem; color: var(--tafuta-muted); }
.rm-stars { display: inline-flex; gap: 1px; align-items: center; margin-top: 4px; line-height: 1; }
.rm-star { color: #e0e0e0; line-height: 1; letter-spacing: -.05em; }
.rm-star.is-on { color: #f9a825; }
.rm-review-name-row {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.rm-review-name-row em { font-style: normal; color: var(--tafuta-muted); font-weight: 600; font-size: .78rem; }
.rm-review-del {
    border: 0; background: transparent; color: #c62828; padding: 4px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 8px;
}
.rm-review-del:active { background: #ffebee; }
.rm-review-card--mine { background: #fafafa; margin: 0 -8px; padding: 12px 8px 0; border-radius: 12px; }
.rm-review-del-full {
    display: block; width: 100%; margin-top: 10px; border: 0; background: transparent;
    color: #c62828; font: inherit; font-size: .9rem; font-weight: 700;
    padding: 10px; cursor: pointer;
}
.rm-reviews-bars { display: flex; flex-direction: column; gap: 5px; }
.rm-bar-row { display: flex; align-items: center; gap: 8px; }
.rm-bar-label { width: 12px; font-size: .75rem; font-weight: 700; color: var(--tafuta-muted); }
.rm-bar-track {
    flex: 1; height: 8px; border-radius: 999px; background: #eee; overflow: hidden;
}
.rm-bar-fill { height: 100%; background: #f9a825; border-radius: 999px; }
.rm-bar-n { width: 22px; text-align: right; font-size: .72rem; color: var(--tafuta-muted); }
.rm-reviews-list { display: flex; flex-direction: column; gap: 12px; }
.rm-reviews-empty { margin: 0; color: var(--tafuta-muted); font-size: .9rem; text-align: center; padding: 8px 0; }
.rm-review-card { padding-top: 12px; border-top: 1px solid #f0f0f0; }
.rm-review-card:first-child { border-top: 0; padding-top: 0; }
.rm-review-top { display: flex; gap: 10px; align-items: flex-start; }
.rm-review-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #eee;
}
.rm-review-avatar--ph {
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; color: #fff; background: #90a4ae;
}
.rm-review-meta strong { display: block; font-size: .9rem; }
.rm-review-line { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.rm-review-date { font-size: .72rem; color: var(--tafuta-muted); }
.rm-review-text {
    margin: 8px 0 0 50px; font-size: .88rem; line-height: 1.45; color: var(--tafuta-text);
}
.resto-review-form {
    position: fixed; inset: 0; z-index: 5000; display: flex; align-items: flex-end; justify-content: center;
}
.resto-review-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.resto-review-panel {
    position: relative; z-index: 1; width: 100%; max-width: 520px;
    background: #fff; border-radius: 18px 18px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0,0,0,.2);
}
.resto-review-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.resto-review-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.resto-review-hint { margin: 0 0 10px; color: var(--tafuta-muted); font-size: .88rem; }
.resto-review-stars { display: flex; gap: 4px; justify-content: center; margin-bottom: 14px; }
.rr-star {
    border: 0; background: transparent; color: #e0e0e0; padding: 4px 6px; cursor: pointer; line-height: 1;
}
.rr-star-glyph { font-size: 2rem; line-height: 1; }
.rr-star.is-on { color: #f9a825; }
.rr-comment { resize: vertical; min-height: 96px; margin-bottom: 12px; }
body.resto-review-open .tafuta-tabbar { visibility: hidden; pointer-events: none; }

@media (max-width: 360px) {
    .rm-reviews-summary { grid-template-columns: 1fr; }
    .rm-review-text { margin-left: 0; }
}
.rm-section { scroll-margin-top: 56px; margin-bottom: 0; }
.rm-section-title {
    margin: 4px 0 10px; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em;
}
.rm-section-list {
    display: flex; flex-direction: column; gap: 12px;
}
.rm-dish {
    display: flex; flex-direction: column; gap: 0;
    border-radius: 16px; overflow: hidden; cursor: pointer;
    background: #fff; text-align: left;
    box-shadow: 0 1px 8px rgba(0,0,0,.07);
}
.rm-dish:active { transform: scale(.985); }
.rm-dish-gallery {
    position: relative; width: 100%; background: #eceff1;
}
.rm-dish-gallery--empty { height: 140px; }
.rm-dish-track {
    display: flex; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.rm-dish-track::-webkit-scrollbar { display: none; }
.rm-dish-track img {
    flex: 0 0 100%; width: 100%; height: 168px; object-fit: cover;
    scroll-snap-align: start; display: block; background: #eceff1;
}
.rm-dish-track img:only-child { flex-basis: 100%; }
.rm-dish-count {
    position: absolute; right: 10px; bottom: 10px;
    background: rgba(0,0,0,.62); color: #fff;
    font-size: .68rem; font-weight: 700; padding: 4px 8px; border-radius: 999px;
}
.rm-dish-body {
    flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px;
    padding: 12px 14px 14px;
}
.rm-dish-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
}
.rm-dish-title {
    margin: 0; font-size: 1rem; font-weight: 800; line-height: 1.3; flex: 1;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rm-dish-desc {
    margin: 0; color: var(--tafuta-muted); font-size: .82rem; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rm-dish-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.rm-badge {
    display: inline-block; font-size: .65rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .02em; padding: 2px 7px; border-radius: 6px;
}
.rm-badge--formule { background: #fff3e0; color: #ef6c00; }
.rm-badge--promo { background: #ffebee; color: var(--tafuta-red); }
.rm-badge--liv { background: #e8f5e9; color: #2e7d32; }
.rm-dish-price {
    margin-top: 6px; display: flex; align-items: baseline; gap: 6px;
}
.rm-dish-price strong { font-size: 1rem; font-weight: 800; color: var(--tafuta-text); }
.rm-dish-ph {
    width: 100%; height: 140px; display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 800; color: #90a4ae;
    background: linear-gradient(145deg, #f5f5f5, #e0e0e0);
}
.rm-add {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    background: var(--tafuta-red); color: #fff; font-size: 1.35rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 10px rgba(229,57,53,.35); line-height: 1;
}
.rm-cart {
    left: max(8px, var(--safe-left));
    right: max(8px, var(--safe-right));
    bottom: calc(84px + var(--safe-bottom));
    width: auto; border-radius: 14px; font-weight: 700;
    box-shadow: 0 8px 28px rgba(0,0,0,.22);
    padding: 12px 14px;
    z-index: 40;
}
.rm-cart-left { display: flex; align-items: center; gap: 10px; }
.rm-cart-badge {
    min-width: 26px; height: 26px; border-radius: 50%;
    background: rgba(255,255,255,.25); display: inline-flex;
    align-items: center; justify-content: center; font-size: .85rem; font-weight: 800;
}

/* Panier restaurant */
.resto-cart {
    position: fixed; inset: 0; z-index: 4900; display: flex; align-items: flex-end; justify-content: center;
}
.resto-cart-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.resto-cart-panel {
    position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: min(92vh, 920px);
    display: flex; flex-direction: column; background: #fff;
    border-radius: 18px 18px 0 0; box-shadow: 0 -8px 32px rgba(0,0,0,.2); overflow: hidden;
}
.resto-cart-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    padding: 16px 16px 10px; border-bottom: 1px solid #f0f0f0;
}
.resto-cart-head h2 { margin: 0; font-size: 1.2rem; font-weight: 800; }
.resto-cart-sub { margin: 2px 0 0; color: var(--tafuta-muted); font-size: .85rem; }
.resto-cart-scroll {
    flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch;
    padding: 12px 16px 8px;
}
.rc-lines { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.rc-line {
    display: flex; gap: 10px; align-items: center; justify-content: space-between;
    padding: 12px; background: #fafafa; border-radius: 14px; border: 1px solid #eee;
}
.rc-line-body { flex: 1; min-width: 0; }
.rc-line-name {
    display: block; font-size: .92rem; line-height: 1.3;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-line-price { font-size: .8rem; color: var(--tafuta-muted); }
.rc-line-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.rc-qty {
    width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--tafuta-border);
    background: #fff; font-size: 1.1rem; font-weight: 700; cursor: pointer; line-height: 1;
}
.rc-qty-val { min-width: 22px; text-align: center; font-weight: 700; font-size: .9rem; }
.rc-remove {
    width: 32px; height: 32px; border: 0; border-radius: 10px; background: #ffebee;
    color: var(--tafuta-red); font-size: 1.1rem; cursor: pointer; margin-left: 4px;
}
.rc-block { margin-bottom: 14px; }
.rc-block h3 { margin: 0 0 8px; font-size: .85rem; font-weight: 700; color: var(--tafuta-muted); text-transform: uppercase; letter-spacing: .04em; }
.rc-label { display: block; font-size: .82rem; font-weight: 600; margin: 10px 0 6px; }
.rc-input {
    width: 100%; border: 1px solid var(--tafuta-border); border-radius: 12px;
    padding: 12px 14px; font: inherit; background: #fff;
}
.rc-gps-box {
    margin-top: 10px; padding: 12px; border-radius: 12px;
    background: #f7f8fa; border: 1px solid var(--tafuta-border, #e8e8e8);
}
.rc-gps-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 0; border-radius: 10px; padding: 10px 14px;
    background: var(--tafuta-red, #e53935); color: #fff;
    font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer;
}
.rc-gps-btn:disabled { opacity: .65; cursor: wait; }
.rc-gps-btn ons-icon { color: #fff; }
.rc-gps-maps {
    display: inline-flex; align-items: center; gap: 6px;
    margin-left: 10px; font-size: .84rem; font-weight: 600;
    color: var(--tafuta-red, #e53935); text-decoration: none;
}
.rc-gps-maps.hidden { display: none; }
.rc-gps-status {
    margin: 8px 0 0; font-size: .8rem; color: var(--tafuta-muted, #777); line-height: 1.35;
}
.rc-gps-status.is-ok { color: #2e7d32; }
.rc-gps-status .rc-gps-ok { font-weight: 700; }
.rc-pay { display: flex; flex-direction: column; gap: 8px; }
.rc-pay-opt {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border: 1px solid var(--tafuta-border); border-radius: 12px; cursor: pointer;
}
.rc-pay-opt:has(input:checked) { border-color: var(--tafuta-red); background: #fff5f5; }
.rc-pay-opt input { accent-color: var(--tafuta-red); }
.rc-summary { background: #f7f7f8; border-radius: 14px; padding: 12px 14px; }
.rc-sum-row {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: .9rem; margin-bottom: 8px; color: var(--tafuta-muted);
}
.rc-sum-row strong { color: var(--tafuta-text); }
.rc-sum-total { margin-bottom: 0; padding-top: 8px; border-top: 1px solid #e8e8e8; font-size: 1rem; }
.rc-sum-total span, .rc-sum-total strong { color: var(--tafuta-text); font-weight: 800; }
.resto-cart-foot {
    flex-shrink: 0; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid #f0f0f0; background: #fff;
}
.rc-confirm { width: 100%; text-align: center; padding: 14px 18px; }
.rc-clear {
    width: 100%;
    margin-bottom: 8px;
    border: 0;
    background: transparent;
    color: var(--tafuta-red);
    font-weight: 700;
    padding: 8px 0;
    cursor: pointer;
}
.rc-confirm:disabled { background: #e5e7eb; color: #9ca3af; }
body.resto-cart-open .tafuta-tabbar,
body.resto-cart-open .rm-cart { visibility: hidden; pointer-events: none; }
.resto-about { padding: 6px var(--page-gutter) 88px; }
.resto-about-block {
    background: var(--tafuta-card, #fff); border-radius: 14px; padding: 14px 16px;
    margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.resto-about-block h3 { margin: 0 0 8px; font-size: 0.95rem; }
.resto-about-block p { margin: 0; color: var(--tafuta-muted); line-height: 1.5; font-size: 0.92rem; }
.resto-team { margin: 0; padding-left: 18px; color: var(--tafuta-muted); }
.resto-team li { margin-bottom: 4px; }
.resto-info { margin: 0; display: grid; gap: 10px; }
.resto-info > div { display: grid; grid-template-columns: 100px 1fr; gap: 8px; }
.resto-info dt { margin: 0; color: var(--tafuta-muted); font-size: 0.82rem; }
.resto-info dd { margin: 0; font-weight: 500; word-break: break-word; }
.resto-info a { color: var(--tafuta-red); text-decoration: none; }
.resto-builder {
    position: fixed; inset: 0; z-index: 4800; display: flex; align-items: flex-end; justify-content: center;
}
.resto-builder-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.resto-builder-panel {
    position: relative; z-index: 1; width: 100%; max-width: 520px; max-height: min(92vh, 920px);
    display: flex; flex-direction: column;
    overflow: hidden; background: #fff; border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,.2);
}
.resto-builder-scroll {
    flex: 1; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch;
    padding: 0 var(--page-gutter);
}
body.resto-builder-open .tafuta-tabbar { visibility: hidden; pointer-events: none; }
.resto-builder-hero {
    margin: 0 calc(-1 * var(--page-gutter)) 10px; overflow: hidden; background: #eceff1; position: relative;
}
.resto-builder-scroll > .resto-builder-hero:first-child {
    border-radius: 18px 18px 0 0;
}
.resto-builder-hero-track {
    display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.resto-builder-hero-track::-webkit-scrollbar { display: none; }
.resto-builder-hero-track img {
    flex: 0 0 100%; width: 100%; height: 200px; object-fit: cover;
    scroll-snap-align: start; display: block;
}
.resto-builder-hero-count {
    position: absolute; right: 12px; bottom: 12px;
    background: rgba(0,0,0,.62); color: #fff;
    font-size: .72rem; font-weight: 700; padding: 5px 10px; border-radius: 999px;
}
.resto-builder-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.resto-builder-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    margin-bottom: 8px; padding-top: 12px;
}
.resto-builder-head h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.resto-builder-desc { margin: 4px 0 0; color: var(--tafuta-muted); font-size: .85rem; line-height: 1.4; }
.resto-builder-x {
    width: 36px; height: 36px; border: 0; border-radius: 50%; background: #f0f0f0;
    font-size: 1.4rem; cursor: pointer; line-height: 1; flex-shrink: 0;
}
.resto-builder-hint { margin: 12px 0 6px; font-size: .85rem; color: var(--tafuta-muted); font-weight: 600; }
.resto-builder-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.resto-builder-row {
    display: flex; align-items: center; gap: 10px; padding: 12px;
    border: 1px solid var(--tafuta-border, #eee); border-radius: 12px; cursor: pointer;
}
.resto-builder-row input { width: 18px; height: 18px; accent-color: var(--tafuta-red); flex-shrink: 0; }
.rb-name { flex: 1; font-size: .95rem; }
.rb-name em { font-style: normal; color: var(--tafuta-muted); font-size: .8rem; }
.rb-price { font-weight: 700; font-size: .9rem; white-space: nowrap; }
.resto-builder-foot {
    flex-shrink: 0; background: #fff;
    padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--tafuta-border, #eee);
    display: flex; align-items: center; gap: 12px;
    box-shadow: 0 -4px 16px rgba(0,0,0,.06);
}
.resto-builder-total { flex: 1; font-size: .95rem; }
.resto-builder-add {
    border: 0; background: var(--tafuta-red); color: #fff; font: inherit; font-weight: 700;
    padding: 14px 20px; border-radius: 12px; cursor: pointer; white-space: nowrap;
}
.menu-cat-title {
    margin: 16px 4px 8px; font-size: 0.95rem; font-weight: 700;
    color: var(--tafuta-muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-formule {
    display: inline-block; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
    background: #ffebee; color: var(--tafuta-red); padding: 2px 6px; border-radius: 6px; margin-right: 4px;
}
.price-old { text-decoration: line-through; color: var(--tafuta-muted); font-weight: 400; margin-right: 4px; font-size: 0.85em; }
.card-title { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.card-sub { color: var(--tafuta-muted); font-size: 0.85rem; }
.card-meta { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.85rem; }
.card-price { color: var(--tafuta-red); font-weight: 700; }
.card-distance { color: var(--tafuta-muted); }

/* Bottom navigation */
.tafuta-tabbar {
    display: flex;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--tafuta-border);
    padding: 6px 10px calc(8px + env(safe-area-inset-bottom, 0px));
    position: relative;
    z-index: 10;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.04);
}
.tafuta-tabbar .tafuta-tab {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: var(--tafuta-muted);
    cursor: pointer;
    padding: 8px 4px 6px;
    font-family: inherit;
    border-radius: 14px;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.18s ease, color 0.18s ease, transform 0.15s ease;
}
.tafuta-tabbar .tafuta-tab .tab-ico {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    pointer-events: none;
    transition: background 0.18s ease, transform 0.18s ease;
}
.tafuta-tabbar .tafuta-tab ons-icon { font-size: 22px; line-height: 1; pointer-events: none; transition: color 0.2s ease; }
.tafuta-tabbar .tafuta-tab .tab-svg { width: 22px; height: 22px; display: block; }
.menu-svg { width: 22px; height: 22px; display: block; }
.tafuta-tabbar .tafuta-tab > span:last-child {
    font-size: 10px;
    line-height: 1.2;
    pointer-events: none;
    transition: color 0.2s ease, font-weight 0.2s ease;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tafuta-tabbar .tafuta-tab.active {
    color: var(--tafuta-red);
}
.tafuta-tabbar .tafuta-tab.active .tab-ico {
    background: rgba(211, 47, 47, 0.1);
    transform: translateY(-1px);
}
.tafuta-tabbar .tafuta-tab.active ons-icon { color: var(--tafuta-red); }
.tafuta-tabbar .tafuta-tab.active > span:last-child { font-weight: 700; }
.tafuta-tabbar .tafuta-tab { position: relative; }
.tafuta-tabbar .tafuta-tab:active { transform: scale(0.96); }

/* Transition swipe entre onglets */
#tab-content.tab-slide-in-left { animation: tabSlideInLeft 0.28s ease; }
#tab-content.tab-slide-in-right { animation: tabSlideInRight 0.28s ease; }
@keyframes tabSlideInLeft {
    from { transform: translateX(28px); opacity: 0.55; }
    to { transform: translateX(0); opacity: 1; }
}
@keyframes tabSlideInRight {
    from { transform: translateX(-28px); opacity: 0.55; }
    to { transform: translateX(0); opacity: 1; }
}

/* Profil plein ?cran */
#profil-overlay {
    display: none;
    position: fixed;
    top: var(--safe-top);
    right: var(--safe-right);
    bottom: var(--safe-bottom);
    left: var(--safe-left);
    z-index: 3000;
    background: #fff;
    overflow-y: auto;
}

/* Menu lat?ral ? ic?nes */
ons-list-item .left ons-icon { font-size: 22px; color: var(--tafuta-muted); vertical-align: middle; }
ons-list-item .left { min-width: 36px; display: flex; align-items: center; }

/* Profile menu */
.profile-header { text-align: center; padding: 16px var(--page-gutter); background: #fff; }
.profile-header-editable { cursor: pointer; }
.profile-header-editable:active { opacity: 0.92; }
.profile-edit-hint { display: block; font-size: 0.8rem; color: var(--tafuta-muted); margin-top: 8px; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; background: #E0E0E0; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #9E9E9E; overflow: hidden; position: relative; }
.profile-avatar-lg { width: 88px; height: 88px; }
.profile-avatar-xl { width: 110px; height: 110px; margin-bottom: 8px; }
.profile-avatar-clickable { cursor: pointer; border: 3px solid #fff; box-shadow: 0 2px 12px rgba(0,0,0,0.12); }
.profile-avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.profile-avatar-wrap { text-align: center; padding: 24px 16px 8px; position: relative; }
.profile-avatar-badge { position: absolute; right: calc(50% - 55px); bottom: 52px; width: 32px; height: 32px; border-radius: 50%; background: var(--tafuta-red); display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,0.2); pointer-events: none; }
.profile-change-photo { font-size: 0.85rem; color: var(--tafuta-red); font-weight: 500; margin-top: 4px; }
.profile-edit-form { padding: 6px var(--page-gutter) 20px; }
.profile-field { margin-bottom: 16px; }
.profile-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--tafuta-muted); margin-bottom: 6px; }
.profile-input { width: 100%; padding: 14px 16px; border: 1px solid var(--tafuta-border); border-radius: 12px; font-size: 1rem; box-sizing: border-box; }
.profile-readonly { padding: 14px 16px; background: #F5F5F5; border-radius: 12px; color: #616161; font-weight: 500; }
.profile-field-hint { font-size: 0.78rem; color: var(--tafuta-muted); margin-top: 6px; }
#menu-profile-header.profile-header-editable { cursor: pointer; }
#menu-user-avatar .profile-avatar-img { border-radius: 50%; }
.btn-connect { background: var(--tafuta-salmon) !important; color: #fff !important; border-radius: 12px !important; width: 100%; max-width: 300px; margin: 0 auto; }
.menu-card { background: #fff; border-radius: 12px; margin: 6px var(--page-gutter); overflow: hidden; }
.menu-card-item { display: flex; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--tafuta-border); cursor: pointer; }
.menu-card-item:last-child { border-bottom: none; }
.menu-card-item .icon { width: 40px; font-size: 1.3rem; color: var(--tafuta-muted); }
.menu-card-item .text { flex: 1; }
.menu-card-item .title { font-weight: 500; }
.menu-card-item .sub { font-size: 0.8rem; color: var(--tafuta-muted); }
.menu-card-item .chevron { color: #BDBDBD; }
.menu-card-dark { background: #212121; color: #fff; }
.menu-card-dark .title { color: #fff; }
.menu-card-dark .sub { color: #BDBDBD; }

/* Settings */
.settings-section { background: #fff; border-radius: 12px; margin: 6px var(--page-gutter); overflow: hidden; }
.settings-item { display: flex; align-items: center; padding: 14px 12px; border-bottom: 1px solid var(--tafuta-border); }
.settings-item:last-child { border-bottom: none; }
.settings-label { flex: 1; }
.settings-sub { font-size: 0.8rem; color: var(--tafuta-muted); margin-top: 2px; }
.settings-item.lang-option,
.settings-item.lang-picker-row { cursor: pointer; }
.settings-item.lang-option.active .settings-label { color: var(--tafuta-red); font-weight: 600; }
.settings-item .lang-check { display: flex; align-items: center; margin-left: 8px; }
.settings-item-locked { background: #F1F8E9; }
.settings-always-on { color: #558B2F; font-weight: 500; }
.settings-badge-active { font-size: 0.75rem; font-weight: 600; color: #2E7D32; background: #C8E6C9; padding: 4px 10px; border-radius: 12px; white-space: nowrap; margin-left: 8px; }
.section-title { padding: 12px var(--page-gutter) 6px; font-weight: 600; color: var(--tafuta-muted); font-size: 0.85rem; text-transform: uppercase; }

/* Chat ? overlay au-dessus des onglets (ne d?truit pas la carte) */
#chat-host.chat-host {
    position: absolute;
    inset: 0;
    z-index: 40;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: #f7f1ef;
}
#chat-host.chat-host[hidden] {
    display: none !important;
}
.app-shell.chat-mode #tab-content > .tab-panel {
    pointer-events: none;
}

/* Chat ? style WhatsApp */
.chat-container { display: flex; flex-direction: column; flex: 1; min-height: 0; height: auto; }
.chat-page { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #f7f1ef; }
.chat-toolbar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    min-height: 56px;
    padding: 8px 6px 8px 4px;
    background: linear-gradient(180deg, var(--tafuta-red) 0%, var(--tafuta-red-dark) 100%);
    border-bottom: none;
    position: relative;
    z-index: 2;
    color: #fff;
}
.wa-toolbar { box-shadow: 0 2px 10px rgba(198, 40, 40, 0.22); }
.chat-toolbar .chat-back,
.chat-toolbar .chat-call {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    z-index: 3;
    border-radius: 50%;
}
.chat-toolbar .chat-back:active,
.chat-toolbar .chat-call:active { background: rgba(255,255,255,0.14); }
.chat-toolbar .chat-title {
    flex: 1;
    text-align: left;
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #fff;
}
.wa-list-title { text-align: left !important; padding-left: 4px; }
.wa-peer {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.wa-peer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255,255,255,0.2);
    border: 1.5px solid rgba(255,255,255,0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.wa-peer-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wa-peer-text strong {
    font-size: 0.98rem;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.wa-peer-text small {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.82);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 8px var(--page-gutter) 14px;
    -webkit-overflow-scrolling: touch;
    background:
        radial-gradient(ellipse 120% 80% at 50% -20%, rgba(229, 57, 53, 0.07), transparent 55%),
        linear-gradient(180deg, #faf6f5 0%, #f3ebe9 100%);
}
.wa-messages { padding-bottom: 12px; display: flex; flex-direction: column; }
.chat-day {
    display: flex;
    justify-content: center;
    margin: 10px 0 12px;
    position: sticky;
    top: 6px;
    z-index: 1;
}
.chat-day span {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.92);
    color: #5f6b73;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-transform: capitalize;
}
.chat-empty-thread {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 48px 28px;
    text-align: center;
    color: #7a868e;
}
.chat-empty-thread-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(198, 40, 40, 0.1);
}
.chat-empty-thread p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    max-width: 240px;
}
.chat-bubble {
    max-width: min(78%, 320px);
    padding: 8px 10px 6px;
    border-radius: 14px;
    margin-bottom: 2px;
    font-size: 0.935rem;
    line-height: 1.42;
    word-break: break-word;
    position: relative;
    clear: both;
}
.chat-bubble.group-alone,
.chat-bubble.group-start { margin-top: 8px; }
.chat-bubble.group-mid,
.chat-bubble.group-end { margin-top: 2px; }
.chat-bubble.sent {
    background: #FFEBEE;
    margin-left: auto;
    margin-right: 2px;
    border-radius: 14px 14px 4px 14px;
    box-shadow: 0 1px 1px rgba(198, 40, 40, 0.08);
}
.chat-bubble.sent.group-start { border-radius: 14px 14px 4px 14px; }
.chat-bubble.sent.group-mid { border-radius: 14px 6px 6px 14px; }
.chat-bubble.sent.group-end { border-radius: 14px 6px 4px 14px; }
.chat-bubble.received {
    background: #fff;
    margin-right: auto;
    margin-left: 2px;
    border-radius: 14px 14px 14px 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}
.chat-bubble.received.group-start { border-radius: 14px 14px 14px 4px; }
.chat-bubble.received.group-mid { border-radius: 6px 14px 14px 6px; }
.chat-bubble.received.group-end { border-radius: 6px 14px 14px 4px; }
.chat-bubble.has-media { padding: 5px 5px 4px; max-width: min(78%, 260px); }
.chat-bubble-body {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0 8px;
}
.chat-bubble-text {
    white-space: pre-wrap;
    color: #1a2329;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
}
.chat-bubble.has-media .chat-bubble-body { display: block; }
.chat-bubble.has-media .chat-bubble-meta {
    margin-top: 4px;
    justify-content: flex-end;
}
.chat-bubble-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    margin-top: 0;
    margin-left: auto;
    min-height: 15px;
    flex: 0 0 auto;
    padding-top: 2px;
}
.chat-bubble.sent .chat-bubble-meta { justify-content: flex-end; }
.chat-time {
    font-size: 0.64rem;
    color: #80909a;
    line-height: 1;
    padding: 0;
    white-space: nowrap;
}
.wa-ticks {
    font-size: 0.7rem;
    color: var(--tafuta-red);
    letter-spacing: -1.5px;
    line-height: 1;
    margin-left: 1px;
    opacity: 0.9;
}
.chat-input-bar {
    display: flex;
    align-items: flex-end;
    padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 0px));
    background: #f3ebe9;
    border-top: 1px solid rgba(198, 40, 40, 0.06);
    gap: 6px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
}
.wa-input-bar { background: #f3ebe9; }
.chat-composer {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
    background: #fff;
    border-radius: 24px;
    padding: 4px 6px 4px 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}
.chat-input-bar input[type="text"] {
    flex: 1;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 10px 8px;
    outline: none;
    min-width: 0;
    font-size: 0.95rem;
    box-shadow: none;
    color: #1a2329;
}
.chat-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #667781;
    padding: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
}
.chat-btn:active { background: rgba(0,0,0,0.05); }
.chat-btn.send,
.wa-send {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--tafuta-red) !important;
    color: #fff !important;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(229, 57, 53, 0.32);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
}
.wa-send .fas,
.wa-send .fa,
.wa-send ons-icon {
    color: #fff !important;
    font-size: 18px !important;
    line-height: 1;
    display: inline-block;
}
.wa-send:active { transform: scale(0.94); background: var(--tafuta-red-dark) !important; }
.wa-attach, .wa-mic { min-width: 38px; min-height: 38px; color: #7a868e; }
.chat-file-input,
#chat-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
.chat-input-bar { position: relative; }
.chat-list-page,
.wa-list-page { background: #fff; }
.wa-search-wrap {
    flex-shrink: 0;
    padding: 8px 12px 6px;
    background: #fff;
    border-bottom: 1px solid #f0f2f5;
}
.wa-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    background: #f0f2f5;
}
.wa-search-bar input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    min-width: 0;
    color: #111b21;
}
.chat-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
}
.chat-list-loading,
.chat-list-empty {
    padding: 48px 20px;
    text-align: center;
    color: #667781;
}
.chat-list-empty-icon { margin-bottom: 12px; opacity: 0.7; }
.chat-list-item {
    width: 100%;
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid #f0f2f5;
    background: #fff;
    text-align: left;
}
.chat-list-item:active,
.chat-list-open:active { background: #f5f6f6; }
.chat-list-item.unread .chat-list-preview { color: #111b21; font-weight: 600; }
.chat-list-item.unread .chat-list-time.unread { color: var(--tafuta-red); font-weight: 700; }
.chat-list-open {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 12px 14px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    min-width: 0;
}
.chat-list-delete {
    border: none;
    background: transparent;
    padding: 12px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.55;
}
.chat-list-delete:active { opacity: 1; background: #FFEBEE; }
.chat-list-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #dfe5e7;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.chat-list-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-list-main { flex: 1; min-width: 0; }
.chat-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}
.chat-list-top strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.98rem;
    color: #111b21;
}
.chat-list-time { font-size: 0.72rem; color: #667781; flex-shrink: 0; }
.chat-list-bottom {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-list-preview {
    flex: 1;
    min-width: 0;
    font-size: 0.86rem;
    color: #667781;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.chat-list-meta {
    font-size: 0.72rem;
    color: #9E9E9E;
    margin-top: 2px;
}
.chat-list-badge {
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    background: var(--tafuta-red);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}
.chat-media-image {
    max-width: 100%;
    width: 220px;
    border-radius: 10px;
    display: block;
    background: #f0f0f0;
}
.chat-media-audio { width: 100%; max-width: 220px; margin: 2px 0; }

/* Note vocale style WhatsApp */
.chat-bubble.has-media:has(.wa-voice) { max-width: min(82%, 280px); padding: 6px 8px 4px; }
.wa-voice {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 180px;
    padding: 2px 0 4px;
    user-select: none;
}
.wa-voice-play {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 0;
    background: rgba(229, 57, 53, 0.12);
    color: var(--tafuta-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}
.chat-bubble.sent .wa-voice-play {
    background: rgba(255,255,255,0.35);
    color: #fff;
}
.wa-voice-play i { font-size: 13px; margin-left: 1px; }
.wa-voice.is-playing .wa-voice-play i { margin-left: 0; }
.wa-voice-wave {
    flex: 1;
    min-width: 0;
    position: relative;
    height: 28px;
    display: flex;
    align-items: center;
}
.wa-voice-bars {
    display: flex;
    align-items: center;
    gap: 2px;
    width: 100%;
    height: 22px;
    opacity: 0.55;
}
.wa-voice-bars span {
    flex: 1;
    display: block;
    border-radius: 2px;
    background: currentColor;
    min-height: 4px;
}
.chat-bubble.sent .wa-voice-bars { color: #fff; }
.chat-bubble.received .wa-voice-bars { color: #546e7a; }
.wa-voice-bars span:nth-child(1) { height: 30%; }
.wa-voice-bars span:nth-child(2) { height: 55%; }
.wa-voice-bars span:nth-child(3) { height: 80%; }
.wa-voice-bars span:nth-child(4) { height: 45%; }
.wa-voice-bars span:nth-child(5) { height: 95%; }
.wa-voice-bars span:nth-child(6) { height: 60%; }
.wa-voice-bars span:nth-child(7) { height: 35%; }
.wa-voice-bars span:nth-child(8) { height: 70%; }
.wa-voice-bars span:nth-child(9) { height: 50%; }
.wa-voice-bars span:nth-child(10) { height: 85%; }
.wa-voice-bars span:nth-child(11) { height: 40%; }
.wa-voice-bars span:nth-child(12) { height: 65%; }
.wa-voice.is-playing .wa-voice-bars span {
    animation: waVoicePulse 0.9s ease-in-out infinite;
}
.wa-voice.is-playing .wa-voice-bars span:nth-child(odd) { animation-delay: .15s; }
.wa-voice.is-playing .wa-voice-bars span:nth-child(3n) { animation-delay: .3s; }
@keyframes waVoicePulse {
    0%, 100% { transform: scaleY(0.55); }
    50% { transform: scaleY(1); }
}
.wa-voice-progress {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 3px;
    background: rgba(0,0,0,0.08);
    border-radius: 2px;
    overflow: hidden;
}
.chat-bubble.sent .wa-voice-progress { background: rgba(255,255,255,0.25); }
.wa-voice-progress i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--tafuta-red);
    border-radius: 2px;
}
.chat-bubble.sent .wa-voice-progress i { background: #fff; }
.wa-voice-dur {
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    opacity: 0.75;
    min-width: 2.2em;
    text-align: right;
}

/* Visibilit? barre vocal / composer */
.wa-rec-bar.hidden,
#wa-composer.hidden,
#wa-send-btn.hidden,
#wa-mic-btn.hidden {
    display: none !important;
}
.wa-input-bar.is-recording #wa-composer { display: none !important; }
.wa-input-bar.is-recording .wa-rec-bar { display: flex !important; }
.wa-input-bar:not(.is-recording) .wa-rec-bar { display: none !important; }

/* Barre d?enregistrement (mode vocal) */
.wa-mic-fab {
    width: 46px !important;
    height: 46px !important;
    border-radius: 50% !important;
    background: var(--tafuta-red) !important;
    color: #fff !important;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(229, 57, 53, 0.32);
    padding: 0 !important;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.wa-mic-fab i { font-size: 18px; color: #fff !important; }
.wa-mic-fab.is-recording {
    transform: scale(1.12);
    box-shadow: 0 0 0 8px rgba(229, 57, 53, 0.2), 0 4px 14px rgba(229, 57, 53, 0.4);
    animation: waMicPulse 1.1s ease-in-out infinite;
}
@keyframes waMicPulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(229, 57, 53, 0.18), 0 4px 14px rgba(229, 57, 53, 0.35); }
    50% { box-shadow: 0 0 0 12px rgba(229, 57, 53, 0.12), 0 4px 18px rgba(229, 57, 53, 0.45); }
}
.wa-rec-bar {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 24px;
    padding: 8px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}
.wa-rec-trash {
    border: 0;
    background: #fdecea;
    color: var(--tafuta-red);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}
.wa-rec-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--tafuta-red);
    flex-shrink: 0;
    animation: waRecBlink 1s step-end infinite;
}
@keyframes waRecBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.2; }
}
.wa-rec-timer {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #1a2329;
    min-width: 2.6em;
}
.wa-rec-hint {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem;
    color: #7a868e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wa-rec-send {
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: var(--tafuta-red);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(229, 57, 53, 0.28);
}
.wa-rec-send i { font-size: 14px; color: #fff; }
.wa-input-bar.will-cancel .wa-rec-bar {
    background: #fdecea;
    border-color: rgba(229, 57, 53, 0.25);
}
.wa-input-bar.will-cancel .wa-rec-hint { color: var(--tafuta-red); font-weight: 600; }
.wa-input-bar.is-recording .wa-send,
.wa-input-bar.is-recording #wa-send-btn,
.wa-input-bar.is-recording #wa-mic-btn { display: none !important; }

/* :has() fallback ? widen vocal bubbles */
.chat-bubble.has-media .wa-voice { min-width: 170px; }
.chat-file-link {
    color: var(--tafuta-red-dark);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 2px;
}
.app-shell.chat-mode .tafuta-tabbar { display: none; }
.app-shell.chat-mode .app-shell-content { overflow: hidden; }
.app-shell.chat-mode .tafuta-fab,
.app-shell.chat-mode .tafuta-notif-panel { display: none !important; }

/* Anciens gros FABs d?sactiv?s ? ic?nes compactes dans le header */
.tafuta-fab { display: none !important; }

.tafuta-notif-panel {
    position: fixed;
    inset: 0;
    z-index: 5200;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.tafuta-notif-panel.hidden { display: none; }
.tafuta-notif-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(11, 20, 26, 0.45);
    cursor: pointer;
}
.tafuta-notif-sheet {
    position: relative;
    z-index: 1;
    width: min(440px, 100%);
    max-height: min(78vh, 640px);
    background: #fff;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: tafuta-notif-up 0.22s ease-out;
}
@keyframes tafuta-notif-up {
    from { transform: translateY(24px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}
.tafuta-notif-handle {
    width: 40px;
    height: 4px;
    border-radius: 99px;
    background: #d1d7db;
    margin: 10px auto 4px;
    flex-shrink: 0;
}
.tafuta-notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 12px 10px 16px;
    border-bottom: 1px solid #f0f2f5;
}
.tafuta-notif-head-text { min-width: 0; }
.tafuta-notif-head-text strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 800;
    color: #111b21;
}
.tafuta-notif-head-text small {
    color: #667781;
    font-size: 0.75rem;
}
.tafuta-notif-head-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.tafuta-notif-action {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #54656f;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.tafuta-notif-action:active { background: #f0f2f5; }
.tafuta-notif-action.danger { color: #d32f2f; }
.tafuta-notif-search {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 14px 6px;
    padding: 0 12px;
    height: 40px;
    border-radius: 10px;
    background: #f0f2f5;
    flex-shrink: 0;
}
.tafuta-notif-search input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.9rem;
    min-width: 0;
    color: #111b21;
}
.tafuta-notif-list {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 1;
    min-height: 0;
    padding: 4px 0 calc(12px + env(safe-area-inset-bottom, 0px));
}
.tafuta-notif-item {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid #f0f2f5;
}
.tafuta-notif-item:last-child { border-bottom: none; }
.tafuta-notif-item.unread { background: #e7f8f0; }
.tafuta-notif-item.unread .tafuta-notif-title { color: var(--tafuta-red); }
.tafuta-notif-open {
    flex: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 6px 12px 14px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    min-width: 0;
    font: inherit;
    color: inherit;
}
.tafuta-notif-open:active { background: rgba(0,0,0,0.04); }
.tafuta-notif-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.tafuta-notif-icon.chat { background: var(--tafuta-red); }
.tafuta-notif-icon.course { background: var(--tafuta-red-dark); }
.tafuta-notif-icon.pay { background: #F59E0B; }
.tafuta-notif-icon.call { background: #3B82F6; }
.tafuta-notif-icon.order { background: #8B5CF6; }
.tafuta-notif-icon.sys { background: #64748B; }
.tafuta-notif-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.tafuta-notif-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: #111b21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tafuta-notif-msg {
    color: #667781;
    font-size: 0.82rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tafuta-notif-time {
    font-size: 0.7rem;
    color: #8696a0;
    margin-top: 2px;
}
.tafuta-notif-del {
    width: 40px;
    border: 0;
    background: transparent;
    color: #8696a0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.tafuta-notif-del:active { color: #d32f2f; background: #FFEBEE; }
.tafuta-notif-empty {
    padding: 36px 20px;
    text-align: center;
    color: #667781;
    font-size: 0.9rem;
}
.tafuta-notif-empty-icon { margin-bottom: 10px; opacity: 0.75; }

.chat-bubble.deleted {
    background: rgba(255,255,255,0.65) !important;
    box-shadow: none !important;
    font-style: italic;
    color: var(--tafuta-muted);
    border: 1px dashed #d0d5d8;
    opacity: 0.9;
}
.chat-deleted-text { font-size: 0.86rem; color: #80909a; }
.chat-msg-menu-wrap {
    position: absolute;
    top: 2px;
    left: 2px;
    display: inline-flex;
    align-items: center;
    z-index: 2;
}
.chat-msg-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 22px;
    border: none;
    background: transparent;
    border-radius: 6px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    color: #667781;
    -webkit-tap-highlight-color: transparent;
}
.chat-bubble.sent:active .chat-msg-menu-btn,
.chat-bubble.menu-open .chat-msg-menu-btn,
.chat-msg-menu-btn:active {
    opacity: 1;
    background: rgba(0,0,0,0.06);
}
.chat-msg-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 40;
    min-width: 148px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    padding: 4px;
    overflow: hidden;
}
.chat-bubble.menu-open .chat-msg-dropdown { display: block; }
.chat-msg-dropdown-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    color: #222;
}
.chat-msg-dropdown-item.danger { color: #d32f2f; }
.chat-msg-dropdown-item:active { background: #f5f5f5; }
.chat-bubble.selected {
    outline: 2px solid rgba(211, 47, 47, 0.35);
    outline-offset: 1px;
}
.chat-delete-sheet {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 6000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}
.chat-delete-sheet.hidden { display: none; }
.chat-delete-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 8px 0 calc(10px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 24px rgba(0,0,0,0.12);
}
.chat-delete-title {
    padding: 14px 16px 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #222;
    text-align: center;
}
.chat-delete-action {
    width: 100%;
    border: none;
    background: #fff;
    padding: 14px 16px;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    color: #222;
}
.chat-delete-action.danger { color: #d32f2f; font-weight: 600; }
.chat-delete-action:active { background: #f5f5f5; }
.chat-delete-cancel {
    width: calc(100% - 24px);
    margin: 8px 12px 0;
    border: none;
    border-radius: 12px;
    background: #f0f0f0;
    padding: 12px;
    font-weight: 600;
    cursor: pointer;
}

.tafuta-call-overlay.hidden { display: none; }
.tafuta-call-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 18, 0.92);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.tafuta-call-card {
    width: 100%;
    max-width: 360px;
    background: #1b1b1b;
    color: #fff;
    border-radius: 22px;
    padding: 28px 20px 22px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
    text-align: center;
}
.tafuta-call-pulse {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: rgba(229, 57, 53, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tafuta-call-pulse 1.4s ease-in-out infinite;
}
.tafuta-call-pulse Ons-icon,
.tafuta-call-pulse ons-icon,
.tafuta-call-pulse-icon {
    font-size: 36px;
    color: #E53935;
}
.tafuta-call-overlay.is-active .tafuta-call-pulse { animation: none; background: rgba(76, 175, 80, 0.18); }
.tafuta-call-overlay.is-active .tafuta-call-pulse-icon { color: #66BB6A; }
@keyframes tafuta-call-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,57,53,0.35); }
    50% { transform: scale(1.06); box-shadow: 0 0 0 14px rgba(229,57,53,0); }
}
.tafuta-call-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 6px; }
.tafuta-call-status { color: #BDBDBD; margin-bottom: 8px; min-height: 1.2em; }
.tafuta-call-timer {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin: 4px 0 18px;
    font-variant-numeric: tabular-nums;
    color: #fff;
}
.tafuta-call-timer.is-hidden { display: none; }
.tafuta-call-controls {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-bottom: 18px;
}
.tafuta-call-controls.is-hidden { display: none; }
.tafuta-call-ctrl {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: none;
    background: #333;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.tafuta-call-ctrl.on {
    background: #fff;
    color: #111;
}
.tafuta-call-ctrl .ctrl-ico { font-size: 22px; line-height: 1; }
.tafuta-call-actions { display: flex; gap: 10px; }
.tafuta-call-actions .taxi-refuse-btn,
.tafuta-call-actions .taxi-accept-btn {
    flex: 1;
}

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; }
.dash-card { background: #fff; border-radius: 12px; padding: 16px; text-align: center; }
.dash-value { font-size: 1.8rem; font-weight: 700; color: var(--tafuta-red); }
.dash-label { font-size: 0.8rem; color: var(--tafuta-muted); margin-top: 4px; }

/* Taxi ride */
.ride-status { text-align: center; padding: 32px 16px; }
.ride-status .icon-big { font-size: 4rem; margin-bottom: 16px; }
.ride-info { background: #fff; border-radius: 12px; margin: 16px; padding: 16px; }
.ride-row { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.ride-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; }
.ride-dot.green { background: #4CAF50; }
.ride-dot.red { background: var(--tafuta-red); }

#tab-content.tab-taxi-active {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
#tab-panel-taxi.is-active,
#tab-panel-taxi:not([hidden]) {
    height: 100%;
    min-height: 0;
}
#tab-content.tab-taxi-active .taxi-layout,
#tab-panel-taxi .taxi-layout {
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}
.taxi-layout {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: #f7f8fa;
}
/* Page de base (pas un modal) */
.taxi-page {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #fff;
    overflow: hidden;
    position: relative;
    z-index: 2;
}
.taxi-page-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px 0;
    border-bottom: 1px solid #eee;
    background: #fff;
}
.taxi-page-head .taxi-panel-tabs {
    flex: 1;
    margin: 0;
    border: none;
    border-bottom: none;
    padding: 0;
    background: transparent;
}
.taxi-page-map-btn { display: none !important; }
.taxi-layout.map-hidden .taxi-map-stage {
    display: none !important;
}
.taxi-layout.map-visible .taxi-page {
    display: none !important;
}
.taxi-layout.map-visible .taxi-map-stage {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
}
.taxi-map-back-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 1200;
    display: none;
    align-items: center;
    gap: 6px;
    border: none;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    border-radius: 12px;
    min-height: 44px;
    height: 44px;
    padding: 0 14px 0 10px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.taxi-layout.map-visible .taxi-map-back-bar {
    display: inline-flex;
}
.taxi-dest-intro {
    margin: 0 0 8px;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.35;
}
.taxi-open-map-pick {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 12px;
    margin-bottom: 8px;
    border: 1.5px dashed #1a73e8;
    background: #eef5ff;
    color: #1a73e8;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
    text-align: left;
}
.taxi-open-map-pick:active {
    transform: scale(0.98);
    background: #e3eeff;
}
.taxi-map-nudge {
    position: absolute;
    left: 12px;
    bottom: 72px;
    z-index: 8;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    pointer-events: auto;
}
.taxi-map-nudge button {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: rgba(255,255,255,.95);
    box-shadow: 0 2px 8px rgba(0,0,0,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #222;
}
.taxi-nudge-mid {
    display: flex;
    gap: 28px;
}
.taxi-place-dist {
    font-variant-numeric: tabular-nums;
    color: #1a73e8;
    font-weight: 700;
    white-space: nowrap;
}

/* ===== Mode chauffeur (apps pro) ===== */
.taxi-layout.chauffeur-mode {
    background: #0f1714;
}
.chauffeur-page {
    background: linear-gradient(180deg, #12201a 0%, #f4f6f5 42%);
}
.drv-hero {
    padding: 14px 16px 10px;
    color: #fff;
}
.drv-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}
.drv-eyebrow {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.7;
    font-weight: 700;
}
.drv-hello {
    margin: 4px 0 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.drv-status-pill {
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    color: #f0f0f0;
}
.drv-status-pill.on {
    background: rgba(46, 204, 113, 0.22);
    color: #7dffb2;
}
.drv-status-pill.busy {
    background: rgba(255, 167, 38, 0.22);
    color: #ffd28a;
}
.drv-online-btn.is-busy {
    background: linear-gradient(135deg, #c47a12, #9a5a0a);
}
.drv-online-btn.is-busy .drv-online-dot {
    background: #ffd28a;
    box-shadow: 0 0 0 4px rgba(255, 210, 138, 0.28);
    animation: none;
}
.drv-online-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: none;
    border-radius: 16px;
    padding: 14px 16px;
    background: #1a2e26;
    color: #fff;
    cursor: pointer;
    text-align: left;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.drv-online-btn.is-online {
    background: linear-gradient(135deg, #0f8a4b, #0b6b3a);
}
.drv-online-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #88998f;
    flex-shrink: 0;
    box-shadow: 0 0 0 4px rgba(136,153,143,0.25);
}
.drv-online-btn.is-online .drv-online-dot {
    background: #7dffb2;
    box-shadow: 0 0 0 4px rgba(125,255,178,0.28);
    animation: taxiPulse 1.4s ease-in-out infinite;
}
.drv-online-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.drv-online-label {
    font-size: 1.05rem;
    font-weight: 800;
}
.drv-online-text small {
    font-size: 0.75rem;
    opacity: 0.8;
    line-height: 1.3;
}
.drv-online-action {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(255,255,255,0.14);
}
.drv-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 12px;
}
.drv-stat {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 10px 8px;
    text-align: center;
}
.drv-stat strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 2px;
}
.drv-stat span {
    font-size: 0.68rem;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.drv-tabs-head {
    background: #fff;
    border-radius: 18px 18px 0 0;
    margin-top: 8px;
    border-bottom: 1px solid #eee;
}
.chauffeur-page .drv-content {
    background: #fff;
    padding: 12px 14px 20px;
}
.drv-home-card {
    background: #f7f9f8;
    border: 1px solid #e6ebe8;
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
}
.drv-home-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #1a2e26;
}
.drv-home-card p {
    margin: 0 0 12px;
    font-size: 0.86rem;
    color: #556;
    line-height: 1.4;
}
.drv-steps {
    margin: 0 0 12px;
    padding-left: 18px;
    font-size: 0.86rem;
    color: #334;
    line-height: 1.55;
}
.drv-earn-head {
    margin-bottom: 12px;
}
.drv-earn-head h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 800;
}
.drv-earn-head p {
    margin: 0;
    font-size: 0.82rem;
    color: #667;
}
.drv-dash-grid .drv-earn-main {
    grid-column: 1 / -1;
    background: #12201a;
    color: #fff;
}
.drv-dash-grid .drv-earn-main .dash-label {
    color: rgba(255,255,255,0.7);
}
.chauffeur-page .taxi-drivers-title {
    font-weight: 800;
    color: #1a2e26;
}
.chauffeur-page .taxi-ride-card.is-pending {
    border: 1px solid #0f8a4b;
    box-shadow: 0 4px 16px rgba(15, 138, 75, 0.12);
}
.taxi-page .taxi-search-wrap {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 12px 14px 8px;
    overflow: hidden;
}
.taxi-page .taxi-places-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 16px;
}
.taxi-page .taxi-sheet-drivers {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px 16px;
}
.taxi-pulse-msg {
    animation: taxiPulse 1.1s ease-in-out infinite;
}
@keyframes taxiPulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}
.taxi-instant .icon-big {
    animation: taxiPulse 1.1s ease-in-out infinite;
}
#tab-panel-taxi .tafuta-header {
    flex-shrink: 0;
}
#tab-content.tab-taxi-active {
    overflow: hidden;
    touch-action: manipulation;
}
.taxi-map-stage {
    flex: 1 1 auto;
    position: relative;
    min-height: 220px;
    width: 100%;
    touch-action: none;
    overscroll-behavior: none;
}
#taxi-gmaps.taxi-gmaps-frame {
    z-index: 1;
    touch-action: none;
    pointer-events: none; /* pan tactile g?r? par #taxi-map-pan-layer */
}
.taxi-map-stage.is-directions #taxi-gmaps.taxi-gmaps-frame {
    pointer-events: auto;
    touch-action: manipulation;
}
.taxi-map-pan-layer {
    position: absolute;
    inset: 0;
    z-index: 3;
    touch-action: none;
    background: transparent;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}
.taxi-map-pan-layer.is-dragging {
    cursor: grabbing;
}
.taxi-map-stage.is-directions .taxi-map-pan-layer {
    pointer-events: none;
}
.taxi-map-layer,
.taxi-streetview-layer {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}
.taxi-map-layer.leaflet-container,
#taxi-map.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    background: #d6e4ef;
}
/* Emp?che les tuiles floues / fragment?es (img globales, retina) */
.leaflet-container img.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
    width: 256px !important;
    height: 256px !important;
    image-rendering: auto;
}
.leaflet-container .leaflet-marker-icon,
.leaflet-container .leaflet-marker-shadow {
    max-width: none !important;
}
.taxi-streetview-layer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.taxi-view-hidden { display: none !important; }
.taxi-map-toolbar {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    gap: 6px;
    pointer-events: none;
}
.taxi-map-tool {
    pointer-events: auto;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    box-shadow: 0 1px 6px rgba(0,0,0,0.12);
    cursor: pointer;
    font-size: 0;
    color: #333;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.taxi-map-tool ons-icon,
.taxi-map-tool .ons-icon {
    font-size: 18px !important;
}
.taxi-map-tool.active {
    background: var(--tafuta-red);
    color: #fff;
}
.taxi-map-tool:active { transform: scale(0.94); opacity: 0.9; }
.taxi-map-tool.taxi-start-btn {
    background: rgba(27, 122, 74, 0.95) !important;
    color: #fff !important;
    font-size: 0.95rem;
}
.taxi-map-tool.taxi-start-btn.is-online {
    background: rgba(198, 40, 40, 0.95) !important;
}
@media (max-width: 420px) {
    .taxi-map-toolbar {
        top: 8px;
        right: 8px;
        gap: 5px;
    }
    .taxi-map-tool {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}
@media (min-width: 768px) {
    .taxi-map-toolbar {
        top: 14px;
        right: 14px;
        gap: 8px;
    }
    .taxi-map-tool {
        width: 44px;
        height: 44px;
        min-width: 44px;
    }
}
/* Ancienne barre position ? masqu?e si encore pr?sente */
.taxi-city-label { display: none !important; }
/* Ancien modal sheet neutralis? ? on utilise .taxi-page */
.taxi-bottom-sheet:not(.taxi-page) { display: none !important; }
.taxi-sheet-handle,
.taxi-sheet-close,
.taxi-sheet-reopen,
.taxi-sheet-top { display: none !important; }
.taxi-panel-tabs {
    flex-shrink: 0;
}
.taxi-search-wrap { padding: 4px 12px 8px; flex-shrink: 0; }
.taxi-search-bar { margin: 0; cursor: default; }
.taxi-search-bar input { border: none; background: transparent; flex: 1; font-size: 1rem; outline: none; min-width: 0; }
.taxi-places-label { font-size: 0.75rem; font-weight: 600; color: var(--tafuta-muted); margin: 4px 0 6px; text-transform: uppercase; }
.taxi-places-list,
.taxi-places-chips {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 4px;
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}
.taxi-page .taxi-places-list {
    max-height: none;
    flex: 1 1 auto;
}
.taxi-place-chip {
    width: 100%;
    border: 1px solid var(--tafuta-border);
    background: #FAFAFA;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--tafuta-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    flex-shrink: 0;
}
.taxi-place-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taxi-place-chip:active { background: #FFEBEE; border-color: var(--tafuta-red); }
.taxi-place-dist { font-size: 0.72rem; color: var(--tafuta-muted); background: #EEE; padding: 2px 6px; border-radius: 8px; }
.taxi-place-empty, .taxi-place-loading { font-size: 0.85rem; color: var(--tafuta-muted); }
.taxi-sheet-drivers { padding: 0 0 4px; }
.taxi-city-fallback { margin: 8px 12px; padding: 10px; background: #FFF8E1; border-radius: 10px; font-size: 0.85rem; }
.taxi-city-fallback p { margin: 0 0 8px; color: #795548; }
.taxi-city-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.taxi-city-picks button { border: 1px solid var(--tafuta-border); background: #fff; border-radius: 16px; padding: 6px 14px; font-size: 0.82rem; cursor: pointer; }
.taxi-city-picks button:active { background: #FFEBEE; border-color: var(--tafuta-red); }
.taxi-dest-summary { background: #F9F9F9; margin: 8px 12px 0; padding: 12px 14px; border-radius: 12px; }
.taxi-estimate { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--tafuta-border); font-size: 0.9rem; }
.taxi-estimate strong { color: var(--tafuta-red); font-size: 1rem; }
.taxi-filter-bar {
    display: flex;
    gap: 8px;
    padding: 8px 12px 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.taxi-filter-bar::-webkit-scrollbar { display: none; }
.taxi-drivers-title { padding: 6px 12px 4px; font-size: 0.85rem; }
.taxi-drivers-list { padding: 0 12px 8px; }
.taxi-drivers-list-compact { padding: 0 12px 8px; }

@media (max-width: 380px) {
    .taxi-panel-tab span { font-size: 0.72rem; }
    .taxi-filter { padding: 6px 10px; font-size: 0.75rem; }
    .taxi-driver-contact-btn { min-width: 0; font-size: 0.72rem; padding: 7px 8px; }
}
.taxi-panel-tabs {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 4px 0 8px;
    border-bottom: 1px solid var(--tafuta-border);
    background: #fff;
}
.taxi-panel-tab {
    flex: 1;
    border: 0;
    background: transparent;
    padding: 10px 4px;
    font-weight: 600;
    font-size: .82rem;
    color: var(--tafuta-muted, #888);
    border-bottom: 2px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 0;
}
.taxi-panel-tab span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.taxi-panel-tab.active { color: var(--tafuta-red); border-bottom-color: var(--tafuta-red); }
.taxi-panel-refresh {
    flex: 0 0 auto;
    width: 36px;
    border: 0;
    background: transparent;
    color: #9aa0a6;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin: 4px 4px 4px 0;
}
.taxi-panel-refresh:active { background: #f3f4f6; color: var(--tafuta-red); }
.taxi-filter {
    flex-shrink: 0;
    border: 1px solid var(--tafuta-border);
    background: #fff;
    border-radius: 20px;
    padding: 7px 12px;
    font-size: 0.82rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.taxi-ride-card .taxi-status-pill { margin-left: 4px; }
.taxi-start-btn { font-size: 0.95rem !important; }
.taxi-status-pill {
    display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase;
    padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
.taxi-status-pill.free { background: #e7f6ee; color: #1b7a4a; }
.taxi-status-pill.busy { background: #fff4d6; color: #9a6b00; }
.taxi-driver-card.is-free { border-color: #a8d8ba; }
.taxi-driver-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
    text-align: left; border: 1px solid var(--tafuta-border); background: #fff; border-radius: 10px;
    padding: 10px 12px; margin-bottom: 0; cursor: pointer;
}
.taxi-driver-avatar {
    width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.taxi-driver-avatar.car { background: #E3F2FD; color: #1565C0; }
.taxi-driver-avatar.moto { background: #FFF3E0; }
.taxi-driver-row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.taxi-driver-row-main strong { font-size: 0.9rem; line-height: 1.2; }
.taxi-driver-row-main small { color: var(--tafuta-muted, #888); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.taxi-driver-row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.taxi-pick-hint { font-size: 0.68rem; font-weight: 700; color: var(--tafuta-red); }
.taxi-dest-summary-compact { margin: 6px 12px 0; padding: 10px 12px; }
.taxi-dest-line { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.taxi-dest-line .ride-dot { flex-shrink: 0; }
.taxi-filter.active { background: var(--tafuta-red); color: #fff; border-color: var(--tafuta-red); }
.taxi-drivers-title { padding: 10px 16px 6px; font-weight: 600; font-size: 0.9rem; }
.taxi-drivers-list { padding: 0 16px 12px; }
.taxi-driver-card { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); border: 1px solid var(--tafuta-border); }
.taxi-driver-icon { width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.3rem; }
.taxi-driver-icon.car { background: #E3F2FD; color: #1565C0; }
.taxi-driver-icon.moto { background: #FFF3E0; }
.taxi-driver-info { flex: 1; min-width: 0; }
.taxi-driver-name { font-weight: 600; margin-bottom: 2px; font-size: 0.92rem; }
.taxi-driver-meta { font-size: 0.76rem; color: var(--tafuta-muted); }
.taxi-driver-btn { width: auto !important; min-width: 76px; padding: 0 10px !important; font-size: 0.78rem !important; margin: 0 !important; }
.taxi-loading-drivers, .taxi-no-drivers { text-align: center; padding: 16px; color: var(--tafuta-muted); font-size: 0.9rem; }
.taxi-assigned { font-size: 0.9rem; color: #2E7D32; margin-top: 8px; }
.taxi-pending-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: 999px;
    background: var(--tafuta-red);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
}
.taxi-pending-badge.hidden { display: none; }
.taxi-ride-card {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    cursor: default;
}
.taxi-ride-card.is-pending {
    border-color: #f0b429;
    background: #fffbeb;
}
.taxi-ride-main {
    display: flex;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}
.taxi-ride-actions {
    display: flex;
    gap: 8px;
    padding-top: 4px;
}
.taxi-accept-btn,
.taxi-refuse-btn {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}
.taxi-accept-btn { background: #1b7a4a; color: #fff; }
.taxi-refuse-btn { background: #eee; color: #444; }

/* Modal instantan? : proposition de prix au client */
.tafuta-price-offer-overlay {
    position: fixed;
    inset: 0;
    z-index: 5200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 16, 22, 0.78);
    animation: tafuta-price-fade 0.22s ease-out;
}
@keyframes tafuta-price-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}
.tafuta-price-offer-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    color: #1a1a1a;
    border-radius: 20px;
    padding: 26px 20px 18px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
    text-align: center;
    animation: tafuta-price-pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1);
}
@keyframes tafuta-price-pop {
    from { transform: translateY(18px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
.tafuta-price-offer-pulse {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: rgba(229, 57, 53, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #E53935;
    animation: tafuta-call-pulse 1.4s ease-in-out infinite;
}
.tafuta-price-offer-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.tafuta-price-offer-driver {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}
.tafuta-price-offer-amount {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--tafuta-red, #E53935);
    margin: 4px 0 14px;
    letter-spacing: 0.02em;
}
.tafuta-price-offer-route {
    text-align: left;
    background: #f6f7f9;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 16px;
}
.tafuta-price-offer-route .ride-row { margin: 4px 0; }
.tafuta-price-offer-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.tafuta-price-offer-actions .taxi-accept-btn,
.tafuta-price-offer-actions .taxi-refuse-btn {
    padding: 12px 10px;
    font-size: 0.9rem;
}
.tafuta-price-offer-chat {
    width: 100%;
    margin-bottom: 8px;
}
.tafuta-price-offer-hint {
    margin: 0;
    font-size: 0.78rem;
    color: #888;
    line-height: 1.35;
}

/* Paiement fin de course (chauffeur) */
.taxi-arrive-btn {
    flex: 1 1 100%;
    border: 0;
    border-radius: 10px;
    padding: 12px 14px;
    font-weight: 800;
    font-size: 0.95rem;
    cursor: pointer;
    background: var(--tafuta-red, #E53935);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.taxi-nav-actions .taxi-arrive-btn { order: -1; }
.tafuta-pay-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
    text-align: left;
}
.tafuta-pay-method {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    background: #fff;
}
.tafuta-pay-method.is-selected {
    border-color: var(--tafuta-red, #E53935);
    background: rgba(229, 57, 53, 0.06);
}
.tafuta-pay-method input {
    margin-top: 3px;
    accent-color: var(--tafuta-red, #E53935);
}
.tafuta-pay-method-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.tafuta-pay-method-body strong { font-size: 0.95rem; }
.tafuta-pay-method-body small { color: #777; font-size: 0.78rem; }
.tafuta-ride-pay-mm { margin-bottom: 12px; text-align: left; }
.tafuta-ride-pay-mm.hidden { display: none !important; }
.tafuta-ride-pay-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
}
.tafuta-ride-pay-field input {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 1rem;
    font-weight: 500;
    color: #222;
}

.taxi-price-btn {
    flex: 1;
    border: 0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    background: #1565C0;
    color: #fff;
}
.taxi-driver-contact {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}
.taxi-driver-contact-btn {
    flex: 1;
    min-width: 90px;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.taxi-driver-contact-btn.call { background: #E8F5E9; color: #1B7A4A; }
.taxi-driver-contact-btn.chat { background: #E3F2FD; color: #1565C0; }
.taxi-driver-contact-icons {
    flex: 0 0 auto;
    margin: 0;
    gap: 4px;
}
.taxi-driver-contact-icons .taxi-driver-contact-btn {
    flex: 0 0 auto;
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 9px;
}
.taxi-driver-row-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 6px;
    border: 1px solid var(--tafuta-border);
    overflow: hidden;
    padding-right: 6px;
}
.taxi-driver-row-wrap.is-free { border-color: #a8d8ba; }
.taxi-driver-row-wrap.is-busy { opacity: 0.72; }
.taxi-driver-row-wrap .taxi-driver-row {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    margin: 0;
    box-shadow: none;
    background: transparent;
}
.taxi-driver-row-wrap .taxi-driver-contact {
    padding: 0;
    margin: 0;
}
.taxi-route-card { margin: 6px var(--page-gutter) 10px; }
.taxi-places-hint {
    font-weight: 400;
    color: var(--tafuta-muted, #888);
    font-size: 0.78rem;
}
.taxi-save-place-btn {
    width: 100%;
    border: 1px dashed #1565C0;
    background: #E3F2FD;
    color: #1565C0;
    border-radius: 10px;
    padding: 10px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.taxi-pin-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--tafuta-red);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
}
.taxi-map-pin { background: transparent; border: none; }
.taxi-pin-dot { width: 16px; height: 16px; background: var(--tafuta-red); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
.taxi-driver-pin { font-size: 16px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3)); }
.leaflet-container { font-family: inherit; z-index: 1; }
.leaflet-top, .leaflet-bottom { z-index: 900; }
.leaflet-control-zoom { border: none !important; box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important; }

/* Cart */
.cart-bar {
    position: fixed;
    left: max(8px, var(--safe-left));
    right: max(8px, var(--safe-right));
    bottom: calc(84px + var(--safe-bottom));
    background: var(--tafuta-red);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    z-index: 40;
    border-radius: 14px;
    width: auto;
}
.cart-bar.hidden { display: none; }

/* Notification badge */
.notif-alert { background: #FFEBEE; color: var(--tafuta-red); padding: 10px 12px; margin: 6px var(--page-gutter); border-radius: 8px; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }

/* Quantity selector */
.qty-control { display: flex; align-items: center; gap: 12px; }
.qty-btn { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--tafuta-border); background: #fff; font-size: 1.2rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.qty-value { font-weight: 600; min-width: 24px; text-align: center; }

/* Empty state */
.empty-state { text-align: center; padding: 48px 24px; color: var(--tafuta-muted); }
.empty-state .icon { font-size: 4rem; margin-bottom: 16px; opacity: 0.3; }

/* Loading */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,0.8); display: flex; align-items: center; justify-content: center; z-index: 9999; }
.loading-overlay.hidden { display: none; }

/* Mode toggle */
.mode-toggle { display: flex; gap: 8px; padding: 12px 16px; }
.mode-btn { flex: 1; padding: 10px; border-radius: 8px; border: 2px solid var(--tafuta-border); background: #fff; text-align: center; cursor: pointer; font-weight: 500; }
.mode-btn.active { border-color: var(--tafuta-red); color: var(--tafuta-red); background: #FFEBEE; }

/* ===== PWA / widgets / navigation (phase 1) ===== */
body.tafuta-pwa {
    -webkit-tap-highlight-color: transparent;
}
html.tafuta-standalone body,
body.tafuta-pwa {
    overscroll-behavior-y: none;
}
@media (display-mode: standalone) {
    body { overscroll-behavior-y: none; }
}
/* Overlays plein ?cran : m?me marge safe-area */
#profil-overlay:not(:empty),
.tafuta-call-overlay,
.tafuta-price-offer-overlay,
.tafuta-pwa-sheet {
    padding-top: var(--safe-top);
    padding-bottom: var(--safe-bottom);
    padding-left: var(--safe-left);
    padding-right: var(--safe-right);
    box-sizing: border-box;
}
.splash-skel { width: min(220px, 60vw); margin: 20px auto 0; }
.splash-skel .tw-skel-line { background: rgba(255,255,255,0.28); }

.tw-skeleton-list { padding: 8px 12px; }
.tw-skel { margin-bottom: 12px; }
.tw-skel-line {
    height: 12px;
    border-radius: 8px;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: tw-shimmer 1.2s ease-in-out infinite;
    margin: 6px 0;
}
.tw-skel-line.w40 { width: 40%; }
.tw-skel-line.w50 { width: 50%; }
.tw-skel-line.w60 { width: 60%; }
.tw-skel-line.w70 { width: 70%; }
.tw-skel-line.w80 { width: 80%; }
.tw-skel-line.w90 { width: 90%; }
.tw-skel-driver { display: flex; gap: 12px; align-items: center; padding: 10px 4px; }
.tw-skel-avatar { width: 44px; height: 44px; border-radius: 50%; background: #eee; flex-shrink: 0; animation: tw-shimmer 1.2s ease-in-out infinite; background-size: 400% 100%; background-image: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); }
.tw-skel-lines { flex: 1; }
.tw-skel-card { background: #fff; border-radius: 14px; padding: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.tw-skel-thumb { height: 88px; border-radius: 10px; margin-bottom: 10px; background: #eee; animation: tw-shimmer 1.2s ease-in-out infinite; background-size: 400% 100%; background-image: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); }
.tw-skel-chat { display: flex; margin: 10px 0; }
.tw-skel-chat.right { justify-content: flex-end; }
.tw-skel-bubble { width: 58%; height: 42px; border-radius: 14px; background: #eee; animation: tw-shimmer 1.2s ease-in-out infinite; background-size: 400% 100%; background-image: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); }
@keyframes tw-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

.tw-empty, .tw-error { text-align: center; padding: 36px 20px; color: var(--tafuta-muted); }
.tw-empty-icon { font-size: 2.4rem; opacity: .45; margin-bottom: 10px; }
.tw-empty-title, .tw-error-title { font-weight: 700; color: var(--tafuta-text); margin-bottom: 6px; }
.tw-empty-sub, .tw-error-sub { font-size: .9rem; margin-bottom: 14px; }
.tw-retry-btn {
    border: none; background: var(--tafuta-red); color: #fff;
    padding: 10px 18px; border-radius: 10px; font-weight: 600; cursor: pointer;
}
.tw-infinite-sentinel { height: 24px; }
.tw-infinite-sentinel.loading::after {
    content: ""; display: block; width: 22px; height: 22px; margin: 8px auto;
    border: 2px solid #ddd; border-top-color: var(--tafuta-red); border-radius: 50%;
    animation: tw-spin .7s linear infinite;
}
@keyframes tw-spin { to { transform: rotate(360deg); } }

.tw-toast {
    position: fixed;
    left: 50%;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(14px) scale(0.98);
    background: linear-gradient(135deg, var(--tafuta-red) 0%, var(--tafuta-red-dark) 100%);
    color: #fff;
    padding: 12px 18px;
    border-radius: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    letter-spacing: 0.01em;
    opacity: 0;
    pointer-events: none;
    z-index: 6000;
    transition: opacity 0.22s ease, transform 0.22s ease;
    max-width: min(90vw, 340px);
    text-align: center;
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.35), 0 0 0 1px rgba(255,255,255,0.12) inset;
}
.tw-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
}

/* Modals custom ? remplacent alert/confirm syst?me */
.tw-dialog {
    position: fixed; inset: 0; z-index: 100002;
    display: flex; align-items: center; justify-content: center;
    padding: 20px 18px calc(20px + env(safe-area-inset-bottom, 0px));
    animation: tw-dialog-in .18s ease-out;
}
.tw-dialog--out { animation: tw-dialog-out .16s ease-in forwards; }
.tw-dialog-backdrop {
    position: absolute; inset: 0; background: rgba(15, 23, 32, .48);
    backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px);
}
.tw-dialog-panel {
    position: relative; z-index: 1; width: 100%; max-width: 340px;
    background: #fff; border-radius: 18px; padding: 20px 18px 14px;
    box-shadow: 0 18px 48px rgba(0,0,0,.22);
    transform-origin: center bottom;
}
.tw-dialog-title {
    margin: 0 0 8px; font-size: 1.12rem; font-weight: 800; color: #15202b;
    letter-spacing: -.01em; line-height: 1.25;
}
.tw-dialog-msg {
    margin: 0 0 14px; font-size: .94rem; line-height: 1.45; color: #455a64;
    white-space: pre-wrap; word-break: break-word;
}
.tw-dialog-input {
    width: 100%; box-sizing: border-box; margin: 0 0 16px;
    border: 1px solid #e6e8ee; border-radius: 12px; padding: 13px 12px;
    font: inherit; font-weight: 700; letter-spacing: .03em; background: #fafbfc;
}
.tw-dialog-input:focus { outline: none; border-color: var(--tafuta-red); background: #fff; }
.tw-dialog-actions {
    display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
.tw-dialog-btn {
    font: inherit; font-size: .9rem; font-weight: 700;
    border: 0; border-radius: 12px; padding: 11px 16px; cursor: pointer;
    min-width: 88px; transition: transform .12s ease, background .12s ease;
}
.tw-dialog-btn:active { transform: scale(.97); }
.tw-dialog-btn--ghost {
    background: #f1f3f5; color: #37474f;
}
.tw-dialog-btn--primary {
    background: var(--tafuta-red); color: #fff;
    box-shadow: 0 4px 14px rgba(229,57,53,.28);
}
.tw-dialog-btn--danger {
    background: #c62828; color: #fff;
    box-shadow: 0 4px 14px rgba(198,40,40,.28);
}
body.tw-dialog-open { overflow: hidden; }
@keyframes tw-dialog-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes tw-dialog-out {
    to { opacity: 0; }
}

/* Toasts Onsen (alertes en bas) ? rouge Tafuta */
ons-toast .toast,
.toast {
    background: linear-gradient(135deg, var(--tafuta-red) 0%, var(--tafuta-red-dark) 100%) !important;
    color: #fff !important;
    border-radius: 14px !important;
    margin: 0 14px calc(72px + env(safe-area-inset-bottom, 0px)) !important;
    padding: 12px 16px !important;
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.32) !important;
    font-weight: 600 !important;
}
.toast__message,
ons-toast .toast__message {
    color: #fff !important;
    font-size: 0.9rem !important;
    line-height: 1.35 !important;
}

.tab-fade { opacity: .55; }
.tab-fade-in { animation: tabIn .18s ease-out; }
@keyframes tabIn { from { opacity: .55; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.taxi-map-loading { padding: 16px; }
.taxi-map-loading-label { text-align: center; color: var(--tafuta-muted); font-size: .85rem; margin-top: 8px; }

.tafuta-pwa-banner {
    position: fixed;
    left: max(12px, env(safe-area-inset-left));
    right: max(12px, env(safe-area-inset-right));
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    z-index: 5500;
    pointer-events: none;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transition: opacity 0.24s ease, transform 0.24s ease;
}
.tafuta-pwa-banner.hidden { display: none; }
.tafuta-pwa-banner.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.tafuta-pwa-banner-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 10px 12px 14px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--tafuta-red) 0%, var(--tafuta-red-dark) 100%);
    box-shadow: 0 10px 28px rgba(198, 40, 40, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.14) inset;
}
.tafuta-pwa-banner-brand { flex-shrink: 0; }
.tafuta-pwa-banner-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--tafuta-red);
    font-weight: 900;
    font-size: 1.3rem;
    font-style: italic;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.tafuta-pwa-banner-mark.lg {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 1.6rem;
}
.tafuta-pwa-banner-text { flex: 1; min-width: 0; }
.tafuta-pwa-banner-text strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.25;
}
.tafuta-pwa-banner-text span {
    display: block;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 3px;
    line-height: 1.3;
}
.tafuta-pwa-banner-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}
.tafuta-pwa-btn {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.82rem;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.tafuta-pwa-btn.primary {
    background: #fff;
    color: var(--tafuta-red-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}
.tafuta-pwa-btn.primary:active { transform: scale(0.97); }
.tafuta-pwa-btn.ghost {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 0.95rem;
    padding: 8px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tafuta-pwa-btn.ghost:active { background: rgba(255, 255, 255, 0.22); }
.tafuta-pwa-btn.block {
    width: 100%;
    padding: 14px;
    margin-top: 4px;
    background: var(--tafuta-red);
    color: #fff;
}

.tafuta-pwa-sheet { position: fixed; inset: 0; z-index: 5600; }
.tafuta-pwa-sheet.hidden { display: none; }
.tafuta-pwa-sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.48); }
.tafuta-pwa-sheet-panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-radius: 22px 22px 0 0;
    padding: 10px 22px calc(22px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -10px 32px rgba(0, 0, 0, 0.16);
    max-width: 520px;
    margin: 0 auto;
}
.tafuta-pwa-sheet-handle {
    width: 40px;
    height: 4px;
    border-radius: 4px;
    background: #e0e0e0;
    margin: 4px auto 16px;
}
.tafuta-pwa-sheet-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}
.tafuta-pwa-sheet-brand img {
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.tafuta-pwa-sheet-panel h3 { margin: 0; font-size: 1.15rem; font-weight: 800; }
.tafuta-pwa-sheet-sub { margin: 4px 0 0; font-size: 0.85rem; color: var(--tafuta-muted); }
.tafuta-pwa-steps {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    color: #333;
}
.tafuta-pwa-steps li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    line-height: 1.45;
    font-size: 0.92rem;
}
.tafuta-pwa-steps .step-num {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(211, 47, 47, 0.1);
    color: var(--tafuta-red);
    font-weight: 800;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tafuta-pwa-hint { font-size: 0.8rem; color: var(--tafuta-muted); margin: 0 0 12px; }

@media (min-width: 768px) {
    .tafuta-pwa-banner {
        left: auto;
        right: 24px;
        bottom: 28px;
        width: min(420px, calc(100vw - 48px));
    }
    .tafuta-tabbar {
        max-width: 560px;
        margin: 0 auto;
        width: 100%;
        border-radius: 16px 16px 0 0;
    }
}

#taxi-map,
#taxi-gmaps,
.taxi-map-layer,
.taxi-gmaps-frame {
    width: 100%;
    height: 100%;
    min-height: 220px;
    background: #e8eef3;
    border: 0;
    display: block;
}
.taxi-pick-ui {
    position: absolute;
    inset: 0;
    z-index: 5;
    pointer-events: none;
}
.taxi-map-crosshair {
    position: absolute;
    left: 50%;
    top: 42%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid #E53935;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,.9);
}
.taxi-map-crosshair::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    background: #E53935;
    border-radius: 50%;
}
.taxi-coords-bar {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    pointer-events: auto;
    background: rgba(255,255,255,.96);
    border-radius: 12px;
    padding: 6px 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,.12);
}
.taxi-coords-hud {
    flex: 1;
    font-size: 0.72rem;
    font-family: ui-monospace, Consolas, monospace;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.taxi-coords-copy,
.taxi-coords-confirm {
    border: none;
    background: #f3f3f3;
    border-radius: 8px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 10px;
    white-space: nowrap;
}
.taxi-coords-confirm {
    background: #1a73e8;
    color: #fff;
}
.taxi-coords-copy {
    width: 34px;
    padding: 0;
}
.taxi-map-tool-wide {
    width: auto !important;
    padding: 0 10px !important;
    gap: 4px;
    flex-direction: row !important;
}
.taxi-tool-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.taxi-live-ride .taxi-live-eta {
    margin: 12px 0 8px;
    padding: 14px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
    text-align: center;
}
.taxi-live-eta-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1b7a4a;
    line-height: 1.1;
}
.taxi-live-eta-label {
    font-size: 0.85rem;
    color: #555;
    margin-top: 4px;
}
.taxi-live-eta-dist {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}
.taxi-live-legs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 10px 0 4px;
}
.taxi-live-leg {
    background: #f6f7f9;
    border-radius: 12px;
    padding: 10px 12px;
}
.taxi-live-leg-label {
    font-weight: 700;
    font-size: 0.88rem;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.taxi-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}
.taxi-nav-actions .pd-like-btn {
    width: 100%;
    justify-content: center;
}
.taxi-directions-page {
    padding: 8px 12px 20px;
}
.taxi-dir-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.taxi-dir-head h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}
.taxi-dir-back {
    border: none;
    background: #f0f0f0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.taxi-dir-card {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    margin-bottom: 12px;
}
.taxi-dir-coords {
    font-size: 0.75rem;
    color: var(--tafuta-muted);
    margin-top: 2px;
    font-family: ui-monospace, monospace;
}
.taxi-dir-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.taxi-dir-actions .pd-like-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.taxi-dir-hint {
    margin: 12px 4px 0;
    font-size: 0.78rem;
    color: var(--tafuta-muted);
    line-height: 1.4;
}
.ride-dot.blue {
    background: #2196F3;
}
.tafuta-maplibre,
.maplibregl-map {
    width: 100% !important;
    height: 100% !important;
}
.tafuta-ml-marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
    background: #2196F3;
}
.tafuta-ml-marker.user { background: #2196F3; }
.tafuta-ml-marker.dest { background: #E53935; width: 20px; height: 20px; }
.tafuta-ml-marker.route { width: 16px; height: 16px; }
.tafuta-ml-marker.driver {
    width: 26px;
    height: 26px;
    background: #E53935;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tafuta-ml-marker.driver.moto { background: #FF9800; }

.taxi-streetview-layer {
    background: #111;
}
.taxi-streetview-layer iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #1a1a1a;
}
.tafuta-sv-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(12, 12, 12, 0.55);
}
.tafuta-sv-overlay[hidden] { display: none !important; }
.tafuta-sv-overlay-card {
    width: min(360px, 100%);
    background: rgba(22, 22, 22, 0.94);
    color: #fff;
    border-radius: 16px;
    padding: 18px 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    text-align: center;
}
.tafuta-sv-overlay-card strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 8px;
}
.tafuta-sv-overlay-card p {
    margin: 0 0 14px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.78);
}
.tafuta-sv-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.tafuta-sv-link,
.tafuta-sv-back {
    border: none;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.tafuta-sv-link {
    background: #fff;
    color: #c62828;
}
.tafuta-sv-back {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* Paiement ? facture + Mobile Money / Carte */
.tafuta-mm-pay {
    position: fixed; inset: 0; z-index: 6200;
    display: flex; align-items: flex-end; justify-content: center;
}
.tafuta-mm-pay-backdrop { position: absolute; inset: 0; background: rgba(15,17,21,.52); }
.tafuta-mm-pay-panel.pay-sheet {
    position: relative; z-index: 1; width: 100%; max-width: 480px;
    max-height: min(92vh, 760px); overflow: auto;
    background: #f6f7f9; border-radius: 22px 22px 0 0;
    padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 40px rgba(0,0,0,.22);
}
.tafuta-mm-pay-head {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px;
}
.tafuta-mm-pay-head h3 { margin: 0; font-size: 1.12rem; font-weight: 800; letter-spacing: -.02em; }
.pay-invoice {
    background: #fff; border-radius: 16px; padding: 14px 14px 10px;
    border: 1px solid #e8eaee; margin-bottom: 12px;
}
.pay-inv-brand {
    font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
    color: var(--tafuta-red, #e53935); margin-bottom: 4px;
}
.pay-inv-meta {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: .78rem; color: #888; margin-bottom: 8px;
}
.pay-inv-resto { margin: 0 0 2px; font-size: 1rem; font-weight: 700; color: #1a1a1a; }
.pay-inv-mode { margin: 0 0 10px; font-size: .8rem; color: #777; }
.pay-inv-lines { border-top: 1px dashed #e4e6ea; padding-top: 8px; }
.pay-inv-line {
    display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
    padding: 6px 0; font-size: .88rem;
}
.pay-inv-line-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-inv-line-main strong { font-weight: 600; color: #222; }
.pay-inv-line-main span { font-size: .76rem; color: #888; }
.pay-inv-line-detail {
    display: block; font-size: .78rem !important; font-weight: 500 !important;
    color: #555 !important; line-height: 1.35; margin: 2px 0;
}
.pay-inv-line-amt { font-weight: 700; white-space: nowrap; color: #222; }
.rc-line-detail {
    display: block; font-size: .78rem; color: #607080; line-height: 1.35; margin: 2px 0 4px;
}
.mo-line-detail {
    display: inline-block; margin-top: 2px; font-size: .78rem; font-style: normal;
    color: #607080; font-weight: 500; line-height: 1.35;
}
.pay-inv-totals {
    margin-top: 8px; padding-top: 10px; border-top: 1px solid #eceef2;
}
.pay-inv-row {
    display: flex; justify-content: space-between; gap: 10px;
    font-size: .88rem; color: #666; margin-bottom: 6px;
}
.pay-inv-row strong { color: #222; font-weight: 600; }
.pay-inv-total {
    margin-top: 4px; padding-top: 8px; border-top: 1px solid #eceef2;
    font-size: 1.02rem; color: #111;
}
.pay-inv-total span, .pay-inv-total strong {
    font-weight: 800; color: var(--tafuta-red, #e53935);
}
.pay-sheet-note {
    margin: 0 0 12px; font-size: .8rem; color: #6b7280; line-height: 1.4;
}
.pay-methods {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px;
}
.pay-method {
    border: 1.5px solid #dde1e8; background: #fff; border-radius: 12px;
    padding: 11px 10px; font: inherit; font-weight: 700; font-size: .88rem;
    color: #444; cursor: pointer;
}
.pay-method.active {
    border-color: var(--tafuta-red, #e53935); color: var(--tafuta-red, #e53935);
    background: #fff5f5; box-shadow: 0 0 0 1px rgba(229,57,53,.12);
}
.pay-panel { margin-bottom: 4px; }
.pay-panel.hidden { display: none !important; }
.pay-card-hint {
    margin: 0; padding: 12px 14px; border-radius: 12px;
    background: #fff; border: 1px solid #e8eaee;
    font-size: .86rem; color: #555; line-height: 1.45;
}
.tafuta-mm-pay-status {
    min-height: 1.2em; margin: 10px 0 8px; font-size: .86rem; font-weight: 600; color: #455a64;
}
.pay-submit { margin-top: 4px; }
body.tafuta-mm-pay-open .tafuta-tabbar { visibility: hidden; pointer-events: none; }

/* Mes commandes (client) */
.mo-wrap { padding: 8px var(--page-gutter) 20px; display: flex; flex-direction: column; gap: 8px; }
.mo-hist-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
    padding: 8px var(--page-gutter) 0;
}
.mo-hist-tab {
    border: 1px solid #e4e6ea; background: #fff; border-radius: 999px;
    padding: 8px 10px; font: inherit; font-size: .84rem; font-weight: 700; color: #555; cursor: pointer;
}
.mo-hist-tab.active {
    border-color: var(--tafuta-red, #e53935); background: #fff5f5; color: var(--tafuta-red, #e53935);
}
.mo-card {
    background: #fff; border-radius: 16px; padding: 14px;
    border: 1px solid #eceef2; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.mo-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.mo-resto { display: block; font-size: 1rem; }
.mo-id { display: block; margin-top: 2px; font-size: .75rem; color: #888; }
.mo-badge {
    flex-shrink: 0; font-size: .68rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .03em; padding: 5px 8px; border-radius: 999px; white-space: nowrap;
}
.mo-st-paid { background: #e8f5e9; color: #2e7d32; }
.mo-st-wait { background: #fff4d6; color: #8a6d00; }
.mo-st-info { background: #e8f1fb; color: #1565c0; }
.mo-st-ship { background: #e3f2fd; color: #0d47a1; }
.mo-st-done { background: #e7f6ee; color: #1b5e20; }
.mo-st-bad { background: #fdecea; color: #b71c1c; }
.mo-pay-row {
    display: flex; justify-content: space-between; gap: 8px; margin: 10px 0 6px;
    font-size: .8rem;
}
.mo-pay { color: #888; font-weight: 600; }
.mo-pay.is-paid { color: #2e7d32; }
.mo-mode { color: #666; }
.mo-lines { list-style: none; margin: 0; padding: 8px 0 0; border-top: 1px dashed #eceef2; }
.mo-lines li {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 5px 0; font-size: .86rem; color: #333;
}
.mo-lines strong { font-weight: 700; white-space: nowrap; }
.mo-addr { margin: 8px 0 0; font-size: .8rem; color: #777; }
.mo-foot {
    display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px;
    border-top: 1px solid #eceef2; font-size: .95rem;
}
.mo-foot strong { color: var(--tafuta-red, #e53935); font-weight: 800; }
.mo-search-wrap { padding: 8px var(--page-gutter) 0; }
.mo-search {
    width: 100%; border: 1px solid #e4e6ea; border-radius: 12px;
    padding: 12px 14px; font: inherit; background: #fff;
}
.mo-cancel-btn {
    width: 100%; margin-top: 10px; border: 1.5px solid #ef9a9a; border-radius: 12px;
    padding: 11px 14px; font: inherit; font-weight: 700; font-size: .88rem;
    background: #fff5f5; color: #c62828; cursor: pointer;
}
.mo-cancel-btn:active { background: #ffebee; }
.mo-invoice-btn {
    width: 100%; margin-top: 10px; border: 0; border-radius: 12px;
    padding: 11px 14px; font: inherit; font-weight: 700; font-size: .88rem;
    background: #141820; color: #fff; cursor: pointer;
}
.mo-invoice-btn:active { opacity: .9; }
.mo-maps-btn {
    width: 100%; margin-top: 8px; border: 0; border-radius: 10px;
    padding: 9px 12px; font: inherit; font-weight: 700; font-size: .82rem;
    background: #e3f2fd; color: #1565c0; cursor: pointer;
}
.mo-maps-btn--soft { background: #f1f3f5; color: #455a64; }
.mo-maps-btn:active { opacity: .88; }

/* ========== Densite mobile ? gouttieres serrees ========== */
@media (max-width: 820px) {
    :root {
        --page-gutter: 8px;
        --page-gutter-y: 6px;
    }
    .tafuta-header { padding: 6px 6px 6px 2px; min-height: 48px; }
    .auth-header { padding: 8px 8px 8px 4px; min-height: 48px; }
    .welcome-copy { padding: 18px 14px 14px; }
    .welcome-actions { padding: 14px var(--page-gutter) 16px; }
    .welcome-hero { padding: 16px var(--page-gutter); }
    .dash-grid { padding: 10px var(--page-gutter); gap: 8px; }
    .dash-card { padding: 12px; }
    .ride-info { margin: 8px var(--page-gutter); padding: 12px; }
    .ride-status { padding: 20px var(--page-gutter); }
    .mode-toggle { padding: 8px var(--page-gutter); gap: 6px; }
    .cart-bar { padding: 12px var(--page-gutter); }
    .taxi-search-wrap { padding: 2px var(--page-gutter) 6px; }
    .taxi-dest-summary,
    .taxi-dest-summary-compact { margin: 6px var(--page-gutter) 0; }
    .taxi-drivers-title { padding: 8px var(--page-gutter) 4px; }
    .taxi-drivers-list { padding: 0 var(--page-gutter) 10px; }
    .taxi-city-fallback { margin: 6px var(--page-gutter); }
    .profile-avatar-wrap { padding: 16px var(--page-gutter) 6px; }
    .tafuta-notif-search { margin: 8px var(--page-gutter) 4px; }
    .tafuta-notif-head { padding: 4px 8px 8px var(--page-gutter); }
    .tafuta-notif-open { padding: 10px 4px 10px var(--page-gutter); gap: 10px; }
    .chat-empty-thread { padding: 32px var(--page-gutter); }
    .chat-list-open { padding: 10px 4px 10px var(--page-gutter); }
    .resto-cart-head { padding: 12px var(--page-gutter) 8px; }
    .resto-cart-scroll { padding: 10px var(--page-gutter) 6px; }
    .resto-cart-foot { padding: 10px var(--page-gutter) calc(12px + env(safe-area-inset-bottom, 0px)); }
    .rm-closed-banner { margin: 6px var(--page-gutter) 0; }
    .tafuta-mm-pay-panel.pay-sheet { padding: 12px var(--page-gutter) calc(14px + env(safe-area-inset-bottom, 0px)); }
    .pay-invoice { padding: 12px; margin-bottom: 10px; }
    ons-splitter-side .profile-header { padding: 14px var(--page-gutter); }
    ons-splitter-side ons-list-item {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

@media (max-width: 380px) {
    :root {
        --page-gutter: 6px;
    }
    .rl-media { width: 80px; }
    .rl-cover,
    .rl-cover--ph { height: 80px; }
}

.pay-wallet { padding: 16px 16px 32px; background: #f4f6f8; min-height: 100%; }
.pay-card {
    background: linear-gradient(145deg, #b71c1c 0%, #e53935 55%, #ff7043 140%);
    color: #fff; border-radius: 22px; padding: 20px 18px 22px;
    box-shadow: 0 14px 30px rgba(183, 28, 28, .28);
}
.pay-card-top { display: flex; justify-content: space-between; align-items: center; font-weight: 800; letter-spacing: .08em; font-size: .78rem; }
.pay-card-top button {
    border: 0; background: rgba(255,255,255,.16); color: #fff; border-radius: 999px;
    padding: 6px 12px; font: inherit; font-weight: 700; letter-spacing: 0; cursor: pointer;
}
.pay-card-label { margin: 22px 0 0; opacity: .85; font-size: .85rem; }
.pay-card h2 { margin: 4px 0 8px; font-size: 2.15rem; letter-spacing: -.03em; }
.pay-card-hint { margin: 12px 0 0; font-size: .8rem; opacity: .9; line-height: 1.4; }
.pay-partners { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.22); }
.pay-partners p { margin: 0; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; opacity: .85; }
.pay-partner-total { display: block; margin: 2px 0 8px; font-size: 1.35rem; font-weight: 800; letter-spacing: -.02em; }
.pay-partner-lines { display: flex; flex-direction: column; gap: 6px; }
.pay-partner-row {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    background: rgba(255,255,255,.16); border-radius: 12px; padding: 8px 10px; font-size: .92rem;
}
.pay-source-picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pay-source-picks.hidden { display: none; }
.pay-source-picks button {
    border: 0; background: #f3f4f6; color: #445; border-radius: 999px;
    padding: 8px 12px; font: inherit; font-weight: 800; font-size: .78rem; cursor: pointer;
}
.pay-source-picks button.active { background: #111418; color: #fff; }
.pay-number {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    margin-top: 4px; padding: 10px 12px; border-radius: 16px; background: rgba(255,255,255,.14);
}
.pay-number span { display: block; font-size: .72rem; opacity: .85; }
.pay-number strong { display: block; font-size: 1.05rem; letter-spacing: .04em; }
.pay-number-actions { display: flex; gap: 6px; }
.pay-number-actions button {
    border: 0; background: #fff; color: #c62828; border-radius: 999px;
    padding: 8px 12px; font: inherit; font-weight: 800; font-size: .78rem; cursor: pointer;
}
.pay-wallet-actions button.is-locked { opacity: .48; }
.pay-wallet-actions button.is-locked span { background: #eceff1; color: #90a4ae; }
.pay-scan-btn {
    width: 100%; margin: 0 0 14px; border: 1px dashed #e53935; background: #fff; color: #c62828;
    border-radius: 16px; padding: 13px 12px; font: inherit; font-weight: 800; cursor: pointer;
}
.pay-dest-row { display: flex; gap: 8px; }
.pay-tf, .tw-dialog-prefix {
    display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
    border: 1px solid #e6e8ee; border-radius: 12px; background: #fafbfc; padding: 0 12px;
}
.pay-tf strong, .tw-dialog-prefix strong {
    color: #c62828; font-size: 1rem; letter-spacing: .06em;
}
.pay-wallet-form .pay-tf input, .tw-dialog-prefix .tw-dialog-input {
    border: 0; background: transparent; box-shadow: none; margin: 0; width: auto;
    padding: 13px 0; flex: 1; min-width: 0; letter-spacing: .08em;
}
.tw-dialog-prefix { margin: 0 0 16px; }
.tw-dialog-input.is-invalid { color: #c62828; }
.pay-dest-row button {
    border: 0; background: #111418; color: #fff; border-radius: 12px; padding: 0 12px;
    font: inherit; font-weight: 700; cursor: pointer;
}
.pay-qr-sheet {
    position: fixed; inset: 0; z-index: 92; background: rgba(12, 16, 22, .72);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.pay-scan-sheet {
    position: fixed; inset: 0; z-index: 100001; background: #000;
    display: flex; align-items: stretch; justify-content: stretch; padding: 0;
}
.pay-qr-card {
    background: #fff; width: min(360px, 100%); border-radius: 22px; padding: 22px 18px 18px;
    text-align: center; position: relative;
}
.pay-qr-card canvas { width: min(240px, 70vw); height: auto; margin: 8px auto; }
.pay-qr-card strong { display: block; margin: 4px 0 14px; letter-spacing: .06em; font-size: 1.15rem; }
.pay-scan-sheet { color: #fff; }
.pay-scan-stage { position: relative; width: 100%; height: 100%; }
.pay-scan-stage video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.pay-scan-frame {
    position: absolute; left: 50%; top: 42%; width: min(68vw, 280px); aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border: 3px solid #fff; border-radius: 22px; pointer-events: none;
    box-shadow: 0 0 0 2000px rgba(0,0,0,.28);
}
.pay-scan-hud {
    position: absolute; left: 0; right: 0; bottom: 0; text-align: center;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(transparent, rgba(0,0,0,.72));
}
.pay-scan-hud p { margin: 0 0 12px; font-weight: 700; }
.pay-scan-actions { display: flex; justify-content: center; gap: 10px; }
.pay-scan-actions button {
    border: 0; background: #fff; color: #111; border-radius: 999px; padding: 12px 16px;
    font: inherit; font-weight: 800; cursor: pointer;
}
.pay-wallet-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 14px 0; }
.pay-wallet-actions button {
    border: none; background: #fff; border-radius: 16px; padding: 14px 6px 12px;
    font: inherit; font-weight: 700; font-size: .82rem; color: #1a1f2c;
    box-shadow: 0 6px 18px rgba(16, 24, 40, .06); cursor: pointer;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.pay-wallet-actions button span {
    width: 34px; height: 34px; border-radius: 12px; background: #fff1f0; color: #d32f2f;
    display: flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.pay-wallet-form {
    display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px;
    background: #fff; border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px rgba(16,24,40,.05);
}
.pay-wallet-form.hidden { display: none; }
.pay-form-head { display: flex; justify-content: space-between; align-items: center; }
.pay-form-head h3 { margin: 0; }
.pay-form-head button { border: 0; background: #f3f4f6; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; }
.pay-send-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #f3f4f6; padding: 4px; border-radius: 12px; }
.pay-send-switch.hidden, .pay-card-note.hidden { display: none; }
.pay-card-note { margin: 0; color: #455a64; font-size: .86rem; line-height: 1.4; }
.pay-send-switch button { border: 0; background: transparent; border-radius: 10px; padding: 10px 6px; font: inherit; font-weight: 700; cursor: pointer; color: #667; }
.pay-send-switch button.active { background: #fff; color: #d32f2f; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.pay-amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pay-amounts button[data-amount="autre"] { grid-column: 1 / -1; }
.pay-amounts button {
    border: 1px solid #e6e8ee; background: #fafbfc; color: #1a1f2c; border-radius: 12px;
    padding: 10px 2px; font: inherit; font-weight: 800; font-size: .78rem; cursor: pointer;
}
.pay-amounts button.active { background: #111418; color: #fff; border-color: #111418; }
.pay-wallet-form label { display: flex; flex-direction: column; gap: 6px; font-size: .8rem; font-weight: 700; color: #445; }
.pay-wallet-form label.hidden { display: none; }
.pay-wallet-form input, .pay-wallet-form select {
    border: 1px solid #e6e8ee; border-radius: 12px; padding: 13px 12px; font: inherit; font-weight: 600; background: #fafbfc;
}
.pay-form-status { min-height: 1.2em; margin: 0; color: #455a64; font-size: .86rem; }
.pay-history-card { background: #fff; border-radius: 18px; padding: 8px 14px 12px; }
.pay-history-card h3 { margin: 10px 0 8px; font-size: 1rem; }
.pay-activity-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.pay-activity-filters button {
    border: 0; background: #f3f4f6; color: #445; border-radius: 999px; white-space: nowrap;
    padding: 7px 11px; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer;
}
.pay-activity-filters button.active { background: #111418; color: #fff; }
.pay-activity-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.pay-activity-range.hidden { display: none; }
.pay-activity-range label { display: flex; flex-direction: column; gap: 4px; font-size: .75rem; font-weight: 700; color: #667; }
.pay-activity-range input { border: 1px solid #e6e8ee; border-radius: 10px; padding: 8px; font: inherit; }
.pay-activity-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.pay-activity-pager.hidden { display: none; }
.pay-activity-pager span { font-size: .8rem; font-weight: 700; color: #667; }
.pay-activity-pager button {
    border: 0; background: #f3f4f6; border-radius: 999px; padding: 8px 12px;
    font: inherit; font-size: .78rem; font-weight: 800; cursor: pointer;
}
.pay-activity-pager button:disabled { opacity: .4; cursor: default; }
.pay-history-empty { color: #6b7280; }
.pay-history-item {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid #f0f1f4;
}
.pay-pin-sheet {
    position: fixed; inset: 0; z-index: 90; background: rgba(12, 16, 22, .55);
    display: flex; align-items: flex-end; justify-content: center;
}
.pay-pin-card {
    background: #fff; width: min(440px, 100%); border-radius: 22px 22px 0 0;
    padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; position: relative;
}
.pay-pin-card h3 { margin: 8px 0 4px; }
.pay-pin-card p { margin: 0 0 12px; color: #667; font-size: .9rem; }
.pay-pin-x { position: absolute; top: 12px; right: 12px; border: 0; background: #f3f4f6; width: 32px; height: 32px; border-radius: 50%; cursor: pointer; }
.pay-pin-dots { display: flex; justify-content: center; gap: 14px; margin: 8px 0 4px; }
.pay-pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #d32f2f; display: block; }
.pay-pin-dots i.on { background: #d32f2f; }
.pay-pin-error { min-height: 1.2em; color: #c62828; font-size: .82rem; }
.pay-pin-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 8px; }
.pay-pin-pad button {
    border: 0; background: #f6f7f9; border-radius: 14px; height: 54px; font: inherit; font-size: 1.25rem; font-weight: 700; cursor: pointer;
}
.pay-pin-pad button:disabled { background: transparent; }
.pay-code-form { text-align: left; }
.pay-code-form label { display: flex; flex-direction: column; gap: 6px; font-size: .82rem; font-weight: 700; margin-bottom: 10px; }
.pay-code-form input { border: 1px solid #e6e8ee; border-radius: 12px; padding: 12px; font: inherit; letter-spacing: .3em; }
.pay-history-item strong { display: block; }
.pay-history-item span { display: block; color: #6b7280; font-size: .8rem; }
.pay-history-amt { text-align: right; }
.pay-st.ok { color: #2e7d32; }
.pay-st.bad { color: #c62828; }
.pay-st.wait { color: #ef6c00; }
.pay-success {
    position: fixed; inset: 0; z-index: 80; background: rgba(17, 20, 24, .45);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.pay-success-card {
    background: #fff; border-radius: 20px; padding: 28px 22px; width: min(420px, 100%);
    text-align: center; box-shadow: 0 16px 50px rgba(0,0,0,.16);
}
.pay-success-mark {
    width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%;
    background: #e8f5e9; color: #2e7d32; font-size: 2rem; line-height: 64px; font-weight: 800;
}
.pay-success-card h2 { margin: 0 0 8px; }
.pay-success-amount { font-size: 1.6rem; font-weight: 800; margin: 0 0 8px; }
.pay-success-card p { color: #555; line-height: 1.45; }
.pay-success-ref { font-size: .85rem; color: #6b7280; }
