/* ==========================================================================
   EPIM EN ACTION — Galerie Multimédia Éditoriale (Vidéos, Formats courts, Photos)
   Design Anti-Slop (tasteskill 2.5.1) : surfaces plates, filets #e3e8ef,
   rayon 12px cartes / 8px contrôles, photographies non assombries.
   Responsive standards: .98px guards, 0px horizontal overflow guaranteed.
   ========================================================================== */

.action-page {
    position: relative;
    width: 100%;
    overflow-x: clip;
    color: #0f223f;
    background-color: #f6f8fb;
}

/* ==========================================================================
   1. EN-TÊTE ÉDITORIAL SOBRE
   ========================================================================== */
.action-hero {
    background: #ffffff;
    border-bottom: 1px solid #e3e8ef;
    padding: clamp(2.25rem, 4vw, 3.5rem) 0;
}

.action-hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 992px) {
    .action-hero-grid {
        grid-template-columns: 1.25fr 1fr;
        gap: 3.5rem;
    }
}

.action-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #0f3b63;
    margin: 0 0 0.85rem;
}

.action-kicker::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 2px;
    background: #d4af37;
    flex-shrink: 0;
}

.action-hero-title {
    font-family: var(--font-primary, "Montserrat", sans-serif);
    font-size: clamp(1.95rem, 3.3vw, 2.75rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.02em;
    color: #0f223f;
    margin: 0 0 1rem;
}

.action-hero-lede {
    font-size: 1.04rem;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
    max-width: 58ch;
}

.action-hero-ledger {
    margin: 0;
    background: #f6f8fb;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.action-ledger-row {
    display: grid;
    grid-template-columns: 165px 1fr;
    gap: 0.75rem;
    align-items: baseline;
}

.action-ledger-row + .action-ledger-row {
    border-top: 1px solid #e3e8ef;
    padding-top: 0.85rem;
}

.action-ledger-row dt {
    font-size: 0.84rem;
    font-weight: 700;
    color: #0f223f;
    margin: 0;
}

.action-ledger-row dd {
    font-size: 0.84rem;
    color: #5b6b7f;
    line-height: 1.45;
    margin: 0;
}

/* ==========================================================================
   2. CONSOLE DE FILTRAGE & RECHERCHE
   ========================================================================== */
.action-gallery-section {
    padding: clamp(2rem, 3.5vw, 3rem) 0 clamp(3rem, 5vw, 4.5rem);
}

.action-toolbar-card {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
}

.action-toolbar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #edf1f6;
}

.action-toolbar-title-group {
    display: flex;
    align-items: baseline;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.action-toolbar-heading {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f223f;
    letter-spacing: -0.015em;
    margin: 0;
}

.action-toolbar-count {
    font-size: 0.84rem;
    font-weight: 600;
    color: #5b6b7f;
    font-variant-numeric: tabular-nums;
}

.action-toolbar-reset {
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f3b63;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.action-toolbar-reset:hover {
    color: #0f223f;
}

.action-search-form {
    flex: 1 1 300px;
    max-width: 420px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f6f8fb;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    padding: 0.5rem 0.85rem;
    min-width: 0;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.action-search-form:focus-within {
    background: #ffffff;
    border-color: #0f3b63;
}

.action-search-form i {
    color: #5b6b7f;
    font-size: 0.92rem;
    flex-shrink: 0;
}

.action-search-input {
    flex: 1;
    border: 0;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
    color: #0f223f;
    min-width: 0;
}

.action-search-input::placeholder {
    color: #7c8a9e;
}

.action-search-clear {
    width: 22px;
    height: 22px;
    border-radius: 6px;
    background: #e2e8f0;
    color: #334155;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    text-decoration: none;
    flex-shrink: 0;
}

.action-search-clear:hover {
    background: #cbd5e1;
}

.action-filter-rows {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-top: 1rem;
}

.action-filter-group {
    display: grid;
    grid-template-columns: 92px 1fr;
    align-items: baseline;
    gap: 0.75rem;
}

.action-filter-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding-top: 0.35rem;
}

.action-filter-pills {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin: 0;
}

.action-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.36rem 0.75rem;
    border-radius: 8px;
    font-size: 0.81rem;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #dce3ec;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.action-pill:hover {
    border-color: #0f3b63;
    color: #0f3b63;
    background: #f8fafc;
}

.action-pill.active {
    background: #0f3b63;
    color: #ffffff;
    border-color: #0f3b63;
}

/* ==========================================================================
   3. GRILLE MÉDIA 3 COLONNES (Cartes Épurées & Photos Claires)
   ========================================================================== */
.action-masonry {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    width: 100%;
}

.action-card {
    background: #ffffff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-card:hover,
.action-card:focus-visible {
    transform: translateY(-2px);
    border-color: #b8c4d4;
    box-shadow: 0 10px 22px rgba(15, 34, 63, 0.06);
    outline: none;
}

.action-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background-color: #eef2f7;
    overflow: hidden;
    border-bottom: 1px solid #edf1f6;
}

.action-card-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1);
    transition: transform 0.5s ease;
}

