/* STRIDES — Midnight Silver Ink — Design System v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&family=Archivo:wght@500;600;700&display=swap');

:root {
  /* Palette de marque STRIDES */
  --black:       #1A1A18;
  --gold:        #B8953A;
  --gold-light:  #F5EDDA;
  --silver:      #ACA8A0;  /* métal noble — pendant du --gold */
  --white:       #FFFFFF;

  /* Codes couleur métier — cohérence par famille (jamais pour du texte courant) */
  --job-groom-concours:        #B8953A;  /* Or · métaux nobles */
  --job-groom-maison:          #ACA8A0;  /* Argent · métaux nobles */
  --job-cavalier-maison:       #8F3A4A;  /* Bordeaux · tons chauds */
  --job-cavalier-entrainement: #A14A38;  /* Brique · tons chauds */
  --job-chauffeur:             #5A7A8F;  /* Bleu ardoise · tons froids */
  --job-palefrenier:           #5A6E7A;  /* Gris bleu · tons froids */
  --job-enseignant:            #2D6A4F;  /* Vert sapin · enseignement */
  --job-voltigeur-concours:    #7A5A8F;  /* Prune · voltige */
  --job-agent:                 #5A5A5A;  /* Anthracite · représentation */

  /* Surfaces — bone crème, never pure white */
  --surface-0: #EFEAE0; /* canvas */
  --surface-1: #F2EEE6;
  --surface-2: #F7F4ED;
  --surface-3: #FBFAF5;
  --surface-4: #FBFAF5; /* hover */

  /* Text — calibré WCAG AA sur bone */
  --text-primary: #0A0A09;
  --text-secondary: #46443E;
  --text-tertiary: #76736B;
  --text-disabled: #B5B0A2;

  /* Accent — INK */
  --accent-50:  #8A5E20; /* ocre assombri — AA pour texte/étoiles d'accent */
  --accent-300: #C8C3B5;
  --accent-500: #0F0F0E; /* BRAND — encre */
  --accent-700: #2A2A26;

  /* Functional */
  --success: #2E8A65;
  --error:   #C84545;
  --warning: #B07A2F;
  --info:    #3E7CAB;

  /* Borders / hairlines — dark on light */
  --line:        rgba(10,10,9,0.08);
  --line-strong: rgba(10,10,9,0.14);

  /* Radii — never > 24 except avatars/pills */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  /* Spacing — 8pt grid */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-7: 32px;
  --s-8: 40px;
  --s-9: 48px;
  --s-10: 64px;

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', monospace;
  --font-eyebrow: 'Archivo', 'Geist', system-ui, sans-serif;
}

* { box-sizing: border-box; }

