/* =========================================================
   HERO
========================================================= */

.page-hero {
    position: relative;
    padding: 4.5rem 0 3rem;
    overflow: hidden;
}

.page-hero--calendar {
    background: linear-gradient(
        135deg,
        #666666 0%,
        #666666 45%,
        #666666 100%
    );
}

.page-hero--calendar::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        circle at top right,
        rgba(255, 255, 255, 0.15) 0%,
        rgba(255, 255, 255, 0.06) 25%,
        rgba(255, 255, 255, 0) 55%
    );
}

.page-hero--calendar::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.18);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero .eyebrow {
    color: rgba(230, 230, 230, 0.9);
}

.page-hero h1 {
    margin: 0.5rem 0 1rem;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.1;
    color: #ffffff;
}

.page-hero__text {
    max-width: 70ch;
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.94);
}

/* image à droite uniquement sur desktop */
@media (min-width: 901px) {
    .page-hero--calendar::before {
        background:
            linear-gradient(
                90deg,
                rgba(102, 102, 102, 1) 0%,
                rgba(102, 102, 102, 1) 20%,
                rgba(102, 102, 102, 1) 50%,
                rgba(102, 102, 102, 0) 100%
            ),
            radial-gradient(
                circle at top right,
                rgba(255, 255, 255, 0.15) 0%,
                rgba(255, 255, 255, 0.06) 25%,
                rgba(255, 255, 255, 0) 55%
            ),
            url("../images/fond-elearning-2.png");
        background-repeat: no-repeat, no-repeat, no-repeat;
        background-position: top right;
        background-size: 60%;
        opacity: 0.45;
    }
}

/* =========================================================
   CALENDAR
========================================================= */

.calendar-logo {
    margin-bottom: 2rem;
}

.calendar-logo img {
    max-height: 90px;
}

.calendar-empty {
    padding: 2rem;
    background: #ffffff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.calendar-year-block + .calendar-year-block {
    margin-top: 3rem;
}

.calendar-year-title {
    margin: 0 0 2rem;
    font-size: 1.8rem;
    line-height: 1.2;
}

.calendar-year-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    margin-top: 12px;
    background: #666666;
}

.calendar-month-block + .calendar-month-block {
    margin-top: 2rem;
}

.calendar-month-title {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    line-height: 1.2;
    color: #444444;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.calendar-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
    background: #ffffff;
}

.calendar-card__top {
    padding: 0.7rem 1rem;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
}

.calendar-card__bottom {
    min-height: 110px;
    padding: 1rem 1rem 1rem 5rem;
    background-color: rgba(255, 255, 255, 0.92);
    background-repeat: no-repeat;
    background-position: left 1rem center;
    background-size: 42px auto;
    line-height: 1.6;
}

/* Couleurs domaines */

.calendar-card--SECOURISME .calendar-card__top {
    background: rgba(0, 154, 85, 1);
}

.calendar-card--SECOURISME .calendar-card__bottom {
    background-image: url("../images/fili-sst.png");
}

.calendar-card--HABILITATION-ELECTRIQUE .calendar-card__top {
    background: rgba(255, 196, 10, 1);
    color: #1f2937;
}

.calendar-card--HABILITATION-ELECTRIQUE .calendar-card__bottom {
    background-image: url("../images/fili-hab.png");
}

.calendar-card--RISQUE-AMIANTE .calendar-card__top {
    background: rgba(227, 7, 19, 1);
}

.calendar-card--RISQUE-AMIANTE .calendar-card__bottom {
    background-image: url("../images/fili-ami.png");
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 960px) {
    .calendar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .page-hero {
        padding: 3.5rem 0 2.5rem;
    }

    .calendar-grid {
        grid-template-columns: 1fr;
    }

    .calendar-card__bottom {
        min-height: auto;
    }
}