/* ========================================
   VARIABLES DE COULEURS TEDPLAS
   ======================================== */
:root {
    --primary-orange: #F66B0E;
    --primary-orange-hover: #E55A00;
    --primary-orange-light: #FF7A1F;
    --text-dark: #212121;
    --text-secondary: #757575;
    --text-light: #9E9E9E;
    --bg-cream: #FFF8F1;
    --bg-white: #FFFFFF;
    --bg-light-gray: #F5F5F5;
    --bg-dark: #1A1A1A;
    --border-color: #E0E0E0;
    --shadow-light: rgba(0, 0, 0, 0.05);
    --shadow-medium: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.15);
    --condition-new: #4CAF50;
    --condition-like-new: #8BC34A;
    --condition-good: #2196F3;
    --condition-fair: #FF9800;
    --condition-poor: #F44336;
    --verified-color: #1DA1F2;
    --header-height: 70px;
    --transition-speed: 0.3s;
    --card-radius: 16px;
}

/* ========================================
   RESET ET BASE
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', 'Lato', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-cream);
    padding-top: var(--header-height);
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

.no-scroll {
    overflow: hidden;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* ========================================
   BOUTON VENDRE FLOTTANT
   ======================================== */
.sell-floating-btn {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: white;
    padding: 16px 26px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.3px;
    box-shadow: 0 6px 24px rgba(246, 107, 14, 0.45);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.sell-floating-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.sell-floating-btn:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 10px 32px rgba(246, 107, 14, 0.55);
    color: white;
    text-decoration: none;
}

.sell-floating-btn:hover i {
    transform: rotate(90deg);
}

.sell-floating-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.sell-floating-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    z-index: -1;
    animation: sellPulse 2.5s ease-out infinite;
    opacity: 0;
}

@keyframes sellPulse {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* ========================================
   BANNIÈRE VENDRE
   ======================================== */
.sell-banner {
    margin-bottom: 32px;
    background: linear-gradient(135deg, #111111 0%, #1A1A1A 50%, #222222 100%);
    border-radius: 16px;
    padding: 32px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.sell-banner::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -5%;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(246, 107, 14, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.sell-banner-content {
    position: relative;
    z-index: 1;
}

.sell-banner-content h2 {
    font-size: 26px;
    font-weight: 800;
    color: white;
    margin-bottom: 8px;
    line-height: 1.2;
}

.sell-banner-content h2 span {
    color: var(--primary-orange);
}

.sell-banner-content p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    max-width: 480px;
}

.sell-banner-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.btn-sell-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(246, 107, 14, 0.4);
    white-space: nowrap;
}

.btn-sell-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(246, 107, 14, 0.5);
    color: white;
    text-decoration: none;
}

.btn-sell-main i {
    font-size: 16px;
}

.sell-stats {
    display: flex;
    gap: 24px;
}

.sell-stat {
    text-align: center;
    color: white;
}

.sell-stat-number {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-orange);
    line-height: 1;
    margin-bottom: 4px;
}

.sell-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   SECTION HEADERS
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-title i {
    color: var(--primary-orange);
    font-size: 22px;
}

.view-all-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all var(--transition-speed);
    padding: 7px 14px;
    border-radius: 8px;
    white-space: nowrap;
}

.view-all-link:hover {
    background-color: rgba(246, 107, 14, 0.08);
    gap: 10px;
}

/* ========================================
   HERO BANNER
   ======================================== */
.hero-banner {
    margin-bottom: 28px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-light);
}

.banner-link {
    display: block;
    position: relative;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.banner-link:hover .banner-image {
    transform: scale(1.04);
}

/* ========================================
   CARROUSEL ANNONCES VEDETTES
   ======================================== */
.featured-section {
    margin-bottom: 48px;
}

.carousel-wrapper {
    position: relative;
}

.ads-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
    cursor: grab;
    user-select: none;
}

.ads-carousel::-webkit-scrollbar {
    display: none;
}

.ads-carousel.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.ads-carousel.is-dragging .ad-card {
    pointer-events: none;
}

.ads-carousel .ad-card {
    flex: 0 0 280px;
    scroll-snap-align: start;
    min-width: 280px;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-white);
    border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    color: var(--text-dark);
    font-size: 16px;
}

