/*
 * Tbibe — vitrine.
 * Direction : SaaS médical moderne, fond clair, accents bleu → cyan,
 * typographie serrée, halos subtils, cartes en relief, responsive complet.
 * Aucune ressource externe (CSP 'self') : icônes SVG inline, polices système.
 */

:root {
  color-scheme: light;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --cyan: #06b6d4;
  --violet: #7c3aed;
  --text: #0f172a;
  --text-muted: #475569;
  --text-subtle: #64748b;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --background: #ffffff;
  --border: #e7ecf3;
  --border-soft: #eef2f7;
  --success: #059669;
  --radius-1: 10px;
  --radius-2: 16px;
  --radius-3: 22px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-2: 0 12px 32px rgba(15, 23, 42, .10);
  --shadow-glow: 0 30px 70px -24px rgba(37, 99, 235, .35);
  --control: 46px;
  --max: 1160px;
  --grad: linear-gradient(120deg, #2563eb 0%, #06b6d4 100%);
  --grad-text: linear-gradient(100deg, #2563eb 0%, #06b6d4 100%);
  --focus: 0 0 0 3px rgba(37, 99, 235, .30);
  --font: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system,
    'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { margin: 0; letter-spacing: -.03em; font-weight: 800; }
h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; }
h2 { font-size: clamp(26px, 3.2vw, 38px); line-height: 1.15; }
h3 { font-size: 17px; letter-spacing: -.01em; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:where(a, button, summary):focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }

.wrap { width: min(var(--max), calc(100% - 48px)); margin-inline: auto; }
.wrap-narrow { max-width: 760px; }

.grad {
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skip-link {
  position: absolute;
  z-index: 40;
  inset-inline-start: 12px;
  top: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transform: translateY(-180%);
}
.skip-link:focus { transform: none; }

/* ------------------------------------------------------------------ header */

.site-header {
  position: sticky;
  z-index: 30;
  top: 0;
  background: rgb(255 255 255 / .85);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  width: min(var(--max), calc(100% - 48px));
  min-height: 76px;
  margin-inline: auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-icon { width: 34px; height: 34px; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.brand-sm .brand-icon { width: 26px; height: 26px; }
.brand-sm .brand-name { font-size: 17px; }

.main-nav { display: flex; align-items: center; gap: 28px; margin-inline-start: auto; }
.main-nav a { color: var(--text-muted); font-size: 14px; font-weight: 600; transition: color .15s ease; }
.main-nav a:hover { color: var(--text); }

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--control);
  padding-inline: 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease,
    background .16s ease, border-color .16s ease, color .16s ease;
}
.btn svg { width: 18px; height: 18px; }
.btn-sm { min-height: 38px; padding-inline: 16px; font-size: 13px; }
.btn-lg { min-height: 54px; padding-inline: 28px; font-size: 16px; }

.btn-primary { color: #fff; background: var(--grad); box-shadow: 0 12px 26px -10px rgba(37, 99, 235, .55); }
.btn-primary:hover { filter: brightness(1.06) saturate(1.05); transform: translateY(-2px); box-shadow: 0 18px 34px -12px rgba(37, 99, 235, .6); }
.btn-ghost { color: var(--text); background: var(--surface); border-color: var(--border); }
.btn-ghost:hover { border-color: #cbd5e1; background: #fff; transform: translateY(-2px); }

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: 80px 0 96px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(50% 44% at 50% -6%, rgba(37, 99, 235, .13) 0%, transparent 70%),
    radial-gradient(40% 36% at 88% 4%, rgba(6, 182, 212, .12) 0%, transparent 70%),
    radial-gradient(34% 32% at 8% 8%, rgba(124, 58, 237, .08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 56px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  padding: 7px 15px;
  color: var(--primary-strong);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.badge-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--grad); }

.hero-copy h1 { margin-top: 22px; }
.lede { margin-top: 20px; max-width: 46ch; color: var(--text-muted); font-size: 18px; line-height: 1.65; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.checklist { display: grid; gap: 12px; margin-top: 34px; }
.checklist li {
  position: relative;
  padding-inline-start: 30px;
  color: var(--text-muted);
  font-size: 14px;
}
.checklist li::before {
  position: absolute;
  inset-inline-start: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  content: '✓';
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

/* Cadre navigateur autour de la capture. */
.hero-media { margin: 0; }
.browser-frame {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-glow);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-bottom: 1px solid var(--border);
}
.browser-bar span { width: 11px; height: 11px; border-radius: 999px; }
.browser-bar span:nth-child(1) { background: #f87171; }
.browser-bar span:nth-child(2) { background: #fbbf24; }
.browser-bar span:nth-child(3) { background: #34d399; }
.browser-bar i {
  margin-inline-start: 10px;
  flex: 1;
  max-width: 220px;
  padding: 5px 12px;
  color: var(--text-subtle);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
}
.browser-frame img { width: 100%; border-radius: 0 0 var(--radius-2) var(--radius-2); }
.hero-media figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--text-subtle);
  font-size: 12px;
}
.dot { width: 8px; height: 8px; border-radius: 999px; background: var(--success); }

/* ------------------------------------------------------------------- stats */

.stats { border-block: 1px solid var(--border); background: var(--surface-soft); }
.stats-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  padding-block: 40px;
}
.stat { text-align: center; }
.stat strong {
  display: block;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -.03em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat span { color: var(--text-muted); font-size: 14px; font-weight: 600; }

/* ---------------------------------------------------------------- sections */

.section { padding-block: 96px; }
.section-alt { background: var(--surface-soft); border-block: 1px solid var(--border); }

.eyebrow {
  margin-bottom: 14px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.section-head { max-width: 680px; margin-inline: auto; margin-bottom: 56px; text-align: center; }
.section-head p { margin-top: 16px; color: var(--text-muted); font-size: 17px; }

/* ------------------------------------------------------- fonctionnalités */

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 30px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-2); border-color: #c7d7f5; }
.feature-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  margin-bottom: 6px;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 14px;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature-card:nth-child(2n) .feature-icon { color: #0e7490; background: #ecfeff; }
.feature-card:nth-child(3n) .feature-icon { color: var(--violet); background: #f5f3ff; }
.feature-card p { color: var(--text-muted); font-size: 15px; }

/* ------------------------------------------------------- produit / écrans */

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 48px;
  align-items: start;
}
.screen-list { display: grid; }
.screen-list li {
  display: grid;
  gap: 3px;
  padding-block: 16px;
  border-bottom: 1px solid var(--border);
}
.screen-list li:first-child { border-top: 1px solid var(--border); }
.screen-list strong { font-size: 16px; font-weight: 700; }
.screen-list span { color: var(--text-muted); font-size: 14px; }

.shot-card {
  margin: 0;
  padding: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-2);
}
.shot-card img { width: 100%; border-radius: var(--radius-1); }
.shot-card figcaption {
  padding: 12px 6px 4px;
  color: var(--text-subtle);
  font-size: 12px;
  text-align: center;
}

/* ------------------------------------------------------- bilingue FR / AR */

.documents-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 820px; margin-inline: auto; }
.doc-card {
  margin: 0;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  transition: transform .2s ease, box-shadow .2s ease;
}
.doc-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.doc-card img { width: 100%; border: 1px solid var(--border-soft); border-radius: var(--radius-1); }
.doc-card figcaption { padding: 12px 6px 2px; color: var(--text-subtle); font-size: 13px; text-align: center; }

/* --------------------------------------------------------------- sécurité */

.assurance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.assurance-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
}
.check {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: var(--grad);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 800;
}
.assurance-card strong { display: block; font-size: 16px; font-weight: 700; }
.assurance-card p { margin-top: 4px; color: var(--text-muted); font-size: 14px; }
.disclaimer { margin-top: 28px; text-align: center; color: var(--text-subtle); font-size: 13px; }

/* -------------------------------------------------------------------- faq */

.faq-list { display: grid; gap: 14px; }
.faq-list details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-2);
  box-shadow: var(--shadow-1);
  transition: border-color .15s ease;
}
.faq-list details[open] { border-color: #c7d7f5; }
.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  list-style: none;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary span {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--primary);
  background: #eff6ff;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  transition: transform .2s ease, background .2s ease;
}
.faq-list details[open] summary span { transform: rotate(45deg); }
.faq-list details p { padding: 0 24px 22px; color: var(--text-muted); font-size: 15px; }

/* ---------------------------------------------------------------- closing */

.closing-card {
  position: relative;
  overflow: hidden;
  padding: 72px 40px;
  text-align: center;
  background: linear-gradient(140deg, #0b1a33 0%, #122a55 55%, #0e3a5c 100%);
  border-radius: var(--radius-3);
  box-shadow: var(--shadow-glow);
  color: #fff;
}
.closing-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 60% at 50% 0%, rgba(37, 99, 235, .35) 0%, transparent 70%),
    radial-gradient(34% 46% at 88% 100%, rgba(6, 182, 212, .25) 0%, transparent 70%);
  pointer-events: none;
}
.closing-card > * { position: relative; z-index: 1; }
.closing-card .eyebrow { color: #7dd3fc; }
.closing-card h2 { font-size: clamp(26px, 3vw, 36px); }
.closing-card p { max-width: 58ch; margin: 16px auto 0; color: #cbd5e1; font-size: 16px; }
.closing-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.demo-note { margin-top: 16px; color: #94a3b8; font-size: 13px; }

/* ------------------------------------------------- bouton rond WhatsApp */

.whatsapp-fab {
  position: fixed;
  z-index: 40;
  inset-inline-end: 22px;
  bottom: 22px;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  color: #fff;
  background: #25d366;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .4);
  transition: transform .16s ease, box-shadow .16s ease;
}
.whatsapp-fab:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(37, 211, 102, .5); }
.whatsapp-fab svg { width: 31px; height: 31px; }

/* ---------------------------------------------------------------- footer */

.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-block: 28px 96px;
}
.footer-copy { margin-inline-start: auto; color: var(--text-subtle); font-size: 12px; text-align: end; }
.footer-link { color: var(--primary-strong); text-decoration: underline; text-underline-offset: 2px; }

/* -------------------------------------------------------------- adaptations */

@media (max-width: 960px) {
  .hero { padding: 56px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .assurance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  html { scroll-padding-top: 120px; }
  .wrap, .header-inner { width: calc(100% - 32px); }
  .site-header .header-inner { flex-wrap: wrap; gap: 10px; padding-block: 12px; }
  .brand-name { font-size: 19px; }
  .main-nav { order: 3; flex: 1 0 100%; gap: 16px; margin-inline-start: 0; }
  .main-nav a { font-size: 13px; }
  .hero { padding: 40px 0 56px; }
  .lede { font-size: 16px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .stats-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .section { padding-block: 64px; }
  .feature-grid { grid-template-columns: 1fr; }
  .documents-grid { grid-template-columns: 1fr; }
  .closing-card { padding: 48px 22px; }
  .footer-inner { flex-wrap: wrap; padding-block: 20px 96px; }
  .footer-copy { margin-inline-start: 0; width: 100%; text-align: start; }
  .whatsapp-fab { inset-inline-end: 16px; bottom: 16px; width: 54px; height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
