/* ── Styles principaux ────────────────────────────────── */
:root {
  --navy: #1e3a8a;
  --navy-deep: #1d3885; /* bleu des barres et sections sombres */
  --navy-dark: #172554; /* survol des boutons bleus */
  --gold: #ffc300;
  --gold-deep: #b8860b; /* doré sur fond clair (icônes, flèches, libellés) */
  --gold-hover: #d99e00;
  --ink: #16203a;
  --paper: #faf7f0;
  --paper-line: #ece5d6;
  --stone: #5a6478;
  --line: #e6e8ee;
  --bs-primary: #1e3a8a;
  --bs-primary-rgb: 30, 58, 138;
}
body {
  font-family: "Inter", sans-serif;
  color: var(--ink);
}
html {
  scroll-behavior: smooth;
}

.font-serif {
  font-family: "Fraunces", Georgia, serif;
}
body.rtl {
  font-family: "Cairo", Tahoma, sans-serif;
}
body.rtl h1,
body.rtl h2,
body.rtl h3,
body.rtl h4,
body.rtl .font-serif,
body.rtl .brand-name {
  font-family: "El Messiri", Tahoma, sans-serif;
}

.text-gold {
  color: var(--gold) !important;
}
.text-gold-deep {
  color: var(--gold-deep) !important;
}
.text-navy {
  color: var(--navy) !important;
}
.text-stone {
  color: var(--stone) !important;
}
.bg-navy {
  background-color: var(--navy) !important;
}
.bg-navy-deep {
  background-color: var(--navy-deep) !important;
}
.bg-paper {
  background-color: var(--paper) !important;
}

.btn-gold {
  background-color: var(--gold);
  color: var(--ink);
  font-weight: 700;
  border: none;
}
.btn-gold:hover {
  background-color: var(--gold-hover);
  color: var(--ink);
}
.btn-outline-navy {
  border: 2px solid var(--navy);
  color: var(--navy);
  font-weight: 700;
}
.btn-outline-navy:hover {
  background-color: var(--navy);
  color: #fff;
}
.btn-navy {
  background-color: var(--navy);
  color: #fff;
  font-weight: 700;
  border: none;
}
.btn-navy:hover {
  background-color: var(--navy-dark);
  color: #fff;
}
.btn-ghost-light {
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
}
.btn-ghost-light:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.zellige {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='76' height='76' viewBox='0 0 76 76'%3E%3Cg stroke='%23ffc300' stroke-width='0.7' fill='none' opacity='0.55'%3E%3Crect x='22' y='22' width='32' height='32'/%3E%3Crect x='22' y='22' width='32' height='32' transform='rotate(45 38 38)'/%3E%3Ccircle cx='38' cy='38' r='3'/%3E%3C/g%3E%3C/svg%3E");
}

.navbar {
  box-shadow: 0 1px 0 var(--line);
}
.brand-name {
  font-family: "Fraunces", serif;
  font-size: 25px;
  font-weight: 600;
  color: var(--navy);
  /* centrage vertical avec l'icône : boîte de texte = hauteur de la police.
     --brand-shift = réglage optique : positif = descend le texte, négatif = le monte */
  --brand-shift: 0.06em;
  display: inline-block;
  line-height: 1;
  transform: translateY(var(--brand-shift));
}
.nav-link {
  color: var(--stone) !important;
  font-weight: 500;
  font-size: 14.5px;
}
.nav-link:hover {
  color: var(--navy) !important;
}

.kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold-deep);
}
body.rtl .kicker {
  letter-spacing: 0;
}
.sec-title {
  font-family: "Fraunces", serif;
  font-size: 36px;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.18;
  letter-spacing: -0.6px;
}
body.rtl .sec-title {
  font-weight: 700;
  letter-spacing: 0;
}
.sec-lead {
  font-size: 16px;
  color: var(--stone);
  line-height: 1.7;
}

#statemachine .ui-preview {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

#statemachine .ui-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
body.rtl .hero h1 em {
  font-style: normal;
}

.feat-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  transition: 0.2s;
  height: 100%;
}
.feat-card:hover {
  background: var(--paper);
  transform: translateY(-2px);
}
.feat-ico {
  width: 46px;
  height: 46px;
  border-radius: 11px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feat-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.7;
}

/* ── مسار القضية — life track ── */
.life-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  position: relative;
}