.carousel-btn:hover {
    background: var(--primary-orange);
    color: white;
    box-shadow: 0 6px 20px rgba(246, 107, 14, 0.35);
    transform: translateY(-50%) scale(1.08);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.96);
}

.carousel-btn.prev-btn { left: -22px; }
.carousel-btn.next-btn { right: -22px; }

.carousel-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
}

.carousel-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary-orange);
    width: 24px;
    border-radius: 4px;
}

/* ========================================
   CATEGORIES GRID
   ======================================== */
.categories-section {
    margin-bottom: 40px;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-white);
    border-radius: 12px;
    text-decoration: none;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 8px var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-orange);
    transform: scaleY(0);
    transition: transform var(--transition-speed);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px var(--shadow-medium);
}

.category-card:hover::before {
    transform: scaleY(1);
}

.category-icon-wrapper {
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-cream);
    border-radius: 12px;
    flex-shrink: 0;
}

.category-icon {
    font-size: 26px;
}

.category-info {
    flex: 1;
    min-width: 0;
}

.category-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.category-count {
    font-size: 12px;
    color: var(--text-secondary);
}

.category-arrow {
    color: var(--text-light);
    font-size: 13px;
    transition: all var(--transition-speed);
}

.category-card:hover .category-arrow {
    color: var(--primary-orange);
    transform: translateX(4px);
}

/* ========================================
   ADS GRID
   ======================================== */
.ads-section {
    margin-bottom: 48px;
}

.ads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

/* ========================================
   AD CARD
   ======================================== */
.ad-card {
    position: relative;
    background: var(--bg-white);
    border-radius: var(--card-radius);
    overflow: hidden;
    box-shadow: 0 2px 12px var(--shadow-light);
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
    border: 1.5px solid transparent;
    will-change: transform;
}

.ad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
    border-color: rgba(246, 107, 14, 0.12);
}

.ad-card.featured-card {
    border: 2px solid var(--primary-orange);
    box-shadow: 0 4px 16px rgba(246, 107, 14, 0.12);
}

.ad-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* ========================================
   AD IMAGE
   ======================================== */
.ad-image-container {
    position: relative;
    width: 100%;
    height: 210px;
    overflow: hidden;
    background: var(--bg-light-gray);
}

.ad-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.ad-card:hover .ad-image {
    transform: scale(1.06);
}

/* ========================================
   AD BADGES
   ======================================== */
.ad-badge {
    position: absolute;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.featured-badge {
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1A1A1A;
}

.discount-badge {
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #FF3B30 0%, #FF6B6B 100%);
    color: white;
}

.new-badge {
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #4CAF50 0%, #8BC34A 100%);
    color: white;
}

/* ========================================
   AD CONTENT
   ======================================== */
.ad-content {
    padding: 14px;
}

.ad-category {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
}

.category-icon-small {
    font-size: 12px;
}

.category-text {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.ad-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 40px;
}

.ad-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.price-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ad-price {
    font-size: 19px;
    font-weight: 800;
    color: var(--primary-orange);
    letter-spacing: -0.3px;
    line-height: 1;
}

.original-price {
    font-size: 12px;
    color: var(--text-light);
    text-decoration: line-through;
}

.negotiable-tag {
    font-size: 11px;
    color: var(--primary-orange);
    background: rgba(246, 107, 14, 0.08);
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(246, 107, 14, 0.2);
    flex-shrink: 0;
}

/* ========================================
   SELLER INFO
   ======================================== */
.seller-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.seller-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    flex-shrink: 0;
    position: relative;
}

.seller-avatar-small.is-verified::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 13px;
    height: 13px;
    background: var(--verified-color);
    border-radius: 50%;
    border: 2px solid var(--bg-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='white'%3E%3Cpath d='M10 3L5 8.5 2 5.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
    background-color: var(--verified-color);
    background-repeat: no-repeat;
    background-position: center;
    background-size: 8px;
}

.seller-details {
    flex: 1;
    min-width: 0;
}

.seller-name-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.seller-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 110px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    background: var(--verified-color);
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    cursor: default;
}

.verified-badge i {
    color: white !important;
    font-size: 8px !important;
}

.verified-badge::before {
    content: 'Vendeur vérifié';
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    font-size: 11px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 20;
}

.verified-badge::after {
    content: '';
    position: absolute;
    bottom: 17px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.verified-badge:hover::before,
.verified-badge:hover::after {
    opacity: 1;
}

.seller-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    color: var(--text-secondary);
}

