/* communes.css */
#communes {
    background-color: #f9f9f9;
    padding: 4rem 2rem;
}

.commune-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

#commune-search {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 30px;
    flex-grow: 1;
    max-width: 400px;
}

.communes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.commune-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.commune-card:hover {
    transform: translateY(-5px);
}

.commune-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.commune-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #1a2a6c;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
}

.commune-content {
    padding: 1.5rem;
    text-align: justify;
}

.commune-stats {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #555;
}

.commune-btn {
    display: inline-block;
    margin-top: 1rem;
    color: #1a2a6c;
    font-weight: 600;
    text-decoration: none;
}

.commune-btn:hover {
    text-decoration: underline;
}

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