.c212-anepasrater {
    --c212-anpr-accent: #c33237;
    --c212-anpr-primary: #002c49;
}

/* ── Grid ── */
.c212-anepasrater-list {
    display: grid;
    gap: 12px;
}

.c212-anepasrater--cols-2 .c212-anepasrater-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.c212-anepasrater--cols-3 .c212-anepasrater-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.c212-anepasrater-item.is-hidden {
    display: none;
}

.c212-anepasrater-heading {
    background: var(--c212-anpr-accent);
    border-radius: 14px;
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin-bottom: 18px;
    padding: 12px 16px;
    text-align: center;
    text-transform: uppercase;
}

.c212-event-detail {
    display: grid;
    gap: 24px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.c212-event-detail-media,
.c212-event-detail-body {
    max-width: 100%;
    min-width: 0;
    width: 100%;
}

.c212-event-detail-media img {
    border-radius: 12px;
    display: block;
    height: auto;
    width: 100%;
}

.c212-event-detail-body {
    color: #222;
}

.c212-event-detail-meta {
    color: var(--c212-anpr-accent);
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.c212-event-detail-date {
    text-transform: uppercase;
}

.c212-event-detail-title {
    color: #002c49;
    font-size: 34px;
    line-height: 1.15;
    margin: 0 0 8px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.c212-event-detail-description {
    font-size: 16px;
    line-height: 1.75;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.c212-event-detail-description > :first-child { margin-top: 0; }
.c212-event-detail-description > :last-child { margin-bottom: 0; }

.c212-event-detail-link-wrap {
    margin: 18px 0 0;
}

.c212-event-detail-share {
    justify-content: flex-start;
    margin-top: 18px;
}

.c212-event-detail-related {
    margin-top: 36px;
}

/* ── Card ── */
.c212-anepasrater-trigger {
    appearance: none;
    background-color: #1a2a3a;
    background-position: center;
    background-size: cover;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    display: block;
    overflow: hidden;
    padding: 0;
    position: relative;
    text-decoration: none;
    width: 100%;
    aspect-ratio: 16 / 10;
    text-align: left;
    transition: transform 0.18s ease;
}

.c212-anepasrater-trigger:visited {
	color: inherit;
}

.c212-anepasrater-trigger--static {
	cursor: default;
}

.c212-anepasrater-trigger:hover,
.c212-anepasrater-trigger:focus-visible {
    outline: none;
    transform: scale(1.015);
}

.c212-anepasrater-trigger--static:hover,
.c212-anepasrater-trigger--static:focus-visible {
	transform: none;
}

.c212-anepasrater-card-body {
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.3) 60%, transparent 100%);
    bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    left: 0;
    padding: 14px 14px 16px;
    position: absolute;
    right: 0;
}

.c212-anepasrater-title {
    color: #fff;
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.c212-anepasrater--layout-list .c212-anepasrater-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.c212-anepasrater-list-link {
    align-items: flex-start;
    color: inherit;
    display: flex;
    gap: 14px;
    text-decoration: none;
}

.c212-anepasrater-list-link--static {
    cursor: default;
}

.c212-anepasrater-list-thumb {
    display: block;
    flex: 0 0 88px;
    width: 88px;
}

.c212-anepasrater-list-thumb img {
    border-radius: 10px;
    display: block;
    height: 88px;
    object-fit: cover;
    width: 88px;
}

.c212-anepasrater-list-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.c212-anepasrater-list-meta {
    color: #5a5a5a;
    display: block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.c212-anepasrater-list-title {
    color: #111;
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.c212-anepasrater-list-link:hover .c212-anepasrater-list-title,
.c212-anepasrater-list-link:focus-visible .c212-anepasrater-list-title {
    color: var(--c212-anpr-accent);
}

.c212-anepasrater-list-link:focus-visible {
    outline: none;
}

.c212-anepasrater-meta {
    color: rgba(255, 255, 255, 0.85);
    display: block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    overflow-wrap: anywhere;
}

.c212-anepasrater-date {
    text-transform: uppercase;
}

.c212-anepasrater-meta-separator,
.c212-anepasrater-location {
    text-transform: none;
}

.c212-anepasrater-location {
    letter-spacing: 0;
}

.c212-anepasrater-meta-modal {
    color: var(--c212-anpr-accent) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 8px;
}

.c212-anepasrater-date-modal {
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.c212-anepasrater-empty {
    color: #6c7b8a;
    padding: 18px;
}

/* ── Voir plus ── */
.c212-anepasrater-actions {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.c212-anepasrater--layout-list .c212-anepasrater-actions {
    justify-content: center;
    margin-top: 22px;
}

.c212-anepasrater-more {
    appearance: none;
    background: var(--c212-anpr-accent);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
    min-width: 0;
    padding: 9px 20px;
    text-transform: uppercase;
    transition: opacity 0.18s ease;
}

.c212-anepasrater-more:hover,
.c212-anepasrater-more:focus-visible {
    opacity: 0.85;
    outline: none;
}

.c212-anepasrater-more::after {
    content: " >";
    font-weight: 700;
}

.c212-anepasrater-more.is-hidden {
    display: none;
}

.c212-anepasrater--layout-list .c212-anepasrater-more {
    border-radius: 999px;
}

/* ── Popup ── */
.c212-anepasrater-modal {
    --c212-anpr-accent: #c33237;
    --c212-anpr-primary: #002c49;
    align-items: center;
    display: flex;
    justify-content: center;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.2s ease;
    z-index: 999999;
}

.c212-anepasrater-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.c212-anepasrater-backdrop {
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.18);
    inset: 0;
    position: absolute;
}

.c212-anepasrater-dialog {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: calc(100dvh - 40px);
    max-width: min(560px, calc(100vw - 24px));
    margin: 20px auto;
    overflow-y: auto;
    position: relative;
    width: 100%;
}

.c212-anepasrater-close {
    appearance: none;
    background: rgba(255,255,255,0.9);
    border: 0;
    border-radius: 999px;
    color: #002c49;
    cursor: pointer;
    font-size: 22px;
    height: 36px;
    line-height: 36px;
    padding: 0;
    position: absolute;
    right: 12px;
    text-align: center;
    top: 12px;
    width: 36px;
    z-index: 2;
}

.c212-anepasrater-media img {
    border-radius: 10px 10px 0 0;
    display: block;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
}

.c212-anepasrater-content {
    padding: 18px 22px 22px;
}

.c212-anepasrater-location-modal,
.c212-anepasrater-meta-separator-modal {
    text-transform: none;
    letter-spacing: 0;
}

.c212-anepasrater-content h3 {
    color: #002c49;
    font-size: 20px;
    line-height: 1.25;
        margin: 0 0 4px;
}

.c212-anepasrater-description {
    color: #333;
    font-size: 15px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.c212-anepasrater-link-wrap {
    margin: 10px 0 0;
}

.c212-anepasrater-link {
    color: #002c49;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
}

.c212-anepasrater-link:hover {
    color: var(--c212-anpr-accent);
}

.c212-anepasrater-description > :first-child { margin-top: 0; }
.c212-anepasrater-description > :last-child  { margin-bottom: 0; }

/* ── Share buttons ── */
.c212-anepasrater-share {
    border-top: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
    padding-top: 14px;
}

.c212-share-btn {
    align-items: center;
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    text-decoration: none;
    transition: opacity 0.15s ease;
    width: 40px;
}

.c212-share-btn:hover {
    opacity: 0.85;
    text-decoration: none;
}

.c212-share-fb { background: #1877f2; }
.c212-share-wa { background: #25d366; }
.c212-share-x  { background: #000; }
.c212-share-ig { background: radial-gradient(circle at 30% 110%, #ffdf8e 0%, #f77737 25%, #f54ea2 50%, #833ab4 75%, #405de6 100%); }

body.c212-anepasrater-open {
    overflow: hidden;
}

/* ── Mobile ── */
@media (max-width: 767px) {
    .c212-event-template > .tdc-content-wrap,
    .c212-event-template > .td-container.tdc-content-wrap {
        box-sizing: border-box;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        width: 100%;
    }

    /* Padding only on the event-specific blocks, not the whole page wrapper */
    .c212-event-template .c212-event-detail,
    .c212-event-template .c212-anepasrater {
        padding-left: 16px;
        padding-right: 16px;
    }

    .c212-event-template .td-pb-row,
    .c212-event-template .vc_row,
    .c212-event-template .wpb_row,
    .c212-event-template .tdc-row,
    .c212-event-template .tdc-row-composer {
        clear: both;
        display: block !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .c212-event-template .td-pb-row::after,
    .c212-event-template .vc_row::after,
    .c212-event-template .wpb_row::after,
    .c212-event-template .tdc-row::after,
    .c212-event-template .tdc-row-composer::after {
        clear: both;
        content: "";
        display: table;
    }

    .c212-event-template .td-pb-row > [class*="td-pb-span"],
    .c212-event-template .td-main-content,
    .c212-event-template .td-main-sidebar,
    .c212-event-template [class*="vc_col-"],
    .c212-event-template .wpb_column,
    .c212-event-template .vc_column_container,
    .c212-event-template .tdc-column,
    .c212-event-template .tdc-elements-column {
        clear: both;
        display: block !important;
        float: none !important;
        margin-bottom: 24px;
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    .c212-event-template .td_block_wrap,
    .c212-event-template .wpb_wrapper,
    .c212-event-template .vc_column-inner,
    .c212-event-template .tdc-column,
    .c212-event-template .tdc-elements,
    .c212-event-template .c212-event-detail,
    .c212-event-template .c212-anepasrater {
        clear: both;
        margin-left: auto;
        margin-right: auto;
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .c212-event-template .c212-anepasrater-empty {
        text-align: center;
    }

    .c212-anepasrater--cols-2 .c212-anepasrater-list,
    .c212-anepasrater--cols-3 .c212-anepasrater-list {
        grid-template-columns: 1fr;
    }

    .c212-event-detail-title {
        font-size: 26px;
    }

    .c212-event-detail-share {
        justify-content: center;
    }

    .c212-anepasrater-list-thumb {
        flex-basis: 78px;
        width: 78px;
    }

    .c212-anepasrater-list-thumb img {
        height: 78px;
        width: 78px;
    }

    .c212-anepasrater-list-title {
        font-size: 16px;
    }

    .c212-anepasrater-dialog {
        border-radius: 12px;
        bottom: auto;
        max-height: calc(100dvh - 24px);
        max-width: calc(100vw - 16px);
        position: fixed;
        margin: 0;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100vw - 16px);
    }

    .c212-anepasrater-media img {
        border-radius: 12px 12px 0 0;
        max-height: 220px;
    }

    .c212-anepasrater-content {
        padding: 16px 16px 24px;
    }

    .c212-anepasrater-content h3 {
        font-size: 18px;
    }
}
