/* 📅 Date Picker Custom */
.date-picker-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.date-picker-modal.active {
    display: flex;
}

.date-picker-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.date-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 2px solid var(--bois-clair);
    background: var(--vert-feuille);
    color: white;
}

.date-picker-header h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.date-picker-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.date-picker-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.date-picker-step {
    display: none;
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.date-picker-step.active {
    display: block;
}

.date-picker-step h4 {
    margin: 0 0 15px 0;
    color: var(--terre-brune);
    font-size: 1.1rem;
    text-align: center;
}

/* Tiles pour les années */
.year-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.year-tile {
    padding: 15px;
    border: 2px solid var(--bois-clair);
    border-radius: 12px;
    background: white;
    color: var(--terre-brune);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.year-tile:hover {
    border-color: var(--vert-feuille);
    background: var(--blanc-casse);
    transform: translateY(-2px);
}

.year-tile.selected {
    background: var(--vert-feuille);
    color: white;
    border-color: var(--vert-feuille);
}

/* Wheels pour mois et jours */
.month-wheel,
.day-wheel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
    padding: 5px;
}

.month-item,
.day-item {
    padding: 12px 20px;
    border: 2px solid var(--bois-clair);
    border-radius: 10px;
    background: white;
    color: var(--terre-brune);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.month-item:hover,
.day-item:hover {
    border-color: var(--vert-feuille);
    background: var(--blanc-casse);
    transform: translateX(5px);
}

.month-item.selected,
.day-item.selected {
    background: var(--vert-feuille);
    color: white;
    border-color: var(--vert-feuille);
}

/* Footer */
.date-picker-footer {
    display: flex;
    gap: 10px;
    padding: 20px;
    border-top: 2px solid var(--bois-clair);
    background: var(--blanc-casse);
}

.date-picker-footer button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-family: 'Comfortaa', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-back {
    background: var(--bois-clair);
    color: var(--terre-brune);
}

.btn-back:hover {
    background: var(--bois-fonce);
    color: white;
}

.btn-cancel {
    background: #e0e0e0;
    color: #666;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.btn-validate {
    background: var(--vert-feuille);
    color: white;
}

.btn-validate:hover {
    background: var(--vert-mousse);
    transform: scale(1.02);
}

/* Scrollbar personnalisée */
.month-wheel::-webkit-scrollbar,
.day-wheel::-webkit-scrollbar {
    width: 8px;
}

.month-wheel::-webkit-scrollbar-track,
.day-wheel::-webkit-scrollbar-track {
    background: var(--blanc-casse);
    border-radius: 10px;
}

.month-wheel::-webkit-scrollbar-thumb,
.day-wheel::-webkit-scrollbar-thumb {
    background: var(--vert-mousse);
    border-radius: 10px;
}

.month-wheel::-webkit-scrollbar-thumb:hover,
.day-wheel::-webkit-scrollbar-thumb:hover {
    background: var(--vert-feuille);
}

/* Responsive */
@media (max-width: 768px) {
    .date-picker-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .year-tiles {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    }
    
    .year-tile {
        padding: 12px;
        font-size: 1rem;
    }
}
