/* Styles formulaire demande de devis */

.webpdevis-form-container {
    max-width: 900px;
    margin: 0 auto;
}

.webpdevis-product-img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

/* Bouton devis dans l'aside du panier */
.webpdevis-cart-action {
    margin-top: 0.5rem;
}

.webpdevis-cart-action .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
}

.webpdevis-cart-action__hint {
    font-size: 0.8rem;
    line-height: 1.3;
}

.webpdevis-confirmation {
    max-width: 600px;
    margin: 0 auto;
}

/* Masquer le bouton "Commander" quand le module est actif */
.webpdevis-hidden {
    display: none !important;
}

/* Indicateur d'étapes du tunnel de devis */
.devis-steps {
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}

.devis-steps__list {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    list-style: none;
    padding: 0;
    margin: 0;
}

.devis-steps__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
}

.devis-steps__item:not(:last-child)::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 2px;
    background: #ddd;
    margin-left: 0.5rem;
}

.devis-steps__item--done {
    color: #2e7d32;
}

.devis-steps__item--done .devis-steps__number {
    background: #2e7d32;
    color: #fff;
}

.devis-steps__item--done:not(:last-child)::after {
    background: #2e7d32;
}

.devis-steps__item--current {
    color: #1a1a1a;
    font-weight: 600;
}

.devis-steps__item--current .devis-steps__number {
    background: #1a1a1a;
    color: #fff;
}

.devis-steps__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ddd;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* Page adresses */
.webpdevis-address-container {
    max-width: 900px;
    margin: 0 auto;
}

/* Sélecteur d'adresses — compatibilité avec le thème hummingbird */
.address-card--radio {
    border: 2px solid #eee;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
    cursor: pointer;
}

.address-card--radio:hover {
    border-color: #aaa;
}

.address-card--radio.selected {
    border-color: #1a1a1a;
    background: #f8f9fa;
}

.address-card__container {
    display: block;
    cursor: pointer;
}

.address-card__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.address-card__alias {
    font-weight: 600;
    font-size: 1rem;
}

.address-card__content {
    font-style: normal;
    color: #555;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.address-card__actions {
    display: flex;
    gap: 1rem;
    padding-left: 2rem;
}

.address-card__edit,
.address-card__delete {
    font-size: 0.85rem;
    text-decoration: none;
}

.address-card__edit:hover {
    text-decoration: underline;
}

.address-card__delete:hover {
    text-decoration: underline;
}

/* ===================================
   Historique des devis (Mon compte)
   =================================== */

/* Grille — même pattern que .order-history du thème hummingbird */
.devis-history__inner {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.devis-history__header {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr 1fr 1fr 0.8fr;
    gap: 0;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.devis-history__row {
    display: grid;
    grid-template-columns: 1.2fr 1.5fr 1fr 1fr 1fr 0.8fr;
    gap: 0;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
    transition: background-color 0.15s;
}

.devis-history__row:last-child {
    border-bottom: none;
}

.devis-history__row:hover {
    background-color: #f8f9fa;
}

.devis-history__cell {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

/* Badges de statut */
.devis-status {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.devis-status--nouveau {
    background-color: #4caf50;
}

.devis-status--en_cours {
    background-color: #2196f3;
}

.devis-status--traite {
    background-color: #9e9e9e;
}

.devis-status--refuse {
    background-color: #f44336;
}

/* ===================================
   Détail d'un devis
   =================================== */

.devis-detail-section {
    margin-bottom: 2rem;
}

.devis-detail-section__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
}

/* Résumé */
.devis-detail-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 0.5rem;
}

.devis-detail-summary__item {
    font-size: 0.9rem;
}

/* Informations projet */
.devis-detail-project__item {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.devis-detail-project__message {
    margin-top: 0.25rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 0.375rem;
    white-space: pre-wrap;
}

/* Tableau produits */
.devis-products-table {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.devis-products-table__header {
    display: grid;
    grid-template-columns: 2.5fr 1fr 0.7fr 1fr 1fr;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.devis-products-table__row {
    display: grid;
    grid-template-columns: 2.5fr 1fr 0.7fr 1fr 1fr;
    border-bottom: 1px solid #dee2e6;
    align-items: center;
}

.devis-products-table__row:last-child {
    border-bottom: none;
}

.devis-products-table__cell {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.devis-products-table__footer {
    display: grid;
    grid-template-columns: 1fr auto;
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
    font-weight: 600;
}

.devis-products-table__cell--total-label {
    text-align: right;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.devis-products-table__cell--total-value {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    min-width: 120px;
}

/* Adresses */
.devis-addresses {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.devis-addresses__card {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.25rem;
}

.devis-addresses__card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.devis-addresses__content {
    font-size: 0.9rem;
    line-height: 1.6;
    font-style: normal;
    color: #555;
}

/* Actions */
.devis-detail-actions {
    display: flex;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .devis-steps__label {
        display: none;
    }

    .devis-steps__item {
        padding: 0.5rem;
    }

    .devis-steps__item:not(:last-child)::after {
        width: 20px;
    }

    /* Liste des devis en mode mobile */
    .devis-history__header {
        display: none;
    }

    .devis-history__row {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .devis-history__cell {
        display: flex;
        justify-content: space-between;
        padding: 0.35rem 0;
    }

    .devis-history__cell::before {
        content: attr(data-ps-label);
        font-weight: 600;
        margin-right: 1rem;
    }

    .devis-history__cell--actions {
        margin-top: 0.5rem;
        justify-content: flex-end;
    }

    .devis-history__cell--actions::before {
        display: none;
    }

    /* Détail */
    .devis-detail-summary {
        grid-template-columns: 1fr;
    }

    .devis-products-table__header {
        display: none;
    }

    .devis-products-table__row {
        display: block;
        padding: 1rem;
    }

    .devis-products-table__cell {
        display: flex;
        justify-content: space-between;
        padding: 0.25rem 0;
    }

    .devis-products-table__cell::before {
        content: attr(data-ps-label);
        font-weight: 600;
        margin-right: 1rem;
    }

    .devis-products-table__footer {
        grid-template-columns: 1fr 1fr;
    }

    .devis-addresses {
        grid-template-columns: 1fr;
    }
}

/* Déclinaison (attributs) + référence dans le récap panier du devis */
.pb-devis__recap-attr {
    display: block;
    margin-top: 3px;
    font-size: .85em;
    line-height: 1.35;
    color: #8a5a2b;
    font-weight: 600;
}

.pb-devis__recap-ref {
    display: block;
    margin-top: 1px;
    font-size: .78em;
    color: #9a938a;
    font-variant-numeric: tabular-nums;
}
