/* ==========================================================================
   Taali Longue durée – feuille de style unique (polices Roboto hébergées sur le site, aucun CDN)
   ==========================================================================
   >>> CHARTE GRAPHIQUE : toutes les couleurs sont ici, dans :root.
   >>> Couleurs reprises de www.taali-cg.com (vert #209a52, texte #1e2e31 / #5d6475, fond blanc).
   >>> Le contraste est vérifié avec `npm run check:contrast` (à relancer après toute modification).
   ========================================================================== */
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/roboto-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 500; font-display: swap; src: url("/assets/fonts/roboto-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/roboto-latin-700-normal.woff2") format("woff2"); }

:root {
  /* Vert Taali (#209a52 sur www.taali-cg.com). Pour respecter le contraste WCAG AA du texte blanc,
     les boutons, liens et bandeaux utilisent la nuance légèrement plus foncée #187a42. */
  --c-brand: #209a52;          /* vert exact de la charte Taali : décors, grands aplats, icônes */
  --c-primary: #187a42;        /* couleur de marque (boutons, liens, pied de page) */
  --c-primary-dark: #12602f;
  --c-primary-tint: #e8f5ed;
  --c-accent: #187a42;         /* bouton d'appel à l'action (CTA) : même vert de marque */
  --c-accent-dark: #12602f;
  --c-bg: #ffffff;
  --c-alt: #f5f8f6;            /* fond des sections alternées */
  --c-surface: #ffffff;
  --c-ink: #1e2e31;
  --c-muted: #5d6475;
  --c-line: #e3e8e5;
  --c-danger: #b3261e;
  --c-danger-tint: #fdecea;
  --c-success: #1b6b3a;
  --c-success-tint: #e6f4ea;
  --c-warn-tint: #fff4d6;
  --c-warn-ink: #6b4a00;
  --c-danger-ink: #7a1912;
  --c-success-ink: #124d29;
  --c-neutral-ink: #3b3b3b;
  --c-neutral-bg: #ececec;
  --c-field-border: #7b8781;   /* bordure des champs : contraste ≥ 3:1 (WCAG 1.4.11) */
  --c-footer-text: #f0faf3;
  --c-footer-hover: #e8f8ee;
  --c-on-band: #f0faf3;
  --c-on-primary: #ffffff;
  --c-on-accent: #ffffff;
  --c-hero-em: #e2f8ea;        /* mot mis en avant dans le titre du héros */

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(30, 46, 49, .06), 0 6px 20px rgba(30, 46, 49, .08);
  --shadow-lg: 0 10px 40px rgba(30, 46, 49, .16);
  --font: Roboto, system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.6;
  color: var(--c-ink); background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; }
