/* ==========================================================================
   Boutique publique — theme "COD Winner"
   Concu pour le mobile algerien d'abord : le formulaire de commande est la
   seule chose qui compte, tout le reste lui cede la place.
   ========================================================================== */

:root {
  --s-bg: #ffffff;
  --s-soft: #f7f8fa;
  --s-border: #e6e8ec;
  --s-text: #16191f;
  --s-muted: #6b7280;
  --s-brand: #0f172a;
  --s-cta: #16a34a;
  --s-cta-hover: #15803d;
  --s-price: #dc2626;
  --s-radius: 12px;
}

* { box-sizing: border-box; }

body.shop {
  margin: 0; background: var(--s-bg); color: var(--s-text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
body.shop img { max-width: 100%; height: auto; display: block; }
body.shop a { color: inherit; text-decoration: none; }

.shop-wrap { max-width: 720px; margin: 0 auto; padding: 0 14px 90px; }

/* --- Bandeau et entete ---------------------------------------------------- */

.announce {
  background: var(--s-brand); color: #fff; text-align: center;
  padding: 9px 14px; font-size: 14px; font-weight: 600;
}
.shop-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--s-border); margin-bottom: 18px;
}
.shop-header .logo { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; }
.shop-header .logo img { width: 40px; height: 40px; border-radius: 9px; object-fit: cover; }
.shop-header nav { display: flex; gap: 16px; font-size: 14.5px; color: var(--s-muted); }

