/* ==================== PAGE TARIFS & DEVIS ==================== */

/* Grille 2 colonnes & Panier sticky */
.panier-sticky {
    position: sticky !important;
    top: 100px !important;
    background: #0a3d4d !important;
    color: white !important;
    padding: 25px !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
    height: fit-content !important;
    align-self: start !important;
    z-index: 50 !important;
}

@media (max-width: 900px) {
    .grille-devis {
        grid-template-columns: 1fr;
    }
    .panier-sticky {
        position: static !important;
        top: auto !important;
    }
}

/* Styles pour le contenu principal */
.panel-dark {
    background: #0a3d4d;
    color: white;
    padding: 25px;
    border-radius: 10px;
    position: sticky !important;
    top: 20px !important;
    height: fit-content !important;
    align-self: start !important;
}
/* ─── Accordéon catégories ─── */
.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    padding: 12px 0;
    margin: 0;
    transition: color 0.2s ease;
}
.category-header:hover {
    color: #0091EA;
}
/* Flèche du titre */
.category-header i.fa-chevron-down {
    transition: transform 0.3s ease;
    color: #0091EA;
    font-size: 0.9em;
}

/* Contenu caché par défaut */
.category-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, opacity 0.25s ease;
}

/* Ouverture au survol OU quand un champ à l'intérieur a le focus */
.category:hover .category-content,
.category:focus-within .category-content,
.category.open .category-content {   /* .open = catégorie Déplacement toujours visible */
    max-height: 3000px;
    opacity: 1;
}

/* La flèche pivote à l'ouverture */
.category:hover .category-header i.fa-chevron-down,
.category:focus-within .category-header i.fa-chevron-down,
.category.open .category-header i.fa-chevron-down {
    transform: rotate(180deg);
}

/* Le titre change de couleur au survol */
.category:hover .category-header {
    color: #0091EA;
}
.service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.qty-input {
    width: 70px;
    padding: 5px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.category {
    margin-top: 25px;
}

.category h3 {
    color: #0091EA;
    border-bottom: 2px solid #cbd5e1;
    padding-bottom: 5px;
    margin-top: 0;
}

.btn {
    background: #0091EA;
    color: white;
    padding: 15px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16pt;
    font-weight: bold;
    width: 100%;
    margin-top: 20px;
}

.btn:hover {
    background: #0077b6;
}

/* === MISE EN PAGE DEVIS + STICKY === */
.devis-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    align-items: start;
}

.panel-inputs {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.panel-outputs {
    background: #0a3d4d;
    color: white;
    padding: 25px;
    border-radius: 10px;
    position: sticky !important;
    top: 20px !important;
    height: fit-content !important;
    align-self: start !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* === LIGNES DU DEVIS DANS LE PANIER === */
.ligne-devis {
    animation: fadeIn 0.3s ease;
}

.ligne-devis:last-child {
    border-bottom: none !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

#listeLignes::-webkit-scrollbar {
    width: 6px;
}

#listeLignes::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

#listeLignes::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* === STYLES DU PANIER === */
.panier-liste {
    margin: 15px 0;
    max-height: 400px;
    overflow-y: auto;
}

.panier-vide {
    text-align: center;
    color: #aaa;
    padding: 20px 0;
    font-style: italic;
}

.panier-deplacement {
    background: rgba(255,255,255,0.1);
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 0.9em;
}

.panier-deplacement i {
    margin-right: 8px;
}

.panier-separateur {
    margin: 10px 0;
    border-color: rgba(255,255,255,0.3);
}

.panier-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 15px;
}