/*
Theme Name: Proche de Moi FR
Theme URI: https://proche-de-moi.fr
Author: Ham
Description: Thème annuaire moderne pour Directorist. Palette Lovable warm corail + jaune + crème.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2 or later
Text Domain: proche-de-moi-fr
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300..900&family=Plus+Jakarta+Sans:wght@400..800&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  --bg: hsl(222 35% 12%);
  --surface: hsl(40 33% 98%);
  --surface-1: hsl(40 20% 94%);
  --surface-2: hsl(42 96% 96%);
  --ink: hsl(222 35% 12%);
  --ink-2: hsl(222 12% 42%);
  --ink-3: hsl(222 10% 60%);
  --line: hsl(30 18% 88%);
  --accent: hsl(8 88% 58%);
  --accent-dark: hsl(8 88% 48%);
  --accent-soft: hsl(14 95% 94%);
  --accent-glow: hsl(14 95% 66%);
  --yellow: hsl(42 96% 56%);
  --yellow-soft: hsl(42 96% 92%);
  --ok: hsl(152 60% 42%);
  --grad-warm: linear-gradient(135deg, hsl(8 88% 58%), hsl(42 96% 56%));
  --grad-hero: linear-gradient(135deg, hsl(8 88% 58% / 0.88), hsl(14 95% 62% / 0.88) 45%, hsl(42 96% 56% / 0.85));
  --grad-sunset: linear-gradient(180deg, hsl(40 33% 98%), hsl(42 96% 96%));
  --shadow-card: 0 4px 20px -8px hsl(222 35% 12% / 0.12);
  --shadow-card-hover: 0 16px 40px -12px hsl(8 88% 58% / 0.28);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --display: 'Plus Jakarta Sans', var(--font);
  --serif: 'Instrument Serif', serif;
  --gutter: clamp(1.25rem, 3vw, 2rem);
  --max-w: 1440px;
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-full: 999px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--surface); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; max-width: 100%; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: 0; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }

/* NAV */
.nav { background: rgba(255,255,255,0.92); color: var(--ink); position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.5) blur(10px); }
.nav-inner { max-width: var(--max-w); margin: 0 auto; padding: 1rem var(--gutter); display: flex; align-items: center; gap: 2.5rem; }
.brand { font-weight: 700; font-size: 1.15rem; letter-spacing: -0.02em; display: flex; align-items: center; gap: 0.5rem; }
.brand .logo { width: 36px; height: 36px; border-radius: 50%; background: var(--grad-warm); color: white; display: inline-flex; align-items: center; justify-content: center; }
.brand .tld { color: var(--accent); }
.nav-links { display: flex; gap: 1.5rem; font-size: 0.92rem; color: var(--ink-2); }
.nav-links a:hover, .nav-links .current-menu-item a { color: var(--accent); }
.nav-cta { display: flex; gap: 0.5rem; margin-left: auto; }

/* BTN */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.65rem 1.15rem; border-radius: var(--r-sm); font-weight: 600; font-size: 0.88rem; border: 1px solid transparent; transition: all .15s; cursor: pointer; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-1); }
.btn-yellow { background: var(--yellow); color: var(--ink); font-weight: 700; }

/* HERO */
.hero { position: relative; overflow: hidden; padding: 6rem var(--gutter) 5rem; color: white; background: var(--grad-hero), url('https://images.unsplash.com/photo-1519452575417-564c1401ecc0?w=1800&q=80') center/cover no-repeat; min-height: 560px; display: flex; align-items: center; }
.hero::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 30% 50%, transparent 40%, hsl(8 88% 40% / 0.3) 100%); pointer-events: none; }
.hero-inner { max-width: 900px; margin: 0 auto; text-align: center; position: relative; z-index: 2; width: 100%; }
.hero-kicker { font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink); margin-bottom: 1.8rem; display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.45rem 1rem; background: rgba(255,255,255,0.95); border-radius: var(--r-full); font-weight: 600; box-shadow: 0 4px 16px hsl(8 88% 30% / 0.2); }
.hero-kicker b { font-size: 0.7rem; background: var(--accent); color: white; padding: 0.08rem 0.45rem; border-radius: 3px; margin-right: .2rem; letter-spacing: 0.08em; font-weight: 700; }
.hero h1 { font-size: clamp(2.8rem, 6.5vw, 5.8rem); font-weight: 800; line-height: 1.02; margin-bottom: 1.5rem; color: white; text-shadow: 0 4px 24px hsl(8 88% 30% / 0.3); }
.hero h1 em { font-style: italic; color: var(--yellow); font-family: 'Instrument Serif', serif; font-weight: 400; }
.hero-sub { font-size: 1.15rem; color: rgba(255,255,255,0.95); max-width: 60ch; margin: 0 auto 2.5rem; font-weight: 500; }