img { display: block; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--c-ink); letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
a { color: var(--c-primary); text-underline-offset: 3px; }
a:hover { color: var(--c-primary-dark); }
ul { padding-left: 1.2em; }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 200; background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 8px; }
.skip-link:focus { top: 0; }
.section { padding-block: clamp(40px, 7vw, 80px); }
.section-alt { background: var(--c-alt); }
.section-head { max-width: 640px; margin-bottom: 28px; }
.section-head p { color: var(--c-muted); }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--c-primary); margin-bottom: .6em; }
.muted { color: var(--c-muted); }
.text-center { text-align: center; }
.mt-lg { margin-top: 28px; }
.pt-0 { padding-top: 0; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .65em 1.4em; border-radius: 6px; border: 2px solid transparent;
  font: inherit; font-weight: 500; text-decoration: none; cursor: pointer; line-height: 1.2;
  transition: background-color .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
/* Le SEUL bouton d'appel à l'action de tout le site : « Déposer mon annonce » */
.btn-cta { background: var(--c-accent); color: var(--c-on-accent); }
.btn-cta:hover { background: var(--c-accent-dark); color: var(--c-on-accent); }
.btn-lg { min-height: 52px; padding-inline: 1.9em; font-size: 1.05rem; }
/* Boutons d'action ordinaires (rechercher, envoyer…) : volontairement sobres */
.btn-outline { background: var(--c-surface); color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary-tint); color: var(--c-primary-dark); }
.btn-solid { background: var(--c-primary); color: var(--c-on-primary); }
.btn-solid:hover { background: var(--c-primary-dark); color: var(--c-on-primary); }
.btn-danger { background: var(--c-surface); color: var(--c-danger); border-color: var(--c-danger); }
.btn-danger:hover { background: var(--c-danger-tint); }
.btn-sm { min-height: 38px; padding: .4em 1em; font-size: .9rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--c-surface); border-bottom: 1px solid var(--c-line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; flex: none; }
/* Le fichier logo est un carré 1000×1000 dont seul le tiers central est utilisé : on le recadre. */
.brand-logo { display: block; width: 112px; height: 54px; overflow: hidden; }
.brand-logo img { width: 114px; height: 114px; max-width: none; margin: -25px 0 0 -1px; }
.brand-logo-light img { filter: brightness(0) invert(1); }
.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 10px 12px; color: var(--c-ink); text-decoration: none; font-weight: 500; border-radius: 6px; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--c-primary); background: var(--c-primary-tint); }
.nav-toggle { display: none; margin-left: auto; width: 44px; height: 44px; border: 1px solid var(--c-line); border-radius: 10px; background: var(--c-surface); color: var(--c-ink); cursor: pointer; align-items: center; justify-content: center; }
.header-cta { flex: none; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { order: 2; padding-inline: 1em; font-size: .9rem; }
  .nav-toggle { order: 3; margin-left: 0; }
  .brand { margin-right: auto; }
  .main-nav { position: absolute; inset: 68px 0 auto 0; background: var(--c-surface); border-bottom: 1px solid var(--c-line); box-shadow: var(--shadow); display: none; margin: 0; }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; gap: 0; }
  .main-nav a { padding: 14px 8px; border-radius: 0; border-bottom: 1px solid var(--c-line); }
}
@media (max-width: 420px) {
  .header-inner { gap: 8px; }
  .brand-logo { width: 92px; height: 44px; }
  .brand-logo img { width: 94px; height: 94px; margin: -20px 0 0 -1px; }
  .header-cta { max-width: 112px; padding: .3em .7em; font-size: .78rem; line-height: 1.15; text-align: center; }
  .nav-toggle { flex: none; }
}
.nav-toggle { flex: none; }