/* Ligne de connexion entre les nœuds */
.life-track::before {
  content: "";
  position: absolute;
  top: 27px; /* centre vertical du cercle de 56px */
  inset-inline-start: calc(56px / 2); /* commence au centre du premier cercle */
  inset-inline-end: calc(56px / 2); /* finit au centre du dernier cercle */
  height: 2px;
  background: linear-gradient(
    to left,
    /* RTL : de droite (01) vers gauche (05) */ var(--gold) 0%,
    rgba(255, 195, 0, 0.25) 100%
  );
  z-index: 0;
}

.life-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  padding: 0 8px;
}

.life-node {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Fraunces", serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 16px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 195, 0, 0.15);
}

.life-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
body.rtl .life-label {
  font-family: "El Messiri", Tahoma, sans-serif;
  font-size: 15.5px;
}

.life-desc {
  font-size: 13px;
  color: var(--stone);
  line-height: 1.65;
  margin: 0;
}
body.rtl .life-desc {
  font-size: 13px;
  line-height: 1.75;
}

/* Mobile : colonne verticale avec ligne à gauche (RTL : droite) */
@media (max-width: 767.98px) {
  .life-track {
    flex-direction: column;
    align-items: flex-end; /* RTL : nœuds à droite */
    gap: 0;
  }
  .life-track::before {
    top: calc(56px / 2);
    bottom: calc(56px / 2);
    inset-inline-start: auto;
    inset-inline-end: 27px; /* centre horizontal du cercle */
    width: 2px;
    height: auto;
    background: linear-gradient(
      to bottom,
      var(--gold) 0%,
      rgba(255, 195, 0, 0.25) 100%
    );
  }
  .life-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: start;
    gap: 16px;
    padding: 0 0 28px 0;
    width: 100%;
  }
  .life-node {
    margin-bottom: 0;
    flex-shrink: 0;
  }
  .life-step > div:last-child {
    flex: 1;
  }
}

.guard {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  height: 100%;
}
.guard-ico {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 195, 0, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
}
.guard-ico svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.9;
}

.proc-card {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  height: 100%;
}
.proc-num {
  font-family: "Fraunces", serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--gold-deep);
  border: 1.5px solid var(--gold);
  border-radius: 8px;
  padding: 4px 9px;
}
.proc-ar {
  font-family: "El Messiri", serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
}
.proc-tag {
  font-family: "Cairo", sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--navy);
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  padding: 3px 9px;
}

.price-card {
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: #fff;
  height: 100%;
  color: var(--ink);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.price-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}
.price-card li span {
  color: var(--ink);
}
.price-card li.text-stone span {
  color: var(--stone);
}
.price-card.featured {
  border: 2px solid var(--gold);
  box-shadow: 0 30px 60px -25px rgba(0, 0, 0, 0.6);
}
.price-amount {
  font-family: "Fraunces", serif;
  font-size: 44px;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: -1px;
  line-height: 1;
}
.price-cur {
  font-family: "Fraunces", serif;
  font-size: 18px;
  font-weight: 500;
  color: var(--navy);
}
.price-badge {
  background: var(--gold);
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 6px 18px;
  border-radius: 20px;
}
.ck {
  width: 19px;
  height: 19px;
  min-width: 19px;
  border-radius: 50%;
  background: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ck svg {
  width: 11px;
  height: 11px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 2.6;
}
.xk {
  width: 19px;
  height: 19px;
  min-width: 19px;
  border-radius: 50%;
  background: #f1f2f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.xk svg {
  width: 10px;
  height: 10px;
  stroke: #aab;
  fill: none;
  stroke-width: 2.6;
}
.lic-note {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 195, 0, 0.1);
  border: 1px solid rgba(255, 195, 0, 0.25);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
}

.text-strike {
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.3);
}

/* ── Hero carousel ───────────────────────────────────────── */
.hero-carousel {
  position: relative;
  overflow: hidden;
  background: var(--navy-deep);
}
.hero-carousel .zellige-bg {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
}
.hero-carousel .radial-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    120% 80% at 100% 0%,
    rgba(255, 195, 0, 0.07),
    transparent 55%
  );
}

/* carousel overrides */
.hero-carousel .carousel-item {
  min-height: 560px;
}
.hero-carousel .carousel-fade .carousel-item {
  transition: opacity 0.8s ease-in-out !important;
}

/* ── Titre h1 ── */
.hero-carousel h1 {
  font-size: 48px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.5px;
}
body.rtl .hero-carousel h1 {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.35; /* El Messiri a besoin de plus d'espace inter-lignes */
  letter-spacing: 0;
}