.action-card:hover .action-card-media img {
    transform: scale(1.03);
}

.action-badge-type {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    background: rgba(15, 34, 63, 0.88);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.action-badge-type i {
    color: #d4af37;
    font-size: 0.85rem;
}

.action-card-body {
    padding: 1.15rem 1.25rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.action-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.action-card-cat {
    font-size: 0.74rem;
    font-weight: 700;
    color: #0f3b63;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.action-card-sep {
    color: #94a3b8;
    font-weight: 600;
    font-size: 0.78rem;
}

.action-card-date {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
    font-variant-numeric: tabular-nums;
}

.action-card-title {
    font-family: var(--font-primary, "Montserrat", sans-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f223f;
    line-height: 1.34;
    letter-spacing: -0.01em;
    margin: 0 0 0.45rem;
}

.action-card-desc {
    font-size: 0.85rem;
    line-height: 1.52;
    color: #5b6b7f;
    margin: 0 0 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.action-card-footer {
    margin-top: auto;
    padding-top: 0.85rem;
    border-top: 1px solid #edf1f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.action-card-format {
    font-size: 0.76rem;
    font-weight: 500;
    color: #64748b;
}

.action-card-cta {
    font-weight: 600;
    font-size: 0.84rem;
    color: #0f3b63;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.action-card-cta i {
    transition: transform 0.15s ease;
}

.action-card:hover .action-card-cta i {
    transform: translateX(3px);
}

/* État vide */
.action-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e3e8ef;
}

.action-empty-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f223f;
    margin: 0 0 0.4rem;
}

.action-empty-text {
    font-size: 0.88rem;
    color: #5b6b7f;
    margin: 0 0 1.25rem;
}

/* ==========================================================================
   4. BANDEAU D'ACTION FINAL
   ========================================================================== */
.action-final-cta {
    background: #ffffff;
    border-top: 1px solid #e3e8ef;
    padding: clamp(2.25rem, 4vw, 3.5rem) 0;
}

.action-cta-panel {
    background: #0f223f;
    color: #ffffff;
    border-radius: 12px;
    padding: clamp(1.75rem, 3.5vw, 2.5rem) clamp(1.5rem, 3.5vw, 2.75rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.action-cta-copy {
    flex: 1 1 420px;
    max-width: 60ch;
}

.action-cta-eyebrow {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #d4af37;
    margin: 0 0 0.5rem;
}

.action-cta-title {
    font-size: clamp(1.35rem, 2.1vw, 1.65rem);
    font-weight: 700;
    color: #ffffff;
    line-height: 1.22;
    letter-spacing: -0.015em;
    margin: 0 0 0.65rem;
    text-wrap: balance;
}

.action-cta-text {
    font-size: 0.94rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.82);
    margin: 0;
}

.action-cta-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* ==========================================================================
   5. VISIONNEUSE MODALE
   ========================================================================== */
.action-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 34, 63, 0.85);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.action-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.action-modal-dialog {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e3e8ef;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.action-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(15, 34, 63, 0.85);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
}

.action-modal-close:hover {
    background: #0f223f;
}

.action-modal-media {
    position: relative;
    width: 100%;
    background: #0b172a;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
    max-height: 64vh;
}

.action-modal-media img {
    max-height: 64vh;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.action-modal-video-wrap {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
}

.action-modal-video-wrap iframe,
.action-modal-video-wrap video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.action-modal-reel-wrap {
    position: relative;
    width: min(340px, 90vw);
    height: min(560px, 60vh);
    margin: 16px auto;
    border-radius: 12px;
    overflow: hidden;
    background: #000000;
}

.action-modal-reel-wrap iframe,
.action-modal-reel-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: none;
}

.action-modal-info {
    padding: 1.35rem 1.5rem;
    background: #ffffff;
    border-top: 1px solid #e3e8ef;
    overflow-y: auto;
}

.action-modal-header-meta {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.4rem;
}

.action-modal-cat {
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #0f3b63;
}

.action-modal-date {
    font-size: 0.78rem;
    color: #64748b;
}

.action-modal-info h2 {
    font-family: var(--font-primary, "Montserrat", sans-serif);
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f223f;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}

.action-modal-info p {
    font-size: 0.92rem;
    line-height: 1.58;
    color: #4b5563;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (.98px Guards)
   ========================================================================== */
@media (max-width: 991.98px) {
    .action-masonry {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.15rem;
    }

    .action-filter-group {
        grid-template-columns: 1fr;
        gap: 0.35rem;
    }

    .action-filter-label {
        padding-top: 0;
    }

    .action-filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.25rem;
        scrollbar-width: thin;
    }

    .action-pill {
        flex: 0 0 auto;
    }
}

@media (max-width: 575.98px) {
    .action-ledger-row {
        grid-template-columns: 1fr;
        gap: 0.15rem;
    }

    .action-toolbar-card {
        padding: 1rem;
    }

    .action-toolbar-top {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .action-search-form {
        flex: 0 0 auto;
        max-width: none;
        width: 100%;
    }

    .action-masonry {
        grid-template-columns: 1fr;
        gap: 1.15rem;
    }

    .action-cta-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .action-cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
