/**
 * Formations Professionnelles — CSS (mars 2026)
 * Univ-Droit — UIkit 3 (jl-*)
 * Page mixte : DU/formations courtes + manifestations éligibles formation pro
 */

/* ========================================
   BADGE TYPE (haut de carte)
   ======================================== */
h2.formapro-type {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 3px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

h2.formapro-type--manif {
    background: #870e00;
}

h2.formapro-type--formation {
    background: #00A881;
}

/* ========================================
   HEADER
   ======================================== */
.formapro-header {
    text-align: center;
    padding: 24px 0 16px;
}

.formapro-header__title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.formapro-header__intro {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
}

/* ========================================
   FILTRES
   ======================================== */
.formapro-filters {
    background: #fafaf9;
    border: 1px solid #ebebeb;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.formapro-filters__title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #1a1a1a;
    margin-bottom: 14px;
    padding-left: 12px;
    border-left: 3px solid #c8102e;
}

.formapro-filters__row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
}

.formapro-filters__group {
    flex: 1;
    min-width: 180px;
}

.formapro-filters__group-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #999;
    margin-bottom: 8px;
}

/* Checkboxes type / spécialité */
.formapro-check {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 0;
    border-bottom: 1px solid #f0efed;
    cursor: pointer;
    font-size: 0.82rem;
    color: #333;
    transition: color 0.15s;
}

.formapro-check:last-child {
    border-bottom: none;
}

.formapro-check:hover {
    color: #c8102e;
}

.formapro-check input[type="checkbox"] {
    margin: 0;
}

/* Recherche texte */
.formapro-search-input {
    position: relative;
}

.formapro-search-input .jl-form-icon {
    position: absolute;
    left: 0;
    top: 0;
    width: 36px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.formapro-search-input .jl-input {
    padding-left: 36px;
    height: 38px;
}

/* Boutons */
.formapro-filters__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 14px;
}

.formapro-filters__actions .jl-button {
    height: 38px;
    font-size: 0.82rem;
}

.filter-reset.hidden {
    display: none;
}

/* ========================================
   RÉSULTATS HEADER
   ======================================== */
.formapro-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.formapro-results-count {
    font-size: 0.82rem;
    color: #999;
    font-weight: 500;
}

.formapro-results-count strong {
    color: #1a1a1a;
    font-weight: 700;
}

/* ========================================
   CARTES — Grille
   ======================================== */
.formapro-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.formapro-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #ebebeb;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s, transform 0.15s;
}

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

/* Image cover */
.formapro-card__cover {
    position: relative;
    height: 160px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.formapro-card__cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
}

.formapro-card__type {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 8px 12px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
}

.formapro-card__type--44,
.formapro-card__type--45,
.formapro-card__type--48,
.formapro-card__type--49 {
    background: rgba(135, 14, 0, 0.85);
}

.formapro-card__type--76 {
    background: rgba(0, 168, 129, 0.85);
}

.formapro-card__cover-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1;
    padding: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Body */
.formapro-card__body {
    flex: 1;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
}

.formapro-card__resume {
    font-size: 0.75rem;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.formapro-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    font-size: 0.68rem;
    color: #999;
    flex-wrap: wrap;
}

.formapro-card__meta i {
    margin-right: 2px;
}

.formapro-card__chip {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.formapro-card__chip--manif {
    background: #fce4ec;
    color: #870e00;
}

.formapro-card__chip--formation {
    background: #e0f2f1;
    color: #00695c;
}

/* ========================================
   CHARGEMENT
   ======================================== */
.formapro-loading {
    text-align: center;
    padding: 40px 0;
}

.formapro-loading.hidden {
    display: none;
}

/* ========================================
   AUCUN RÉSULTAT
   ======================================== */
.formapro-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.formapro-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
    color: #ddd;
}

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

@media (max-width: 959px) {
    .formapro-filters__row {
        flex-direction: column;
        gap: 16px;
    }

    .formapro-filters__group {
        min-width: 100%;
    }

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

    .formapro-header__title {
        font-size: 1.3rem;
    }
}

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

    .formapro-filters {
        padding: 16px;
    }

    .formapro-card__cover {
        height: 140px;
    }

    .formapro-header__title {
        font-size: 1.1rem;
    }
}