/* MEGA SEARCH */
.mega-search { background: white; color: var(--ink); border-radius: var(--r-full); padding: 0.4rem 0.4rem 0.4rem 0.5rem; display: grid; grid-template-columns: 1fr 1fr auto; max-width: 780px; margin: 0 auto; box-shadow: 0 20px 60px -20px hsl(8 88% 30% / 0.4); align-items: center; }
.mega-search-field { padding: 0.6rem 1.2rem; display: flex; align-items: center; gap: 0.7rem; border-right: 1px solid var(--line); }
.mega-search-field:last-of-type { border-right: 0; }
.mega-search-field svg { color: var(--ink-3); flex-shrink: 0; }
.mega-search input { border: 0; background: transparent; outline: none; font-family: var(--font); font-weight: 500; font-size: 1rem; color: var(--ink); padding: 0; width: 100%; }
.mega-search input::placeholder { color: var(--ink-3); font-weight: 400; }
.mega-search .geo { background: transparent; color: var(--accent); padding: 0.5rem; border-radius: 50%; display: flex; align-items: center; cursor: pointer; }
.mega-search .geo:hover { background: var(--accent-soft); }
.mega-search .go { background: var(--accent); color: white; padding: 0.85rem 1.6rem; border-radius: var(--r-full); font-weight: 700; font-size: 0.95rem; display: flex; align-items: center; gap: 0.5rem; }
.mega-search .go:hover { background: var(--accent-dark); }

.quick-tags { display: flex; justify-content: center; gap: 0.3rem 1.2rem; margin-top: 1.8rem; flex-wrap: wrap; color: rgba(255,255,255,0.92); font-size: 0.9rem; font-weight: 500; align-items: center; }
.quick-tags b { opacity: 0.85; }
.quick-tag { color: white; text-decoration: underline; text-decoration-color: rgba(255,255,255,0.35); text-underline-offset: 3px; }
.quick-tag:hover { color: var(--yellow); text-decoration-color: var(--yellow); }

/* SECTION */
section.block { max-width: var(--max-w); margin: 0 auto; padding: 4rem var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 2rem; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(1.6rem, 2.8vw, 2.4rem); font-weight: 800; }
.section-head h2 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.section-head p { color: var(--ink-2); max-width: 40ch; }

/* CATEGORY GRID */
.cats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; }
.cat { background: white; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.2rem; transition: all .15s; display: flex; flex-direction: column; gap: 0.8rem; cursor: pointer; }
.cat:hover { border-color: var(--ink); transform: translateY(-2px); box-shadow: 0 8px 20px -12px rgba(0,0,0,0.15); }
.cat-ico { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.25rem; color: white; box-shadow: 0 4px 10px -3px hsl(222 35% 12% / 0.15); transition: transform .2s; }
.cat:hover .cat-ico { transform: scale(1.08) rotate(-4deg); }
.cat-ico.c-resto { background: hsl(8 88% 58%); }
.cat-ico.c-sante { background: hsl(152 60% 45%); }
.cat-ico.c-artisans { background: hsl(25 90% 55%); }
.cat-ico.c-beaute { background: hsl(330 75% 62%); }
.cat-ico.c-commerces { background: hsl(262 70% 60%); }
.cat-ico.c-auto { background: hsl(215 75% 52%); }
.cat-ico.c-immo { background: hsl(180 55% 42%); }
.cat-ico.c-services { background: hsl(222 30% 35%); }
.cat-ico.c-education { background: hsl(42 96% 50%); color: hsl(222 35% 12%); }
.cat-ico.c-sport { background: hsl(95 55% 45%); }
.cat-ico.c-demenage { background: hsl(14 70% 45%); }
.cat-ico.c-artistes { background: hsl(285 70% 55%); }
.cat-name { font-weight: 600; font-size: 0.95rem; }
.cat-num { font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--ink-2); margin-top: auto; }
.cat-num b { color: var(--ink); }

