/* ========================
   DATEPICKER CUSTOM SOBRE
======================== */

/* Container principal */
.ui-widget.ui-widget-content {
    border:none;
}
.ui-datepicker {
    background-color: #040A12; /* fond des inputs */
    border: 0.125rem solid #0E1822; /* même bordure que inputs */
    border-radius: 1rem;
    padding: 0.5rem;
    font-family: Arial, sans-serif;
    color: #E6ECF1;
    box-shadow: 0 2px 8px rgba(0,0,0,0.7);
    width: auto;
    z-index: 1000;
}

/* Header (mois + année + navigation) */
.ui-datepicker .ui-datepicker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem;
    background-color: #0E1822;
    border-radius: 0.8rem;
    position: relative;
    border: none;
    margin: 0.15rem;
}

/* Titre mois/année */
.ui-datepicker .ui-datepicker-title {
    font-weight: bold;
    font-size: 0.9rem;
    color: #E6ECF1;
}

/* Dropdown mois/année */
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
    background-color: #0E1822;
    color: #E6ECF1;
    border: 1px solid #032859;
    border-radius: 0.5rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.85rem;
    margin-left: 0.2rem;
    width: 5rem;
}

/* Navigation précédent / suivant avec < et > */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    width: 2rem;
    height: 2rem;
    line-height: 1.8rem;
    text-align: center;
    cursor: pointer;
    color: #E6ECF1;
    font-weight: bold;
    background-color: #032859;
    border-radius: 0.5rem;
    border: 1px solid #0E1822;
    transition: background-color 0.3s, color 0.3s;
    margin-top: 0.2rem;
    padding-top: 0.15rem;
    top: 0;
}
.ui-datepicker-prev {
    left: 0!important;
    top: 0;
    margin-top: 0.4rem!important;
    margin-left: 0.4rem!important;
}
.ui-datepicker-next {
    right: 0!important;
    top: 0;
    margin-top: 0.4rem!important;
    margin-right: 0.4rem!important;
}

/* Flèches */
.ui-datepicker .ui-datepicker-prev::after {
    content: "<";
    display: inline-block;
    font-weight: bold;
}
.ui-datepicker .ui-datepicker-next::after {
    content: ">";
    display: inline-block;
    font-weight: bold;
}

.ui-datepicker-prev:hover {
    left: 0;
    top: 0;
}
.ui-datepicker-next:hover {
    top: 0;
    right: 0;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background-color: #F56F45;
    color: #fff;
}


/* Table des jours */
.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.3rem;
}

.ui-datepicker th {
    color: rgba(255,255,255,0.8);
    font-weight: bold;
    font-size: 0.8rem;
    padding: 0.3rem 0;
    text-align: center;
}

.ui-datepicker td {
    padding: 0.2rem 0;
    text-align: center;
}

/* Les dates */
.ui-datepicker td a.ui-state-default {
    background: transparent;      /* pas de gris */
    color: #E6ECF1;               /* texte clair */
    border-radius: 0.5rem;
    text-decoration: none;
    display: inline-block;
    width: 2.2rem;
    height: 2.2rem;
    line-height: 2.0rem;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
    border: none;
}

/* Date du jour */
.ui-datepicker td a.ui-state-highlight {
    background-color: #032859; /* ou autre couleur sobre, exemple bleu foncé */
    color: #F56F45;            /* texte pour bien voir la date du jour */
    border-radius: 0.5rem;
    font-weight: bold;
}


/* Hover sur les dates */
.ui-datepicker td a.ui-state-default:hover {
    background-color: #032859;
    color: #fff;
}

/* Date sélectionnée */
.ui-datepicker td a.ui-state-active {
    background-color: #F56F45;
    color: #fff;
}

/* Dates hors du mois courant */
.ui-datepicker td a.ui-datepicker-other-month {
    color: rgba(230,236,241,0.4);
}

/* Désactiver les dates non sélectionnables */
.ui-datepicker td a.ui-state-disabled {
    color: rgba(230,236,241,0.4);
    background: transparent;
    cursor: default;
}

/* Boutons Aujourd'hui / Fermer */
.ui-datepicker .ui-datepicker-buttonpane {
    background: transparent;
    border-top: 1px solid #032859;
    margin-top: 0.3rem;
    padding-top: 0.3rem;
    display: flex;
    justify-content: space-between;
}

.ui-datepicker .ui-datepicker-buttonpane button {
    background-color: #0E1822;
    color: #E6ECF1;
    border: 1px solid #032859;
    border-radius: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.ui-datepicker .ui-datepicker-buttonpane button:hover {
    background-color: #032859;
    color: #fff;
}

/* Supprimer le focus outline par défaut */
.ui-datepicker a:focus,
.ui-datepicker select:focus,
.ui-datepicker button:focus {
    outline: none;
}

/* DATE PICKER RANGE*/
/* Surligner la plage */
.ui-datepicker .ui-datepicker-range {
    background-color: rgba(245,111,69,0.3);
    color: #fff;
    border-radius: 0;
}

.ui-datepicker .ui-datepicker-range-start {
    background-color: #F56F45;
    color: #fff;
}

.ui-datepicker .ui-datepicker-range-end {
    background-color: #F56F45;
    color: #fff;
}
