/* ========================================
   CONTAINER PRINCIPAL
======================================== */
.cmm-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ========================================
   CONTRÔLES - Design minimaliste moderne
======================================== */
.cmm-controls {
    margin-bottom: 30px;
}

.cmm-view-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.cmm-view-btn {
    padding: 12px 28px;
    border: none;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.cmm-view-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.cmm-view-btn.active {
    background: #276346;
    color: #FFFFFF;
    font-weight: 600;
}

/* ========================================
   BARRE DE RECHERCHE + FILTRE - Layout horizontal optimisé
======================================== */
.cmm-search-filter-bar {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    flex-wrap: wrap;
}

.cmm-search-filter-bar > * {
    flex: 1;
    min-width: 200px;
}

.cmm-category-filter {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cmm-category-filter label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.cmm-category-select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s;
    cursor: pointer;
}

.cmm-category-select:focus {
    outline: none;
    border-color: #276346;
}

.cmm-category-select:hover {
    border-color: #c0c0c0;
}

.cmm-search {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 2;
}

.cmm-search input[type="date"] {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    transition: border-color 0.2s;
}

.cmm-search input[type="date"]:focus {
    outline: none;
    border-color: #276346;
}

.cmm-search-separator {
    color: #999;
    font-size: 18px;
    font-weight: 300;
}

.cmm-search-btn,
.cmm-reset-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cmm-search-btn {
    background: #276346;
    color: #FFFFFF;
}

.cmm-search-btn:hover {
    background: #1e4a35;
    transform: translateY(-1px);
}

.cmm-reset-btn {
    background: #fff;
    color: #666;
    border: 2px solid #e0e0e0;
}

.cmm-reset-btn:hover {
    border-color: #c0c0c0;
    background: #f5f5f5;
}

/* ========================================
   NAVIGATION
======================================== */
.cmm-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 15px;
}

.cmm-nav-btn {
    padding: 12px 24px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.2s;
}

.cmm-nav-btn:hover {
    border-color: #276346;
    background: #f8faf9;
    color: #276346;
}

/* ========================================
   CALENDRIERS - Layout horizontal
======================================== */
.cmm-calendar-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.cmm-calendar-month {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.cmm-calendar-month:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* ========================================
   EN-TÊTES - Design moderne avec texte blanc
======================================== */
.cmm-month-header {
    background: linear-gradient(135deg, #276346 0%, #2d7350 100%);
    padding: 20px;
    text-align: center;
    border-radius: 0;
}

.cmm-month-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #FFFFFF !important;
    text-transform: capitalize;
    letter-spacing: 0.3px;
}

/* ========================================
   JOURS DE LA SEMAINE - Texte blanc
======================================== */
.cmm-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #2d7350;
    padding: 12px 0;
}

.cmm-weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #FFFFFF !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   GRILLE DES JOURS
======================================== */
.cmm-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e8e8e8;
    padding: 0;
}

.cmm-day {
    aspect-ratio: 1;
    background: #fff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    transition: background 0.2s;
    position: relative;
}

.cmm-day:hover {
    background: #f8faf9;
}

.cmm-day-empty {
    background: #fafafa;
    cursor: default;
}

.cmm-day-number {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.cmm-today .cmm-day-number {
    background: #276346;
    color: #fff;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

/* ========================================
   ÉVÉNEMENTS
======================================== */
.cmm-event {
    width: 100%;
    padding: 4px 6px;
    margin-top: 2px;
    background: #276346;
    color: #fff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: all 0.2s;
}

.cmm-event:hover {
    background: #1e4a35;
    transform: scale(1.02);
    z-index: 10;
}

/* ========================================
   RESPONSIVE - Tablette
======================================== */
@media (max-width: 1200px) {
    .cmm-calendar-wrapper {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cmm-search-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cmm-search-filter-bar > * {
        min-width: 100%;
    }
    
    .cmm-search {
        flex-direction: column;
    }
}

/* ========================================
   RESPONSIVE - Mobile
======================================== */
@media (max-width: 768px) {
    .cmm-calendar-wrapper {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .cmm-view-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cmm-navigation {
        flex-direction: column;
    }
    
    .cmm-day-number {
        font-size: 12px;
    }
    
    .cmm-event {
        font-size: 10px;
        padding: 3px 5px;
    }
}

/* ========================================
   UTILITAIRES
======================================== */
.cmm-loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

.cmm-no-events {
    text-align: center;
    padding: 20px;
    color: #999;
    font-style: italic;
}
