/* ============================================================
   PAGE ACTUALITÉS — CREAI-VBG
   ============================================================ */


/* Jetons : voir base.css */

/* ============================================================
   BASE
   ============================================================ */

.actualites-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    width: 100%;
    overflow-x: hidden;
}

.actualites-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ============================================================
   HERO
   ============================================================ */

.actualites-hero {
    width: 100%;
    background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-700) 50%, var(--brand-500) 100%);
    color: #ffffff;
    padding: 100px 0 90px;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.actualites-hero::before {
    content: "";
    position: absolute;
    top: -140px;
    right: -140px;
    width: 460px;
    height: 460px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.actualites-hero::after {
    content: "";
    position: absolute;
    bottom: -120px;
    left: -120px;
    width: 380px;
    height: 380px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.actualites-hero-content {
    max-width: 780px;
    padding: 0 40px;
    position: relative;
    z-index: 2;
}

.actualites-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.actualites-hero h1 {
    font-size: clamp(34.5px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    color: #ffffff;
    margin: 0 0 20px;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: 700px;
}

.actualites-lead {
    font-size: clamp(17.5px, 1.5vw, 20px);
    line-height: 1.7;
    color: #ffffff;
    max-width: 640px;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    opacity: 0.96;
}

/* ============================================================
   BARRE DE FILTRES
   ============================================================ */

.actualites-filters {
    width: 100%;
    background: var(--surface);
    padding: 32px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 64px;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* --- Onglets de type --- */

.filters-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filters-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--surface-alt);
    color: var(--text-secondary);
    border: 1.5px solid transparent;
    border-radius: 999px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.filters-tab:hover {
    background: var(--brand-50);
    color: var(--brand-700);
}

.filters-tab.is-active {
    background: var(--brand-500);
    color: #ffffff;
}

.filters-tab-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.filters-tab-dot--teal {
    background: var(--brand-500);
}

.filters-tab-dot--purple {
    background: var(--accent-600);
}

.filters-tab.is-active .filters-tab-dot {
    background: #ffffff;
}

.filters-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.filters-tab.is-active .filters-tab-count {
    background: rgba(255, 255, 255, 0.25);
}

/* --- Recherche + select --- */

.filters-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    align-items: stretch;
}

.filters-search {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--surface-alt);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.filters-search:focus-within {
    background: var(--surface);
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(106, 44, 116, 0.15);
}

.filters-search svg {
    flex-shrink: 0;
    color: var(--text-muted);
    margin-right: 10px;
}

.filters-search input {
    flex: 1;
    padding: 13px 0;
    background: transparent;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 17.5px;
    color: var(--text-primary);
    min-width: 0;
}

.filters-search input::placeholder {
    color: var(--text-muted);
}

.filters-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: transparent;
    color: var(--text-muted);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.filters-clear:hover {
    background: var(--gray-100);
    color: var(--text-primary);
}

.filters-select {
    padding: 13px 40px 13px 16px;
    background: var(--surface-alt);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235f5e5a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.filters-select:focus {
    outline: none;
    background: var(--surface);
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(106, 44, 116, 0.15);
}

.filters-submit {
    padding: 13px 28px;
    background: var(--brand-500);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 16.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
}

.filters-submit:hover {
    background: var(--brand-700);
    transform: translateY(-1px);
}

/* --- Filtres actifs --- */

.filters-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-size: 15.5px;
    color: var(--text-muted);
}

.filters-active-label {
    font-weight: 600;
    color: var(--text-secondary);
}

.filters-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px 5px 12px;
    background: var(--brand-50);
    color: var(--brand-700);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
}

.filters-chip a {
    color: inherit;
    text-decoration: none;
    font-size: 17.5px;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.filters-chip a:hover {
    opacity: 1;
}

.filters-reset {
    color: var(--coral-500);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    margin-left: auto;
    transition: color 0.15s;
}

.filters-reset:hover {
    color: var(--coral-700, #8f3a20);
    text-decoration: underline;
}

/* ============================================================
   RÉSULTATS — grille
   ============================================================ */

.actualites-section {
    width: 100%;
    padding: 60px 0 80px;
    background: var(--surface-alt);
}

.actualites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* --- Carte --- */

.actualite-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.actualite-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px rgba(106, 44, 116, 0.15);
    border-color: var(--brand-200);
}

.actualite-card--event:hover {
    box-shadow: 0 16px 36px rgba(76, 68, 148, 0.15);
    border-color: var(--accent-200);
}

/* --- Image + tags --- */

.actualite-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--gray-100);
}

