/*
 * MisezJuste — thème clair « verre et néon », sans étape de build.
 * Fond lumineux avec halos cyan/violet, cartes en verre dépoli, dégradés néon
 * réservés aux actions et aux prix.
 * Mobile d'abord : téléphone < 720 px (barre d'onglets en bas), tablette < 980 px
 * (menu repliable), ordinateur au-delà.
 */

/* Police Inter servie par le site (aucun appel à Google Fonts : pas de transfert d'adresse IP, RGPD). */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter/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;
}
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/inter/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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    color-scheme: light;

    --bg: #f4f6fb;
    --bg-2: #e9eef7;
    --surface: rgba(255, 255, 255, .78);
    --surface-solid: #ffffff;
    --surface-2: rgba(15, 23, 42, .035);
    --border: rgba(15, 23, 42, .09);
    --border-strong: rgba(15, 23, 42, .16);

    --text: #0f172a;
    --muted: #5b6b82;

    --brand: #0891b2;
    --brand-2: #7c3aed;
    --brand-dark: #0e7490;
    --brand-soft: rgba(6, 182, 212, .1);
    --gradient: linear-gradient(135deg, #06b6d4 0%, #4f46e5 55%, #9333ea 100%);
    --glow: 0 0 0 1px rgba(79, 70, 229, .18), 0 10px 30px -10px rgba(79, 70, 229, .45);

    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, .08);
    --success: #059669;
    --success-soft: rgba(5, 150, 105, .09);
    --warn: #b45309;
    --warn-soft: rgba(245, 158, 11, .12);

    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, 0 1px 2px rgba(15, 23, 42, .04), 0 14px 36px -18px rgba(15, 23, 42, .22);
    --header-h: 68px;
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    /* Une seule famille, comme la plupart des places de marché : Inter partout. */
    --font-display: var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    /* Pied de page toujours en bas, même sur une page courte */
    display: flex;
    flex-direction: column;
}
body > main { flex: 1 0 auto; width: 100%; }

/* Halos colorés et grille discrète sur des calques fixes : dessinés une fois, pas à chaque défilement. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(1100px 600px at 90% -10%, rgba(129, 140, 248, .22), transparent 60%),
        radial-gradient(900px 520px at -10% 5%, rgba(34, 211, 238, .2), transparent 60%),
        radial-gradient(800px 500px at 50% 110%, rgba(192, 132, 252, .14), transparent 60%);
    z-index: -2;
}
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(79, 70, 229, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(79, 70, 229, .055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at top, #000 20%, transparent 75%);
    z-index: -1;
}

a { color: var(--brand); text-decoration: none; transition: color .15s; }
a:hover { color: #4f46e5; }
img { max-width: 100%; }
::selection { background: rgba(79, 70, 229, .2); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

/* ------------------------------------------------------------------ En-tête */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, .7);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--border);
}
/* Liseré néon sous l'en-tête */
.site-header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--gradient); opacity: .55; }
.site-header .inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-h);
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; letter-spacing: -.02em; }
.brand:hover { color: var(--text); }
/* Logo : marteau d'enchères (public/images/logo-mark.svg), « Juste » en dégradé. */
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(79, 70, 229, .3)); }
.brand-accent { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.small { font-size: 1.1rem; }
.brand.small .brand-mark { width: 28px; height: 28px; }
/* Accroche discrète sous le nom, dans l'en-tête (masquée quand la place manque). */
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-tagline { max-width: 250px; margin-top: 3px; font-family: var(--font-body, inherit); font-size: .7rem; font-weight: 400; line-height: 1.3; letter-spacing: 0; color: var(--muted); }
@media (max-width: 1180px) { .brand-tagline { display: none; } }

.header-search {
    flex: 1;
    max-width: 440px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 14px;
    height: 42px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    transition: border-color .15s, box-shadow .15s;
}
.header-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.header-search input { flex: 1; min-width: 0; border: 0 !important; background: transparent !important; padding: 0 !important; height: 100%; box-shadow: none !important; outline: none; color: var(--text); }

.nav { display: flex; gap: 14px; align-items: center; margin-left: auto; }
.nav > a:not(.btn) { color: var(--muted); font-weight: 500; padding: 8px 4px; position: relative; }
.nav > a:not(.btn):hover, .nav > a.active { color: var(--text); }
.nav > a.active::after { content: ''; position: absolute; left: 4px; right: 4px; bottom: 0; height: 2px; border-radius: 2px; background: var(--gradient); }
.nav form { margin: 0; }

.icon-link { position: relative; display: grid !important; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--muted) !important; }
.icon-link:hover { background: var(--surface-2); color: var(--text) !important; }
.dot-count {
    position: absolute; top: 2px; right: 0;
    min-width: 18px; height: 18px; padding: 0 5px;
    border-radius: 999px;
    background: var(--danger); color: #fff;
    font-size: .68rem; font-weight: 700; line-height: 18px; text-align: center;
    box-shadow: 0 0 0 2px #fff;
}

/* Menus déroulants (<details>) */
.user-menu, .mobile-menu { position: relative; }
.user-menu summary, .mobile-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker, .mobile-menu summary::-webkit-details-marker { display: none; }
.user-menu summary {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 10px 4px 4px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text);
}
.user-menu summary:hover { border-color: var(--border-strong); }
.user-menu[open] summary .icon { transform: rotate(180deg); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient); color: #fff; font-weight: 700; font-size: .9rem; }
.user-name { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; font-size: .92rem; }

.menu-panel {
    position: absolute; right: 0; top: calc(100% + 10px);
    min-width: 240px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    box-shadow: 0 24px 50px -16px rgba(15, 23, 42, .3), 0 0 0 1px rgba(79, 70, 229, .05);
    display: flex; flex-direction: column; gap: 2px;
    animation: pop .14s ease-out;
}
.menu-panel a, .menu-panel button {
    display: flex; align-items: center; gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    font: inherit; font-size: .95rem; text-align: left;
    background: none; border: 0; cursor: pointer;
}
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); color: var(--brand); }
.menu-panel a.btn { justify-content: center; color: #fff; margin-top: 6px; }
.menu-panel form { margin: 0; }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }

