/* ══════════════════════════════════════════════════════════════
   Medoria — feuille de style du site (accueil, sécurité, presse)
   Identité de l'app : crème, vert Medoria, Fraunces + Inter.
   ══════════════════════════════════════════════════════════════ */

:root {
  --cream:      #F7F2E8;
  --sand:       #EFE7D5;
  --paper:      #FDFAF4;
  --white:      #FFFFFF;
  --green:      #2D6A4F;
  --green-deep: #1E4634;
  --green-ink:  #163A2B;
  --mint:       #52886E;
  --mint-soft:  #E3EDE5;
  --gold:       #B9883A;
  --gold-soft:  #F4E9D3;
  --amber:      #C98A1B;
  --ink:        #1C2B1E;
  --muted:      #5C6E63;
  --line:       rgba(30, 70, 52, .12);
  --line-strong:rgba(30, 70, 52, .22);

  --r-sm: 12px;
  --r-md: 20px;
  --r-lg: 28px;
  --r-xl: 40px;
  --r-pill: 999px;

  --sh-sm: 0 1px 2px rgba(22, 58, 43, .05), 0 2px 8px rgba(22, 58, 43, .05);
  --sh-md: 0 2px 6px rgba(22, 58, 43, .05), 0 12px 32px rgba(22, 58, 43, .08);
  --sh-lg: 0 4px 12px rgba(22, 58, 43, .06), 0 30px 70px rgba(22, 58, 43, .14);

  --max: 1180px;
  --gutter: 24px;
  --ease: cubic-bezier(.22, .61, .36, 1);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Typographie ─────────────────────────────────────────────── */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; line-height: 1.05; color: var(--green-ink); }
h1 { font-size: clamp(44px, 6.6vw, 88px); font-optical-sizing: auto; }
h2 { font-size: clamp(34px, 4.6vw, 60px); }
h3 { font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; }
h1, h2, h3 { text-wrap: balance; }
h1 em, h2 em { font-style: italic; font-weight: 500; color: var(--green); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; color: var(--muted); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); }
.fine { font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ── Boutons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--green); color: var(--white); box-shadow: 0 6px 18px rgba(45, 106, 79, .28); }
.btn-primary:hover { background: var(--green-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--green-ink); border: 1.5px solid var(--line-strong); }
.btn-ghost:hover { background: var(--white); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }

.store {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 18px 0 14px; border-radius: 14px;
  background: var(--ink); color: var(--white);
  transition: transform .2s var(--ease), background .2s;
}
.store:hover { background: #000; transform: translateY(-1px); }
.store svg { width: 24px; height: 24px; flex: none; }
.store span { display: flex; flex-direction: column; line-height: 1.1; }
.store small { font-size: 11px; opacity: .8; font-weight: 500; }
.store b { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store.light { background: var(--white); color: var(--ink); }
.store.light:hover { background: var(--paper); }

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 242, 232, .82);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 24px; font-weight: 600; color: var(--green-ink); letter-spacing: -.01em; }
.brand img { width: 40px; height: auto; }
.nav-links { display: flex; gap: 26px; margin-left: auto; list-style: none; }
.nav-links a { font-size: 15px; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--green-ink); }
.nav-cta { margin-left: 4px; }
.nav-toggle { display: none; width: 44px; height: 44px; border-radius: 12px; margin-left: auto; align-items: center; justify-content: center; }
.nav-toggle svg { width: 24px; height: 24px; }
.drawer {
  position: fixed; inset: 0; z-index: 60; background: var(--cream);
  display: flex; flex-direction: column; padding: 18px var(--gutter) 32px;
  transform: translateY(-100%); transition: transform .35s var(--ease); visibility: hidden;
}
.drawer.open { transform: none; visibility: visible; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; height: 54px; }
.drawer nav { display: flex; flex-direction: column; margin-top: 24px; }
.drawer nav a { font-family: var(--font-display); font-size: 30px; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--green-ink); }
.drawer .btn { margin-top: auto; }
@media (max-width: 960px) {
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }
}