.actualite-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.actualite-card:hover .actualite-card-image img {
    transform: scale(1.05);
}

.actualite-card-tag {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    background: var(--brand-500);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.actualite-card-tag--teal {
    background: var(--brand-500);
}

.actualite-card-tag--purple {
    background: var(--accent-600);
}

.actualite-card-tag--gray {
    left: auto;
    right: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--gray-900);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
}

/* Badge date pour les événements */
.actualite-card-date-badge {
    position: absolute;
    bottom: 14px;
    left: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 8px 10px;
    background: #ffffff;
    border-radius: var(--radius-sm);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    z-index: 2;
    line-height: 1;
}

.actualite-card-day {
    font-size: 21.5px;
    font-weight: 800;
    color: var(--accent-800);
    letter-spacing: -0.02em;
}

.actualite-card-month {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-600);
    letter-spacing: 0.08em;
    margin-top: 3px;
}

/* --- Corps --- */

.actualite-card-body {
    padding: 22px 24px 26px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.actualite-card-date {
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 10px;
}

.actualite-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14.5px;
    color: var(--text-muted);
    font-weight: 500;
}

.actualite-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.actualite-card-meta svg {
    display: block;
    flex-shrink: 0;
}

.actualite-card h3 {
    font-size: 18.5px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actualite-card p {
    font-size: 16px;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.actualite-card-link {
    font-size: 15.5px;
    font-weight: 600;
    color: var(--brand-500);
    transition: color 0.15s;
}

.actualite-card--event .actualite-card-link {
    color: var(--accent-600);
}

.actualite-card:hover .actualite-card-link {
    color: var(--brand-700);
}

.actualite-card--event:hover .actualite-card-link {
    color: var(--accent-800);
}

/* ============================================================
   AUCUN RÉSULTAT
   ============================================================ */

.actualites-empty {
    text-align: center;
    padding: 80px 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

.actualites-empty svg {
    color: var(--gray-200);
    margin-bottom: 20px;
}

.actualites-empty h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px;
}

.actualites-empty p {
    font-size: 17.5px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.actualites-empty .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 28px;
    background: var(--brand-500);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 16.5px;
    font-weight: 600;
    transition: background 0.15s, transform 0.1s;
}

.actualites-empty .btn:hover {
    background: var(--brand-700);
    transform: translateY(-2px);
}

/* ============================================================
   PAGINATION
   ============================================================ */

.actualites-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 50px;
}

.pagination-arrow,
.pagination-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.pagination-arrow:hover,
.pagination-num:hover {
    background: var(--brand-50);
    color: var(--brand-700);
    border-color: var(--brand-500);
    transform: translateY(-1px);
}

.pagination-num.is-active {
    background: var(--brand-500);
    color: #ffffff;
    border-color: var(--brand-500);
}

.pagination-num.is-active:hover {
    background: var(--brand-700);
    border-color: var(--brand-700);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .actualites-container {
        padding: 0 32px;
    }

    .actualites-hero-content {
        padding: 0 32px;
    }

    .actualites-hero h1 {
        font-size: 36.5px;
    }

    .filters-row {
        grid-template-columns: 1fr;
    }

    .filters-submit {
        width: 100%;
    }

    .actualites-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .actualites-container,
    .actualites-hero-content {
        padding: 0 20px;
    }

    .actualites-hero {
        padding: 70px 0 60px;
    }

    .actualites-hero h1 {
        font-size: 28px;
    }

    .actualites-badge {
        font-size: 14px;
        padding: 8px 16px;
    }

    .actualites-lead {
        font-size: 17px;
    }

    .actualites-filters {
        padding: 20px 0;
        position: static; /* pas de sticky sur mobile */
    }

    .filters-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 6px;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .filters-tabs::-webkit-scrollbar {
        display: none;
    }

    .filters-tab {
        flex-shrink: 0;
        font-size: 15px;
        padding: 9px 14px;
    }

    .filters-search input {
        font-size: 16.5px;
    }

    .filters-select {
        font-size: 15.5px;
    }

    .actualites-section {
        padding: 40px 0 60px;
    }

    .actualites-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .actualite-card-body {
        padding: 18px 20px 22px;
    }

    .actualite-card h3 {
        font-size: 17.5px;
    }

    .actualites-pagination {
        gap: 4px;
        margin-top: 36px;
    }

    .pagination-arrow,
    .pagination-num {
        min-width: 38px;
        height: 38px;
        font-size: 15px;
    }
}