/* =================================
   📅 CALENDRIER REPAIR CAFÉ
================================= */


/* Conteneur principal */

.calendar-container {

    width: 100%;

    max-width: 900px;

    margin: 20px auto;

    border:

        1px solid var(--dark-gray);

    border-radius:
        var(--border-radius);

    overflow: hidden;

    background: white;

}

/* Conteneur calendrier */
.calendar-container,
.calendar-box {
    position: relative;
    overflow: visible !important;
    z-index: 1;
}


/* Popup événement */
.event-tooltip {
    position: absolute;
    z-index: 9999 !important;
}


/* En-tête mois */

.calendar-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    background:
        var(--primary-color);

    color: white;

    padding: 12px;

}



.calendar-header h3 {

    margin: 0;

    font-size: 1.2rem;

}



.calendar-header button {

    background: none;

    border: none;

    color: white;

    font-size: 1.5rem;

    cursor: pointer;

}



/* Jours semaine */

.calendar-weekdays {

    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

    background:
        var(--light-gray);

    font-weight: bold;

    text-align: center;

}



.calendar-weekdays div {

    padding: 8px 0;

}



/* Grille des jours */

.calendar-days {

    display: grid;

    grid-template-columns:
        repeat(7, 1fr);

}



/* Case jour */

.calendar-day {

    position: relative;

    min-height: 55px;

    border:

        1px solid var(--medium-gray);

    display: flex;

    justify-content: center;

    align-items: flex-start;

    padding-top: 8px;

    font-size: .9rem;

}



/* Jour actuel */

.calendar-day.today {

    background:
        var(--primary-light);

    font-weight: bold;

}



/* Jour avec événement */

.calendar-day.has-event {

    background: #e3f2fd;

    cursor: pointer;

    font-weight: bold;

}



.calendar-day.has-event:hover {

    background: #bbdefb;

}



/* Petit point événement */

.calendar-day.has-event::after {

    content: "";

    position: absolute;

    bottom: 5px;

    width: 8px;

    height: 8px;

    border-radius: 50%;

    background:
        var(--primary-color);

}



/* =================================
   💬 INFO EVENEMENT
================================= */


.event-tooltip {

    position: absolute;

    top: 45px;

    left: 50%;

    transform:
        translateX(-50%);

    width: 220px;

    background: white;

    border:

        1px solid var(--dark-gray);

    border-radius: 8px;

    padding: 10px;

    box-shadow:
        var(--shadow);

    z-index: 1000;

    display: none;

}



.calendar-day.has-event:hover .event-tooltip {

    display: block;

}



/* =================================
   📋 LISTE EVENEMENTS
================================= */


.events-list {

    width: 100%;

    margin-top: 20px;

}



.event-card {

    background: white;

    border:

        1px solid var(--dark-gray);

    border-radius:
        var(--border-radius);

    padding: 15px;

    margin-bottom: 15px;

}



.event-card h3 {

    color:
        var(--primary-color);

}


/* =========================
   CALENDRIER POPUP MODAL
========================= */

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    width: 420px;
    max-width: 95%;
    padding: 20px;
    border-radius: 12px;
}

.modal-close {
    float: right;
    font-size: 24px;
    cursor: pointer;
}

.calendar-day {
    position: relative;
}

.event-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #2e8b57;
    color: white;
    border-radius: 50%;
    font-size: 12px;
    padding: 2px 6px;
}

/* =================================
   📱 TABLETTE / GALAXY A9
================================= */


@media(max-width:900px) {


    .calendar-day {

        min-height: 45px;

        padding-top: 6px;

        font-size: .85rem;

    }


}



@media(max-width:600px) {


    .calendar-header {

        padding: 8px;

    }


    .calendar-header h3 {

        font-size: 1rem;

    }


    .calendar-day {

        min-height: 38px;

        font-size: .75rem;

    }


    .event-tooltip {

        width: 180px;

        font-size: .8rem;

    }


}

/* =========================
🛠️ COMPETENCES HONOREES (événements à venir)
========================= */

table.competences-status {

    width: 100%;

    margin: .6rem 0;

    border-collapse: collapse;

    border: 1px solid var(--dark-gray);

    font-size: .9rem;

}

table.competences-status th,
table.competences-status td {

    padding: .15rem .5rem;

    text-align: left;

    border: 1px solid var(--dark-gray);

}

table.competences-status th {

    color: var(--dark-gray);

    font-weight: 600;

}

table.competences-status tr.ok td {

    color: var(--secondary-color);

}

table.competences-status tr.manque td {

    color: var(--red);

}