/*
Theme Name: SocialBost
Theme URI: https://socialbost.com
Description: Thème boutique SMM pour SocialBost (WooCommerce, français / arabe, RTL).
Version: 1.1.0
Requires PHP: 7.4
Text Domain: socialbost
*/

:root {
  --bg: #f6f2ea;
  --surface: #fffdf8;
  --ink: #10231c;
  --muted: #5d6b64;
  --line: #e2dccf;
  --brand: #0f5c45;
  --brand-ink: #f6f2ea;
  --accent: #ff5a1f;
  --accent-soft: #ffe3d6;
  --ok: #138a5b;
  --radius: 18px;
  --max: 1180px;
  --font: "Bricolage Grotesque", system-ui, sans-serif;
  --font-ar: "Cairo", "Bricolage Grotesque", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
body.rtl { font-family: var(--font-ar); }
img { max-width: 100%; height: auto; }
a { color: inherit; }
.sb-wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Buttons ---------- */
.sb-btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button,
.woocommerce #respond input#submit, .woocommerce a.button.alt, .woocommerce button.button.alt {
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--ink); color: var(--bg);
  border: 0; border-radius: 999px;
  padding: .85em 1.5em; font: 600 15px/1 var(--font);
  text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
body.rtl .sb-btn, body.rtl .woocommerce .button { font-family: var(--font-ar); }
.sb-btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { transform: translateY(-2px); background: var(--brand); color: var(--brand-ink); }
.sb-btn--accent, .woocommerce a.button.alt, .woocommerce button.button.alt { background: var(--accent); color: #fff; }
.sb-btn--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }

/* ---------- Header ---------- */
.sb-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.admin-bar .sb-header { top: 32px; }
.sb-header__in { display: flex; align-items: center; gap: 24px; height: 72px; }
.sb-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 22px; letter-spacing: -.02em; text-decoration: none; }
.sb-logo__mark { width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 18px; transform: rotate(-8deg); }
.sb-logo img { max-height: 40px; width: auto; }
.sb-nav { margin-inline-start: auto; }
.sb-nav ul { list-style: none; display: flex; gap: 26px; margin: 0; padding: 0; }
.sb-nav a { text-decoration: none; font-weight: 500; color: var(--muted); }
.sb-nav a:hover { color: var(--ink); }
.sb-tools { display: flex; align-items: center; gap: 14px; }
.sb-lang ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.sb-lang a { display: block; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 600; text-decoration: none; text-transform: uppercase; }
.sb-lang .current-lang a { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.sb-cart { position: relative; text-decoration: none; font-size: 20px; }
.sb-cart__count { position: absolute; top: -8px; inset-inline-end: -10px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.sb-burger { display: none; background: none; border: 0; font-size: 22px; cursor: pointer; color: var(--ink); }

/* ---------- Hero ---------- */
.sb-hero { padding: 72px 0 56px; }
.sb-hero__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 56px; align-items: center; }
.sb-eyebrow { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: #9a2e06; font-weight: 600; font-size: 14px; padding: 6px 14px; border-radius: 999px; }
.sb-hero h1 { font-size: clamp(40px, 6vw, 76px); line-height: 1; letter-spacing: -.035em; margin: 22px 0 20px; font-weight: 800; }
body.rtl .sb-hero h1 { letter-spacing: 0; line-height: 1.25; }
.sb-hero h1 em { font-style: normal; color: var(--accent); position: relative; white-space: nowrap; }
.sb-hero h1 em::after { content: ""; position: absolute; inset-inline: 0; bottom: .05em; height: .14em; background: currentColor; opacity: .25; border-radius: 4px; }
.sb-hero p.lead { font-size: 19px; color: var(--muted); max-width: 520px; margin: 0 0 30px; }
.sb-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.sb-hero__trust { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.sb-hero__trust i { color: var(--ok); margin-inline-end: 6px; }

/* Order "ticket" illustration */
.sb-ticket { background: var(--surface); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: 0 30px 60px -30px rgba(16, 35, 28, .35); position: relative; }
.sb-ticket::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 26px; background: var(--brand); z-index: -1; }
body.rtl .sb-ticket::before { inset: 14px 14px -14px -14px; }
.sb-ticket__head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--muted); }
.sb-ticket__pill { background: #e3f4ec; color: var(--ok); font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.sb-ticket__svc { display: flex; align-items: center; gap: 14px; margin: 20px 0; }
.sb-ticket__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; color: #fff; background: linear-gradient(135deg, #feda75, #d62976 50%, #4f5bd5); }
.sb-ticket__svc strong { display: block; font-size: 18px; }
.sb-ticket__svc span { color: var(--muted); font-size: 14px; }
.sb-steps { list-style: none; margin: 0; padding: 0; border-top: 1px dashed var(--line); }
.sb-steps li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.sb-steps li i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--ok); color: #fff; }
.sb-steps li.is-now i { background: var(--accent); animation: sb-pulse 1.6s infinite; }
.sb-steps li.is-next { color: var(--muted); }
.sb-steps li.is-next i { background: var(--line); color: var(--muted); }
.sb-bar { height: 8px; background: var(--line); border-radius: 8px; margin-top: 18px; overflow: hidden; }
.sb-bar span { display: block; height: 100%; width: 64%; background: var(--accent); border-radius: 8px; animation: sb-fill 3s ease-out both; }
@keyframes sb-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 31, .5); } 50% { box-shadow: 0 0 0 8px rgba(255, 90, 31, 0); } }
@keyframes sb-fill { from { width: 8%; } }

