/**
 * mod_ecanywhere v2.0 — CSS BEM responsive
 * Cards EC par fonction (Doyens, Directeurs, etc.)
 */

/* ── Module wrapper ── */
.ec-fn-module {
    margin: 20px auto 30px;
}

/* ── Titre section ── */
.ec-fn-title {
    font-weight: 300;
    color: #333;
    text-align: center;
    margin: 0 auto 25px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 1.5em;
}

/* ── Header résultats ── */
.ec-fn-header {
    margin-bottom: 15px;
    padding: 8px 12px;
    background: #f8f8f8;
    border-radius: 4px;
}
.ec-fn-count {
    font-size: 0.9em;
    color: #666;
    font-weight: 500;
}

/* ── Card ── */
.ec-fn-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
}
.ec-fn-card__inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.ec-fn-card:hover .ec-fn-card__inner {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #d0d0d0;
}

/* ── Header : photo + identité ── */
.ec-fn-card__header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 10px;
}
.ec-fn-card__photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}
.ec-fn-card__identity {
    flex: 1;
    min-width: 0;
}
.ec-fn-card__name {
    font-size: 0.95em;
    font-weight: 600;
    margin: 0 0 4px;
    line-height: 1.3;
    color: #222;
}
.ec-fn-card__corps {
    font-size: 0.8em;
    color: #555;
    line-height: 1.3;
}
.ec-fn-card__cnu {
    font-size: 0.75em;
    color: #888;
    line-height: 1.3;
    margin-top: 2px;
}

/* ── Badge fonction ── */
.ec-fn-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-radius: 3px;
    margin-bottom: 4px;
    color: #fff;
}
.ec-fn-badge--doyen {
    background-color: #c0392b;
}
.ec-fn-badge--vicedoyen {
    background-color: #2980b9;
}
.ec-fn-badge--directeur {
    background-color: #7f8c8d;
}

/* ── Footer : logo + établissement ── */
.ec-fn-card__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.ec-fn-card__logo {
    max-height: 40px;
    max-width: 60px;
    object-fit: contain;
    flex-shrink: 0;
}
.ec-fn-card__etab {
    flex: 1;
    min-width: 0;
}
.ec-fn-card__etab-name {
    font-size: 0.75em;
    font-weight: 500;
    color: #444;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.ec-fn-card__ville {
    font-size: 0.7em;
    color: #999;
    line-height: 1.2;
}

/* ── Responsive fine-tuning ── */
@media (max-width: 639px) {
    .ec-fn-card__photo {
        width: 48px;
        height: 48px;
    }
    .ec-fn-card__header {
        padding: 10px;
        gap: 10px;
    }
    .ec-fn-card__footer {
        padding: 8px 10px;
    }
}
