/*
 * Styles for the Judo Events Calendar (Grid View)
 */

.cej-calendar-wrapper {
    margin: 2em 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    position: relative; /* Contexte de positionnement pour le chargement */
}

.cej-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5em;
}

.cej-calendar-title {
    margin: 0;
    font-size: 1.8em;
    font-weight: 500;
    color: #2c3e50;
}

.cej-calendar-nav a {
    text-decoration: none;
    padding: 0.5em 1em;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #34495e;
    transition: background-color 0.2s, color 0.2s;
}

.cej-calendar-nav a:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.cej-calendar-grid {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* Important for equal column widths */
}

.cej-calendar-grid th {
    background-color: #f9f9f9;
    padding: 1em;
    text-align: center;
    font-weight: 600;
    color: #34495e;
    border-bottom: 2px solid #ddd;
}

.cej-calendar-grid td {
    border: 1px solid #e9e9e9;
    height: 120px;
    padding: 8px;
    vertical-align: top;
    transition: background-color 0.2s;
}

.cej-calendar-grid td:not(.empty):hover {
    background-color: #fdfdfd;
}

.cej-calendar-grid td.empty {
    background-color: #fcfcfc;
}

.cej-calendar-grid td.today {
    background-color: #fff9c4;
    border: 1px solid #fbc02d;
}

.cej-calendar-grid .day-number {
    font-weight: 500;
    font-size: 1.1em;
    text-align: right;
    margin-bottom: 0.4em;
    color: #7f8c8d;
}

.cej-calendar-grid td.today .day-number {
    font-weight: 700;
    color: #f57f17;
}

.cej-calendar-grid .events-list {
    font-size: 0.85em;
}

.cej-calendar-grid .events-list a {
    display: block;
    margin-bottom: 4px;
    padding: 4px 6px;
    background-color: #eaf2f8;
    border-radius: 3px;
    text-decoration: none;
    color: #2980b9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s, color 0.2s;
}

.cej-calendar-grid .events-list a:hover {
    background-color: #d4e6f1;
    color: #1a5276;
}

/* Style pour l'état de chargement AJAX */
.cej-calendar-wrapper.loading {
    opacity: 0.6;
    transition: opacity 0.15s ease-in-out;
    pointer-events: none; /* Empêche les clics multiples pendant le chargement */
}
