/*!
 * ZYNGO — assets/zyngo-theme.css  ·  Thème commun des pages (core/theme.php)
 *
 * Même identité que le menu (zyngo-menu.css) et l'écran d'attente chauffeur
 * (zyngo-driver-home.css) : encre #12141C, safran, sarcelle, papier sable, cartes blanches
 * très arrondies, Manrope (texte) + Sora (titres et chiffres).
 *
 * Chaque page historique a ses propres noms de variables (--bg, --surf, --gold, --txt, --g…) :
 * on les ré-aligne toutes ici sur les jetons du thème, en clair comme en sombre. Puis on habille
 * les composants communs : barre du haut, bandeau (.hero), boutons, champs, onglets.
 * Thème sombre : [data-theme=dark] sur <html> ou <body>. RTL : [dir=rtl].
 */

/* ═════════════════════ Jetons ═════════════════════ */
html body {
  --zt-paper: #F4F1EA; --zt-paper-2: #ECE7DC;
  --zt-card: #FFFFFF;  --zt-card-2: #FAF8F3;
  --zt-ink: #12141C;   --zt-ink-2: #2B2F3C;
  --zt-mute: #6E7280;  --zt-line: rgba(18, 20, 28, .09);
  --zt-gold: #E8A317;  --zt-gold-2: #C98A0B; --zt-gold-soft: #FBF0D6;
  --zt-gold-grad: linear-gradient(140deg, #F2B33A 0%, #E8A317 55%, #D69210 100%);
  --zt-teal: #0B8F7F;  --zt-coral: #E0523A; --zt-indigo: #4C5BD4;
  --zt-hero: radial-gradient(120% 90% at 100% 0%, rgba(232, 163, 23, .22) 0%, rgba(232, 163, 23, 0) 60%),
             linear-gradient(180deg, #12141C 0%, #1C1F2A 100%);
  --zt-sh: 0 1px 2px rgba(18, 20, 28, .05), 0 6px 18px rgba(18, 20, 28, .06);
  --zt-font: 'Manrope', 'Noto Kufi Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --zt-num: 'Sora', 'Manrope', 'Noto Kufi Arabic', system-ui, sans-serif;
}
html[data-theme=dark] body, html body[data-theme=dark] {
  --zt-paper: #0E0F13; --zt-paper-2: #16171D;
  --zt-card: #181A21;  --zt-card-2: #1F222A;
  --zt-ink: #F2F0EA;   --zt-ink-2: #D9D6CE;
  --zt-mute: #9C9FAA;  --zt-line: rgba(255, 255, 255, .08);
  --zt-gold: #F2B33A;  --zt-gold-2: #F6C766; --zt-gold-soft: rgba(242, 179, 58, .14);
  --zt-teal: #2CC4AE;  --zt-coral: #FF7A62; --zt-indigo: #8592FF;
  --zt-sh: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 18px rgba(0, 0, 0, .25);
}

/* ═════════════════════ Variables historiques → jetons ═════════════════════ */
html body, html body[data-theme], html[data-theme] body {
  --bg: var(--zt-paper) !important; --bg-light: var(--zt-paper) !important; --bg-dark: var(--zt-paper) !important;
  --surf: var(--zt-card) !important; --surface: var(--zt-card) !important; --card: var(--zt-card) !important;
  --card-bg: var(--zt-card) !important; --sheet: var(--zt-card) !important;
  --glass: var(--zt-card) !important; --glass-bg: var(--zt-card) !important;
  --surface2: var(--zt-card-2) !important; --surface3: var(--zt-paper-2) !important;
  --inp-bg: var(--zt-card-2) !important; --chip-bg: var(--zt-paper-2) !important;
  --txt: var(--zt-ink) !important; --text: var(--zt-ink) !important; --txt-pri: var(--zt-ink) !important;
  --txt-sec: var(--zt-mute) !important; --muted: var(--zt-mute) !important; --muted2: var(--zt-mute) !important;
  --bdr: var(--zt-line) !important; --border: var(--zt-line) !important; --line: var(--zt-line) !important;
  --line2: var(--zt-line) !important; --glass-border: var(--zt-line) !important;
  --gold-bdr: var(--zt-line) !important; --gold-border: var(--zt-line) !important; --g-bdr: var(--zt-line) !important;
  --gold: var(--zt-gold) !important; --g: var(--zt-gold) !important; --g0: var(--zt-gold) !important;
  --gold-main: var(--zt-gold) !important; --accent: var(--zt-gold) !important; --amber: var(--zt-gold) !important;
  --gold-dk: var(--zt-gold-2) !important; --gd: var(--zt-gold-2) !important; --gold-dark: var(--zt-gold-2) !important;
  --gold-lt: #F2B33A !important; --gold-light: #F2B33A !important;
  --gold-grad: var(--zt-gold-grad) !important; --g-grad: var(--zt-gold-grad) !important; --gold-gradient: var(--zt-gold-grad) !important;
  --gold-dim: var(--zt-gold-soft) !important; --glt: var(--zt-gold-soft) !important; --accent-soft: var(--zt-gold-soft) !important;
  --gold-glow: var(--zt-gold-soft) !important; --gold-ring: var(--zt-gold-soft) !important;
  --unread-bg: var(--zt-gold-soft) !important; --unread-bdr: var(--zt-gold) !important; --badge-bg: var(--zt-coral) !important;
  --green: var(--zt-teal) !important; --grn: var(--zt-teal) !important; --success: var(--zt-teal) !important;
  --green-dim: rgba(11, 143, 127, .12) !important;
  --red: var(--zt-coral) !important; --red-dim: rgba(224, 82, 58, .12) !important;
  --blue: var(--zt-indigo) !important; --violet: var(--zt-indigo) !important; --purple: var(--zt-indigo) !important;
  --hero-bg: var(--zt-hero) !important;
  --hdr-bg: #12141C !important; --nav: var(--zt-card) !important; --nav-bg: var(--zt-card) !important;
  --bar-bg: var(--zt-card) !important; --tabbar-bg: var(--zt-card) !important;
  --sh: var(--zt-sh) !important; --shadow-card: var(--zt-sh) !important;
  --sh-g: 0 10px 24px rgba(232, 163, 23, .22) !important; --shg: 0 10px 24px rgba(232, 163, 23, .22) !important;
  --shadow-gold: 0 10px 24px rgba(232, 163, 23, .22) !important; --sh-gold: 0 10px 24px rgba(232, 163, 23, .22) !important;
  --shadow-glow: 0 10px 24px rgba(232, 163, 23, .22) !important;
  --fb: var(--zt-font) !important; --f-body: var(--zt-font) !important; --font-body: var(--zt-font) !important;
  --fd: var(--zt-num) !important; --f-display: var(--zt-num) !important; --font-disp: var(--zt-num) !important;
  --fm: var(--zt-num) !important; --f-mono: var(--zt-num) !important; --mono: var(--zt-num) !important;
  --far: var(--zt-num) !important; --font-serif: var(--zt-num) !important; --f-serif: var(--zt-num) !important;
  background: var(--zt-paper) !important;
  color: var(--zt-ink);
  font-family: var(--zt-font) !important;
  -webkit-font-smoothing: antialiased;
}
html { background: var(--zt-paper, #F4F1EA); }
html[data-theme=dark] { background: #0E0F13; }
body h1, body h2, body h3 { font-family: var(--zt-num) !important; font-style: normal !important; letter-spacing: -.02em; }
body :is(h4, h5, h6, [class*=title], [class*=name], [class*=Title], [class*=-sub], .sec-lbl, .sec-label, em, i:not([class*=fa])) { font-style: normal !important; }
body [class*=title], body [class*=-name], body .name { font-family: var(--zt-num) !important; }
[dir=rtl] body, [dir=rtl] body h1, [dir=rtl] body h2, [dir=rtl] body h3 { font-family: 'Noto Kufi Arabic', var(--zt-font) !important; }
body .fas, body .fa-solid, body .far, body .fa-regular, body .fab { font-family: 'Font Awesome 6 Free' !important; font-style: normal !important; }
body .fab { font-family: 'Font Awesome 6 Brands' !important; }

/* ═════════════════════ Barre du haut : encre ═════════════════════ */
body .topnav, body .topbar, body header.hdr, body header.app-header, body header.header {
  --txt: #FFFFFF !important; --text: #FFFFFF !important; --txt-pri: #FFFFFF !important;
  --muted: rgba(255, 255, 255, .62) !important; --txt-sec: rgba(255, 255, 255, .62) !important;
  --bdr: rgba(255, 255, 255, .1) !important; --border: rgba(255, 255, 255, .1) !important;
  --surf: rgba(255, 255, 255, .08) !important; --card: rgba(255, 255, 255, .08) !important; --glass: rgba(255, 255, 255, .08) !important;
  background: #12141C !important;
  color: #FFFFFF !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  min-height: 58px;
}
body .topnav *, body .topbar *, body header.hdr *, body header.app-header *, body header.header * { border-color: rgba(255, 255, 255, .1); }
body :is(.topnav, .topbar, header.hdr, header.app-header, header.header) :is(h1, h2, .nav-title, .tb-title, .tn-title, .header-title, .hdr-title, .topbar-logo, .tn-logo, .tb-logo, .title) {
  color: #FFFFFF !important;
  -webkit-text-fill-color: #FFFFFF !important;
  background: none !important;
  font-family: var(--zt-num) !important; font-style: normal !important;
  font-weight: 700 !important;
}
body :is(.topnav, .topbar, header.hdr, header.app-header, header.header) :is(.header-sub, .hdr-sub, .sub, small) { color: rgba(255, 255, 255, .6) !important; -webkit-text-fill-color: rgba(255, 255, 255, .6) !important; }
body :is(.topnav, .topbar, header.hdr, header.app-header, header.header) :is(.btn-back, .tb-btn, .hdr-back, .back-btn, .icon-btn, .tb-back, .back, .hdr-btn, .back-circle, .hdr-actions button, .hdr-btn, button) {
  min-width: 40px; height: 40px !important; padding: 0 14px !important;
  border-radius: 50px !important;
  font-size: .82rem !important; font-weight: 700 !important; white-space: nowrap;
  border: 0 !important;
  background: rgba(255, 255, 255, .09) !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  display: inline-flex !important; align-items: center; justify-content: center;
  text-decoration: none !important;
}
body :is(.topnav, .topbar, header.hdr, header.app-header, header.header) :is(.btn-back, .tb-btn, .hdr-back, .back-btn, .icon-btn, .tb-back, .back, .hdr-btn, .back-circle, button) * { color: #FFFFFF !important; }
body :is(.btn-back, .back-btn, .tb-back, .hdr-back, .back, .back-circle) { width: 40px !important; padding: 0 !important; border-radius: 50% !important; font-size: 0 !important; }
/* Boutons d'icône de la barre (thème, recherche…) : ronds ; boutons avec texte (« Tout lu », « Historique ») : pilule */
body :is(.topnav, .topbar, header.hdr, header.app-header, header.header) :is(.tb-btn.tb-btn, .icon-btn.icon-btn) { width: 40px !important; min-width: 40px !important; flex: 0 0 40px !important; padding: 0 !important; border-radius: 50% !important; }
body :is(.btn-back, .back-btn, .tb-back, .hdr-back, .back, .back-circle) i { font-size: 1rem !important; }
/* Barre ajoutée aux pages qui n'en avaient pas */
.zt-topbar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 9px) 14px 9px; }
.zt-topbar .tb-title { flex: 1; text-align: center; font-size: 1.05rem; }
.zt-topbar .zt-sp { width: 40px; flex-shrink: 0; }
.zt-flip { display: inline-block; }
[dir=rtl] .zt-flip { transform: scaleX(-1); }
/* Rangée de langues collée sous la barre (sécurité…) */
body :is(.topnav, .topbar) + .lang-row { background: #12141C !important; padding-bottom: 10px; margin: 0 !important; border: 0 !important; }
/* Pastilles de langue dans une barre sombre */
body :is(.topnav, .topbar) :is(.lang-pill, .lang-btn) { background: rgba(255, 255, 255, .08) !important; color: #fff !important; border: 0 !important; }
body :is(.topnav, .topbar) :is(.lang-pill, .lang-btn).active { background: var(--zt-gold-grad) !important; color: #12141C !important; }

/* ═════════════════════ Bandeau (.hero) : encre + halo safran ═════════════════════ */
body .hero, body .page-hero, body .wallet-hero, body .profile-hero, body .hero-score {
  --bg: rgba(255, 255, 255, .06) !important; --surf2: rgba(255, 255, 255, .06) !important; --inp-bg: rgba(255, 255, 255, .06) !important;
  --txt: #FFFFFF !important; --text: #FFFFFF !important; --txt-pri: #FFFFFF !important;
  --muted: rgba(255, 255, 255, .62) !important; --txt-sec: rgba(255, 255, 255, .62) !important;
  --bdr: rgba(255, 255, 255, .1) !important; --border: rgba(255, 255, 255, .1) !important; --line: rgba(255, 255, 255, .1) !important;
  --surf: rgba(255, 255, 255, .07) !important; --card: rgba(255, 255, 255, .07) !important; --glass: rgba(255, 255, 255, .07) !important;
  --surface: rgba(255, 255, 255, .07) !important; --chip-bg: rgba(255, 255, 255, .08) !important;
  background: var(--zt-hero) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  border-radius: 0 0 30px 30px !important;
  box-shadow: none !important;
}
body :is(.hero, .hero-score) :is(h1, h2, h3, .hero-title, .hero-name, .name, strong) { color: #FFFFFF; -webkit-text-fill-color: currentColor; }
body .hero-score::before { display: none; }
body .hero :is(p, .hero-sub, .hero-label, small) { color: rgba(255, 255, 255, .66); }
body .hero em, body .hero .accent, body .hero .hl { color: var(--zt-gold) !important; -webkit-text-fill-color: var(--zt-gold) !important; font-style: normal !important; }
/* Barre + bandeau collés : un seul bloc sombre */
body :is(.topnav, .topbar) + .hero { margin-top: 0 !important; border-top: 0 !important; }

/* ═════════════════════ Cartes ═════════════════════ */
body :is(.card, .section, .sec, .panel, .box, .stat-card, .info-card, .doc-card, .ride-card, .hist-card, .notif-card, .booking-card, .item-card) {
  border-radius: 22px;
}
body :is(.card, .panel, .box) { background: var(--zt-card); border-color: var(--zt-line); box-shadow: var(--zt-sh); }

/* ═════════════════════ Boutons ═════════════════════ */
body :is(.btn-gold, .btn-primary, .btn-main, .btn-save, .btn-submit, .submit-btn, .cta, .btn-cta, .gold-btn, .btn-confirm, .primary-btn, .btn.primary) {
  background: var(--zt-gold-grad) !important;
  color: #12141C !important; -webkit-text-fill-color: #12141C !important;
  border: 0 !important;
  border-radius: 50px !important;
  font-family: var(--zt-font) !important; font-weight: 800 !important;
  text-transform: none !important; letter-spacing: 0 !important;
  box-shadow: 0 10px 24px rgba(232, 163, 23, .28) !important;
}
body :is(.btn-gold, .btn-primary, .btn-main, .btn-save, .btn-submit, .submit-btn, .cta, .btn-cta, .gold-btn, .btn-confirm, .primary-btn) * { color: #12141C !important; }
body :is(.btn-outline, .btn-secondary, .btn-ghost, .btn-cancel, .btn-outline-dark) {
  border-radius: 50px !important;
  border: 1.5px solid var(--zt-line) !important;
  background: var(--zt-card) !important; color: var(--zt-ink) !important;
  font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important;
}
body :is(.btn-danger, .btn-red, .btn-delete) { border-radius: 50px !important; }

/* ═════════════════════ Champs ═════════════════════ */
body :is(input[type=text], input[type=email], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea):not(.zt-keep) {
  border-radius: 14px;
  border-color: var(--zt-line);
  background-color: var(--zt-card-2);
  color: var(--zt-ink);
  font-family: var(--zt-font);
}
body :is(input, select, textarea):focus { outline: 3px solid rgba(232, 163, 23, .25); outline-offset: 0; border-color: var(--zt-gold) !important; }

/* ═════════════════════ Onglets / filtres en pilule ═════════════════════ */
body :is(.tab, .tabs a, .tabs button, .filter-btn, .chip-filter, .f-chip, .seg-btn, .period-btn, .ftab, .ntab):is(.active, .on, [aria-selected=true], [aria-current]) {
  background: #12141C !important; color: #FFFFFF !important; -webkit-text-fill-color: #FFFFFF !important;
  border-color: transparent !important; box-shadow: none !important;
}
[data-theme=dark] body :is(.tab, .tabs a, .tabs button, .filter-btn, .chip-filter, .f-chip, .seg-btn, .period-btn, .ftab, .ntab):is(.active, .on, [aria-selected=true], [aria-current]),
body[data-theme=dark] :is(.tab, .tabs a, .tabs button, .filter-btn, .chip-filter, .f-chip, .seg-btn, .period-btn, .ftab, .ntab):is(.active, .on, [aria-selected=true], [aria-current]) {
  background: var(--zt-gold-grad) !important; color: #12141C !important; -webkit-text-fill-color: #12141C !important;
}

/* ═════════════════════ Pages d'authentification (mot de passe oublié, vérification) ═════════════════════ */
body > .bg, body > .noise, body > .grid-bg { background: var(--zt-hero) !important; }
body > .orb { display: none !important; }

/* ═════════════════════ Divers ═════════════════════ */
body a { color: inherit; }
body ::selection { background: rgba(232, 163, 23, .3); }
@media print {
  body .topnav, body .topbar, body header.hdr, body header.app-header, body header.header, body .hero { background: #fff !important; color: #000 !important; }
}

/* Cartes de sélection (types de course…) */
body .type-card { border-radius: 18px !important; background: var(--zt-card) !important; border: 1.5px solid var(--zt-line, rgba(0,0,0,.08)) !important; margin-bottom: 10px !important; }
body .type-card.selected { border-color: var(--zt-gold) !important; box-shadow: 0 0 0 3px rgba(232,163,23,.15) !important; }
body header.header:has(> .tb-btn) { display: flex !important; align-items: center !important; gap: 10px; }
