/* ==========================================================================
   CardioRiskNet — Feuille de style principale
   Palette sobre : bleu santé, blanc, gris, vert doux
   ========================================================================== */

:root {
  /* Couleurs */
  --blue-900: #0b2545;
  --blue-800: #123a63;
  --blue-700: #17549a;
  --blue-600: #1d6fd0;
  --blue-500: #2f88e6;
  --blue-100: #e3f0fd;
  --blue-050: #f2f8ff;

  --green-600: #1f9d72;
  --green-500: #2bb98a;
  --green-100: #e2f7ef;

  --amber-700: #8a5a08;
  --amber-100: #fdf3dd;
  --amber-300: #f0d29a;

  --gray-900: #12181f;
  --gray-800: #253243;
  --gray-600: #55637a;
  --gray-500: #6f7c92;
  --gray-300: #d7dee9;
  --gray-200: #e7ecf3;
  --gray-100: #f4f7fb;
  --white: #ffffff;

  /* Système */
  --bg: #f7fafd;
  --text: var(--gray-800);
  --muted: var(--gray-600);
  --border: var(--gray-200);
  --primary: var(--blue-600);
  --accent: var(--green-500);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 37, 69, .05), 0 2px 8px rgba(11, 37, 69, .04);
  --shadow-md: 0 4px 12px rgba(11, 37, 69, .06), 0 12px 32px rgba(11, 37, 69, .07);
  --shadow-lg: 0 10px 24px rgba(11, 37, 69, .08), 0 24px 60px rgba(11, 37, 69, .10);

  --max: 1100px;
  --gutter: 24px;

  --font: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 420px at 12% -8%, rgba(47, 136, 230, .10), transparent 60%),
    radial-gradient(760px 380px at 92% 4%, rgba(43, 185, 138, .10), transparent 62%);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a {
  color: var(--blue-700);
  text-decoration: none;
}

a:hover { text-decoration: underline; }

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(47, 136, 230, .45);
  outline-offset: 3px;
  border-radius: 6px;
}

h1, h2, h3, h4 {
  color: var(--blue-900);
  line-height: 1.25;
  letter-spacing: -.015em;
  margin: 0 0 .6em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 1.35rem + 2.6vw, 3.1rem); }
h2 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1.05em; }

ul, ol { padding-left: 1.25em; margin: 0 0 1.05em; }
li { margin-bottom: .45em; }
li::marker { color: var(--blue-500); }

strong { color: var(--blue-900); }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }

.section-head { max-width: 720px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 10px;
}

.lead {
  font-size: 1.12rem;
  color: var(--gray-600);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header.is-scrolled { box-shadow: var(--shadow-sm); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.12rem;
  color: var(--blue-900);
  letter-spacing: -.02em;
}

.brand:hover { text-decoration: none; }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(140deg, var(--blue-600), var(--green-500));
  box-shadow: 0 6px 14px rgba(29, 111, 208, .28);
  flex: none;
}

.brand__mark svg { width: 21px; height: 21px; display: block; }
.brand__accent { color: var(--blue-600); }

.nav { display: flex; align-items: center; gap: 6px; }

.nav a {
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  color: var(--gray-600);
  font-size: .95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--blue-800);
  background: var(--blue-050);
  text-decoration: none;
}

.nav a.is-active { color: var(--blue-700); background: var(--blue-100); }

.nav .btn { margin-left: 8px; color: var(--white); }
.nav .btn:hover { color: var(--white); background: var(--blue-700); }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--blue-900);
  cursor: pointer;
}

.nav-toggle svg { width: 20px; height: 20px; }

/* ---------- Boutons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--primary);
  color: var(--white);
  font: inherit;
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(29, 111, 208, .22);
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.btn:hover {
  background: var(--blue-700);
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(29, 111, 208, .26);
}

.btn:active { transform: translateY(0); }

.btn--ghost {
  background: var(--white);
  color: var(--blue-800);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-sm);
}

.btn--ghost:hover { background: var(--blue-050); color: var(--blue-900); }

.btn--sm { padding: 9px 18px; font-size: .9rem; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Hero ---------- */

