/**
 * Styles frontend pour l'annuaire diaspora
 */

.mdm-annuaire-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.mdm-annuaire-header {
    text-align: center;
    margin-bottom: 40px;
}

.mdm-annuaire-title {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.mdm-annuaire-description {
    font-size: 1.1em;
    color: #666;
}

.mdm-annuaire-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f5f5f5;
    border-radius: 8px;
    flex-wrap: wrap;
}

.mdm-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    flex: 1;
    min-width: 250px;
}

.mdm-filter-group-full {
    flex: 1 1 100%;
    min-width: 100%;
}

.mdm-filter-group label {
    font-weight: 600;
    color: #333;
}

.mdm-filter-input,
.mdm-filter-select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    background-color: #fff;
    overflow: visible;
}

.mdm-filter-select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
    padding-left: 12px;
    color: #333;
    font-family: inherit;
    line-height: 1.5;
}

.mdm-annuaire-results {
    margin-top: 30px;
}

.mdm-results-count {
    margin-bottom: 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.mdm-entries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 1000px) {
    .mdm-entries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .mdm-entries-grid {
        grid-template-columns: 1fr;
    }
}

.mdm-entry-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.mdm-entry-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.mdm-entry-header {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.mdm-entry-name {
    font-size: 1.4em;
    margin: 0 0 8px 0;
    color: #0088ff;
}

.mdm-entry-type {
    display: inline-block;
    padding: 4px 10px;
    background: #e8f4f8;
    color: #0088ff;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 600;
}

.mdm-entry-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mdm-entry-location {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 1em;
    color: #666;
}

.mdm-entry-pays {
    font-weight: 600;
    color: #333;
}

.mdm-entry-ville::before {
    content: "•";
    margin-right: 10px;
    color: #ccc;
}

.mdm-entry-address,
.mdm-entry-contact,
.mdm-entry-description {
    font-size: 0.95em;
    line-height: 1.6;
    color: #555;
}

.mdm-entry-contact a {
    color: #0088ff;
    text-decoration: none;
}

.mdm-entry-contact a:hover {
    text-decoration: underline;
}

.mdm-entry-description {
    margin-top: 10px;
    font-style: italic;
}

.mdm-entry-badge {
    position: absolute;
    top: 15px;
    right: 15px;
}

.mdm-badge-maghreb {
    display: inline-block;
    padding: 4px 10px;
    background: #ff6b35;
    color: #fff;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.mdm-no-results {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.mdm-no-results p {
    font-size: 1.2em;
    color: #999;
    margin: 0;
}

.mdm-entry-card.hidden {
    display: none;
}

/* Pagination */
.mdm-pagination-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.mdm-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
}

.mdm-pagination-btn {
    padding: 10px 20px;
    background: #0088ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.3s, opacity 0.3s;
}

.mdm-pagination-btn:hover:not(:disabled) {
    background: #0066cc;
}

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

.mdm-pagination-info {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    min-width: 80px;
    text-align: center;
}

.mdm-pagination-stats {
    text-align: center;
    color: #666;
    font-size: 14px;
}

.mdm-pagination-showing,
.mdm-pagination-total-entries {
    font-weight: 600;
    color: #0088ff;
}

/* Responsive */
@media (max-width: 768px) {
    .mdm-annuaire-title {
        font-size: 2em;
    }
    
    .mdm-annuaire-filters {
        flex-direction: column;
    }
    
    .mdm-filter-group {
        min-width: 100%;
    }
    
    .mdm-entries-grid {
        grid-template-columns: 1fr;
    }
}