body, html {
  margin: 0;
  padding: 0;
  background: var(--surface-0);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ──────────────── Type ──────────────── */
.t-display { font-size: 36px; line-height: 1.05; letter-spacing: -0.03em; font-weight: 700; }
.t-h1      { font-size: 28px; line-height: 1.1;  letter-spacing: -0.02em; font-weight: 600; }
.t-h2      { font-size: 22px; line-height: 1.2;  letter-spacing: -0.015em; font-weight: 600; }
.t-h3      { font-size: 17px; line-height: 1.3;  letter-spacing: -0.01em; font-weight: 500; }
.t-body    { font-size: 15px; line-height: 1.55; letter-spacing: -0.005em; font-weight: 400; }
.t-body-strong { font-size: 15px; line-height: 1.55; font-weight: 500; }
.t-small   { font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--text-secondary); }
.t-caption { font-size: 12px; line-height: 1.4;  font-weight: 400; color: var(--text-secondary); }
.t-eyebrow { font-size: 10px; line-height: 1.6;  letter-spacing: 0.22em; font-weight: 600; text-transform: uppercase; font-family: var(--font-eyebrow); color: var(--text-tertiary); }
.t-mono    { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.tabular   { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum'; }

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-accent { color: var(--accent-500); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* ──────────────── Buttons ──────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  height: 48px;
  padding: 0 var(--s-5);
  border-radius: var(--r-md);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 0;
  cursor: pointer;
  transition: background 120ms ease, transform 60ms ease, box-shadow 120ms;
  white-space: nowrap;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { height: 38px; padding: 0 var(--s-4); font-size: 13px; border-radius: var(--r-sm); }
.btn-lg { height: 56px; padding: 0 var(--s-6); font-size: 16px; border-radius: var(--r-md); }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--black);
  color: var(--white);
  font-weight: 600;
}
.btn-primary:hover { background: var(--gold); color: var(--black); }
.btn-secondary {
  background: var(--surface-2);
  color: var(--text-primary);
  border: 1px solid var(--line-strong);
}
.btn-secondary:hover { background: var(--surface-3); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(168,176,194,0.05); }

/* ──────────────── Inputs ──────────────── */
.input, .textarea {
  width: 100%;
  height: 48px;
  padding: 0 var(--s-4);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color 120ms, background 120ms;
}
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:focus, .textarea:focus {
  border-color: var(--accent-500);
  background: var(--surface-2);
}
.textarea { height: auto; min-height: 96px; padding: var(--s-3) var(--s-4); resize: vertical; }
.input-error { border-color: var(--error); }
.field { display: flex; flex-direction: column; gap: var(--s-2); }
.field-label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  font-family: var(--font-eyebrow);
  font-weight: 600;
}

/* ──────────────── Badges ──────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  font-family: var(--font-eyebrow);
  text-transform: uppercase;
  background: var(--surface-2);
  color: var(--text-secondary);
  border: 1px solid var(--line-strong);
  white-space: nowrap;
}
.badge-verified { background: rgba(95,184,126,0.10); border-color: rgba(95,184,126,0.30); color: var(--success); }
.badge-pro { background: var(--accent-500); color: var(--on-accent); border-color: var(--accent-500); }
.badge-new { background: rgba(107,163,199,0.10); border-color: rgba(107,163,199,0.30); color: var(--info); }
.badge-pending { background: rgba(224,164,92,0.10); border-color: rgba(224,164,92,0.30); color: var(--warning); }
.badge-inactive { background: var(--surface-1); color: var(--text-tertiary); }
.badge-top { background: rgba(247,239,220,0.06); border-color: rgba(247,239,220,0.18); color: var(--accent-50); }

/* ──────────────── Cards ──────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}
.card-tap {
  cursor: pointer;
  transition: background 120ms, transform 60ms, border-color 120ms;
}
.card-tap:active { transform: scale(0.995); background: var(--surface-2); }
.card-flat {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-4);
}

.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.dot-sep { color: var(--text-tertiary); padding: 0 6px; }

/* ──────────────── Avatar ──────────────── */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
}
.avatar-sm { width: 32px; height: 32px; font-size: 10px; }
.avatar-md { width: 44px; height: 44px; font-size: 12px; }
.avatar-lg { width: 56px; height: 56px; font-size: 14px; }
.avatar-xl { width: 88px; height: 88px; font-size: 22px; }

/* ──────────────── Stars ──────────────── */
.stars { display: inline-flex; align-items: center; gap: 3px; color: var(--accent-50); font-size: 11px; }
.stars svg { width: 11px; height: 11px; }

/* ──────────────── Layout helpers ──────────────── */
.row { display: flex; align-items: center; }
.col { display: flex; flex-direction: column; }
.gap-1 { gap: var(--s-1); } .gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-5 { gap: var(--s-5); } .gap-6 { gap: var(--s-6); }
.flex-1 { flex: 1; }
.between { justify-content: space-between; }
.center { justify-content: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }

