/* ===== VARIABLES CSS LOGUETOWN ===== */
:root {
    /* Palette LOGUETOWN */
    --primary: #385e6b;
    --primary-dark: #2c3e50;
    --primary-light: #4a7a8a;
    --secondary: #f2deb9;
    --light: #faf8f6;
    --dark: #2c3e50;
    --accent: #f2deb9;
    --gray: #6c757d;
    --light-gray: #f8f9fa;
    --border-light: #e2e8f0;
    --success: #4caf50;
    --warning: #ff9800;
    --danger: #e74c3c;

    /* Typographie & arrière-plan */
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --background-gradient: linear-gradient(180deg, var(--light) 0%, #eef2f7 100%);

    /* Espacements (réutilisables) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Grille base */
    --grid-gutter: 24px;
    --grid-cols: 12;
    --content-max: 1200px;

    /* Ombres */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.2);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.25);

    /* Bordures */
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

    /* Focus visible (niveau AA) */
    --focus-ring: 2px solid var(--primary);
    --focus-offset: 2px;

    /* Famille cartes annonce (acheter, résultats, favoris) */
    --card-radius: 14px;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.08);
    --card-shadow-hover: 0 8px 22px rgba(44,62,80,0.1);
    --card-border: 1px solid var(--border-light);
}

/* ===== RESET CSS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== Layout Flexbox (sticky footer, pas de chevauchement) ===== */
html {
    scroll-behavior: smooth;
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: var(--font-body);
    background: var(--background-gradient);
    color: var(--dark);
    line-height: 1.6;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenu principal : occupe l'espace restant, pousse le footer en bas (pas de chevauchement) */
main {
    flex: 1 0 auto;
}

/* Pages Support : marge de sécurité avant le footer (évite le débordement du texte sur le footer) */
main.support-page {
    flex: 1 0 auto;
    padding-bottom: 100px;
}

/* Header et nav ne rétrécissent pas */
body > header,
body > nav {
    flex-shrink: 0;
}

/* Footer : ne rétrécit pas, reste en bas sans chevaucher le contenu */
footer,
.footer-lbc-modern {
    flex-shrink: 0;
}
.footer-lbc-modern {
    margin-top: auto;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: #fff;
    padding: 8px 16px;
    z-index: 10000;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: var(--primary-dark);
}

/* Focus visible (niveau AA – accessibilité) */
a:focus-visible,
button:focus-visible,
[type="button"]:focus-visible,
[type="submit"]:focus-visible {
    outline: var(--focus-ring);
    outline-offset: var(--focus-offset);
}
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: var(--focus-ring);
    outline-offset: 0;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

code, pre {
    font-family: var(--font-mono);
}

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
}

.btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--dark);
}

.btn-accent {
    background: var(--accent);
    color: #000;
}

.btn-accent:hover {
    background: var(--accent);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: #fff;
}

.btn:disabled,
.btn.disabled {
    background: var(--light-gray);
    color: var(--gray);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ===== CLASSES UTILITAIRES ===== */
.container {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.responsive-img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

/* Tableaux : scroll horizontal sur mobile pour ne pas casser la mise en page */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 768px) {
    .table-responsive table {
        min-width: 480px;
    }
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.d-flex { display: flex; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-none { display: none; }

.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-around { justify-content: space-around; }

.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }

.mt-15 { margin-top: 15px; }
.mt-24 { margin-top: 24px; }
.mb-24 { margin-bottom: 24px; }

.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    animation: fadeIn 2s ease-in-out;
}

.tagline {
    margin-top: 0.5rem;
    color: #555;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff;
}

.hero-content {
    max-width: 600px;
    animation: fadeIn 1.2s ease-in-out;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 3rem);
    margin-bottom: 0.5rem;
}

.hero .tagline {
    color: rgba(255,255,255,0.9);
}

.hero .btn {
    margin-top: 1.5rem;
}

/* ===== HEADER LOGUETOWN ===== */
.header-lbc-leboncoin {
    background: rgba(255,255,255,0.95);
    backdrop-filter: saturate(180%) blur(12px);
    box-shadow: var(--shadow-sm);
    width: 100%;
    position: relative; /* Assure l'application du z-index */
    z-index: 10000; /* Au-dessus de tout le reste */
}

.header-lbc-leboncoin .header-content-lbc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.header-lbc-leboncoin .logo-lbc {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 56px;
    max-width: 120px;
    width: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 24px 0 rgba(44,62,80,0.10);
    background: rgba(255,255,255,0.5);
    filter: drop-shadow(0 2px 8px rgba(44,62,80,0.08));
}

.header-lbc-leboncoin .search-bar-lbc {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 24px;
    position: relative;
}

.search-bar-input {
    padding: 10px 14px;
    border-radius: 6px 0 0 6px;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    background: #fff;
    transition: border 0.2s;
    outline: none;
    width: 420px;
}

.search-bar-input:focus {
    border-color: var(--accent);
}

