/* ================================================
   Members Grid — style.css
   ================================================ */

.members-grid-wrapper {
    width: 100%;
    font-family: inherit;
}

/* ── Grid ───────────────────────────────────────── */

.mg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

/* ── Card ───────────────────────────────────────── */

.mg-card {
    background-color: #ffffff;
    border: 1px solid #ede0d6;
    border-radius: 12px;
    padding: 24px 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mg-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* ── Avatar ─────────────────────────────────────── */

.mg-avatar-wrapper {
    margin-bottom: 12px;
}

.mg-logo {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.mg-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #D4622A; /* overridden inline per member */
    color: #ffffff;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.02em;
    line-height: 1;
}

/* ── Member type badge ──────────────────────────── */

.mg-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 6px;
    line-height: 1.2;
}

.mg-badge--fondateur { color: #5C3A1E; }
.mg-badge--actif     { color: #D4622A; }

/* ── Title ──────────────────────────────────────── */

.mg-title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
}

/* ── Description ────────────────────────────────── */

.mg-description {
    margin: 0 0 12px;
    font-size: 12px;
    color: #666666;
    line-height: 1.6;
    flex-grow: 1;
    width: 100%;
}

/* ── Social buttons ─────────────────────────────── */

.mg-socials {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 12px;
}

.mg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    color: #ffffff;
    transition: opacity 0.2s ease, transform 0.15s ease;
    line-height: 1;
}

.mg-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
    text-decoration: none;
    color: #ffffff;
}

.mg-btn--website   { background-color: #D4622A; }
.mg-btn--facebook  { background-color: #1877F2; }
.mg-btn--twitter   { background-color: #000000; }
.mg-btn--instagram { background-color: #C13584; }
.mg-btn--linkedin  { background-color: #0A66C2; }

/* ── Pagination ─────────────────────────────────── */

.mg-pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 28px;
}

.mg-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 2px solid #D4622A;
    border-radius: 6px;
    background-color: transparent;
    color: #D4622A;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    font-family: inherit;
    line-height: 1;
}

.mg-page-btn:hover,
.mg-page-btn--active {
    background-color: #D4622A;
    color: #ffffff;
    border-color: #D4622A;
}

/* ── Responsive fallbacks (Elementor controls take priority) ── */

@media (max-width: 1024px) {
    .mg-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
    .mg-grid { grid-template-columns: 1fr; }
}