/* =========================================================
   CALENDRIER - ÉVÉNEMENT
   Chargé uniquement sur la page contenant [cal_events]
   ========================================================= */

:root {
    --cal-events-accent: #ff008c;
    --cal-events-accent-dark: #bd0068;
    --cal-events-background: #000000;
    --cal-events-text: #111111;
    --cal-events-muted: #bdbdbd;
    --cal-events-border: #dedede;
}


/* =========================================================
   FOND GÉNÉRAL
   ========================================================= */

html,
body {
    background: var(--cal-events-background);
}

body {
    color: #ffffff;
}


/* =========================================================
   BARRES DE SÉPARATION
   ========================================================= */

#content {
    box-sizing: border-box;

    /* Barre rose sous l’en-tête */
    border-top: 7px solid var(--cal-events-accent);

    /* Barre blanche au-dessus du pied de page */
    border-bottom: 7px solid #ffffff;

    background:
        radial-gradient(
            circle at 50% 0,
            rgba(255, 0, 140, 0.16) 0,
            rgba(255, 0, 140, 0.06) 24rem,
            transparent 44rem
        ),
        #000000 !important;
}


/* =========================================================
   STRUCTURE ASTRA
   ========================================================= */

#content > .ast-container {
    display: block !important;
    width: 100%;
    max-width: 1240px !important;
    margin: 0 auto;
    padding: 58px 24px !important;
    background: transparent !important;
}

#primary {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

#main {
    width: 100%;
    background: transparent !important;
}

.ast-article-single {
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
}

.entry-content {
    width: 100%;
    max-width: none !important;
    margin: 0 !important;
    background: transparent !important;
}


/* =========================================================
   CONTENEUR PRINCIPAL
   IMPORTANT : fond noir / transparent,
   pas blanc
   ========================================================= */

.cal-events {
    box-sizing: border-box;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: clamp(24px, 3.4vw, 44px);

    color: #ffffff;
    background: transparent;

    border: 1px solid rgba(255, 0, 140, 0.7);
    border-radius: 4px;

    /* Effet néon rose */
    box-shadow:
        0 0 0 1px rgba(255, 0, 140, 0.30),
        0 0 8px rgba(255, 0, 140, 0.30),
        0 0 18px rgba(255, 0, 140, 0.28),
        0 0 34px rgba(255, 0, 140, 0.20),
        inset 0 0 10px rgba(255, 0, 140, 0.08);
}


/* =========================================================
   TITRES
   ========================================================= */

.cal-events__title,
.cal-events__list-title {
    position: relative;
    color: #ffffff;
    font-weight: 400;
}

.cal-events__title {
    margin-top: 0;
    margin-bottom: 12px;
    padding-bottom: 13px;

    font-size: clamp(1.7rem, 3vw, 2.15rem) !important;
    line-height: 1.15 !important;
}

.cal-events__list-title {
    margin-top: 58px;
    margin-bottom: 28px;
    padding-bottom: 12px;

    font-size: clamp(1.65rem, 2.8vw, 2rem) !important;
    line-height: 1.2 !important;
}

.cal-events__title::after,
.cal-events__list-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;

    height: 3px;
    background: var(--cal-events-accent);

    box-shadow:
        0 0 6px rgba(255, 0, 140, 0.45),
        0 0 14px rgba(255, 0, 140, 0.28);
}

.cal-events__title::after {
    width: 70px;
}

.cal-events__list-title::after {
    width: 58px;
}

.cal-events__calendar-help {
    max-width: 760px;
    margin: 0 0 24px;

    color: #d0d0d0;
    font-size: 0.95rem;
    line-height: 1.55;
}


/* =========================================================
   CALENDRIER
   Le calendrier reste blanc
   ========================================================= */

.cal-events__calendar {
    padding: 16px;

    background: #ffffff;
    border: 1px solid rgba(255, 0, 140, 0.18);
    border-radius: 10px;

    box-shadow:
        0 0 0 1px rgba(255, 0, 140, 0.10),
        0 10px 24px rgba(0, 0, 0, 0.18),
        0 0 18px rgba(255, 0, 140, 0.08);

    overflow: hidden;
}


/* Titre du mois */

.fc .fc-toolbar-title {
    color: #000000;
    font-size: clamp(1.25rem, 2.3vw, 1.65rem);
    font-weight: 600;
}


/* Boutons FullCalendar */