.search-bar-btn {
    padding: 10px 18px;
    border-radius: 0 6px 6px 0;
    background: var(--accent);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.search-bar-btn:hover {
    background: #e5d4a8;
}

.header-lbc-leboncoin .header-actions-lbc {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

.header-action-icon {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--primary);
    transition: color 0.2s;
    background: none;
    border: none;
    cursor: pointer;
}

.header-action-icon:hover {
    color: var(--accent);
}

.header-action-favoris { color: #385d69 !important; }
.header-action-suggestion { color: #3498db; }
.header-action-messages { position: relative; }

.header-action-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #e74c3c;
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 12px;
}

.btn-lbc-annonce {
    background: var(--accent) !important;
    color: #fff !important;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-lbc-annonce:hover {
    background: #e65100 !important;
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 111, 0, 0.4);
}

/* Menu utilisateur */
.user-menu-container {
    position: relative;
    z-index: 99999; /* Ensure dropdown appears above navigation */
}

.user-menu-btn {
    background: rgba(44, 62, 80, 0.1);
    border: 1px solid rgba(44, 62, 80, 0.2);
    cursor: pointer;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    transition: all 0.2s;
}

.user-menu-btn:hover {
    background: rgba(44, 62, 80, 0.15);
    border-color: rgba(44, 62, 80, 0.3);
    transform: translateY(-1px);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: #ffffff !important; /* fond plein pour la lisibilité */
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(44,62,80,0.13);
    min-width: 180px;
    padding: 10px 0;
    z-index: 99999;
    visibility: hidden;
    opacity: 0;
    transition: opacity .15s ease;
    border: 1px solid var(--primary-dark);
    color: #e6e6e6; /* couleur de texte par défaut lisible */
}

.user-dropdown.show {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.user-dropdown a {
    display: block;
    padding: 10px 22px;
    color: var(--primary-dark) !important; /* forcer la lisibilité dans header sombre */
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: background 0.2s;
}

.user-dropdown a:hover {
    background: #f8f9fa;
    color: var(--accent);
}

/* ===== NAVIGATION PRINCIPALE ===== */
.main-nav {
    background: var(--primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* ===== Ajustements spacing page Acheter (voir bloc Acheter plus bas) ===== */

.nav-container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 16px 20px;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 2px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,111,0,0.1);
    color: var(--accent);
}

/* ===== BREADCRUMB ===== */
.breadcrumb-wrapper {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.breadcrumb {
    list-style: none;
    margin: var(--space-md) 0;
    padding: 0;
}

.breadcrumb ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    padding: 0 8px;
}

.breadcrumb a {
    text-decoration: none;
    color: inherit;
}

/* ===== CARDS & LISTINGS ===== */
.category-card {
    border: 2px solid var(--primary);
    background: #fff;
    color: var(--primary);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 14px 16px;
    min-width: 120px;
    text-align: center;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .98rem;
}

.category-card:hover {
    box-shadow: 0 4px 16px rgba(56,94,107,0.12);
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

.brand-card {
    background: #fafbfc;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(52,152,219,0.06);
    padding: 18px 32px;
    min-width: 120px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.brand-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(52,152,219,0.12);
}

/* Famille cartes annonce : .listing-card, .listing-card-acheter (acheter.css), .favori-card */
.listing-card {
    background: #fff;
    border-radius: var(--card-radius);
    box-shadow: var(--card-shadow);
    border: var(--card-border);
    padding: 0 0 var(--space-md) 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: var(--transition-fast);
}

.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.listing-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
}

.listing-card-content {
    padding: 12px 16px 0 16px;
    width: 100%;
}

.listing-card-title {
    font-weight: 600;
    font-size: 1.08rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.listing-card-price {
    color: var(--primary);
    font-weight: 700;
    margin-top: 4px;
    font-size: 1.2rem;
}

/* ===== SECTIONS ===== */
.welcome-message {
    text-align: center;
    margin: 28px auto 18px auto;
    font-size: 1.25rem;
    color: var(--primary-dark);
    font-weight: 500;
    max-width: 700px;
    padding: 0 20px;
}

.welcome-message h1 {
    font-size: 1.7rem;
    margin-bottom: 0.3em;
    font-weight: 700;
}

.section-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
    color: #23272b;
    font-weight: 700;
}

.categories { padding: 32px 0; background: #fff; display:flex; flex-wrap:wrap; justify-content:center; gap:12px; }

.categories-grid { display:flex; flex-wrap:wrap; gap:12px; justify-content:center; align-items:center; }

.latest-listings {
    padding: 60px 0;
    background: #f8f9fa;
}

.brands-most-viewed {
    padding: 60px 0;
    background: #fff;
}

.latest-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 28px;
}

.brands-list {
    display: flex;
    flex-wrap: nowrap; /* une seule ligne sur desktop */
    gap: 16px;
    justify-content: center;
    align-items: center;
}

.brand-logo { height: 36px; max-width: 80px; margin-bottom: 8px; object-fit: contain; }
.brand-card { padding: 12px 18px; min-width: 110px; }
.brand-card img { height: 36px; max-width: 90px; }

@media (max-width: 900px) {
  .brands-list { flex-wrap: wrap; gap: 20px; }
  .brand-card { min-width: 120px; }
  .brand-card img { height: 42px; }
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* ===== FILTRES CENTRALE ===== */
.filtres-layout-flex {
    display: grid;
    grid-template-columns: minmax(320px, 420px) 1fr 1fr;
    gap: 20px;
    margin: 0 auto 16px auto;
    max-width: 1200px;
    width: 100%;
    align-items: start;
    background: #faf8f6;
    border-radius: 18px;
    padding: 32px 20px 24px 20px;
}

.sidebar-filtres-centrale {
    grid-column: 1;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(44,62,80,0.10);
    padding: 32px 24px 24px 24px;
    margin-bottom: 0;
    border: 1px solid #fff;
}

.type-selector-centrale {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 20px;
    justify-content: space-between;
}

.type-button-centrale {
    flex: 1 1 90px;
    padding: 12px 0 8px 0;
    background: var(--accent);
    border: 1.5px solid var(--primary);
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
    color: #23272b;
    font-size: 1.05rem;
    transition: background 0.2s, color 0.2s, border 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.type-button-centrale.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(56,94,107,0.10);
}

.type-button-centrale:not(.active):hover {
    background: #e3f0fa;
    color: var(--primary);
    border-color: var(--primary);
}

.type-button-centrale svg {
    width: 28px;
    height: 28px;
    margin-bottom: 4px;
    color: inherit;
}

.filter-group-centrale {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-field-centrale {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
    position: relative;
}

.filter-field-centrale label {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 1rem;
    margin-bottom: 2px;
}

.filter-field-centrale select,
.filter-field-centrale input {
    padding: 10px 12px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    transition: border 0.2s, box-shadow 0.2s;
    outline: none;
}

.filter-field-centrale select:focus,
.filter-field-centrale input:focus {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(56,94,107,0.08);
}

.search-button-centrale {
    padding: 14px 0;
    background: var(--accent);
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.08rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    margin-top: 8px;
    box-shadow: 0 2px 8px rgba(56,94,107,0.08);
}

.search-button-centrale:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(56,94,107,0.12);
}

#type-display-image {
    grid-column: 2;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    align-self: center;
}

.content-filtres-centrale {
    grid-column: 3;
}

@media (max-width: 1024px) {
    .filtres-layout-flex {
        grid-template-columns: 1fr;
    }
    .sidebar-filtres-centrale,
    #type-display-image,
    .content-filtres-centrale {
        grid-column: 1;
    }
    #type-display-image {
        max-height: 300px;
    }
}

.suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(44,62,80,0.10);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}

