/* ==========================================================================
   Meaflow — Design system (base commune à toutes les pages)
   Inspiration : sobriété Airbnb (blanc, cartes arrondies, ombres douces)
   ========================================================================== */

/* Police Inter auto-hébergée (SIL Open Font License) — aucune requête vers des serveurs tiers */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url(/fonts/inter-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Couleurs de marque */
  --brand: #d1450a;
  --brand-hover: #b13a07;
  --brand-soft: #fff4ed;
  --brand-ink: #9a3412;

  /* Encre & surfaces */
  --ink: #1f2328;
  --ink-2: #484f58;
  --muted: #6a717b;
  --faint: #9aa1a9;
  --line: #e3e5e8;
  --line-strong: #c9cdd2;
  --bg: #ffffff;
  --surface: #f7f7f8;
  --surface-2: #f0f1f3;
  --navy: #0f1e36;

  /* Statuts */
  --success: #067a3a;
  --success-soft: #e8f6ee;
  --warning: #9a6200;
  --warning-soft: #fff6e0;
  --danger: #c4301c;
  --danger-soft: #fdecea;
  --info: #1d4ed8;
  --info-soft: #ebf1ff;
  --verified: #1d4ed8;

  /* Typo */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;

  /* Formes */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.08), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.16);
  --focus: 0 0 0 3px rgba(209, 69, 10, 0.3);

  /* Mise en page */
  --header-h: 80px;
  --mobile-nav-h: 64px;
  --container: 1120px;
  --container-wide: 1440px;
  --gutter: 24px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
body.has-modal { overflow: hidden; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4, h5 { margin: 0 0 0.5em; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-md); }
h4 { font-size: var(--fs-base); }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
::selection { background: #ffd8c2; }
.icon { flex-shrink: 0; }
[hidden] { display: none !important; }

/* ---------- Utilitaires ---------- */
.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--container-wide) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { width: 100%; max-width: calc(760px + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: 48px 0; }
.section-sm { padding: 24px 0; }
.section-alt { background: var(--surface); }
.section-title { font-size: var(--fs-xl); margin-bottom: 8px; }
.section-subtitle { color: var(--muted); font-size: var(--fs-md); margin-bottom: 32px; max-width: 680px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.text-md { font-size: var(--fs-md); }
.text-lg { font-size: var(--fs-lg); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-brand { color: var(--brand); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.underline { text-decoration: underline; }
.link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--brand); }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; min-width: 0; }
.gap-4 { gap: 4px; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-32 { margin-bottom: 32px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
/* Lien d'évitement : visible dès qu'il reçoit le focus clavier */
a.sr-only:focus, a.sr-only:focus-visible {
  position: fixed; top: 8px; left: 8px; z-index: 11000; width: auto; height: auto; margin: 0; padding: 12px 18px;
  overflow: visible; clip: auto; background: var(--ink); color: #fff; border-radius: var(--radius-sm); font-weight: 600;
}
.divider { height: 1px; background: var(--line); margin: 32px 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: var(--fs-base); line-height: 1; white-space: nowrap;
  transition: background 0.15s var(--ease), border-color 0.15s, box-shadow 0.15s, transform 0.1s, color 0.15s;
  text-decoration: none !important; user-select: none;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled, .btn.is-disabled { opacity: 0.5; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--surface); }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--ink); background: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #a3260f; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #055f2d; }
.btn-soft { background: var(--brand-soft); color: var(--brand-ink); }
.btn-soft:hover { background: #ffe6d5; }
.btn-sm { min-height: 38px; padding: 0 14px; font-size: var(--fs-sm); }
.btn-lg { min-height: 56px; padding: 0 28px; font-size: var(--fs-md); border-radius: var(--radius); }
.btn-block { width: 100%; }
.btn-pill { border-radius: var(--radius-pill); }
.btn.is-loading { pointer-events: none; opacity: 0.85; }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; color: var(--ink);
  transition: background 0.15s;
}
.btn-icon:hover { background: var(--surface-2); }
.btn-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; padding: 0; min-height: 0; }
.btn-link:hover { color: var(--brand); }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; min-width: 0; }
.field > label, .field-label { font-weight: 600; font-size: var(--fs-sm); color: var(--ink); }
.field-label .optional, .field > label .optional { font-weight: 400; color: var(--muted); }
.field-hint { font-size: var(--fs-sm); color: var(--muted); margin: 0; }
.field-error { font-size: var(--fs-sm); color: var(--danger); margin: 0; display: flex; gap: 6px; align-items: center; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 16px; }
.input, .select, .textarea,
.field input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]),
.field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--ink); font-size: var(--fs-base);
  transition: border-color 0.15s, box-shadow 0.15s;
  appearance: none; -webkit-appearance: none;
}
.field textarea, .textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.field select, .select {
  padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231f2328' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:hover, .select:hover, .textarea:hover,
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.input:focus, .select:focus, .textarea:focus,
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.is-invalid, .field .is-invalid { border-color: var(--danger) !important; background: #fffafa !important; }
::placeholder { color: var(--faint); }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group > input { flex: 1; }
.input-group .input-prefix, .input-group .input-suffix {
  position: absolute; top: 0; bottom: 0; display: flex; align-items: center; color: var(--muted); pointer-events: none; font-weight: 500;
}
.input-group .input-prefix { left: 14px; }
.input-group .input-suffix { right: 14px; }
.input-group.has-prefix > input { padding-left: 40px !important; }
.input-group.has-suffix > input { padding-right: 56px !important; }
.char-count { font-size: var(--fs-xs); color: var(--muted); text-align: right; margin-top: -2px; }

.checkbox, .radio { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-base); line-height: 1.4; }
input[type=radio]:focus-visible { border-radius: 50%; }
.checkbox input, .radio input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex-shrink: 0; cursor: pointer; }