.fc .fc-button-primary {
    color: #ffffff !important;
    background: #222b3b !important;
    border-color: #222b3b !important;

    border-radius: 4px;
    box-shadow: none !important;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.fc .fc-button-primary:hover {
    color: #ffffff !important;
    background: #000000 !important;
    border-color: var(--cal-events-accent) !important;
}

.fc .fc-button-primary:focus,
.fc .fc-button-primary:focus-visible {
    outline: 3px solid rgba(255, 0, 140, 0.35) !important;
    outline-offset: 2px;
    box-shadow: none !important;
}

.fc .fc-button-primary:disabled {
    opacity: 0.55;
}


/* Jour actuel */

.fc .fc-day-today {
    background: rgba(255, 0, 140, 0.075) !important;
}


/* Événements dans le calendrier */

.fc .fc-event {
    color: #ffffff;
    background: var(--cal-events-accent-dark);
    border-color: var(--cal-events-accent-dark);

    border-radius: 3px;
    cursor: pointer;
}

.fc .fc-event:hover {
    color: #ffffff;
    background: #930050;
    border-color: #930050;
}

.fc .fc-event:focus,
.fc .fc-event:focus-visible {
    outline: 3px solid var(--cal-events-accent);
    outline-offset: 2px;
}


/* Grille du calendrier */

.fc-theme-standard td,
.fc-theme-standard th,
.fc-theme-standard .fc-scrollgrid {
    border-color: #dddddd;
}

.fc .fc-col-header-cell-cushion,
.fc .fc-daygrid-day-number {
    color: #222222;
}


/* =========================================================
   CARROUSEL
   ========================================================= */

.cal-events__carousel {
    position: relative;
}

.cal-events__carousel-viewport {
    padding: 7px 4px 18px;
}


/* =========================================================
   CARTES ÉVÉNEMENTS
   Elles restent blanches
   avec contour rose plus lumineux
   ========================================================= */

.cal-event-card {
    display: flex;
    flex-direction: column;
    height: 100%;

    color: #151515;
    background: #ffffff;

    border: 1px solid rgba(255, 0, 140, 0.35);
    border-radius: 10px;

    box-shadow:
        0 0 0 1px rgba(255, 0, 140, 0.12),
        0 0 10px rgba(255, 0, 140, 0.10),
        0 10px 24px rgba(0, 0, 0, 0.14);

    overflow: hidden;

    transition:
        border-color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease;
}

.cal-event-card:hover {
    border-color: rgba(255, 0, 140, 0.75);

    box-shadow:
        0 0 0 1px rgba(255, 0, 140, 0.24),
        0 0 10px rgba(255, 0, 140, 0.20),
        0 0 20px rgba(255, 0, 140, 0.16),
        0 12px 28px rgba(0, 0, 0, 0.18);

    transform: translateY(-2px);
}

.cal-event-card:focus,
.cal-event-card:focus-visible {
    outline: none;
    border-color: var(--cal-events-accent);

    box-shadow:
        0 0 0 3px rgba(255, 0, 140, 0.22),
        0 0 18px rgba(255, 0, 140, 0.18),
        0 12px 30px rgba(0, 0, 0, 0.15);
}


/* Carte sélectionnée depuis le calendrier */

.cal-event-card.cal-events-card--highlighted,
.cal-event-card.is-highlighted {
    border-color: var(--cal-events-accent);

    background:
        linear-gradient(
            rgba(255, 0, 140, 0.04),
            rgba(255, 0, 140, 0.04)
        ),
        #ffffff;

    box-shadow:
        0 0 0 2px rgba(255, 0, 140, 0.24),
        0 0 12px rgba(255, 0, 140, 0.24),
        0 0 24px rgba(255, 0, 140, 0.16),
        0 12px 32px rgba(0, 0, 0, 0.16);
}


/* Image */

.cal-event-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;

    background: #f1f1f1;
    overflow: hidden;
}

.cal-event-card__image {
    display: block;
    width: 100%;
    height: 100%;

    object-fit: cover;

    transition: transform 260ms ease;
}

.cal-event-card:hover .cal-event-card__image {
    transform: scale(1.025);
}


/* Contenu de la carte */

.cal-event-card__content {
    display: flex;
    flex: 1;
    flex-direction: column;

    padding: 20px;
}

.cal-event-card__date {
    margin: 0 0 11px;

    color: var(--cal-events-accent-dark);
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.015em;
    text-transform: uppercase;
}

.cal-event-card__title {
    margin: 0 0 15px;

    color: #000000;
    font-size: clamp(1.25rem, 2vw, 1.55rem) !important;
    font-weight: 500;
    line-height: 1.2 !important;
}

