/* =============================================
   CALENDRIER KREM — Compact & Responsive
   ============================================= */

.krem-cal {
    width: 100%;
    max-width: 280px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 10px;
    box-sizing: border-box;
    font-family: inherit;
}

/* --- EN-TÊTE --- */
.krem-cal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.krem-cal__titre {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.krem-cal__mois {
    font-size: 0.95em;
    font-weight: 700;
    color: #222;
    text-transform: capitalize;
}

.krem-cal__annee {
    font-size: 0.75em;
    color: #999;
}

/* --- BOUTONS NAVIGATION --- */
.krem-cal__nav {
    display: flex;
    gap: 4px;
}

.krem-cal__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #333;
    font-size: 1em;
    text-decoration: none !important;
    line-height: 1;
    transition: background 0.2s;
}

.krem-cal__nav-btn:hover {
    background: #ec4447;
    color: #fff !important;
}

/* =============================================
   GRILLE 7 COLONNES
   ============================================= */
.krem-cal__grille {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px;
    width: 100%;
}

/* --- ENTÊTES JOURS (L M M J V S D) --- */
.krem-cal__cell--entete {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6em;
    font-weight: 700;
    color: #bbb;
    text-transform: uppercase;
    height: 20px;
}

/* --- CELLULES VIDES --- */
.krem-cal__cell--vide {
    height: 28px;
}

/* --- CELLULES JOURS --- */
.krem-cal__cell--jour {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 28px;
    font-size: 0.75em;
    color: #333;
    position: relative;
}

.krem-cal__cell--jour span,
.krem-cal__cell--jour a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-decoration: none !important;
    color: inherit;
    font-size: 1em;
}

/* --- JOURS PASSÉS : grisés --- */
.krem-cal__cell--jour.is-past span,
.krem-cal__cell--jour.is-past a,
.krem-cal__cell--jour.is-other-month span {
    color: #ccc !important;
}

/* --- AUJOURD'HUI --- */
.krem-cal__cell--jour.is-today > span,
.krem-cal__cell--jour.is-today > a {
    border-bottom: 2px solid #222;
    border-radius: 50% 50% 0 0;
    font-weight: 700;
}

/* --- ÉVÉNEMENT FUTUR (rouge + cliquable) --- */
.krem-cal__cell--jour.has-event:not(.is-past) a {
    background: #ec4447;
    color: #fff !important;
    font-weight: 700;
    transition: background 0.2s, transform 0.15s;
}

.krem-cal__cell--jour.has-event:not(.is-past) a:hover {
    background: #c0292b;
    transform: scale(1.1);
}

/* --- ÉVÉNEMENT PASSÉ (rouge grisé, non cliquable) --- */
.krem-cal__cell--jour.has-event.is-past span,
.krem-cal__cell--jour.is-other-month.has-event span {
    background: #e8a0a1;
    color: #fff !important;
    border-radius: 50%;
}

/* --- AUJOURD'HUI + ÉVÉNEMENT --- */
.krem-cal__cell--jour.is-today.has-event a {
    background: #ec4447;
    color: #fff !important;
    border-radius: 50% 50% 0 0;
    border-bottom: 2px solid #222;
}

/* --- RESPONSIVE --- */
@media (max-width: 320px) {
    .krem-cal {
        padding: 6px;
    }

    .krem-cal__cell--jour,
    .krem-cal__cell--vide {
        height: 24px;
    }

    .krem-cal__cell--jour span,
    .krem-cal__cell--jour a {
        width: 20px;
        height: 20px;
        font-size: 0.7em;
    }
}
