/* PublIA — feuille de style commune (accueil, marketplace, vendre, produit) */
:root {
  --green-950: #04201a;
  --green-900: #062a1d;
  --green-800: #0b3d2b;
  --green-700: #0f5138;
  --green-100: #dcebe1;
  --green-50: #eef5f0;
  --gold: #e2b33c;
  --gold-600: #c99a24;
  --gold-50: #fff8e6;
  --whatsapp: #1fa855;
  --ink: #14231b;
  --muted: #5f6e65;
  --line: #e3e9e2;
  --bg: #f7f5ee;
  --surface: #ffffff;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(6, 42, 29, .06), 0 8px 24px rgba(6, 42, 29, .07);
  --shadow-lg: 0 24px 60px rgba(4, 32, 26, .25);
  --gutter: clamp(16px, 5vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: var(--gutter); }

/* ---------- En-tête ---------- */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-size: 22px; font-weight: 800; letter-spacing: -.03em; color: var(--green-900); }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--green-700), var(--green-900)); color: var(--gold); font-size: 20px; font-weight: 900; }
.brand b { color: var(--gold-600); }
.main-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.main-nav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; white-space: nowrap; }
.main-nav a:hover { color: var(--green-800); background: var(--green-50); }
.main-nav a[aria-current="page"] { color: var(--green-800); background: var(--green-50); }
.main-nav .nav-cta { margin-left: 6px; color: var(--green-950); background: var(--gold); }
.main-nav .nav-cta:hover { color: var(--green-950); background: var(--gold-600); }

