/* SanadCheque — style.css */
:root {
  --bg: #F4F6F8;
  --ink: #222B33;
  --navy: #0F2A47;
  --green: #1FA37A;
  --paper: #fff;
  --line: #d5dbe1;
}

/* Thème sombre : auto (OS) + manuel via [data-theme] sur <html> */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0B1624;
    --ink: #E6ECF1;
    --navy: #8FB4DE;
    --green: #3CD0A0;
    --paper: #13233A;
    --line: #26405f;
  }
}
:root[data-theme="dark"] {
  --bg: #0B1624;
  --ink: #E6ECF1;
  --navy: #8FB4DE;
  --green: #3CD0A0;
  --paper: #13233A;
  --line: #26405f;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 12px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.6 "Bricolage Grotesque", system-ui, "Segoe UI", Arial, sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html[lang="ar"] body {
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

.w { max-width: 1000px; margin: 0 auto; padding: 0 22px; }

/* ---------- Header / logo ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.brand-logo {
  height: 46px;
  width: auto;
  display: block;
}
/* Bascule logo clair / sombre */
.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.hd { display: flex; gap: 10px; align-items: center; }

.lang, .theme {
  background: none;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  border-radius: 8px;
  padding: 9px 14px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.theme { padding: 9px 11px; line-height: 1; }

.btn {
  display: inline-block;
  background: var(--green);
  color: #04251b;
  padding: 14px 26px;
  border-radius: 8px;
  text-decoration: none;
  border: 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
:root[data-theme="dark"] .btn,
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn { color: #04251b; }
}
.btn:hover { filter: brightness(1.05); }

.btn:focus-visible,
a:focus-visible,
.lang:focus-visible,
.theme:focus-visible,
.expo-tab:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
}

/* ---------- Hero ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding: 36px 0 60px;
}
h1 {
  font-size: clamp(30px, 4.6vw, 52px);
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--navy);
  font-weight: 800;
}
h2 { font-size: clamp(24px, 3vw, 32px); margin: 0 0 8px; color: var(--navy); }
.hero p { margin: 0 0 20px; max-width: 44ch; }
.price { font-weight: 800; color: var(--navy); }
.price b { font-size: 34px; direction: ltr; unicode-bidi: isolate; display: inline-block; }
/* Prix : jamais inversés en arabe (RTL) */
.buy .big, .chq .amt { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Exemple de chèque */
.chq {
  background: var(--paper);
  border: 1.5px solid var(--navy);
  border-radius: 10px;
  padding: 22px 24px;
  transform: rotate(-2deg);
  box-shadow: 8px 8px 0 var(--green);
  direction: ltr;
  text-align: left;
}
.chq .r {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed var(--line);
  padding: 9px 0;
  font-size: 15px;
}
.chq .r b { font-weight: 600; }
.chq .amt { font-size: 24px; font-weight: 800; color: var(--navy); }
.chq .sig { margin-top: 20px; text-align: right; font-style: italic; color: var(--green); font-size: 22px; }
/* En arabe, l'exemple reste LTR mais on respecte RTL pour les libellés */
html[lang="ar"] .chq .r span { direction: rtl; }

/* ---------- Sections ---------- */
section { padding: 46px 0; border-top: 1px solid var(--line); }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px 30px; margin-top: 24px; }
.feat b { display: block; color: var(--navy); font-size: 19px; }
.feat span { font-size: 16px; }
.banks { margin: 30px 0 0; font-size: 16px; }
.banks b { color: var(--navy); }

/* ---------- Diaporama (aperçu du logiciel) ---------- */
.slideshow {
  background: var(--paper);
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  box-shadow: 8px 8px 0 var(--green);
  overflow: hidden;
  direction: ltr;
  margin-top: 24px;
}
.ss-frame {
  position: relative;
  aspect-ratio: 822 / 560; /* largeur des captures + espace legend */
  border-bottom: 1px solid var(--line);
}
.ss-slide {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 18px 18px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.ss-slide.on {
  opacity: 1;
  visibility: visible;
  transition: opacity .5s ease;
  z-index: 1;
}
.ss-slide img {
  max-width: 100%;
  max-height: calc(100% - 28px);
  width: auto;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(15, 42, 71, .15);
}
html[lang="ar"] .ss-slide figcaption { direction: rtl; }
.ss-slide figcaption { font-size: 14px; opacity: .75; text-align: center; }

.ss-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  color: var(--navy);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: 4px;
  opacity: .9;
}
.ss-nav:hover { opacity: 1; background: var(--green); color: #04251b; border-color: var(--green); }
.ss-prev { left: 12px; }
.ss-next { right: 12px; }

.ss-dots {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 12px 0 14px;
}
.ss-dots button {
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ss-dots button::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 11px;
  height: 11px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1.5px solid var(--navy);
  background: transparent;
}
.ss-dots button.on::after {
  background: var(--green);
  border-color: var(--green);
}

@media (max-width: 760px) {
  .ss-frame { aspect-ratio: auto; min-height: 220px; }
  .ss-slide { padding: 14px 44px 6px; }
  .ss-nav { width: 34px; height: 34px; font-size: 22px; }
}

/* ---------- Exemples de chèques : vitrine trilingue ---------- */
.expo { margin-top: 28px; }

.expo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-inline-start: 16px;
  position: relative;
  z-index: 2;
  margin-bottom: -1.5px;
}
.expo-tab {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px 12px;
  border: 1.5px solid var(--navy);
  border-radius: 10px 10px 0 0;
  background: var(--bg);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  opacity: .62;
  transition: opacity .2s ease, background .2s ease;
}
.expo-tab .code {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  height: 22px;
  padding: 0 5px;
  border: 1.5px solid currentColor;
  border-radius: 5px;
  font-size: 11px;
  letter-spacing: .05em;
  opacity: .9;
}
.expo-tab.on {
  opacity: 1;
  background: var(--paper);
  border-bottom-color: var(--paper);
  box-shadow: inset 0 3px 0 var(--green);
}
.expo-tab.on .code {
  background: var(--green);
  border-color: var(--green);
  color: #04251b;
  opacity: 1;
}

.expo-stage {
  position: relative;
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  border-start-start-radius: 0;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 1px 1px, var(--line) 1.1px, transparent 1.1px),
    linear-gradient(135deg, rgba(31, 163, 122, .07), transparent 58%);
  background-size: 20px 20px, 100% 100%;
  box-shadow: 8px 8px 0 var(--green);
  padding: clamp(16px, 3.4vw, 36px) clamp(14px, 3.4vw, 36px) 0;
  overflow: hidden;
}

.expo-panel { display: none; }
.expo-panel.on {
  display: block;
  animation: expo-in .38s ease both;
}
@keyframes expo-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.expo-fig { margin: 0; }
.expo-mat {
  position: relative;
  aspect-ratio: 2560 / 1160;
  padding: clamp(7px, 1.2vw, 13px);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(15, 42, 71, .18), 0 2px 0 rgba(15, 42, 71, .06);
  transform: rotate(-.55deg);
  transition: transform .45s cubic-bezier(.2, .7, .2, 1);
}
/* Bandes adhésives façon chèque posé sur un bureau */
.expo-mat::before,
.expo-mat::after {
  content: "";
  position: absolute;
  top: -11px;
  width: clamp(66px, 9vw, 92px);
  height: clamp(22px, 3vw, 28px);
  background: rgba(244, 211, 94, .58);
  border-left: 1px dashed rgba(120, 90, 20, .18);
  border-right: 1px dashed rgba(120, 90, 20, .18);
  box-shadow: 0 2px 4px rgba(15, 42, 71, .10);
  pointer-events: none;
}
.expo-mat::before { inset-inline-start: 5%; transform: rotate(-5deg); }
.expo-mat::after { inset-inline-end: 5%; transform: rotate(4deg); }
.expo-mat img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.expo-fig figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 9px;
  padding: 14px 108px 20px 10px;
  font-size: 14px;
  text-align: center;
}
.expo-fig figcaption b {
  color: var(--navy);
  font-weight: 800;
}
.expo-fig figcaption b::after {
  content: "·";
  margin-inline-start: 9px;
  color: var(--green);
}
.expo-fig figcaption span { opacity: .78; }

