/* ============================================================
   SP Clinic Management System — feuille de style unique
   Remplace les 15 fichiers CSS du template d'origine.
   Palette héritée de la marque (bleu #3562a8) + tons cliniques.
   ============================================================ */

:root {
  --navy: #14273f;
  --ink: #33455a;
  --ink-soft: #5d7085;
  --blue: #3562a8;
  --blue-deep: #27497e;
  --blue-ghost: #e8eef8;
  --sky: #f2f6fb;
  --line: #dbe4ee;
  --white: #ffffff;
  --wa: #1fa855;
  --radius: 10px;
  --shadow-soft: 0 2px 10px rgba(20, 39, 63, .07);
  --shadow-lift: 0 14px 40px rgba(20, 39, 63, .14);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(34px, 4.6vw, 52px); font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.container { max-width: 1140px; margin-inline: auto; padding-inline: 24px; }
.section { padding: 84px 0; }
.section.tint { background: var(--sky); }
.section-head { max-width: 720px; margin-bottom: 44px; }
.section-head .kicker {
  display: inline-block; font-size: 12.5px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 10px;
}
.section-head p { color: var(--ink-soft); font-size: 17px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: 10px 18px; z-index: 200; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 30px; border-radius: 8px; border: 2px solid transparent;
  font-family: var(--font); font-size: 16px; font-weight: 600; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: background .18s, color .18s, transform .18s, box-shadow .18s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(53, 98, 168, .35); }
.btn-primary:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-ghost:hover { background: var(--blue-ghost); }
.btn-white { background: #fff; color: var(--blue-deep); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.btn-white:hover { transform: translateY(-1px); }
.btn-lg { padding: 16px 36px; font-size: 17px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex; align-items: center; gap: 28px; min-height: 74px;
}
.brand { margin-right: auto; display: flex; align-items: center; }
.brand img { width: 140px; }
.nav-links { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav-links a:not(.btn) {
  color: var(--navy); text-decoration: none; font-weight: 600; font-size: 15.5px;
  padding: 6px 2px; border-bottom: 2px solid transparent; transition: color .15s, border-color .15s;
}
.nav-links a:not(.btn):hover { color: var(--blue); border-bottom-color: var(--blue); }
.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--navy) !important; font-weight: 700 !important; white-space: nowrap;
}
.header-phone svg { color: var(--blue); }
.nav-links .btn { padding: 11px 22px; font-size: 15px; }

/* burger (checkbox, zéro dépendance JS) */
.nav-toggle-input { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; position: relative; background: #fff;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 11px; width: 22px; height: 2.5px;
  background: var(--navy); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { left: 0; top: -7px; }
.nav-toggle span::after { left: 0; top: 7px; }

/* ---------- hero ---------- */
.hero {
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(53, 98, 168, .14), transparent 60%),
    linear-gradient(180deg, var(--sky) 0%, #ffffff 100%);
  padding: 76px 0 84px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 strong { color: var(--blue); font-weight: inherit; }
.hero .lead { font-size: 19px; color: var(--ink-soft); max-width: 56ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 26px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.hero-trust li {
  display: inline-flex; align-items: center; gap: 7px;
  background: #fff; border: 1px solid var(--line); border-radius: 30px;
  font-size: 13.5px; font-weight: 600; color: var(--navy); padding: 7px 15px;
  box-shadow: var(--shadow-soft);
}
.hero-trust svg { color: var(--wa); flex: none; }

/* maquette navigateur */
.mock { border-radius: 12px; overflow: hidden; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-lift); }
.mock-bar { display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; background: #eef2f7; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; }
.mock-bar i:nth-child(1) { background: #f1968e; }
.mock-bar i:nth-child(2) { background: #f5cf8f; }
.mock-bar i:nth-child(3) { background: #9fd6a8; }
.mock img { width: 100%; }
.hero .mock { transform: rotate(.6deg); }

/* ---------- bandeau statistiques ---------- */
.statsbar { background: var(--navy); color: #fff; padding: 34px 0; }
.statsbar .row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat b { display: block; font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: 14px; color: #b9c6d8; }

/* ---------- section à propos ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: center; }
.about-grid .visual img { border-radius: var(--radius); box-shadow: var(--shadow-lift); }

/* ---------- cartes highlights ---------- */
.highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.hl-card {
  position: relative; border-radius: var(--radius); overflow: hidden; color: #fff;
  min-height: 380px; display: flex; align-items: flex-end;
  background-size: cover; background-position: center;
}
.hl-card::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16, 30, 50, .28) 0%, rgba(16, 30, 50, .88) 82%); }
.hl-card > div { position: relative; padding: 28px; display: flex; flex-direction: column; gap: 4px; }
.hl-card h3 { color: #fff; font-size: 21px; }
.hl-card p { color: #d4dde9; font-size: 15px; margin-bottom: 14px; }
.hl-card a { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 2px solid rgba(255,255,255,.55); align-self: flex-start; padding-bottom: 2px; }
.hl-card a:hover { border-bottom-color: #fff; }

/* ---------- modules (carrousel) ---------- */
.mod-carousel { position: relative; }
.mod-track {
  display: flex; gap: 18px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px;
  padding: 6px 4px 18px;
  scrollbar-width: none;
}
.mod-track::-webkit-scrollbar { display: none; }
.mod-slide {
  flex: 0 0 340px; scroll-snap-align: start;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.m-icon {
  width: 58px; height: 58px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-ghost); border-radius: 12px;
}
.m-icon img, .m-icon svg { width: 36px; height: 36px; object-fit: contain; }
.mod-slide h3 { margin: 4px 0 0; font-size: 17.5px; }
.mod-slide > p {
  margin: 0; font-size: 14.5px; color: var(--ink-soft); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.btn-more {
  align-self: flex-start; border: none; cursor: pointer;
  background: var(--blue-ghost); color: var(--blue);
  font: inherit; font-size: 14.5px; font-weight: 600;
  padding: 10px 20px; border-radius: 8px;
  transition: background .15s;
}
.btn-more:hover { background: #d7e2f3; }
.mod-slide .module-body { display: none; }

.car-btn {
  position: absolute; top: 42%; transform: translateY(-50%); z-index: 5;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--blue);
  cursor: pointer; box-shadow: 0 4px 14px rgba(20, 39, 63, .14);
  display: flex; align-items: center; justify-content: center;
}
.car-btn:hover:not(:disabled) { background: var(--blue-ghost); }
.car-btn:disabled { opacity: .3; cursor: default; }
.car-prev { left: -14px; }
.car-next { right: -14px; }
.mod-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mod-dots button {
  width: 9px; height: 9px; padding: 0; border: none; border-radius: 5px;
  background: #c5d2e2; cursor: pointer; transition: width .2s, background .2s;
}
.mod-dots button.active { width: 26px; background: var(--blue); }

/* boîte de détail des modules */
#module-dialog {
  border: none; border-radius: 14px; padding: 0;
  width: min(760px, calc(100vw - 40px)); max-height: 82vh;
  overflow: auto; overscroll-behavior: contain;
  box-shadow: 0 30px 80px rgba(10, 20, 35, .35);
}
#module-dialog::backdrop { background: rgba(20, 39, 63, .55); }
.dlg-head {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--line);
}
.dlg-head h3 { margin: 0; font-size: 19px; flex: 1; }
.dlg-close {
  width: 38px; height: 38px; flex: none; border: none; border-radius: 50%;
  background: var(--blue-ghost); color: var(--navy);
  font-size: 22px; line-height: 1; cursor: pointer;
}
.dlg-close:hover { background: #d7e2f3; }
.drag-handle { display: none; }
.dlg-body { padding: 4px 26px 30px; }
.dlg-body h4, .dlg-body h5, .dlg-body h6 { margin-top: 1.4em; margin-bottom: .4em; font-size: 16.5px; }
.dlg-body p { font-size: 15.5px; color: var(--ink-soft); max-width: 72ch; }
.dlg-body img { border-radius: 8px; border: 1px solid var(--line); margin: 10px 0; }

/* ---------- galerie (grille d'illustrations uniformes) ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
figure.shot {
  margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-soft);
  transition: box-shadow .18s, transform .18s;
  display: flex; flex-direction: column;
}
figure.shot:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.shot img { width: 100%; }
.shot figcaption {
  font-size: 14.5px; font-weight: 600; color: var(--navy);
  padding: 12px 16px; border-top: 1px solid var(--line); margin-top: auto;
}

/* ---------- parcours patient (diagramme) ---------- */
.journey-scroll {
  overflow-x: auto; overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
}
.journey-scroll img { min-width: 1050px; width: 100%; height: auto; display: block; }
.journey-scroll + .journey-scroll { margin-top: 26px; }

/* ---------- services High End Graphics ---------- */
.svc-star {
  display: flex; justify-content: space-between; align-items: center; gap: 28px; flex-wrap: wrap;
  background: linear-gradient(120deg, var(--navy), #1f3a5f);
  border-radius: var(--radius); padding: 34px 38px; margin-bottom: 24px;
}
.svc-star h3 { color: #fff; font-size: 22px; margin: 12px 0 6px; }
.svc-star p { color: #c3d0e0; margin: 0; max-width: 60ch; font-size: 15.5px; }
.svc-badge {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, .13); color: #ffd76a;
  font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 20px;
}
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.svc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 26px; display: flex; flex-direction: column; gap: 11px;
  transition: box-shadow .18s, transform .18s;
}
.svc-card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.svc-card .i {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--blue-ghost); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
}
.svc-card h3 { font-size: 17px; margin: 0; }
.svc-card p { font-size: 14.5px; color: var(--ink-soft); margin: 0; flex: 1; }
.svc-card a { font-weight: 600; text-decoration: none; font-size: 14.5px; }

/* ---------- bande CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue-deep), var(--blue)); color: #fff; padding: 64px 0; }
.cta-band .row { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; font-size: clamp(22px, 3vw, 30px); }

/* ---------- formulaire contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: start; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: 34px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%; padding: 13px 15px; font: inherit; font-size: 15.5px; color: var(--navy);
  border: 1.5px solid var(--line); border-radius: 8px; background: #fbfcfe;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(53, 98, 168, .15); }
textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13.5px; color: var(--ink-soft); margin-top: 12px; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 20px; }
.info-list li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.info-list .i {
  width: 44px; height: 44px; border-radius: 10px; background: var(--blue-ghost);
  display: flex; align-items: center; justify-content: center; color: var(--blue);
}
.info-list b { display: block; color: var(--navy); font-size: 14px; }
.info-list a { text-decoration: none; font-weight: 600; }
.info-list span { font-size: 15px; }

.page-hero { background: linear-gradient(180deg, var(--sky), #fff); padding: 64px 0 48px; }
.page-hero p { color: var(--ink-soft); max-width: 60ch; margin: 0; }

/* ---------- page à propos ---------- */
.prose p { max-width: 68ch; }
.facts-card { position: sticky; top: 100px; }
.facts { display: flex; flex-direction: column; gap: 20px; }
.fact b { display: block; font-size: 32px; font-weight: 700; color: var(--blue); line-height: 1.1; }
.fact span { font-size: 14.5px; color: var(--ink-soft); }
.expertise {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px;
}
.expertise li {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 18px; font-weight: 600; font-size: 15px; color: var(--navy);
  display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-soft);
}
.expertise li svg { color: var(--wa); flex: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: #b9c6d8; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 44px; padding: 64px 0 46px; }
.site-footer h4 { color: #fff; font-size: 15px; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.site-footer a { color: #cdd8e6; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer .logo-foot { width: 150px; background: #fff; padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; }
.legal { border-top: 1px solid rgba(255, 255, 255, .14); padding: 20px 0; font-size: 13.5px; color: #8ea1b8; display: flex; flex-wrap: wrap; gap: 8px 26px; justify-content: space-between; }
.legal a { color: #8ea1b8; }

/* ---------- bouton WhatsApp flottant ---------- */
.wa-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 26px rgba(31, 168, 85, .45);
  transition: transform .18s;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 32px; height: 32px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero .mock { transform: none; max-width: 640px; }
  .highlights { grid-template-columns: 1fr; }
  .hl-card { min-height: 300px; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .statsbar .row { grid-template-columns: 1fr 1fr; gap: 30px 16px; }
  .site-footer .cols { grid-template-columns: 1fr; gap: 36px; }
  .header-phone { display: none; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 74px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links li { border-top: 1px solid var(--line); }
  .nav-links a:not(.btn) { display: block; padding: 15px 24px; border-bottom: none; }
  .nav-links .btn { margin: 14px 24px 18px; }
  .nav-toggle-input:checked ~ .nav-links { max-height: 480px; }
  .nav-toggle-input:checked ~ .nav-toggle span { transform: rotate(45deg); }
  .nav-toggle-input:checked ~ .nav-toggle span::before { transform: rotate(-90deg) translateX(-7px); opacity: 1; top: -7px; left: 0; }
  .nav-toggle-input:checked ~ .nav-toggle span::after { opacity: 0; }
  .section { padding: 60px 0; }
  .svc-grid { grid-template-columns: 1fr; }
  .svc-star { padding: 26px; }
  /* carrousel mobile : cartes 78% + aperçu de la suivante, navigation au swipe */
  .mod-slide { flex-basis: 78vw; padding: 20px; }
  .m-icon { width: 48px; height: 48px; }
  .m-icon img, .m-icon svg { width: 30px; height: 30px; }
  .car-btn { display: none; }
  /* détail des modules en bottom-sheet */
  #module-dialog {
    margin: auto 0 0; width: 100vw; max-width: 100vw;
    max-height: 88vh; border-radius: 18px 18px 0 0;
  }
  #module-dialog[open] { animation: sheet-up .28s ease; }
  .drag-handle {
    display: block; position: absolute; top: 8px; left: 50%;
    width: 44px; height: 5px; border-radius: 3px;
    background: #d0dae6; transform: translateX(-50%);
  }
  .dlg-head { padding-top: 24px; }
  .dlg-body { padding: 4px 20px 34px; }
  .form-grid { grid-template-columns: 1fr; }
  .card { padding: 24px; }
  .cta-band .row { justify-content: center; text-align: center; }
}

@keyframes sheet-up {
  from { transform: translateY(48px); opacity: .5; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- accessibilité mouvement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* impression légère */
@media print {
  .site-header, .wa-float, .cta-band { display: none; }
}
