/*
 * SoukPilot — Lot P — Constructeur de boutique publique et thèmes sectoriels
 * Feuille de style additive : ne redéfinit aucune règle existante du
 * checkout, du catalogue ou du Centre COD. Pilotée par des variables CSS
 * injectées par storefront-theme.js à partir de la configuration publiée.
 */

:root {
  --sp-theme-primary: #1B2A4A;
  --sp-theme-accent: #C9A227;
  --sp-theme-background: #F7F7F5;
  --sp-theme-text: #1A1A1A;
  --sp-theme-radius: 10px;
  --sp-theme-gap: 24px;
}

html[data-sp-corners="sharp"]   { --sp-theme-radius: 2px; }
html[data-sp-corners="soft"]    { --sp-theme-radius: 10px; }
html[data-sp-corners="round"]   { --sp-theme-radius: 22px; }

html[data-sp-spacing="compact"]     { --sp-theme-gap: 14px; }
html[data-sp-spacing="comfortable"] { --sp-theme-gap: 24px; }
html[data-sp-spacing="airy"]        { --sp-theme-gap: 36px; }

/* Polices autorisées uniquement (aucun chargement de police externe non validée). */
html[data-sp-font="sp-serif-elegant"]    { --sp-theme-font: Georgia, "Times New Roman", serif; }
html[data-sp-font="sp-rounded-friendly"] { --sp-theme-font: "Segoe UI", "Trebuchet MS", sans-serif; }
html[data-sp-font="sp-sans-warm"]        { --sp-theme-font: "Segoe UI", Arial, sans-serif; }
html[data-sp-font="sp-sans-technical"]   { --sp-theme-font: "Consolas", "Segoe UI", monospace, sans-serif; }

body.merchant-storefront {
  background: var(--sp-theme-background);
  color: var(--sp-theme-text);
  font-family: var(--sp-theme-font, inherit);
}

body.merchant-storefront .btn-primary,
body.merchant-storefront .sp-share-button {
  background: var(--sp-theme-primary);
  border-radius: var(--sp-theme-radius);
}

html[data-sp-button-style="outline"] body.merchant-storefront .btn-primary {
  background: transparent;
  border: 2px solid var(--sp-theme-primary);
  color: var(--sp-theme-primary);
}

html[data-sp-button-style="pill"] body.merchant-storefront .btn-primary {
  border-radius: 999px;
}

body.merchant-storefront .value-card,
body.merchant-storefront .product-grid .card {
  border-radius: var(--sp-theme-radius);
  gap: var(--sp-theme-gap);
}

/* Bannière secondaire (section "banner"). */
.sp-theme-banner {
  padding: calc(var(--sp-theme-gap) * 1.2) 0;
  background: linear-gradient(135deg, var(--sp-theme-primary), var(--sp-theme-accent));
  color: #fff;
  text-align: center;
}
.sp-theme-banner h2 { margin: 0 0 8px; font-size: 1.5rem; }
.sp-theme-banner p { margin: 0; opacity: .92; }

/* Avantages (déjà stylée via .value-card ; ajout uniquement de l'espacement). */
.sp-theme-advantage { border: 1px solid rgba(0,0,0,.06); }

/* Témoignages. */
.sp-theme-testimonials-grid {
  display: grid;
  gap: var(--sp-theme-gap);
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.sp-theme-testimonial {
  margin: 0;
  padding: var(--sp-theme-gap);
  background: #fff;
  border-radius: var(--sp-theme-radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.sp-theme-testimonial blockquote { margin: 0 0 10px; font-style: italic; }
.sp-theme-testimonial figcaption { font-weight: 600; color: var(--sp-theme-primary); }

/* FAQ. */
.sp-theme-faq-list { display: flex; flex-direction: column; gap: 10px; }
.sp-theme-faq-item {
  border: 1px solid rgba(0,0,0,.1);
  border-radius: var(--sp-theme-radius);
  padding: 10px 14px;
}
.sp-theme-faq-item summary { cursor: pointer; font-weight: 600; }
.sp-theme-faq-item p { margin: 8px 0 0; }

/* Support RTL complet : les nouvelles sections héritent de dir="rtl" posé
   sur <html> par soukpilot-i18n-core.js, aucune règle miroir supplémentaire
   n'est nécessaire car flex/grid s'inversent automatiquement. */
[dir="rtl"] .sp-theme-testimonial blockquote { text-align: right; }

/* Accessibilité : focus visible cohérent avec accessibility.css existant. */
.sp-theme-faq-item summary:focus-visible,
.sp-theme-banner a:focus-visible {
  outline: 3px solid var(--sp-theme-accent);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .sp-theme-testimonials-grid { grid-template-columns: 1fr; }
}

/* Lot V — catégories (chips de navigation) et liens légaux du pied de page. */
.sp-theme-categories-list {
  display: flex; flex-wrap: wrap; gap: 10px;
}
.sp-theme-category-chip {
  display: inline-block; padding: 6px 16px;
  border-radius: 999px; background: var(--sp-theme-background);
  border: 1px solid var(--sp-theme-primary); color: var(--sp-theme-primary);
  text-decoration: none; font-size: .9rem;
}
.sp-theme-category-chip:hover { background: var(--sp-theme-primary); color: #fff; }

.sp-theme-legal-links {
  display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: .85rem;
}
.sp-theme-legal-links a { color: inherit; opacity: .8; text-decoration: underline; }

/* SoukPilot R9.2 — miniature réelle intégrée aux cartes du dashboard. */
.sp-card-preview-mode,.sp-card-preview-mode body{overflow:hidden!important}.sp-card-preview-mode .sp-consent-banner,.sp-card-preview-mode .sp-consent-launcher{display:none!important}