.hero { padding: 84px 0 64px; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  font-size: .82rem;
  font-weight: 600;
  color: var(--blue-800);
  margin-bottom: 22px;
}

.badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-500);
  box-shadow: 0 0 0 4px rgba(43, 185, 138, .18);
}

.hero h1 { margin-bottom: .35em; }

.hero .tagline {
  font-size: clamp(1.05rem, .98rem + .35vw, 1.28rem);
  color: var(--blue-700);
  font-weight: 600;
  margin-bottom: .8em;
}

.hero p.lead { max-width: 56ch; }

.hero-note {
  margin-top: 26px;
  font-size: .9rem;
  color: var(--gray-500);
}

/* Visuel du hero */
.hero-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 26px;
}

.hero-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.hero-card__title {
  font-weight: 700;
  color: var(--blue-900);
  font-size: 1rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: #14664c;
  font-size: .76rem;
  font-weight: 700;
}

.pulse-line {
  background: var(--blue-050);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 18px;
}

.pulse-line svg { display: block; width: 100%; height: 82px; }

.pulse-line path {
  stroke-dasharray: 620;
  stroke-dashoffset: 620;
  animation: trace 3.4s ease-in-out infinite;
}

@keyframes trace {
  0%   { stroke-dashoffset: 620; }
  55%  { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 0; opacity: .35; }
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric {
  background: var(--gray-100);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  text-align: center;
}

.metric__value {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--blue-900);
  line-height: 1.2;
}

.metric__label {
  font-size: .72rem;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

.hero-card__foot {
  margin: 16px 0 0;
  font-size: .78rem;
  color: var(--gray-500);
  text-align: center;
}

/* ---------- Cartes ---------- */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 28px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue-100);
}

.card h3 { margin-bottom: .45em; }
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); font-size: .97rem; }

.grid {
  display: grid;
  gap: 20px;
}

.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--blue-100);
  color: var(--blue-700);
  margin-bottom: 16px;
}

.card__icon svg { width: 23px; height: 23px; }
.card__icon--green { background: var(--green-100); color: var(--green-600); }

.card__step {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-600);
  color: var(--white);
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 16px;
}

/* ---------- Listes ---------- */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: var(--white);
  border: 1px solid var(--gray-300);
  box-shadow: var(--shadow-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--gray-800);
}

.tag-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green-500);
  flex: none;
}

.check-list,
.cross-list { list-style: none; padding: 0; }

.check-list li,
.cross-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: .6em;
}

.check-list li::before,
.cross-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .5em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
}

.check-list li::before {
  background-color: var(--green-100);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f9d72' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-size: 12px;
}

.cross-list li::before {
  background-color: #fdecec;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c0392b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'/%3E%3Cline x1='6' y1='6' x2='18' y2='18'/%3E%3C/svg%3E");
  background-size: 11px;
}

/* ---------- Encadrés ---------- */

.callout {
  border-radius: var(--radius);
  padding: 26px 28px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.callout h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: .5em;
}

.callout h3 svg { width: 22px; height: 22px; flex: none; }
.callout p:last-child { margin-bottom: 0; }

.callout--warning {
  background: var(--amber-100);
  border-color: var(--amber-300);
}

.callout--warning h3 { color: var(--amber-700); }
.callout--warning p { color: #6f4a0c; }

.callout--info {
  background: var(--blue-050);
  border-color: #cde2f9;
}

.callout--soft {
  background: var(--green-100);
  border-color: #bfe8d8;
}

.callout--soft h3 { color: #14664c; }

.callout__quote {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--blue-900);
}

/* ---------- Bandeau CTA ---------- */

.cta {
  border-radius: var(--radius);
  padding: 46px 40px;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-600) 62%, #2a9d8f);
  color: #eaf3fd;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.cta h2 { color: var(--white); }
.cta p { color: rgba(255, 255, 255, .88); max-width: 62ch; margin-inline: auto; }
.cta .btn-row { justify-content: center; }
.cta .btn { background: var(--white); color: var(--blue-800); }
.cta .btn:hover { background: var(--blue-050); color: var(--blue-900); }

.cta .btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .5);
  box-shadow: none;
}

