:root {
  --bg-cream: #FAF5F0;
  --bg-cream-alt: #F3EAE1;
  --bg-blush: #FAF0E7;
  --surface: #FFFFFF;
  --surface-warm: #FFFDFB;
  --ink: #181412;
  --ink-soft: #4F453E;
  --ink-muted: #84776D;
  --orange: #EA5E0B;
  --orange-hover: #D45105;
  --burnt: #B84A0C;
  --burnt-dark: #8E3706;
  --burnt-soft: #FDF0E6;
  --burnt-border: #F2CEB2;
  --charcoal: #141210;
  --border: #EFE5DC;
  --border-strong: #E1D2C5;
  --danger-bg: #FEF2F0;
  --danger-border: #F4C7C1;
  --danger-ink: #8E281D;
  --shadow-xs: 0 2px 8px rgba(24, 20, 18, 0.04);
  --shadow-sm: 0 4px 16px rgba(24, 20, 18, 0.06);
  --shadow-float: 0 10px 26px rgba(142, 55, 6, 0.10);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --tabbar-height: 64px;
  --topbar-height: 58px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-cream);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
}

button, input {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  padding: 0;
}

.app-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  width: 100%;
  overflow: hidden;
  background: var(--bg-cream);
}

.desktop-rail {
  display: none;
}

/* ================= TOPBAR (Djobea-inspired header) ================= */
.topbar, .detail-topbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: calc(var(--topbar-height) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 16px 8px;
  background: rgba(250, 245, 240, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 20;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.topbar-logo {
  border-radius: 10px;
  flex-shrink: 0;
}

.topbar-brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--ink);
}

.topbar-brand-tag {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}

.topbar-pill-btn {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--charcoal);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.topbar-pill-btn:active {
  opacity: 0.86;
}

.topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 0 10px 0 4px;
  border-radius: 999px;
  color: var(--burnt-dark);
  background: var(--bg-blush);
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.topbar-back svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.topbar-title-wrap {
  flex: 1;
  min-width: 0;
}

.topbar-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-sub {
  font-size: 11.5px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fav-btn-top {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-blush);
  color: var(--ink-muted);
  flex-shrink: 0;
}

.fav-btn-top svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.fav-btn-top.is-fav {
  background: var(--burnt-soft);
  color: var(--orange);
}

/* ================= MASTER & DETAIL PANES ================= */
.master-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
}

.master-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px 16px 28px;
}

.detail-pane {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg-cream);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.detail-pane.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.detail-topbar {
  border-bottom: 1px solid var(--border);
}

.detail-topbar-title {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  font-size: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 16px calc(32px + env(safe-area-inset-bottom));
}

/* ================= BOTTOM TABBAR (Djobea floating white bar) ================= */
.bottom-tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top-left-radius: 22px;
  border-top-right-radius: 22px;
  box-shadow: 0 -4px 22px rgba(24, 20, 18, 0.07);
}

.tab-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 48px;
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 600;
}

.tab-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.tab-btn.is-active {
  color: var(--orange);
  font-weight: 700;
}

.tab-btn.is-active::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 28px;
  height: 3px;
  border-radius: 999px;
  background: var(--orange);
}

/* ================= HOME SCREEN (Djobea UX/UI) ================= */
.home-hero-wrap {
  margin-bottom: 18px;
}

.home-hero-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 20px 18px 42px;
  background: linear-gradient(135deg, #FCEEE1 0%, #F7D4B4 62%, #F3C49A 100%);
  border: 1px solid rgba(234, 94, 11, 0.12);
}

.home-hero-card::after {
  content: "";
  position: absolute;
  right: -24px;
  top: -24px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.hero-greeting {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.hero-subline {
  display: inline-block;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2px;
}

.hero-underline {
  display: block;
  width: 195px;
  height: 9px;
  margin: 2px 0 10px;
}

.hero-desc {
  margin: 0;
  max-width: 92%;
  font-size: 13.5px;
  line-height: 1.45;
  color: #463A32;
}

/* Floating overlapping search bar */
.hero-search-float {
  position: relative;
  z-index: 5;
  margin: -26px 8px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 14px;
  min-height: 54px;
  box-shadow: var(--shadow-float);
  border: 1px solid rgba(239, 229, 220, 0.9);
}

.hero-search-float svg {
  width: 20px;
  height: 20px;
  fill: var(--ink-muted);
  flex-shrink: 0;
}

.hero-search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ink);
}

.hero-search-input::placeholder {
  color: var(--ink-muted);
}

.hero-search-go {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--orange);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(234, 94, 11, 0.28);
}

.hero-search-go:active {
  background: var(--orange-hover);
  transform: scale(0.96);
}

.hero-search-go svg {
  width: 20px;
  height: 20px;
  fill: #FFFFFF;
}

/* 4 Quick Action Blush Tiles (like Services / Boutique / Emploi / Actualité) */
.quick-tiles-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 9px;
  margin-bottom: 18px;
}

