/* =================================================
   LIVRAISON — le bloc lisible (panier + tunnel)
   Une présentation : .fr-livraison--onglets (piste A, retenue
   le 14/09/2026 ; la piste B « accordéon » a été retirée)
   Palette : vert #2E6B54 / #0F3D2E, sable #F7F5EF, gris #8a8a8a
   ================================================= */

.fr-livraison {
    display: block;
    text-indent: 0;
    margin: .2em 0 .4em;
}

.fr-livraison [hidden] {
    display: none !important;
}

/* Titres de sous-groupe : EN POINT RELAIS / À DOMICILE */
.fr-livraison .fr-sous-titre {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: #8a8a8a;
    margin: .9em 0 .1em;
}

/* Une option = une ligne (règles de rangée dans livraison-selection.php) */
.fr-livraison ul.fr-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Cases masquées : la tournée se choisit dans la liste déroulante,
   le retrait n'a qu'une option déjà nommée par son onglet. Les cases
   restent dans la page (c'est elles que WooCommerce lit). */
.fr-livraison ul.fr-options--masquees > li > input.shipping_method,
.fr-livraison ul.fr-options--masquees > li > label {
    display: none !important;
}

.fr-livraison ul.fr-options--masquees > li:not(.fr-option--choisie) {
    display: none !important;
}

.fr-livraison ul.fr-options--masquees > li.fr-option--choisie {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Liste déroulante des tournées */
.fr-livraison .fr-champ-tournee {
    margin: .6em 0 .2em;
}

.fr-livraison .fr-champ-tournee > label {
    display: block;
    font-weight: 600;
    color: #0F3D2E;
    font-size: 13px;
    margin-bottom: 6px;
}

/* Même gabarit pour toutes les listes du bloc (tournée, point, date, créneau) */
.woocommerce .fr-livraison select.fr-select-tournee,
.woocommerce .fr-livraison .fr-selection select,
.woocommerce-page .fr-livraison .fr-selection select {
    width: 100%;
    line-height: 1.3;
    min-height: 44px;
    background: #ffffff;
    border: 1px solid #cfcfc8;
    border-radius: 6px;
    padding: 0 12px;
    color: #3a3a3a;
}

/* Phrase d'intro d'un mode (tournée) */
.fr-livraison .fr-intro {
    font-size: 13px;
    color: #6b6b6b;
    margin: .6em 0 .2em;
}

/* Adresse : « Vers 69002 Lyon · Modifier » */
.fr-livraison .woocommerce-shipping-destination {
    font-size: 13px;
    color: #6b6b6b;
    margin: .7em 0 .2em;
}

.fr-livraison .woocommerce-shipping-calculator {
    margin: 0;
}

/* ---------- ONGLETS (piste A) ---------- */

.fr-livraison .fr-onglets {
    display: flex;
    border: 1px solid #2E6B54;
    border-radius: 6px;
    overflow: hidden;
    margin: .3em 0 .5em;
}

.woocommerce .fr-livraison .fr-onglet,
.woocommerce-page .fr-livraison .fr-onglet {
    flex: 1 1 0;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4px 6px;
    margin: 0;
    background: #ffffff;
    color: #2E6B54;
    border: 0;
    border-right: 1px solid #2E6B54;
    border-radius: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
    cursor: pointer;
    text-indent: 0;
}

.woocommerce .fr-livraison .fr-onglet:last-child,
.woocommerce-page .fr-livraison .fr-onglet:last-child {
    border-right: 0;
}

.woocommerce .fr-livraison .fr-onglet:hover,
.woocommerce-page .fr-livraison .fr-onglet:hover {
    background: #F7F5EF;
    color: #0F3D2E;
}

.woocommerce .fr-livraison .fr-onglet--actif,
.woocommerce-page .fr-livraison .fr-onglet--actif,
.woocommerce .fr-livraison .fr-onglet--actif:hover,
.woocommerce-page .fr-livraison .fr-onglet--actif:hover {
    background: #2E6B54;
    color: #ffffff;
    font-weight: 600;
}

/* ---------- TUNNEL : le mode figé ---------- */

.fr-livraison .fr-livraison-rappel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 44px;
    padding: 6px 14px;
    margin: .3em 0 .5em;
    border-radius: 6px;
    text-indent: 0;
}

.fr-livraison--onglets .fr-livraison-rappel {
    background: #2E6B54;
    color: #ffffff;
    font-weight: 600;
}

.fr-livraison--onglets .fr-livraison-rappel a {
    color: #ffffff;
    font-size: 13px;
    font-weight: 400;
    text-decoration: underline;
    white-space: nowrap;
}

/* ---------- LIGNE « LIVRAISON » DES TOTAUX ---------- */

tr.fr-livraison-recap th small {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #8a8a8a;
}

.woocommerce table.shop_table tr.fr-livraison-recap > td,
.woocommerce-page table.shop_table tr.fr-livraison-recap > td {
    text-align: right;
}

/* ---------- MOBILE ---------- */

@media only screen and (max-width: 560px) {
    .woocommerce .fr-livraison .fr-onglet,
    .woocommerce-page .fr-livraison .fr-onglet {
        font-size: 12px;
        padding: 4px 4px;
    }
}

/* ---------- TUNNEL : le tableau « Votre commande » aligne ses cellules
   à droite ; tout notre bloc reste à gauche. ---------- */

.woocommerce-checkout .fr-livraison,
.woocommerce-checkout .fr-livraison label,
.woocommerce-checkout .fr-livraison p,
.woocommerce-checkout .fr-livraison .fr-selection,
.woocommerce-checkout .fr-livraison .fr-champ {
    text-align: left;
}
