/* P2M « plus » — styles des fonctions client (inc/plus*.php). Reprend les variables de p2m.css. */

/* ---------- catégories : « Au Maroc on dit aussi : … » ---------- */
.p2m-aussi{margin:2px 0 12px;font-size:13px;line-height:1.6;color:var(--muted)}
.p2m-aussi-t{font-weight:700;color:var(--body)}
.p2m-aussi [lang=ar]{font-family:"IBM Plex Sans Arabic","Noto Sans Arabic",Tahoma,sans-serif;font-size:14px;letter-spacing:0;word-spacing:normal;unicode-bidi:isolate}

/* ---------- boutons sur les cartes : favori, comparer, aperçu (hors du lien de la carte) ---------- */
ul.products li.product .p2m-fav,ul.products li.product .p2m-cmp,ul.products li.product .p2m-qv-btn{position:absolute;right:8px;z-index:5;width:36px;height:36px;border-radius:50%;border:1px solid var(--line);background:rgba(255,255,255,.94);color:var(--muted);display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer;box-shadow:var(--sh);transition:color .15s,background .15s}
ul.products li.product .p2m-fav{top:8px}
ul.products li.product .p2m-cmp{top:50px}
ul.products li.product .p2m-qv-btn{top:92px;opacity:0}
ul.products li.product:hover .p2m-qv-btn,ul.products li.product .p2m-qv-btn:focus-visible{opacity:1}
.p2m-fav:hover,.p2m-cmp:hover,.p2m-qv-btn:hover{color:var(--p2m-d)}
.p2m-fav[aria-pressed=true]{color:#d6264b!important}
/* icônes en CSS (une seule fois dans la feuille, pas dans chaque carte) */
.p2m-fav::before,.p2m-cmp::before,.p2m-qv-btn::before,.p2m-i{content:"";display:inline-block;width:18px;height:18px;flex:none;background:currentColor;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat}
.p2m-fav-txt::before,.p2m-cmp-txt::before{display:none}
.p2m-fav,.p2m-i-fav{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.5-1.5 3-3.2 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.8 0-3 .5-4.5 2-1.5-1.5-2.7-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4 3 5.5l7 7z'/%3E%3C/svg%3E")}
.p2m-fav[aria-pressed=true],.p2m-fav[aria-pressed=true] .p2m-i-fav{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 14c1.5-1.5 3-3.2 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.8 0-3 .5-4.5 2-1.5-1.5-2.7-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4 3 5.5l7 7z'/%3E%3C/svg%3E")}
.p2m-cmp,.p2m-i-cmp{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3 4 7l4 4M4 7h16M16 21l4-4-4-4M20 17H4'/%3E%3C/svg%3E")}
.p2m-qv-btn{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E")}
.p2m-i-share{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3Ccircle cx='6' cy='12' r='3'/%3E%3Ccircle cx='18' cy='19' r='3'/%3E%3Cpath d='m8.6 13.5 6.8 4M15.4 6.5l-6.8 4'/%3E%3C/svg%3E")}
.p2m-cmp[aria-pressed=true]{color:#fff!important;background:var(--p2m)!important;border-color:var(--p2m)!important}
@media (hover:none),(max-width:767px){ul.products li.product .p2m-qv-btn{display:none}}
@media (max-width:767px){ul.products li.product .p2m-fav,ul.products li.product .p2m-cmp{width:34px;height:34px;right:6px}ul.products li.product .p2m-fav{top:6px}ul.products li.product .p2m-cmp{top:46px}}

/* ---------- fiche : actions, points forts, documents, vidéo ---------- */
.p2m-fiche-actions{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0 14px}
.p2m-fiche-actions button{display:inline-flex;align-items:center;gap:6px;min-height:40px;padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--body);font:700 13.5px Manrope,sans-serif;cursor:pointer}
.p2m-fiche-actions button:hover{border-color:var(--p2m);color:var(--p2m-dd)}
.p2m-fiche-actions .p2m-cmp[aria-pressed=true] span::after{content:" ✓"}
.p2m-points-forts{margin:10px 0 14px;padding:0;list-style:none;display:grid;gap:6px}
.p2m-points-forts li{position:relative;padding-left:24px;font-size:14px;line-height:1.45;color:var(--body)}
.p2m-points-forts li::before{content:"";position:absolute;left:4px;top:5px;width:11px;height:6px;border-left:2.5px solid var(--p2m);border-bottom:2.5px solid var(--p2m);transform:rotate(-45deg)}
.p2m-docs{list-style:none;margin:0 0 18px;padding:0;display:grid;gap:8px}
.p2m-docs a{display:inline-flex;align-items:center;gap:8px;font-weight:700;text-decoration:none}
.p2m-docs small{background:var(--hot-l);color:var(--hot-d);border-radius:4px;padding:1px 5px;font-weight:800}
.p2m-video{position:relative;aspect-ratio:16/9;max-width:720px;background:var(--p2m-dd);border-radius:var(--r);overflow:hidden}
.p2m-video button{position:absolute;inset:0;width:100%;border:0;background:transparent;color:#fff;font:700 15px Manrope,sans-serif;display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;cursor:pointer}
.p2m-play{width:68px;height:48px;border-radius:12px;background:#e03000;position:relative}
.p2m-play::after{content:"";position:absolute;left:27px;top:14px;border-left:18px solid #fff;border-top:10px solid transparent;border-bottom:10px solid transparent}
.p2m-video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
.p2m-wa-commande{margin:4px 0 10px}
.woocommerce-cart .wc-proceed-to-checkout .p2m-wa-commande{display:flex!important;justify-content:center;width:100%;margin-top:10px}

/* ---------- retour en stock ---------- */
.p2m-alerte{margin:12px 0 16px;padding:14px 16px;border:1px solid var(--line);border-radius:var(--r);background:var(--p2m-ll)}
.p2m-alerte-t{margin:0 0 10px;font-size:14px}
.p2m-alerte-t span{color:var(--muted);font-size:13px}
.p2m-alerte-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 12px}
.p2m-alerte-grid p{margin:0}
.p2m-alerte label{display:block;font-size:13px;font-weight:700;margin-bottom:4px;color:var(--body)}
.p2m-alerte input[type=email],.p2m-alerte input[type=tel]{width:100%;min-height:44px;border:1px solid #c9d3da;border-radius:10px;padding:8px 12px;background:#fff}
.p2m-alerte .button{margin-top:10px}
.p2m-alerte .p2m-small{margin:8px 0 0}
.p2m-alerte-ok{display:flex;gap:8px;align-items:center;margin:0;font-weight:700;color:var(--p2m-dd)}
@media (max-width:480px){.p2m-alerte-grid{grid-template-columns:1fr}}

/* ---------- vus récemment ---------- */
.p2m-recents{margin:24px 0 8px}
.p2m-recents .p2m-sec-h h2{font-size:20px}
.p2m-linkbtn{margin-left:auto;background:none;border:0;padding:8px 4px;min-height:40px;color:var(--p2m-d);font:700 13.5px Manrope,sans-serif;text-decoration:underline;cursor:pointer}
.p2m-recents ul.products.p2m-row{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(170px,210px);overflow-x:auto;gap:12px;scroll-snap-type:x mandatory;scrollbar-width:thin;padding-bottom:6px}

/* ---------- pages Favoris / Comparer ---------- */
.p2m-vue-main{padding:18px 0 40px}
.p2m-vue-h h1{font-size:26px;font-weight:800;margin:0 0 6px}
.p2m-vue-h p{color:var(--muted);margin:0 0 18px;max-width:720px}
.p2m-vue-body ul.products{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}
@media (max-width:1024px){.p2m-vue-body ul.products{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:767px){.p2m-vue-body ul.products{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.p2m-vue-h h1{font-size:22px}}
.p2m-vide{background:#fff;border:1px dashed #c9d3da;border-radius:var(--r);padding:28px 20px;text-align:center}
.p2m-vide p{margin:0 0 14px}

/* comparateur */
.p2m-cmp-wrap{overflow-x:auto;background:#fff;border:1px solid var(--line);border-radius:var(--r)}
.p2m-cmp-table{width:100%;border-collapse:collapse;min-width:560px;font-size:14px;margin:0}
.p2m-cmp-table th,.p2m-cmp-table td{border-bottom:1px solid var(--line);padding:10px 12px;text-align:left;vertical-align:top;background:#fff}
.p2m-cmp-table tbody th{position:sticky;left:0;z-index:1;width:130px;color:var(--muted);font-weight:700;font-size:13px;background:var(--p2m-ll)}
.p2m-cmp-table thead th{position:relative;font-weight:700}
.p2m-cmp-table thead a{display:flex;flex-direction:column;gap:6px;color:var(--ink);text-decoration:none}
.p2m-cmp-table thead img{width:120px;height:120px;object-fit:contain}
.p2m-cmp-del{position:absolute;top:6px;right:6px;width:32px;height:32px;border-radius:50%;border:1px solid var(--line);background:#fff;color:var(--muted);display:flex;align-items:center;justify-content:center;padding:0;cursor:pointer}
.p2m-cmp-table .price{color:var(--hot-d);font-weight:800}
.p2m-cmp-na{color:#9aa6ae}
.p2m-cmp-table .button{white-space:nowrap;padding:9px 16px!important;font-size:13px!important}
.p2m-btn-ghost,.button.p2m-btn-ghost{background:#fff!important;color:var(--p2m-dd)!important;border:1.5px solid var(--p2m)!important;border-radius:999px!important;font-weight:800!important;padding:10px 18px!important;display:inline-flex}
.p2m-cmp-bar{position:fixed;left:50%;transform:translateX(-50%);bottom:16px;z-index:57;display:flex;gap:10px;align-items:center;background:#fff;border:1px solid var(--line);box-shadow:var(--sh-h);border-radius:999px;padding:6px 8px 6px 6px}
.p2m-cmp-bar .button{padding:10px 18px!important}
.p2m-cmp-bar .p2m-linkbtn{margin:0}
.single-product .p2m-cmp-bar{bottom:84px}
@media (max-width:767px){.p2m-cmp-bar{bottom:calc(72px + env(safe-area-inset-bottom))}.single-product .p2m-cmp-bar{bottom:calc(136px + env(safe-area-inset-bottom))}}

/* ---------- vue rapide ---------- */
.p2m-qv{width:min(880px,94vw);max-height:90vh;border:0;border-radius:16px;padding:0;box-shadow:0 20px 60px rgba(0,0,0,.3);overflow:auto}
.p2m-qv::backdrop{background:rgba(12,30,36,.55)}
.p2m-qv-x{position:absolute;top:8px;right:10px;z-index:2;width:40px;height:40px;border-radius:50%;border:0;background:var(--bg);font-size:26px;line-height:1;cursor:pointer;color:var(--ink)}
.p2m-qv-body{padding:22px}
.p2m-qv-grid{display:grid;grid-template-columns:1fr 1.1fr;gap:24px;align-items:start}
.p2m-qv-img img{width:100%;height:auto;aspect-ratio:1/1;object-fit:contain;background:#fff}
.p2m-qv-info h2{font-size:20px;margin:6px 0 8px;padding-right:36px}
.p2m-qv-info .price{font-size:22px;font-weight:800;color:var(--hot-d);margin:0 0 6px}
.p2m-qv .p2m-badges{position:static;flex-direction:row}
.p2m-qv-dispo{font-size:13.5px;color:var(--muted);margin:0 0 10px}
.p2m-qv-desc{font-size:14px;line-height:1.5}
.p2m-qv-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;margin:14px 0 10px}
.p2m-qv-actions .p2m-fav{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:8px 14px;border-radius:999px;border:1px solid var(--line);background:#fff;color:var(--body);font:700 13.5px Manrope,sans-serif;cursor:pointer}
.p2m-qv-more{font-weight:700}
.p2m-qv-load{height:220px;border-radius:12px;background:linear-gradient(90deg,var(--bg),#fff,var(--bg));background-size:200% 100%;animation:p2mload 1.2s infinite linear}
@keyframes p2mload{to{background-position:-200% 0}}
@media (max-width:640px){.p2m-qv-grid{grid-template-columns:1fr}}

/* ---------- message bref ---------- */
.p2m-toast{position:fixed;left:50%;bottom:90px;transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:99;background:var(--ink);color:#fff;padding:10px 16px;border-radius:999px;font:700 14px Manrope,sans-serif;transition:.25s}
.p2m-toast.is-on{opacity:1;transform:translate(-50%,0)}

/* ---------- liens menu ---------- */
.p2m-fav-n{display:inline-block;min-width:18px;margin-left:6px;padding:0 5px;border-radius:9px;background:#d6264b;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center}

/* ---------- E : mécaniques (visibles seulement quand le propriétaire les active) ---------- */
.p2m-promo-1re{display:flex;gap:8px;align-items:center;background:var(--hot-l);border:1px solid #ffd2c2;color:var(--hot-d);border-radius:10px;padding:10px 14px;font-weight:700}
.p2m-points-gain{font-size:13px;color:var(--p2m-dd);font-weight:700;margin:4px 0 8px}
.p2m-points-row form{display:inline}
/* panier : la rangée « Vus récemment » prend toute la largeur sous le panier (grille / flex Kadence) */
.woocommerce-cart .woocommerce>.p2m-recents,.woocommerce-cart .p2m-recents{grid-column:1/-1;flex:0 0 100%;width:100%;max-width:100%;clear:both;min-width:0}
/* comparateur sur téléphone : le tableau défile dans son cadre, pas la page */
.p2m-vue-main,.p2m-vue-body{min-width:0;max-width:100%}
.p2m-vue .content-container{min-width:0}
.p2m-cmp-wrap{width:100%;max-width:calc(100vw - 32px)}
@media (max-width:767px){.p2m-cmp-table{min-width:0;width:auto}.p2m-cmp-table tbody th{width:92px;min-width:92px;font-size:12.5px;padding:8px}.p2m-cmp-table td,.p2m-cmp-table thead th{min-width:150px}.p2m-cmp-table thead img{width:90px;height:90px}}
@media (max-width:767px){.p2m-cmp-table thead th:first-child{min-width:92px;width:92px;padding:8px}}
/* barre « Comparer » compacte (une ligne) ; le message bref passe au-dessus */
.p2m-cmp-bar .button,.p2m-cmp-bar .button.p2m-btn-primary{white-space:nowrap;font-size:14px!important;line-height:1.2!important;padding:9px 16px!important;min-height:40px}
.p2m-cmp-bar .p2m-linkbtn{font-size:13px;padding:8px 6px}
@media (max-width:767px){.p2m-toast{bottom:calc(140px + env(safe-area-inset-bottom))}.single-product .p2m-toast{bottom:calc(200px + env(safe-area-inset-bottom))}}