/* em en italique doré en FR, souligné doré en AR (pas d'italic sur El Messiri) */
.hero-carousel h1 em {
  font-style: italic;
  color: var(--gold);
}
body.rtl .hero-carousel h1 em {
  font-style: normal;
  color: var(--gold);
}

/* ── Paragraphe ── */
.hero-carousel .carousel-item p {
  color: rgba(255, 255, 255, 0.88) !important;
  opacity: 1 !important;
  font-size: 16px;
  line-height: 1.8;
  max-width: 500px;
}
body.rtl .hero-carousel .carousel-item p {
  font-size: 15.5px;
  line-height: 1.9;
}

/* ── Puces ── */
.hero-carousel .slide-pills {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.25rem;
}
.hero-carousel .slide-pills span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
body.rtl .hero-carousel .slide-pills span {
  font-size: 13.5px;
}

/* ── Responsive ── */
@media (max-width: 991.98px) {
  .hero-carousel h1 {
    font-size: 38px;
  }
  body.rtl .hero-carousel h1 {
    font-size: 34px;
  }
  .hero-carousel .carousel-item p {
    font-size: 15px;
  }
}
@media (max-width: 767.98px) {
  .hero-carousel h1 {
    font-size: 30px;
  }
  body.rtl .hero-carousel h1 {
    font-size: 28px;
  }
  .hero-carousel .carousel-item p {
    font-size: 14.5px;
  }
}

/* indicators — gold dots */
.hero-carousel .carousel-indicators {
  bottom: 22px;
  margin: 0;
}
.hero-carousel .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  margin: 0 4px;
  transition: 0.2s;
}
.hero-carousel .carousel-indicators .active {
  background: var(--gold);
  transform: scale(1.25);
}

/* arrows */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  top: 50%;
  transform: translateY(-50%);
  opacity: 1;
  transition: background 0.2s;
  bottom: auto;
}
.hero-carousel .carousel-control-prev {
  left: 14px;
}
.hero-carousel .carousel-control-next {
  right: 14px;
}
.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
  background: rgba(255, 255, 255, 0.18);
}
.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
  width: 16px;
  height: 16px;
}

.carousel-arrow {
  color: #fff;
  font-size: 36px;
  line-height: 1;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* slide badge */
.slide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 20px;
}
body.rtl .slide-kicker {
  letter-spacing: 0;
}
.slide-kicker .ln {
  width: 26px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

/* UI preview card */
.ui-preview {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 28px 56px -16px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  width: 120%;
  /* margin-left: -10%; */
}
.ui-preview img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.ui-preview-head {
  background: #fff;
  border-bottom: 1px solid #e9ecef;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ui-preview-head .ptitle {
  font-size: 14.5px;
  font-weight: 700;
  color: #1e293b;
  direction: inherit;
}
.ui-preview-head .pbadge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(255, 195, 0, 0.15);
  color: var(--gold-deep);
}

/* shared table */
.ptable-row {
  display: grid;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid #f8fafc;
  direction: inherit;
  font-size: 12.5px;
}
.ptable-row:last-child {
  border-bottom: none;
}
.ptable-head {
  padding: 7px 14px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  direction: inherit;
}

/* badges */
.pb {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 20px;
}
.pb-blue {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}
.pb-green {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.pb-orange {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}
.pb .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.pb-blue .dot {
  background: #3b82f6;
}
.pb-green .dot {
  background: #10b981;
}
.pb-orange .dot {
  background: #f59e0b;
}

/* notif */
.pnotif {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f8fafc;
  direction: inherit;
}
.pnotif:last-child {
  border-bottom: none;
}
.pnotif-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
  margin-top: 2px;
}
.pnotif-ico.warn {
  background: #fffbeb;
}
.pnotif-ico.info {
  background: #eff6ff;
}
.pnotif-clock {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* stat cards */
.pstat {
  border-radius: 9px;
  padding: 12px 14px;
  color: #fff;
}
.pstat-lbl {
  font-size: 11.5px;
  opacity: 0.85;
  direction: inherit;
  margin-bottom: 3px;
}
.pstat-val {
  font-size: 20px;
  font-weight: 700;
  direction: inherit;
}

/* ── FAQ accordion ───────────────────────────────────── */
.faq-acc details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  margin-bottom: 12px;
  padding: 6px 26px;
  transition: all 0.25s ease;
}
.faq-acc details:hover {
  border-color: rgba(0, 40, 85, 0.3);
  background: #fafafa;
}
.faq-acc details[open] {
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}
.faq-acc summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.4;
}
.faq-acc summary::-webkit-details-marker {
  display: none;
}
.faq-acc .faq-icon {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.faq-acc details[open] .faq-icon {
  transform: rotate(45deg);
}
.faq-acc .faq-body {
  font-size: 14px;
  color: var(--stone);
  line-height: 1.65;
  padding-bottom: 20px;
  margin-top: -2px;
}

/* ── Preuve sociale ──────────────────────────────────── */
.social-proof-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px;
  height: 100%;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}