.quick-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 13px 6px 11px;
  background: var(--bg-blush);
  border: 1px solid #F3E5D8;
  border-radius: var(--radius-md);
  text-align: center;
  min-height: 84px;
}

.quick-tile:active {
  transform: scale(0.97);
  border-color: var(--burnt-border);
}

.quick-tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  color: var(--burnt);
  line-height: 1;
}
.quick-tile-icon svg {
  width: 24px;
  height: 24px;
  display: block;
}

.quick-tile-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.15;
}

/* Centered Section Link Divider ("Explorer tout >") */
.explore-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0 14px;
}

.explore-divider::before,
.explore-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-strong);
}

.explore-divider-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}

.explore-divider-btn svg {
  width: 17px;
  height: 17px;
  fill: var(--ink);
}

/* Action White Card (like "Autour de moi") */
.feature-link-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  text-align: left;
  margin-bottom: 14px;
}

.feature-link-card:active {
  transform: scale(0.99);
  border-color: var(--burnt-border);
}

.feature-link-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-blush);
  color: var(--burnt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  flex-shrink: 0;
}
.feature-link-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.feature-link-body {
  flex: 1;
  min-width: 0;
}

.feature-link-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.feature-link-sub {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-top: 1px;
}

/* Dark Copper Promo Banner (like "Tout en un, sur Djobea !") */
.copper-banner {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: 18px 18px 18px;
  background: linear-gradient(135deg, #5C2104 0%, #9E3E0B 58%, #C45312 100%);
  color: #FFFFFF;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}

.copper-banner-title {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.copper-banner-title span {
  color: #FDBA4D;
}

.copper-banner-desc {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
}

.copper-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copper-pill-btn {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.34);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
}

.copper-pill-btn.is-solid {
  background: #FFFFFF;
  color: var(--burnt-dark);
  border-color: #FFFFFF;
}

/* ================= CATEGORIES GRID (24 sheets) ================= */
.section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin: 4px 0 10px;
}

.sheets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.sheet-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  min-height: 98px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.sheet-card:active {
  transform: scale(0.98);
  border-color: var(--orange);
}

.sheet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 6px;
}

.sheet-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--bg-blush);
  color: var(--burnt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sheet-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

.sheet-count-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--burnt-dark);
  background: var(--burnt-soft);
  padding: 3px 8px;
  border-radius: 999px;
}

.sheet-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}

.sheet-meta {
  font-size: 11.5px;
  color: var(--ink-muted);
  margin-top: 2px;
}

/* ================= SEARCH VIEW ================= */
.search-box-wrap {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-cream);
  padding: 4px 0 12px;
}

.search-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 5px 6px 5px 13px;
  min-height: 52px;
  box-shadow: var(--shadow-sm);
}

.search-input-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(234, 94, 11, 0.14);
}

.search-input-box svg {
  width: 20px;
  height: 20px;
  fill: var(--ink-muted);
  flex-shrink: 0;
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  min-width: 0;
}

.search-clear-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-blush);
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ================= SUBCLASSES, A-Z RAIL & MOLECULE LIST ================= */
.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 12px;
  margin-bottom: 4px;
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.filter-chip.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #FFFFFF;
}

.az-layout {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.az-rail {
  position: sticky;
  top: 4px;
  z-index: 8;
  width: 28px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
}

.az-letter-btn {
  width: 23px;
  height: 20px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--burnt);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
}

.az-letter-btn.is-disabled {
  color: #CBBDB1;
  pointer-events: none;
}

.az-letter-btn.is-active {
  background: var(--orange);
  color: #FFFFFF;
}

.az-list {
  flex: 1;
  min-width: 0;
}

.letter-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 6px 12px;
  margin: 10px 0 7px;
  background: var(--bg-blush);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  color: var(--burnt-dark);
}

.letter-heading:first-child {
  margin-top: 0;
}

.mol-group-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--burnt-dark);
  margin: 14px 0 7px;
  padding-left: 2px;
}

.mol-group-title:first-child {
  margin-top: 2px;
}

.mol-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mol-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px;
  min-height: 60px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  box-shadow: var(--shadow-xs);
}

.mol-row:active {
  background: var(--burnt-soft);
}

.mol-row.is-selected {
  border-color: var(--orange);
  background: var(--burnt-soft);
}

.mol-row-main {
  flex: 1;
  min-width: 0;
}

.mol-row-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}

.mol-row-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mol-row-brands {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mol-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.count-pill {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-blush);
  color: var(--burnt-dark);
}

.chevron-icon {
  width: 18px;
  height: 18px;
  fill: var(--ink-muted);
}

/* ================= FICHE MÉDICAMENT ================= */
.fiche-header-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-xs);
  margin-bottom: 12px;
}

.fiche-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 9px;
}

.badge-sheet {
  font-size: 11.5px;
  font-weight: 700;
  background: var(--burnt-soft);
  color: var(--burnt-dark);
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-classe {
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-cream-alt);
  color: var(--ink-soft);
  padding: 3px 10px;
  border-radius: 999px;
}

.fiche-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.fiche-title {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.fiche-fav-btn {
  min-width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--bg-blush);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-muted);
  flex-shrink: 0;
}