/* ---------- Héros ---------- */
.hero { position: relative; background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%); color: #fff; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: center; padding-block: clamp(32px, 6vw, 64px) 0; }
.hero h1 { margin-bottom: .4em; color: #fff; }
.hero h1 em { font-style: normal; color: var(--c-hero-em); }
.hero .eyebrow { color: var(--c-hero-em); }
.hero-lead { font-size: 1.15rem; color: var(--c-on-band); max-width: 34em; }
.hero-art img { width: 100%; height: auto; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.hero-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-block: 20px 8px; }
.hero-cta small { color: var(--c-on-band); }
.hero .btn-cta { background: #fff; color: var(--c-primary-dark); }
.hero .btn-cta:hover { background: var(--c-primary-tint); color: var(--c-primary-dark); }
.hero + .section { padding-top: calc(clamp(40px, 7vw, 80px) + 56px); }
@media (max-width: 860px) { .hero-inner { grid-template-columns: 1fr; } .hero-art { order: -1; max-width: 460px; } }

/* ---------- Recherche ---------- */
.search-card { position: relative; z-index: 2; background: var(--c-surface); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 18px; margin: 28px 0 -56px; color: var(--c-ink); }
.search-grid { display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px; align-items: end; }
@media (max-width: 980px) { .search-grid { grid-template-columns: repeat(2, 1fr); } .search-grid .btn { grid-column: 1 / -1; } }
@media (max-width: 480px) { .search-grid { grid-template-columns: 1fr; } }

/* ---------- Formulaires ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .field .label, legend { font-weight: 600; font-size: .92rem; }
.req { color: var(--c-danger); margin-left: 2px; }
.field .hint { font-size: .85rem; color: var(--c-muted); }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 46px; padding: .6em .85em; border: 1.5px solid var(--c-field-border); border-radius: var(--radius-sm);
  background: #fff; color: var(--c-ink); font: inherit;
}
textarea { min-height: 140px; resize: vertical; }
::placeholder { color: var(--c-muted); opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: var(--c-primary); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(24, 122, 66, .35); outline-offset: 0; border-color: var(--c-primary); }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--c-danger); background: var(--c-danger-tint); }
.field-error { color: var(--c-danger); font-size: .88rem; font-weight: 600; margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--c-primary); flex: none; }
.form-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: clamp(18px, 4vw, 32px); box-shadow: var(--shadow); }
.form-section { margin-bottom: 28px; }
.form-section > h2 { font-size: 1.2rem; padding-bottom: 8px; border-bottom: 1px solid var(--c-line); margin-bottom: 16px; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 8px; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.turnstile-box { min-height: 65px; }
.alert { padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 16px; font-weight: 500; }
.alert-error { background: var(--c-danger-tint); border-color: var(--c-danger); color: var(--c-danger-ink); }
.alert-success { background: var(--c-success-tint); border-color: var(--c-success); color: var(--c-success-ink); }
.alert-info { background: var(--c-primary-tint); border-color: var(--c-primary); color: var(--c-primary-dark); }
.alert-warn { background: var(--c-warn-tint); border-color: #d9a400; color: var(--c-warn-ink); }
.auth-wrap { max-width: 520px; margin-inline: auto; }
.auth-wrap .form-card > * + * { margin-top: 16px; }
.photo-drop { border: 2px dashed var(--c-field-border); border-radius: var(--radius); padding: 20px; background: var(--c-alt); text-align: center; }
.photo-list { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 0; margin: 14px 0 0; }
.photo-item { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--c-line); background: #fff; aspect-ratio: 4 / 3; }
.photo-item img { width: 100%; height: 100%; object-fit: cover; }
.photo-item button { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(29, 43, 40, .85); color: #fff; cursor: pointer; font-size: 18px; line-height: 1; }
.photo-item .cover { position: absolute; left: 4px; bottom: 4px; background: var(--c-primary); color: #fff; font-size: .72rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.photo-item.is-loading::after { content: "Envoi…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.85); font-weight: 600; }

/* ---------- Cartes d'annonces ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-listings { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .grid-listings { grid-template-columns: repeat(3, 1fr); } }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-listings { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-3, .grid-4, .grid-listings { grid-template-columns: 1fr; } }
.card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.listing-card.card { border: 0; box-shadow: none; background: transparent; overflow: visible; }
.listing-card a.card-link { color: inherit; text-decoration: none; display: flex; flex-direction: column; height: 100%; }
.listing-card .thumb { aspect-ratio: 4 / 3; background: var(--c-primary-tint); position: relative; border-radius: var(--radius); overflow: hidden; }
.listing-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.listing-card:hover .thumb img { transform: scale(1.04); }
.listing-card .tag { position: absolute; left: 10px; top: 10px; background: var(--c-primary); color: #fff; font-weight: 500; font-size: .78rem; padding: 3px 10px; border-radius: 4px; }
.listing-card .body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.listing-card h2, .listing-card h3 { margin: 0; font-size: 1.02rem; font-weight: 500; color: var(--c-primary); }
.listing-card a.card-link:hover :is(h2, h3) { text-decoration: underline; text-underline-offset: 3px; }
.listing-card .price { font-size: 1.1rem; font-weight: 700; color: var(--c-ink); order: 3; margin: 2px 0 0; }
.listing-card .price small { font-weight: 400; color: var(--c-muted); font-size: .85rem; }
.listing-card .place { color: var(--c-muted); font-size: .92rem; margin: 0; }
.meta-row { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; padding: 0; list-style: none; color: var(--c-muted); font-size: .9rem; }
.meta-row li { display: inline-flex; align-items: center; gap: 5px; }
.skeleton { background: linear-gradient(90deg, #e8eeea 25%, #f5f8f6 50%, #e8eeea 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius); min-height: 300px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 48px 16px; border: 2px dashed var(--c-line); border-radius: var(--radius); background: var(--c-surface); }

/* ---------- Catégories, avantages, étapes ---------- */
.cat-card { display: flex; align-items: center; gap: 14px; padding: 18px; color: var(--c-ink); text-decoration: none; border: 1px solid var(--c-line); border-radius: var(--radius); background: var(--c-surface); font-weight: 700; transition: box-shadow .15s, border-color .15s; }
.cat-card:hover { box-shadow: var(--shadow); border-color: var(--c-primary); color: var(--c-primary-dark); }
.cat-card .ico { width: 48px; height: 48px; border-radius: 12px; background: var(--c-primary-tint); color: var(--c-primary); display: grid; place-items: center; flex: none; }
.cat-card small { display: block; font-weight: 400; color: var(--c-muted); }
.district-chips { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; list-style: none; margin: 0; }
.district-chips a { display: inline-block; padding: 9px 18px; border-radius: 999px; background: var(--c-surface); border: 1px solid var(--c-line); text-decoration: none; color: var(--c-ink); font-weight: 500; }
.district-chips a:hover { border-color: var(--c-primary); color: var(--c-primary-dark); background: var(--c-primary-tint); }
.feature { padding: 22px; background: var(--c-surface); border-radius: var(--radius); border: 1px solid var(--c-line); }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--c-primary); color: #fff; display: grid; place-items: center; margin-bottom: 12px; }
.feature p { margin: 0; color: var(--c-muted); }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: step; position: relative; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 26px 22px 22px; }
.steps li::before { content: counter(step); position: absolute; top: -16px; left: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--c-primary); color: #fff; font-weight: 700; display: grid; place-items: center; }
.steps p { margin: 0; color: var(--c-muted); }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; gap: 30px; } }
.band { background: var(--c-primary); color: var(--c-on-primary); border-radius: var(--radius); padding: clamp(28px, 5vw, 52px); display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: center; justify-content: space-between; }
.band h2 { color: var(--c-on-primary); margin: 0 0 .3em; }
.band p { margin: 0; color: var(--c-on-band); max-width: 36em; }

