/* ─────────────────────────────────────────────────────────────
   Formations Offertes — Styles page panier
   Utilise les variables globales Elementor pour s'intégrer
   au design du site.
   ───────────────────────────────────────────────────────────── */

/* ══════════════════════════════════════════════════════════════
   CHAMP QUANTITÉ – élargissement (défaut WooCommerce trop étroit)
   ══════════════════════════════════════════════════════════════ */

.woocommerce .quantity .qty {
    width: 5.5em!important;
}

.cart-collaterals .cart_totals {
    border: none!important;
    overflow: inherit;
}

/* ══════════════════════════════════════════════════════════════
   BLOC COMMUN
   ══════════════════════════════════════════════════════════════ */

.fo-bloc {
    padding: 18px 22px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-width: 2px;
    border-style: solid;
}

.fo-bloc h3 {
    margin: 0 0 10px;
    font-size: 1.1em;
}

.fo-bloc p {
    margin: 0 0 12px;
    line-height: 1.6;
}

.fo-bloc ul {
    margin: 0 0 14px;
    padding-left: 22px;
    line-height: 1.8;
}

.fo-bloc label {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
    cursor: pointer;
    line-height: 1.5;
}

.fo-bloc label.fo-label-checkbox {
    display: block;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 1em;
}

.fo-bloc input[type="text"],
.fo-bloc input[type="email"],
.fo-bloc select {
    width: 100%;
    max-width: 440px;
    padding: 9px 12px;
    border: 1px solid var(--e-global-color-secondary, #d0d5dd);
    border-radius: 5px;
    font-size: 0.95em;
    background-color: #fff;
    color: var(--e-global-color-primary, #1a1a2e);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: auto;
}

.fo-bloc input[type="text"]:focus,
.fo-bloc input[type="email"]:focus,
.fo-bloc select:focus {
    outline: none;
    border-color: var(--e-global-color-accent, #2e3188);
    box-shadow: 0 0 0 3px rgba(46, 49, 136, 0.1);
}

.fo-bloc small {
    display: block;
    margin-top: 5px;
    font-size: 0.82em;
    color: var(--e-global-color-secondary, #888);
    font-style: italic;
}

/* Champs e-learning */
#fo_elearning_fields p {
    margin-bottom: 12px;
}

/* ══════════════════════════════════════════════════════════════
   CASE CGV – confirmation de non-remboursement
   ══════════════════════════════════════════════════════════════ */

.fo-cgv-wrapper {
    margin-top: 14px;
    padding: 10px 14px;
    background-color: rgba(0, 0, 0, 0.03);
    border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.fo-cgv-wrapper label.fo-label-checkbox {
    font-weight: 400;
    font-size: 0.92em;
    color: var(--e-global-color-primary, #1a1a2e);
    margin-bottom: 0;
}

.fo-cgv-wrapper label.fo-label-checkbox a {
    font-weight: 600;
    text-decoration: underline;
}

.fo-elearning .fo-cgv-wrapper label.fo-label-checkbox a {
    color: #2e7d32;
}

.fo-demi-journee .fo-cgv-wrapper label.fo-label-checkbox a {
    color: #e65100;
}

/* Bordure rouge si non coché (classe ajoutée par JS au submit) */
.fo-cgv-wrapper.fo-cgv-invalid {
    border-color: #e53935;
    background-color: rgba(229, 57, 53, 0.04);
}

/* ══════════════════════════════════════════════════════════════
   OFFRE 1 – E-LEARNING (vert)
   ══════════════════════════════════════════════════════════════ */

.fo-elearning {
    background-color: rgba(46, 136, 80, 0.06);
    border-color: #4CAF50;
}

.fo-elearning h3 {
    color: #2e7d32;
}

.fo-elearning a {
    color: #2e7d32;
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.15s ease;
}

.fo-elearning a:hover {
    text-decoration-color: #2e7d32;
}

/* ══════════════════════════════════════════════════════════════
   OFFRE 2 – DEMI-JOURNÉE (orange/ambre)
   ══════════════════════════════════════════════════════════════ */

.fo-demi-journee {
    background-color: rgba(255, 193, 7, 0.07);
    border-color: #FFC107;
}

.fo-demi-journee h3 {
    color: #e65100;
}

/* ══════════════════════════════════════════════════════════════
   BADGE "OFFERT" DANS LE TABLEAU PANIER
   ══════════════════════════════════════════════════════════════ */

.fo-qty-offerte {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    color: var(--e-global-color-accent, #2e3188);
}

.fo-qty-offerte small {
    display: inline;
    margin-top: 0;
    padding: 2px 8px;
    background-color: var(--e-global-color-eedc059, #fef9e7);
    color: #e65100;
    border: 1px solid #FFC107;
    border-radius: 20px;
    font-size: 0.78em;
    font-weight: 700;
    font-style: normal;
    letter-spacing: 0.2px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 600px) {
    .fo-bloc {
        padding: 14px 16px;
    }

    .fo-bloc input[type="text"],
    .fo-bloc input[type="email"],
    .fo-bloc select {
        max-width: 100%;
    }

    .fo-bloc h3 {
        font-size: 1em;
    }
}

/* ══════════════════════════════════════════════════════════════
   ALERTE NON-CUMULABILITÉ (affichée au-dessus du titre de chaque bloc)
   ══════════════════════════════════════════════════════════════ */

.fo-alerte-non-cumul {
    margin: 0 0 14px;
    padding: 10px 14px;
    background-color: rgba(255, 152, 0, 0.10);
    border-left: 4px solid #FF9800;
    border-radius: 0 6px 6px 0;
    font-size: 0.93em;
    line-height: 1.5;
    color: #7a4100;
}

.fo-alerte-non-cumul strong {
    color: #e65100;
}

/* ══════════════════════════════════════════════════════════════
   CHAMPS DU BLOC DEMI-JOURNÉE (masqués jusqu'à activation de la coche)
   ══════════════════════════════════════════════════════════════ */

/* ══════════════════════════════════════════════════════════════
   TOTAL PANIER – correction affichage mobile.
   WooCommerce applique shop_table_responsive en mode block sur
   mobile, ce qui empile th et td sur des lignes séparées et fait
   apparaître un ":" parasite via ::before.
   On force le tableau cart_totals à rester une vraie table et on
   supprime le pseudo-élément dans cette zone.
   ══════════════════════════════════════════════════════════════ */

.woocommerce .cart-collaterals table.shop_table_responsive,
.woocommerce-page .cart-collaterals table.shop_table_responsive {
    display: table !important;
}

.woocommerce .cart-collaterals table.shop_table_responsive tbody,
.woocommerce-page .cart-collaterals table.shop_table_responsive tbody {
    display: table-row-group !important;
}

.woocommerce .cart-collaterals table.shop_table_responsive tr:not(.cart-subtotal):not(.order-total),
.woocommerce-page .cart-collaterals table.shop_table_responsive tr:not(.cart-subtotal):not(.order-total) {
    display: table-row !important;
}

/* ══════════════════════════════════════════════════════════════
   TOTAL PANIER – masquer les lignes WooCommerce natives
   "Sous-total" (cart-subtotal) et "Total" (order-total).
   Seules restent visibles les lignes injectées par le plugin :
   "Total Sociétaire SOCAF" et "Total non-Sociétaire".
   ══════════════════════════════════════════════════════════════ */

.woocommerce .cart-collaterals table.shop_table_responsive tr.cart-subtotal,
.woocommerce .cart-collaterals table.shop_table_responsive tr.order-total,
.woocommerce-page .cart-collaterals table.shop_table_responsive tr.cart-subtotal,
.woocommerce-page .cart-collaterals table.shop_table_responsive tr.order-total {
    display: none !important;
}

.woocommerce .cart-collaterals table.shop_table_responsive th,
.woocommerce .cart-collaterals table.shop_table_responsive td,
.woocommerce-page .cart-collaterals table.shop_table_responsive th,
.woocommerce-page .cart-collaterals table.shop_table_responsive td {
    display: table-cell !important;
    text-align: left !important;
}

/* Supprimer le ":" ajouté par WooCommerce via ::before sur les <td> */
.woocommerce .cart-collaterals table.shop_table_responsive td::before,
.woocommerce-page .cart-collaterals table.shop_table_responsive td::before {
    display: none !important;
}