/* Cartes sélectionnables (type de compte, catégories…) */
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.choice-card { position: relative; display: block; cursor: pointer; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card-body {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: #fff; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.choice-card:hover .choice-card-body { border-color: var(--ink); }
.choice-card input:checked + .choice-card-body { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); background: var(--surface); }
.choice-card input:focus-visible + .choice-card-body { box-shadow: var(--focus); }
.choice-card-title { font-weight: 600; }
.choice-card-text { font-size: var(--fs-sm); color: var(--muted); }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch-track { width: 44px; height: 26px; border-radius: 999px; background: var(--line-strong); position: relative; transition: background 0.2s; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-xs); transition: transform 0.2s var(--ease); }
.switch input:checked + .switch-track { background: var(--ink); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--focus); }

/* Zone de dépôt de fichiers */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  padding: 32px 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--muted); cursor: pointer; transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone.is-dragover { border-color: var(--ink); background: #fff; }
.dropzone strong { color: var(--ink); }
.dropzone input[type=file] { display: none; }
.progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: inherit; transition: width 0.2s; }

/* ---------- Cartes génériques ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card-elevated { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; box-shadow: var(--shadow); }
.card-flat { background: var(--surface); border-radius: var(--radius); padding: 20px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-header h2, .card-header h3 { margin: 0; }
.card-link { display: block; transition: box-shadow 0.15s, border-color 0.15s; }
.card-link:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow-sm); }

/* ---------- Alertes ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); font-size: var(--fs-sm); line-height: 1.5; }
.alert .icon { margin-top: 1px; }
.alert p:last-child { margin-bottom: 0; }
.alert-info { background: var(--info-soft); color: #1e3a8a; }
.alert-success { background: var(--success-soft); color: #064e2b; }
.alert-warning { background: var(--warning-soft); color: #6b4400; }
.alert-danger { background: var(--danger-soft); color: #8a1f10; }
.alert-neutral { background: var(--surface); color: var(--ink-2); }

/* ---------- Badges & chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; line-height: 1.4; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2);
}
.badge-primary { background: var(--brand-soft); color: var(--brand-ink); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--surface-2); color: var(--ink-2); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-verified { background: var(--info-soft); color: var(--verified); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  font-size: var(--fs-sm); font-weight: 500; background: #fff; color: var(--ink); white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
}
button.chip:hover, a.chip:hover { border-color: var(--ink); text-decoration: none; }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
.chips-sm .chip { padding: 4px 10px; font-size: var(--fs-xs); background: var(--surface); border-color: transparent; }
.chip-remove { display: inline-flex; margin-right: -4px; opacity: 0.7; }
.chip-remove:hover { opacity: 1; }
.count-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.dot-badge { position: absolute; top: 4px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; }

/* ---------- Avatars & notes ---------- */
.avatar { border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--surface-2); }
.avatar-initials { display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 600; letter-spacing: 0.02em; }
.rating { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); }
.rating strong { font-weight: 600; }
.rating-empty { color: var(--muted); }
.stars { display: inline-flex; gap: 1px; }
.star { color: #d6d9dd; display: inline-flex; position: relative; }
.star.on { color: #f5a524; }
.star-fill { position: absolute; inset: 0; color: #f5a524; clip-path: inset(0 50% 0 0); display: inline-flex; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.star-input input { position: absolute; opacity: 0; pointer-events: none; }
.star-input label { color: #d6d9dd; cursor: pointer; transition: color 0.1s, transform 0.1s; }
.star-input label:hover, .star-input label:hover ~ label, .star-input input:checked ~ label { color: #f5a524; }
.star-input label:hover { transform: scale(1.1); }
.star-input input:focus-visible + label { box-shadow: var(--focus); border-radius: 4px; }

/* ---------- Visuels de catégorie ---------- */
.category-cover {
  position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 14%, #fff) 0%, color-mix(in srgb, var(--cat) 30%, #fff) 100%);
  color: var(--cat);
}
.category-cover-pattern {
  position: absolute; inset: 0; opacity: 0.35;
  background-image:
    linear-gradient(color-mix(in srgb, var(--cat) 22%, transparent) 1px, transparent 1px),
    linear-gradient(90deg, color-mix(in srgb, var(--cat) 22%, transparent) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 70% 30%, #000 0%, transparent 75%);
}
.category-cover-icon {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 96px; height: 96px; border-radius: 28px; background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--cat) 25%, transparent);
  backdrop-filter: blur(4px);
}

/* ---------- Cartes d'annonce (grille) ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 40px 24px; }
.grid-cards-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.listing-card { position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.listing-card-link { position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }
.listing-card-media { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.listing-card-media .cover-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s var(--ease); }
.listing-card:hover .cover-img { transform: scale(1.03); }
.listing-card-media .category-cover-icon { width: 84px; height: 84px; border-radius: 24px; }
.listing-card-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 2; pointer-events: none; }
.listing-card-tags .badge { background: rgba(255, 255, 255, 0.95); box-shadow: var(--shadow-xs); }
.listing-card-tags .badge-danger { color: var(--danger); }
.fav-btn {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  color: #fff; transition: transform 0.15s;
}
.fav-btn svg { fill: rgba(0, 0, 0, 0.45); stroke: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
.fav-btn.is-on svg { fill: var(--brand); stroke: #fff; }
.fav-btn:hover { transform: scale(1.1); }
.listing-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.listing-card-row { display: flex; justify-content: space-between; gap: 8px; font-size: var(--fs-sm); color: var(--muted); }
.listing-card-cat { display: inline-flex; align-items: center; gap: 5px; font-weight: 500; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-card-time { white-space: nowrap; }
.listing-card-title { font-size: var(--fs-base); font-weight: 600; margin: 2px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.35; }
.listing-card-meta { display: flex; align-items: center; gap: 4px; margin: 0; color: var(--muted); font-size: var(--fs-sm); }
.listing-card-budget { margin: 4px 0 0; font-weight: 600; }
.listing-card-foot { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: var(--fs-sm); color: var(--muted); }
.listing-card-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* Cartes prestataires */
.provider-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: #fff; transition: box-shadow 0.2s, transform 0.2s; }
.provider-card:hover { box-shadow: var(--shadow); }
.provider-card-cover { height: 120px; background: var(--surface-2); overflow: hidden; }
.provider-card-cover img { width: 100%; height: 100%; object-fit: cover; }
.provider-card-cover .category-cover-icon { width: 64px; height: 64px; border-radius: 18px; }
.provider-card-body { position: relative; padding: 0 20px 20px; display: flex; flex-direction: column; gap: 10px; }
.provider-card-head { display: flex; align-items: flex-start; gap: 12px; margin-top: -26px; }
.provider-card-avatar { border: 3px solid #fff; box-shadow: var(--shadow-xs); }
.provider-card-id { min-width: 0; padding-top: 30px; }
.provider-card-id h3 { margin: 0; font-size: var(--fs-base); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-card-id p { margin: 0; font-size: var(--fs-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-card-rating { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.provider-card-bio { font-size: var(--fs-sm); color: var(--ink-2); margin: 0; min-height: 2.8em; }

/* ---------- Onglets ---------- */
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 24px; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; padding: 12px 0 14px; font-weight: 500; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none !important;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--ink); font-weight: 600; }
.tab.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ---------- Bandeau de catégories (type Airbnb) ---------- */
.category-strip { display: flex; gap: 32px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 0; }
.category-strip::-webkit-scrollbar { display: none; }
.category-strip-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0 12px; min-width: 64px;
  color: var(--muted); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  border-bottom: 2px solid transparent; opacity: 0.85; transition: color 0.15s, border-color 0.15s, opacity 0.15s;
  text-decoration: none !important; flex-shrink: 0;
}
.category-strip-item:hover { color: var(--ink); border-bottom-color: var(--line-strong); opacity: 1; }
.category-strip-item.is-active { color: var(--ink); border-bottom-color: var(--ink); opacity: 1; }

/* ---------- États ---------- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 56px 24px; max-width: 520px; margin: 0 auto; }
.empty-state-icon { width: 72px; height: 72px; border-radius: 50%; background: var(--surface); display: flex; align-items: center; justify-content: center; color: var(--ink-2); margin-bottom: 8px; }
.empty-state-icon.is-danger { background: var(--danger-soft); color: var(--danger); }
.empty-state h3 { font-size: var(--fs-lg); margin: 0; }
.empty-state p { color: var(--muted); margin: 0 0 12px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 0%, #f8f9fa 50%, var(--surface-2) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
.skeleton-media { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.skeleton-line { height: 14px; }
.skeleton-card { gap: 10px; }
.w-40 { width: 40%; } .w-60 { width: 60%; } .w-90 { width: 90%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.spinner { display: inline-block; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; opacity: 0.8; flex-shrink: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: flex; align-items: center; justify-content: center; min-height: 50vh; color: var(--brand); }

/* ---------- Toasts ---------- */
.toast-root { position: fixed; z-index: 10001; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: var(--radius);
  background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: 500;
  opacity: 0; transform: translateY(12px); transition: opacity 0.25s, transform 0.25s var(--ease); pointer-events: auto;
}
.toast.is-visible { opacity: 1; transform: none; }
.toast-success .icon { color: #4ade80; }
.toast-error .icon { color: #fb7185; }
.toast-warning .icon { color: #fbbf24; }
.toast-info .icon { color: #93c5fd; }

/* ---------- Modales ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(15, 23, 42, 0.5); opacity: 0; transition: opacity 0.18s;
}
.modal-overlay.is-visible { opacity: 1; }
.modal {
  width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  transform: translateY(16px); transition: transform 0.22s var(--ease);
}
.modal-overlay.is-visible .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 600px; }
.modal-lg { max-width: 860px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 0; font-size: var(--fs-md); }
.modal-body { padding: 24px; overflow-y: auto; }
.modal-text { color: var(--ink-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ---------- Divers ---------- */
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-sm); color: var(--muted); margin-bottom: 16px; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb-sep { display: inline-flex; color: var(--faint); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; min-width: 0; }
.file-row + .file-row { margin-top: 8px; }
.file-row-icon { display: flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 8px; background: var(--surface); color: var(--ink-2); flex-shrink: 0; }
.file-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: var(--fs-sm); }
.file-row-size { font-size: var(--fs-xs); white-space: nowrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-size: var(--fs-xl); font-weight: 700; letter-spacing: -0.02em; }
.stat-label { font-size: var(--fs-sm); color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { font-weight: 600; color: var(--muted); background: var(--surface); white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 24px; font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.page-header { padding: 32px 0 8px; }
.page-header h1 { margin: 0 0 6px; font-size: var(--fs-xl); }
.page-header p { color: var(--muted); margin: 0; }

/* Mise en page avec colonne latérale */
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 64px; align-items: start; }
.layout-aside-left { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 40px; align-items: start; }
.sticky-aside { position: sticky; top: calc(var(--header-h) + 24px); }

/* ==========================================================================
   En-tête
   ========================================================================== */
#site-header { position: sticky; top: 0; z-index: 900; background: #fff; border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s; }
#site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 1px 0 rgba(0,0,0,.02); }
.header-inner { height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none !important; flex-shrink: 0; }
.logo-text { font-weight: 800; font-size: 1.3rem; letter-spacing: -0.03em; color: var(--ink); display: inline-flex; align-items: baseline; gap: 4px; }
.logo-light .logo-text { color: #fff; }

.header-search {
  flex: 0 1 620px; display: flex; align-items: center; height: 56px; padding: 0 8px 0 6px;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}
.header-search:hover, .header-search:focus-within { box-shadow: var(--shadow); }
.header-search-field { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 16px; height: 100%; border-radius: var(--radius-pill); cursor: text; }
.header-search-field:hover { background: var(--surface); }
.header-search-field:first-child { flex: 1.5; }
.header-search-select { cursor: pointer; }
.header-search-label { font-size: var(--fs-xs); font-weight: 700; color: var(--ink); line-height: 1.2; }
.header-search-field input, .header-search-field select {
  border: 0; outline: none; background: transparent; padding: 0; font-size: var(--fs-sm); color: var(--ink-2);
  width: 100%; min-width: 0; appearance: none; -webkit-appearance: none; cursor: inherit; text-overflow: ellipsis;
}
.header-search-field input::-webkit-search-cancel-button { display: none; }
.header-search-divider { width: 1px; height: 28px; background: var(--line); flex-shrink: 0; }
.header-search-btn { flex-shrink: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.header-search-btn:hover { background: var(--brand-hover); }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.header-link { padding: 10px 12px; border-radius: var(--radius-pill); font-size: var(--fs-sm); font-weight: 600; white-space: nowrap; }
.header-link:hover { background: var(--surface); text-decoration: none; }
.header-cta { border-radius: var(--radius-pill); min-height: 42px; }
.header-icon { position: relative; display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border-radius: 50%; color: var(--ink); }
.header-icon:hover { background: var(--surface); text-decoration: none; }
.header-icon .count-badge { position: absolute; top: 2px; right: 0; border: 2px solid #fff; height: 20px; }
.user-menu { position: relative; }
.user-menu-btn { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: var(--radius-pill); background: #fff; transition: box-shadow 0.2s; }
.user-menu-btn:hover { box-shadow: var(--shadow-sm); }
.user-menu-anon { width: 30px; height: 30px; border-radius: 50%; background: var(--muted); color: #fff; display: flex; align-items: flex-end; justify-content: center; overflow: hidden; padding-top: 4px; }
.user-menu-anon svg { width: 26px; height: 26px; margin-bottom: -4px; }
.user-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; padding: 8px 0; z-index: 950;
  max-height: calc(100vh - var(--header-h) - 24px); max-height: calc(100dvh - var(--header-h) - 24px); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.user-menu.is-open .user-menu-panel { opacity: 1; visibility: visible; transform: none; }
.user-menu-panel a, .user-menu-panel button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; font-size: var(--fs-sm); text-align: left; color: var(--ink); }
.user-menu-panel a:hover, .user-menu-panel button:hover { background: var(--surface); text-decoration: none; }
.user-menu-panel .count-badge { margin-left: auto; }
.user-menu-panel hr { margin: 8px 0; }
.user-menu-panel .menu-strong { font-weight: 600; }
.user-menu-identity { display: flex; align-items: center; gap: 12px; padding: 8px 18px; }
.user-menu-identity div { display: flex; flex-direction: column; min-width: 0; }
.user-menu-identity strong, .user-menu-identity span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-sm); }

/* ==========================================================================
   Pied de page & navigation mobile
   ========================================================================== */
#app { flex: 1; min-height: 60vh; }
#app:focus, #app:focus-visible { outline: none; box-shadow: none; }
#site-footer { background: var(--surface); border-top: 1px solid var(--line); padding: 48px 0 24px; margin-top: 64px; font-size: var(--fs-sm); }
body.no-footer #site-footer { display: none; }
.footer-top { display: grid; grid-template-columns: 1.6fr repeat(4, 1fr); gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.footer-brand p { color: var(--muted); margin: 16px 0; max-width: 340px; }
.footer-trust { display: flex; flex-direction: column; gap: 8px; color: var(--ink-2); }
.footer-trust span { display: inline-flex; align-items: center; gap: 8px; }
.footer-col { display: flex; flex-direction: column; gap: 10px; }
.footer-col .footer-heading { font-size: var(--fs-sm); font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.footer-col a { color: var(--ink-2); }
.footer-social { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; }
.footer-social a { color: var(--ink-2); font-weight: 600; }
.footer-link-btn { all: unset; cursor: pointer; color: var(--ink-2); }
.footer-link-btn:hover { text-decoration: underline; }
.footer-link-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
.footer-seo { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.footer-seo .footer-heading { font-size: var(--fs-sm); font-weight: 700; margin: 0 0 10px; }
.footer-seo .footer-heading a { color: var(--ink); }
.footer-seo-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; color: var(--muted); }
.footer-seo-links a { color: var(--muted); }
.footer-seo-links a:hover { color: var(--ink); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; color: var(--muted); }
.footer-bottom-links { display: inline-flex; gap: 20px; }
.footer-bottom-links span { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); }

#mobile-nav { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .hide-md { display: none !important; }
  .header-search { flex-basis: 480px; }
  .header-search-field:nth-of-type(3), .header-search-divider:nth-of-type(2) { display: none; }
  .layout-aside { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; }
}

@media (max-width: 960px) {
  :root { --header-h: 68px; }
  .header-cta span { display: none; }
  .header-cta { width: 42px; padding: 0; }
  .header-search { flex-basis: 360px; height: 48px; }
  .header-search-select, .header-search-divider { display: none !important; }
  .header-search-label { display: none; }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .layout-aside, .layout-aside-left { grid-template-columns: 1fr; gap: 32px; }
  .sticky-aside { position: static; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 744px) {
  :root { --gutter: 16px; --fs-2xl: 1.875rem; --fs-xl: 1.5rem; }
  .hide-sm { display: none !important; }
  body { padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)); }
  .header-inner { gap: 12px; }
  .header-actions .header-cta, .header-actions .header-link { display: none; }
  .logo-text { display: none; }
  .header-search { flex: 1; height: 46px; }
  .user-menu-btn { padding: 0 4px 0 10px; height: 40px; }
  .section { padding: 32px 0; }
  .form-row, .form-row-3, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .grid-cards { grid-template-columns: 1fr; gap: 32px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-seo { grid-template-columns: 1fr; gap: 20px; }
  #site-footer { margin-top: 40px; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal { max-height: 92vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-body { padding: 20px; }
  .toast-root { bottom: calc(var(--mobile-nav-h) + 16px); }
  .tabs { gap: 20px; }

  #mobile-nav {
    display: flex; position: fixed; z-index: 900; left: 0; right: 0; bottom: 0;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: #fff; border-top: 1px solid var(--line); justify-content: space-around; align-items: stretch;
  }
  #mobile-nav a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; font-weight: 600; color: var(--muted); text-decoration: none; }
  #mobile-nav a.is-active { color: var(--brand); }
  #mobile-nav .count-badge { position: absolute; top: 6px; left: calc(50% + 4px); height: 16px; min-width: 16px; font-size: 10px; }
  .mobile-nav-cta span { display: flex; align-items: center; justify-content: center; width: 40px; height: 32px; border-radius: 10px; background: var(--brand); color: #fff; }
  #mobile-nav a.mobile-nav-cta { color: var(--ink); }
}

@media (min-width: 745px) and (max-width: 1100px) {
  .grid-cards { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Écran de démarrage */
body.is-booting #app:not([data-prerendered]) { opacity: 0; }