/* ---------- Sections ---------- */
.sb-section { padding: 72px 0; }
.sb-section--dark { background: var(--ink); color: var(--bg); }
.sb-section--dark .sb-muted { color: #a9b8b1; }
.sb-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.sb-head h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.05; letter-spacing: -.03em; margin: 0; font-weight: 800; max-width: 640px; }
body.rtl .sb-head h2 { letter-spacing: 0; line-height: 1.3; }
.sb-muted { color: var(--muted); }

/* Platforms */
.sb-platforms { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.sb-plat { display: flex; flex-direction: column; gap: 22px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform .2s ease, border-color .2s ease; }
.sb-plat:hover { transform: translateY(-4px) rotate(-1deg); border-color: var(--plat, var(--ink)); }
.sb-plat i { font-size: 30px; color: var(--plat, var(--ink)); }
.sb-plat strong { font-size: 17px; }
.sb-plat span { display: block; font-size: 13px; color: var(--muted); }

/* Steps */
.sb-how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: how; }
.sb-how li { list-style: none; padding: 28px; border-radius: var(--radius); border: 1px solid #2a3c35; counter-increment: how; }
.sb-how li::before { content: "0" counter(how); display: block; font-size: 52px; font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 18px; }
.sb-how h3 { margin: 0 0 8px; font-size: 22px; }
.sb-how p { margin: 0; }

/* Guarantees */
.sb-perks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.sb-perk { padding: 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.sb-perk i { font-size: 22px; color: var(--brand); background: #dcefe7; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px; }
.sb-perk h3 { margin: 0 0 6px; font-size: 18px; }
.sb-perk p { margin: 0; color: var(--muted); font-size: 15px; }

/* FAQ */
.sb-faq { max-width: 820px; }
.sb-faq details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.sb-faq summary { cursor: pointer; font-size: 19px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.sb-faq summary::after { content: "+"; color: var(--accent); font-size: 26px; line-height: 1; transition: transform .2s; }
.sb-faq details[open] summary::after { transform: rotate(45deg); }
.sb-faq p { color: var(--muted); margin: 12px 0 0; }

/* CTA band */
.sb-cta { background: var(--accent); color: #fff; border-radius: 30px; padding: 48px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.sb-cta h2 { margin: 0; font-size: clamp(28px, 3.5vw, 42px); line-height: 1.1; max-width: 560px; }
.sb-cta .sb-btn { background: #fff; color: var(--ink); }

/* Footer */
.sb-footer { padding: 56px 0 30px; border-top: 1px solid var(--line); margin-top: 72px; }
.sb-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.sb-footer h4 { margin: 0 0 12px; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.sb-footer ul { list-style: none; margin: 0; padding: 0; }
.sb-footer li { margin: 6px 0; }
.sb-footer a { text-decoration: none; }
.sb-footer a:hover { color: var(--accent); }
.sb-footer__bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.sb-pay { display: flex; gap: 10px; font-size: 22px; color: var(--muted); }

/* WhatsApp floating */
.sb-wa { position: fixed; bottom: 20px; inset-inline-end: 20px; z-index: 60; width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 30px; box-shadow: 0 10px 30px -8px rgba(0, 0, 0, .4); text-decoration: none; }

/* ---------- Content pages ---------- */
.sb-page { padding: 48px 0; }
.sb-page h1.sb-title { font-size: clamp(32px, 4vw, 52px); letter-spacing: -.03em; margin: 0 0 24px; }
.sb-entry { max-width: 820px; }

/* ---------- WooCommerce ---------- */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 0 !important; }
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px !important; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.woocommerce ul.products li.product:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -24px rgba(16, 35, 28, .4); }
.woocommerce ul.products li.product a img { border-radius: 12px; margin-bottom: 14px; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 17px !important; font-weight: 700; padding: 0 0 6px !important; }
.woocommerce ul.products li.product .price { color: var(--ink) !important; font-size: 22px !important; font-weight: 800; margin-top: auto !important; }
.woocommerce ul.products li.product .button { margin-top: 14px !important; justify-content: center; }
.woocommerce span.onsale { background: var(--accent); border-radius: 999px; min-height: 0; line-height: 1; padding: 8px 12px; }
.woocommerce div.product .product_title { font-size: clamp(28px, 3.5vw, 44px); letter-spacing: -.02em; }
.woocommerce div.product p.price { color: var(--accent); font-size: 30px; font-weight: 800; }
.woocommerce div.product form.cart { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.woocommerce .sb-smm-link input, .woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce .quantity .qty {
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; background: #fff;
}
.woocommerce .sb-smm-link input:focus { outline: none; border-color: var(--brand); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--brand); background: var(--surface); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--brand); }
.woocommerce nav.woocommerce-pagination ul { border: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .sb-hero__grid { grid-template-columns: 1fr; }
  .sb-perks { grid-template-columns: repeat(2, 1fr); }
  .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); }
  .sb-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .sb-burger { display: block; }
  .sb-nav { position: absolute; top: 72px; inset-inline: 0; background: var(--bg); border-bottom: 1px solid var(--line); display: none; margin: 0; }
  .sb-nav.is-open { display: block; }
  .sb-nav ul { flex-direction: column; gap: 0; padding: 10px 20px; }
  .sb-nav a { display: block; padding: 12px 0; }
  .sb-how, .sb-perks { grid-template-columns: 1fr; }
  .sb-cta { padding: 32px; }
  .sb-footer__grid { grid-template-columns: 1fr; }
  .sb-section { padding: 56px 0; }
  .admin-bar .sb-header { top: 0; }
}
@media (max-width: 480px) {
  .woocommerce ul.products { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
.sb-cart__count[hidden] { display: none; }


/* ---------- Tuiles plateformes ---------- */
.sb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.sb-tile { position: relative; }
.sb-tile__btn { width: 100%; aspect-ratio: 4 / 3; border: 0; border-radius: var(--radius); background: var(--tile); color: #fff; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; font: 700 17px/1.2 var(--font); padding: 16px; transition: transform .2s ease, box-shadow .2s ease; }
body.rtl .sb-tile__btn { font-family: var(--font-ar); }
.sb-tile__btn i { font-size: 54px; }
.sb-tile.is-light .sb-tile__btn { color: #111; }
.sb-tile__btn:hover, .sb-tile.is-open .sb-tile__btn { transform: translateY(-4px); box-shadow: 0 18px 30px -16px rgba(0, 0, 0, .5); }
.sb-tile__menu { position: absolute; z-index: 20; top: calc(100% + 10px); inset-inline-start: 50%; transform: translateX(-50%); min-width: 230px; margin: 0; padding: 8px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 40px -20px rgba(16, 35, 28, .45); display: none; }
body.rtl .sb-tile__menu { transform: translateX(50%); }
.sb-tile__menu::before { content: ""; position: absolute; top: -7px; left: 50%; margin-left: -7px; width: 14px; height: 14px; background: var(--surface); border-left: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
.sb-tile.is-open .sb-tile__menu { display: block; }
.sb-tile__menu a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; font-weight: 600; border-inline-start: 3px solid transparent; }
.sb-tile__menu a:hover { background: var(--bg); border-inline-start-color: var(--accent); }
.sb-tile__all a { color: var(--muted); font-weight: 500; font-size: 14px; }
.sb-shop-tiles { margin-bottom: 40px; }
@media (max-width: 480px) {
  .sb-tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .sb-tile__btn i { font-size: 40px; }
  .sb-tile__btn { font-size: 15px; }
}
