/**
 * FindEdition — platform-98.4-mobiles-theme.css
 * Mobiles theme tokens and surface overrides.
 *
 * Copyright (c) FindEdition Developers. All rights reserved.
 */

/* ── Canonical Mobiles tokens (extend existing .mhp8821 + light surfaces) ── */
.mhp8821,
.mf-enterprise,
.md-device-page,
.mobiles-public-shell {
  --mobile-bg: #0b1220;
  --mobile-surface: #0f172a;
  --mobile-surface-elevated: #1e293b;
  --mobile-border: rgba(148, 163, 184, 0.28);
  --mobile-text: #f1f5f9;
  --mobile-text-muted: #cbd5e1;
  --mobile-heading: #f8fafc;
  --mobile-link: #67e8f9;
  --mobile-link-hover: #a5f3fc;
  --mobile-accent: #06b6d4;
  --mobile-accent-strong: #0891b2;
  --mobile-accent-soft: rgba(6, 182, 212, 0.16);
  --mobile-success: #34d399;
  --mobile-warning: #fbbf24;
  --mobile-danger: #f87171;
  --mobile-focus: #22d3ee;
}

/* Light listing / filter panels that sit outside dark hero shells */
.mf-enterprise .mf-panel,
.mf-enterprise .mf-filters,
.mf-enterprise .mf-card:not(.mf-card--dark),
.mobiles-listing-light {
  --mobile-bg: #f8fafc;
  --mobile-surface: #ffffff;
  --mobile-surface-elevated: #ffffff;
  --mobile-border: #e2e8f0;
  --mobile-text: #0f172a;
  --mobile-text-muted: #475569;
  --mobile-heading: #0f172a;
  --mobile-link: #0e7490;
  --mobile-link-hover: #155e75;
  --mobile-accent: #0891b2;
  --mobile-accent-strong: #0e7490;
  --mobile-accent-soft: rgba(8, 145, 178, 0.12);
  --mobile-focus: #0891b2;
}

