/* LIA — site vitrine liapharma.fr
   Sobre et professionnel : la cible est un pharmacien titulaire, pas un
   early-adopter. Aucune dépendance externe (police système, pas de CDN) :
   la page reste rapide, et rien ne fuit vers un tiers. */

:root {
  /* Identité « Eucalyptus » — MÊMES valeurs que www/lib/theme/lia_colors.dart,
     qui fait foi. Teinte 166° : franchement vert sans virer au cyan.
     Les neutres sont SANS chroma : c'est ce qui évite le fond brunâtre que
     produisait la dérivation Material 3 depuis une graine unique. */
  --g-050: #e6f2ef;
  --g-100: #c8e2db;
  --g-300: #7ab7ab;
  --g-500: #199e83;
  --g-600: #0e7c66;   /* accent de marque */
  --g-700: #0a5f4e;
  --g-800: #094a3e;
  --g-900: #093b32;   /* bandeaux sombres */

  /* Alias conservés pour ne pas réécrire toutes les règles */
  --teal-900: var(--g-900);
  --teal-800: var(--g-800);
  --teal-700: var(--g-600);
  --teal-500: var(--g-500);
  --teal-300: var(--g-300);
  --teal-050: var(--g-050);

  --ink: #191c1b;
  --ink-soft: #5d6462;
  --line: #d2ddd9;
  --bg: #ffffff;
  --bg-alt: #f6faf8;
  --radius: 14px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

a { color: var(--teal-700); }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.12rem; }
p  { margin: 0 0 1em; }
.lead { font-size: 1.16rem; color: var(--ink-soft); }

/* --- En-tête ------------------------------------------------------------ */
header.site {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.2rem; color: var(--teal-900); text-decoration: none; }
.brand .spark { color: var(--teal-500); font-size: .72em; vertical-align: super; margin-left: 1px; }
.brand .dot { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--teal-500), var(--teal-800)); display: grid; place-items: center; color: #fff; font-size: .85rem; font-weight: 700; }
nav.main { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.nav-toggle { display: none; }
.burger { display: none; margin-left: auto; cursor: pointer; padding: 10px; }
.burger span { display: block; width: 22px; height: 2px; background: var(--teal-900); margin: 5px 0; border-radius: 2px; }
nav.main a { color: var(--ink-soft); text-decoration: none; font-size: .95rem; }
nav.main a:hover { color: var(--teal-700); }

/* --- Boutons ------------------------------------------------------------ */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; text-decoration: none; font-size: 1rem; border: 1px solid transparent;
}
.btn-primary { background: var(--teal-700); color: #fff; }
.btn-primary:hover { background: var(--teal-800); }
.btn-ghost { border-color: var(--line); color: var(--teal-900); background: #fff; }
.btn-ghost:hover { border-color: var(--teal-300); }
.btn-sm { padding: 9px 16px; font-size: .93rem; }

/* --- Sections ----------------------------------------------------------- */
section { padding: 76px 0; }
section.alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 44px; }

.hero { padding: 84px 0 70px; background: linear-gradient(170deg, var(--teal-050), #fff 62%); }
.hero .lead { max-width: 620px; }
.hero-cols { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }

/* --- Aperçu de l'application (hero) ------------------------------------- */
.app-demo {
  margin: 0; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 18px 44px rgba(14,124,102,.14);
  overflow: hidden; font-size: .88rem;
}
.app-demo-bar {
  display: flex; align-items: center; gap: 8px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); font-weight: 700; color: var(--teal-900);
}
.app-demo-bar .dot {
  width: 22px; height: 22px; border-radius: 7px; font-size: .7rem;
  background: linear-gradient(135deg, var(--teal-500), var(--teal-800));
  display: grid; place-items: center; color: #fff; font-weight: 700;
}
.app-demo-bar em { font-style: normal; font-weight: 400; color: var(--ink-soft); font-size: .82rem; }
.app-demo-q {
  margin: 14px 16px 0 auto; width: fit-content; max-width: 80%;
  background: var(--teal-700); color: #fff; padding: 9px 14px;
  border-radius: 14px 14px 4px 14px;
}
.app-demo-a { padding: 12px 16px 4px; }
.app-demo-intro { color: var(--ink-soft); margin-bottom: 10px; }
.app-demo-item { padding: 9px 0; border-top: 1px solid var(--line); }
.app-demo-item strong { display: block; color: var(--teal-900); }
.app-demo-item span { color: var(--teal-700); font-weight: 600; font-size: .82rem; }
.app-demo-item p { margin: 2px 0 0; color: var(--ink-soft); font-size: .84rem; }
.app-demo-foot {
  padding: 9px 16px; background: var(--teal-050); color: var(--teal-900);
  font-size: .8rem; border-top: 1px solid var(--line);
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .92rem; color: var(--ink-soft); }

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

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px;
}
.card .num {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px;
  background: var(--teal-050); color: var(--teal-700); font-weight: 700; margin-bottom: 14px;
}
.card p:last-child { margin-bottom: 0; }

/* --- Tarifs -------------------------------------------------------------- */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.price {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: #fff;
  display: flex; flex-direction: column; height: 100%;
}
.price.featured { border-color: var(--teal-500); box-shadow: 0 10px 30px rgba(14,124,102,.12); }
.price .tag { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--teal-700); font-weight: 700; }
.price .amount { font-size: 2.5rem; font-weight: 700; color: var(--teal-900); line-height: 1.1; margin: 10px 0 2px; }
.price .amount span { font-size: 1rem; font-weight: 500; color: var(--ink-soft); }
.price ul { list-style: none; padding: 0; margin: 18px 0 22px; }
.price li { padding-left: 26px; position: relative; margin-bottom: 9px; font-size: .97rem; }
.price li::before { content: "✓"; position: absolute; left: 0; color: var(--teal-500); font-weight: 700; }
.price .btn { margin-top: auto; text-align: center; }
.price-note { margin-top: 26px; font-size: .92rem; color: var(--ink-soft); }