.expo-stamp {
  position: absolute;
  right: clamp(10px, 3vw, 26px);
  bottom: clamp(8px, 2vw, 16px);
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 1px;
  width: clamp(64px, 8vw, 84px);
  height: clamp(64px, 8vw, 84px);
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--paper);
  color: var(--green);
  text-align: center;
  transform: rotate(-9deg);
  pointer-events: none;
  box-shadow: 0 4px 14px rgba(15, 42, 71, .14);
}
.expo-stamp::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px dashed currentColor;
  border-radius: 50%;
}
.expo-stamp span {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
}
.expo-stamp b {
  font-size: 9px;
  letter-spacing: .05em;
  line-height: 1.15;
}

@media (hover: hover) and (pointer: fine) {
  .expo-tab:hover { opacity: .92; }
  .expo-fig:hover .expo-mat { transform: rotate(0deg); }
}

@media (prefers-reduced-motion: reduce) {
  .expo-panel.on { animation: none; }
  .expo-mat { transition: none; }
}

/* ---------- Vidéo ---------- */

.video-box {
  position: relative;
  margin-top: 24px;
  background: #000;
  border: 1.5px solid var(--navy);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 8px 8px 0 var(--green);
}
.video-box video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1110 / 608;
  background: #000;
}
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  padding: 0 0 4px 4px;
  border: 0;
  border-radius: 50%;
  background: var(--green);
  color: #04251b;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .35);
  transition: transform .2s ease, opacity .2s ease;
}
.video-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.video-play.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Formulaire ---------- */
form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 20px;
  max-width: 640px;
}
label { display: block; font-size: 15px; font-weight: 600; color: var(--navy); }
input, textarea {
  width: 100%;
  margin-top: 5px;
  padding: 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}