/* ── Dark homepage / hub headings ── */
.mhp8821 h1,
.mhp8821 h2,
.mhp8821 h3,
.mhp8821 .mhp8821__head h2,
.mhp8821 .mhp8821__title,
.mh88-hero__title,
.mh88-hero__eyebrow {
  color: var(--mobile-heading, #f8fafc) !important;
}

.mhp8821 p,
.mhp8821 .mhp8821__head p,
.mhp8821 .mhp8821__lead {
  color: var(--mobile-text-muted, #475569);
}

.mhp8821 a:not(.btn):not([class*="btn"]):not(.fe983-mobile__title) {
  color: var(--mobile-link, #67e8f9);
}

.mhp8821 a:not(.btn):not([class*="btn"]):hover {
  color: var(--mobile-link-hover, #a5f3fc);
}

.mhp8821 a:visited:not(.btn):not([class*="btn"]) {
  color: #a5b4fc;
}

/* ── Menu / category / filter navigation ── */
.mhp8821 .mhp8821-nav,
.mhp8821 .mhp8821-tabs,
.mf-enterprise .mf-nav,
.mf-enterprise .mf-tabs,
.mf-enterprise .mf-chip-row,
.md-device-page .md-section-nav {
  background: #ffffff;
  border-color: #e2e8f0;
}

.mhp8821 .mhp8821-nav a,
.mhp8821 .mhp8821-tabs a,
.mhp8821 .mhp8821-tabs button,
.mf-enterprise .mf-nav a,
.mf-enterprise .mf-tabs a,
.mf-enterprise .mf-tabs button,
.mf-enterprise .mf-chip,
.md-device-page .md-section-nav a {
  color: #334155;
  border-color: transparent;
}

.mhp8821 .mhp8821-nav a:hover,
.mhp8821 .mhp8821-tabs a:hover,
.mf-enterprise .mf-nav a:hover,
.mf-enterprise .mf-chip:hover,
.md-device-page .md-section-nav a:hover {
  color: #0e7490;
  background: #ecfeff;
}

.mhp8821 .mhp8821-nav a.is-active,
.mhp8821 .mhp8821-tabs a.is-active,
.mhp8821 .mhp8821-tabs [aria-selected="true"],
.mf-enterprise .mf-nav a.is-active,
.mf-enterprise .mf-tabs [aria-selected="true"],
.mf-enterprise .mf-chip.is-active,
.md-device-page .md-section-nav a.is-active {
  color: #ffffff;
  background: #0891b2;
  border-color: #0e7490;
}

.mhp8821 .mhp8821-nav a:focus-visible,
.mf-enterprise .mf-nav a:focus-visible,
.mf-enterprise .mf-chip:focus-visible,
.md-device-page .md-section-nav a:focus-visible {
  outline: 2px solid var(--mobile-focus, #22d3ee);
  outline-offset: 2px;
}

/* Light filter surfaces override */
.mf-enterprise .mf-panel .mf-chip,
.mf-enterprise .mf-filters .mf-chip {
  color: var(--mobile-text, #0f172a);
  background: var(--mobile-surface, #fff);
  border: 1px solid var(--mobile-border, #e2e8f0);
}

.mf-enterprise .mf-panel .mf-chip.is-active,
.mf-enterprise .mf-filters .mf-chip.is-active {
  color: #fff;
  background: var(--mobile-accent-strong, #0e7490);
  border-color: var(--mobile-accent-strong, #0e7490);
}

/* ── Cards / titles — never inherit black on dark ── */
.mhp8821 .fe983-mobile__title,
.mhp8821 .fe983-mobile__title a,
.mf-enterprise .fe983-mobile__title,
.mf-enterprise .fe983-mobile__title a {
  color: var(--mobile-heading, #0f172a);
}

/* White product cards on dark homepage: keep dark titles on card surface (98.5) */
.mhp8821 .fe983-mobile__title,
.mhp8821 .fe983-mobile__title a {
  color: #0f172a;
}

.mhp8821 .fe983-mobile__title a:visited {
  color: #334155;
}

/* Detail page is a LIGHT surface — do not force dark-theme text */
.md-device-page .md-device-title,
.md-device-page h1,
.md-device-page h2,
.md-device-page h3 {
  color: var(--mobile-heading, #0f172a);
}

.md-device-page {
  --mobile-bg: #f1f5f9;
  --mobile-surface: #ffffff;
  --mobile-heading: #0f172a;
  --mobile-text: #1e293b;
  --mobile-text-muted: #475569;
  --mobile-link: #0e7490;
  --mobile-link-hover: #155e75;
  color: var(--mobile-text, #1e293b);
}

.md-device-page a:not(.btn):not([class*="btn"]):not(.fe984-desktop-bar__btn):not(.fe984-mobile-actions__btn) {
  color: var(--mobile-link, #0e7490);
}

.md-device-page a:visited:not(.btn):not([class*="btn"]) {
  color: #5b21b6;
}

/* Breadcrumbs / pagination */
.mhp8821 .breadcrumb,
.mf-enterprise .breadcrumb,
.md-device-page .breadcrumb,
.mhp8821 nav[aria-label="Breadcrumb"],
.mf-enterprise nav[aria-label="Breadcrumb"] {
  color: var(--mobile-text-muted, #cbd5e1);
}

.mhp8821 .breadcrumb a,
.mf-enterprise .breadcrumb a,
.md-device-page .breadcrumb a {
  color: var(--mobile-link, #67e8f9);
}

.mf-enterprise .pagination a,
.mf-enterprise .pagination span {
  color: var(--mobile-text, #0f172a);
  border-color: var(--mobile-border, #e2e8f0);
}

.mf-enterprise .pagination .active span,
.mf-enterprise .pagination [aria-current="page"] {
  background: var(--mobile-accent-strong, #0e7490);
  border-color: var(--mobile-accent-strong, #0e7490);
  color: #fff;
}

/* Empty states */
.mhp8821 .empty-state,
.mf-enterprise .empty-state {
  color: var(--mobile-text-muted, #475569);
}

.mhp8821 .empty-state {
  color: var(--mobile-text-muted, #cbd5e1);
}

/* Forms — light surfaces (homepage + detail). Do not force navy fields. */
.mhp8821 input,
.mhp8821 select,
.mhp8821 textarea,
.md-device-page input,
.md-device-page select,
.md-device-page textarea {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.mhp8821 input::placeholder,
.md-device-page input::placeholder {
  color: #64748b;
  opacity: 1;
}

.mf-enterprise .mf-panel input,
.mf-enterprise .mf-panel select,
.mf-enterprise .mf-filters input,
.mf-enterprise .mf-filters select {
  background: #fff;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* CTA buttons */
.mhp8821 .btn-primary,
.mf-enterprise .btn-primary,
.md-device-page .btn-primary {
  background: var(--mobile-accent-strong, #0891b2);
  border-color: var(--mobile-accent-strong, #0891b2);
  color: #fff;
}

.mhp8821 .btn-primary:hover,
.mf-enterprise .btn-primary:hover {
  background: #0e7490;
  color: #fff;
}

/* Badges remain legible */
.mhp8821 .badge,
.md-device-page .badge,
.mf-enterprise .badge {
  color: inherit;
}

/* Never force light text onto light tier/status badges */
.mhp8821 .fe983-badge--brand { color: #0f172a; }
.mhp8821 .fe983-badge--status,
.md-device-page .fe983-badge--status { color: #111827; }
.mhp8821 .fe983-badge--tier,
.md-device-page .fe983-badge--tier {
  color: #0c4a6e;
  background: #e0f2fe;
  border: 1px solid #7dd3fc;
}

/* Specs / metadata hierarchy */
.md-device-page .md-meta,
.md-device-page .md-spec-label {
  color: var(--mobile-text-muted, #475569);
  font-size: 0.875rem;
}

.md-device-page .md-spec-value,
.md-device-page .md-price {
  color: var(--mobile-heading, #0f172a);
  font-weight: 700;
}