/* --- Divers -------------------------------------------------------------- */
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.03rem; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--teal-500); font-weight: 700; margin-right: 12px; }
.faq details[open] summary::before { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--ink-soft); }

.callout {
  background: var(--teal-900); color: #d8ece6; border-radius: var(--radius);
  padding: 40px; text-align: center;
}
.callout h2 { color: #fff; }
.callout .btn-primary { background: #fff; color: var(--teal-900); }
.callout .btn-primary:hover { background: var(--teal-050); }

footer.site { background: var(--teal-900); color: #9fbdb6; padding: 46px 0 34px; font-size: .93rem; }
footer.site a { color: #d8ece6; text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
footer.site .legal { margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); font-size: .87rem; }

/* Pages de contenu (mentions, CGV, confidentialité) */
.doc { padding: 56px 0 76px; max-width: 780px; }
.doc h2 { margin-top: 2em; }
.doc table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: .95rem; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-alt); }
.todo {
  background: #fff8e6; border: 1px solid #e8d9a8; border-left: 4px solid #c9a227;
  padding: 14px 18px; border-radius: 8px; margin: 1em 0; font-size: .95rem;
}

@media (max-width: 860px) {
  .grid-3, .grid-2, .price-grid { grid-template-columns: 1fr; }
  section { padding: 54px 0; }
  .hero-cols { grid-template-columns: 1fr; gap: 36px; }
  /* Menu replié derrière un burger (case à cocher, sans JS obligatoire). */
  .burger { display: block; }
  nav.main {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
  }
  nav.main a { padding: 12px 0; font-size: 1.05rem; }
  nav.main a.btn { margin-top: 8px; text-align: center; }
  .nav-toggle:checked ~ nav.main { display: flex; }
}

/* --- Mode sombre --------------------------------------------------------
   L'application suit le theme du systeme ; sans ce bloc le site restait
   blanc en permanence, d'ou la rupture de fond en passant de l'un a l'autre.
   Les neutres sont ceux de lia_colors.dart (nSurfaceDark, nContainerDark,
   nOutlineDark, nInkDark) : les deux surfaces coincident desormais. */
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eceeed;
    --ink-soft: #9aa3a1;
    --line: #2b2f2e;
    --bg: #121413;
    --bg-alt: #1b1e1d;
    /* L'accent s'eclaircit sur fond sombre, comme dans l'application. */
    --teal-700: var(--g-500);
    --teal-050: #10251f;
  }
  header.site { background: rgba(18,20,19,.92); }
  .card, .price, .btn-ghost { background: var(--bg-alt); }
  .btn-ghost { color: var(--ink); }
  .hero { background: linear-gradient(170deg, #10251f, var(--bg) 62%); }
  .price.featured { box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  .doc th { background: var(--bg-alt); }
  .app-demo { background: var(--bg-alt); box-shadow: 0 18px 44px rgba(0,0,0,.4); }
  .app-demo-bar, .app-demo-item strong { color: var(--ink); }
  .app-demo-foot { background: #10251f; color: var(--ink); }
  /* Les encarts « a completer » restent lisibles sans eblouir. */
  .todo { background: #2a2415; border-color: #4a3f22; color: #e8dcb8; }
}
