/**
 * Calendar Fixes - Desktop et Mobile
 */

/* ========================================
   DESKTOP CALENDAR FIX
   ======================================== */
@media (min-width: 769px) {
    .calendar-desktop {
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        max-width: 500px;
    }
    
    .calendar-view {
        height: auto !important;
        overflow: visible !important;
    }
    
    .calendar {
        height: auto !important;
    }
    
    .calendar-grid {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
        min-height: auto;
    }
    
    .day {
        aspect-ratio: 1;
        min-height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
        padding: 0;
    }
}

/* ========================================
   MOBILE CALENDAR SIZE
   ======================================== */
@media (max-width: 768px) {
    .calendar-desktop {
        max-height: 280px;
        overflow-y: auto;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .day {
        min-height: 24px;
        font-size: 11px;
    }
}

/* ========================================
   SPACING FIXES
   ======================================== */
@media (max-width: 768px) {
    /* Spacing managed in step-banner.css - removed to avoid conflicts */
    
    /* Espacement après banner pour éviter surcharge */
    .step-panel > .page-header:first-of-type {
        margin-top: 16px;
    }
}

/* ========================================
   CALENDAR GRID VISIBILITY
   ======================================== */
.calendar-grid {
    width: 100%;
    box-sizing: border-box;
}

/* Assurer que tous les jours sont visibles */
.day {
    min-width: 0;
    word-break: break-word;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.day:hover:not(.disabled):not(.empty) {
    background: #f0f7ff;
    border-color: #93c5fd;
}

.day.empty {
    visibility: hidden;
}

.day-header {
    font-weight: 600;
    text-align: center;
    padding: 8px 0;
    font-size: 12px;
    color: #6b7280;
}

/* Calendrier padding réduit */
.calendar {
    padding: 8px !important;
}

.calendar-header {
    margin-bottom: 8px !important;
}

@media (min-width: 769px) {
    .calendar {
        padding: 10px !important;
    }
    
    .calendar-header {
        margin-bottom: 10px !important;
    }
    
    .calendar-header h2 {
        font-size: 16px !important;
        margin-bottom: 8px !important;
    }
    
    .calendar-nav button {
        font-size: 12px !important;
        padding: 4px 8px !important;
    }
}