/* ---------- Page annonces ---------- */
.page-head { padding-block: 32px 8px; }
.page-head p { color: var(--c-muted); max-width: 46em; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 20px 0 16px; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 32px; }

/* ---------- Détail d'une annonce ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
@media (max-width: 960px) { .detail-layout { grid-template-columns: 1fr; } }
.gallery-main { border-radius: var(--radius); overflow: hidden; background: var(--c-primary-tint); aspect-ratio: 16 / 10; }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumbs button { flex: none; width: 92px; height: 68px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; background: none; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--c-primary); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-price { font-size: 1.8rem; font-weight: 700; color: var(--c-primary-dark); margin: 0; }
.detail-price small { font-size: 1rem; font-weight: 500; color: var(--c-muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 20px 0; padding: 0; list-style: none; }
.facts li { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-sm); padding: 12px 14px; min-width: 0; }
.facts strong { display: block; font-size: 1rem; overflow-wrap: anywhere; hyphens: auto; }
.facts span { color: var(--c-muted); font-size: .85rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.pill-list li { background: var(--c-primary-tint); color: var(--c-primary-dark); padding: 5px 12px; border-radius: 999px; font-size: .9rem; font-weight: 500; }
.side-card { position: sticky; top: 88px; }
.contact-reveal { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.phone-number { font-size: 1.2rem; font-weight: 700; }
.breadcrumb { font-size: .9rem; color: var(--c-muted); padding-block: 20px 12px; }
.breadcrumb a { color: var(--c-muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; }
.notice-box { font-size: .88rem; color: var(--c-muted); background: var(--c-warn-tint); border-radius: var(--radius-sm); padding: 12px 14px; }
.notice-box strong { color: var(--c-warn-ink); }

/* ---------- Espace personnel / admin ---------- */
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.tabs button { padding: 9px 18px; border-radius: 999px; border: 1.5px solid var(--c-line); background: var(--c-surface); font: inherit; font-weight: 600; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.row-card { display: grid; grid-template-columns: 96px 1fr auto; gap: 16px; align-items: center; padding: 14px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 12px; }
.row-card img { width: 96px; height: 72px; object-fit: cover; border-radius: 8px; background: var(--c-primary-tint); }
.row-card h3 { margin: 0 0 4px; font-size: 1rem; }
.row-card .actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 720px) { .row-card { grid-template-columns: 80px 1fr; } .row-card img { width: 80px; height: 60px; } .row-card .actions { grid-column: 1 / -1; justify-content: flex-start; } }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-pending { background: var(--c-warn-tint); color: var(--c-warn-ink); }
.badge-published { background: var(--c-success-tint); color: var(--c-success-ink); }
.badge-rejected { background: var(--c-danger-tint); color: var(--c-danger-ink); }
.badge-rented, .badge-archived { background: var(--c-neutral-bg); color: var(--c-neutral-ink); }
.inquiry { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.inquiry header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; }
.inquiry p { margin: 0 0 6px; white-space: pre-wrap; }

