/* ==========================================================================
   Soyatech — compléments WordPress / WooCommerce
   (contenu de l'éditeur, panier, commande, compte, pagination, formulaires)
   ========================================================================== */

/* ---------- Filtres blog rendus en liens ---------- */
a.opt { text-decoration: none; display: inline-flex; align-items: center; }

/* ---------- Message du formulaire de contact ---------- */
.nl-form-msg { margin: 0; font-size: 14px; font-weight: 600; min-height: 1em; }
.nl-form-msg.ok { color: var(--success); }
.nl-form-msg.ko { color: var(--danger); }
.hdr .badge.pop { animation: nlPop .4s var(--ease); }
@keyframes nlPop { 40% { transform: scale(1.35); } }
#checkout.disabled { opacity: .55; pointer-events: none; }
.cart-ft .btn-ghost { margin-top: 10px; }

/* ---------- Contenu éditeur (articles, descriptions) ---------- */
.entry { line-height: 1.75; color: var(--ink-800); }
.entry > * + * { margin-top: 1em; }
.entry h2, .entry h3, .entry h4 { color: var(--ink); line-height: 1.25; margin-top: 1.6em; }
.entry h2 { font-size: clamp(22px, 2.4vw, 28px); }
.entry h3 { font-size: clamp(18px, 2vw, 22px); }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li + li { margin-top: .4em; }
.entry img { max-width: 100%; height: auto; border-radius: var(--r); }
.entry table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.entry th, .entry td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ink-200); }
.entry th { font-weight: 600; color: var(--ink); width: 38%; }
.entry blockquote { border-left: 4px solid var(--blue); padding: 6px 0 6px 20px; color: var(--ink-600); font-style: italic; }
.entry a { color: var(--blue); }
.entry .wp-block-image figcaption { font-size: 13px; color: var(--ink-600); text-align: center; }
.entry .alignwide { margin-left: calc(50% - min(50vw, 640px)); margin-right: calc(50% - min(50vw, 640px)); max-width: none; width: auto; }
.entry .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: none; width: auto; }
.art-body.entry > *:first-child { margin-top: 0; }

/* Page générique dont le contenu ne commence pas par une section */
.nl-page > :not(section):not(.wp-block-html):not([class*="elementor"]):first-child,
.nl-page > .wp-block-group, .nl-page > p, .nl-page > h2, .nl-page > ul, .nl-page > figure { max-width: 860px; margin-left: auto; margin-right: auto; padding-left: var(--gut); padding-right: var(--gut); }
.nl-page > p:first-of-type { margin-top: 40px; }
.nl-page > p:last-of-type { margin-bottom: 60px; }

/* ---------- Pagination ---------- */
.nl-pagination, .pagination { margin-top: 40px; }
.nav-links { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.nav-links .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 42px; height: 42px; padding: 0 12px; border-radius: var(--r); border: 1.5px solid var(--ink-200); font-weight: 600; font-size: 14px; color: var(--ink); text-decoration: none; }
.nav-links .page-numbers.current { background: var(--blue); border-color: var(--blue); color: #fff; }
.nav-links a.page-numbers:hover { border-color: var(--blue); color: var(--blue); }

/* ---------- Commentaires ---------- */
.comments-area { margin-top: 20px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 18px 0; border-bottom: 1px solid var(--ink-200); }
.comment-form label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.comment-form input:not([type=submit]):not([type=checkbox]), .comment-form textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--ink-200); border-radius: var(--r); font: inherit; }
.comment-form .submit, .woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .woocommerce #respond input#submit, .wc-block-components-button { display: inline-flex; align-items: center; gap: 8px; background: var(--blue) !important; color: #fff !important; border: 0; border-radius: var(--radius-pill); padding: 13px 24px; font-weight: 600; font-family: inherit; font-size: 14px; cursor: pointer; transition: background .2s, transform .2s; }
.comment-form .submit:hover, .woocommerce .button:hover, .woocommerce button.button:hover, .woocommerce a.button:hover, .wc-block-components-button:hover { background: var(--blue-600) !important; transform: translateY(-1px); }
.woocommerce .button.alt, .woocommerce button.button.alt { background: var(--ink) !important; }
.woocommerce .button.alt:hover { background: var(--ink-800) !important; }

