.membres-grid-block {
    padding: 2rem 0;
}

.membres-grid-container {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .membres-grid-container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .membres-grid-container {
        padding: 0 2rem;
    }
}

.membres-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 1024px) {
    .membres-layout {
        flex-direction: row;
    }
}

.membres-sidebar {
    width: 100%;
    position: relative;
    background-color: white!important;
}

@media (min-width: 1024px) {
    .membres-sidebar {
        width: 18rem;
        flex-shrink: 0;
    }
}

@media (max-width: 1023px) {
    .membres-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        background: white;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .membres-sidebar.active {
        left: 0;
    }
}

.sidebar-content {
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    height: 100%;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.search-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px #2D9B8A;
    border-color: transparent;
}

.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.checkbox-options.scrollable {
    max-height: 12rem;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.checkbox-options.scrollable::-webkit-scrollbar {
    width: 0.25rem;
}

.checkbox-options.scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0.125rem;
}

.checkbox-options.scrollable::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 0.125rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
}

.type-indicator {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.5rem;
    border-radius: 50%;
}

.type-indicator[data-type="Producteur"] {
    background-color: #28A745;
}

.type-indicator[data-type="Transformateur"] {
    background-color: #2D9B8A;
}

.type-indicator[data-type="Négociant"] {
    background-color: #FD7E14;
}

.type-indicator[data-type="Institution"] {
    background-color: #6C757D;
}

.type-indicator[data-type="Partenaire"] {
    background-color: #2D9B8A;
}

.status-label[data-status="Membre actif"] {
    color: #28A745;
    font-weight: 500;
}

.status-label[data-status="Membre associé"] {
    color: #FD7E14;
    font-weight: 500;
}

.status-label[data-status="Partenaire"] {
    color: #2D9B8A;
    font-weight: 500;
}

.status-label[data-status="Candidat"] {
    color: #6C757D;
    font-weight: 500;
}

.cta-section {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.cta-section h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.cta-section p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.cta-button {
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #1F7A68 !important;
}

.reset-filters-button {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid;
    border-radius: 0.5rem;
    background-color: transparent;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-filters-button:hover {
    background-color: rgba(45, 155, 138, 0.1);
}

.membres-main {
    flex: 1;
}

.membres-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
}

@media (min-width: 768px) {
    .membres-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.controls-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid;
    border-radius: 0.375rem;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-button:hover {
    background-color: #2D9B8A;
    color: white !important;
}

.filter-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232D9B8A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolygon points='22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3'%3E%3C/polygon%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sort-select {
    padding: 0.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
}

.view-controls {
    display: flex;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    overflow: hidden;
}

.view-button {
    padding: 0.5rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7'%3E%3C/rect%3E%3Crect x='14' y='3' width='7' height='7'%3E%3C/rect%3E%3Crect x='14' y='14' width='7' height='7'%3E%3C/rect%3E%3Crect x='3' y='14' width='7' height='7'%3E%3C/rect%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.list-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='8' y1='6' x2='21' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='12' x2='21' y2='12'%3E%3C/line%3E%3Cline x1='8' y1='18' x2='21' y2='18'%3E%3C/line%3E%3Cline x1='3' y1='6' x2='3.01' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='12' x2='3.01' y2='12'%3E%3C/line%3E%3Cline x1='3' y1='18' x2='3.01' y2='18'%3E%3C/line%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.membres-view.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: 1.5rem;
}

.membre-card {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border-left: 4px solid #A8E6CF;
    cursor: pointer;
}

.membre-card:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.membre-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0;
}

.logo-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    object-fit: cover;
}

.logo-placeholder {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-text {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: white;
}

.membre-content {
    padding: 1rem 1.5rem 1.5rem;
}

.membre-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #1F6B5C;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.membre-type {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.membre-location {
    display: flex;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: #6C757D;
}

.location-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236C757D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.membre-description {
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: #6C757D;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.membre-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.membre-meta {
    font-size: 0.75rem;
    color: #6C757D;
}

.voir-profil-button {
    background: none;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #2D9B8A;
}

.voir-profil-button:hover {
    text-decoration: underline;
    color: #1F6B5C;
}

.membres-view.list-view {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.membre-list-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background-color: white;
    cursor: pointer;
}

.membre-list-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateX(0.25rem);
}

.list-item-logo {
    margin-right: 1rem;
}

.logo-image-small {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    object-fit: cover;
}

