/* ========================================
   REFONTE COMPLÈTE - LISTE DES CARTES MODERNE
   ======================================== */

/* Variables CSS pour cohérence */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #f59e0b;
    --dark-bg: #0f172a;
    --light-bg: #f8fafc;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
}

/* Section Présentation */
.presentation-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.presentation-text p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
}

/* Zone de filtres - Design moderne */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 50px;
    padding: 30px;
    background: linear-gradient(135deg, #ffffff 0%, var(--light-bg) 100%);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.filters select {
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    font-size: 1rem;
    background: #ffffff;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    color: var(--text-primary);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232563eb' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 45px;
}

.filters select:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.filters select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.price-filter {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 8px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 2px solid var(--border-color);
}

.price-filter input[type="range"] {
    -webkit-appearance: none;
    width: 150px;
    height: 8px;
    background: linear-gradient(to right, var(--primary-color) 0%, var(--border-color) 0%);
    border-radius: 10px;
    outline: none;
    transition: var(--transition);
}

.price-filter input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.price-filter input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: var(--shadow-lg);
}

.price-filter input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.price-filter input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

#price-display {
    min-width: 100px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-color);
    padding: 8px 15px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 8px;
}

/* Container des cartes */
.card-container {
    min-height: 400px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    padding: 30px 0;
    max-width: 1400px;
    margin: 0 auto;
}

/* Cartes de carte - Design moderne */
.mapcard {
    flex: 0 0 calc((100% - 90px) / 4);
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.mapcard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mapcard:hover::before {
    transform: scaleX(1);
}

.mapcard:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.mapcard img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    transition: var(--transition);
}

.mapcard:hover img {
    transform: scale(1.05);
}

.mapcard h3 {
    margin-top: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.mapcard p {
    color: var(--text-secondary);
    margin: 8px 0;
    font-size: 0.95rem;
}

.mapcard p strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Actions des cartes */
.mapcard-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.btn-map {
    padding: 12px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-block;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    flex: 1;
    text-align: center;
}

.btn-map:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-map:first-child {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #fb923c 100%);
}

.btn-map:first-child:hover {
    background: linear-gradient(135deg, #fb923c 0%, var(--secondary-color) 100%);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease;
}

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

.modal-content {
    display: block;
    margin: 5% auto;
    max-width: 90%;
    max-height: 85%;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    cursor: pointer;
    color: white;
    transition: var(--transition);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg) scale(1.1);
}

/* Responsive */
@media (max-width: 1024px) {
    .card-container {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .filters {
        flex-direction: column;
        padding: 20px;
    }
    
    .filters select {
        width: 100%;
    }
    
    .price-filter {
        width: 100%;
        justify-content: space-between;
    }
    
    .price-filter input[type="range"] {
        flex: 1;
    }
    
    .card-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
    
    .mapcard-actions {
        flex-direction: column;
    }
    
    .btn-map {
        width: 100%;
    }
}