/* ---------- Pages WooCommerce : panier, commande, compte ---------- */
.nl-wc-page .woocommerce { max-width: 1100px; margin: 0 auto; }
.nl-wc-page .phead { min-height: 0; }
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select, .woocommerce .select2-container--default .select2-selection--single { padding: 12px 14px; border: 1.5px solid var(--ink-200); border-radius: var(--r); font: inherit; font-size: 14.5px; height: auto; min-height: 46px; }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 20px; padding: 0; }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__arrow { top: 50%; transform: translateY(-50%); }
.woocommerce form .form-row label { font-size: 13px; font-weight: 600; color: var(--ink); }
.woocommerce table.shop_table { border: 1px solid var(--ink-200); border-radius: var(--r); overflow: hidden; }
.woocommerce table.shop_table th { font-weight: 600; background: var(--grey); }
.woocommerce table.shop_table td, .woocommerce table.shop_table th { padding: 14px 12px; border-color: var(--ink-200); }
.woocommerce table.shop_table td.product-thumbnail img { width: 70px; border-radius: var(--r); }
.woocommerce .quantity .qty { padding: 10px; border: 1.5px solid var(--ink-200); border-radius: var(--r); width: 72px; }
.woocommerce .cart_totals, .woocommerce #order_review, .woocommerce-checkout #payment { background: var(--grey); border-radius: var(--r); padding: 22px; }
.woocommerce-checkout #payment { padding: 0; }
.woocommerce-checkout #payment div.payment_box { background: #fff; border-radius: var(--r); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--ink-200); padding: 18px; }
.woocommerce-checkout #payment div.place-order { padding: 18px; }
.woocommerce #payment #place_order, .woocommerce .wc-proceed-to-checkout a.checkout-button { width: 100%; justify-content: center; font-size: 15px; padding: 16px 24px; }
.woocommerce-message, .woocommerce-info, .woocommerce-error { border-top-color: var(--blue); border-radius: var(--r); background: var(--blue-050); color: var(--ink); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--blue); }
.woocommerce-error { background: #fff3f3; border-top-color: var(--danger); }
.woocommerce-error::before { color: var(--danger); }
.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 { width: 48%; }
.woocommerce h3, .woocommerce h2 { font-size: 20px; margin: 24px 0 12px; }
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.woocommerce-MyAccount-navigation ul li a { display: block; padding: 11px 14px; border-radius: var(--r); background: var(--grey); text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14px; }
.woocommerce-MyAccount-navigation ul li.is-active a { background: var(--blue); color: #fff; }
.woocommerce form.checkout_coupon, .woocommerce form.login, .woocommerce form.register { border: 1px solid var(--ink-200); border-radius: var(--r); padding: 22px; }
.woocommerce ul.order_details { display: grid; gap: 12px; padding: 20px; background: var(--grey); border-radius: var(--r); margin: 0 0 24px; }
.woocommerce ul.order_details li { border-right: 0; float: none; margin: 0; padding: 0; }
.woocommerce .woocommerce-thankyou-order-received { font-size: 20px; font-weight: 600; color: var(--success); }
.woocommerce a.remove { color: var(--danger) !important; }
.woocommerce a.remove:hover { background: var(--danger); }
.woocommerce .cart-empty, .woocommerce .return-to-shop { text-align: center; }
.wc-block-components-notice-banner { border-radius: var(--r); }
.woocommerce .woocommerce-breadcrumb { display: none; }

/* Blocs panier / commande (Gutenberg) */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { font-family: inherit; }
.wc-block-components-product-name { font-weight: 600; }
.wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { border-radius: var(--radius-pill) !important; }

/* ---------- Avis produit WooCommerce (onglet) ---------- */
#reviews .commentlist { list-style: none; padding: 0; }
#reviews .comment_container { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--ink-200); }
#reviews .comment_container img.avatar { width: 46px; height: 46px; border-radius: 50%; }
#reviews .star-rating { color: var(--star); }
#review_form .comment-form-rating p.stars a { color: var(--star); }

/* ---------- Divers ---------- */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.post-cat[href] { text-decoration: none; }
.nl-home > .wp-block-html:empty { display: none; }
.hero-full .hero-slide .hero-bg { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Curseur personnalisé du héro (clic = diapositive suivante) ---------- */
.hero-cursor { position: absolute; left: 0; top: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: #fff; color: var(--ink); display: grid; place-items: center; pointer-events: none; z-index: 6; opacity: 0; transform: scale(.6); transition: opacity .25s var(--ease), transform .25s var(--ease); box-shadow: 0 8px 26px rgba(0,0,0,.25); will-change: transform; }
.hero-cursor::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--ink); border-color: var(--ink) var(--ink) transparent transparent; transform: rotate(45deg); }
.hero-cursor .ico { font-size: 28px; font-weight: 600; }
.hero-cursor.prev .ico { transform: scaleX(-1); }
.hero-cursor.prev::before { transform: rotate(225deg); }
@media (hover: hover) and (pointer: fine) {
  .hero.has-cursor { cursor: none; }
  .hero.has-cursor .hero-cursor.on { opacity: 1; transform: scale(1); }
  .hero.has-cursor .hero-cursor.click { transform: scale(.85); }
  .hero.has-cursor a, .hero.has-cursor button { cursor: pointer; }
}

/* ---------- Correctif mobile : le héro plein écran ne doit jamais s'effondrer ---------- */
@media (max-width: 900px) {
  .hero.hero-full { min-height: min(72svh, 560px); }
  .hero.hero-full .hero-slide::after { background: linear-gradient(180deg, rgba(15, 20, 28, .55), rgba(15, 20, 28, .62)); }
  .hero.hero-full .hero-slide .hero-bg { opacity: 1; }
  .hero.hero-full .hero-full-inner { padding-top: calc(var(--top-h) + var(--nav-h)); }
  .hero.hero-full .hero-full-title { font-size: clamp(1.9rem, 9vw, 2.8rem); }
}
@media (max-width: 480px) {
  .hero.hero-full { min-height: min(68svh, 520px); }
}

/* ---------- Avis : une carte par vue sur mobile ---------- */
@media (max-width: 700px) {
  .rev-track .rev { flex: 0 0 100%; }
  .rev-who { flex-wrap: wrap; gap: 10px 12px; }
  .rev-who .rev-badge { margin-left: 0 !important; flex-basis: 100%; }
}
@media (min-width: 701px) and (max-width: 1000px) {
  .rev-track .rev { flex: 0 0 calc((100% - 20px) / 2); }
}

/* ---------- En-tête : bouton panier à gauche sur desktop (ordre visuel inchangé) ---------- */
.hdr-left { display: flex; align-items: center; gap: 6px; order: 3; }
.hdr .nav { order: 2; }
.hdr-act { order: 2; margin-left: auto; }
.hdr .logo { order: 1; }
.hdr-search-toggle { display: none; }

/* ---------- En-tête mobile : panier + recherche à gauche, petit logo centré, menu à droite ---------- */
@media (max-width: 1040px) {
  .hdr .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
  .hdr-left { order: 0; grid-column: 1; grid-row: 1; justify-self: start; gap: 2px; }
  .hdr .logo { order: 0; grid-column: 2; grid-row: 1; justify-self: center; margin: 0; }
  .hdr .nav { display: none; }
  .hdr .logo img { height: 26px; width: auto; }
  .hdr-act { order: 0; grid-column: 3; grid-row: 1; justify-self: end; margin: 0; }
  .hdr-act > .hdr-search { display: none; }
  .hdr-search-toggle { display: grid; }
  .icon-btn { width: 40px; height: 40px; }
  .hdr .badge { top: 4px; right: 4px; }
}
@media (max-width: 380px) {
  .hdr .logo img { height: 22px; }
}

/* ---------- Popup « Finaliser votre commande » ---------- */
.qo { position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 26, 34, .55); backdrop-filter: blur(3px); opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s; overflow-y: auto; }
.qo.open { opacity: 1; visibility: visible; }
.qo-box { width: min(760px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); background: #fff; border-radius: 14px;
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(24px) scale(.98); transition: transform .4s var(--ease-out); }
.qo.open .qo-box { transform: none; }
.qo-hd { padding: 12px 18px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; gap: 12px; }
.qo-hd > .ico { color: var(--blue); }
.qo-hd h3 { font-size: 16px; margin: 0; }
.qo-hd .icon-btn { margin-left: auto; }
.qo-body { display: grid; grid-template-columns: 1.15fr .85fr; overflow-y: auto; }
.qo-form { padding: 18px; align-content: start; gap: 10px; }
.qo-form .f-row { gap: 10px; }
.qo-form .field label { font-size: 12px; margin-bottom: 4px; }
.qo-form .field input { padding: 9px 12px; font-size: 13.5px; }
.qo-form[hidden], .qo-summary[hidden], .qo-done[hidden] { display: none; }
.qo-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.qo-form .field.err input { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(215, 0, 0, .08); }
.qo-form .f-err { display: block; font-size: 12px; color: var(--danger); margin-top: 5px; }
.qo-summary { background: var(--grey, #f4f6f8); padding: 18px; border-left: 1px solid var(--ink-200); display: flex; flex-direction: column; }
.qo-summary h4 { font-size: 14px; margin: 0 0 6px; }
.qo-items { flex: 1; max-height: 190px; overflow-y: auto; margin-bottom: 10px; }
.qo-item { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ink-200); }
.qo-item img { width: 46px; height: 46px; object-fit: contain; background: #fff; border-radius: var(--r); flex-shrink: 0; }
.qo-ci { flex: 1; min-width: 0; }
.qo-ci h5 { font-size: 12.5px; line-height: 1.35; margin: 0 0 2px; }
.qo-ci .var { font-size: 11px; color: var(--ink-400); margin-bottom: 2px; }
.qo-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--ink-600); }
.qo-meta b { font-size: 13px; color: var(--ink); }
.qo-loading { font-size: 13px; color: var(--ink-400); padding: 10px 0; margin: 0; }
.qo-lines { border-top: 2px solid var(--ink-200); padding-top: 8px; margin-bottom: 10px; }
.qo-lines .cart-line { font-size: 12.5px; margin-bottom: 4px; }
.qo-lines .cart-tot { font-size: 17px; font-weight: 700; }
.qo-summary .btn-lg { padding: 12px 18px; font-size: 14px; }
.qo-summary .note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--ink-600); margin: 8px 0 0; }
.qo-done { padding: 36px 20px; text-align: center; display: grid; justify-items: center; gap: 10px; }
.qo-done > .ico { font-size: 64px; color: var(--success, #12a150); }
.qo-done h3 { font-size: 24px; margin: 0; }
.qo-done p { color: var(--ink-600); max-width: 460px; margin: 0; }
.qo-done .qo-num { font-weight: 600; color: var(--ink); }
.qo-done .btn { margin-top: 14px; }
.ico.spin { animation: qoSpin 1s linear infinite; }
@keyframes qoSpin { to { transform: rotate(360deg); } }
@media (max-width: 780px) {
  .qo { padding: 0; align-items: end; }
  .qo-box { max-height: 100vh; max-height: 100dvh; border-radius: 16px 16px 0 0; }
  .qo-body { grid-template-columns: 1fr; }
  .qo-summary { border-left: 0; border-top: 1px solid var(--ink-200); order: -1; padding: 16px 20px; }
  .qo-items { max-height: 120px; }
  .qo-form { padding: 16px; }
  .qo-summary .btn { position: sticky; bottom: 0; }
}
@media (max-width: 780px) and (min-height: 600px) {
  .qo-summary { order: 0; }
}


/* ---------- Réseaux sociaux : logos de marque (SVG) ---------- */
.ftr-soc a .soc-ico { display: block; transition: transform .25s var(--ease-out); }
.ftr-soc a:hover { color: #fff; }
.ftr-soc a:hover .soc-ico { transform: scale(1.08); }
.ftr-soc a.soc-facebook:hover { background: #1877f2; }
.ftr-soc a.soc-instagram:hover { background: linear-gradient(45deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888); }
.ftr-soc a.soc-whatsapp:hover { background: #25d366; }
.ftr-soc a.soc-youtube:hover { background: #ff0000; }
.ftr-soc a.soc-tiktok:hover { background: #010101; }
.ftr-soc a.soc-linkedin:hover { background: #0a66c2; }

/* Bouton WhatsApp flottant : logo de marque (SVG) au lieu de l'icône générique. */
.wa .soc-ico { width: 30px; height: 30px; display: block; }

/* ---------- Carte du showroom : repère aux couleurs du site ---------- */
.nl-map { position: relative; height: 420px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--ink-200); }
.nl-map iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 640px) { .nl-map { height: 320px; } }

/* Carte Leaflet : le repère est ancré aux coordonnées (il suit la carte). */
.nl-map-canvas { width: 100%; height: 100%; }
.nl-map-canvas.leaflet-container { background: var(--grey, #f4f6f8); font: inherit; }
.nl-map-marker { color: var(--blue); filter: drop-shadow(0 4px 6px rgba(20, 26, 34, .35)); }
.nl-map-marker svg { display: block; }
.nl-map .leaflet-control-zoom a { color: var(--ink); }
.nl-map .leaflet-popup-content { font-size: 13px; line-height: 1.5; }

/* --- Promo : ancien prix barré + pourcentage (tiroir panier & popup) ------ */
.cart-item .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; justify-content: flex-end; }
.cart-item .price .now { font-weight: 700; }
.cart-item .price .was,
.qo-meta .was { color: var(--ink-400); text-decoration: line-through; font-weight: 400; font-size: 12px; }
.cart-item .price .off,
.qo-meta .off { background: var(--danger, #e0392b); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 4px; white-space: nowrap; }
.qo-pr { display: inline-flex; align-items: baseline; gap: 6px; }

/* --- Images de couverture dans les pages Elementor ------------------------
   Elementor applique « .elementor img { height: auto } », de même spécificité
   que les règles du thème (.cat-feat img, .v3-pcard-media img…) mais chargé
   après : les images retombaient sur leur hauteur naturelle — ou sur 0 tant
   que le chargement différé n'avait pas eu lieu — laissant un vide sous le
   visuel. On remonte la spécificité pour rétablir l'intention du thème.      */
.elementor .cat-feat img,
.elementor .v3-pcard-media img,
.elementor .cat-circle-img img,
.elementor .v3-deck-card img,
.elementor .v3-post-img img,
.elementor .cmp-card-media img,
.elementor .post-media img,
.elementor .v3-prio-b img,
.elementor .v4-story-photo img,
.elementor .v3-hero-right img,
.elementor .gal-main img,
.elementor .gal-thumb img,
.elementor .post-feat .pf-media img {
  height: 100%;
  object-fit: cover;
}

/* En portrait, le recadrage « cover » d'un visuel large coupait le sujet
   (la serrure, à droite de l'image). On décale le point de cadrage.          */
@media (max-width: 760px) {
  .cat-feat img,
  .elementor .cat-feat img {
    object-position: 80% center;
  }
}