@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 0; padding-block: 10px 0; }
  .main-nav { width: 100%; margin: 6px 0 0; overflow-x: auto; scrollbar-width: none; padding-bottom: 10px; }
  .main-nav::-webkit-scrollbar { display: none; }
  .main-nav .nav-cta { margin-left: auto; }
}

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 0; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 15px; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }
.btn-gold { color: var(--green-950); background: var(--gold); box-shadow: 0 6px 18px rgba(226, 179, 60, .35); }
.btn-gold:hover { background: var(--gold-600); }
.btn-green { color: #fff; background: var(--green-800); }
.btn-green:hover { background: var(--green-900); }
.btn-ghost { color: #fff; border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.btn-light { color: var(--green-800); border: 1px solid var(--line); background: #fff; }
.btn-light:hover { border-color: var(--green-700); }
.btn-whatsapp { color: #fff; background: var(--whatsapp); }
.btn-whatsapp:hover { background: #178a45; }
.btn-block { width: 100%; }

/* ---------- Accueil ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(900px 500px at 85% 10%, rgba(226, 179, 60, .18), transparent 60%), radial-gradient(700px 500px at 0% 100%, rgba(31, 168, 85, .18), transparent 60%), linear-gradient(160deg, var(--green-800), var(--green-950)); }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; padding-block: clamp(48px, 8vw, 96px); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid rgba(226, 179, 60, .4); border-radius: 999px; color: var(--gold); background: rgba(226, 179, 60, .08); font-size: 13px; font-weight: 700; letter-spacing: .02em; }
.hero h1 { margin: 20px 0 18px; font-size: clamp(36px, 5.4vw, 60px); font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-lead { max-width: 560px; color: #cfe0d6; font-size: clamp(16px, 1.6vw, 19px); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 28px 0 0; padding: 0; list-style: none; color: #b9cfc2; font-size: 14px; }
.hero-points li::before { content: "✓ "; color: var(--gold); font-weight: 800; }

/* Maquette de téléphone avec une vidéo publicitaire */
.phone { justify-self: center; width: min(100%, 290px); aspect-ratio: 9 / 18.5; padding: 10px; border-radius: 40px; background: #0b1410; box-shadow: var(--shadow-lg), inset 0 0 0 2px #26332c; }
.phone-screen { position: relative; height: 100%; overflow: hidden; border-radius: 31px; background: radial-gradient(circle at 50% 38%, #2a7a55 0%, #0c3d2b 45%, #041a12 100%); }
.phone-product { position: absolute; left: 50%; top: 34%; width: 52%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3c8, var(--gold) 45%, #8a6510 100%); box-shadow: 0 30px 60px rgba(0, 0, 0, .45); animation: float 5s ease-in-out infinite; }
.phone-shop { position: absolute; top: 18px; left: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(4, 32, 26, .85); color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.phone-play { position: absolute; top: 18px; right: 14px; padding: 4px 9px; border-radius: 999px; background: rgba(255, 255, 255, .15); font-size: 10px; font-weight: 700; }
.phone-band { position: absolute; inset: auto 0 0; padding: 70px 16px 18px; background: linear-gradient(transparent, rgba(4, 26, 18, .95) 45%); }
.phone-band strong { display: block; font-size: 17px; line-height: 1.2; }
.phone-price { display: inline-block; margin: 8px 0; padding: 3px 10px; border-radius: 8px; background: var(--gold); color: var(--green-950); font-weight: 800; font-size: 15px; }
.phone-wa { display: block; color: #4ade80; font-size: 11px; font-weight: 700; }
.phone-wave { display: flex; gap: 3px; align-items: end; height: 16px; margin-top: 8px; }
.phone-wave i { width: 3px; border-radius: 2px; background: var(--gold); animation: wave 1s ease-in-out infinite; }
.phone-wave i:nth-child(2n) { animation-delay: .2s; }
.phone-wave i:nth-child(3n) { animation-delay: .4s; }
@keyframes float { 50% { transform: translate(-50%, -56%) rotate(4deg); } }
@keyframes wave { 0%, 100% { height: 4px; } 50% { height: 16px; } }
@media (prefers-reduced-motion: reduce) { .phone-product, .phone-wave i { animation: none; } .phone-wave i { height: 10px; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: left; }
  .phone { width: min(70vw, 240px); }
}

.section { padding-block: clamp(48px, 7vw, 88px); }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.kicker { margin-bottom: 8px; color: var(--gold-600); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-head h2, .section-title { font-size: clamp(26px, 3.4vw, 38px); font-weight: 800; color: var(--green-900); }
.section-head p { margin-top: 8px; color: var(--muted); max-width: 560px; }
.text-link { color: var(--green-700); font-weight: 700; text-decoration: none; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }

.pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 20px; }
.pillar { display: flex; flex-direction: column; gap: 12px; padding: 28px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.pillar-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--green-50); font-size: 26px; }
.pillar h3 { font-size: 22px; color: var(--green-900); }
.pillar p { color: var(--muted); }
.pillar ul { margin: 4px 0 8px; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.pillar li::before { content: "✓  "; color: var(--green-700); font-weight: 800; }
.pillar .btn { margin-top: auto; align-self: flex-start; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.step-card { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.step-card::before { counter-increment: step; content: counter(step); display: grid; place-items: center; width: 36px; height: 36px; margin-bottom: 14px; border-radius: 50%; background: var(--green-800); color: var(--gold); font-weight: 800; }
.step-card h3 { font-size: 18px; margin-bottom: 6px; }
.step-card p { color: var(--muted); font-size: 15px; }

.premium-band { color: #fff; background: linear-gradient(120deg, var(--green-900), var(--green-700)); border-radius: 24px; padding: clamp(28px, 5vw, 52px); display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: center; box-shadow: var(--shadow-lg); }
.premium-band h2 { font-size: clamp(26px, 3.4vw, 38px); }
.premium-band p { margin-top: 12px; color: #cfe0d6; }
.price-card { padding: 24px; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(226, 179, 60, .35); text-align: center; }
.price-card small { color: #b9cfc2; }
.price-card strong { display: block; margin: 4px 0 14px; color: var(--gold); font-size: 34px; font-weight: 800; }

@media (max-width: 760px) {
  .pillars, .steps, .premium-band { grid-template-columns: 1fr; }
}

/* ---------- Cartes d'annonces ---------- */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 18px; }
@media (max-width: 520px) { .listings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }
.listing-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s; }
.listing-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.listing-media { position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--green-50); }
.listing-image { width: 100%; height: 100%; object-fit: cover; }
.listing-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; }
.listing-tags { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, .95); color: var(--green-800); font-size: 11px; font-weight: 700; }
.tag-new { background: var(--gold); color: var(--green-950); }
.listing-body { display: flex; flex-direction: column; gap: 4px; padding: 14px; }
.listing-title { font-size: 15px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.listing-price { color: var(--green-700); font-size: 18px; font-weight: 800; }
.listing-city { color: var(--muted); font-size: 13px; }
.state-message { grid-column: 1 / -1; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }
.state-message strong { display: block; margin-bottom: 6px; color: var(--ink); font-size: 17px; }
.state-message .btn { margin-top: 14px; }

/* ---------- Page marketplace ---------- */
.page-hero { padding-block: 40px 28px; background: var(--surface); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(28px, 4vw, 40px); color: var(--green-900); }
.page-hero p { margin-top: 6px; color: var(--muted); }
.search { position: relative; max-width: 640px; margin-top: 22px; }
.search input { width: 100%; min-height: 54px; padding: 14px 18px 14px 48px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--bg); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--green-700); background: #fff; }
.filters { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 600; font-size: 14px; cursor: pointer; }
.chip:hover { border-color: var(--green-700); color: var(--green-800); }
.chip[aria-pressed="true"] { border-color: var(--green-800); background: var(--green-800); color: #fff; }
.filters-sep { flex: 0 0 1px; margin: 6px 4px; background: var(--line); }
.results-count { margin-bottom: 14px; color: var(--muted); font-size: 14px; }

/* ---------- Formulaires ---------- */
.form-card { padding: clamp(20px, 4vw, 36px); border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.form-section h2 { margin-bottom: 14px; font-size: 18px; color: var(--green-900); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
fieldset.field { margin: 0; padding: 0; border: 0; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: 14px; }
.field small { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea { width: 100%; min-height: 50px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green-700); box-shadow: 0 0 0 4px var(--green-50); }
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 0; border: 0; }
.segmented label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; font-weight: 600; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { border-color: var(--green-800); background: var(--green-50); color: var(--green-800); }
.segmented label:has(input:focus-visible) { outline: 3px solid var(--gold); }
.upload-zone { display: grid; place-items: center; gap: 8px; padding: 28px 16px; border: 2px dashed var(--green-100); border-radius: var(--radius); background: var(--green-50); text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--green-700); }
.upload-zone .upload-icon { font-size: 30px; }
.upload-zone p { font-weight: 600; color: var(--green-800); }
.preview-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.preview-grid img { width: 84px; height: 84px; object-fit: cover; border-radius: 10px; }
.form-note { margin-top: 12px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- Page produit ---------- */
.breadcrumb { padding-block: 18px; font-size: 14px; color: var(--muted); }
.breadcrumb a { color: var(--green-700); text-decoration: none; font-weight: 600; }
.product { display: grid; grid-template-columns: 1.1fr .9fr; gap: 32px; align-items: start; }
@media (max-width: 820px) { .product { grid-template-columns: 1fr; gap: 20px; } }
.gallery-main { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; background: var(--green-50); }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.gallery-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.gallery-thumbs button[aria-current="true"] { border-color: var(--gold); }
.gallery-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.product-panel { padding: 26px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.product-panel .listing-tags { position: static; margin-bottom: 12px; }
.product-panel .tag { background: var(--green-50); }
.product-panel .tag-new { background: var(--gold); }
.product-panel h1 { font-size: clamp(24px, 3vw, 32px); color: var(--green-900); overflow-wrap: anywhere; }
.product-price { margin: 12px 0 4px; color: var(--green-700); font-size: 30px; font-weight: 800; }
.product-meta { color: var(--muted); font-size: 15px; }
.product-actions { display: grid; gap: 10px; margin-top: 22px; }
.product-desc { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.product-desc h2 { margin-bottom: 8px; font-size: 17px; }
.product-desc p { white-space: pre-line; overflow-wrap: anywhere; color: #2d3b33; }
.safety { margin-top: 20px; padding: 14px 16px; border-radius: 12px; background: var(--gold-50); color: #6b5317; font-size: 14px; }

/* ---------- Pied de page ---------- */
.site-footer { margin-top: 40px; padding-block: 36px; color: #b9cfc2; background: var(--green-950); font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.site-footer .brand { color: #fff; font-size: 19px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer a { text-decoration: none; }
.site-footer nav a:hover { color: var(--gold); }

/* ---------- Icônes (img/icons.svg) ---------- */
.icon { width: 1.15em; height: 1.15em; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.pillar-icon { color: var(--green-700); }
.pillar-icon .icon { width: 26px; height: 26px; }
.listing-placeholder { color: var(--green-100); }
.listing-placeholder .icon { width: 44px; height: 44px; stroke-width: 1.4; }
.listing-city { display: flex; align-items: center; gap: 4px; }
.product-meta { display: flex; align-items: center; gap: 8px; }
.product-meta .icon { color: var(--green-700); }
.breadcrumb a { display: inline-flex; align-items: center; gap: 6px; }
.safety { display: flex; gap: 10px; align-items: flex-start; }
.safety .icon { width: 20px; height: 20px; margin-top: 1px; color: var(--gold-600); }
.upload-zone .upload-icon { color: var(--green-700); }
.upload-zone .upload-icon .icon { width: 32px; height: 32px; }
.search .icon { position: absolute; left: 17px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* Recherche dans l'en-tête de l'accueil */
.hero-search { position: relative; display: flex; gap: 8px; max-width: 580px; margin-top: 28px; padding: 6px; border-radius: 16px; background: #fff; box-shadow: var(--shadow-lg); }
.hero-search .icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.hero-search input { flex: 1; min-width: 0; min-height: 48px; padding: 0 12px 0 44px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); font-size: 16px; }
.hero-search input:focus { outline: none; }
.hero-search .btn { flex: 0 0 auto; }
.hero-actions .btn .icon { width: 18px; height: 18px; }
.hero .hero-actions { margin-top: 16px; }
@media (max-width: 480px) { .hero-search .btn { padding-inline: 14px; } }

/* Sur mobile, le logo ramène à l'accueil : on masque ce lien pour garder « + Vendre » visible. */
@media (max-width: 760px) {
  .main-nav a[href$="index.html"] { display: none; }
}
.page-links { margin-top: 12px; }
