/*
 * Vitrine de MedInventory (medinventory.fr). Page statique, sans build.
 *
 * Les couleurs et les polices sont celles de l'app (style « Editorial
 * Apothecary »), copiées depuis `src/tokens.css` du dépôt medinventory-app :
 * si la palette de l'app change, la reporter ici.
 */

:root {
  --bone: oklch(0.975 0.012 86);
  --bone-2: oklch(0.955 0.014 84);
  --bone-3: oklch(0.93 0.018 82);
  --paper: oklch(0.99 0.008 90);

  --ink: oklch(0.2 0.018 250);
  --ink-2: oklch(0.32 0.014 250);
  --ink-3: oklch(0.5 0.012 250);
  --ink-4: oklch(0.68 0.01 250);

  --rule: oklch(0.86 0.014 80);
  --rule-2: oklch(0.78 0.018 80);

  --green: oklch(0.45 0.085 155);
  --green-2: oklch(0.55 0.1 155);
  --green-soft: oklch(0.92 0.04 155);

  --amber: oklch(0.74 0.13 75);
  --amber-soft: oklch(0.93 0.06 80);
  --amber-ink: oklch(0.45 0.1 65);

  --brick: oklch(0.55 0.12 35);
  --brick-soft: oklch(0.93 0.05 40);

  --serif: "Instrument Serif", "Times New Roman", Georgia, serif;
  --sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--green);
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.022em;
}

p,
figure,
dl,
dd {
  margin: 0;
}

.accent {
  font-style: italic;
  color: var(--green);
}

.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 20px;
}

.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.section-title {
  font-size: clamp(38px, 4.6vw, 60px);
  line-height: 1;
  max-width: 14em;
}

.section-lead {
  margin: 14px 0 48px;
  max-width: 34em;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-3);
}

.band {
  background: var(--bone-2);
  border-block: 1px solid var(--rule);
}

.ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 16px 26px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--green {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.btn--green:hover {
  background: oklch(0.39 0.08 155);
  color: #fff;
}

.btn--ghost {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--bone);
}

.btn--small {
  padding: 10px 16px;
  font-size: 14px;
}

/* En-tête --------------------------------------------------------------- */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
}

.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: -0.02em;
}

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

.site-nav__link {
  display: none;
  color: var(--ink-2);
  font-size: 14px;
  text-decoration: none;
}

@media (min-width: 760px) {
  .site-nav__link {
    display: inline;
  }
}

/* Accueil : la boîte annotée --------------------------------------------- */

.hero {
  display: grid;
  gap: 48px;
  align-items: center;
  padding-block: clamp(24px, 5vw, 72px) clamp(56px, 7vw, 96px);
}

@media (min-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  }
}

.hero h1 {
  margin-bottom: 24px;
  font-size: clamp(48px, 6.6vw, 92px);
  line-height: 0.94;
  letter-spacing: -0.028em;
}

.hero-lead {
  max-width: 30em;
  margin-bottom: 32px;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink-3);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 22px;
}

.hero-note {
  font-size: 14px;
  color: var(--ink-3);
}

.anatomy svg {
  width: 100%;
  height: auto;
}

.anatomy figcaption {
  margin-top: 10px;
  font-size: 13px;
  color: var(--ink-3);
  text-align: center;
}

/* Les trois écrans ------------------------------------------------------- */

.screens {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 48px;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  width: 300px;
}

@media (min-width: 1040px) {
  .screen:nth-child(2) {
    margin-top: 48px;
  }
}

.screen figcaption {
  max-width: 270px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  text-align: center;
}

.screen strong {
  font-weight: 600;
}

/* Téléphone (reproduction des écrans de l'app) --------------------------- */

.phone {
  flex-shrink: 0;
  width: 300px;
  height: 640px;
  border-radius: 44px;
  background: var(--ink);
  padding: 9px;
  box-shadow: 0 30px 60px rgb(40 30 20 / 0.16);
}

.phone__screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: 36px;
  background: var(--bone);
  padding: 20px 16px 0;
  font-size: 11px;
  line-height: 1.3;
  color: var(--ink);
}

.ph-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.ph-avatar,
.ph-round {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.ph-avatar {
  border-radius: 10px;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
}

.ph-round {
  border: 1px solid var(--rule-2);
  border-radius: 999px;
}

.ph-kicker {
  margin-bottom: 5px;
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ph-display {
  font-family: var(--serif);
  font-size: 35px;
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.ph-display--accent {
  margin-bottom: 12px;
  font-style: italic;
  color: var(--green);
}

.ph-sub {
  margin-bottom: 12px;
  font-size: 10.5px;
  color: var(--ink-3);
}

.ph-alert {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.ph-alert strong {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
}

.ph-alert span {
  font-size: 10.5px;
}

.ph-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.ph-stat {
  padding: 9px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}

.ph-stat .ph-kicker {
  margin: 0;
}

.ph-stat__num {
  margin: 5px 0 3px;
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1;
}

.ph-stat__caption {
  font-size: 8.5px;
  color: var(--ink-3);
}

.ph-stat--expired .ph-kicker,
.ph-stat--expired .ph-stat__num {
  color: var(--brick);
}

.ph-quick {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bone);
}

.ph-quick .ph-kicker {
  margin: 0;
  color: oklch(0.72 0.08 155);
}

.ph-quick__title {
  margin-top: 2px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
}

.ph-quick__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: auto;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
}

.ph-list {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--paper);
}

.ph-list--flat {
  border-width: 1px 0 0;
  border-radius: 0;
  background: none;
}

.ph-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 9px;
  border-bottom: 1px solid var(--rule);
}