.logo-placeholder-small {
    width: 3rem;
    height: 3rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-text-small {
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.list-item-content {
    flex: 1;
}

.list-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.list-item-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
    color: #1F6B5C;
}

.list-item-badges {
    display: flex;
    gap: 0.5rem;
}

.list-item-meta {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    color: #6C757D;
}

.meta-separator {
    margin: 0 0.25rem;
}

.list-item-description {
    font-size: 0.875rem;
    color: #6C757D;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-item-actions {
    margin-left: 1rem;
}

.action-button {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid;
    transition: all 0.3s ease;
}

.action-button:hover {
    background-color: #2D9B8A;
    color: white !important;
}

.membres-pagination {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: transparent;
    cursor: pointer;
    color: #6C757D;
    transition: all 0.3s ease;
}

.pagination-button:hover:not(:disabled) {
    color: #2D9B8A;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-numbers {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pagination-number {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.375rem;
    background-color: transparent;
    cursor: pointer;
    color: #6C757D;
    transition: all 0.3s ease;
}

.pagination-number:hover {
    background-color: #f8f9fa;
}

.pagination-number.active {
    font-weight: 600;
}

.pagination-ellipsis {
    margin: 0 0.25rem;
    color: #6C757D;
}

.membres-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    text-align: center;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25rem solid #f3f3f3;
    border-top: 0.25rem solid #2D9B8A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Membre Modal Styles */
.membre-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.membre-modal-overlay .fixed {
    position: relative;
}

.membre-modal-overlay .inset-0 {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.membre-modal-overlay .bg-black\/70 {
    background: rgba(0, 0, 0, 0.7);
}

.membre-modal-overlay .flex {
    display: flex;
}

.membre-modal-overlay .items-center {
    align-items: center;
}

.membre-modal-overlay .justify-center {
    justify-content: center;
}

.membre-modal-overlay .z-50 {
    z-index: 50;
}

.membre-modal-overlay .p-4 {
    padding: 1rem;
}

.membre-modal-overlay .bg-white {
    background-color: white;
}

.membre-modal-overlay .rounded-xl {
    border-radius: 0.75rem;
}

.membre-modal-overlay .max-w-4xl {
    max-width: 56rem;
}

.membre-modal-overlay .w-full {
    width: 100%;
}

.membre-modal-overlay .max-h-\[90vh\] {
    max-height: 90vh;
}

.membre-modal-overlay .overflow-y-auto {
    overflow-y: auto;
}

.membre-modal-overlay .p-6 {
    padding: 1.5rem;
}

.membre-modal-overlay .justify-between {
    justify-content: space-between;
}

.membre-modal-overlay .items-start {
    align-items: flex-start;
}

.membre-modal-overlay .mb-6 {
    margin-bottom: 1.5rem;
}

.membre-modal-overlay .space-x-4 > * + * {
    margin-left: 1rem;
}

.membre-modal-overlay .w-20 {
    width: 5rem;
}

.membre-modal-overlay .h-20 {
    height: 5rem;
}

.membre-modal-overlay .rounded-lg {
    border-radius: 0.5rem;
}

.membre-modal-overlay .object-cover {
    object-fit: cover;
}

.membre-modal-overlay .text-white {
    color: white;
}

.membre-modal-overlay .text-xl {
    font-size: 1.25rem;
}

.membre-modal-overlay .font-bold {
    font-weight: 700;
}

.membre-modal-overlay .text-2xl {
    font-size: 1.5rem;
}

.membre-modal-overlay .text-\[#1F6B5C\] {
    color: #1F6B5C;
}

.membre-modal-overlay .font-medium {
    font-weight: 500;
}

.membre-modal-overlay .mb-1 {
    margin-bottom: 0.25rem;
}

.membre-modal-overlay .px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.membre-modal-overlay .py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.membre-modal-overlay .rounded-full {
    border-radius: 9999px;
}

.membre-modal-overlay .text-sm {
    font-size: 0.875rem;
}

.membre-modal-overlay .text-\[#6C757D\] {
    color: #6C757D;
}

.membre-modal-overlay .hover\:text-\[#2D9B8A\]:hover {
    color: #2D9B8A;
}

.membre-modal-overlay .transition-colors {
    transition: color 0.3s ease;
}

.membre-modal-overlay .w-6 {
    width: 1.5rem;
}

.membre-modal-overlay .h-6 {
    height: 1.5rem;
}

.membre-modal-overlay .grid {
    display: grid;
}

.membre-modal-overlay .grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.membre-modal-overlay .gap-8 {
    gap: 2rem;
}

.membre-modal-overlay .text-lg {
    font-size: 1.125rem;
}

.membre-modal-overlay .mb-4 {
    margin-bottom: 1rem;
}

.membre-modal-overlay .space-y-3 > * + * {
    margin-top: 0.75rem;
}

.membre-modal-overlay .text-\[#343A40\] {
    color: #343A40;
}

.membre-modal-overlay .text-\[#2D9B8A\] {
    color: #2D9B8A;
}

.membre-modal-overlay .hover\:underline:hover {
    text-decoration: underline;
}

.membre-modal-overlay .ml-1 {
    margin-left: 0.25rem;
}

.membre-modal-overlay .flex-wrap {
    flex-wrap: wrap;
}

.membre-modal-overlay .gap-2 {
    gap: 0.5rem;
}

.membre-modal-overlay .mt-1 {
    margin-top: 0.25rem;
}

.membre-modal-overlay .bg-\[#A8E6CF\] {
    background-color: #A8E6CF;
}

.membre-modal-overlay .text-\[#1F6B5C\] {
    color: #1F6B5C;
}

.membre-modal-overlay .px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.membre-modal-overlay .text-xs {
    font-size: 0.75rem;
}

.membre-modal-overlay .flex-col {
    flex-direction: column;
}

.membre-modal-overlay .gap-4 {
    gap: 1rem;
}

.membre-modal-overlay .mt-8 {
    margin-top: 2rem;
}

.membre-modal-overlay .px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.membre-modal-overlay .py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.membre-modal-overlay .bg-\[#28A745\] {
    background-color: #28A745;
}

.membre-modal-overlay .font-semibold {
    font-weight: 600;
}

.membre-modal-overlay .hover\:bg-green-600:hover {
    background-color: #16a34a;
}

.membre-modal-overlay .justify-center {
    justify-content: center;
}

.membre-modal-overlay .border-2 {
    border-width: 2px;
}

.membre-modal-overlay .border-\[#2D9B8A\] {
    border-color: #2D9B8A;
}

.membre-modal-overlay .hover\:bg-\[#2D9B8A\]:hover {
    background-color: #2D9B8A;
}

.membre-modal-overlay .hover\:text-white:hover {
    color: white;
}

.membre-modal-overlay .border-\[#6C757D\] {
    border-color: #6C757D;
}

.membre-modal-overlay .hover\:bg-\[#6C757D\]:hover {
    background-color: #6C757D;
}

.membre-modal-overlay .w-5 {
    width: 1.25rem;
}

.membre-modal-overlay .h-5 {
    height: 1.25rem;
}

.membre-modal-overlay .mr-2 {
    margin-right: 0.5rem;
}

/* Large screen styles */
@media (min-width: 1024px) {
    .membre-modal-overlay .lg\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Small screen responsive */
@media (min-width: 640px) {
    .membre-modal-overlay .sm\:flex-row {
        flex-direction: row;
    }
}

.no-membres {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 0;
    text-align: center;
    color: #6C757D;
}

.no-membres p {
    font-size: 1.125rem;
    margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 767px) {
    .membres-controls {
        gap: 0.75rem;
    }
    
    .controls-left,
    .controls-right {
        gap: 0.5rem;
    }
    
    .sort-select {
        font-size: 0.75rem;
    }
    
    .membre-card {
        margin-bottom: 1rem;
    }
    
    .membre-list-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .list-item-logo {
        margin-right: 0;
    }
    
    .list-item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .list-item-actions {
        margin-left: 0;
        width: 100%;
    }
    
    .action-button {
        width: 100%;
        text-align: center;
    }
    
    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination-numbers {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }
    
    .pagination-button {
        font-size: 0.875rem;
    }
}

/* Tablet responsiveness */
@media (min-width: 768px) and (max-width: 1023px) {
    .membres-layout {
        gap: 1.5rem;
    }
    
    .membres-view.grid-view {
        grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
        gap: 1.25rem;
    }
}

/* Focus states for accessibility */
.search-input:focus,
.sort-select:focus,
.view-button:focus,
.filter-button:focus,
.pagination-button:focus,
.pagination-number:focus,
.reset-filters-button:focus,
.cta-button:focus,
.action-button:focus {
    outline: 1px solid #2D9B8A;
    outline-offset: 1px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .membre-card,
    .membre-list-item {
        border: 2px solid #000;
    }
    
    .status-badge {
        border: 1px solid #000;
    }
    
    .type-indicator {
        border: 2px solid #000;
    }
}