/* RESULTS CARDS */
.results { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; transition: all .18s; cursor: pointer; display: flex; flex-direction: column; }
.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(0,0,0,0.15); }
.card-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface-1); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .card-media img { transform: scale(1.04); }
.card-badges { position: absolute; top: 0.8rem; left: 0.8rem; display: flex; gap: 0.3rem; }
.badge { background: rgba(15,17,21,0.85); color: white; padding: 0.25rem 0.55rem; border-radius: var(--r-xs); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 500; backdrop-filter: blur(4px); }
.badge.accent { background: var(--accent); }
.badge.yellow { background: var(--yellow); color: var(--ink); }
.card-distance { position: absolute; bottom: 0.8rem; left: 0.8rem; background: white; padding: 0.25rem 0.6rem; border-radius: var(--r-full); font-size: 0.74rem; color: var(--accent); font-weight: 700; }
.card-body { padding: 1rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: 0.45rem; flex: 1; }
.card-cat { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.card-name { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.card-meta { display: flex; gap: 0.7rem; font-size: 0.82rem; color: var(--ink-2); }
.card-rating { color: var(--ink); font-weight: 600; }
.card-star { color: var(--accent); }
.card-addr { font-size: 0.85rem; color: var(--ink-2); padding-top: 0.5rem; border-top: 1px solid var(--line); margin-top: auto; }

/* Horizontal card (category page) */
.h-card { display: grid; grid-template-columns: 220px 1fr auto; gap: 1.4rem; background: white; border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 1rem; transition: all .18s; overflow: hidden; }
.h-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 16px 32px -16px hsl(8 88% 30% / 0.2); }
.h-card-media { aspect-ratio: 1/1; background: var(--surface-1); position: relative; overflow: hidden; }
.h-card-media img { width: 100%; height: 100%; object-fit: cover; }
.h-card-body { padding: 1.2rem 0; display: flex; flex-direction: column; gap: 0.4rem; justify-content: center; }
.h-card-body h3 { font-size: 1.3rem; font-weight: 700; }
.h-card-body .cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-3); }
.h-card-body .rating { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.88rem; font-weight: 600; }
.h-card-body .rating .stars { color: var(--accent); }
.h-card-body .addr { font-size: 0.88rem; color: var(--ink-2); }
.h-card-aside { padding: 1.2rem 1.4rem 1.2rem 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 0.5rem; min-width: 140px; }
.h-card-aside .dist { font-family: 'JetBrains Mono', monospace; font-weight: 700; color: var(--accent); font-size: 0.92rem; }
.h-card-aside .price { font-family: monospace; font-size: 0.78rem; color: var(--ink-2); }
.h-card-aside .status { font-size: 0.78rem; color: var(--ok); display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; }
.h-card-aside .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.h-card-aside .status.closed { color: var(--ink-3); }
.h-card-aside .status.closed::before { background: var(--ink-3); }

/* FOOTER */
footer.site-footer { background: var(--ink); color: hsl(222 10% 72%); padding: 4rem var(--gutter) 2rem; margin-top: 3rem; }
footer.site-footer .foot-inner { max-width: var(--max-w); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; }
footer.site-footer h4 { color: white; font-size: 0.82rem; margin-bottom: 1rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 500; font-family: var(--font); }
footer.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.88rem; }
footer.site-footer a:hover { color: var(--accent-glow); }
.foot-brand { color: white; font-size: 1.4rem; font-weight: 700; margin-bottom: 1rem; display: inline-flex; align-items: center; gap: 0.4rem; }
.foot-brand .dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; }
.foot-bottom { max-width: var(--max-w); margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid hsl(222 20% 25%); display: flex; justify-content: space-between; font-size: 0.82rem; }