.ph-list--flat .ph-row {
  padding-inline: 0;
}

.ph-list:not(.ph-list--flat) .ph-row:last-child {
  border-bottom: 0;
}

.ph-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--rule);
  border-radius: 9px;
  background: var(--bone-2);
  color: var(--ink-2);
}

.ph-text {
  flex: 1;
  min-width: 0;
}

.ph-name {
  display: block;
  font-size: 11px;
  font-weight: 500;
}

.ph-name em {
  font-family: var(--serif);
  font-size: 12.5px;
  color: var(--green);
}

.ph-meta {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
  color: var(--ink-3);
}

.ph-meta--mono {
  font-family: var(--mono);
  font-size: 8.5px;
}

.ph-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px 12px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink-3);
}

.ph-chips {
  display: flex;
  gap: 5px;
  margin-bottom: 12px;
  font-size: 9.5px;
  font-weight: 500;
}

.ph-chips span {
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-2);
}

.ph-chips .is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--bone);
}

.ph-specs {
  margin-bottom: 12px;
  border-top: 1px solid var(--rule);
  font-size: 10.5px;
}

.ph-specs div {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--rule-2);
}

.ph-specs dt {
  color: var(--ink-3);
}

.ph-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-weight: 500;
}

.ph-tabbar {
  position: absolute;
  inset: auto 9px 9px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  height: 50px;
  border: 1px solid var(--rule);
  border-radius: 17px;
  background: var(--paper);
  font-size: 7px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.ph-tabbar span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.ph-tabbar .is-active {
  color: var(--ink);
}

/* Pastilles d'état, comme dans l'app -------------------------------------- */

.pill {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 500;
  white-space: nowrap;
}

.pill--lg {
  padding: 5px 12px;
  font-size: 13px;
}

.pill--ok {
  background: var(--green-soft);
  color: var(--green);
}

.pill--soon {
  background: var(--amber-soft);
  color: var(--amber-ink);
}

.pill--expired {
  background: var(--brick-soft);
  color: var(--brick);
}

/* Les trois couleurs ----------------------------------------------------- */

.colors {
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 980px) {
  .colors {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.colors svg {
  width: 100%;
  height: auto;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.legend div {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.legend dt {
  flex-shrink: 0;
  width: 92px;
}

.legend dd {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}

/* En famille --------------------------------------------------------------- */

.family {
  background: var(--ink);
  color: var(--bone);
}

.family .wrap {
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 980px) {
  .family .wrap {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.family .accent {
  color: oklch(0.78 0.09 155);
}

.family-lead {
  max-width: 30em;
  margin-top: 20px;
  font-size: 17px;
  line-height: 1.6;
  color: oklch(0.82 0.012 86);
}

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.fact {
  padding: 20px;
  border: 1px solid oklch(0.36 0.014 250);
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  color: oklch(0.82 0.012 86);
}

.fact__num {
  margin-bottom: 8px;
  font-family: var(--serif);
  font-size: 44px;
  line-height: 1;
  color: var(--bone);
}

.fact--wide {
  display: flex;
  grid-column: span 2;
  align-items: center;
  gap: 14px;
}

.avatars {
  display: inline-flex;
  flex-shrink: 0;
}

.avatars span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
}

.avatars span + span {
  margin-left: -10px;
}

/* Questions ---------------------------------------------------------------- */

.faq > * {
  max-width: 860px;
}

.faq h2 {
  margin-bottom: 28px;
  font-size: clamp(34px, 3.8vw, 48px);
  line-height: 1;
}

.faq-list {
  border-top: 1px solid var(--rule);
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-size: 17px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  color: var(--ink-4);
  transition: transform 0.2s;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  padding-bottom: 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-3);
}

.disclaimer {
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-3);
}

/* Pied de page ------------------------------------------------------------ */

.site-footer {
  border-top: 1px solid var(--rule);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 28px 40px;
}

.site-footer a:not(.btn) {
  color: var(--ink-2);
  font-size: 14px;
}

@media (min-width: 760px) {
  .wrap {
    padding-inline: 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .btn,
  .faq summary::after {
    transition: none;
  }
}