.fiche-fav-btn.is-fav {
  background: var(--burnt-soft);
  color: var(--orange);
}

.fiche-fav-btn svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.selector-block {
  margin-top: 14px;
}

.selector-label {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
  margin-bottom: 7px;
}

.bubbles-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.forme-bubble {
  min-height: 38px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border-strong);
  background: var(--surface-warm);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

.forme-bubble.is-active {
  background: var(--orange);
  border-color: var(--orange);
  color: #FFFFFF;
}

.brand-pill {
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-cream);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}

.brand-pill.is-active {
  background: var(--burnt-soft);
  border-color: var(--orange);
  color: var(--burnt-dark);
}

.brand-dose-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(24, 20, 18, 0.07);
  color: var(--ink-soft);
}

.brand-pill.is-active .brand-dose-tag {
  background: var(--orange);
  color: #FFFFFF;
}

.fiche-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.fiche-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 10px;
}

.fiche-card-head svg {
  width: 18px;
  height: 18px;
  fill: var(--orange);
  flex-shrink: 0;
}

.spec-highlight {
  background: var(--burnt-soft);
  border: 1px solid var(--burnt-border);
  border-radius: var(--radius-sm);
  padding: 11px 13px;
  margin-bottom: 10px;
}

.spec-highlight-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--burnt-dark);
  margin-bottom: 4px;
}

.poso-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 14.5px;
  color: var(--ink);
}

.poso-line {
  line-height: 1.45;
}

.poso-ref-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-muted);
  margin-bottom: 5px;
}

.fiche-card.is-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
}

.fiche-card.is-danger .fiche-card-head {
  color: var(--danger-ink);
}

.fiche-card.is-danger .fiche-card-head svg {
  fill: var(--danger-ink);
}

.ci-text {
  font-size: 14px;
  color: #4A1B16;
  line-height: 1.5;
}

/* Price & Officines */
.price-empty {
  font-size: 13.5px;
  color: var(--ink-muted);
  margin-bottom: 10px;
}

.price-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 10px;
}

.price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-cream);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.price-amount {
  font-weight: 800;
  color: var(--burnt-dark);
  white-space: nowrap;
}

.price-meta {
  font-size: 12px;
  color: var(--ink-muted);
}

.btn-outline {
  min-height: 40px;
  padding: 8px 14px;
  border-radius: 11px;
  border: 1px solid var(--burnt-border);
  background: var(--burnt-soft);
  color: var(--burnt-dark);
  font-size: 13px;
  font-weight: 700;
}

.btn-primary {
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 11px;
  background: var(--orange);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 700;
}

.btn-danger-ghost {
  font-size: 12px;
  color: var(--danger-ink);
  font-weight: 600;
  padding: 6px;
}

.price-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
}

.price-form .full-span {
  grid-column: 1 / -1;
}

.form-input {
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  font-size: 16px;
}

.empty-state {
  text-align: center;
  padding: 36px 20px;
  color: var(--ink-muted);
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}

.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-xs);
}

.guide-card h2 {
  margin: 0 0 10px;
  font-size: 15.5px;
  color: var(--burnt-dark);
}

.guide-card ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  color: var(--ink-soft);
}

.guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* ================= DESKTOP LAYOUT (>= 900px) ================= */
@media (min-width: 900px) {
  .app-shell {
    flex-direction: row;
  }

  .bottom-tabbar {
    display: none;
  }

  .desktop-rail {
    display: flex;
    flex-direction: column;
    width: 248px;
    flex-shrink: 0;
    background: var(--surface);
    border-right: 1px solid var(--border);
    padding: 18px 14px;
    gap: 18px;
  }

  .rail-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 6px;
  }

  .rail-logo {
    border-radius: 11px;
    flex-shrink: 0;
  }

  .rail-title {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -0.025em;
  }

  .rail-subtitle {
    font-size: 11px;
    color: var(--ink-muted);
  }

  .rail-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .rail-btn {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--ink-soft);
    text-align: left;
  }

  .rail-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
  }

  .rail-btn:hover {
    background: var(--bg-cream);
  }

  .rail-btn.is-active {
    background: var(--burnt-soft);
    color: var(--burnt-dark);
    font-weight: 700;
  }

  .rail-stats {
    margin-top: auto;
    padding: 13px;
    border-radius: 14px;
    background: var(--bg-blush);
    border: 1px solid #F3E5D8;
    font-size: 12px;
    color: var(--ink-soft);
    line-height: 1.55;
  }

  .master-pane {
    width: 450px;
    flex: none;
    border-right: 1px solid var(--border);
    padding-bottom: 0;
  }

  .detail-pane {
    position: static;
    flex: 1;
    min-width: 0;
    transform: none !important;
    pointer-events: auto !important;
  }

  .detail-topbar {
    display: none;
  }

  .detail-content {
    padding: 24px 32px 40px;
    max-width: 820px;
  }
}

@media (min-width: 1240px) {
  .master-pane {
    width: 490px;
  }
}