.cta .btn--ghost:hover { background: rgba(255, 255, 255, .12); color: var(--white); }

/* ---------- Pages légales ---------- */

.page-hero { padding: 64px 0 28px; }

.page-hero .updated {
  font-size: .88rem;
  color: var(--gray-500);
  margin-bottom: 0;
}

.breadcrumb {
  font-size: .88rem;
  color: var(--gray-500);
  margin-bottom: 14px;
}

.breadcrumb a { color: var(--gray-600); }
.breadcrumb span { margin: 0 6px; color: var(--gray-300); }

.legal-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  align-items: start;
  padding-bottom: 80px;
}

.toc {
  position: sticky;
  top: 96px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}

.toc h2 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}

.toc li { margin-bottom: 2px; counter-increment: toc; }

.toc a {
  display: block;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: .9rem;
  color: var(--gray-600);
  line-height: 1.45;
}

.toc a::before {
  content: counter(toc) ". ";
  color: var(--blue-500);
  font-weight: 700;
}

.toc a:hover { background: var(--blue-050); color: var(--blue-800); text-decoration: none; }
.toc a.is-active { background: var(--blue-100); color: var(--blue-800); font-weight: 600; }

.legal-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 44px;
}

.legal-content > section { scroll-margin-top: 96px; }
.legal-content > section + section { margin-top: 40px; }

.legal-content h2 {
  font-size: 1.32rem;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: .8em;
}

.legal-content h3 {
  font-size: 1.03rem;
  color: var(--blue-800);
  margin-top: 1.5em;
}

.legal-content h2 .num {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: .85rem;
  font-weight: 800;
  margin-right: 10px;
  vertical-align: 2px;
}

.legal-content p, .legal-content li { color: var(--gray-800); }

.contact-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-radius: var(--radius-sm);
  background: var(--blue-050);
  border: 1px solid #cde2f9;
}

.contact-box .label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  color: var(--gray-500);
}

.contact-box a { font-weight: 600; word-break: break-all; }

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1.05em;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .94rem;
  min-width: 480px;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

thead th {
  background: var(--gray-100);
  color: var(--blue-900);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

tbody tr:last-child td { border-bottom: 0; }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--white);
  padding: 48px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
}

.footer-about p {
  color: var(--muted);
  font-size: .93rem;
  max-width: 42ch;
  margin: 14px 0 0;
}

.site-footer h4 {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--gray-500);
  margin-bottom: 12px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }

.footer-links a { color: var(--gray-600); font-size: .93rem; }
.footer-links a:hover { color: var(--blue-700); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: .86rem;
  color: var(--gray-500);
}

.footer-disclaimer {
  margin: 0 0 18px;
  font-size: .86rem;
  color: var(--gray-500);
  max-width: 78ch;
}

/* ---------- Animations d'apparition ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .legal-layout { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .toc ol { columns: 2; column-gap: 18px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }

  .nav-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
  }

  .nav.is-open { display: flex; }
  .nav a { padding: 11px 14px; border-radius: var(--radius-sm); }
  .nav .btn { margin: 6px 0 0; justify-content: center; border-radius: var(--radius-pill); }

  .header-inner { position: relative; }

  .section { padding: 56px 0; }
  .hero { padding: 56px 0 40px; }
  .grid--3, .grid--2 { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .legal-content { padding: 26px 22px; }
  .cta { padding: 36px 24px; }
  .toc ol { columns: 1; }
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

@media print {
  .site-header, .site-footer, .toc, .btn-row, .cta { display: none !important; }
  body { background: #fff; }
  .legal-content { border: 0; box-shadow: none; padding: 0; }
}