textarea { min-height: 110px; resize: vertical; }
.honeypot { display: none !important; }
form .full { grid-column: 1 / -1; }
.ok { margin: 12px 0 0; font-size: 15px; color: var(--green); min-height: 1.4em; }

/* ---------- FAQ ---------- */
.faq {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.faq details {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 0 18px;
}
.faq summary {
  position: relative;
  padding: 14px 0;
  padding-inline-end: 30px;
  color: var(--navy);
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--green);
  font-size: 22px;
  line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 16px; font-size: 16px; }
.faq summary:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Achat ---------- */
.buy { text-align: center; }
.buy .big { font-size: 52px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.buy p { margin: 10px 0 22px; }
.buy small { display: block; margin-top: 14px; font-size: 15px; opacity: .85; }
.buy small a { color: inherit; }

footer { padding: 24px 0 40px; font-size: 14px; opacity: .8; text-align: center; }

@media (max-width: 760px) {
  .hero, .feat, form { grid-template-columns: 1fr; }
  .hero { padding-top: 18px; }
  .brand-logo { height: 38px; }
  header { gap: 8px; }
  .hd { gap: 7px; }
  .lang, .theme { padding: 8px 10px; font-size: 14px; }
  .theme { padding: 8px 9px; }
  .expo { margin-top: 20px; }
  .expo-tabs { gap: 3px; padding-inline-start: 6px; }
  .expo-tab { gap: 4px; padding: 7px 6px 8px; font-size: 12px; }
  .expo-tab .code { min-width: 20px; height: 18px; font-size: 9.5px; }
  .expo-stage { padding: 14px 12px 0; box-shadow: 5px 5px 0 var(--green); }
  .expo-mat { transform: rotate(-.35deg); }
  .expo-fig figcaption {
    gap: 6px;
    padding: 12px 74px 15px 4px;
    font-size: 12.5px;
  }
  .expo-stamp {
    right: 9px;
    bottom: 8px;
    width: 58px;
    height: 58px;
  }
  .expo-stamp span { font-size: 15px; }
  .expo-stamp b { font-size: 7.5px; }
  .video-box { box-shadow: 5px 5px 0 var(--green); }
  .video-play { width: 60px; height: 60px; font-size: 24px; }
}

@media (max-width: 600px) {
  /* Le bouton d'achat du header est déjà présent dans le hero */
  .hd .btn { display: none; }
}
