/**
 * Cartes Manifestations — BEM manif-card (mars 2026)
 * Univ-Droit
 *
 * Charge dans: actus-recherche.php (page liste)
 * Famille visuelle avec parution-card (meme structure BEM)
 */

/* ========================================
 * CARTE MANIFESTATION
 * ======================================== */

.manif-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    transition: box-shadow 0.3s, transform 0.3s;
    text-decoration: none;
    color: inherit;
}

.manif-card:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.14);
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

/* --- Couverture --- */
.manif-card__cover {
    position: relative;
    overflow: hidden;
    background: #e8e4df;
}

.manif-card__cover img {
    width: 100%;
    display: block;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.manif-card:hover .manif-card__cover img {
    transform: scale(1.05);
}

/* Overlay resume au survol */
.manif-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.15) 100%);
    display: flex;
    align-items: flex-end;
    padding: 14px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.manif-card:hover .manif-card__overlay {
    opacity: 1;
}

.manif-card__overlay p {
    color: #fff;
    font-size: 11px;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Type label (top-left) --- */
.manif-card__type {
    position: absolute;
    top: 0;
    left: 0;
    padding: 3px 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, #fe0000 0%, #d40000 100%);
    border-radius: 0 0 6px 0;
    z-index: 2;
    line-height: 1.6;
}

/* --- Date badge (top-right) --- */
.manif-card__date {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 56px;
    min-height: 56px;
    border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5px 3px;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    color: #fff;
    background: #1d3557;
}

.manif-card__date--active   { background: #e63946; }
.manif-card__date--upcoming { background: #1d3557; }
.manif-card__date--past     { background: #6c757d; }

.manif-card__date-day {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}

.manif-card__date-month {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
    margin-top: 1px;
    line-height: 1.2;
}

.manif-card__date-year {
    font-size: 9px;
    opacity: 0.7;
    line-height: 1;
    margin-top: 1px;
}

/* Variante "Limite" pour appels */
.manif-card__date-limit {
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    opacity: 0.85;
    margin-bottom: -1px;
}

.manif-card__date--limit {
    padding-top: 3px;
}

.manif-card__date--limit .manif-card__date-day {
    font-size: 19px;
}

/* --- Body --- */
.manif-card__body {
    padding: 12px 12px 0;
    flex: 1;
}

.manif-card__title {
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 4px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.manif-card__subtitle {
    font-size: 11.5px;
    color: #888;
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Footer --- */
.manif-card__footer {
    padding: 8px 12px;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    font-size: 11px;
    color: #999;
}

.manif-card__location {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.manif-card__location i { color: #c8102e; font-size: 10px; }

.manif-card__status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.manif-card__status--live {
    background: #198754;
    color: #fff;
    animation: manif-pulse 2s infinite;
}

@keyframes manif-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(25,135,84,0.4); }
    50% { box-shadow: 0 0 0 4px rgba(25,135,84,0); }
}

.manif-card__status--online {
    background: #fff3cd;
    color: #856404;
}

.manif-card__status--past {
    background: #f5f5f5;
    color: #999;
}

/* ========================================
 * GRILLE MIXTE (tags/specialites)
 * En mode mixte, forcer le meme aspect ratio
 * pour harmoniser parution-card et manif-card
 * ======================================== */
ul.mixed-grid .parution-card .parution-card__cover img {
    object-position: top;
}

/* ========================================
 * RESPONSIVE
 * ======================================== */
@media (max-width: 639px) {
    .manif-card__body { padding: 10px 10px 0; }
    .manif-card__title { font-size: 13px; }
    .manif-card__footer { padding: 6px 10px; }
    .manif-card__date { width: 50px; min-height: 50px; top: 6px; right: 6px; }
    .manif-card__date-day { font-size: 19px; }
    .manif-card__date-month { font-size: 9px; }
    .manif-card__date--limit .manif-card__date-day { font-size: 17px; }
}