/* ──────────────── App shell ──────────────── */
.screen {
  min-height: 100%;
  width: 100%;
  background: var(--surface-0);
  padding-bottom: 96px; /* room for tab bar */
}
.screen-pad { padding: 0 var(--s-5); }
.scroll-hide::-webkit-scrollbar { display: none; }
.scroll-hide { scrollbar-width: none; }

/* ──────────────── Image placeholder ──────────────── */
.img-placeholder {
  background:
    repeating-linear-gradient(45deg, var(--surface-2) 0 8px, var(--surface-1) 8px 16px);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ──────────────── Top bar ──────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) var(--s-5);
  gap: var(--s-3);
}
.wordmark {
  display: inline-block;
  width: 104px; height: 26px;
  background: url('assets/strides-logo.png') left center / contain no-repeat;
  text-indent: -9999px; overflow: hidden; white-space: nowrap;
  font-size: 0; vertical-align: middle;
}
.wordmark::after { content: ''; }

/* ──────────────── Tab bar (bottom nav) ──────────────── */
.tabbar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  align-items: stretch;
  height: 76px;
  padding: var(--s-2) var(--s-4) var(--s-5);
  background: linear-gradient(180deg, rgba(6,11,24,0) 0%, var(--surface-0) 40%);
  backdrop-filter: blur(16px);
  z-index: 40;
}
.tabbar-inner {
  display: flex;
  flex: 1;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  gap: 2px;
}
.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  border-radius: 999px;
  cursor: pointer;
  transition: color 120ms, background 120ms;
  padding: 8px 0;
}
.tab.active {
  color: var(--text-primary);
  background: var(--surface-2);
}
.tab svg { width: 22px; height: 22px; }

/* ──────────────── Progress / gauge ──────────────── */
.gauge-bar {
  height: 4px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}
.gauge-fill {
  height: 100%;
  background: var(--accent-500);
  border-radius: 999px;
  transition: width 320ms cubic-bezier(.2,.7,.3,1);
}

/* ──────────────── Chips ──────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--s-3);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.chip:hover { background: var(--surface-2); }
.chip.active {
  background: var(--accent-500);
  color: var(--on-accent);
  border-color: var(--accent-500);
  font-weight: 500;
}
.chip-lg { height: 38px; padding: 0 var(--s-4); font-size: 14px; }

/* ──────────────── Animations ──────────────── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideRight {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
.anim-fade { animation: fadeIn 260ms ease both; }
.anim-up { animation: slideUp 320ms cubic-bezier(.2,.7,.3,1) both; }
.anim-right { animation: slideRight 280ms cubic-bezier(.2,.7,.3,1) both; }
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ──────────────── Mission Marker (for map) ──────────────── */
.map-pin {
  position: absolute;
  background: var(--accent-500);
  color: var(--on-accent);
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: -0.01em;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1.5px solid var(--surface-0);
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 120ms, box-shadow 120ms;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}
.map-pin:hover { transform: translate(-50%, -50%) scale(1.08); z-index: 5; }
.map-pin.muted { background: var(--surface-3); color: var(--text-secondary); border-color: var(--surface-0); }
.map-pin.muted:hover { background: var(--surface-4); }

/* ──────────────── Sheet (bottom sheet) ──────────────── */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6,11,24,0.65);
  backdrop-filter: blur(4px);
  z-index: 50;
  animation: fadeIn 200ms ease both;
}
.sheet {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: var(--surface-1);
  border-radius: 22px 22px 0 0;
  border-top: 1px solid var(--line-strong);
  padding: var(--s-4) var(--s-5) var(--s-7);
  z-index: 51;
  max-height: 85%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  animation: slideUp 280ms cubic-bezier(.2,.7,.3,1) both;
}

/* Sticky action footer inside any sheet — keeps Valider/Appliquer reachable. */
.sheet-actions {
  position: sticky;
  bottom: calc(var(--s-7) * -1);
  margin: var(--s-4) calc(var(--s-5) * -1) calc(var(--s-7) * -1);
  padding: var(--s-4) var(--s-5) calc(var(--s-9) + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, var(--surface-1) 25%);
  z-index: 5;
}
.sheet-handle {
  width: 36px; height: 4px; background: var(--surface-3);
  border-radius: 999px; margin: 0 auto var(--s-4);
}

