/**
 * Formations Entrypoints — Particle CSS (mars 2026)
 * Univ-Droit
 * 3 sections : cards d'entrée, chiffres clés, dernières formations
 */

/* ========================================
   SECTION
   ======================================== */
.fm-section {
    padding: 32px 0 8px;
}

.fm-section__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding-left: 16px;
    border-left: 4px solid #c8102e;
    margin-bottom: 20px;
    line-height: 1.3;
}

.fm-section__intro {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
    max-width: 680px;
}

/* ========================================
   GRID — Cards d'entrée
   ======================================== */
.fm-grid {
    display: grid;
    gap: 14px;
}

.fm-grid--3 { grid-template-columns: repeat(3, 1fr); }
.fm-grid--4 { grid-template-columns: repeat(4, 1fr); }
.fm-grid--5 { grid-template-columns: repeat(5, 1fr); }

/* ========================================
   CARD
   ======================================== */
.fm-card {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    border: 1px solid #ebebeb;
    border-left: 4px solid #c8102e;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
    position: relative;
}

.fm-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

/* Icon column */
.fm-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-width: 56px;
    background: #fafaf9;
    border-right: 1px solid #f0efed;
    transition: background 0.2s;
}

.fm-card:hover .fm-card__icon {
    background: #fef2f2;
}

.fm-card__icon i {
    font-size: 1.3rem;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.fm-card:hover .fm-card__icon i {
    opacity: 1;
}

/* Content */
.fm-card__body {
    flex: 1;
    padding: 14px 12px;
    min-width: 0;
}

.fm-card__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 2px;
    line-height: 1.3;
    transition: color 0.15s;
}

.fm-card:hover .fm-card__title {
    color: #c8102e;
}

.fm-card__subtitle {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999;
    margin-bottom: 6px;
}

.fm-card__counter {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 4px;
}

.fm-card__counter-num {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
}

.fm-card__counter-text {
    font-size: 0.7rem;
    color: #999;
    font-weight: 500;
}

.fm-card__desc {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Arrow */
.fm-card__arrow {
    display: flex;
    align-items: center;
    padding: 0 12px;
    color: #ddd;
    font-size: 0.8rem;
    transition: color 0.2s, transform 0.2s;
}

.fm-card:hover .fm-card__arrow {
    color: #c8102e;
    transform: translateX(3px);
}

/* ========================================
   CHIFFRES CLÉS
   ======================================== */
.fm-keyfigures {
    display: flex;
    justify-content: center;
    gap: 0;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 8px;
    padding: 28px 16px;
    margin: 8px 0;
}

.fm-keyfigures__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 16px;
    border-right: 1px solid rgba(255,255,255,0.1);
}

.fm-keyfigures__item:last-child {
    border-right: none;
}

.fm-keyfigures__num {
    font-size: 1.8rem;
    font-weight: 800;
    color: #c8102e;
    line-height: 1;
    margin-bottom: 6px;
}

.fm-keyfigures__label {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
    text-align: center;
}

/* ========================================
   DERNIÈRES FORMATIONS
   ======================================== */
.fm-recent-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

a.fm-recent-card {
    text-decoration: none;
    color: inherit;
}

a.fm-recent-card:hover {
    text-decoration: none;
    color: inherit;
}

.fm-recent-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ebebeb;
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
}

.fm-recent-card:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    transform: translateY(-1px);
}

.fm-recent-card__badge {
    display: inline-block;
    padding: 6px 14px;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    background: #c8102e;
}

.fm-recent-card__body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.fm-recent-card__title {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fm-recent-card:hover .fm-recent-card__title {
    color: #c8102e;
}

.fm-recent-card__compo {
    font-size: 0.72rem;
    color: #999;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-recent-card__compo i {
    margin-right: 4px;
    color: #ccc;
}

.fm-recent-card__location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    margin-bottom: 4px;
}

.fm-recent-card__type {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 1px 6px;
    border-radius: 3px;
    background: #fce4ec;
    color: #c8102e;
    white-space: nowrap;
}

.fm-recent-card__ville {
    color: #999;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fm-recent-card__ville i {
    margin-right: 2px;
    color: #ccc;
}

.fm-recent-card__date {
    font-size: 0.68rem;
    color: #bbb;
    margin-top: auto;
    padding-top: 6px;
}

.fm-recent-card__date i {
    margin-right: 3px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1199px) {
    .fm-grid--5 {
        grid-template-columns: repeat(3, 1fr);
    }

    .fm-recent-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 959px) {
    .fm-grid--3,
    .fm-grid--4,
    .fm-grid--5 {
        grid-template-columns: repeat(2, 1fr);
    }

    .fm-recent-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fm-keyfigures {
        flex-wrap: wrap;
        gap: 16px;
        padding: 24px 12px;
    }

    .fm-keyfigures__item {
        flex: 0 0 calc(50% - 8px);
        border-right: none;
        padding: 8px 0;
    }

    .fm-keyfigures__num {
        font-size: 1.5rem;
    }
}

@media (max-width: 639px) {
    .fm-grid--2,
    .fm-grid--3,
    .fm-grid--4,
    .fm-grid--5 {
        grid-template-columns: 1fr;
    }

    .fm-card__icon {
        width: 46px;
        min-width: 46px;
    }

    .fm-card__icon i { font-size: 1.1rem; }
    .fm-card__title { font-size: 0.82rem; }
    .fm-card__counter-num { font-size: 1.1rem; }
    .fm-card__arrow { padding: 0 8px; }

    .fm-recent-grid {
        grid-template-columns: 1fr;
    }

    .fm-keyfigures__item {
        flex: 0 0 100%;
    }

    .fm-keyfigures__num { font-size: 1.3rem; }
    .fm-section__title { font-size: 0.95rem; }
}