.social-proof-card:hover {
  box-shadow: 0 8px 28px rgba(30, 58, 138, 0.1);
  transform: translateY(-3px);
}
.sp-icon {
  width: 54px;
  height: 54px;
  background: var(--navy);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-stat {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}
.sp-desc {
  font-size: 13.5px;
  color: var(--stone);
  line-height: 1.65;
}

/* ── Migration — Continuité & Liberté ─────────────────── */
.migration-guarantee {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  height: 100%;
}
.mg-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 195, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mg-label {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.mg-text {
  font-size: 13px;
  color: var(--stone);
  line-height: 1.6;
}

.migration-steps-visual {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 18px;
  padding: 30px;
}
.msv-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.msv-num {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-family: "Fraunces", serif;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.msv-num-gold {
  background: var(--gold);
  color: var(--ink);
}
.msv-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 4px;
}
.msv-desc {
  font-size: 13px;
  color: var(--stone);
  line-height: 1.6;
}
.msv-connector {
  width: 2px;
  height: 24px;
  background: var(--paper-line);
  margin: 6px 0 6px 18px;
}
body.rtl .msv-connector {
  margin: 6px 18px 6px 0;
}

footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 13px;
}
footer a:hover {
  color: var(--gold);
}
/* ── State Machine Section ───────────────────────────────── */
.sm-badge-row {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
}
body.rtl .sm-badge-row {
  justify-content: flex-start;
}

.sm-stat-badge {
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  padding: 18px 24px;
  text-align: center;
  flex: 1;
  max-width: 160px;
}
.sm-stat-num {
  font-family: "Fraunces", serif;
  font-size: 44px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
  margin-bottom: 6px;
}
.sm-stat-lbl {
  font-size: 12px;
  color: var(--stone);
  line-height: 1.4;
}

/* Errors grid */
.sm-errors-grid {
}
.sm-errors-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 14px;
  direction: inherit;
  text-align: right;
}
body:not(.rtl) .sm-errors-title {
  text-align: left;
  direction: ltr;
}

.sm-error-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  height: 100%;
  border-top: 3px solid #ef4444;
  transition: box-shadow 0.15s;
}
.sm-error-card:hover {
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.1);
}
.sm-error-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fef2f2;
  color: #ef4444;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sm-error-body {
  flex: 1;
  direction: inherit;
}
body:not(.rtl) .sm-error-body {
  direction: ltr;
}
.sm-error-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
}
.sm-error-example {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.sm-err-before,
.sm-err-after {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 6px 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}
.sm-err-blocked {
  background: #fef2f2;
  border-color: #fca5a5;
}
.sm-err-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sm-err-date {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
.sm-err-status {
  font-size: 12px;
  font-weight: 700;
  color: var(--navy);
}
.sm-err-status-red {
  color: #dc2626;
}
.sm-err-arrow {
  color: var(--gold-deep);
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}
.sm-error-verdict {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 20px;
  padding: 3px 10px;
}
.sm-error-verdict::before {
  content: "✕";
  font-size: 10px;
}

/* Chain diagram */
.sm-chain-wrap {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px;
  text-align: center;
}
.sm-chain-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 28px;
}
.sm-chain {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  row-gap: 16px;
}
.sm-chain-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 16px;
  background: var(--paper);
  border: 1.5px solid var(--paper-line);
  border-radius: 12px;
  min-width: 90px;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}
.sm-chain-node:hover {
  border-color: var(--navy);
  box-shadow: 0 2px 10px rgba(30, 58, 138, 0.1);
}
.sm-chain-node.sm-chain-start {
  border-color: var(--gold);
  background: #fffdf0;
}
.sm-chain-node.sm-chain-end {
  border-color: var(--navy);
  background: var(--navy);
}
.sm-chain-node.sm-chain-end .sm-chain-icon {
  color: var(--gold);
}
.sm-chain-node.sm-chain-end .sm-chain-name {
  color: #fff;
}