/* --- Grille produits ------------------------------------------------------ */

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.product-card {
  border: 1px solid var(--s-border); border-radius: var(--s-radius);
  overflow: hidden; background: #fff; display: flex; flex-direction: column;
}
.product-card .ph { aspect-ratio: 1; background: var(--s-soft); overflow: hidden; }
.product-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.product-card .body { padding: 11px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-card .name { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.product-card .price { font-size: 17px; font-weight: 800; color: var(--s-price); margin-top: auto; }
.product-card .compare { font-size: 13px; color: var(--s-muted); text-decoration: line-through; margin-inline-start: 6px; font-weight: 500; }

.shop-hero { position: relative; border-radius: var(--s-radius); overflow: hidden; margin-bottom: 18px; min-height: 180px; background: var(--s-brand); display: flex; align-items: flex-end; }
.shop-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.shop-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.55)); }
.shop-hero.plain::after { background: rgba(0,0,0,.15); }
.shop-hero-text { position: relative; z-index: 1; padding: 22px 18px; color: #fff; }
.shop-hero-text h1 { margin: 0 0 12px; font-size: 24px; line-height: 1.2; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.shop-hero-text .btn-order { display: inline-block; width: auto; padding: 11px 22px; text-decoration: none; }
.sec { margin-bottom: 26px; }
.sec-title { font-size: 19px; font-weight: 800; margin: 0 0 12px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; } .sec-head .sec-title { margin: 0; }
.countdown { font-size: 13px; font-weight: 700; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 999px; padding: 4px 10px; font-variant-numeric: tabular-nums; }
.sec-hero { position: relative; border-radius: var(--s-radius); overflow: hidden; background: var(--s-brand); display: flex; align-items: flex-end; min-height: 200px; }
.sec-hero.h-sm { min-height: 160px; } .sec-hero.h-md { min-height: 220px; } .sec-hero.h-lg { min-height: 280px; }
.sec-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sec-hero.overlay::after { content: ""; position: absolute; inset: 0; background: rgba(2,6,23,.45); }
.sec-hero-in { position: relative; z-index: 1; padding: 24px 18px; color: #fff; text-align: center; width: 100%; }
.sec-hero-in h1 { margin: 0; font-size: 26px; line-height: 1.15; font-weight: 900; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.sec-hero-in h2 { margin: 6px 0 0; font-size: 16px; font-weight: 700; opacity: .9; }
.sec-hero-in p { margin: 8px auto 0; max-width: 420px; font-size: 14px; opacity: .85; }
.sec-hero-in .btn-order { display: inline-block; width: auto; padding: 12px 24px; margin-top: 14px; text-decoration: none; }
.product-card .ph { position: relative; } .product-card .off { position: absolute; top: 8px; left: 8px; background: var(--s-price); color: #fff; font-size: 12px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-tile { display: flex; flex-direction: column; gap: 6px; text-align: center; font-size: 13px; font-weight: 700; }
.cat-tile .ph { aspect-ratio: 1; border-radius: 10px; background: var(--s-soft); overflow: hidden; } .cat-tile .ph img { width: 100%; height: 100%; object-fit: cover; }
.deal { display: flex; gap: 14px; border: 2px solid var(--s-cta); border-radius: var(--s-radius); overflow: hidden; background: #fff; }
.deal .ph { width: 42%; flex: none; background: var(--s-soft); } .deal .ph img { width: 100%; height: 100%; object-fit: cover; }
.deal-body { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 14px 0; justify-content: center; } .deal-body b { font-size: 17px; }
.deal-body .price { font-size: 20px; font-weight: 800; color: var(--s-price); } .deal-body .compare { font-size: 13px; color: var(--s-muted); text-decoration: line-through; margin-inline-start: 6px; font-weight: 500; }
.deal-body .btn-order { display: inline-block; width: auto; padding: 10px 18px; font-size: 15px; text-align: center; }
.ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ba { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px; overflow: hidden; background: var(--s-soft); position: relative; }
.ba span { position: relative; aspect-ratio: 3 / 4; } .ba img { width: 100%; height: 100%; object-fit: cover; }
.ba em { position: absolute; bottom: 6px; left: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; padding: 2px 6px; border-radius: 4px; }
.ba figcaption { grid-column: span 2; padding: 6px 8px; font-size: 13px; font-weight: 600; }
.guar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.guar { border: 1px solid var(--s-border); border-radius: 10px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 4px; }
.guar b { font-size: 14px; } .guar span { font-size: 13px; color: var(--s-muted); line-height: 1.4; }
.follow { display: flex; flex-wrap: wrap; gap: 10px; } .follow a { padding: 9px 16px; border: 1px solid var(--s-border); border-radius: 999px; font-weight: 700; font-size: 14px; }
.sec-news { border: 1px solid var(--s-border); border-radius: var(--s-radius); padding: 18px; text-align: center; background: var(--s-soft); }
.sec-news p { margin: 0 0 12px; color: var(--s-muted); font-size: 14px; }
.news-form { display: flex; gap: 8px; } .news-form input { flex: 1; min-width: 0; padding: 12px; border: 1px solid var(--s-border); border-radius: 10px; font: inherit; }
.news-form .btn-order { width: auto; padding: 12px 18px; font-size: 15px; }
@media (max-width: 600px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } .guar-grid { grid-template-columns: 1fr; } .ba-grid { grid-template-columns: 1fr; } .deal { flex-direction: column; } .deal .ph { width: 100%; aspect-ratio: 4 / 3; } .deal-body { padding: 0 14px 14px; } }
.shop-contacts, .shop-socials { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 16px; margin-top: 10px; font-size: 13px; }
.shop-contacts a, .shop-socials a { color: var(--s-cta); font-weight: 600; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; -webkit-overflow-scrolling: touch; }
.chips a {
  flex: none; padding: 7px 14px; border: 1px solid var(--s-border);
  border-radius: 999px; font-size: 14px; background: #fff; white-space: nowrap;
}
.chips a.active { background: var(--s-brand); color: #fff; border-color: var(--s-brand); }

/* --- Fiche produit -------------------------------------------------------- */

.gallery { border-radius: var(--s-radius); overflow: hidden; background: var(--s-soft); margin-bottom: 16px; }
.gallery .main-img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.gallery .thumbs { display: flex; gap: 8px; padding: 8px; overflow-x: auto; }
.gallery .thumbs img { width: 62px; height: 62px; border-radius: 8px; object-fit: cover; cursor: pointer; border: 2px solid transparent; flex: none; }
.gallery .thumbs img.active { border-color: var(--s-brand); }

.product-title { font-size: 23px; font-weight: 800; margin: 0 0 10px; line-height: 1.3; }
.price-row { display: flex; align-items: baseline; gap: 11px; margin-bottom: 8px; flex-wrap: wrap; }
.hero-title { font-size: 17px; font-weight: 700; margin: -4px 0 4px; color: var(--s-brand); }
.hero-sub { font-size: 14.5px; color: var(--s-muted); margin: 0 0 12px; }
.landing-lists { display: grid; gap: 12px; margin-bottom: 22px; }
.landing-lists ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.landing-lists li { position: relative; padding-inline-start: 24px; font-size: 14.5px; line-height: 1.5; }
.landing-lists .benefits li::before { content: "\2713"; position: absolute; inset-inline-start: 0; color: var(--s-brand); font-weight: 800; }
.landing-lists .features li::before { content: "\2022"; position: absolute; inset-inline-start: 6px; color: var(--s-muted); }
.faq { margin-bottom: 22px; border: 1px solid var(--s-border, #e5e7eb); border-radius: 12px; overflow: hidden; }
.faq details { border-bottom: 1px solid var(--s-border, #e5e7eb); }
.faq details:last-child { border-bottom: 0; }
.faq summary { cursor: pointer; padding: 12px 14px; font-weight: 700; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: "+"; color: var(--s-muted); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq p { margin: 0; padding: 0 14px 12px; font-size: 14px; color: #4b5563; line-height: 1.6; }
.price-now { font-size: 30px; font-weight: 800; color: var(--s-price); }
.price-was { font-size: 18px; color: var(--s-muted); text-decoration: line-through; }
.price-off { background: #fee2e2; color: var(--s-price); font-size: 13px; font-weight: 700; padding: 3px 9px; border-radius: 6px; }

.trust-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 18px; }
.trust-item {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  background: var(--s-soft); border-radius: 8px; padding: 8px 11px; color: #374151;
}

.description { font-size: 15.5px; line-height: 1.7; color: #374151; margin-bottom: 22px; }
.description img { border-radius: 10px; margin: 12px 0; }

/* --- Formulaire de commande ----------------------------------------------- */

.order-form {
  border: 2px solid var(--s-brand); border-radius: 14px;
  padding: 18px; background: #fff; scroll-margin-top: 16px;
}
.order-form h2 { margin: 0 0 4px; font-size: 19px; }
.order-form .sub { color: var(--s-muted); font-size: 14px; margin-bottom: 16px; }

.of-field { margin-bottom: 13px; }
.of-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.of-field input, .of-field select, .of-field textarea {
  width: 100%; padding: 13px; border: 1px solid var(--s-border);
  border-radius: 9px; font-size: 16px; font-family: inherit; background: #fff; color: var(--s-text);
}
.of-field input:focus, .of-field select:focus, .of-field textarea:focus {
  outline: none; border-color: var(--s-brand); box-shadow: 0 0 0 3px rgba(15, 23, 42, .1);
}
.of-field textarea { min-height: 72px; resize: vertical; }
.of-row { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }

.delivery-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.delivery-choice label {
  border: 2px solid var(--s-border); border-radius: 10px; padding: 12px;
  cursor: pointer; font-size: 14px; font-weight: 600; text-align: center; margin: 0;
}
.delivery-choice label.selected { border-color: var(--s-brand); background: var(--s-soft); }
.delivery-choice input { display: none; }
.delivery-choice .rate { display: block; font-size: 13px; color: var(--s-muted); font-weight: 500; margin-top: 3px; }

.qty { display: flex; align-items: center; gap: 0; width: fit-content; border: 1px solid var(--s-border); border-radius: 9px; overflow: hidden; }
.qty button { width: 44px; height: 44px; border: none; background: var(--s-soft); font-size: 20px; cursor: pointer; font-family: inherit; }
.qty input { width: 56px; text-align: center; border: none; border-inline: 1px solid var(--s-border); border-radius: 0; }

.summary { background: var(--s-soft); border-radius: 10px; padding: 14px; margin: 16px 0; font-size: 15px; }
.summary .line { display: flex; justify-content: space-between; padding: 4px 0; }
.summary .total {
  display: flex; justify-content: space-between; padding-top: 10px; margin-top: 8px;
  border-top: 1px solid var(--s-border); font-size: 19px; font-weight: 800;
}

.btn-order {
  width: 100%; padding: 17px; font-size: 18px; font-weight: 800; font-family: inherit;
  background: var(--s-cta); color: var(--s-btn-text, #fff); border: none; border-radius: 11px; cursor: pointer;
}
.btn-order:hover { filter: brightness(.92); }
.btn-order:disabled { opacity: .6; cursor: not-allowed; }
.form-note { text-align: center; font-size: 13px; color: var(--s-muted); margin-top: 11px; }
.form-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; padding: 11px; border-radius: 9px; margin-bottom: 14px; font-size: 14px; }

/* Barre d'achat fixe : sur mobile, le bouton reste visible pendant que le
   client lit la description, sans avoir a remonter. */
.sticky-cta {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  background: #fff; border-top: 1px solid var(--s-border);
  padding: 10px 14px; display: flex; gap: 12px; align-items: center;
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.sticky-cta .p { flex: 1; font-weight: 800; font-size: 18px; color: var(--s-price); }
.sticky-cta .btn-order { width: auto; padding: 13px 26px; font-size: 16px; }

/* --- Confirmation et suivi ------------------------------------------------ */

.thanks { text-align: center; padding: 34px 16px; }
.thanks .check {
  width: 68px; height: 68px; border-radius: 50%; background: #dcfce7; color: var(--s-cta);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin: 0 auto 18px;
}
.thanks h1 { font-size: 24px; margin-bottom: 8px; }
.ref-box {
  display: inline-block; background: var(--s-soft); border: 1px dashed var(--s-border);
  border-radius: 9px; padding: 11px 20px; font-size: 20px; font-weight: 800;
  letter-spacing: 1px; margin: 14px 0;
}

.timeline { list-style: none; padding: 0; margin: 20px 0; text-align: start; }
.timeline li { padding: 11px 0 11px 26px; position: relative; border-inline-start: 2px solid var(--s-border); margin-inline-start: 8px; }
.timeline li::before {
  content: ""; position: absolute; inset-inline-start: -7px; top: 16px;
  width: 12px; height: 12px; border-radius: 50%; background: var(--s-border);
}
.timeline li.done::before { background: var(--s-cta); }

.shop-footer {
  border-top: 1px solid var(--s-border); margin-top: 40px; padding: 22px 0;
  text-align: center; color: var(--s-muted); font-size: 13.5px;
}

@media (min-width: 640px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .sticky-cta { display: none; }
  .shop-wrap { padding-bottom: 30px; }
}

/* Arabe : l'interface bascule entierement en lecture droite-a-gauche. */
[dir="rtl"] body.shop, body.shop[dir="rtl"] { text-align: right; }