/* ──────────────── List rows ──────────────── */
.row-tap {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0;
  cursor: pointer;
  transition: opacity 120ms;
}
.row-tap:active { opacity: 0.7; }

/* ──────────────── Misc ──────────────── */
.kbd-spacer { height: 0; }
.no-select { user-select: none; }

/* ──────────────── Calendar ──────────────── */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
  position: relative;
}
.cal-day:hover:not(.disabled):not(.range-start):not(.range-end):not(.in-range) { background: var(--surface-2); }
.cal-day.disabled { color: var(--text-disabled); cursor: not-allowed; }
.cal-day.in-range,
.cal-day.in-range:hover {
  background: var(--accent-500);
  color: var(--on-accent, #0A1020);
  border-radius: 0;
}
.cal-day.range-start, .cal-day.range-end,
.cal-day.range-start:hover, .cal-day.range-end:hover {
  background: var(--accent-500); color: var(--on-accent, #0A1020); font-weight: 600;
}
.cal-day.range-start { border-radius: 10px 0 0 10px; }
.cal-day.range-end { border-radius: 0 10px 10px 0; }
.cal-day.range-start.range-end { border-radius: 10px; }
.cal-day.today::after {
  content: ''; position: absolute; bottom: 4px; width: 3px; height: 3px;
  border-radius: 50%; background: var(--accent-500);
}
.cal-head {
  display: grid; grid-template-columns: repeat(7,1fr); gap: 4px;
  margin-bottom: var(--s-2);
}
.cal-head > div {
  text-align: center; font-size: 10px; letter-spacing: 0.18em;
  font-family: var(--font-mono); color: var(--text-tertiary); text-transform: uppercase;
  padding: 4px 0;
}

/* Switch */
.switch {
  width: 42px; height: 26px;
  background: var(--surface-3); border-radius: 999px;
  position: relative; cursor: pointer; transition: background 160ms;
  flex-shrink: 0;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 20px; height: 20px; background: var(--text-primary);
  border-radius: 50%; transition: transform 160ms cubic-bezier(.2,.7,.3,1);
}
.switch.on { background: var(--accent-500); }
.switch.on::after { transform: translateX(16px); background: var(--on-accent); }


/* ──────────────── Select ──────────────── */
.select-wrap { position: relative; width: 100%; }
.select {
  width: 100%; height: 48px; padding: 0 40px 0 var(--s-4);
  background: var(--surface-1); border: 1px solid var(--line); border-radius: var(--r-md);
  color: var(--text-primary); font-family: var(--font-sans); font-size: 15px;
  outline: none; cursor: pointer; appearance: none; -webkit-appearance: none;
  transition: border-color 120ms, background 120ms;
}
.select:focus { border-color: var(--accent-500); background: var(--surface-2); }
.select:disabled { opacity: 0.5; cursor: not-allowed; }
.select-wrap::after {
  content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--text-tertiary); border-bottom: 2px solid var(--text-tertiary);
  transform: translateY(-65%) rotate(45deg); pointer-events: none;
}

/* ──────────────── Checkbox & Radio ──────────────── */
.check, .radio {
  width: 22px; height: 22px; flex-shrink: 0; cursor: pointer;
  border: 1.5px solid var(--line-strong); background: var(--surface-1);
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 120ms, border-color 120ms; position: relative;
}
.check { border-radius: 6px; }
.radio { border-radius: 50%; }
.check:hover, .radio:hover { border-color: var(--accent-500); }
.check.on, .radio.on { background: var(--accent-500); border-color: var(--accent-500); }
.check.on::after {
  content: ''; width: 11px; height: 6px; margin-top: -2px;
  border-left: 2px solid var(--on-accent); border-bottom: 2px solid var(--on-accent);
  transform: rotate(-45deg);
}
.radio.on::after { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--on-accent); }
.check.disabled, .radio.disabled { opacity: 0.45; cursor: not-allowed; }
/* Option row (checkbox/radio + label) */
.opt-row { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-2) 0; cursor: pointer; }
.opt-row .opt-label { font-size: 15px; color: var(--text-primary); }
.opt-row .opt-sub { font-size: 13px; color: var(--text-tertiary); }