.cal-event-card__meta {
    margin: 0 0 16px;
    padding: 0;

    color: #333333;
    font-size: 0.91rem;
    line-height: 1.55;

    list-style: none;
}

.cal-event-card__meta li {
    margin: 0 0 7px;
}

.cal-event-card__label {
    display: block;
    margin-bottom: 1px;

    color: #111111;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}

.cal-event-card__summary {
    margin: auto 0 0;

    color: #555555;
    font-size: 0.91rem;
    line-height: 1.55;
}


/* =========================================================
   FLÈCHES DU CARROUSEL
   ========================================================= */

.cal-events__carousel-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;

    color: #ffffff;
    background: #000000;

    border: 2px solid #000000;
    border-radius: 50%;

    font-size: 1.3rem;
    line-height: 1;

    cursor: pointer;

    transition:
        color 160ms ease,
        background-color 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.cal-events__carousel-arrow:hover {
    color: #ffffff;
    background: var(--cal-events-accent-dark);
    border-color: var(--cal-events-accent);

    box-shadow:
        0 0 8px rgba(255, 0, 140, 0.22),
        0 0 18px rgba(255, 0, 140, 0.12);
}

.cal-events__carousel-arrow:focus,
.cal-events__carousel-arrow:focus-visible {
    outline: none;
    border-color: var(--cal-events-accent);

    box-shadow:
        0 0 0 3px rgba(255, 0, 140, 0.25);
}

.cal-events__carousel-arrow:disabled {
    cursor: default;
    opacity: 0.35;
}


/* =========================================================
   PAGINATION DU CARROUSEL
   ========================================================= */

.cal-events__carousel-indicators {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.cal-events__carousel-indicators button {
    width: 10px;
    min-width: 10px;
    height: 10px;
    padding: 0;

    background: #bcbcbc;
    border: 0;
    border-radius: 50%;

    box-shadow: none;

    transition:
        width 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.cal-events__carousel-indicators button:hover,
.cal-events__carousel-indicators button[aria-current="true"],
.cal-events__carousel-indicators button.is-active {
    width: 24px;

    background: var(--cal-events-accent);
    border-radius: 999px;

    box-shadow:
        0 0 8px rgba(255, 0, 140, 0.24);
}

.cal-events__carousel-indicators button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 0, 140, 0.28);
}


/* =========================================================
   TABLETTE
   ========================================================= */

@media (max-width: 921px) {

    #content > .ast-container {
        padding: 42px 20px !important;
    }

    .cal-events {
        padding: 28px 24px;
    }

    .cal-events__list-title {
        margin-top: 46px;
    }

    .cal-events__calendar {
        padding: 12px;
    }
}


/* =========================================================
   TÉLÉPHONE
   ========================================================= */

@media (max-width: 600px) {

    #content {
        border-top-width: 6px;
        border-bottom-width: 6px;
    }

    #content > .ast-container {
        padding: 28px 10px !important;
    }

    .cal-events {
        padding: 22px 14px;
        border-radius: 3px;

        box-shadow:
            0 0 0 1px rgba(255, 0, 140, 0.24),
            0 0 10px rgba(255, 0, 140, 0.20),
            0 0 20px rgba(255, 0, 140, 0.16),
            inset 0 0 10px rgba(255, 0, 140, 0.05);
    }

    .cal-events__title {
        font-size: 1.65rem !important;
    }

    .cal-events__calendar-help {
        font-size: 0.88rem;
    }

    .cal-events__calendar {
        padding: 7px;
        border-radius: 6px;
    }

    .fc .fc-toolbar {
        display: flex;
        flex-wrap: wrap;
        gap: 9px;
    }

    .fc .fc-toolbar-title {
        font-size: 1.25rem;
    }

    .fc .fc-button {
        padding: 0.45em 0.65em;
        font-size: 0.78rem;
    }

    .fc .fc-col-header-cell-cushion,
    .fc .fc-daygrid-day-number {
        font-size: 0.72rem;
    }

    .fc .fc-event {
        font-size: 0.68rem;
    }

    .cal-events__list-title {
        margin-top: 38px;
        margin-bottom: 22px;
    }

    .cal-event-card__content {
        padding: 18px;
    }
}


/* =========================================================
   RÉDUCTION DES ANIMATIONS
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cal-event-card,
    .cal-event-card__image,
    .cal-events__carousel-arrow,
    .cal-events__carousel-indicators button {
        transition: none;
    }

    .cal-event-card:hover {
        transform: none;
    }

    .cal-event-card:hover .cal-event-card__image {
        transform: none;
    }
}