/* LISTING DETAIL */
.d-banner { background: var(--grad-sunset); padding: 1.5rem var(--gutter) 0; border-bottom: 1px solid var(--line); }
.d-banner-inner { max-width: var(--max-w); margin: 0 auto; }
.breadcrumb { font-size: 0.82rem; color: var(--ink-2); margin-bottom: 1rem; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 0.4rem; color: var(--ink-3); }
.d-title h1 { font-size: clamp(2.2rem, 4.5vw, 3.8rem); font-weight: 800; line-height: 1; margin-bottom: 0.8rem; }
.d-title h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.d-meta-row { display: flex; gap: 1.2rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.d-rating-big { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--accent); color: white; padding: 0.4rem 0.8rem; border-radius: var(--r-sm); font-weight: 700; }
.status-pill { display: inline-flex; align-items: center; gap: 0.4rem; background: hsl(152 60% 42% / 0.12); color: var(--ok); padding: 0.35rem 0.8rem; border-radius: var(--r-full); font-size: 0.82rem; font-weight: 600; border: 1px solid hsl(152 60% 42% / 0.3); }
.status-pill::before { content: ""; width: 7px; height: 7px; background: var(--ok); border-radius: 50%; }
.tag-premium { display: inline-flex; align-items: center; gap: 0.3rem; background: var(--yellow); color: var(--ink); padding: 0.3rem 0.7rem; border-radius: var(--r-xs); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 1rem; }

.d-top { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding-bottom: 2rem; }
@media (max-width: 900px) { .d-top { grid-template-columns: 1fr; } }
.d-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 0.5rem; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 16/10; }
.d-gallery > :first-child { grid-row: span 2; }
.d-gallery div { background: var(--surface-1); overflow: hidden; position: relative; }
.d-gallery img { width: 100%; height: 100%; object-fit: cover; }

.d-body { max-width: var(--max-w); margin: 0 auto; padding: 3rem var(--gutter); display: grid; grid-template-columns: 1fr 380px; gap: 2.5rem; }
@media (max-width: 900px) { .d-body { grid-template-columns: 1fr; } }
.d-section { margin-bottom: 2.5rem; }
.d-section h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.2rem; display: flex; align-items: center; gap: 0.6rem; }
.d-section h3 .ico { width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 0.95rem; }
.d-about { color: var(--ink-2); font-size: 1rem; line-height: 1.7; background: white; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }

.d-sidebar { align-self: start; position: sticky; top: 5.5rem; display: grid; gap: 1rem; }
.side-box { background: white; border: 1px solid var(--line); border-radius: var(--r-md); padding: 1.5rem; }
.side-box h4 { font-size: 1.15rem; font-weight: 700; margin-bottom: 1rem; }
.side-list { list-style: none; }
.side-list li { display: grid; grid-template-columns: 32px 1fr; gap: 0.8rem; padding: 0.85rem 0; border-bottom: 1px dashed var(--line); align-items: start; }
.side-list li:last-child { border-bottom: 0; }
.side-list .ico { width: 32px; height: 32px; background: var(--accent-soft); color: var(--accent); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; }
.side-list .label { font-size: 0.64rem; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 0.1rem; }
.side-list .val { font-size: 0.92rem; color: var(--ink); }

.side-cta { margin-top: 1.2rem; display: grid; gap: 0.5rem; }
.side-cta .btn { justify-content: center; width: 100%; }

.claim-banner { background: var(--grad-warm); color: white; padding: 1.4rem; border-radius: var(--r-md); }
.claim-banner h4 { color: white; }
.claim-banner p { color: rgba(255,255,255,0.9); font-size: 0.88rem; margin-bottom: 1rem; }

/* RESPONSIVE */
@media (max-width: 900px) {
  footer.site-footer .foot-inner { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .mega-search { grid-template-columns: 1fr; }
  .h-card { grid-template-columns: 110px 1fr; }
  .h-card-aside { display: none; }
}
