/* V0142: theme tokens, semantic status colors remain unchanged. */
:root{--theme-bg:#f4f5f7;--theme-surface:#fff;--theme-text:#192536;--theme-muted:#687686;--theme-primary:#102b48;--theme-accent:#d2a44c;--theme-accent-text:#856321;--theme-border:#dfe4e9;--theme-input:#fff;--theme-nav:#fff;--theme-focus:#d2a44c;--theme-on-accent:#17212b;--theme-soft:#f1f3f5}
html[data-theme="navy_gold"]{--theme-bg:#F2F4F7;--theme-surface:#FFFFFF;--theme-text:#192536;--theme-muted:#5E6A7A;--theme-primary:#102B48;--theme-accent:#D2A44C;--theme-accent-text:#856321;--theme-border:#DCE2E8;--theme-input:#FFFFFF;--theme-nav:#102B48;--theme-focus:#D2A44C;--theme-on-accent:#17212B;--theme-soft:#F2E8D1}
html[data-theme="charcoal_copper"]{--theme-bg:#EDEEF0;--theme-surface:#FFFFFF;--theme-text:#24282E;--theme-muted:#606772;--theme-primary:#292D32;--theme-accent:#C1845B;--theme-accent-text:#8F5A36;--theme-border:#D8DCE1;--theme-input:#FFFFFF;--theme-nav:#292D32;--theme-focus:#C1845B;--theme-on-accent:#211D1A;--theme-soft:#F1E4DB}
html[data-theme="graphite_gold"]{--theme-bg:#17191D;--theme-surface:#292D32;--theme-text:#F6F6F6;--theme-muted:#BEC4CD;--theme-primary:#16181C;--theme-accent:#D5AA50;--theme-accent-text:#D5AA50;--theme-border:#464B52;--theme-input:#292D32;--theme-nav:#16181C;--theme-focus:#D5AA50;--theme-on-accent:#17191D;--theme-soft:#38332A}
html[data-theme="white_blue"]{--theme-bg:#F0F4F8;--theme-surface:#FFFFFF;--theme-text:#1E344B;--theme-muted:#5C6E81;--theme-primary:#F0F4F8;--theme-accent:#2362A0;--theme-accent-text:#2362A0;--theme-border:#D4DFE9;--theme-input:#FFFFFF;--theme-nav:#F0F4F8;--theme-focus:#2362A0;--theme-on-accent:#FFFFFF;--theme-soft:#E4EFF9}
html[data-theme="green_gold"]{--theme-bg:#EAF0ED;--theme-surface:#FFFFFF;--theme-text:#193C36;--theme-muted:#5D6C67;--theme-primary:#193C36;--theme-accent:#C5A15B;--theme-accent-text:#80642D;--theme-border:#CBD9D2;--theme-input:#FFFFFF;--theme-nav:#193C36;--theme-focus:#C5A15B;--theme-on-accent:#182820;--theme-soft:#F0E8D6}
html[data-theme="ivory_champagne"]{--theme-bg:#F6F1E8;--theme-surface:#FFFFFF;--theme-text:#292B30;--theme-muted:#6B665E;--theme-primary:#F6F1E8;--theme-accent:#A8864A;--theme-accent-text:#7E6437;--theme-border:#E2D9C9;--theme-input:#FFFFFF;--theme-nav:#F6F1E8;--theme-focus:#A8864A;--theme-on-accent:#17212B;--theme-soft:#F1E8D7}

body, .app{background:var(--theme-bg);color:var(--theme-text)}
header,nav{background:var(--theme-nav);border-color:var(--theme-border)}
header .brand strong,header .brand span,header .round,nav a{color:var(--theme-text)}
html[data-theme="navy_gold"] header,html[data-theme="navy_gold"] nav,html[data-theme="charcoal_copper"] header,html[data-theme="charcoal_copper"] nav,html[data-theme="graphite_gold"] header,html[data-theme="graphite_gold"] nav,html[data-theme="green_gold"] header,html[data-theme="green_gold"] nav{color:#fff}
html[data-theme="navy_gold"] header .brand strong,html[data-theme="navy_gold"] nav a,html[data-theme="charcoal_copper"] header .brand strong,html[data-theme="charcoal_copper"] nav a,html[data-theme="graphite_gold"] header .brand strong,html[data-theme="graphite_gold"] nav a,html[data-theme="green_gold"] header .brand strong,html[data-theme="green_gold"] nav a{color:#fff}
nav a[aria-current=page]{background:var(--theme-accent);color:var(--theme-on-accent)!important}
.welcome p,.muted,.ride-time,.ride-route small,.ride-extra,.dashboard-links small{color:var(--theme-muted)}
.eyebrow,.ride-fare{color:var(--theme-accent-text)}
.brand span{color:var(--theme-accent)}
html[data-theme="ivory_champagne"] .brand span{color:var(--theme-accent-text)}
.panel,.driver-card,.dashboard-links a,.ride-card,.mine-detail,.mission-panel,.auth-zone,#admin-board .admin-panel,.pricing-card,.zone-card{background:var(--theme-surface);border-color:var(--theme-border);color:var(--theme-text)}
.driver-card{background:var(--theme-surface)}
.dashboard-links a,.ride-card strong,.mine-detail,.mission-panel{color:var(--theme-text)}
.rides-tabs,.ride-map-empty{background:var(--theme-soft)}
.rides-tabs button,.mine-filters button,.ride-actions button,.mine-pages button,#mine-back,.rides-toolbar button{color:var(--theme-text);background:var(--theme-surface);border-color:var(--theme-border)}
.rides-tabs button[aria-selected=true],.mine-filters button[aria-pressed=true],.availability-btn,.ride-actions button[data-action=accept],.mine-open,.mine-directions{background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-accent)}
input:not([type=checkbox]):not([type=radio]),select,textarea{background:var(--theme-input);color:var(--theme-text);border-color:var(--theme-border)}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid var(--theme-focus);outline-offset:2px}
#admin-board button{background:var(--theme-accent);border-color:var(--theme-accent);color:var(--theme-on-accent)}
/* User choice screen */
.theme-settings{margin:18px 0;padding:16px;border:1px solid var(--theme-border);border-radius:16px;background:var(--theme-surface);color:var(--theme-text)}
.theme-settings h3{margin:0 0 8px}.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:16px 0}
.theme-option{border:2px solid var(--theme-border);border-radius:14px;padding:8px;background:var(--theme-surface);color:var(--theme-text);text-align:left;cursor:pointer;min-width:0}
.theme-option[aria-pressed=true]{border-color:var(--theme-accent);box-shadow:0 0 0 2px var(--theme-accent)}
.theme-preview{display:block;height:75px;border-radius:8px;overflow:hidden;padding:9px;background:var(--preview-bg);color:var(--preview-fg)}
.theme-preview-top{display:block;height:10px;width:65%;background:var(--preview-main);border-radius:3px;margin-bottom:8px}
.theme-preview-card{display:block;background:var(--preview-surface);border-radius:5px;height:33px;padding:7px}
.theme-preview-line{display:block;background:var(--preview-fg);opacity:.6;width:60%;height:5px;border-radius:3px}
.theme-preview-button{display:block;background:var(--preview-accent);height:9px;width:45%;border-radius:3px;margin-top:5px}
.theme-option-name{display:block;font-size:12px;font-weight:700;padding:7px 1px 1px}
#theme-reset{padding:11px 13px;background:var(--theme-surface);border:1px solid var(--theme-border);border-radius:10px;color:var(--theme-text)}
#theme-status{min-height:20px;color:var(--theme-muted)}
@media(min-width:650px){.theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}


/* V0142.1 — Harmonisation Gestion, sans changement métier. */
#admin-board, :is(#admin-board, #services-board) .pricing-page, :is(#admin-board, #services-board) .pricing-page .zone-screen {
  color:var(--theme-text);
}
:is(#admin-board, #services-board) .pricing-page,
:is(#admin-board, #services-board) .pricing-page .zone-screen,
:is(#admin-board, #services-board) .pricing-page .zone-editor-form,
:is(#admin-board, #services-board) .pricing-page .zone-editor-head {
  background:var(--theme-bg)!important;color:var(--theme-text)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(.zone-card,.zone-list-row,.zone-search-box,.zone-menu-popup,.zone-tools,.zone-selected,.zone-suggestions,.tariff-control,.tariff-controls,.tariff-card,.pricing-card),
:is(#admin-board, #services-board) .pricing-page :is(section,article)[class*="card"] {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(h1,h2,h3,h4,label,strong,.zone-heading,.zone-list-row,.zone-name-row,.tariff-heading,.tariff-section,.tariff-label,.tariff-identity) {
 color:var(--theme-text)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(.zone-subtitle,.zone-note,.tariff-summary,.tariff-explanation,small) {
 color:var(--theme-muted)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(input:not([type=checkbox]):not([type=radio]),textarea,select) {
 background:var(--theme-input)!important;
 color:var(--theme-text)!important;
 -webkit-text-fill-color:var(--theme-text)!important;
 border-color:var(--theme-border)!important;
 caret-color:var(--theme-accent)!important;
 opacity:1!important;
}
:is(#admin-board, #services-board) .pricing-page :is(input,textarea)::placeholder {color:var(--theme-muted)!important;opacity:1!important}
:is(#admin-board, #services-board) .pricing-page :is(input,textarea,select):focus {
 outline:2px solid var(--theme-focus)!important;outline-offset:1px;
}
:is(#admin-board, #services-board) .pricing-page :is(input,textarea,select):disabled {
 opacity:.7!important;cursor:not-allowed;
}
:is(#admin-board, #services-board) .pricing-page :is(.zone-mode-tabs,.zone-round,.zone-menu,.tariff-btn,.zone-search-box),
:is(#admin-board, #services-board) .pricing-page button:not([class*="primary"]):not([aria-selected="true"]):not([aria-pressed="true"]) {
 background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(button[aria-selected="true"],button[aria-pressed="true"],.tariff-btn-primary,.zone-mode-tabs .active) {
 background:var(--theme-accent)!important;color:var(--theme-on-accent)!important;border-color:var(--theme-accent)!important;
}
:is(#admin-board, #services-board) .pricing-page :is(.zone-brand,.tariff-brand) {color:var(--theme-accent)!important}
:is(#admin-board, #services-board) .pricing-page :is(.zone-map,.zone-map-shell,.leaflet-container,.leaflet-control-container) {
 color:initial;
}
/* Messages et cartes inactives : préserver un contraste lisible */
:is(#admin-board, #services-board) .pricing-page :is(.zone-list-row,.zone-card) * {opacity:1}
:is(#admin-board, #services-board) .pricing-page :is(.zone-list-row,.zone-card) :is(span,p,small) {color:var(--theme-muted)}
:is(#admin-board, #services-board) .pricing-page :is(.zone-list-row,.zone-card) :is(strong,h3,h4,input) {color:var(--theme-text)!important}

/* V0142.1: isolate the six real theme swatches from shared button styles */
.theme-settings .theme-grid .theme-option{background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important;padding:8px!important;min-height:0!important;text-align:left!important}
.theme-settings .theme-grid .theme-option[aria-pressed="true"]{border-color:var(--theme-accent)!important}
.theme-settings .theme-grid .theme-preview{display:block!important;background:var(--preview-bg)!important;color:var(--preview-fg)!important;height:75px!important;padding:9px!important}
.theme-settings .theme-grid .theme-preview-top{display:block!important;background:var(--preview-main)!important}
.theme-settings .theme-grid .theme-preview-card{display:block!important;background:var(--preview-surface)!important}
.theme-settings .theme-grid .theme-preview-line{display:block!important;background:var(--preview-fg)!important}
.theme-settings .theme-grid .theme-preview-button{display:block!important;background:var(--preview-accent)!important}
.theme-settings .theme-grid .theme-option-name{background:transparent!important;color:var(--theme-text)!important}
/* Admin pages: fix contrast for headings, labels, disabled fields and help text */
:is(#admin-board, #services-board) .pricing-page :is(h1,h2,h3,h4,h5,label,legend,summary,strong){color:var(--theme-text)!important;opacity:1!important}
:is(#admin-board, #services-board) .pricing-page :is(p,small,.muted,.tariff-summary,.tariff-explanation){color:var(--theme-muted)!important}
:is(#admin-board, #services-board) .pricing-page :is(input:not([type="checkbox"]):not([type="radio"]),textarea,select){background:var(--theme-input)!important;color:var(--theme-text)!important;-webkit-text-fill-color:var(--theme-text)!important;caret-color:var(--theme-accent)!important;opacity:1!important}
:is(#admin-board, #services-board) .pricing-page :is(input,textarea)::placeholder{color:var(--theme-muted)!important;opacity:1!important}
:is(#admin-board, #services-board) .pricing-page :is(.notice,.zone-notice,.zone-message,#vtc-options-empty,.menu-popup){background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
:is(#admin-board, #services-board) .pricing-page :is(.notice,.zone-notice,.zone-message,#vtc-options-empty,.menu-popup) *{color:inherit}
:is(#admin-board, #services-board) .pricing-page :is(.zone-list-row,.zone-card,.offer,.price-row,.option-row) {background:var(--theme-surface)!important;border-color:var(--theme-border)!important}
:is(#admin-board, #services-board) .pricing-page :is(button,.tariff-btn,.opt-btn):focus-visible{outline:3px solid var(--theme-focus)!important;outline-offset:2px}
/* Leaflet tiles and controls must not inherit application text colors */
:is(#admin-board, #services-board) .pricing-page .leaflet-container{color:#222}

/* V0155 — preserve palettes and restore readable ancillary panels. */
:is(#admin-board,#services-board) .pricing-page :is(.geo-auto-status,.zone-advanced,.zone-save-footer){background:var(--theme-surface)!important;color:var(--theme-text)!important;border-color:var(--theme-border)!important}
:is(#admin-board,#services-board) .pricing-page :is(.geo-auto-status,.zone-advanced) :is(p,summary,label,small,strong){color:inherit!important}

/* A2 : aperçu des photos réelles du véhicule (remplace un style en ligne bloqué par la CSP) */
.vehicle-preview{display:block;max-width:180px;max-height:130px;object-fit:contain;cursor:zoom-in;border-radius:8px}
.theme-option.is-locked{opacity:.7}.theme-option.is-locked .theme-option-name{font-weight:700}