.mobile-menu { display: none; margin-left: auto; }
.mobile-menu summary { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.mobile-menu .menu-panel { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 8px); max-height: calc(100vh - var(--header-h) - 100px); overflow-y: auto; }
.menu-search { display: flex; gap: 8px; padding: 4px 4px 8px; }
.menu-search input { flex: 1; min-width: 0; }
.menu-panel .menu-search .btn { flex: 0 0 auto; width: auto; padding: 0 16px; color: #fff; background: var(--gradient); justify-content: center; }

/* ------------------------------------------------------------------ Mise en page */
main { max-width: 1240px; margin: 0 auto; padding: 24px 18px 56px; }
.narrow { max-width: 480px; margin: 0 auto; }
.medium { max-width: 760px; margin: 0 auto; }
.wide { max-width: 1080px; margin: 0 auto; }

/* Échelle courante des sites marchands : titre de page ~24 px, section ~18 px, texte 15 px. */
h1, h2, h3 { font-family: var(--font-display); font-weight: 650; letter-spacing: -.01em; line-height: 1.25; }
h1 { font-size: clamp(1.3rem, 1.15rem + .6vw, 1.5rem); margin: 0 0 8px; }
h2 { font-size: 1.05rem; margin: 0 0 10px; }
h3 { font-size: .98rem; }
.lead { color: var(--muted); margin: 0 0 14px; font-size: .92rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.grow { flex: 1; min-width: 0; }

.card {
    position: relative;
    /* Effet verre sans flou (backdrop-filter) : coûteux sur des dizaines de cartes. */
    background: linear-gradient(180deg, rgba(255, 255, 255, .9), rgba(255, 255, 255, .78));
    border: 1px solid rgba(255, 255, 255, .9);
    outline: 1px solid var(--border);
    outline-offset: -1px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px 18px;
    margin-bottom: 16px;
}
.card.danger { outline-color: rgba(225, 29, 72, .35); }

/* ------------------------------------------------------------------ Formulaires */
.field { margin-bottom: 14px; }
.field label, .bid-form label { display: block; font-weight: 600; margin-bottom: 7px; font-size: .92rem; }
.field .hint, .hint { color: var(--muted); font-size: .84rem; margin-top: 5px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=search],
input[type=number], input[type=time], input[type=datetime-local], input[type=url], select, textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 14px;
    font: inherit;
    font-size: 16px; /* pas de zoom automatique sur iPhone */
    color: var(--text);
    background: rgba(255, 255, 255, .85);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea { resize: vertical; min-height: 96px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238b97ad' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 38px; }
select option { background: var(--surface-solid); color: var(--text); }
input::placeholder, textarea::placeholder { color: #94a3b8; }
input:hover, select:hover, textarea:hover { border-color: rgba(15, 23, 42, .26); }
input:focus, select:focus, textarea:focus { outline: none; border-color: #6366f1; background: #fff; box-shadow: 0 0 0 4px rgba(99, 102, 241, .14); }
input[type=file] { width: 100%; padding: 10px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font: inherit; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border: 0; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 600; cursor: pointer; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--brand); }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400 !important; }
.checkbox input { margin-top: 3px; flex-shrink: 0; }
.error { color: var(--danger); font-size: .86rem; margin-top: 5px; }
label.inline { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; }
label.inline select { width: auto; }
fieldset { border: 0; padding: 0; margin: 0; }
details.options { margin: 8px 0 16px; }
details.options summary, details.auto-bid summary { cursor: pointer; font-weight: 600; color: var(--brand); margin-bottom: 14px; }

/* ------------------------------------------------------------------ Boutons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    font: inherit;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid transparent;
    background: var(--gradient);
    background-size: 160% 160%;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 22px -10px rgba(79, 70, 229, .7), 0 1px 0 rgba(255, 255, 255, .25) inset;
    transition: transform .12s, box-shadow .2s, background-position .4s, opacity .15s;
}
.btn:hover { color: #fff; background-position: 100% 0; box-shadow: var(--glow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.secondary { background: rgba(255, 255, 255, .8); color: var(--text); border-color: var(--border-strong); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.btn.secondary:hover { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #e11d48); color: #fff; box-shadow: 0 8px 24px -10px rgba(225, 29, 72, .6); }
.btn.danger:hover { color: #fff; box-shadow: 0 0 0 1px rgba(251, 113, 133, .5), 0 8px 32px -8px rgba(244, 63, 94, .6); }
.btn.link { background: none; color: var(--brand); padding: 0; min-height: 0; border: 0; font-weight: 500; box-shadow: none; }
.btn.link:hover { color: #4f46e5; transform: none; box-shadow: none; text-decoration: underline; }
.btn.block { width: 100%; }
.btn.big { min-height: 50px; padding: 12px 22px; font-size: 1rem; border-radius: 14px; }
.btn.small-btn { min-height: 38px; padding: 6px 14px; font-size: .92rem; border-radius: 10px; }
.btn.link.small { font-size: .85rem; }
.actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }

/* ------------------------------------------------------------------ Messages */
.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; border: 1px solid transparent; }
.alert.success { background: var(--success-soft); color: #047857; border-color: rgba(5, 150, 105, .25); }
.alert.error { background: var(--danger-soft); color: #be123c; border-color: rgba(225, 29, 72, .25); }
.alert.info { background: var(--brand-soft); color: #0e7490; border-color: rgba(6, 182, 212, .28); }

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .01em;
    background: var(--brand-soft);
    color: #0e7490;
    border: 1px solid rgba(6, 182, 212, .3);
    white-space: nowrap;
}
.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: rgba(245, 158, 11, .35); }

/* ------------------------------------------------------------------ Listes et onglets */
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 16px 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a, .tabs.sub button {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 999px;
    color: var(--muted);
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--border);
    font: inherit; font-size: .9rem; font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: color .15s, border-color .15s, background .15s;
}
.tabs a:hover, .tabs.sub button:hover { color: var(--text); border-color: var(--border-strong); }
.tabs a.active, .tabs.sub button.active { background: var(--gradient); border-color: transparent; color: #fff; font-weight: 600; box-shadow: 0 6px 18px -8px rgba(79, 70, 229, .7); }
.tabs.sub button.active, .tabs.sub a.active { background: var(--brand-soft); color: var(--brand-dark); border-color: rgba(6, 182, 212, .45); box-shadow: none; }
.tabs .count { opacity: .75; font-size: .8rem; margin-left: 4px; }

.second-chance { outline-color: rgba(6, 182, 212, .5); box-shadow: 0 0 0 4px var(--brand-soft); }
.second-chance h2 { display: flex; align-items: center; gap: 8px; }
.second-chance h2 .icon { color: var(--brand); }

.section-title { font-size: 1.05rem; margin: 8px 0 12px; color: var(--muted); font-weight: 600; }
.sell-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 28px; }
.sell-modes a {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 16px; border-radius: var(--radius);
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.sell-modes a:hover { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.sell-modes a.active { border-color: rgba(6, 182, 212, .6); background: var(--brand-soft); }
.sell-modes .icon { flex-shrink: 0; color: var(--brand); margin-top: 2px; }
.sell-modes strong { display: block; margin-bottom: 2px; }
.sell-modes small { color: var(--muted); font-size: .85rem; line-height: 1.4; }
@media (max-width: 720px) {
    .sell-modes { grid-template-columns: 1fr; gap: 8px; }
    .sell-modes a { padding: 12px 14px; align-items: center; }
}

/* ------------------------------------------------------------------ Accueil */
.hero { text-align: center; padding: 32px 0 20px; }
.hero h1 {
    font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.9rem);
    line-height: 1.2;
    margin-bottom: 8px;
    background: linear-gradient(120deg, #0f172a 25%, #4f46e5 65%, #9333ea);
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
}
.hero p { font-size: .92rem; color: var(--muted); max-width: 560px; margin: 0 auto 16px; }
/* Recherche de l'accueil : une seule ligne fine, loupe à gauche, bouton intégré. */
.hero-search {
    display: flex; align-items: center; gap: 6px;
    max-width: 520px; margin: 0 auto 12px !important; padding: 4px 4px 4px 14px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--border-strong);
    box-shadow: 0 6px 20px -12px rgba(79, 70, 229, .45);
}
.hero-search:focus-within { border-color: #818cf8; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.hero-search svg { color: var(--muted); flex-shrink: 0; }
.hero-search input { flex: 1; min-width: 0; height: 36px; padding: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: .92rem; }
.hero-search .btn { height: 36px; padding: 0 18px; border-radius: 999px; font-size: .88rem; }
.hero .actions .btn { padding: 6px 14px; font-size: .85rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 16px; }
.features .card { margin: 0; }
.features .card h2 { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.home-section { margin-bottom: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }

/* Carrousels de l'accueil : 6 cartes visibles sur ordinateur, 3,4 sur tablette, 2,3 sur téléphone
   (la carte coupée invite à faire glisser). */
.carousel .section-head { align-items: center; margin-bottom: 4px; }
.carousel-controls { display: flex; align-items: center; gap: 8px; }
.carousel-controls a { margin-right: 6px; }
.carousel-btn {
    width: 34px; height: 34px; display: grid; place-items: center; padding: 0;
    border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface-solid);
    color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .06); transition: background .15s, color .15s, border-color .15s, opacity .15s;
}
.carousel-btn:hover:not(:disabled) { background: var(--gradient); color: #fff; border-color: transparent; }
.carousel-btn:disabled { opacity: .35; cursor: default; }
.carousel-track {
    --per-view: 6; --gap: 12px;
    display: grid; grid-auto-flow: column; gap: var(--gap);
    grid-auto-columns: calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    /* Marge pour l'ombre et l'effet de survol des cartes, sans couper. */
    padding: 8px 2px 14px; margin: -8px -2px 0; scroll-padding-inline: 2px;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { scroll-snap-align: start; min-width: 0; }
@media (max-width: 980px) {
    .carousel-track { --per-view: 3.4; }
}
@media (max-width: 720px) {
    /* Cartes plus larges sur téléphone : titre et prix lisibles, la suivante dépasse pour inviter à glisser. */
    .carousel-track { --per-view: 1.6; --gap: 10px; }
    .carousel-btn { display: none; }
}

/* ------------------------------------------------------------------ Pied de page et barre mobile */
.site-footer { border-top: 1px solid var(--border); background: rgba(255, 255, 255, .7); }
.site-footer .inner { max-width: 1240px; margin: 0 auto; padding: 32px 20px; display: flex; gap: 24px; align-items: center; flex-wrap: wrap; justify-content: space-between; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.footer-links.legal { flex-basis: 100%; font-size: .82rem; gap: 14px; }

/* Bandeau : nouvelle version des CGU à accepter */
.terms-banner { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

/* Textes longs (CGU, FAQ…) écrits en Markdown */
.prose { line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.1rem; margin: 28px 0 8px; }
.prose h3 { font-size: .98rem; margin: 20px 0 6px; color: var(--text); }
.prose p, .prose li { color: var(--text-soft, var(--text)); }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose blockquote { margin: 0 0 20px; padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--brand-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #0e7490; }
.prose blockquote p { margin: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: .92rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }

.bottom-bar { display: none; }
/* Installer l'application (PWA) : bandeau sur téléphone et explications pour l'iPhone. */
[data-install-app][hidden], .install-banner[hidden] { display: none !important; }
.install-banner {
    position: fixed; left: 10px; right: 10px; z-index: 46;
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px;
    border-radius: 16px; background: rgba(255, 255, 255, .95); border: 1px solid var(--border);
    backdrop-filter: blur(16px); box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .35);
    animation: install-in .35s ease-out;
}
.install-banner img { border-radius: 10px; flex: none; }
.install-banner-text { flex: 1; display: flex; flex-direction: column; line-height: 1.25; font-size: .85rem; min-width: 0; }
.install-banner-text span { color: var(--muted); font-size: .75rem; }
.install-banner-close { border: 0; background: none; color: var(--muted); font-size: 1rem; padding: 6px; cursor: pointer; }
@keyframes install-in { from { opacity: 0; transform: translateY(16px); } }
.install-help { max-width: 360px; width: calc(100% - 32px); border: 0; border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .45); }
.install-help::backdrop { background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); }
.install-help h2 { margin: 0 0 12px; font-size: 1.1rem; }
.install-help ol { margin: 0 0 18px; padding-left: 20px; line-height: 1.6; }
.install-help .inline-icon { width: 18px; height: 18px; vertical-align: -3px; color: #2563eb; }
/* Ouverte comme application : pas de bandeau ni de lien d'installation (l'invitation aux notifications reste). */
@media (display-mode: standalone) { .install-banner:not(.push-banner), [data-install-app] { display: none !important; } }
/* Application installée : pas de zoom au double appui, taille du texte fixée par l'application. */
@media (display-mode: standalone) {
    html { touch-action: manipulation; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
}
/* Bloc « Notifications sur cet appareil » (préférences). */
.push-card [hidden] { display: none !important; }
.push-card-head { display: flex; gap: 12px; align-items: flex-start; }
.push-card-head h2 { margin: 0 0 2px; }
.push-card-head p { margin: 0; }
.push-card-icon { font-size: 1.5rem; line-height: 1; padding: 8px; border-radius: 12px; background: var(--brand-soft); }
.push-card .actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.push-devices { margin: 12px 0 0; }

/* Bouton « haut de page », en bas à droite (au-dessus de la barre d'onglets sur téléphone). */
.to-top {
    position: fixed; right: 22px; bottom: 24px; z-index: 40;
    width: 44px; height: 44px; display: grid; place-items: center;
    border: 0; border-radius: 50%; cursor: pointer; color: #fff;
    background: var(--gradient); box-shadow: 0 10px 24px -8px rgba(79, 70, 229, .65);
    opacity: 0; visibility: hidden; transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s, box-shadow .2s;
}
.to-top.visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { transform: translateY(-3px); box-shadow: 0 14px 28px -8px rgba(79, 70, 229, .8); }
.to-top svg { width: 20px; height: 20px; }
@media (max-width: 720px) { .to-top { right: 14px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); width: 40px; height: 40px; } }

/* ------------------------------------------------------------------ Grille d'annonces */
.listing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 18px; margin-bottom: 28px; }
.listing-card {
    display: flex; flex-direction: column; gap: 4px;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    padding-bottom: 14px;
    transition: transform .18s, border-color .18s, box-shadow .18s;
}
.listing-card { box-shadow: var(--shadow); }
.listing-card:hover { color: var(--text); transform: translateY(-4px); border-color: rgba(99, 102, 241, .4); box-shadow: 0 20px 40px -18px rgba(79, 70, 229, .45); }
.listing-card img, .listing-card .no-photo { width: 100%; aspect-ratio: 1; object-fit: cover; height: auto; display: block; background: var(--bg-2); }
.listing-card .title, .listing-card .price, .listing-card .muted { padding: 0 14px; }
.listing-card .title { margin-top: 10px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-card .price { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.no-photo { display: flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--muted); }
/* Cartes compactes : photo moins haute, texte et marges réduits. */
.listing-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.listing-card { gap: 1px; padding-bottom: 8px; border-radius: 12px; }
.listing-card img, .listing-card .no-photo { aspect-ratio: 4 / 3; }
.listing-card .title, .listing-card .price, .listing-card .muted { padding: 0 9px; }
.listing-card .title { margin-top: 6px; font-size: .82rem; }
.listing-card .price { font-size: .92rem; }
.listing-card .muted.small { font-size: .7rem; }
.listing-card .badge { font-size: .64rem; padding: 1px 6px; }
.listing-card-wrap .watchers-badge { top: 6px; right: 6px; padding: 2px 8px; font-size: .7rem; }

/* Profil : ville + bouton « Me localiser ». */
.city-locate { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.city-locate input { flex: 1 1 200px; min-width: 0; }
.city-locate .btn { white-space: nowrap; }
.city-locate .error { flex-basis: 100%; }

/* Accueil : reprise de la navigation. */
.history-block h2 { font-size: 1rem; margin: 0 0 10px; }
.history-searches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.history-searches .chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2, var(--bg-2)); color: var(--text); font-size: .82rem; }
.history-searches .chip:hover { border-color: #a5b4fc; color: #4f46e5; }
.history-viewed { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.history-viewed a { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 12px; border: 1px solid var(--border); color: var(--text); background: var(--surface); }
.history-viewed a:hover { border-color: #a5b4fc; }
.history-viewed img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.history-viewed .grow { display: flex; flex-direction: column; min-width: 0; }
.history-viewed .title { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-viewed .price { font-size: .8rem; color: #4f46e5; }
@media (max-width: 980px) {
    .history-viewed { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .history-viewed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Rédaction par IA : étapes photo -> choix lot / article -> traitement. */
.ai-step { padding: 16px 0 0; margin-top: 16px; border-top: 1px solid var(--border); }
.ai-step h2 { display: flex; align-items: center; gap: 10px; font-size: 1rem; margin: 0 0 12px; }
.step-number { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--gradient); color: #fff; font-size: .85rem; flex-shrink: 0; }
.ai-preview { display: flex; align-items: center; gap: 14px; }
.ai-preview img { width: 160px; height: 160px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choice-card { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid var(--border); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:hover { border-color: #a5b4fc; }
.choice-card.selected, .choice-card:has(input:checked) { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.choice-card:has(input:focus-visible) { outline: 2px solid #6366f1; outline-offset: 2px; }
.photo-grid .badge.group { top: auto; bottom: 34px; background: var(--warn-soft); color: var(--warn); }
@media (max-width: 720px) {
    .choice-cards { grid-template-columns: 1fr; }
}

/* Profil public : en-tête, fiabilité, avis. */
.profile-head { display: flex; gap: 18px; align-items: flex-start; }
.profile-head h1 { margin: 0 0 2px; }
.profile-head .avatar { width: 64px; height: 64px; font-size: 1.6rem; flex-shrink: 0; box-shadow: 0 10px 24px -10px rgba(79, 70, 229, .6); }
.profile-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.profile-stats .stat { display: flex; flex-direction: column; min-width: 96px; padding: 8px 14px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--border); }
.profile-stats .stat-value { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; }
.profile-stats .stat-value .stars, .star-row { color: #f59e0b; letter-spacing: 1px; }
.profile-stats .stat-label { font-size: .78rem; color: var(--muted); }
.trust-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.trust { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 500; background: var(--bg-2); border: 1px solid var(--border); color: var(--text); }
.trust.good { background: rgba(16, 185, 129, .1); border-color: rgba(16, 185, 129, .35); color: #047857; }
.trust.warn { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); }
.reviews-layout { display: grid; grid-template-columns: 240px 1fr; gap: 18px; align-items: start; margin-bottom: 28px; }
.reviews-summary { position: sticky; top: calc(var(--header-h) + 20px); text-align: center; }
.reviews-summary .big-rating { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.reviews-summary .star-row { font-size: 1.15rem; margin-top: 4px; }
.rating-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .8rem; }
.rating-bars li { display: grid; grid-template-columns: 26px 1fr 22px; align-items: center; gap: 8px; text-align: left; }
.rating-bars .bar { height: 8px; border-radius: 999px; background: var(--bg-2); overflow: hidden; }
.rating-bars .bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.review-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.review { margin: 0; }
.review-head { display: flex; align-items: center; gap: 10px; }
.review-head .badge { margin-left: 4px; }
.review-head .star-row { font-size: 1rem; white-space: nowrap; }
.avatar.small { width: 36px; height: 36px; font-size: .95rem; flex-shrink: 0; }
.review blockquote { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid #a5b4fc; background: var(--bg-2); border-radius: 0 10px 10px 0; font-style: italic; }
.review-reply { margin: 10px 0 0 24px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--border); }
.review-reply p { margin: 2px 0 0; }
@media (max-width: 720px) {
    .reviews-layout { grid-template-columns: 1fr; }
    .reviews-summary { position: static; }
    .profile-head .avatar { width: 52px; height: 52px; font-size: 1.3rem; }
}

/* Cœur « suivre » posé sur la photo (carte et page de l'annonce) : nombre de suiveurs, clic = suivre. */
.listing-card-wrap { position: relative; display: flex; flex-direction: column; }
.listing-card-wrap > .listing-card { flex: 1; }
.listing-card-wrap:hover > .listing-card { transform: translateY(-4px); }
.listing-card-wrap:hover > .watchers-badge { transform: translateY(-4px); }
.watchers-badge {
    position: absolute; top: 8px; right: 8px; z-index: 2; margin: 0;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 999px;
    background: rgba(15, 23, 42, .72); color: #fff;
    font-size: .78rem; font-weight: 600; line-height: 1.4;
    box-shadow: 0 4px 12px -4px rgba(15, 23, 42, .5);
    transition: transform .18s, background .18s;
}
.watchers-badge svg { color: #fff; }
/* « Suivre » discret en fin de titre de la fiche annonce. */
.title-watch { display: inline; font-size: 1rem; font-weight: 400; vertical-align: middle; }
.title-watch-btn {
    border: 0; background: none; padding: 0 2px; margin-left: 6px; cursor: pointer; white-space: nowrap;
    font-family: inherit; font-size: .78rem; font-weight: 500; line-height: 1; color: var(--muted); opacity: .7; transition: opacity .15s, color .15s;
}
.title-watch-btn:hover, .title-watch-btn:focus-visible { opacity: 1; color: #f59e0b; }
.title-watch-btn.is-watching { opacity: 1; color: #f59e0b; }
.title-watch .error { display: block; font-size: .8rem; }
.watch-toggle { padding: 0; }
.watch-toggle button {
    display: inline-flex; align-items: center; gap: 4px; min-height: 30px; min-width: 30px; justify-content: center;
    padding: 4px 10px; border: 0; border-radius: inherit; background: none; color: inherit; font: inherit; cursor: pointer;
}
.watch-toggle:hover { background: rgba(15, 23, 42, .88); }
.watch-toggle.is-watching svg { color: #f472b6; fill: #f472b6; }
.watch-toggle button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.gallery > .watchers-badge { top: 14px; right: 14px; font-size: .85rem; }

/* Recherche */
[hidden] { display: none !important; }
.search-form { padding: 10px; margin-bottom: 12px; }
.search-bar { display: flex; gap: 8px; align-items: stretch; }
.search-bar input { flex: 1; min-width: 0; }
.search-toggle {
    display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0;
    max-width: 260px; padding: 0 14px; border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, .85); border: 1px solid var(--border-strong); color: var(--text);
    font: inherit; font-size: .92rem; cursor: pointer; white-space: nowrap;
    transition: border-color .15s, color .15s;
}
.search-toggle span:not(.count) { overflow: hidden; text-overflow: ellipsis; }
.search-toggle:hover, .search-toggle[aria-expanded=true] { border-color: var(--brand); color: var(--brand); }
.search-toggle .count { background: var(--gradient); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .78rem; font-weight: 700; }
.search-panel { margin-top: 12px; padding-top: 14px; border-top: 1px solid var(--border); }
.search-panel label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .88rem; color: var(--muted); }
.search-panel label.checkbox { flex-direction: row; align-items: center; color: var(--text); }
.segmented { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); margin-bottom: 14px; }
.segmented label { flex-direction: row !important; align-items: center; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-size: .9rem !important; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label:has(input:checked) { background: var(--brand-soft); color: var(--brand); }
.segmented label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.where-fields { display: grid; grid-template-columns: 160px minmax(200px, 360px); gap: 16px; align-items: end; }
.where-fields[data-mode=department] { grid-template-columns: minmax(200px, 360px); }
.panel-actions { margin-top: 14px; display: flex; justify-content: flex-end; }
.filter-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--brand-soft); border: 1px solid rgba(6, 182, 212, .4); color: var(--brand-dark); font-size: .85rem; }
.filter-chip:hover { border-color: var(--brand); }
@media (max-width: 720px) {
    .search-bar { flex-wrap: wrap; }
    .search-bar input { flex-basis: 100%; }
    .search-toggle { flex: 1; justify-content: center; max-width: none; min-height: 44px; }
    .search-bar .btn { flex-basis: 100%; }
    .where-fields, .where-fields[data-mode=department] { grid-template-columns: 1fr; }
}
/* Curseur de rayon (10 à 200 km) */
.radius-field { display: flex; flex-direction: column; gap: 8px; min-width: 200px; }
.radius-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 500; font-size: .88rem; color: var(--muted); }
.radius-head output { font-family: var(--font-display); font-weight: 700; color: var(--brand); font-size: .95rem; }
.radius-all { font-size: .85rem; color: var(--muted) !important; }
input[type=range] {
    --fill: 50%;
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 28px; margin: 0;
    background: transparent; cursor: pointer;
}
input[type=range]::-webkit-slider-runnable-track {
    height: 6px; border-radius: 999px;
    background: linear-gradient(90deg, #06b6d4 0%, #6366f1 var(--fill), rgba(15, 23, 42, .1) var(--fill));
}
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(15, 23, 42, .1); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--gradient); }
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
    background: #fff; border: 3px solid #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, .15), 0 4px 12px rgba(79, 70, 229, .4);
}
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 3px solid #6366f1; box-shadow: 0 4px 12px rgba(79, 70, 229, .4); }
input[type=range]:disabled { opacity: .35; cursor: not-allowed; }
input[type=range]:focus-visible { outline: none; }
input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 6px rgba(99, 102, 241, .3); }

.listing-card .place { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px 16px; align-items: end; }
.filters label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: .88rem; color: var(--muted); }
.filters label.checkbox { flex-direction: row; align-items: center; color: var(--text); }

/* ------------------------------------------------------------------ Listes de gestion */
.bulk-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; }
.listing-rows { list-style: none; padding: 2px 16px; }
.listing-rows li { display: flex; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.listing-rows li:last-child { border-bottom: 0; }
.listing-rows .actions { margin-top: 0; }
.thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 9px; flex-shrink: 0; border: 1px solid var(--border); }
.thumb.big { width: 72px; height: 72px; }
.thumb.empty { display: inline-flex; align-items: center; justify-content: center; background: var(--bg-2); color: var(--muted); border: 1px dashed var(--border-strong); }

/* Photos dans les formulaires */
.upload-button { cursor: pointer; }
.photo-grid { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.photo-grid li { position: relative; width: 120px; }
.photo-grid img { width: 120px; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); display: block; }
.photo-grid .badge { position: absolute; top: 6px; left: 6px; }
.photo-grid .photo-actions { display: flex; justify-content: space-between; align-items: center; gap: 4px; margin-top: 4px; }
.photo-grid.small li { width: 88px; cursor: grab; }
.photo-grid.small img { width: 88px; height: 88px; }
.photo-grid.small select { padding: 2px 4px; min-height: 30px; font-size: .75rem; width: 64px; background-image: none; }

/* Dépôt multiple */
.bulk-row-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.bulk-fields { display: grid; grid-template-columns: 2fr 1.5fr 1.2fr .8fr; gap: 12px; }
.bulk-fields .field { margin-bottom: 0; }
.bulk-location { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.bulk-location label { font-weight: 600; font-size: .9rem; }
.bulk-location select { width: auto; flex: 1 1 220px; max-width: 420px; }
.drop-target { outline: 2px dashed var(--brand); outline-offset: -2px; background: var(--brand-soft); }
.drop-new { text-align: center; color: var(--muted); border-style: dashed; }

/* ------------------------------------------------------------------ Fiche annonce */
.listing-page { display: grid; grid-template-columns: 1.15fr 1fr; gap: 36px; align-items: start; }
.gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.gallery .main-photo { width: 100%; height: auto; max-height: 640px; object-fit: contain; background: var(--bg-2); border-radius: var(--radius); border: 1px solid var(--border); aspect-ratio: 4 / 3; }
.gallery .thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding-bottom: 4px; }
.gallery .thumbs button { padding: 0; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; flex-shrink: 0; }
.gallery .thumbs button.active { border-color: #6366f1; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .6); }
.gallery .thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }

.price-box { outline-color: rgba(99, 102, 241, .25); box-shadow: var(--shadow), 0 24px 60px -30px rgba(79, 70, 229, .45); }
/* Liseré dégradé = bord haut de la carte : posé sur la bordure (inset -1px), il suit l'arrondi des coins
   (le masque ne garde que les 2 px du haut). */
.price-box::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding-top: 2px; pointer-events: none;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.price-box p { margin: 12px 0 0; }
.big-price { font-family: var(--font-display); font-size: clamp(1.6rem, 1.35rem + .9vw, 2.05rem); font-weight: 600; letter-spacing: -.035em; line-height: 1.15; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; width: fit-content; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 0 0 24px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts.compact { margin: 10px 0 0; }
.description { white-space: pre-line; }
.addendum { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--brand); background: var(--surface-2); border-radius: 0 12px 12px 0; }

/* Enchères */
.step-bid { margin-top: 18px; }
.step-label { margin-bottom: 8px; }
details.auto-bid { margin-top: 18px; }
.bid-input { display: flex; gap: 8px; }
.bid-input input { flex: 1; min-width: 0; font-size: 1.1rem; }
/* Chrono de fin d'enchère (partials/chrono) : de plus en plus vif à l'approche de la fin. */
.chrono {
    display: inline-flex; align-items: center; gap: 5px; width: fit-content;
    padding: 3px 9px 3px 7px; border-radius: 999px; border: 1px solid transparent;
    font-family: var(--font-display); font-weight: 800; font-size: .78rem; letter-spacing: .02em;
    font-variant-numeric: tabular-nums; line-height: 1.2; white-space: nowrap;
    transition: background .4s, color .4s, box-shadow .4s;
}
.chrono-icon { width: 1.05em; height: 1.05em; flex: none; }
.chrono-lg { padding: 6px 14px 6px 11px; gap: 7px; font-size: 1.12rem; font-weight: 600; letter-spacing: .01em; }
.chrono-lg .chrono-icon circle, .chrono-lg .chrono-icon path { stroke-width: 2; }
.chrono[data-level="calm"] { background: rgba(6, 182, 212, .1); color: #0e7490; border-color: rgba(6, 182, 212, .3); }
.chrono[data-level="soon"] { background: rgba(79, 70, 229, .12); color: #4338ca; border-color: rgba(79, 70, 229, .35); }
.chrono[data-level="today"] { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; box-shadow: 0 6px 16px -8px rgba(249, 115, 22, .8); }
.chrono[data-level="hour"] { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 8px 20px -8px rgba(220, 38, 38, .9); }
.chrono[data-level="final"] {
    background: linear-gradient(135deg, #e11d48, #be123c 55%, #9333ea); color: #fff;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, .35), 0 0 22px rgba(225, 29, 72, .65);
    animation: chrono-beat 1s ease-in-out infinite;
}
.chrono[data-level="ended"] { background: var(--bg-2); color: var(--muted); border-color: var(--border); }
@keyframes chrono-beat { 50% { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(225, 29, 72, .2), 0 0 30px rgba(225, 29, 72, .85); } }
@media (prefers-reduced-motion: reduce) { .chrono[data-level="final"] { animation: none; } }
/* Sur les cartes : posé sur la photo, en haut à gauche. */
.listing-card { position: relative; }
.listing-card > .chrono { position: absolute; top: 6px; left: 6px; font-size: .7rem; backdrop-filter: blur(6px); }
.listing-card > .chrono[data-level="calm"], .listing-card > .chrono[data-level="soon"] { background: rgba(255, 255, 255, .88); }
.price-box .chrono-lg { margin: 4px 0 2px; }
.countdown { color: var(--muted); font-variant-numeric: tabular-nums; }
.countdown.urgent { color: var(--danger); font-weight: 700; text-shadow: 0 0 12px rgba(225, 29, 72, .25); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .65; } }
.bid-history { list-style: none; margin: 0; padding: 0; }
.bid-history li { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.bid-history li:last-child { border-bottom: 0; }
.bid-history li.mine { background: var(--brand-soft); margin: 0 -10px; padding: 10px; border-radius: 10px; border-bottom-color: transparent; }

/* Questions publiques et signalements */
.questions { margin-top: 36px; }
.question { padding: 14px 0; border-bottom: 1px solid var(--border); }
.question p { margin: 4px 0; }
.report-form { display: inline-flex; flex-direction: column; gap: 8px; max-width: 340px; width: 100%; margin-top: 8px; }

/* ------------------------------------------------------------------ Tableau de bord */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.dashboard-grid .card { margin: 0; }
.stat-list { list-style: none; margin: 0; padding: 0; }
.stat-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.stat-list li:last-child { border-bottom: 0; }
.stat-list li a, .stat-list li span { color: var(--text); }
.stat-list strong { font-family: var(--font-display); font-size: 1.05rem; }
.stat-list li.attention strong { color: var(--warn); }

/* ------------------------------------------------------------------ Commande */
.order-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; align-items: start; }
.order-item { display: flex; gap: 16px; align-items: flex-start; }
.address { font-style: normal; line-height: 1.7; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border-strong); }
.timeline li { padding: 0 0 14px 14px; position: relative; }
.timeline li::before { content: ''; position: absolute; left: -21px; top: 6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gradient); box-shadow: 0 0 0 3px #fff, 0 2px 10px rgba(79, 70, 229, .5); }

.thread { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.thread li { background: rgba(255, 255, 255, .85); border: 1px solid var(--border); border-radius: 14px 14px 14px 4px; padding: 10px 14px; max-width: 85%; }
.thread li.mine { align-self: flex-end; background: var(--brand-soft); border-color: rgba(6, 182, 212, .3); border-radius: 14px 14px 4px 14px; }
.thread li.staff { border: 1px solid var(--brand-2); box-shadow: 0 6px 16px -8px rgba(124, 58, 237, .5); }
.thread li p { margin: 4px 0 0; white-space: pre-line; }
.thread-form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.thread-form .btn { align-self: flex-start; }
.dispute h3, .proposal-form h3 { margin: 22px 0 10px; }
.proposal { padding: 12px 0; border-bottom: 1px solid var(--border); }
.evidence { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.evidence img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; border: 1px solid var(--border); }
.stars { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.stars label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.stars label:has(input:checked) { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.review { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }

/* Code de retrait (retrait chez le vendeur) */
.handover-code { display: inline-flex; flex-direction: column; gap: 2px; padding: 14px 22px; margin: 4px 0 10px; border-radius: 14px; border: 1px solid rgba(6, 182, 212, .4); background: var(--brand-soft); box-shadow: var(--glow); }
.handover-code strong { font-family: var(--font-display); font-size: 1.8rem; letter-spacing: .3em; color: var(--brand-dark); }

/* ------------------------------------------------------------------ Notifications */
.notification-list { list-style: none; padding: 6px 20px; }
.notification-list li { border-bottom: 1px solid var(--border); }
.notification-list li:last-child { border-bottom: 0; }
.notification-list li.unread { position: relative; }
.notification-list li.unread::before { content: ''; position: absolute; left: -12px; top: 22px; width: 7px; height: 7px; border-radius: 50%; background: var(--gradient); }
.notification { display: flex; flex-direction: column; gap: 3px; width: 100%; text-align: left; background: none; border: 0; padding: 14px 0; font: inherit; color: inherit; cursor: pointer; }
.notification:hover strong { color: var(--brand); }
.table-scroll { overflow-x: auto; }
table.prefs { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
table.prefs th, table.prefs td { padding: 6px 6px; border-bottom: 1px solid var(--border); text-align: center; }
table.prefs th[scope=row], table.prefs thead th:first-child { text-align: left; font-weight: 500; }
table.prefs thead th { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ------------------------------------------------------------------ Pagination (gabarits « bootstrap ») */
.pagination { list-style: none; display: flex; gap: 6px; padding: 0; flex-wrap: wrap; }
.pagination .page-link, .pagination .page-item > span {
    display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
    border: 1px solid var(--border); border-radius: 10px;
    background: rgba(255, 255, 255, .8); color: var(--text); font: inherit; cursor: pointer;
}
.pagination .page-link:hover { border-color: var(--brand); color: var(--brand); }
.pagination .active .page-link, .pagination .active > span { background: var(--gradient); border-color: transparent; color: #fff; font-weight: 700; }
.pagination .disabled .page-link, .pagination .disabled > span { color: var(--muted); cursor: default; opacity: .5; }
nav .small.text-muted, nav .d-sm-none { display: none; }

/* ------------------------------------------------------------------ Pages d'erreur */
.error-page { max-width: 520px; padding-top: 12vh; text-align: center; }
.error-page .brand { margin-bottom: 24px; }
.error-page .actions { justify-content: center; }
.error-code { margin: 0; font-size: 3rem; font-weight: 800; letter-spacing: -.04em; background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ------------------------------------------------------------------ Utilitaires */
[x-cloak] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ================================================================== Tablette */
.small-screen-only { display: none !important; }
@media (max-width: 980px) {
    .header-search, .nav { display: none; }
    .small-screen-only { display: flex !important; }
    .mobile-menu { display: block; }
    .listing-page { grid-template-columns: 1fr; gap: 24px; }
    .gallery { position: relative; top: 0; }
    .gallery .main-photo { max-height: 60vh; }
    .order-grid { grid-template-columns: 1fr; }
    .bulk-fields { grid-template-columns: 1fr 1fr; }
}

/* ================================================================== Téléphone */
@media (max-width: 720px) {
    :root { --header-h: 60px; }
    main { padding: 22px 14px 110px; }
    .site-header .inner { padding: 0 14px; }
    .card { padding: 18px; border-radius: 14px; margin-bottom: 16px; }
    .row { grid-template-columns: 1fr; gap: 0; }
    .lead { margin-bottom: 20px; }
    .hero { padding: 18px 0 14px; }
    .hero p { font-size: .88rem; }

    /* Titres sur 2 lignes au lieu d'être coupés (listes et carrousels). */
    .listing-card .title { font-size: .9rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
    .listing-card .price { font-size: 1rem; }
    .listing-card .muted.small { font-size: .76rem; }

    /* Listes : une annonce par ligne, photo à gauche, texte à droite. */
    .listing-grid { grid-template-columns: 1fr; gap: 10px; }
    .listing-grid .listing-card {
        display: grid;
        grid-template-columns: 116px minmax(0, 1fr);
        align-content: start;
        column-gap: 12px; row-gap: 3px;
        padding: 0 12px 0 0;
        min-height: 116px;
    }
    .listing-grid .listing-card > img, .listing-grid .listing-card > .no-photo { grid-column: 1; grid-row: 1 / span 6; height: 100%; min-height: 116px; aspect-ratio: auto; }
    .listing-grid .listing-card > .title, .listing-grid .listing-card > .price, .listing-grid .listing-card > .muted { grid-column: 2; padding: 0; }
    .listing-grid .listing-card .title { margin-top: 10px; }
    .listing-grid .listing-card .place { white-space: normal; }
    .listing-grid .listing-card > :last-child { margin-bottom: 10px; }
    .listing-grid .listing-card-wrap .watchers-badge { top: auto; right: auto; bottom: 6px; left: 6px; }

    .listing-rows { padding: 4px 14px; }
    .listing-rows li { gap: 12px; }
    .listing-rows .actions { width: 100%; gap: 16px; }
    .bulk-fields { grid-template-columns: 1fr; }

    .facts { grid-template-columns: 1fr; gap: 2px; }
    .facts dt { margin-top: 8px; font-size: .85rem; }
    .order-item { flex-direction: column; }
    .thread li { max-width: 100%; }
    .bid-history li { grid-template-columns: 1fr auto; }
    .bid-history li > :last-child { grid-column: 1 / -1; }
    .bid-input { flex-direction: column; }
    .actions .btn:not(.link) { flex: 1 1 auto; }
    .site-footer .inner { padding-bottom: 100px; }

    /* Barre d'onglets en bas de l'écran */
    .bottom-bar {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        left: 10px; right: 10px;
        bottom: calc(10px + env(safe-area-inset-bottom));
        z-index: 45;
        padding: 6px;
        border-radius: 20px;
        background: rgba(255, 255, 255, .86);
        backdrop-filter: blur(20px) saturate(160%);
        -webkit-backdrop-filter: blur(20px) saturate(160%);
        border: 1px solid var(--border);
        box-shadow: 0 18px 40px -14px rgba(15, 23, 42, .35);
    }
    .bottom-bar a {
        position: relative;
        display: flex; flex-direction: column; align-items: center; gap: 2px;
        padding: 6px 2px;
        border-radius: 14px;
        color: var(--muted);
        font-size: .68rem; font-weight: 500;
    }
    .bottom-bar a.active { color: var(--brand-dark); background: var(--brand-soft); }
    .bottom-bar a.sell { color: #fff; background: var(--gradient); box-shadow: 0 6px 18px -6px rgba(79, 70, 229, .7); }
    .bottom-bar .dot-count { top: 0; right: 14%; }
}

@media (max-width: 380px) {
    /* Bandeau : logo + nom + menu tiennent jusqu'à 320 px, nom un peu plus petit. */
    .site-header .brand { font-size: 1.2rem; gap: 8px; }
}

/* Curseur à crans sous le prix de départ et la réserve (formulaire d'annonce). */
.price-slider { --thumb: 18px; margin-top: 10px; }
.price-slider input[type=range] {
    -webkit-appearance: none; appearance: none; width: 100%; height: var(--thumb); margin: 0; padding: 0; border: 0; cursor: pointer;
    background: transparent;
}
/* Rail dessiné sur la piste elle-même (sinon Chrome y peint sa propre barre de progression). */
.price-slider input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: #e4e7ef; }
.price-slider input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: #e4e7ef; }
.price-slider input[type=range]::-moz-range-progress { background: transparent; }
.price-slider input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; margin-top: calc((6px - var(--thumb)) / 2); width: var(--thumb); height: var(--thumb); border-radius: 50%;
    background: var(--gradient); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(79, 70, 229, .45);
}
.price-slider input[type=range]::-moz-range-thumb {
    width: var(--thumb); height: var(--thumb); border-radius: 50%; background: var(--gradient); border: 2px solid #fff; box-shadow: 0 2px 8px rgba(79, 70, 229, .45);
}
.price-slider input[type=range]:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--brand-soft); }
/* Libellés centrés sous chaque cran : la course du curseur est réduite d'une demi-poignée de chaque côté. */
.price-slider-ticks { display: flex; justify-content: space-between; padding: 0 calc(var(--thumb) / 2); }
.price-slider-ticks span { width: 0; display: flex; justify-content: center; white-space: nowrap; font-size: .72rem; color: var(--muted); cursor: pointer; }
.price-slider-ticks span.is-on { color: #4f46e5; font-weight: 700; }
.price-slider-ticks span.is-hidden { visibility: hidden; }
/* Bulle du montant au-dessus de la poignée, pendant le déplacement. */
.price-slider-track { position: relative; }
.price-slider-bubble {
    position: absolute; bottom: calc(100% + 6px); z-index: 2; pointer-events: none;
    left: calc(var(--thumb) / 2 + (100% - var(--thumb)) * var(--pos, 0)); transform: translateX(-50%);
    padding: 3px 9px; border-radius: 8px; white-space: nowrap;
    background: #1e1b4b; color: #fff; font-size: .8rem; font-weight: 700;
    box-shadow: 0 6px 16px -6px rgba(30, 27, 75, .6);
}
.price-slider-bubble::after { content: ''; position: absolute; left: 50%; top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: #1e1b4b; }
.reserve-input::placeholder { color: #e11d48; opacity: .75; font-weight: 600; }

/* Début programmé : date + heure côte à côte. */
.schedule-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.schedule-picker input[type=date] { flex: 1 1 160px; max-width: 200px; }
.schedule-picker select { flex: 0 0 120px; width: 120px; }

/* Fenêtre de confirmation du site (remplace celle du navigateur). */
.confirm-dialog {
    width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 20px;
    background: #fff; color: var(--text); box-shadow: 0 0 0 1px var(--border), 0 30px 80px -24px rgba(15, 23, 42, .45);
}
/* Liseré en dégradé qui épouse les coins arrondis (même technique que l'encadré du prix). */
.confirm-dialog::before {
    content: ''; position: absolute; inset: 0; border-radius: inherit; padding-top: 3px; pointer-events: none;
    background: var(--gradient);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.confirm-dialog::backdrop { background: rgba(15, 23, 42, .4); backdrop-filter: blur(3px); }
.confirm-dialog[open] { animation: confirm-in .16s ease-out; }
.confirm-dialog form { padding: 22px 24px 20px; }
.confirm-dialog h2 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.35; }
.confirm-dialog-body { margin: 0; font-size: .92rem; line-height: 1.55; }
.confirm-dialog-body:empty { display: none; }
.confirm-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
@media (max-width: 480px) { .confirm-dialog-actions .btn { flex: 1 1 100%; } .confirm-dialog-actions { flex-direction: column-reverse; } }
@keyframes confirm-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Ordinateur : champs et boutons plus compacts (sur téléphone, on garde des cibles tactiles de 44 px). */
@media (min-width: 721px) {
    input[type=text], input[type=email], input[type=password], input[type=date], input[type=tel], input[type=search],
    input[type=number], input[type=time], input[type=datetime-local], input[type=url], select {
        min-height: 38px; padding-top: 7px; padding-bottom: 7px; font-size: .95rem;
    }
    .btn { min-height: 38px; padding: 8px 16px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
