/* Corrections mobile du moteur de themes (Unimart). Chargee APRES la feuille vendor (et rtl-overrides.css en RTL)
 * par themes/unimart/templates/themes/unimart/base.html : la feuille vendor reste intacte.
 *
 * Regles : uniquement dans @media (max-width: 991px) / (max-width: 767px) — le rendu bureau LTR ne change pas.
 * Selecteurs = classes Unimart existantes, jamais de nouvelle classe dans le balisage.
 *
 * Audit du 2026-10-05 (tools/mobile_audit.py, page showcase, 390 / 768 / 1440 px, fr + ar) : 0 debordement
 * horizontal sur les 17 sections (15 types de gabarit + en-tete + pied du preset), 0 erreur JS. Aucune
 * correction n'etait donc necessaire ; ce fichier est le point d'ancrage des suivantes (relancer l'audit
 * apres tout nouveau type de section : `manage.py theme_showcase <id> --reset`).
 *
 * Cibles tactiles (WCAG 2.5.8, minimum 32 px — `tools/mobile_audit.py --targets`) : on agrandit la zone cliquable
 * SANS toucher a la mise en page. Boutons-icones : min-width/min-height + inline-flex centre. Liens/boutons de texte :
 * `padding-block` compense par une marge negative egale (la boite grandit, le flux ne bouge pas). Les liens EN LIGNE
 * dans un paragraphe sont exemptes (WCAG 2.5.8) et l'audit les ignore.
 */
@media (max-width: 991px) {
  .hamberger-button.rbt-round-btn {
    min-width: 32px; min-height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .logo > a { padding-block: 3px; margin-block: -3px; }
  a.rbt-btn-link { padding-block: 4px; margin-block: -4px; }
  /* hauteur fixee par le vendor (28-32 px a <= 479 px) : seul un min-height la releve (grandit de 2-4 px au plus) */
  a.rbt-btn, button.rbt-btn {
    min-height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .rbt-card-title > a { padding-block: 7px; }
  /* listes de liens (meta d'article, pied de page, copyright, fil d'Ariane) : 18 px de haut, parfois < 32 px de large */
  .rbt-blog-details-meta-list > li > a, .ft-link > li > a, .copyright-link > li > a,
  .rbt-breadcrumb-page-list > li > a { padding-block: 7px; padding-inline: 5px; margin-inline: -5px; }
  a.contact-link { padding-block: 8px; }
}

/* Fiche produit fixe (themes/unimart/fixed/product_single.html, static/js/store-pdp.js) : formulaire de commande,
 * puces de variante, messages. Uniquement des classes `pdp-*` / `.variant-chip` : le balisage Unimart n'est pas touche. */
.pdp-field { position: relative; margin-bottom: 0.75rem; }
.pdp-error { color: #b42318; font-size: 0.8125rem; margin-top: 0.25rem; }
.pdp-error:empty { display: none; }
.pdp-order-box .form-control.is-invalid { border-color: #b42318; background-image: none; }
.variant-chip[aria-checked="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.variant-chip.is-out { opacity: 0.55; text-decoration: line-through; cursor: not-allowed; }
.pdp-zone-pill { display: none; align-items: center; gap: 0.5rem; padding: 0.375rem 0.75rem; margin-bottom: 0.5rem;
  background: #fff; border: 1px solid var(--color-primary); font-size: 0.875rem; }
.pdp-zone-pill.show { display: inline-flex; }
.pdp-zone-pill-clear { background: none; border: 0; padding: 0 0.25rem; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.pdp-zone-suggestions { display: none; position: absolute; inset-inline: 0; z-index: 20; max-height: 15rem; overflow-y: auto;
  background: #fff; border: 1px solid #d9d9d9; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.pdp-zone-suggestions.open { display: block; }
.pdp-zone-suggestion { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.625rem 0.75rem; font-size: 0.875rem; cursor: pointer; }
.pdp-zone-suggestion:hover { background: #f5f5f5; }
.pdp-zone-type { color: #6b6b6b; font-size: 0.8125rem; }
.pdp-message { display: none; margin-top: 0.75rem; padding: 0.75rem; font-size: 0.875rem; }
.pdp-message.show { display: block; }
.pdp-message.success { background: #e8f6ec; color: #1b5e30; }
.pdp-message.error { background: #fdecea; color: #b42318; }
.pdp-track-link { color: inherit; text-decoration: underline; }
.pdp-fee-row { display: flex; justify-content: space-between; gap: 0.5rem; margin-top: 0.75rem; font-size: 0.875rem; }
.pdp-fee-row[hidden] { display: none; }
.pdp-offer-line { display: flex; justify-content: space-between; gap: 0.5rem; width: 100%; padding: 0.5rem 0; background: none;
  border: 0; font-size: 0.875rem; text-align: start; cursor: pointer; }
.pdp-stock-in { color: #1b7a3a; }
.pdp-stock-low { color: #b45309; }
.pdp-stock-out { color: #b42318; }
.pdp-no-image { display: flex; align-items: center; justify-content: center; min-height: 18rem; background: #f3f3f3; color: #9a9a9a; font-size: 4rem; }
.pdp-reviews { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.pdp-review { padding: 1rem 0; border-bottom: 1px solid #ececec; }
.pdp-review-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: 0.875rem; }
.pdp-review-head .rbt-rating-icon-list { color: #f5a623; letter-spacing: 0.1rem; }
.pdp-review-reply { margin-top: 0.75rem; padding: 0.75rem; background: #f7f7f7; }
@media (max-width: 575px) {
  .rbt-single-product-area .product-btn-grp { flex-wrap: wrap; }
  .rbt-single-product-area .product-btn-grp > a, .rbt-single-product-area .product-btn-grp > button.rbt-btn { flex: 1 1 100%; }
}

/* Bijoux : le hero place le bijou du cote oppose au texte. En arabe le texte passe a droite : on retourne
   uniquement les visuels par defaut (jamais une photo du vendeur, qui ne vient pas de /static/themes/defaults/). */
html[dir="rtl"] [data-section-type="jewel-hero"] .rbt-product-image img[src*="/themes/defaults/jewel-hero-"],
html[dir="rtl"] [data-section-type="jewel-categories"] .rbt-image-portion img[src*="/themes/defaults/jewel-cat-"] { transform: scaleX(-1); }