/* ──────────────── Tags (static, non-interactive) ──────────────── */
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: 12px; color: var(--text-secondary); white-space: nowrap;
}
.tag-accent { background: rgba(192,199,207,0.10); border-color: var(--line-strong); color: var(--accent-50); }
.tag .tag-x { cursor: pointer; opacity: 0.6; display: inline-flex; }
.tag .tag-x:hover { opacity: 1; }

/* ──────────────── Tooltip ──────────────── */
.tip { position: relative; display: inline-flex; }
.tip-bubble {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: var(--surface-4); color: var(--text-primary); border: 1px solid var(--line-strong);
  padding: 7px 10px; border-radius: var(--r-sm); font-size: 12px; line-height: 1.4;
  white-space: nowrap; box-shadow: 0 8px 24px rgba(0,0,0,0.35); z-index: 60; pointer-events: none;
}
.tip-bubble::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--surface-4);
}

/* ──────────────── Toast ──────────────── */
.toast {
  display: flex; align-items: center; gap: var(--s-3);
  background: var(--surface-3); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 12px 16px; box-shadow: 0 12px 32px rgba(0,0,0,0.4); max-width: 420px;
}
.toast-ic { width: 20px; height: 20px; flex-shrink: 0; }
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.toast-sub { font-size: 12px; color: var(--text-secondary); margin-top: 1px; }
.toast-success .toast-ic { color: var(--success); }
.toast-error .toast-ic { color: var(--error); }
.toast-info .toast-ic { color: var(--info); }
.toast-accent-bar { width: 3px; align-self: stretch; border-radius: 999px; background: var(--accent-500); }

/* ──────────────── Menu (dropdown) ──────────────── */
.menu {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,0.45); min-width: 200px;
}
.menu-item {
  display: flex; align-items: center; gap: var(--s-3); padding: 10px 10px; border-radius: var(--r-sm);
  cursor: pointer; color: var(--text-secondary); font-size: 14px; transition: background 120ms, color 120ms;
}
.menu-item:hover { background: var(--surface-3); color: var(--text-primary); }
.menu-item.danger { color: var(--error); }
.menu-item.danger:hover { background: rgba(200,69,69,0.10); }
.menu-sep { height: 1px; background: var(--line); margin: 6px 4px; }

/* ──────────────── Modal (centered dialog) ──────────────── */
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: var(--s-5); z-index: 70;
}
.modal {
  width: 100%; max-width: 440px; background: var(--surface-1);
  border: 1px solid var(--line-strong); border-radius: var(--r-xl);
  padding: var(--s-6); box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}
.modal-title { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; }


/* ──────────────── Outer page bg + accent text color ──────────────── */
:root {
  --page-bg: #DDD4C2;
  --on-accent: #FBFAF5;
}

/* ──────────────── Marque · règles promues (thème unique Daylight) ──────────────── */
.tab.active { background: var(--accent-300); }

/* Highlight "Métier actif" de la barre de recherche. */
.search-row-metier-active {
  background: var(--gold-light);
  border-color: rgba(184,149,58,0.3);
}
.badge-top {
  background: rgba(176,122,47,0.08);
  border-color: rgba(176,122,47,0.25);
}

/* ──────────────── Focus visible (a11y · WCAG 2.4.7) ──────────────── */
.btn:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.switch:focus-visible,
.check:focus-visible,
.radio:focus-visible,
.row-tap:focus-visible,
.menu-item:focus-visible,
.card-tap:focus-visible {
  outline: 2px solid var(--accent-500);
  outline-offset: 2px;
}

