/* LMDB conversion 1.0.0 — mobile d'abord */
:root{--lmdbcv-accent:#017f96;--lmdbcv-btn:#16a6c1;--lmdbcv-ok:#1f8a4c;--lmdbcv-line:#e6eef0;--lmdbcv-soft:#f3fafb}

/* 1. Fiche produit sur mobile : photos en carrousel horizontal (au lieu d'une colonne de photos de 400 px chacune) */
@media (max-width:767px){
  body#product #thumb-gallery.product-thumb-images{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;scrollbar-width:none;width:100%!important;max-width:100%;margin:0!important;padding:0!important;height:auto!important;position:relative}
  body#product #thumb-gallery.product-thumb-images::-webkit-scrollbar{display:none}
  body#product #thumb-gallery .thumb-container{flex:0 0 100%!important;width:100%!important;max-width:100%!important;scroll-snap-align:center;margin:0!important;height:auto!important;float:none!important}
  body#product #thumb-gallery .thumb-container img{width:100%!important;height:auto!important;max-height:78vw;object-fit:contain;margin:0 auto;display:block}
  body#product .images-container{position:relative}
  body#product .lmdbcv-count{position:absolute;right:10px;bottom:10px;background:rgba(0,0,0,.55);color:#fff;font-size:12px;line-height:1;padding:6px 9px;border-radius:12px;z-index:5;pointer-events:none}
  body#product .lmdbcv-dots{display:flex;justify-content:center;gap:6px;margin:8px 0 4px}
  body#product .lmdbcv-dots i{width:7px;height:7px;border-radius:50%;background:#cfdde0;display:block}
  body#product .lmdbcv-dots i.on{background:var(--lmdbcv-accent)}
}

/* 2. Ligne de confiance sous le bouton */
.lmdbcv-product{margin:12px 0}
.lmdbcv-trust{list-style:none;margin:0 0 12px;padding:10px 12px;background:var(--lmdbcv-soft);border:1px solid var(--lmdbcv-line);border-radius:8px;display:grid;grid-template-columns:1fr 1fr;gap:6px 10px;font-size:13px;line-height:1.35}
.lmdbcv-trust li{position:relative;padding-left:18px;color:#29484f}
.lmdbcv-trust li:before{content:"✓";position:absolute;left:0;top:0;color:var(--lmdbcv-ok);font-weight:700}
@media (max-width:420px){.lmdbcv-trust{grid-template-columns:1fr}}

/* 3. Articles complémentaires */
.lmdbcv-xsell{margin:10px 0 14px}
.lmdbcv-xsell-title{font-weight:700;font-size:15px;margin:0 0 8px;color:#1d3b42}
.lmdbcv-xsell-list{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.lmdbcv-xsell-cart .lmdbcv-xsell-list{grid-template-columns:repeat(3,minmax(0,1fr))}
.lmdbcv-item{border:1px solid var(--lmdbcv-line);border-radius:8px;padding:8px;background:#fff;display:flex;flex-direction:column;gap:6px;min-width:0}
.lmdbcv-item-img img{width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;display:block}
.lmdbcv-item-name{font-size:12.5px;line-height:1.3;color:#24343a;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:2.6em}
.lmdbcv-item-price{font-size:13px;color:#1d3b42}
.lmdbcv-item-price s{color:#8a9a9e;font-size:11.5px}
.lmdbcv-item-btn{display:block;width:100%;text-align:center;border:0;border-radius:6px;background:var(--lmdbcv-btn);color:#fff!important;font-weight:600;font-size:13px;padding:9px 6px;cursor:pointer;text-decoration:none!important;margin-top:auto}
.lmdbcv-item-btn[disabled]{opacity:.6}
.lmdbcv-item-btn.is-done{background:var(--lmdbcv-ok)}
@media (max-width:767px){
  .lmdbcv-xsell-list,.lmdbcv-xsell-cart .lmdbcv-xsell-list{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;-webkit-overflow-scrolling:touch;padding-bottom:4px}
  .lmdbcv-item{flex:0 0 44%;scroll-snap-align:start}
}

/* 4. Jauge de livraison offerte */
.lmdbcv-gauge{background:var(--lmdbcv-soft);border:1px solid var(--lmdbcv-line);border-radius:8px;padding:10px 12px;margin:0 0 12px}
.lmdbcv-gauge-text{font-size:13.5px;font-weight:600;color:#1d3b42;margin-bottom:6px}
.lmdbcv-gauge-bar{height:7px;background:#dbe8ea;border-radius:4px;overflow:hidden}
.lmdbcv-gauge-bar span{display:block;height:100%;background:var(--lmdbcv-btn);border-radius:4px;transition:width .4s}
.lmdbcv-gauge.is-ok .lmdbcv-gauge-text{color:var(--lmdbcv-ok)}
.lmdbcv-gauge.is-ok .lmdbcv-gauge-bar span{background:var(--lmdbcv-ok)}

/* 5. Bandeau après « Ajouter au panier » */
.lmdbcv-toast{position:fixed;left:0;right:0;bottom:0;z-index:100000;background:#fff;box-shadow:0 -6px 24px rgba(0,0,0,.18);border-radius:14px 14px 0 0;padding:14px 16px calc(14px + env(safe-area-inset-bottom));transform:translateY(110%);transition:transform .25s ease-out;max-width:560px;margin:0 auto}
.lmdbcv-toast.on{transform:translateY(0)}
.lmdbcv-toast-head{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.lmdbcv-toast-head img{width:52px;height:52px;object-fit:contain;border:1px solid var(--lmdbcv-line);border-radius:6px;background:#fff}
.lmdbcv-toast-ok{color:var(--lmdbcv-ok);font-weight:700;font-size:14px}
.lmdbcv-toast-name{font-size:13px;color:#24343a;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lmdbcv-toast-x{margin-left:auto;background:none;border:0;font-size:24px;line-height:1;color:#7a8b90;padding:0 4px;cursor:pointer}
.lmdbcv-toast .lmdbcv-gauge{margin:0 0 10px;padding:8px 10px}
.lmdbcv-toast-actions{display:flex;gap:10px}
.lmdbcv-toast-actions a,.lmdbcv-toast-actions button{flex:1;text-align:center;border-radius:8px;padding:12px 8px;font-weight:700;font-size:14px;text-decoration:none!important;cursor:pointer}
.lmdbcv-toast-go{background:var(--lmdbcv-btn);color:#fff!important;border:0}
.lmdbcv-toast-stay{background:#fff;color:var(--lmdbcv-accent)!important;border:1px solid var(--lmdbcv-btn)}
@media (min-width:768px){.lmdbcv-toast{bottom:20px;border-radius:14px;right:20px;left:auto;width:420px}}

/* 6. Panier : bouton Commander fixe sur mobile */
.lmdbcv-cartbar{display:none}
@media (max-width:767px){
  body#cart .lmdbcv-cartbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:9995;background:#fff;box-shadow:0 -4px 16px rgba(0,0,0,.14);padding:10px 14px calc(10px + env(safe-area-inset-bottom));align-items:center;gap:12px}
  body#cart .lmdbcv-cartbar-total{font-size:13px;color:#4a5a5f;line-height:1.2}
  body#cart .lmdbcv-cartbar-total strong{display:block;font-size:17px;color:#1d3b42}
  body#cart .lmdbcv-cartbar a{flex:1;text-align:center;background:var(--lmdbcv-btn);color:#fff!important;font-weight:700;border-radius:8px;padding:13px 8px;text-decoration:none!important}
  body#cart #footer{padding-bottom:80px}
}

/* 7. Tunnel : attente pendant la validation */
#confirm_order.lmdbcv-wait,[data-link-action="x-confirm-order"].lmdbcv-wait{opacity:.75;pointer-events:none;position:relative}
.lmdbcv-waitmsg{display:flex;align-items:center;gap:10px;margin:10px 0;padding:10px 12px;border-radius:8px;background:var(--lmdbcv-soft);border:1px solid var(--lmdbcv-line);font-size:14px;color:#1d3b42}
.lmdbcv-spin{width:18px;height:18px;border:3px solid #cfe3e7;border-top-color:var(--lmdbcv-btn);border-radius:50%;animation:lmdbcvspin .8s linear infinite;flex:0 0 18px}
@keyframes lmdbcvspin{to{transform:rotate(360deg)}}
html[dir=rtl] .lmdbcv-trust li{padding-left:0;padding-right:18px}
html[dir=rtl] .lmdbcv-trust li:before{left:auto;right:0}
html[dir=rtl] .lmdbcv-toast-x{margin-left:0;margin-right:auto}

/* 1.0.1 : liste d'articles sans barre de défilement (cartes coupées = invitation à faire glisser) ; ligne de confiance sous le bouton */
.lmdbcv-xsell-list{scrollbar-width:none}.lmdbcv-xsell-list::-webkit-scrollbar{display:none}
.product-actions + .lmdbcv-trust,.lmdbcv-trust.is-moved{margin:12px 0 4px}

/* 1.0.2 : tunnel — cases et boutons radio faciles à toucher (zone de 44 px, case de 24 px, contraste renforcé, libellé entier cliquable) */
body#checkout .custom-checkbox,body#checkout .custom-radio{position:relative;flex:0 0 auto}
body#checkout .custom-checkbox input[type=checkbox],body#checkout .custom-radio input[type=radio]{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;opacity:0;z-index:2;cursor:pointer}
body#checkout .custom-checkbox input[type=checkbox]+span{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;border:2px solid #1d3b42;border-radius:5px;background:#fff;vertical-align:middle;box-sizing:border-box}
body#checkout .custom-checkbox input[type=checkbox]:checked+span{border-color:#007f97;border-width:2px}
body#checkout .custom-radio{width:24px;height:24px;border:2px solid #1d3b42;border-radius:50%;background:#fff;box-sizing:border-box}
body#checkout .custom-radio input[type=radio]:checked+span{width:12px;height:12px;left:4px;top:4px;background:#007f97}
body#checkout .custom-checkbox input:focus-visible+span,body#checkout .custom-radio:focus-within{outline:3px solid #f2a7b5;outline-offset:2px}
body#checkout #conditions-to-approve li,body#checkout .condition-label,body#checkout .form-group.checkbox,body#checkout .gift-checkbox,body#checkout .delivery-option,body#checkout .payment-option{min-height:44px}
body#checkout #conditions-to-approve li{display:flex;align-items:flex-start;gap:12px;padding:10px 0}
body#checkout #conditions-to-approve li .float-xs-left{float:none;display:flex;align-items:center;min-height:44px;padding:0 4px}
body#checkout .condition-label{display:flex;flex-direction:column;justify-content:center}
body#checkout .condition-label label,body#checkout .form-group.checkbox label,body#checkout label[for]{cursor:pointer}
body#checkout .condition-label label{display:block;padding:10px 0;margin:0;line-height:1.45}
body#checkout .condition-label label a{color:inherit;text-decoration:none;pointer-events:auto}
body#checkout .lmdbcv-terms-link{display:inline-block;margin:2px 0 4px;padding:8px 0;font-size:14px;color:#007f97;text-decoration:underline}
body#checkout .form-group.checkbox label{display:flex;align-items:flex-start;gap:12px;padding:10px 0;min-height:44px}
body#checkout .form-group.checkbox .custom-checkbox{display:flex;align-items:flex-start;gap:12px;width:100%}
body#checkout .delivery-option,body#checkout .payment-option{cursor:pointer}
body#checkout .delivery-option .custom-radio,body#checkout .payment-option .custom-radio{margin:10px 14px 10px 4px}
body#checkout .payment-option label{display:block;min-height:44px;padding:10px 0;cursor:pointer}
body#checkout .tc-main-title{padding-top:4px;padding-bottom:4px}
html[dir=rtl] body#checkout .delivery-option .custom-radio,html[dir=rtl] body#checkout .payment-option .custom-radio{margin:10px 4px 10px 14px}

/* 1.0.2 : mêmes règles, plus précises que celles du thème (#tc-container) et de The Checkout, chargées après le module */
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-checkbox,html body#checkout :is(#tc-container,#tc-container-mobile) .custom-radio{position:relative;flex:0 0 auto}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-checkbox input[type=checkbox],html body#checkout :is(#tc-container,#tc-container-mobile) .custom-radio input[type=radio]{position:absolute;left:50%;top:50%;width:44px;height:44px;margin:-22px 0 0 -22px;opacity:0;z-index:2;cursor:pointer}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-checkbox input[type=checkbox]+span{display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;min-width:24px;border:2px solid #1d3b42;border-radius:5px;background:#fff;vertical-align:middle;box-sizing:border-box}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-checkbox input[type=checkbox]:checked+span{border-color:#007f97;border-width:2px}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-radio{width:24px;height:24px;border:2px solid #1d3b42;border-radius:50%;background:#fff;box-sizing:border-box}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-radio input[type=radio]:checked+span{width:12px;height:12px;left:4px;top:4px;background:#007f97}
html body#checkout :is(#tc-container,#tc-container-mobile) .custom-checkbox input:focus-visible+span,html body#checkout :is(#tc-container,#tc-container-mobile) .custom-radio:focus-within{outline:3px solid #f2a7b5;outline-offset:2px}
html body#checkout :is(#tc-container,#tc-container-mobile) #conditions-to-approve li,html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label,html body#checkout :is(#tc-container,#tc-container-mobile) .form-group.checkbox,html body#checkout :is(#tc-container,#tc-container-mobile) .gift-checkbox,html body#checkout :is(#tc-container,#tc-container-mobile) .delivery-option,html body#checkout :is(#tc-container,#tc-container-mobile) .payment-option{min-height:44px}
html body#checkout :is(#tc-container,#tc-container-mobile) #conditions-to-approve li{display:flex;align-items:flex-start;gap:12px;padding:10px 0}
html body#checkout :is(#tc-container,#tc-container-mobile) #conditions-to-approve li .float-xs-left{float:none;display:flex;align-items:center;min-height:44px;padding:0 4px}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label{display:flex;flex-direction:column;justify-content:center}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label label,html body#checkout :is(#tc-container,#tc-container-mobile) .form-group.checkbox label,html body#checkout :is(#tc-container,#tc-container-mobile) label[for]{cursor:pointer}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label label{display:block;padding:10px 0;margin:0;line-height:1.45}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label label a{color:inherit;text-decoration:none;pointer-events:auto}
html body#checkout :is(#tc-container,#tc-container-mobile) .lmdbcv-terms-link{display:inline-block;margin:2px 0 4px;padding:8px 0;font-size:14px;color:#007f97;text-decoration:underline}
html body#checkout :is(#tc-container,#tc-container-mobile) .form-group.checkbox label{display:flex;align-items:flex-start;gap:12px;padding:10px 0;min-height:44px}
html body#checkout :is(#tc-container,#tc-container-mobile) .form-group.checkbox .custom-checkbox{display:flex;align-items:flex-start;gap:12px;width:100%}
html body#checkout :is(#tc-container,#tc-container-mobile) .delivery-option,html body#checkout :is(#tc-container,#tc-container-mobile) .payment-option{cursor:pointer}
html body#checkout :is(#tc-container,#tc-container-mobile) .delivery-option .custom-radio,html body#checkout :is(#tc-container,#tc-container-mobile) .payment-option .custom-radio{margin:10px 14px 10px 4px}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-option label{display:block;min-height:44px;padding:10px 0;cursor:pointer}
html body#checkout :is(#tc-container,#tc-container-mobile) .tc-main-title{padding-top:4px;padding-bottom:4px}
html[dir=rtl] body#checkout :is(#tc-container,#tc-container-mobile) .delivery-option .custom-radio,html[dir=rtl] body#checkout :is(#tc-container,#tc-container-mobile) .payment-option .custom-radio{margin:10px 4px 10px 14px}

/* 1.0.4 : bloc paiement compact (paiement à la livraison en premier ; carte, chèque et virement visibles en dessous), lignes de 48 px */
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .tc-main-title{padding:2px 12px;margin-bottom:6px}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option{padding:0;min-height:48px;display:flex;align-items:center}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option label{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;min-height:44px;padding:4px 0;margin:0;flex:1 1 auto}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option label .h6,html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option label span{margin:0}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option label img{max-height:22px;width:auto;margin:0}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option .custom-radio{margin:0 12px 0 2px}
html[dir=rtl] body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .payment-option .custom-radio{margin:0 2px 0 12px}
html body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .js-additional-information{margin:0 0 6px 38px;font-size:13px}
html[dir=rtl] body#checkout :is(#tc-container,#tc-container-mobile) .payment-options .js-additional-information{margin:0 38px 6px 0}

/* 1.0.5 : texte des conditions aligné au début de la ligne, collé à la case */
html body#checkout :is(#tc-container,#tc-container-mobile) #conditions-to-approve li{gap:6px}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label{flex:1 1 auto;text-align:start}
html body#checkout :is(#tc-container,#tc-container-mobile) .condition-label label,html body#checkout :is(#tc-container,#tc-container-mobile) .lmdbcv-terms-link{text-align:start}
