/* LA_B2BVat — Styles front (minimal, compatible thème Warehouse) */

.b2bvat-indicator {
    font-size: 0.85em;
    margin-top: 4px;
    min-height: 1.2em;
}

.b2bvat-status-success {
    color: #28a745;
}

.b2bvat-status-error {
    color: #dc3545;
}

.b2bvat-status-info {
    color: #17a2b8;
}

.b2bvat-status-pending {
    color: #ffc107;
}

.b2bvat-vies-info {
    display: block;
    margin-top: 4px;
}

.b2bvat-checkout-blocker {
    margin: 15px 0;
    border-left: 4px solid #ffc107;
}

.b2bvat-checkout-blocker .alert-heading {
    font-size: 1.1em;
}

.b2bvat-field-wrapper {
    margin-top: 5px;
}

/* ── Popup de choix particulier/professionnel ── */

.b2bvat-choice-modal .b2bvat-modal-header {
    background: #ad5c35;
    color: #fff;
}

.b2bvat-choice-modal .b2bvat-modal-small {
    font-size: 0.85em;
}

.b2bvat-choice-modal .b2bvat-modal-question {
    margin-bottom: 6px;
    font-weight: 500;
}

/* La popup pose une question obligatoire : on lui laisse un peu plus de large
   que le modal Bootstrap par défaut (500px), pour que les deux boutons de
   choix tiennent côte à côte sans être à l'étroit. */
.b2bvat-choice-modal .modal-dialog {
    max-width: 540px;
}

/* Boutons de choix STRICTEMENT identiques : aucun ne doit orienter la réponse. */
.b2bvat-choice-modal .b2bvat-btn-choice {
    flex: 1 1 0;
    background: #fff;
    border: 2px solid #ad5c35;
    color: #ad5c35;
    font-weight: 500;
    white-space: nowrap;
}

.b2bvat-choice-modal .b2bvat-btn-choice:hover,
.b2bvat-choice-modal .b2bvat-btn-choice:focus {
    background: #ad5c35;
    border-color: #ad5c35;
    color: #fff;
}

.b2bvat-choice-modal .b2bvat-modal-footer {
    display: flex;
    gap: 10px;
}

.b2bvat-choice-modal .b2bvat-modal-individual {
    color: #555;
    text-decoration: underline;
    margin-right: auto;
    padding-left: 0;
}

.b2bvat-choice-modal .b2bvat-modal-field {
    margin-top: 10px;
}

.b2bvat-modal-feedback {
    min-height: 1.4em;
    margin-top: 8px;
    font-size: 0.9em;
}

.b2bvat-modal-feedback.b2bvat-error {
    color: #dc3545;
}

.b2bvat-modal-feedback.b2bvat-success {
    color: #198754;
}

/* ── Encart « profil pro incomplet » (pages compte) ── */

.b2bvat-pro-reminder {
    position: relative;
    margin: 15px 0;
    padding-right: 40px;
}

.b2bvat-pro-reminder .b2bvat-reminder-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.3em;
    line-height: 1;
    color: inherit;
    cursor: pointer;
}

/* ── Sélecteur de statut (page « Mon compte > Informations ») ── */

.b2bvat-account-status {
    margin: 0 0 25px;
}

.b2bvat-account-status-label {
    font-weight: 600;
    color: #ad5c35;
    margin: 0 0 8px;
}

.b2bvat-status-toggle {
    display: flex;
    max-width: 460px;
    gap: 10px;
}

.b2bvat-status-btn {
    flex: 1 1 0;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid #ad5c35;
    color: #ad5c35;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.b2bvat-status-btn:hover {
    background: #fbf7eb;
}

.b2bvat-status-btn.active {
    background: #ad5c35;
    color: #fff;
}

.b2bvat-status-btn:disabled {
    opacity: .6;
    cursor: default;
}

/* ==========================================================================
   MOBILE — sous 576 px
   --------------------------------------------------------------------------
   Le pied de la popup et le sélecteur de statut étaient construits en flex
   horizontal, avec « white-space: nowrap » sur les boutons : ils ne pouvaient
   donc ni revenir à la ligne, ni s'empiler. Sur un écran de 320 px les deux
   boutons de choix débordaient dès que le libellé traduit s'allongeait.

   Seuil retenu : 576 px, le même que celui où le thème bascule ses onglets
   produit en accordéon.

   Les deux boutons de choix restent STRICTEMENT identiques une fois empilés
   — même largeur, même style, même ordre : aucun ne doit orienter la réponse.
   ========================================================================== */
@media (max-width: 575.98px) {

    /* Le modal occupe la largeur utile, sans coller aux bords. */
    .b2bvat-choice-modal .modal-dialog {
        max-width: none;
        margin: 12px;
    }

    /* Pied en colonne : les boutons s'empilent au lieu de se comprimer. */
    .b2bvat-choice-modal .b2bvat-modal-footer {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    /* Libellés libres de revenir à la ligne : une traduction longue
       (néerlandais, allemand) ne doit plus provoquer de débordement. */
    .b2bvat-choice-modal .b2bvat-btn-choice {
        flex: 0 0 auto;
        width: 100%;
        white-space: normal;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Seconde étape : le lien « Je suis un particulier » passait à gauche via
       « margin-right: auto », ce qui le collait au bouton Valider. Empilé, il
       revient sous le bouton et reste centré. */
    .b2bvat-choice-modal .b2bvat-modal-individual {
        margin-right: 0;
        padding-left: 0;
        width: 100%;
        text-align: center;
        order: 2;
    }

    /* Zone de saisie confortable au doigt. */
    .b2bvat-choice-modal .b2bvat-modal-field .form-control {
        font-size: 16px; /* < 16px déclenche un zoom automatique sur iOS */
        padding-top: 10px;
        padding-bottom: 10px;
    }

    /* Même correction pour le sélecteur de statut de « Mon compte ». */
    .b2bvat-status-toggle {
        flex-direction: column;
        max-width: none;
    }

    .b2bvat-status-btn {
        flex: 0 0 auto;
        width: 100%;
        white-space: normal;
    }
}

/* ── Couleurs Culterreux : mode sombre du site ── */
html.la-dark .b2bvat-choice-modal .modal-content { background: #241c15; color: #e8e0d5; }
html.la-dark .b2bvat-choice-modal .modal-footer,
html.la-dark .b2bvat-choice-modal .modal-body { border-color: #4a3d2e; }
html.la-dark .b2bvat-choice-modal .text-muted,
html.la-dark .b2bvat-choice-modal .b2bvat-modal-individual { color: #c9bfb2 !important; }
html.la-dark .b2bvat-choice-modal .b2bvat-btn-choice,
html.la-dark .b2bvat-status-btn { background: #2a2119; border-color: #f0c25e; color: #f0c25e; }
html.la-dark .b2bvat-choice-modal .b2bvat-btn-choice:hover,
html.la-dark .b2bvat-choice-modal .b2bvat-btn-choice:focus,
html.la-dark .b2bvat-status-btn.active { background: #ad5c35; border-color: #ad5c35; color: #fff; }
html.la-dark .b2bvat-account-status-label { color: #f0c25e; }