.sm-chain-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--navy);
}
.sm-chain-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.sm-chain-arrow {
  padding: 0 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.sm-chain-note {
  font-size: 12.5px;
  color: var(--stone);
  margin-top: 22px;
}

@media (max-width: 767.98px) {
  .sm-badge-row {
    justify-content: center;
  }
  .sm-chain {
    gap: 4px;
  }
  .sm-chain-node {
    min-width: 70px;
    padding: 10px 10px;
  }
  .sm-chain-name {
    font-size: 10px;
  }
  .sm-chain-arrow svg {
    width: 14px;
  }
  .sm-stat-badge {
    max-width: 140px;
  }
  .sm-chain-wrap {
    padding: 20px 14px;
  }
}

/* ── State Machine v2 — Intelligence décisionnelle ───────── */

/* Live demo mock */
.sm-live-demo {
  background: var(--paper);
  border: 1px solid var(--paper-line);
  border-radius: 16px;
  padding: 22px;
}
.sm-live-demo-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 14px;
  direction: inherit;
  text-align: right;
}
body:not(.rtl) .sm-live-demo-label {
  text-align: left;
  direction: ltr;
}

.sm-live-element {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  direction: inherit;
}
body:not(.rtl) .sm-live-element {
  direction: ltr;
}
.sm-live-element-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sm-live-element-ref {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 2px;
}
.sm-live-element-state {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}
.sm-state-active {
  background: rgba(30, 58, 138, 0.1);
  color: var(--navy);
  border: 1.5px solid rgba(30, 58, 138, 0.25);
}

.sm-live-actions-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--stone);
  margin-bottom: 8px;
  direction: inherit;
  text-align: right;
}
body:not(.rtl) .sm-live-actions-label {
  text-align: left;
  direction: ltr;
}
.sm-live-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.sm-live-action {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  direction: inherit;
}
body:not(.rtl) .sm-live-action {
  direction: ltr;
}
.sm-action-allowed {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}
.sm-action-allowed svg {
  stroke: #059669;
}
.sm-action-blocked {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.sm-action-blocked svg {
  stroke: #dc2626;
}
.sm-action-reason {
  font-size: 10.5px;
  font-weight: 700;
  color: #ef4444;
  background: #fee2e2;
  border-radius: 4px;
  padding: 1px 6px;
  margin-right: auto;
}
body:not(.rtl) .sm-action-reason {
  margin-right: 0;
  margin-left: auto;
}

/* Rules grid */
.sm-rules-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  direction: inherit;
  text-align: right;
}
body:not(.rtl) .sm-rules-label {
  text-align: left;
  direction: ltr;
}

.sm-rule-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition:
    box-shadow 0.15s,
    border-color 0.15s;
}
.sm-rule-card:hover {
  border-color: rgba(30, 58, 138, 0.25);
  box-shadow: 0 4px 18px rgba(30, 58, 138, 0.07);
}

.sm-rule-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  direction: inherit;
}
body:not(.rtl) .sm-rule-header {
  direction: ltr;
}
.sm-rule-module {
  font-size: 11px;
  font-weight: 700;
  color: var(--stone);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.sm-rule-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.sm-rule-state {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.sm-rs-require {
  background: rgba(30, 58, 138, 0.08);
  color: var(--navy);
  border: 1px solid rgba(30, 58, 138, 0.2);
}
.sm-rs-block {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.sm-rule-requires {
  font-size: 11px;
  font-weight: 700;
  color: #047857;
}
.sm-rr-block {
  color: #dc2626;
}

.sm-rule-desc {
  font-size: 13.5px;
  color: var(--stone);
  line-height: 1.6;
  margin: 0;
  flex: 1;
  direction: inherit;
  text-align: right;
}
body:not(.rtl) .sm-rule-desc {
  direction: ltr;
  text-align: left;
}

.sm-rule-consequence {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  direction: inherit;
}
body:not(.rtl) .sm-rule-consequence {
  direction: ltr;
}
.sm-rc-unlock {
  background: #ecfdf5;
  color: #047857;
}
.sm-rc-unlock svg {
  stroke: #059669;
  flex-shrink: 0;
}
.sm-rc-block {
  background: #fef2f2;
  color: #dc2626;
}
.sm-rc-block svg {
  stroke: #dc2626;
  flex-shrink: 0;
}

/* Bottom strip */
.sm-bottom-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--navy-deep);
  border-radius: 16px;
  padding: 24px 28px;
  flex-wrap: wrap;
  direction: inherit;
}
body:not(.rtl) .sm-bottom-strip {
  direction: ltr;
}
.sm-bottom-strip-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}
.sm-bottom-strip-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
}