/* ──────────────── Réduction de mouvement ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ──────────────── Skeleton loaders (afficher si fetch > 200ms) ──────────────── */
.skel-line, .skel-card, .skel-avatar {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skel-line { height: 12px; border-radius: 6px; }
.skel-card { height: 96px; border-radius: var(--r-lg); }
.skel-avatar { width: 44px; height: 44px; border-radius: 50%; }


/* ──────────────── V2 · Fiches publiques ──────────────── */
/* Avatar hero — grande photo de profil (fiche Cavalier Pro) */
.avatar-hero {
  width: 120px; height: 120px; border-radius: 28px; object-fit: cover;
  background: var(--accent-500); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 40px; font-weight: 600; letter-spacing: -0.02em;
  border: 3px solid var(--surface-0); box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}

/* Logo écurie en overlay sur la photo hero */
.fiche-cover { position: relative; height: 200px; border-radius: var(--r-xl); overflow: hidden; background: var(--surface-2); }
.logo-overlay {
  position: absolute; left: 16px; bottom: 16px;
  width: 64px; height: 64px; border-radius: 16px; background: var(--surface-0);
  border: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display: flex; align-items: center; justify-content: center;
}

/* Ligne palmarès — événement · date · classement · cheval */
.palmares-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.palmares-row:last-child { border-bottom: 0; }
.palmares-rank {
  flex-shrink: 0; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 10px;
  background: var(--surface-2); color: var(--accent-50);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-weight: 600; font-size: 14px;
}
.palmares-rank.podium { background: rgba(176,122,47,0.14); color: var(--warning); }

/* Grille infrastructures — icône + libellé + quantité */
.infra-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.infra-cell {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-1);
}
.infra-cell .infra-ic { width: 32px; height: 32px; border-radius: 9px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--text-secondary); }
.infra-cell .infra-qty { font-family: var(--font-mono); font-weight: 600; font-size: 15px; color: var(--text-primary); }
.infra-cell .infra-lbl { font-size: 12px; color: var(--text-tertiary); }

/* Bloc conditions d'accueil — icônes + état */
.conditions-block { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.cond-item {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md);
}
.cond-item .cond-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cond-item .cond-lbl { font-size: 11px; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.06em; }
.cond-item .cond-val { font-size: 13px; color: var(--text-primary); font-weight: 500; }

/* Grille tarifs publics */
.pricing-grid { display: flex; flex-direction: column; }
.pricing-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.pricing-row:last-child { border-bottom: 0; }
.pricing-row .price { font-family: var(--font-mono); font-weight: 600; color: var(--text-primary); }
.pricing-row .price-unit { font-size: 11px; color: var(--text-tertiary); }

/* Carte avis (review) — note + critères + texte + droit de réponse */
.review-card { padding: 16px 0; border-bottom: 1px solid var(--line); }
.review-card:last-child { border-bottom: 0; }
.review-crit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 16px; margin: 10px 0; }
.review-crit-row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }
.review-crit-row .crit-name { color: var(--text-tertiary); }
.review-crit-row .crit-stars { display: inline-flex; gap: 1px; }
.review-reply {
  margin-top: 10px; margin-left: 14px; padding: 10px 12px;
  border-left: 2px solid var(--line-strong); background: var(--surface-1); border-radius: 0 8px 8px 0;
}
.review-reply .reply-author { font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 2px; }

/* Bouton partager profil */
.btn-share-profile {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text-primary);
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; cursor: pointer;
  transition: background 120ms;
}
.btn-share-profile:hover { background: var(--surface-3); }


/* Grille résultats : 2 colonnes égales sur large, 1 colonne sur mobile */
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s-3); }
@media (max-width: 620px) { .results-grid { grid-template-columns: 1fr; } }
