/**
 * Module "Qui" - Styles dédiés
 * Gestion de la sélection de voyageurs (adultes, enfants, bébés, animaux)
 */

/* ===== DROPDOWN QUI ===== */

#qui-dropdown {
    min-width: 280px;
}

#qui-dropdown .dropdown-content {
    padding: 0.5rem;
}

/* ===== COMPTEURS ===== */

.counter-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.counter-item:last-child {
    border-bottom: none;
}

.counter-item:hover {
    background-color: #f8f9ff;
}

/* Label avec icône */
.counter-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #333;
    font-weight: 500;
}

.counter-label i {
    font-size: 1.1rem;
    color: #2c3e50;
    width: 24px;
    text-align: center;
}

/* Sous-texte descriptif (optionnel) */
.counter-description {
    font-size: 0.8rem;
    color: #999;
    margin-top: 0.15rem;
}

/* Contrôles +/- */
.counter-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.counter-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    background: white;
    color: #2c3e50;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

.counter-btn:hover:not(:disabled) {
    border-color: #2c3e50;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    transform: scale(1.05);
}

.counter-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.counter-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: #e0e0e0;
    color: #ccc;
}

/* Valeur du compteur */
.counter-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    min-width: 28px;
    text-align: center;
}

.counter-value.has-value {
    color: #2c3e50;
}

/* ===== RÉSUMÉ VOYAGEURS ===== */

.qui-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border-radius: 8px;
    margin-top: 0.75rem;
}

.qui-summary-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #555;
}

.qui-summary-item i {
    color: #2c3e50;
    font-size: 0.85rem;
}

.qui-summary-item .count {
    font-weight: 600;
    color: #2c3e50;
}

/* ===== BOUTON APPLIQUER ===== */

.qui-apply-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-top: 0.75rem;
    background: #2c3e50;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.3);
}

.qui-apply-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ===== ÉTAT AVEC SÉLECTION ===== */

#qui-btn.has-selection {
    border-color: #2c3e50;
    background: linear-gradient(to right, #f0f4ff 0%, #ffffff 100%);
}

#qui-btn.has-selection span {
    color: #2c3e50;
    font-weight: 600;
}

#qui-selector.has-selection .search-label {
    color: #2c3e50;
}

/* ===== ANIMATIONS ===== */

@keyframes countUp {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.counter-value.animate {
    animation: countUp 0.2s ease;
}

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

@media (max-width: 768px) {
    #qui-dropdown {
        min-width: 100%;
    }

    .counter-item {
        padding: 1rem 0.75rem;
    }

    .counter-btn {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .counter-value {
        font-size: 1.2rem;
        min-width: 32px;
    }

    .counter-label {
        font-size: 1rem;
    }

    .counter-label i {
        font-size: 1.2rem;
    }
}