/* ── Preuve sociale ──────────────────────────────────── */
.social-proof-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 32px 24px;
  height: 100%;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.social-proof-card:hover {
  background-color: var(--paper);
  border-color: var(--paper-line);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.07);
  transform: translateY(-3px);
}

.sp-icon {
  width: 54px;
  height: 54px;
  background: var(--navy);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sp-icon svg {
  display: block;
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.7;
  flex-shrink: 0;
}

.sp-stat {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 8px;
}

.sp-desc {
  font-size: 13.5px;
  color: var(--stone);
  line-height: 1.65;
}

@media (max-width: 767.98px) {
  .sm-live-element {
    flex-wrap: wrap;
  }
  .sm-bottom-strip {
    flex-direction: column;
    text-align: center;
    direction: ltr;
  }
  .sm-rule-desc {
    text-align: right;
  }
  body:not(.rtl) .sm-rule-desc {
    text-align: left;
  }
}

@media (max-width: 991.98px) {
  .ui-preview {
    width: 100%;
    margin-left: 0;
  }

  .hero-carousel .carousel-control-prev {
    left: 8px;
  }

  .hero-carousel .carousel-control-next {
    right: 8px;
  }
}

@media (max-width: 767.98px) {
  .hero-carousel .carousel-control-prev,
  .hero-carousel .carousel-control-next {
    width: 42px;
    height: 42px;
  }

  .hero-carousel .carousel-control-prev-icon,
  .hero-carousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
  }
}

/* ── Mizan : section Fonctionnalités ───────────────────── */
#fonctionnalites {
  background: #fff;
}

#fonctionnalites .features-lead {
  max-width: 760px;
  margin-inline: 0;
  margin-bottom: 0;
}

/* Le texte suit la langue active : français à gauche, arabe à droite. */
body:not(.rtl) #fonctionnalites .container > .text-center {
  text-align: left !important;
}
body.rtl #fonctionnalites .container > .text-center {
  text-align: right !important;
}

#fonctionnalites .kicker {
  color: var(--gold-deep);
}

#fonctionnalites .sec-title {
  color: var(--navy);
  margin-bottom: 1rem !important;
}

#fonctionnalites .features-lead {
  color: var(--stone);
  font-size: 16px;
  line-height: 1.75;
}

#fonctionnalites .feat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

#fonctionnalites .feat-card:hover {
  background: var(--paper);
  border-color: var(--paper-line);
  box-shadow: 0 8px 24px rgba(30, 58, 138, 0.07);
  transform: translateY(-3px);
}

#fonctionnalites .feat-card--main {
  min-height: 100%;
}

#fonctionnalites .feat-card--secondary {
  min-height: 100%;
  padding: 1.5rem !important;
}

#fonctionnalites .feat-card h3 {
  width: 100%;
  margin: 0 0 0.75rem;
  color: var(--navy);
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
}

#fonctionnalites .feat-card p {
  width: 100%;
  margin: 0;
  color: var(--stone);
  font-size: 14px;
  line-height: 1.75;
  text-align: start;
}

#fonctionnalites .feat-ico {
  width: 46px;
  height: 46px;
  min-width: 46px;
  border-radius: 11px;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
}

#fonctionnalites .feat-ico--sm {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 10px;
}

#fonctionnalites .feat-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.7;
}

body.rtl #fonctionnalites .feat-card h3 {
  font-family: "El Messiri", Tahoma, sans-serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.5;
}

body.rtl #fonctionnalites .feat-card p {
  font-family: "Cairo", Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.9;
}

@media (max-width: 767.98px) {
  #fonctionnalites .container > .text-center {
    margin-bottom: 2rem !important;
  }
  #fonctionnalites .sec-title {
    font-size: 30px;
    line-height: 1.35;
  }
  #fonctionnalites .features-lead {
    font-size: 14px;
  }
  #fonctionnalites .feat-card--main {
    padding: 1.5rem !important;
  }
  #fonctionnalites .feat-card h3 {
    font-size: 19px;
  }
}