/* ---------- FAQ ---------- */
.faq details { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--c-primary); }
.faq details[open] summary::after { content: "–"; }
.faq details > div { padding: 0 18px 16px; color: var(--c-muted); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Pages légales (texte long) ---------- */
.prose { max-width: 780px; }
.prose h2 { margin-top: 2em; font-size: 1.4rem; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose table { border-collapse: collapse; width: 100%; margin-block: 1em; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--c-line); padding: 10px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--c-primary-tint); }
.prose .todo { background: var(--c-warn-tint); color: var(--c-warn-ink); padding: 0 4px; border-radius: 4px; font-weight: 600; }
.toc { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px 22px; margin-block: 20px; }
.toc ol { margin: 0; padding-left: 1.2em; }

/* ---------- 404 ---------- */
.error-page { text-align: center; padding-block: clamp(48px, 10vw, 110px); }
.error-code { font-size: clamp(5rem, 18vw, 9rem); font-weight: 700; line-height: 1; color: var(--c-primary); margin: 0; letter-spacing: -.04em; }
.error-page .hero-art { margin: 0 auto 24px; max-width: 320px; }
.error-links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 20px; }

/* ---------- Pied de page ---------- */
.site-footer { background: var(--c-primary); color: var(--c-footer-text); margin-top: 0; }
.site-footer a, .site-footer .link-button { color: #ffffff; }
.site-footer a:hover, .site-footer .link-button:hover { color: var(--c-footer-hover); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 32px; padding-block: 48px 24px; }
.footer-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: #ffffff; margin-bottom: 14px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-brand p { max-width: 30em; margin-top: 14px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.18); padding-block: 18px 26px; font-size: .9rem; }
.footer-bottom p { margin: 0; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Bandeau cookies ---------- */
.cookie-banner { position: fixed; z-index: 100; left: 12px; right: 12px; bottom: 12px; max-width: 900px; margin-inline: auto; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.cookie-inner { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; padding: 18px 22px; }
.cookie-text { flex: 1 1 380px; }
.cookie-text h2 { font-size: 1.05rem; margin-bottom: .3em; }
.cookie-text p { margin: 0; font-size: .92rem; color: var(--c-muted); }
.cookie-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 480px) { .cookie-actions { width: 100%; } .cookie-actions .btn { flex: 1; } }

/* ---------- Divers ---------- */
.loader { display: inline-block; width: 18px; height: 18px; border: 3px solid var(--c-line); border-top-color: var(--c-primary); border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .cookie-banner, .btn { display: none !important; } body { background: #fff; } }

/* ---------- Compléments ---------- */
.pb-lg { padding-bottom: 64px; }
.pre-wrap { white-space: pre-wrap; }
.card-body-pad { padding: 20px; }
.side-title { font-size: 1.1rem; margin: 18px 0 12px; }
.side-card form { display: grid; gap: 14px; }
.detail-title { margin-top: 24px; }
.detail-title h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); margin-bottom: .3em; }
.photo-item .make-cover { top: auto; bottom: 4px; right: 4px; background: rgba(255, 255, 255, .92); color: var(--c-primary-dark); }
.photo-drop:focus-within { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.admin-card { margin-bottom: 16px; }
.admin-photos { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.admin-photos img { border-radius: 8px; object-fit: cover; width: 120px; height: 90px; }
.admin-card .form-actions input { flex: 1 1 240px; }
.contact-wrap { max-width: 640px; margin-inline: 0; }
.contact-wrap .form-card > * + * { margin-top: 16px; }
.filters-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 720px) { .filters-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .filters-grid { grid-template-columns: 1fr; } }
.form-card > * + * { margin-top: 16px; }
.form-card .form-grid, .form-card .form-section { margin-top: 0; }

/* Tableaux des pages légales : lisibles sur mobile (cartes empilées) */
@media (max-width: 720px) {
  .prose table, .prose thead, .prose tbody, .prose tr, .prose td, .prose th { display: block; width: 100%; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr { border: 1px solid var(--c-line); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--c-surface); }
  .prose td { border: 0; border-bottom: 1px solid var(--c-line); padding: 8px 12px; }
  .prose td:last-child { border-bottom: 0; }
  .prose td[data-label]::before { content: attr(data-label); display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--c-primary); }
}
.prose code { background: var(--c-primary-tint); padding: 1px 6px; border-radius: 4px; font-size: .9em; overflow-wrap: anywhere; }

/* Évite les sauts de mise en page (CLS) : la zone réserve sa hauteur pendant la vérification de la session */
#loading, #gate:not([hidden]) { min-height: 70vh; }
/* Fiche annonce : la zone garde une hauteur stable pendant le chargement de l'annonce */
#listing-root[aria-busy="true"] { min-height: 100vh; }
