/* ========================================
   CALENDRIER FRONT-END - STYLE LUXE
   Les Clés de Provence
   ======================================== */

/* Conteneur principal */
.cdp-calendar-wrapper {
    max-width: 100%;
    margin: 40px auto;
    padding: 0;
    background: #ffffff;
    border-radius: 0;
    box-shadow: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* Titre au-dessus du calendrier */
.cdp-calendar-wrapper::before {
    content: '';
    display: block;
    margin-bottom: 30px;
}

/* Navigation */
.cdp-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    color: #2c2c2c;
}

.cdp-nav-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #581327; /* POURPRE PRINCIPAL */
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cdp-nav-btn:hover {
    background: #581327; /* POURPRE EN FOND */
    color: #ffffff; /* TEXTE BLANC */
    transform: none;
}

.cdp-nav-btn.cdp-nav-disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.cdp-nav-btn.cdp-nav-disabled:hover {
    background: transparent;
    color: #581327;
}

.cdp-nav-arrow {
    font-size: 18px;
    font-weight: bold;
}

.cdp-current-months {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-align: center;
    flex: 1;
    color: #2c2c2c;
}

/* Conteneur des mois */
.cdp-months-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px;
    margin-bottom: 35px;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Un mois individuel */
.cdp-month {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    min-width: 0;
}

.cdp-month-header {
    background: transparent;
    color: #581327; /* POURPRE PRINCIPAL POUR LE TITRE DU MOIS */
    padding: 0 0 20px 0;
    text-align: left;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Tableau calendrier */
.cdp-calendar-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 4px;
    background: transparent;
    table-layout: fixed;
}

.cdp-calendar-table th {
    background: transparent;
    color: #6b6b6b;
    padding: 12px 8px;
    text-align: center;
    font-weight: 500;
    font-size: 14px;
    text-transform: lowercase;
    letter-spacing: 0.3px;
    border-bottom: 1px solid #e0e0e0;
}

.cdp-calendar-table td {
    border: none;
    padding: 0;
    height: 65px;
    vertical-align: middle;
    position: relative;
    background: #f5f5f5;
    transition: background 0.2s;
    border-radius: 4px;
    text-align: center;
}

.cdp-day-empty {
    background: transparent !important;
}

.cdp-day {
    cursor: default;
}

.cdp-day:hover {
    background: #ececec;
}

.cdp-day-number {
    padding: 0;
    font-size: 16px;
    font-weight: 500;
    color: #2c2c2c;
    line-height: 65px;
}

.cdp-today {
    background: #ffffff !important;
    box-shadow: 0 0 0 2px #581327 inset;
}

.cdp-today .cdp-day-number {
    color: #581327;
    font-weight: 700;
}

.cdp-past {
    background: #fafafa !important;
}

.cdp-past .cdp-day-number {
    color: #c0c0c0;
}

/* Réservations - BLOCS PLEINS */
.cdp-day-reservations {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    pointer-events: none;
}

/* Case avec réservation */
.cdp-day:has(.cdp-reservation-band) {
    background: transparent !important;
}

.cdp-reservation-band {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #2c2c2c;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    box-shadow: none;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Disponible - Pêche clair */
.cdp-band-disponible {
    background: #FFEEE0;
    color: #2c2c2c;
    font-size: 16px;
    font-weight: 500;
    text-transform: none;
}

/* Réservé/Bloqué - Pourpre clair (jours intermédiaires) */
.cdp-band-reserve,
.cdp-band-bloque {
    background: #E8D4DA;
    color: #581327;
}

/* Jour d'arrivée - Biseau diagonal (pêche haut-gauche → pourpre bas-droite) */
.cdp-band-arrival {
    background: linear-gradient(135deg, #FFEEE0 0%, #FFEEE0 50%, #E8D4DA 50%, #E8D4DA 100%);
    color: #581327;
    font-size: 10px;
}

/* Jour de départ - Biseau diagonal (pourpre haut-gauche → pêche bas-droite) */
.cdp-band-departure {
    background: linear-gradient(135deg, #E8D4DA 0%, #E8D4DA 50%, #FFEEE0 50%, #FFEEE0 100%);
    color: #581327;
    font-size: 10px;
}

/* Bandes de continuation (sans texte) */
.cdp-band-continue {
    font-size: 0;
    color: transparent;
}

/* Légende */
.cdp-calendar-legend {
    display: flex;
    justify-content: center;
    gap: 35px;
    padding: 25px 0 0 0;
    background: transparent;
    border-radius: 0;
    flex-wrap: wrap;
}

.cdp-legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #6b6b6b;
}

.cdp-legend-box {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    box-shadow: none;
    border: 1px solid #e0e0e0;
}

.cdp-legend-disponible {
    background: #FFEEE0;
    border-color: #FAC59C;
}

.cdp-legend-reserve {
    background: #E8D4DA;
    border-color: #B08893;
}

.cdp-legend-bloque {
    background: #E8D4DA;
    border-color: #B08893;
}

/* Légende pour les jours de transition (arrivée/départ) */
.cdp-legend-transition {
    background: linear-gradient(135deg, #FFEEE0 0%, #FFEEE0 50%, #E8D4DA 50%, #E8D4DA 100%);
    border-color: #B08893;
}

/* Message d'erreur */
.cdp-error {
    background: #fee;
    border-left: 4px solid #d63638;
    padding: 15px;
    border-radius: 4px;
    color: #d63638;
    font-weight: 600;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablette (1 mois) */
@media screen and (max-width: 1140px) {
    .cdp-months-container {
        grid-template-columns: 1fr;
        gap: 30px;
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
    }
    
    .cdp-month {
        scroll-snap-align: start;
        min-width: 100%;
    }
    
    .cdp-nav-text {
        display: none;
    }
    
    .cdp-current-months {
        font-size: 20px;
    }
}

/* Mobile */
@media screen and (max-width: 768px) {
    .cdp-calendar-wrapper {
        padding: 0;
        margin: 30px auto;
    }
    
    .cdp-calendar-nav {
        margin-bottom: 25px;
    }
    
    .cdp-nav-btn {
        padding: 6px 10px;
        font-size: 14px;
    }
    
    .cdp-current-months {
        font-size: 18px;
    }
    
    .cdp-month-header {
        font-size: 18px;
        padding-bottom: 15px;
    }
    
    .cdp-calendar-table {
        border-spacing: 3px;
    }
    
    .cdp-calendar-table th {
        padding: 10px 4px;
        font-size: 12px;
    }
    
    .cdp-calendar-table td {
        height: 55px;
    }
    
    .cdp-day-number {
        font-size: 14px;
        line-height: 55px;
    }
    
    .cdp-reservation-band {
        font-size: 9px;
    }
    
    .cdp-band-disponible {
        font-size: 14px;
    }
    
    .cdp-band-arrival,
    .cdp-band-departure {
        font-size: 8px;
    }
    
    .cdp-calendar-legend {
        gap: 20px;
        padding: 20px 0 0 0;
    }
    
    .cdp-legend-item {
        font-size: 13px;
    }
    
    .cdp-legend-box {
        width: 24px;
        height: 24px;
    }
}

/* Très petit mobile */
@media screen and (max-width: 480px) {
    .cdp-calendar-table td {
        height: 50px;
    }
    
    .cdp-day-number {
        font-size: 13px;
        line-height: 50px;
    }
    
    .cdp-reservation-band {
        font-size: 8px;
    }
    
    .cdp-band-disponible {
        font-size: 13px;
    }
    
    .cdp-band-arrival,
    .cdp-band-departure {
        font-size: 7px;
    }
    
    .cdp-calendar-legend {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}