.suggestions-list.visible {
    display: block;
}

.suggestions-list .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}

.suggestions-list .suggestion-item:hover {
    background: #f8f9fa;
}

.suggestions-list .suggestion-item:last-child {
    border-bottom: none;
}

/* Liste suggestions marques (autocomplete) */
.marque-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(44,62,80,0.10);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}
.marque-suggestions-list.marque-suggestions-visible {
    display: block;
}
.marque-suggestions-list .marque-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.marque-suggestions-list .marque-suggestion-item:hover {
    background: #f8f9fa;
}
.marque-suggestions-list .marque-suggestion-item:last-child {
    border-bottom: none;
}

/* Liste suggestions univers (autocomplete) */
.univers-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(44,62,80,0.10);
    z-index: 1000;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}
.univers-suggestions-list.univers-suggestions-visible {
    display: block;
}
.univers-suggestions-list .univers-suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s;
}
.univers-suggestions-list .univers-suggestion-item:hover {
    background: #f8f9fa;
}
.univers-suggestions-list .univers-suggestion-item:last-child {
    border-bottom: none;
}

.filter-group-acheter,
.filter-field-centrale,
.depot-autocomplete-wrap {
    position: relative;
}

/* ===== DROPDOWN NAVIGATION ===== */
.nav-item.has-dropdown {
    position: relative;
}

.nav-item.has-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    background: #fff;
    min-width: 180px;
    box-shadow: 0 4px 16px rgba(44,62,80,0.10);
    border-radius: 0 0 10px 10px;
    z-index: 2000;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s;
}

.nav-item.has-dropdown:hover .dropdown-menu,
.nav-item.has-dropdown:focus-within .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 10px 24px;
    color: #23272b;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.15s;
    background: none;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f2f2f2;
    color: var(--accent);
}

.main-nav, .nav-container, .nav-menu, .nav-item, .nav-link {
    overflow: visible !important;
}

/* ===== SEARCH SUGGESTIONS ===== */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d1d5db;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}
.search-suggestions.is-visible {
    display: block;
}

.search-suggestion-item {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background 0.15s;
}

.search-suggestion-item:hover {
    background: #f8f9fa;
}

.search-suggestion-item.active {
    background: #e3f0fa;
}

.search-suggestion-item:last-child {
    border-bottom: none;
}

.search-suggestion-icon {
    color: #666;
    font-size: 14px;
}

.search-suggestion-text {
    color: #333;
    font-size: 14px;
}

.search-suggestion-type {
    color: #888;
    font-size: 12px;
    margin-left: auto;
}

/* ===== FOOTER ===== */
.footer-lbc-modern {
    background: #23272b;
    color: #fff;
    padding: 24px 0 8px 0; /* compacter le bas */
}

.footer-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
}

