/* Reset et variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2d5016;
    --secondary-color: #4a7c2a;
    --accent-color: #6ba644;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.logo-img {
    height: 50px;
    width: auto;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
}

nav a:hover,
nav a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Menu Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Overlay pour le menu mobile */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Filters Section */
.filters-section {
    background: var(--bg-white);
    padding: 2rem 0;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

/* Bouton toggle pour mobile */
.filters-toggle {
    display: none;
    width: 100%;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

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

.filters-toggle-icon {
    font-size: 1.2rem;
}

.filters-toggle-text {
    flex: 1;
    text-align: left;
}

.filters-toggle-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.filters-toggle.active .filters-toggle-arrow {
    transform: rotate(180deg);
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-icon {
    font-size: 1rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    width: 100%;
    box-sizing: border-box;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(107, 166, 68, 0.1);
}

.filter-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-search,
.btn-reset {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    justify-content: center;
    min-height: 44px; /* Taille minimale pour le tactile */
}

.btn-search {
    background: var(--primary-color);
    color: white;
}

.btn-search:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-reset {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
}

.btn-reset:hover {
    background: var(--border-color);
}

/* Products Section */
.products-section {
    padding: 2rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

/* Product Card */
.product-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.product-image {
    position: relative;
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.categorie-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    z-index: 2;
}

.out-of-stock-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-card.out-of-stock {
    opacity: 0.85;
    position: relative;
}

.product-card.out-of-stock .product-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.product-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.product-info h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.agriculteur-name {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.35rem;
}

.agriculteur-name a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.agriculteur-name a:hover {
    color: var(--accent-color);
}

.ville {
    color: var(--text-light);
    font-size: 0.8rem;
}

.product-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex-grow: 1;
}

.detail-item {
    font-size: 0.8rem;
    color: var(--text-light);
}

.detail-item strong {
    color: var(--text-dark);
}

.description {
    color: var(--text-light);
    font-style: italic;
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.tracabilite {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

.product-prices {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    margin-top: 0.5rem;
    align-items: center;
}

.price-tag {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.75rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.product-stock {
    margin-top: 0.25rem;
}

.stock-badge {
    background: var(--bg-light);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    color: var(--text-dark);
    font-weight: 600;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-view-shop {
    background: var(--primary-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    flex: 1;
    display: block;
}

.btn-view-shop:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-view-details {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
}

.btn-view-details:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Product Modal - Full Screen */
.product-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: var(--bg-white);
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    position: relative;
    overflow-y: auto;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-dark);
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
    box-shadow: var(--shadow);
}

.modal-close:hover,
.modal-close:focus {
    background: var(--accent-color);
    transform: scale(1.1);
    color: white;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 2rem 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-image {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.modal-title-section {
    flex: 1;
    min-width: 200px;
}

.modal-categorie {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.modal-title-section h2 {
    font-size: 1.8rem;
    margin: 0.75rem 0;
    color: white;
}

.modal-vendor {
    font-size: 0.95rem;
    opacity: 0.95;
    margin: 0;
}

.modal-details {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-detail-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    color: var(--text-dark);
    border-left: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.modal-detail-item strong {
    color: var(--primary-color);
    display: inline-block;
    min-width: 120px;
    font-size: 0.95rem;
}

.modal-description {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    margin-top: 0.5rem;
    box-shadow: var(--shadow);
}

.modal-description strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.modal-description p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Vendor Header */
.vendor-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
}

.vendor-profile {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.vendor-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: var(--shadow-hover);
    flex-shrink: 0;
}

.vendor-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
}

.vendor-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.vendor-info h1 {
    font-size: 2.5rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
    min-width: 200px;
}

.btn-share-native {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 0.6rem 1.2rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-share-native:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-share-native:active {
    transform: translateY(0);
}

.vendor-location,
.vendor-address,
.vendor-contact {
    margin: 0.5rem 0;
    opacity: 0.95;
}

.vendor-description {
    margin-top: 1rem;
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

.vendor-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link:active {
    transform: translateY(0);
}

.social-website:hover {
    background: rgba(33, 150, 243, 0.3);
    border-color: rgba(33, 150, 243, 0.5);
}

.social-facebook:hover {
    background: rgba(24, 119, 242, 0.3);
    border-color: rgba(24, 119, 242, 0.5);
}

.social-instagram:hover {
    background: rgba(225, 48, 108, 0.3);
    border-color: rgba(225, 48, 108, 0.5);
}

.social-twitter:hover {
    background: rgba(29, 161, 242, 0.3);
    border-color: rgba(29, 161, 242, 0.5);
}

.social-linkedin:hover {
    background: rgba(0, 119, 181, 0.3);
    border-color: rgba(0, 119, 181, 0.5);
}

/* Vendor Media */
.vendor-media {
    padding: 2rem 0;
    background: var(--bg-light);
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.video-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.video-placeholder:hover {
    opacity: 0.9;
}

.video-placeholder span {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.video-placeholder p {
    font-size: 1.2rem;
    font-weight: 600;
}

.video-titre {
    padding: 1rem;
    margin: 0;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.photo-item {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.photo-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.photo-titre {
    padding: 0.75rem;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-align: center;
    font-weight: 500;
}

/* Modal de photo avec navigation */
.photo-modal {
    user-select: none;
}

.photo-modal button {
    outline: none;
}

.photo-modal button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Styles pour la gestion des médias dans le profil */
.media-section {
    margin-bottom: 2rem;
}

.media-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.media-item {
    position: relative;
    background: var(--bg-white);
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    overflow: hidden;
    padding: 0.5rem;
}

.media-preview {
    width: 100%;
    height: 150px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.5rem;
}

.media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-info {
    padding: 0.5rem;
}

.media-url {
    font-size: 0.8rem;
    color: #666;
    word-break: break-all;
    margin: 0 0 0.25rem 0;
}

.media-titre {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

.btn-delete-media {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.btn-delete-media:hover {
    background: #dc3545;
    transform: scale(1.1);
}

.btn-add-media {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-add-media:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-add-media:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Vendor Products */
.vendor-products {
    padding: 2rem 0;
}

/* Pagination */
.pagination-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.pagination-btn.disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-white);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.pagination-number:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.pagination-number.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    cursor: default;
}

.pagination-number.active:hover {
    transform: none;
}

.pagination-ellipsis {
    padding: 0 0.5rem;
    color: var(--text-light);
    font-weight: 600;
}

.pagination-info {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.pagination-info p {
    margin: 0;
}

/* Videos Carousel Section */
.videos-carousel-section {
    padding: 2rem 0;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.carousel-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.video-agriculteur {
    color: var(--text-light);
    font-size: 1rem;
}

.video-agriculteur a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.video-agriculteur a:hover {
    text-decoration: underline;
}

.btn-back {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.video-carousel-container {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 3rem;
}

.video-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 2rem;
}

.video-slide {
    display: none;
}

.video-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-slide-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

.video-embed-wrapper {
    width: 100%;
}

.video-embed-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius);
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.video-info {
    padding: 0;
}

.video-meta-with-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.video-slide-navigation {
    display: flex;
    gap: 0.75rem;
    width: 100%;
}

.video-slide-navigation .slide-nav-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.video-info h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.video-agriculteur-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.agriculteur-thumb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.agriculteur-thumb-placeholder {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.agriculteur-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: block;
    margin-bottom: 0.25rem;
}

.agriculteur-link:hover {
    text-decoration: underline;
}

.video-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.video-date {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.carousel-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.carousel-btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.carousel-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.carousel-btn:disabled {
    background: var(--border-color);
    color: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot:hover {
    background: var(--primary-color);
    opacity: 0.7;
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.videos-thumbnails {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.thumbnails-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.videos-thumbnails h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.3rem;
}

.thumbnails-pagination {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.video-thumbnail {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.video-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.video-thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 80, 22, 0.2);
}

.thumbnail-image {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.thumbnail-image img,
.thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumbnail-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    transition: var(--transition);
    pointer-events: none;
}

.video-thumbnail:hover .play-overlay {
    background: rgba(45, 80, 22, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.thumbnail-info {
    padding: 1rem;
}

.thumbnail-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.thumbnail-agriculteur {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

/* Miniature flottante de la vidéo */
.floating-video-thumbnail {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    max-width: 350px;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-color);
}

.floating-video-thumbnail.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.floating-video-thumbnail:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.floating-thumbnail-image {
    position: relative;
    width: 120px;
    height: 68px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.floating-thumbnail-image img,
.floating-thumbnail-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.floating-thumbnail-placeholder {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.floating-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    pointer-events: none;
}

.floating-video-thumbnail:hover .floating-play-overlay {
    background: rgba(45, 80, 22, 0.9);
    transform: translate(-50%, -50%) scale(1.1);
}

.floating-thumbnail-info {
    flex: 1;
    min-width: 0;
}

.floating-thumbnail-title {
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 1;
}

.floating-thumbnail-agriculteur {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-clamp: 1;
}

.floating-thumbnail-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: 2px solid white;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.floating-thumbnail-close:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.no-results p {
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Agriculteurs Section */
.agriculteurs-section {
    padding: 4rem 0;
    background: var(--bg-white);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.agriculteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.agriculteur-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
}

.agriculteur-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
}

.agriculteur-avatar {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    box-shadow: var(--shadow);
}

.agriculteur-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agriculteur-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
}

.agriculteur-info h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* Badge de vérification (forme octogone - 8 côtés) */
.verified-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    clip-path: polygon(
        50% 0%,
        85.36% 14.64%,
        100% 50%,
        85.36% 85.36%,
        50% 100%,
        14.64% 85.36%,
        0% 50%,
        14.64% 14.64%
    );
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
    flex-shrink: 0;
    margin-left: 0.25rem;
    vertical-align: middle;
}

.agriculteur-name .verified-badge,
.modal-vendor .verified-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 0.25rem;
}

.vendor-info h1 .verified-badge {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

/* Badge populaire (octogone - 8 côtés) */
.popular-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
    flex-shrink: 0;
    margin-left: 0.25rem;
    vertical-align: middle;
    clip-path: polygon(
        50% 0%,
        85.36% 14.64%,
        100% 50%,
        85.36% 85.36%,
        50% 100%,
        14.64% 85.36%,
        0% 50%,
        14.64% 14.64%
    );
    animation: pulse-gold 2s ease-in-out infinite;
}

@keyframes pulse-gold {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(255, 215, 0, 0.4);
    }
    50% {
        box-shadow: 0 2px 8px rgba(255, 215, 0, 0.7);
    }
}

.agriculteur-name .popular-badge,
.modal-vendor .popular-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 0.25rem;
}

.vendor-info h1 .popular-badge {
    width: 24px;
    height: 24px;
    font-size: 14px;
}

/* Section de classement ultra-moderne et ergonomique */
.ranking-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #4facfe 75%, #00f2fe 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
}

.ranking-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

.ranking-section .container {
    position: relative;
    z-index: 1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.ranking-header {
    text-align: center;
    margin-bottom: 3rem;
}

.ranking-title-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    padding: 1.5rem 2.5rem;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.ranking-icon {
    font-size: 3rem;
    animation: bounce 2s ease-in-out infinite;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.ranking-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #0e7235 0%, #184a46 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.5px;
}

.ranking-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
    font-weight: 500;
}

.ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

.ranking-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
}

.ranking-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.ranking-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.ranking-card:hover .ranking-card-glow {
    opacity: 1;
}

.ranking-card.rank-first {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
}

.ranking-card.rank-second {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(192, 192, 192, 0.5);
    box-shadow: 0 12px 40px rgba(192, 192, 192, 0.3);
}

.ranking-card.rank-third {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(205, 127, 50, 0.5);
    box-shadow: 0 12px 40px rgba(205, 127, 50, 0.3);
}

.ranking-position-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
}

.ranking-card:hover .ranking-position-badge {
    transform: scale(1.1) rotate(5deg);
}

.ranking-card.rank-first .ranking-position-badge,
.ranking-card.rank-second .ranking-position-badge,
.ranking-card.rank-third .ranking-position-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.medal-icon {
    font-size: 1.5rem;
    line-height: 1;
    display: block;
    animation: rotateMedal 3s ease-in-out infinite;
}

@keyframes rotateMedal {
    0%, 100% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(10deg) scale(1.1); }
}

.position-number {
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.ranking-avatar-wrapper {
    position: relative;
    margin: 0.75rem 0 1rem 0;
}

.ranking-avatar {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
    position: relative;
    transition: all 0.4s;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.ranking-card:hover .ranking-avatar {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.3);
}

.ranking-card.rank-first .ranking-avatar,
.ranking-card.rank-second .ranking-avatar,
.ranking-card.rank-third .ranking-avatar {
    border-color: #FFD700;
    box-shadow: 0 8px 24px rgba(255, 215, 0, 0.4);
}

.ranking-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.ranking-card:hover .ranking-avatar img {
    transform: scale(1.1);
}

.ranking-avatar .avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: rgb(35, 87, 6);
    font-size: 1.6rem;
    font-weight: 700;
}

.ranking-crown {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.6rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    animation: float 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-5px); }
}

.ranking-info {
    text-align: center;
    width: 100%;
}

.ranking-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    line-height: 1.3;
}

.ranking-location {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0 0 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 500;
}

.ranking-location svg {
    opacity: 0.7;
}

.ranking-stats {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    width: 100%;
}

.ranking-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    flex: 1;
    transition: all 0.3s;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.ranking-card:hover .ranking-stats .stat-item {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    transform: translateY(-2px);
}

.ranking-stats .stat-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-content strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1.2;
}

.stat-content span {
    font-size: 0.7rem;
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ranking-card.rank-first .ranking-stats .stat-item,
.ranking-card.rank-second .ranking-stats .stat-item,
.ranking-card.rank-third .ranking-stats .stat-item {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
    border-color: rgba(255, 215, 0, 0.3);
}

.ranking-card.rank-first .ranking-stats .stat-item svg,
.ranking-card.rank-second .ranking-stats .stat-item svg,
.ranking-card.rank-third .ranking-stats .stat-item svg {
    color: #FF8C00;
}

.ranking-card.rank-first .ranking-stats .stat-item strong,
.ranking-card.rank-second .ranking-stats .stat-item strong,
.ranking-card.rank-third .ranking-stats .stat-item strong {
    color: #FF8C00;
}

.ranking-hover-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 0 0 20px 20px;
}

.ranking-card:hover .ranking-hover-effect {
    transform: translateY(0);
}

.verified-badge-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    clip-path: polygon(
        50% 0%,
        85.36% 14.64%,
        100% 50%,
        85.36% 85.36%,
        50% 100%,
        14.64% 85.36%,
        0% 50%,
        14.64% 14.64%
    );
    font-size: 0.7em;
    font-weight: 900;
    margin-left: 0.25rem;
    vertical-align: middle;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

@media (max-width: 768px) {
    .ranking-section {
        padding: 2.5rem 0;
    }
    
    .ranking-title-wrapper {
        flex-direction: column;
        padding: 1.25rem 1.5rem;
        gap: 0.75rem;
    }
    
    .ranking-icon {
        font-size: 2.5rem;
    }
    
    .ranking-header h2 {
        font-size: 1.75rem;
    }
    
    .ranking-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .ranking-card {
        padding: 1.25rem 1rem;
    }
    
    .ranking-avatar {
        width: 65px;
        height: 65px;
    }
    
    .ranking-name {
        font-size: 0.9rem;
    }
    
    .ranking-stats {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .ranking-stats .stat-item {
        padding: 0.5rem 0.75rem;
    }
}

/* Section de classement des produits */
.products-ranking-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    position: relative;
}

.products-ranking-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    max-width: 1400px;
    margin: 0 auto;
}

.product-ranking-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    transform-style: preserve-3d;
}

.product-ranking-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.product-ranking-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
    border-color: rgba(102, 126, 234, 0.3);
}

.product-ranking-card:hover .product-ranking-card-glow {
    opacity: 1;
}

.product-ranking-card.rank-first {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 12px 40px rgba(255, 215, 0, 0.3);
}

.product-ranking-card.rank-second {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(192, 192, 192, 0.5);
    box-shadow: 0 12px 40px rgba(192, 192, 192, 0.3);
}

.product-ranking-card.rank-third {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.15) 0%, rgba(255, 255, 255, 0.9) 100%);
    border: 2px solid rgba(205, 127, 50, 0.5);
    box-shadow: 0 12px 40px rgba(205, 127, 50, 0.3);
}

.product-ranking-position-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s;
    z-index: 2;
}

.product-ranking-card:hover .product-ranking-position-badge {
    transform: scale(1.1) rotate(5deg);
}

.product-ranking-card.rank-first .product-ranking-position-badge,
.product-ranking-card.rank-second .product-ranking-position-badge,
.product-ranking-card.rank-third .product-ranking-position-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.product-ranking-image {
    position: relative;
    width: 100%;
    height: 140px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    background: var(--bg-light);
}

.product-ranking-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.product-ranking-card:hover .product-ranking-image img {
    transform: scale(1.1);
}

.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.product-categorie-badge {
    position: absolute;
    bottom: 0.5rem;
    left: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-ranking-info {
    text-align: center;
    width: 100%;
}

.product-ranking-name {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-ranking-vendor {
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font-weight: 500;
}

.product-ranking-vendor svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.product-ranking-location {
    color: var(--text-light);
    font-size: 0.8rem;
    margin: 0.25rem 0 0.75rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    font-weight: 500;
}

.product-ranking-location svg {
    opacity: 0.7;
    flex-shrink: 0;
}

.product-ranking-price {
    margin-top: 0.5rem;
}

.product-ranking-price .price-tag {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #0e7235 0%, #184a46 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(14, 114, 53, 0.3);
}

.product-ranking-hover-effect {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.85rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 0 0 20px 20px;
}

.product-ranking-card:hover .product-ranking-hover-effect {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .products-ranking-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .product-ranking-card {
        padding: 1.25rem 1rem;
    }
    
    .product-ranking-image {
        height: 120px;
    }
    
    .product-ranking-name {
        font-size: 0.9rem;
    }
}

.agriculteur-location {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.agriculteur-description {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    min-height: 60px;
}

.agriculteur-stats {
    margin: 1rem 0;
}

.stat-badge {
    background: var(--bg-light);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.btn-view-profile {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    margin-top: 1rem;
}

.btn-view-profile:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Contact Section */
.contact-section {
    padding: 4rem 0;
    background: var(--bg-light);
}

.contact-content {
    max-width: 900px;
    margin: 0 auto;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-block {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-block h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.contact-block p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.contact-form-container {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.contact-form-container h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(107, 166, 68, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    align-self: center;
    min-width: 200px;
}

.btn-submit:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.agriculteur-contact {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.3rem 0;
}

/* Footer */
footer {
    background: var(--primary-color);
    color: white;
    text-align: center;
    padding: 0.5rem 0;
    margin-top: 4rem;
}

footer a {
    color: white;
    text-decoration: underline;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

/* Navigation Auth Links */
.nav-account,
.nav-login,
.nav-register,
.nav-logout {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-register {
    background: var(--accent-color);
    font-weight: 600;
}

.nav-login {
    background: rgba(255, 255, 255, 0.15);
}

.nav-logout {
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
}

.nav-account:hover,
.nav-login:hover,
.nav-register:hover,
.nav-logout:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Auth Pages */
.auth-section {
    padding: 3rem 0;
    background: var(--bg-light);
}

.auth-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.auth-container h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.alert-error {
    background: #fee;
    color: #c33;
    border-left: 4px solid #c33;
}

.alert-success {
    background: #efe;
    color: #3c3;
    border-left: 4px solid #3c3;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-light);
}

.auth-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Dashboard */
.dashboard-section {
    padding: 2rem 0;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h2 {
    color: var(--primary-color);
    margin: 0;
}

.btn-add {
    background: var(--accent-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.btn-add:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.dashboard-products {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-product-card {
    display: grid;
    grid-template-columns: 80px 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    align-items: center;
    transition: var(--transition);
}

.dashboard-product-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateX(5px);
}

.product-image-small {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-light);
}

.product-image-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.product-info-small h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.product-category {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.product-stock-info {
    color: var(--text-light);
    font-size: 0.8rem;
}

.product-inactive {
    display: inline-block;
    background: #ffc107;
    color: #856404;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.product-actions-small {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.btn-edit {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    text-align: center;
}

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

.btn-delete {
    background: #dc3545;
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-delete:hover {
    background: #c82333;
}

/* Form Section */
.form-section {
    padding: 2rem 0;
}

.form-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.back-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-weight: 600;
    transition: var(--transition);
}

.back-link:hover {
    text-decoration: underline;
}

.product-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section-title {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin: 1.5rem 0 1rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-cancel {
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
    border: 2px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--border-color);
}

.form-group small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Checkout Section */
.checkout-section {
    padding: 2rem 0;
}

.checkout-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-form-container {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.checkout-form-container h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.checkout-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.checkout-summary {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.checkout-summary h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.summary-item {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.summary-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-light);
    flex-shrink: 0;
}

.summary-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.summary-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-item-info strong {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.summary-item-info span {
    color: var(--text-light);
    font-size: 0.85rem;
}

.summary-item-price {
    font-weight: 600;
    color: var(--primary-color);
}

.summary-total {
    font-size: 1.3rem;
    text-align: center;
    padding-top: 1rem;
    border-top: 2px solid var(--primary-color);
    color: var(--primary-color);
}

/* Commandes Section */
.commandes-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-size: 0.9rem;
}

.commandes-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
}

.commandes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.commande-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.commande-card:hover {
    box-shadow: var(--shadow-hover);
}

.commande-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.commande-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.commande-date {
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.commande-client {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.commande-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.commande-body {
    margin-bottom: 1rem;
}

.commande-items {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.commande-adresse {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.commande-notes {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

.commande-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.statut-badge {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

.statut-en_attente {
    background: #fff3cd;
    color: #856404;
}

.statut-confirmee {
    background: #d1ecf1;
    color: #0c5460;
}

.statut-expediee {
    background: #d4edda;
    color: #155724;
}

.statut-livree {
    background: #c3e6cb;
    color: #155724;
}

.statut-annulee {
    background: #f8d7da;
    color: #721c24;
}

.statut-select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.statut-select:hover {
    border-color: var(--primary-color);
}

.update-statut-form {
    display: inline-block;
}

/* Cart Link in Header */
.cart-link {
    position: relative;
}

.cart-badge {
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.5rem;
    min-width: 20px;
    display: inline-block;
    text-align: center;
}

/* Header actions container pour mobile */
.header-actions {
    display: none;
    align-items: center;
    gap: 1rem;
}

/* Lien panier dans le header - Uniquement visible sur mobile */
.cart-link-header {
    position: relative;
    color: white;
    text-decoration: none;
    font-size: 1.8rem;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
    z-index: 1001;
    width: 44px;
    height: 44px;
}

.cart-link-header:hover,
.cart-link-header.active {
    background-color: transparent;
}

.cart-badge-header {
    position: absolute;
    top: 0;
    right: 0;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(25%, -25%);
    text-align: center;
}

/* Add to Cart Form */
.add-to-cart-form {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.price-option {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
    font-size: 0.85rem;
}

.price-option:hover {
    background: var(--bg-light);
}

.price-option input[type="radio"] {
    cursor: pointer;
}

.quantity-input-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.quantity-input-group label {
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.quantity-input-group input {
    padding: 0.4rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 70px;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.quantity-input-group .stock-badge {
    flex-shrink: 0;
    white-space: nowrap;
}

.btn-add-cart {
    background: var(--accent-color);
    color: white;
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Cart Page */
.cart-section {
    padding: 2rem 0;
}

.cart-empty {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.empty-cart-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.cart-empty h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.cart-empty p {
    color: var(--text-light);
    margin-bottom: 2rem;
}

.btn-continue-shopping {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
}

.btn-continue-shopping:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cart-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cart-item {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: grid;
    grid-template-columns: 100px 1fr 200px 120px 50px;
    gap: 1.5rem;
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: var(--bg-light);
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cart-item-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cart-item-vendor {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.cart-item-unit {
    color: var(--text-light);
    font-size: 0.85rem;
}

.cart-item-quantity {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.update-quantity-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.update-quantity-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
}

.quantity-input {
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 80px;
}

.unit-label {
    font-size: 0.85rem;
    color: var(--text-light);
}

.btn-update {
    background: var(--accent-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

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

.cart-item-price {
    text-align: right;
}

.item-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: var(--transition);
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.cart-summary {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.summary-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.summary-card h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row.total {
    border-bottom: 2px solid var(--primary-color);
    font-size: 1.2rem;
    margin-top: 1rem;
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-clear-cart {
    background: #dc3545;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-cart:hover {
    background: #c82333;
}

.btn-checkout {
    background: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-checkout:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        position: relative;
        flex-wrap: nowrap;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .logo-img {
        height: 40px;
    }

    .header-actions {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
        flex-direction: column;
        gap: 0;
        padding: 5rem 0 2rem;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    nav.active {
        left: 0;
    }

    nav a {
        padding: 1rem 2rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        display: block;
        box-sizing: border-box;
    }

    nav a:hover,
    nav a.active {
        background-color: rgba(255, 255, 255, 0.15);
    }

    /* Styles spécifiques pour les boutons d'authentification dans le menu mobile */
    nav .nav-login,
    nav .nav-register,
    nav .nav-account,
    nav .nav-logout {
        background: rgba(255, 255, 255, 0.15);
        margin: 1rem 2rem 0.5rem 2rem;
        border-radius: 6px;
        text-align: center;
        font-weight: 600;
        border-bottom: none !important;
        padding: 0.75rem 1rem;
        width: calc(100% - 4rem);
        box-sizing: border-box;
        display: block;
    }

    /* Séparateur avant les boutons d'authentification */
    nav .nav-login:first-of-type,
    nav .nav-register:first-of-type,
    nav .nav-account:first-of-type,
    nav .nav-logout:first-of-type {
        margin-top: 1.5rem;
        border-top: 2px solid rgba(255, 255, 255, 0.2);
        padding-top: 1rem;
    }

    nav .nav-register {
        background: var(--accent-color);
        color: white;
    }

    nav .nav-login {
        background: rgba(255, 255, 255, 0.2);
    }

    nav .nav-account {
        background: rgba(255, 255, 255, 0.2);
    }

    nav .nav-logout {
        background: rgba(255, 255, 255, 0.1);
    }

    nav .nav-login:hover,
    nav .nav-register:hover,
    nav .nav-account:hover,
    nav .nav-logout:hover {
        background: rgba(255, 255, 255, 0.15);
        transform: none;
    }

    .cart-badge {
        margin-left: 0.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Filtres sur mobile */
    .filters-toggle {
        display: flex;
    }

    .filters-section {
        padding: 1rem 0;
    }

    .filters-form {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        padding: 0;
    }

    .filters-form.active {
        max-height: 2000px;
        opacity: 1;
        padding: 1.5rem 0 0;
    }

    .filter-group {
        gap: 0.75rem;
    }

    .filter-group label {
        font-size: 0.95rem;
    }

    .filter-group input,
    .filter-group select {
        padding: 1rem;
        font-size: 1rem;
        min-height: 44px; /* Taille minimale pour le tactile */
    }

    .filter-actions {
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
    }

    .btn-search,
    .btn-reset {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 48px; /* Taille confortable pour le tactile */
    }

    .btn-search span,
    .btn-reset span {
        font-size: 1.1rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .pagination-number {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .pagination-info {
        font-size: 0.85rem;
    }

    .carousel-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .video-carousel-container {
        padding: 1rem;
    }

    .video-slide-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .video-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .carousel-navigation {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .carousel-btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        justify-content: center;
        min-height: 48px; /* Taille confortable pour le tactile */
    }

    .carousel-dots {
        order: -1;
        margin-bottom: 0.5rem;
        gap: 0.4rem;
        width: 100%;
        overflow-x: auto;
        padding: 0.5rem 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE et Edge */
    }

    .carousel-dots::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
        flex-shrink: 0;
    }

    .thumbnails-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .floating-video-thumbnail {
        bottom: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        padding: 0.5rem;
        gap: 0.75rem;
    }

    .floating-thumbnail-image {
        width: 80px;
        height: 45px;
    }

    .floating-thumbnail-title {
        font-size: 0.85rem;
    }

    .floating-thumbnail-agriculteur {
        font-size: 0.75rem;
    }

    .floating-thumbnail-close {
        width: 20px;
        height: 20px;
        font-size: 1rem;
        top: -6px;
        right: -6px;
    }

    .agriculteurs-grid {
        grid-template-columns: 1fr;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .cart-content {
        grid-template-columns: 1fr;
    }

    .cart-item {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    /* Styles pour le panier sur mobile */
    .cart-section {
        padding: 1rem 0;
    }

    .cart-empty {
        padding: 2rem 1rem;
    }

    .empty-cart-icon {
        font-size: 3rem;
    }

    .cart-empty h2 {
        font-size: 1.5rem;
    }

    .cart-empty p {
        font-size: 0.9rem;
    }

    .btn-continue-shopping {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    .cart-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .cart-items {
        gap: 1rem;
    }

    .cart-item {
        grid-template-columns: 70px 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .placeholder-image-small {
        font-size: 1.5rem;
    }

    .cart-item-info h3 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
    }

    .cart-item-vendor {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
    }

    .cart-item-unit {
        font-size: 0.75rem;
    }

    .cart-item-quantity {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
    }

    .update-quantity-form {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    .update-quantity-form label {
        font-size: 0.8rem;
        width: 100%;
    }

    .quantity-input {
        width: 60px;
        padding: 0.4rem;
        font-size: 0.9rem;
    }

    .unit-label {
        font-size: 0.8rem;
    }

    .btn-update {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .cart-item-price {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }

    .item-total {
        font-size: 1.1rem;
    }

    .cart-item-actions {
        grid-column: 1 / -1;
        text-align: right;
        margin-top: 0.5rem;
    }

    .btn-remove {
        padding: 0.4rem 0.6rem;
        font-size: 1rem;
    }

    .cart-summary {
        position: static;
        order: -1;
    }

    .summary-card {
        padding: 1.5rem;
    }

    .summary-card h3 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .summary-row {
        padding: 0.75rem 0;
        font-size: 0.9rem;
    }

    .summary-row.total {
        font-size: 1rem;
    }

    .cart-actions {
        margin-top: 1.5rem;
        gap: 0.75rem;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cart-actions .clear-cart-form {
        display: flex;
        flex: 1;
        min-width: calc(50% - 0.375rem);
    }

    .btn-checkout,
    .btn-clear-cart {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        flex: 1;
        text-align: center;
        text-decoration: none;
        display: block;
        width: 100%;
    }

    .cart-actions > .btn-continue-shopping {
        width: 100%;
        text-align: center;
        order: 1;
    }

    .cart-actions > .clear-cart-form {
        order: 2;
        flex: 1;
        min-width: calc(50% - 0.375rem);
    }

    .cart-actions > .btn-checkout {
        order: 3;
        flex: 1;
        min-width: calc(50% - 0.375rem);
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .dashboard-header h2 {
        font-size: 1.3rem;
    }

    .dashboard-header > div {
        display: flex !important;
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: 100% !important;
        flex-wrap: wrap !important;
        overflow: visible !important;
    }

    .dashboard-header .btn-add {
        padding: 0.4rem 0.4rem;
        font-size: 0.65rem;
        flex: 1;
        min-width: calc(33.333% - 0.334rem);
        text-align: center;
        white-space: nowrap;
        overflow: visible;
        text-overflow: ellipsis;
        position: relative;
    }
    
    .dashboard-header .btn-add .notification-badge {
        position: absolute !important;
        top: -6px !important;
        right: -6px !important;
        width: 18px !important;
        height: 18px !important;
        font-size: 0.7rem !important;
        z-index: 10 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .dashboard-product-card {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
    }

    .product-actions-small {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: flex-start;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-submit,
    .btn-cancel {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        min-width: auto;
    }

    .vendor-profile {
        flex-direction: column;
        text-align: center;
    }

    .vendor-title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .vendor-info h1 {
        font-size: 2rem;
        width: 100%;
    }
    
    .btn-share-native {
        width: 100%;
        text-align: center;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .vendor-social-links {
        justify-content: center;
        gap: 0.5rem;
    }
    
    .social-link {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
    
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .photos-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }
    
    /* Boutons de navigation du modal photo sur mobile */
    .photo-modal {
        padding: 0 50px;
    }
    
    .photo-modal button {
        font-size: 30px !important;
    }
    
    .photo-modal button:first-of-type {
        width: 40px !important;
        height: 40px !important;
        top: 10px !important;
        right: 15px !important;
    }
    
    .photo-modal button:nth-of-type(2),
    .photo-modal button:nth-of-type(3) {
        width: 45px !important;
        height: 45px !important;
    }
    
    .photo-modal button:nth-of-type(2) {
        left: 10px !important;
    }
    
    .photo-modal button:nth-of-type(3) {
        right: 10px !important;
    }
    
    .media-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 0.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 85vh;
    }

    .modal-header {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }

    .modal-image {
        width: 100px;
        height: 100px;
        margin: 0 auto;
    }

    .modal-title-section h2 {
        font-size: 1.5rem;
    }

    .modal-details {
        padding: 1.5rem 1rem;
    }

    .modal-detail-item {
        font-size: 0.9rem;
        padding: 0.75rem;
    }

    .modal-detail-item strong {
        display: block;
        margin-bottom: 0.5rem;
        min-width: auto;
    }

    .modal-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 1.5rem;
    }
    
    /* Styles pour les commandes sur tablette */
    .commandes-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        display: grid;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .commandes-filters {
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .commandes-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .commande-card {
        padding: 1rem;
    }
    
    .commande-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .commande-info h3 {
        font-size: 1.1rem;
    }
    
    .commande-total {
        font-size: 1.3rem;
        width: 100%;
        text-align: left;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .commande-footer {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .statut-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .product-prices {
        flex-wrap: wrap;
    }

    .checkout-content {
        grid-template-columns: 1fr;
    }

    .commandes-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        display: grid;
    }
    
    .stat-card {
        padding: 0.875rem;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .commandes-filters {
        gap: 0.5rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .commandes-filters::-webkit-scrollbar {
        display: none;
    }
    
    .filter-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .commande-card {
        padding: 0.875rem;
    }
    
    .commande-header {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .commande-info h3 {
        font-size: 1rem;
    }
    
    .commande-total {
        font-size: 1.2rem;
        width: 100%;
        text-align: left;
        padding-top: 0.5rem;
        border-top: 1px solid var(--border-color);
    }
    
    .commande-date,
    .commande-client,
    .commande-telephone {
        font-size: 0.8rem;
    }
    
    .commande-items,
    .commande-adresse {
        font-size: 0.85rem;
    }
    
    .commande-notes {
        font-size: 0.8rem;
    }
    
    .commande-footer {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    
    .statut-badge {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .statut-select {
        width: 100%;
        padding: 0.75rem;
        font-size: 0.85rem;
    }
    
    .dashboard-header .btn-add {
        padding: 0.5rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .dashboard-header .btn-add .notification-badge {
        top: -5px !important;
        right: -5px !important;
        width: 16px !important;
        height: 16px !important;
        font-size: 0.65rem !important;
    }
}

/* Styles pour le dropdown des notifications */
.notifications-container {
    position: relative;
}

.notifications-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 300px;
    max-width: 400px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 0.5rem;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f0f7ff !important;
}

/* Responsive pour le dropdown des notifications */
@media (max-width: 768px) {
    .notifications-dropdown {
        position: fixed !important;
        top: auto !important;
        bottom: 20px !important;
        right: 10px !important;
        left: 10px !important;
        min-width: auto !important;
        max-width: none !important;
        width: calc(100% - 20px) !important;
        max-height: 70vh !important;
        margin-top: 0 !important;
        box-shadow: 0 8px 24px rgba(0,0,0,0.3) !important;
        border-radius: 12px !important;
    }
    
    .notification-item {
        padding: 0.875rem !important;
    }
    
    .notification-item strong {
        font-size: 0.95rem !important;
    }
    
    .notification-item p {
        font-size: 0.85rem !important;
    }
    
    .notification-item small {
        font-size: 0.75rem !important;
    }
    
    .notifications-dropdown > div:first-child {
        padding: 0.875rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .notifications-dropdown > div:first-child strong {
        font-size: 1rem !important;
    }
    
    #mark-all-read-btn {
        font-size: 0.8rem !important;
        padding: 0.25rem 0.5rem !important;
    }
    
    .notifications-dropdown > div:last-child {
        padding: 0.625rem !important;
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #eee;
    }
    
    .notifications-dropdown > div:last-child a {
        font-size: 0.85rem !important;
    }
}

/* Styles pour le panier responsive */
.cart-content-responsive {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

.cart-items-wrapper {
    margin-bottom: 2rem;
}

.agriculteur-cart-section {
    margin-bottom: 3rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: var(--border-radius);
    border: 2px solid #dee2e6;
}

.agriculteur-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #dee2e6;
    flex-wrap: wrap;
    gap: 1rem;
}

.agriculteur-cart-info {
    flex: 1;
    min-width: 200px;
}

.agriculteur-cart-title {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.agriculteur-cart-meta {
    margin: 0.5rem 0 0 0;
    color: #666;
    font-size: 0.9rem;
}

.agriculteur-checkout-form {
    margin: 0;
}

.btn-checkout-agriculteur {
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    transition: var(--transition);
}

.btn-checkout-agriculteur:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.cart-item-responsive {
    background: white;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: grid;
    grid-template-columns: 100px 1fr 180px 120px 60px;
    gap: 1.5rem;
    align-items: center;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-image-small {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.cart-item-name {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cart-item-unit-price {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cart-item-quantity label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.quantity-input {
    width: 70px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    text-align: center;
}

.unit-label {
    font-size: 0.85rem;
    color: var(--text-light);
    white-space: nowrap;
}

.cart-item-price {
    text-align: right;
}

.item-total {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.cart-item-actions {
    display: flex;
    justify-content: center;
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #c82333;
    transform: scale(1.05);
}

.cart-summary-responsive {
    position: sticky;
    top: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.summary-card h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.summary-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
}

.summary-warning p {
    margin: 0;
    color: #856404;
    font-size: 0.9rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #dee2e6;
}

.summary-row.total {
    padding: 1rem 0;
    font-size: 1.2rem;
    border-bottom: none;
}

.cart-actions {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-continue-shopping {
    text-align: center;
    padding: 0.75rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-continue-shopping:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-clear-cart {
    width: 100%;
    padding: 0.75rem;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.btn-clear-cart:hover {
    background: #c82333;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cart-content-responsive {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cart-summary-responsive {
        position: static;
        order: -1;
    }
    
    .agriculteur-cart-section {
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .agriculteur-cart-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agriculteur-cart-info {
        min-width: auto;
        margin-bottom: 1rem;
    }
    
    .agriculteur-cart-title {
        font-size: 1.1rem;
    }
    
    .agriculteur-cart-meta {
        font-size: 0.85rem;
    }
    
    .btn-checkout-agriculteur {
        width: 100%;
        text-align: center;
        padding: 0.875rem 1.5rem;
    }
    
    .cart-item-responsive {
        grid-template-columns: 80px 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    .placeholder-image-small {
        font-size: 1.5rem;
    }
    
    .cart-item-name {
        font-size: 1rem;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    
    .cart-item-unit-price {
        font-size: 0.85rem;
    }
    
    .cart-item-quantity {
        grid-column: 1 / -1;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #dee2e6;
    }
    
    .cart-item-price {
        grid-column: 1 / -1;
        text-align: left;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #dee2e6;
    }
    
    .item-total {
        font-size: 1.1rem;
    }
    
    .cart-item-actions {
        grid-column: 1 / -1;
        text-align: right;
        margin-top: 0.5rem;
        padding-top: 0.5rem;
        border-top: 1px solid #dee2e6;
    }
    
    .summary-card {
        padding: 1.25rem;
    }
    
    .summary-card h3 {
        font-size: 1.2rem;
    }
    
    .summary-warning {
        padding: 0.875rem;
    }
    
    .summary-warning p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .agriculteur-cart-section {
        padding: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .agriculteur-cart-title {
        font-size: 1rem;
    }
    
    .cart-item-responsive {
        grid-template-columns: 70px 1fr;
        gap: 0.875rem;
        padding: 0.875rem;
    }
    
    .cart-item-image {
        width: 70px;
        height: 70px;
    }
    
    .placeholder-image-small {
        font-size: 1.25rem;
    }
    
    .cart-item-name {
        font-size: 0.95rem;
    }
    
    .cart-item-unit-price {
        font-size: 0.8rem;
    }
    
    .quantity-input {
        width: 60px;
        padding: 0.4rem;
        font-size: 0.9rem;
    }
    
    .summary-card {
        padding: 1rem;
    }
    
    .summary-card h3 {
        font-size: 1.1rem;
    }
    
    .notifications-dropdown {
        right: 5px !important;
        left: 5px !important;
        width: calc(100% - 10px) !important;
        max-height: 60vh !important;
        border-radius: 10px !important;
        bottom: 10px !important;
    }
    
    .notification-item {
        padding: 0.75rem !important;
    }
    
    .notifications-dropdown > div:first-child {
        padding: 0.75rem !important;
    }
    
    .notifications-dropdown > div:last-child {
        padding: 0.5rem !important;
    }
}

/* Notifications pour l'ajout au panier */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    min-width: 300px;
    max-width: 400px;
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.cart-notification.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.cart-notification-success {
    background: linear-gradient(135deg, #4a7c2a 0%, #6ba644 100%);
    color: white;
    border-left: 4px solid #2d5016;
}

.cart-notification-error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-left: 4px solid #a71e2a;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.25rem;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .cart-notification {
        top: 10px;
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .cart-notification.show {
        transform: translateY(0);
    }
}