.seller-rating i {
    color: #FFD700;
    font-size: 11px;
}

.reviews-count {
    color: var(--text-light);
}

/* ========================================
   META INFORMATION
   ======================================== */
.ad-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

.ad-meta > span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.ad-meta i {
    font-size: 10px;
    color: var(--text-light);
}

/* ========================================
   FAVORITE BUTTON
   ======================================== */
.favorite-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-speed);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    z-index: 3;
}

.favorite-btn i {
    font-size: 16px;
    color: var(--text-secondary);
    transition: all var(--transition-speed);
}

.favorite-btn:hover {
    transform: scale(1.12);
    background: white;
}

.favorite-btn:hover i {
    color: #FF3B30;
}

.favorite-btn.active {
    background: #FF3B30;
    box-shadow: 0 2px 12px rgba(255, 59, 48, 0.35);
}

.favorite-btn.active i {
    color: white;
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.empty-icon {
    width: 100px;
    height: 100px;
    background: var(--bg-cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.empty-icon i {
    font-size: 48px;
    color: var(--text-light);
}

.empty-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.empty-text {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 380px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-light) 100%);
    color: white;
    padding: 14px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all var(--transition-speed);
    box-shadow: 0 4px 12px rgba(246, 107, 14, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 107, 14, 0.4);
    color: white;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 90px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: var(--bg-white);
    padding: 13px 17px;
    border-radius: 12px;
    box-shadow: 0 6px 24px var(--shadow-medium);
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 270px;
    max-width: 360px;
    transform: translateX(420px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    color: var(--text-dark);
}

.toast.show {
    transform: translateX(0);
}

.toast-success { border-left: 4px solid #4CAF50; }
.toast-error   { border-left: 4px solid #FF3B30; }
.toast-info    { border-left: 4px solid #1DA1F2; }
.toast-warning { border-left: 4px solid #FF9800; }

.toast i { font-size: 18px; flex-shrink: 0; }
.toast-success i { color: #4CAF50; }
.toast-error i   { color: #FF3B30; }
.toast-info i    { color: #1DA1F2; }
.toast-warning i { color: #FF9800; }

/* ========================================
   SCROLL-TO-TOP
   ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 32px;
    z-index: 990;
    width: 42px;
    height: 42px;
    background: var(--bg-white);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px var(--shadow-medium);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 15px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.scroll-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-to-top:hover {
    background: var(--primary-orange);
    color: white;
}

/* ========================================
   RESPONSIVE - TABLETTES
   ======================================== */
@media (max-width: 1024px) {
    .container { padding: 20px; }
    .categories-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .ads-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
    .sell-banner { padding: 24px 28px; }
    .sell-stats { gap: 16px; }
    .carousel-btn.prev-btn { left: -14px; }
    .carousel-btn.next-btn { right: -14px; }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --card-radius: 12px;
    }

    .container { padding: 12px 10px; }

    .sell-floating-btn {
        bottom: 20px;
        right: 14px;
        padding: 13px 20px;
        font-size: 14px;
        gap: 8px;
    }

    .sell-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 16px;
        gap: 14px;
        border-radius: 14px;
        margin-bottom: 20px;
    }

    .sell-banner-content h2 { font-size: 18px; line-height: 1.3; }
    .sell-banner-content p  { font-size: 12px; line-height: 1.5; }

    .sell-banner-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-sell-main {
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        font-size: 14px;
    }

    .sell-stats {
        gap: 0;
        display: flex;
        justify-content: space-between;
        width: 100%;
    }

    .sell-stat       { flex: 1; text-align: center; }
    .sell-stat-number{ font-size: 18px; }
    .sell-stat-label { font-size: 10px; }

    .section-header  { margin-bottom: 12px; }
    .section-title   { font-size: 16px; font-weight: 700; }
    .section-title i { font-size: 16px; }
    .view-all-link   { font-size: 13px; padding: 5px 10px; }

    .hero-banner     { margin-bottom: 14px; border-radius: 10px; }
    .banner-image    { max-height: 160px; }

    .categories-section,
    .ads-section,
    .featured-section { margin-bottom: 24px; }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 10px 8px;
        flex-direction: column;
        text-align: center;
        gap: 5px;
        border-radius: 10px;
    }

    .category-icon-wrapper { width: 40px; height: 40px; border-radius: 10px; }
    .category-icon         { font-size: 22px; }
    .category-name         { font-size: 11px; font-weight: 600; white-space: normal; overflow: visible; text-overflow: unset; line-height: 1.3; }
    .category-count        { font-size: 10px; color: var(--text-light); }
    .category-arrow        { display: none; }

    .ads-carousel .ad-card { flex: 0 0 200px; min-width: 200px; }
    .carousel-btn          { display: none; }

    .ads-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

    .ad-card           { border-radius: 10px; }
    .ad-image-container{ height: 150px; }
    .ad-image          { border-radius: 10px 10px 0 0; }
    .ad-content        { padding: 9px 9px 10px; }
    .ad-category       { margin-bottom: 4px; }
    .category-icon-small { font-size: 11px; }
    .category-text     { font-size: 10px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
    .ad-title          { font-size: 12px; font-weight: 600; line-height: 1.4; min-height: auto; -webkit-line-clamp: 2; margin-bottom: 7px; }
    .ad-price-section  { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; margin-bottom: 8px; }
    .price-wrapper     { display: flex; flex-direction: row; align-items: baseline; gap: 5px; flex-wrap: wrap; }
    .ad-price          { font-size: 14px; font-weight: 800; letter-spacing: -0.2px; }
    .original-price    { font-size: 10px; }
    .negotiable-tag    { font-size: 10px; padding: 2px 6px; border-radius: 12px; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
    .negotiable-tag i  { font-size: 9px; }

    .seller-info       { display: flex; flex-direction: row; align-items: center; gap: 6px; padding-top: 7px; margin-bottom: 6px; }
    .seller-avatar-small { width: 26px; height: 26px; font-size: 11px; }
    .seller-details    { flex: 1; min-width: 0; overflow: hidden; }
    .seller-name-row   { display: flex; align-items: center; gap: 3px; }
    .seller-name       { font-size: 11px; font-weight: 600; max-width: 70px; }
    .verified-badge    { width: 13px; height: 13px; }
    .verified-badge i  { font-size: 7px !important; }
    .seller-rating     { font-size: 10px; gap: 2px; margin-top: 1px; }
    .seller-rating i   { font-size: 9px; }
    .reviews-count     { font-size: 10px; }

    .ad-meta           { display: flex; flex-wrap: nowrap; gap: 5px; font-size: 10px; overflow: hidden; }
    .ad-meta > span    { display: flex; align-items: center; gap: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
    .ad-meta > span.ad-time { display: none; }
    .ad-meta i         { font-size: 9px; flex-shrink: 0; }

    .favorite-btn      { width: 30px; height: 30px; top: 8px; right: 8px; }
    .favorite-btn i    { font-size: 13px; }
    .ad-badge          { font-size: 10px; padding: 4px 7px; }

    .toast-container   { top: 68px; right: 8px; left: 8px; }
    .toast             { min-width: auto; font-size: 13px; padding: 11px 14px; }
    .scroll-to-top     { bottom: 76px; right: 14px; width: 38px; height: 38px; }
}

@media (max-width: 480px) {
    .container { padding: 10px 8px; }

    .categories-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
    .category-card   { padding: 8px 6px; }
    .category-icon-wrapper { width: 36px; height: 36px; }
    .category-icon   { font-size: 20px; }
    .category-name   { font-size: 10px; }
    .category-count  { display: none; }

    .ads-grid        { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .ad-image-container { height: 130px; }
    .ad-content      { padding: 8px 7px 9px; }
    .ad-title        { font-size: 11px; line-height: 1.35; }
    .ad-price        { font-size: 13px; }
    .seller-name     { max-width: 60px; }

    .sell-floating-btn span { display: none; }
    .sell-floating-btn {
        width: 50px;
        height: 50px;
        padding: 0;
        border-radius: 50%;
        justify-content: center;
        bottom: 16px;
        right: 12px;
        gap: 0;
    }
    .sell-floating-btn i    { font-size: 20px; transform: none !important; }
    .sell-floating-btn::after { border-radius: 50%; }

    .ads-carousel .ad-card { flex: 0 0 175px; min-width: 175px; }
}

/* ========================================
   CORRECTIONS GÉNÉRALES
   ======================================== */
.ad-title,
.seller-name,
.category-name,
.category-text { word-break: break-word; overflow-wrap: break-word; }
.ad-price-section { min-width: 0; }
.price-wrapper    { min-width: 0; overflow: hidden; }
.seller-info      { min-width: 0; }
.seller-details   { min-width: 0; }
.ad-image-container { position: relative; }
.ads-grid .ad-card { min-width: 0; width: 100%; }

/* ========================================================
   DARK MODE — index.css
   Toutes les couleurs hardcodées adaptées pour data-theme="dark"
   ======================================================== */
[data-theme="dark"] body {
    background-color: var(--bg-cream);
    color: var(--text-dark);
}

/* Cartes annonces */
[data-theme="dark"] .ad-card {
    background: var(--bg-white);
    box-shadow: 0 2px 12px var(--shadow-light);
    border-color: transparent;
}

[data-theme="dark"] .ad-card:hover {
    box-shadow: 0 10px 30px var(--shadow-medium);
    border-color: rgba(246, 107, 14, 0.2);
}

[data-theme="dark"] .ad-card.featured-card {
    border-color: var(--primary-orange);
}

/* Image placeholder */
[data-theme="dark"] .ad-image-container {
    background: var(--bg-light-gray);
}

/* Contenu carte */
[data-theme="dark"] .ad-title     { color: var(--text-dark); }
[data-theme="dark"] .seller-name  { color: var(--text-dark); }
[data-theme="dark"] .category-text{ color: var(--text-secondary); }
[data-theme="dark"] .ad-meta      { color: var(--text-secondary); }
[data-theme="dark"] .ad-meta i    { color: var(--text-light); }
[data-theme="dark"] .original-price { color: var(--text-light); }

/* Séparateur vendeur */
[data-theme="dark"] .seller-info {
    border-top-color: var(--border-color);
}

/* Badge vérifié bordure */
[data-theme="dark"] .seller-avatar-small.is-verified::after {
    border-color: var(--bg-white);
}

/* Bouton favori */
[data-theme="dark"] .favorite-btn {
    background: rgba(30, 30, 30, 0.92);
}
[data-theme="dark"] .favorite-btn i      { color: var(--text-secondary); }
[data-theme="dark"] .favorite-btn:hover  { background: var(--bg-light-gray); }
[data-theme="dark"] .favorite-btn.active { background: #FF3B30; }
[data-theme="dark"] .favorite-btn.active i { color: white; }

/* Catégories */
[data-theme="dark"] .category-card {
    background: var(--bg-white);
    box-shadow: 0 2px 8px var(--shadow-light);
}
[data-theme="dark"] .category-card:hover {
    box-shadow: 0 6px 16px var(--shadow-medium);
}
[data-theme="dark"] .category-name   { color: var(--text-dark); }
[data-theme="dark"] .category-count  { color: var(--text-secondary); }
[data-theme="dark"] .category-arrow  { color: var(--text-light); }
[data-theme="dark"] .category-card:hover .category-arrow { color: var(--primary-orange); }
[data-theme="dark"] .category-icon-wrapper { background: var(--bg-cream); }

/* Section titles */
[data-theme="dark"] .section-title { color: var(--text-dark); }

/* Boutons carousel */
[data-theme="dark"] .carousel-btn {
    background: var(--bg-white);
    color: var(--text-dark);
    box-shadow: 0 4px 16px var(--shadow-medium);
}
[data-theme="dark"] .carousel-btn:hover {
    background: var(--primary-orange);
    color: white;
}

/* Dots carousel */
[data-theme="dark"] .carousel-dot        { background: var(--border-color); }
[data-theme="dark"] .carousel-dot.active { background: var(--primary-orange); }

/* Empty state */
[data-theme="dark"] .empty-icon  { background: var(--bg-light-gray); }
[data-theme="dark"] .empty-icon i{ color: var(--text-light); }
[data-theme="dark"] .empty-title { color: var(--text-dark); }
[data-theme="dark"] .empty-text  { color: var(--text-secondary); }

/* Toast */
[data-theme="dark"] .toast { background: var(--bg-white); color: var(--text-dark); }

/* Scroll to top */
[data-theme="dark"] .scroll-to-top {
    background: var(--bg-white);
    color: var(--text-secondary);
    box-shadow: 0 4px 16px var(--shadow-medium);
}
[data-theme="dark"] .scroll-to-top:hover {
    background: var(--primary-orange);
    color: white;
}