.footer-lbc-modern h4 {
    color: #fff;
    font-size: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.footer-lbc-modern ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-lbc-modern ul li {
    margin-bottom: 8px;
}

.footer-lbc-modern a {
    color: #b0b3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-lbc-modern a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding: 10px 0; /* compacter le bas */
    font-size: 14px;
    color: #6c757d;
    text-align: center;
    background: #1a1a1a;
    border-top: 1px solid #353a40;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials .social-icon {
    font-size: 20px;
    transition: transform 0.2s;
}

.footer-socials .social-icon:hover {
    transform: scale(1.1);
}

/* Logo footer : même taille que le header (.logo-img = 56px) - priorité sur .responsive-img */
.footer-lbc-modern .footer-logo img,
.footer-lbc-modern .footer-logo .responsive-img {
    height: 56px !important;
    max-width: 120px !important;
    width: auto !important;
    border-radius: 8px;
    object-fit: contain;
}
.footer-logo-img {
    height: 56px;
    max-width: 120px;
    width: auto;
    border-radius: 8px;
    background: rgba(255,255,255,0.5);
    box-shadow: 0 2px 8px rgba(44,62,80,0.10);
    filter: drop-shadow(0 2px 8px rgba(44,62,80,0.08));
}

/* ===== USER MENU STYLES ===== */
.user-info-dropdown {
    padding: 10px 24px;
    border-bottom: 1px solid #eee;
    font-weight: 600;
    color: var(--accent);
    font-size: 14px;
}

.dropdown-divider {
    height: 1px;
    background: #eee;
    margin: 8px 0;
}

.logout-link {
    color: #e74c3c !important;
}

.logout-link:hover {
    background: #fff5f5 !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .header-lbc-leboncoin .header-content-lbc {
        flex-direction: column;
        gap: 16px;
        padding: 16px 20px;
    }
    
    .search-bar-input {
        width: 300px;
    }
    
    .header-lbc-leboncoin .header-actions-lbc {
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu {
        flex-direction: column;
        align-items: stretch;
    }
    
    .nav-link {
        text-align: center;
        margin: 2px 0;
    }
    
    .footer-flex {
        flex-direction: column;
        gap: 24px;
    }
    
    .brands-list {
        gap: 20px;
    }
    
    .latest-listings-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .search-bar-input {
        width: 250px;
    }
    
    .category-card,
    .brand-card {
        padding: 16px 20px;
        min-width: 120px;
    }
    
    .latest-listings-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .footer-flex > div {
        text-align: center;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

/* ===== INDEX PAGE ===== */
.logo {
    max-width: 300px;
    width: 100%;
    height: auto;
    animation: fade-in 2s ease-in-out;
}

.tagline {
    margin-top: 0.5rem;
    color: #555;
}

/* ===== ACCESSIBILITÉ ===== */
*:focus {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== SCROLLBAR PERSONNALISÉE ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) #f1f1f1;
}

/* ===== SÉLECTION DE TEXTE ===== */
::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ===== CORRECTIONS FINALES ===== */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

/* Header et nav ne rétrécissent pas dans le flex body - doublon supprimé, voir bloc Layout Flexbox en tête de fichier */

/* main prend au moins la hauteur de son contenu, et s’étend pour coller le footer en bas */
/* Protection overflow */
.container,
.listing-card-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* =============================================================
   RETOUCHES VISUELLES MODERNES (pages: Acheter, Bibliothèque,
   Vendre, Demande d'estimation, Événements, Communauté, Favoris)
   ============================================================= */

/* ----- Acheter (filtres à gauche + grille) – centrage type leboncoin ----- */
.acheter-layout-flex {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    max-width: var(--content-max, 1200px);
    margin: 24px auto 32px auto;
    padding: 0 var(--space-md, 24px);
    align-items: start;
}

.filters-section-acheter {
    background: #ffffff;
    border: 1px solid #eef0f2;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(44,62,80,0.06);
    padding: 20px 16px;
    position: sticky;
    top: 92px;
    height: fit-content;
    min-width: 0;
}
.filters-title-acheter {
    font-size: 1.15rem;
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-weight: 700;
}
.filters-form-acheter .filter-group-acheter {
    display: flex;
    flex-direction: column;
    gap: 6px;
    position: relative;
    margin-bottom: 12px;
}
.filter-group-acheter-label { font-weight: 600; color: var(--primary-dark); font-size: 0.9rem; }
.filter-group-acheter-select, .filter-group-acheter-input {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 10px 12px;
    transition: border-color .2s, box-shadow .2s;
}
.filter-select-search {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    width: 100%;
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.filter-select-search:focus {
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(56,94,107,0.10);
    outline: none;
}
.filter-group-acheter-select:focus, .filter-group-acheter-input:focus {
    border-color: var(--primary);
    box-shadow: 0 2px 10px rgba(56,94,107,0.10);
    outline: none;
}
.filter-group-acheter-select-disabled { opacity: .6; cursor: not-allowed; }
.filter-button-acheter {
    display: inline-block;
    width: 100%;
    margin-top: 10px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, box-shadow .2s, background .2s;
}
.filter-button-acheter:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(56,94,107,0.18); background:#2f4e59; }

.bibliotheque-section-acheter {
    min-width: 0;
}
.bibliotheque-section-acheter .container-acheter {
    padding-top: 0;
}
.acheter-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}
.acheter-page-intro {
    color: #6b7280;
    font-size: 1rem;
    margin: 0 0 24px 0;
}
.bibliotheque-section-acheter .results-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 16px 0;
}
.statues-grid-acheter, .statues-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: var(--grid-gutter); }
.pagination-acheter, .pagination { display: flex; gap: 10px; justify-content: center; margin-top: 18px; }
.pagination-acheter .page, .pagination .page {
    background: #fff; border: 1px solid #eaecef; border-radius: 8px; padding: 8px 12px; color:var(--primary); text-decoration:none;
}
.pagination-acheter .page.active, .pagination .page.active { background:var(--primary); color:#fff; border-color:var(--primary); }

/* ----- Bibliothèque (catalogue filters) ----- */
.catalogue-layout { display:grid; grid-template-columns: 300px 1fr; gap: 24px; max-width: 1200px; margin: 16px auto 32px auto; padding: 0 20px; }
.filters-section {
    background:#fff; border:1px solid #eef0f2; border-radius:14px; box-shadow:0 6px 20px rgba(44,62,80,0.06);
    padding:18px 16px; position:sticky; top:92px; height: fit-content;
}
.filters-title { font-size:1.2rem; font-weight:700; color:var(--primary-dark); margin-bottom:10px; }
.filters-form .filter-group { display:flex; flex-direction:column; gap:6px; margin-bottom:12px; }
.filters-form select { border:1px solid #e5e7eb; border-radius:8px; padding:10px 12px; background:#fff; }
.filters-form select:focus { border-color:var(--primary); box-shadow:0 2px 10px rgba(56,94,107,0.10); outline:none; }
.catalogue-section .statues-grid.tsume-style { gap: 24px; }

/* ----- Vendre (guide) ----- */
.vendre-guide-section { padding: 42px 0 24px 0; background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%); }
.vendre-guide-section h1 { font-size: 1.9rem; color:var(--primary-dark); text-align:center; margin-bottom: 14px; }
.guide-intro { max-width: 920px; margin: 0 auto 20px auto; color:#445; line-height:1.8; text-align:center; }
.guide-intro .highlight { background: #fff3e0; color:#8a4b00; padding: 2px 6px; border-radius:6px; }
.filters-essentials-section { max-width: 1000px; margin: 18px auto; background:#fff; border:1px solid #eef0f2; border-radius:14px; box-shadow:0 6px 18px rgba(44,62,80,0.06); padding: 18px 20px; }
.filters-essentials-section h2 { font-size:1.35rem; color:var(--primary-dark); margin-bottom:6px; }
.filters-essentials-section .subtitle { color:#6c7380; margin-bottom:10px; }
.selling-steps { display:grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 16px; max-width: 1000px; margin: 18px auto; }
.step-card { background:#fff; border:1px solid #eef0f2; border-radius:14px; padding:18px; text-align:center; box-shadow:0 6px 18px rgba(44,62,80,0.06); }
.step-card .emoji { font-size: 28px; display:inline-block; margin-bottom:8px; }
.instructions-list { max-width: 920px; margin: 8px auto 14px auto; padding-left: 18px; color:var(--primary-dark); }
.deposit-button-container { text-align:center; margin-bottom: 12px; }
.faq-section { max-width: 920px; margin: 0 auto; background:#fff; border:1px solid #eef0f2; border-radius:14px; box-shadow:0 6px 18px rgba(44,62,80,0.06); padding: 16px 20px; }

/* ----- Demande d'estimation ----- */
.demande-estimation-container { max-width: 1100px; margin: 20px auto 32px auto; padding: 0 20px; }
.estimation-hero-card { display:flex; gap:16px; background: linear-gradient(135deg, #eaf3f6 0%, #ffffff 100%); border:1px solid #e6eef2; border-radius:16px; padding:18px; box-shadow:0 8px 24px rgba(56,94,107,0.10); }
.estimation-hero-icon { font-size: 34px; }
.estimation-hero-title { font-size: 1.8rem; color:var(--primary-dark); margin-bottom: 6px; }
.estimation-hero-subtitle { color:#4b5563; }
.estimation-tips-card {
  margin-top: 12px;
  background: #fff;
  border: 1px dashed #cfd8dc;
  border-radius: 12px;
  padding: 16px 18px;
  box-sizing: border-box;
  max-width: 100%;
  overflow: hidden;
}
.estimation-tips-title {
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 12px 0;
  font-size: 1rem;
}
.estimation-tips-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #374151;
  font-size: 0.9375rem;
}
.estimation-tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow-wrap: break-word;
  min-width: 0;
}
.estimation-tips-list .tip-icon {
  flex-shrink: 0;
  margin-right: 0;
}

.estimation-table-wrapper { margin-top: 18px; }
.form-container { background:#fff; border:1px solid #eef0f2; border-radius:14px; box-shadow:0 8px 24px rgba(44,62,80,0.06); padding: 12px; }
.estimation-table { width:100%; border-collapse: separate; border-spacing: 0 10px; }
.estimation-table .table-section-title { text-align:left; background:#f6fafb; color:var(--primary-dark); padding:10px 12px; border-radius:10px; font-weight:700; }
.table-label { width: 260px; vertical-align: top; color:#374151; padding: 6px 10px; }
.form-input, .form-select, .form-textarea { width:100%; border:1px solid #e5e7eb; border-radius:12px; padding:12px; background:#fff; transition: border-color .2s, box-shadow .2s; }
.form-textarea { min-height: 110px; resize: vertical; }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline:none; border-color:#0ea5e9; box-shadow:0 0 0 2px rgba(14,165,233,0.25); }

/* Autocomplétion ville (dépôt annonce) */
.ville-input-wrap { position: relative; }
.ville-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  display: none;
}
.ville-suggestions.ville-suggestions--visible { display: block; }
.ville-suggestion-item {
  padding: 10px 12px;
  font-size: 0.95rem;
  color: var(--primary-dark);
  cursor: pointer;
  transition: background 0.15s;
}
.ville-suggestion-item:hover { background: var(--accent); }
.ville-suggestion-item:not(:last-child) { border-bottom: 1px solid #f0f0f0; }

.help-text { font-size: .9rem; color:#6b7280; margin-top: 4px; }
.form-hint { font-size: 0.875rem; color: #6b7280; margin-top: 6px; }

/* Options livraison (dépôt annonce) : une seule option cochable */
.livraison-options { display: flex; flex-direction: column; gap: 10px; }
.livraison-option { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 12px; border-radius: 10px; border: 1px solid #e5e7eb; background: #fafbfc; transition: border-color .2s, background .2s; }
.livraison-option:hover { background: #f6fafb; border-color: #c5d9e0; }
.livraison-option:has(.livraison-radio:checked) { border-color: var(--primary); background: #f0f7f8; }
.livraison-radio { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.livraison-option-label { font-size: 0.9375rem; color: var(--primary-dark); }

.image-upload { border:2px dashed #cfd8dc; border-radius:12px; padding: 16px; text-align:center; background:#fbfdff; }
.upload-btn { display:inline-block; background:var(--primary); color:#fff; border:none; padding:10px 14px; border-radius:8px; cursor:pointer; font-weight:600; text-decoration:none; }
.upload-btn:hover { background:#2f4e59; color:#fff; }
/* Input file caché visuellement mais déclenché par le label (évite display:none qui bloque l’ouverture du sélecteur) */
/* Input file entièrement caché : seul le label "Ajouter des photos" reste visible et ouvre le sélecteur */
.input-file-hidden {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.image-upload .upload-btn { cursor: pointer; }
.image-preview { display:grid; grid-template-columns: repeat(auto-fit,minmax(120px,1fr)); gap:10px; margin-top:10px; }
.image-upload.is-dragover { border-color: var(--primary); background: #f0f7f8; }
.image-preview-item { background:#fff; border:1px solid #e5e7eb; border-radius:10px; padding:8px; display:flex; flex-direction:column; gap:6px; }
.image-preview-item img { width:100%; height:100px; object-fit:cover; border-radius:8px; border:1px solid #f1f5f9; }
.image-preview-meta { font-size:0.78rem; color:#475569; word-break:break-word; }
.image-preview-item { position: relative; }
.image-preview-remove { position:absolute; top:6px; right:6px; z-index:10; width:24px; height:24px; border:1px solid rgba(255,255,255,.9); border-radius:999px; background:rgba(17,24,39,.72); color:#fff; font-size:18px; line-height:24px; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.image-preview-remove:hover { background:rgba(185,28,28,.9); }

.submit-section { display:flex; gap:12px; justify-content:flex-end; }
.btn-cancel { background:#f1f5f9; color:var(--primary-dark); border:1px solid var(--border-light); padding:10px 14px; border-radius:8px; cursor:pointer; }
.btn-submit { background:var(--accent); color:#fff; border:none; padding:10px 16px; border-radius:8px; cursor:pointer; font-weight:700; }
.btn-submit:hover { background:#e5d4a8; }

/* ----- Événements (cartes) ----- */
.latest-listings-title { font-size:1.5rem; font-weight:700; color:#23272b; text-align:center; margin-bottom: 16px; }

/* ----- Hero commun Support & Communauté (cohérence visuelle) ----- */
.support-hero,
.communaute-page .communaute-hero {
  background: linear-gradient(160deg, rgba(44, 62, 80, 0.96) 0%, rgba(56, 94, 107, 0.92) 100%);
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
  color: #fff;
}
.support-hero-inner,
.communaute-page .communaute-hero-inner {
  max-width: 720px;
  margin: 0 auto;
}
.support-hero h1,
.communaute-page .communaute-hero h1 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.5rem;
  color: #fff;
}
.support-hero .support-lead,
.communaute-page .communaute-hero .communaute-lead {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  line-height: 1.5;
}

/* ----- Communauté (page communaute.php) ----- */
.communaute-page { display: block; width: 100%; }
.communaute-page .communaute-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.communaute-page .communaute-category-card {
  background: #fff;
  border: 2px solid var(--primary, var(--primary));
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  color: var(--primary, var(--primary));
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.communaute-page .communaute-category-card:hover {
  background: var(--primary, var(--primary));
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(56, 94, 107, 0.2);
}
.communaute-page .communaute-category-card span[aria-hidden="true"] {
  display: block;
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.communaute-page .communaute-construction {
  font-size: 0.875rem;
  font-weight: 400;
  color: #6b7280;
  margin-top: 0.5rem;
}
.communaute-page .communaute-section {
  padding: 2rem 1.5rem 2.5rem;
  background: var(--light-gray, #f8f9fa);
}
.communaute-page .communaute-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.communaute-page .communaute-section-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--primary-dark, var(--primary-dark));
  margin: 40px 0 20px;
  text-align: left;
  border-left: 5px solid var(--accent, var(--accent));
  padding-left: 15px;
}
.communaute-page .communaute-activities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.communaute-page .communaute-activity-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(44, 62, 80, 0.08);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.communaute-page .communaute-activity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(44, 62, 80, 0.1);
}
.communaute-page .communaute-activity-card picture {
  flex-shrink: 0;
}
.communaute-page .communaute-activity-card picture img {
  width: 50px;
  height: 50px;
  border-radius: var(--border-radius-sm, 8px);
  object-fit: cover;
  flex-shrink: 0;
  display: block;
}
.communaute-page .communaute-activity-card-body {
  padding: 1rem 1.25rem 1rem 0;
  min-width: 0;
}
.communaute-page .communaute-activity-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary-dark, var(--primary-dark));
  margin: 0 0 0.25rem;
}
.communaute-page .communaute-activity-meta {
  font-size: 0.875rem;
  color: var(--primary, var(--primary));
  font-weight: 500;
}
.communaute-page .communaute-groups-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}
.communaute-page .communaute-group-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(44, 62, 80, 0.08);
  box-shadow: 0 4px 16px rgba(44, 62, 80, 0.06);
  transition: transform 0.2s ease;
  text-align: center;
}
.communaute-page .communaute-group-card:hover { transform: translateY(-2px); }
.communaute-page .communaute-group-card picture,
.communaute-page .communaute-group-card img {
  display: block;
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.communaute-page .communaute-group-card .communaute-group-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-dark, var(--primary-dark));
  padding: 0.75rem;
  margin: 0;
}
@media (max-width: 640px) {
  .communaute-page .communaute-activities-grid { grid-template-columns: 1fr; }
}

/* ----- Communauté: tabs au lieu de pastilles ----- */
.tabs-communaute { max-width: 1000px; margin: 16px auto; padding: 0 20px; }
.tabs-communaute .tab-list { display:flex; gap:8px; justify-content:center; background:#fff; border:1px solid #eef0f2; border-radius:12px; padding:6px; box-shadow:0 6px 18px rgba(44,62,80,0.06); }
.tabs-communaute .tab-button {
  flex:0 0 auto; text-align:center; min-width:120px; background:#f6fafb; border:none; border-radius:10px; padding:10px 12px; cursor:pointer; font-weight:700; color:var(--primary); transition: all .2s;
}
.tabs-communaute .tab-button:hover { background:#eaf3f6; }
.tabs-communaute .tab-button.active { background:var(--primary); color:#fff; box-shadow:0 8px 20px rgba(56,94,107,0.18); }
.tab-panels { margin-top: 14px; display:flex; justify-content:center; }
.tab-panels .tab-panel { width: 100%; max-width: 1000px; }
.tab-panel { display:none; }
.tab-panel.active { display:block; }

/* Hover info sur catégories en construction */
.construction-info { position: relative; }
.construction-info .construction-box { position:absolute; left:50%; transform:translateX(-50%); bottom:-44px; white-space:nowrap; background:var(--primary-dark); color:#fff; padding:6px 10px; border-radius:8px; font-size:.9rem; display:none; box-shadow:0 8px 18px rgba(44,62,80,0.18); }
.construction-info:hover .construction-box { display:block; }

/* ----- Favoris ----- */
.favoris-header { text-align:center; padding: 18px 0 8px 0; }
.favoris-header h1 { font-size:1.8rem; color:var(--primary-dark); }
.subtitle { color:#6c7380; }
.favoris-container { max-width: 1100px; margin: 0 auto 24px auto; padding: 0 20px; }
.loading-message { display:flex; flex-direction:column; align-items:center; gap:10px; padding: 30px 0; color:#4b5563; }
.loading-spinner { width:30px; height:30px; border:4px solid #e5e7eb; border-top-color:var(--primary); border-radius:50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg);} }
.favoris-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 18px; }
.favori-card { background:#fff; border:var(--card-border); border-radius:var(--card-radius); box-shadow:var(--card-shadow); overflow:hidden; transition:var(--transition-fast); }
.favori-card:hover { box-shadow:var(--card-shadow-hover); }
.favori-type { position:absolute; margin:var(--space-sm); background:var(--primary); color:#fff; padding:var(--space-xs) var(--space-sm); border-radius:999px; font-size:.85rem; }
.favori-image { width:100%; height:160px; object-fit:cover; display:block; }
.favori-content { padding: var(--space-md) 14px; }
.favori-title { font-weight:700; color:var(--primary-dark); font-family:var(--font-heading); }
.favori-price { color:var(--primary); font-weight:700; margin-top:2px; }
.favori-location { color:#6b7280; font-size:.95rem; margin-top:4px; }
.favori-actions { display:flex; justify-content:space-between; align-items:center; gap:8px; margin-top:10px; }
.btn-voir { background:var(--primary); color:#fff; text-decoration:none; padding:8px 12px; border-radius:8px; font-weight:600; }
.btn-supprimer { background:#fff0f0; color:#e74c3c; border:1px solid #f8d7da; padding:8px 12px; border-radius:8px; cursor:pointer; }

/* ----- Auth (Connexion / Inscription) ----- */
.auth-page { padding: 32px 0 24px 0; }
.auth-grid { max-width: 900px; margin: 0 auto; display:grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 0 20px; }
.auth-card { background:#fff; border:1px solid #eef0f2; border-radius:14px; box-shadow:0 6px 18px rgba(44,62,80,0.06); padding:18px; }
.auth-card .card-title { font-weight:800; color:var(--primary-dark); margin-bottom:10px; }
.auth-form .form-group { margin-bottom: 12px; }
.auth-form label { display:block; font-weight:600; color:var(--primary-dark); margin-bottom:6px; }
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] { width:100%; border:1px solid #e5e7eb; border-radius:10px; padding:12px 14px; font-size:1rem; transition: border-color .2s, box-shadow .2s; }
.auth-form input:focus { border-color:var(--primary); box-shadow:0 2px 10px rgba(56,94,107,0.10); outline:none; }
.auth-actions { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top: 6px; }
.link-muted { color:#6b7280; text-decoration:none; }
.link-muted:hover { color:var(--primary); text-decoration:underline; }
.btn-primary { background:var(--accent); color:#fff; border:none; padding:10px 16px; border-radius:10px; font-weight:700; cursor:pointer; }
.btn-primary:hover { background:#e5d4a8; }
.btn-outline { background:#f6fafb; color:var(--primary); border:1px solid #dce4ea; padding:10px 14px; border-radius:10px; font-weight:700; cursor:pointer; }
.btn-outline:hover { background:#eaf3f6; }
.oauth-button { display:inline-block; background:#1f2937; color:#fff; border:none; padding:10px 14px; border-radius:10px; font-weight:600; text-decoration:none; cursor:pointer; }

@media (max-width: 800px) {
  .auth-grid { grid-template-columns: 1fr; }
}

/* Mon espace – formulaire de connexion (quand non connecté) */
.modern-auth-container {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: #f8f9fa;
}
.modern-auth-container .auth-card {
  max-width: 420px;
  width: 100%;
  padding: 32px;
}
.modern-auth-container .auth-header { text-align: center; margin-bottom: 24px; }
.modern-auth-container .auth-header h1 { font-size: 24px; font-weight: 800; color: var(--primary-dark); margin: 0 0 8px 0; }
.modern-auth-container .auth-header p { margin: 0; color: #6b7280; font-size: 15px; }
.modern-auth-container .modern-form { display: flex; flex-direction: column; gap: 18px; }
.modern-auth-container .form-group { position: relative; margin: 0; }
.modern-auth-container .form-group label { display: block; font-weight: 600; color: #374151; margin-bottom: 6px; font-size: 14px; }
.modern-auth-container .form-group input { width: 100%; padding: 12px 40px 12px 14px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 1rem; box-sizing: border-box; }
.modern-auth-container .form-group input:focus { border-color: var(--accent); outline: none; }
.modern-auth-container .input-icon { position: absolute; right: 14px; bottom: 12px; color: #9ca3af; font-size: 16px; }
.modern-auth-container .checkbox-label { display: flex !important; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.modern-auth-container .checkbox-label input { width: auto !important; }
.modern-auth-container .checkmark { width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 4px; }
.modern-auth-container .checkbox-label input:checked + .checkmark { background: var(--accent); border-color: var(--accent); }
.modern-auth-container .checkbox-label input:checked + .checkmark::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: var(--primary-dark); font-size: 12px; font-weight: bold; }
.modern-auth-container .checkmark { position: relative; }
.modern-auth-container .modern-btn.primary { background: var(--accent); color: var(--primary-dark); border: none; padding: 14px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: space-between; }
.modern-auth-container .modern-btn.primary:hover { background: #e5d4a8; }
.modern-auth-container .auth-footer { text-align: center; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee; }
.modern-auth-container .auth-footer a { color: var(--primary); font-weight: 600; }

@media (max-width: 768px) {
  .modern-auth-container {
    padding-bottom: calc(80px + env(safe-area-inset-bottom));
    min-height: 50vh;
  }
  .modern-auth-container .modern-btn.primary {
    min-height: 48px;
    font-size: 1rem;
  }
}

/* ===== TOAST (feedback après action) ===== */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  pointer-events: none;
}
.toast {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius);
  font-size: 0.9375rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  max-width: 90vw;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast--visible {
  opacity: 1;
  transform: translateY(0);
}
.toast--success { background: var(--success); color: #fff; }
.toast--error { background: var(--danger); color: #fff; }
.toast--info { background: var(--primary); color: #fff; }

/* ===== EMPTY STATE ENRICHI (Acheter / Résultats) ===== */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
  border-radius: var(--card-radius);
  border: 1px dashed var(--border-light);
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: 0.8;
}
.empty-state-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--space-sm);
}
.empty-state-text {
  color: #64748b;
  font-size: 1rem;
  margin-bottom: var(--space-lg);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}
.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
  align-items: center;
}
.empty-state-actions a,
.empty-state-actions .btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-fast);
}
.empty-state-actions a.primary,
.empty-state-actions .btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
}
.empty-state-actions a.secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

/* ===== SKELETON CARDS (chargement grille) ===== */
.listing-card-skeleton {
  background: #fff;
  border-radius: var(--card-radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
}
.listing-card-skeleton__image {
  aspect-ratio: 1;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
}
.listing-card-skeleton__content {
  padding: 1.25rem 1.35rem;
}
.listing-card-skeleton__line {
  height: 14px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e5e7eb 25%, #f3f4f6 50%, #e5e7eb 75%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.2s ease-in-out infinite;
  margin-bottom: 8px;
}
.listing-card-skeleton__line:last-child {
  width: 40%;
  margin-bottom: 0;
}
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ===== ALERT (messages d'erreur explicites) ===== */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--border-radius-sm);
  margin-bottom: var(--space-md);
  font-size: 0.9375rem;
}
.alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}
.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.field-error {
  display: block;
  font-size: 0.875rem;
  color: var(--danger);
  margin-top: var(--space-xs);
}
.field-error:empty { display: none; }

/* ===== SIGNAUX DE CONFIANCE (badges) ===== */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}
.trust-badges--compact {
  gap: var(--space-xs);
  margin-top: var(--space-sm);
}
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8125rem;
  color: var(--primary-dark);
  font-weight: 500;
}

/* ===== IMAGES CARTES (ratio 1:1, placeholder cohérent) ===== */
.listing-card-acheter-image,
.listing-card-acheter .listing-card-acheter-image {
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}
.listing-card-acheter-placeholder {
  width: 100%;
  height: 100%;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  font-size: 0.875rem;
  background: linear-gradient(145deg, #f8fafc 0%, #f1f5f9 100%);
}
.listing-card-acheter-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== MOBILE FIRST (tap targets min 44px, lisibilité) ===== */
@media (max-width: 768px) {
  .btn,
  .annonce-detail-btn,
  .filter-button-acheter,
  .acheter-filters-toggle-btn,
  .btn-primary,
  .btn-outline,
  .empty-state-actions .btn,
  .empty-state-actions a.primary,
  .empty-state-actions a.secondary {
    min-height: 44px;
    padding: 12px 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .annonce-detail-btn-icon,
  .listing-card-favori,
  .acheter-filter-chip-remove,
  button[aria-label] {
    min-width: 44px;
    min-height: 44px;
  }
  .listing-card-acheter-price,
  .favori-price,
  .checkout-product-price {
    font-size: 1.125rem;
    font-weight: 700;
  }
}

/* Focus visible – priorité sur outline:none (niveau AA) */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible,
.filters-form select:focus-visible,
.auth-form input:focus-visible,
.filter-group-acheter-input:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 0;
}
button:focus-visible,
.btn:focus-visible,
.filter-button-acheter:focus-visible,
.tab-button:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ----- Responsive tweaks ----- */
@media (max-width: 960px) {
  .acheter-layout-flex, .catalogue-layout { grid-template-columns: 1fr; }
  .filters-section-acheter, .filters-section { position: static; }
}