/* ── Sections ───────────────────────────────────────────────── */
section { position: relative; }
main { overflow-x: clip; }
.section { padding: 120px 0; }
.section-tight { padding: 80px 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head .eyebrow { margin-bottom: 18px; }
.section-head h2 + .lead { margin-top: 20px; }
.bg-sand { background: var(--sand); }
.bg-paper { background: var(--paper); }
.bg-deep { background: var(--green-deep); color: var(--white); }
.bg-deep h2, .bg-deep h3 { color: var(--white); }
.bg-deep .lead, .bg-deep .fine { color: rgba(255, 255, 255, .74); }
.bg-deep .eyebrow { color: #9FD0B4; }
.bg-deep .eyebrow::before { background: #9FD0B4; }
@media (max-width: 720px) {
  .section { padding: 84px 0; }
  .section-tight { padding: 60px 0; }
  .section-head { margin-bottom: 40px; }
  body { font-size: 16px; }
}

/* Apparition au défilement */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ── Téléphone ──────────────────────────────────────────────── */
.phone {
  position: relative; width: 100%; max-width: 320px; aspect-ratio: 390 / 844;
  border-radius: 52px; padding: 11px; background: #0E1A14;
  box-shadow: var(--sh-lg), inset 0 0 0 1.5px #2B3A32;
}
.phone::before { /* îlot */
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 31%; height: 26px; border-radius: 20px; background: #0E1A14; z-index: 5;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden;
  background: #EFE6D6;
}
.screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* Écrans reproduits en HTML, dans le style de l'app */
.app {
  position: absolute; inset: 0; padding: 58px 18px 20px; overflow: hidden;
  background: #EEE6D6; color: var(--ink); font-size: 13px; line-height: 1.35;
  display: flex; flex-direction: column; gap: 12px;
}
.app .serif { font-family: var(--font-display); }
.app-back { font-family: var(--font-display); font-size: 14px; color: #5D7168; display: flex; align-items: center; gap: 6px; }
.app-title { font-family: var(--font-display); font-weight: 650; font-size: 25px; color: var(--green-deep); letter-spacing: -.02em; line-height: 1.05; }
.app-eyebrow { font-size: 10px; letter-spacing: .14em; font-weight: 700; color: var(--green); text-transform: uppercase; }
.app-card { background: #F7F1E6; border: 1px solid rgba(30, 70, 52, .10); border-radius: 18px; padding: 12px 14px; }
.app-hero-card { background: linear-gradient(150deg, #24573F, #1E4634); color: #fff; border-radius: 20px; padding: 14px 16px; }
.app-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 5px 10px; border-radius: 999px; background: rgba(45, 106, 79, .10); color: var(--green); }
.app-btn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 999px; background: var(--green); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 15px; }

/* ── Avis / étoiles ─────────────────────────────────────────── */
.stars { display: inline-flex; gap: 2px; color: #E0A526; }
.stars svg { width: 16px; height: 16px; flex: none; }

/* ── Pied de page ───────────────────────────────────────────── */
.footer { background: var(--green-ink); color: rgba(255, 255, 255, .72); padding: 72px 0 40px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer .brand { color: var(--white); }
.footer .brand img { filter: brightness(0) invert(1); opacity: .95; }
.footer h4 { font-family: var(--font-body); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--white); margin-bottom: 16px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a:hover { color: var(--white); }
.footer-about { max-width: 300px; margin-top: 16px; line-height: 1.55; }
.footer-legal { margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; font-size: 13px; }
.footer-legal p { max-width: 720px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ── Pages de contenu (sécurité, presse) ────────────────────── */
.page-hero { padding: 96px 0 64px; }
.page-hero h1 { font-size: clamp(40px, 5.4vw, 72px); max-width: 900px; }
.page-hero .lead { max-width: 720px; margin-top: 22px; }
.meta { margin-top: 18px; font-size: 14px; color: var(--muted); }
.prose { max-width: 780px; }
.prose h2 { font-size: clamp(28px, 3vw, 38px); margin: 64px 0 18px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 21px; margin: 32px 0 10px; }
.prose p, .prose li { color: #34463B; }
.prose p + p { margin-top: 14px; }
.prose ul + p, .prose p + ul { margin-top: 14px; }
.prose ul { margin: 14px 0 0 0; padding-left: 0; list-style: none; display: grid; gap: 10px; }
.prose ul li { position: relative; padding-left: 26px; }
.prose ul li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--mint); }
.prose a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--green-ink); }
.table-wrap { overflow-x: auto; margin-top: 18px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; background: var(--cream); }
tr:last-child td { border-bottom: 0; }
.callout { margin-top: 22px; padding: 20px 22px; border-radius: var(--r-md); background: var(--mint-soft); color: var(--green-ink); font-size: 15px; }
.toc { position: sticky; top: 100px; display: grid; gap: 8px; font-size: 14px; }
.toc a { color: var(--muted); padding: 4px 0 4px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--green-ink); border-left-color: var(--green); }
.with-toc { display: grid; grid-template-columns: 220px 1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .with-toc { grid-template-columns: 1fr; } .toc { display: none; } }
