/* ========================================================================
   Pharmacie du Marché — Officine Editorial
   ======================================================================== */

:root {
  --ink:        #161513;
  --paper:      #F4EFE5;
  --paper-deep: #E9E1D1;
  --bordure:    #2B2521;
  --aubergine:  #3F2A3A;
  --sauge:      #6F8568;
  --sang:       #8C2F23;
  --blanc:      #FFFFFF;

  --hairline:   rgba(22, 21, 19, 0.65);
  --hairline-soft: rgba(22, 21, 19, 0.18);

  --ff-display: "Newsreader", "Tiempos Headline", "GT Sectra", "Lyon Display",
                "PP Editorial New", Georgia, "Times New Roman", serif;
  --ff-body:    "Inter", "Söhne", "Untitled Sans", system-ui, -apple-system, sans-serif;
  --ff-mono:    "IBM Plex Mono", "GT America Mono", ui-monospace, "SFMono-Regular",
                Menlo, Consolas, monospace;

  --side-margin: 96px;
  --gutter: 32px;
  --max-width: 1280px;
  --section-sep: 96px;
}

@media (max-width: 1024px) {
  :root { --side-margin: 56px; --section-sep: 80px; }
}
@media (max-width: 768px) {
  :root { --side-margin: 24px; --section-sep: 64px; }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
  position: relative;
}

a.lnk {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0 1px;
  transition: background-size 180ms ease-out;
  padding-bottom: 1px;
}
a.lnk:hover {
  background-size: 100% 1px;
}

p { margin: 0 0 1.05em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
  line-height: 1.06;
}

h1 { font-size: 56px; line-height: 60px; }
h2 { font-size: 36px; line-height: 40px; }
h3 { font-size: 24px; line-height: 28px; }

@media (max-width: 1024px) {
  h1 { font-size: 49px; line-height: 53px; }
  h2 { font-size: 32px; line-height: 36px; }
  h3 { font-size: 22px; line-height: 26px; }
}
@media (max-width: 768px) {
  h1 { font-size: 38px; line-height: 42px; }
  h2 { font-size: 28px; line-height: 32px; }
}

em, i, .italic { font-style: italic; }

.mono {
  font-family: var(--ff-mono);
  font-feature-settings: "tnum", "lnum";
}

.caps {
  font-family: var(--ff-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  line-height: 1.4;
}

/* ----------------------------------------------------------------- layout */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
}

main {
  flex: 1 0 auto;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--side-margin);
  padding-right: var(--side-margin);
  position: relative;
}

.grid12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: var(--gutter);
  row-gap: var(--gutter);
}

.section {
  padding-top: var(--section-sep);
  padding-bottom: var(--section-sep);
  position: relative;
}

.section + .section { padding-top: 0; }

.hairline {
  height: 1px;
  background: var(--hairline);
  width: 100%;
  border: 0;
  margin: 0;
}

.hairline-soft { background: var(--hairline-soft); }

.rubric {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.rubric::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
  max-width: 240px;
}

.margin-num {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--side-margin);
  padding-left: 24px;
  padding-top: 4px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
@media (max-width: 768px) {
  .margin-num {
    position: static;
    width: auto;
    padding: 0;
    margin-bottom: 12px;
  }
}

/* ----------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 20px var(--side-margin);
  gap: 24px;
}

.monogram {
  width: 36px;
  height: 36px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  letter-spacing: -0.04em;
  flex-shrink: 0;
}

.monogram--lg {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  font-size: 40px;
}

.monogram__inner {
  display: inline-block;
  position: relative;
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.nav a {
  font-size: 14px;
  letter-spacing: 0.01em;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav a:hover { border-bottom-color: var(--ink); }
.nav a.is-active { border-bottom-color: var(--sauge); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 8px 0;
  color: var(--ink);
}

@media (max-width: 900px) {
  .nav { display: none; }
  .nav-toggle { display: block; }
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--paper);
  z-index: 100;
  padding: 80px var(--side-margin) 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.nav-overlay a {
  font-family: var(--ff-display);
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  padding: 6px 0;
}
.nav-overlay__close {
  position: absolute;
  top: 24px;
  right: var(--side-margin);
  background: none;
  border: 0;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
.nav-overlay__head {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  position: absolute;
  top: 24px;
  left: var(--side-margin);
}

/* ----------------------------------------------------------------- footer */

.site-footer {
  background: var(--paper-deep);
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-sep);
}
.site-footer__row {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--side-margin);
}
.site-footer__row--big {
  padding-top: 64px;
  padding-bottom: 48px;
}
.site-footer__row--big h2 {
  font-size: 44px;
  line-height: 48px;
}
@media (max-width: 768px) {
  .site-footer__row--big h2 { font-size: 28px; line-height: 32px; }
}

.site-footer__cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--gutter);
  padding-top: 32px;
  padding-bottom: 32px;
  border-top: 1px solid var(--hairline);
}
@media (max-width: 768px) {
  .site-footer__cols { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

.site-footer__col h4 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 10px;
}
.site-footer__col p, .site-footer__col .v {
  font-family: var(--ff-mono);
  font-size: 13px;
  line-height: 20px;
  margin: 0;
}

.site-footer__row--caption {
  border-top: 1px solid var(--hairline);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  padding-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer__row--caption,
.site-footer__row--caption a {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.site-footer__row--caption .mini {
  display: flex;
  gap: 18px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
  display: inline-block;
  padding: 14px 22px;
  font-family: var(--ff-body);
  font-size: 14px;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  background: var(--ink);
  color: var(--paper);
  border: 1px solid var(--ink);
  border-radius: 2px;
  text-decoration: none;
  transition: transform 120ms ease-out, box-shadow 180ms ease-out;
  position: relative;
}
.btn:hover { box-shadow: inset 0 0 0 1px var(--aubergine); }
.btn:active { transform: translateY(1px); }

.btn--secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--ink);
}
.btn--secondary:hover { box-shadow: inset 0 0 0 1px var(--ink); }

/* ----------------------------------------------------------------- garde callout */

.garde {
  background: var(--paper);
  border-top: 1px solid var(--sang);
  border-bottom: 1px solid var(--sang);
  color: var(--sang);
}
.garde__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px var(--side-margin);
  font-family: var(--ff-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}
.garde__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  padding-right: 14px;
  border-right: 1px solid var(--sang);
}
.garde a { text-decoration: underline; text-underline-offset: 3px; }

/* ----------------------------------------------------------------- horaires band */

.horaires-band {
  background: var(--paper-deep);
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.horaires-band__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px var(--side-margin);
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 48px;
  align-items: start;
}
@media (max-width: 768px) {
  .horaires-band__inner { grid-template-columns: 1fr; gap: 20px; }
}
.horaires-band__inner h3 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0;
  padding-top: 6px;
  font-weight: 400;
}
.horaires-table {
  font-family: var(--ff-mono);
  font-size: 15px;
  line-height: 28px;
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 0;
}
.horaires-table > div {
  padding: 10px 0;
  border-top: 1px solid var(--hairline);
}
.horaires-table > div:nth-last-child(-n+2) { /* keep */ }

/* ----------------------------------------------------------------- forms */

.field {
  display: block;
  padding-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
}
.field__label {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
  display: block;
  color: var(--ink);
}
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field textarea {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--ff-body);
  font-size: 17px;
  line-height: 26px;
  color: var(--ink);
  outline: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  resize: vertical;
}
.field input:focus,
.field textarea:focus {
  border-bottom: 2px solid var(--ink);
}
.field--error { border-bottom-color: var(--sang); }
.field-error-msg {
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--sang);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: var(--ff-body);
}
.radio-row label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 15px;
}
.radio-row input[type="radio"] {
  appearance: none;
  width: 14px;
  height: 14px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  margin: 0;
  position: relative;
  cursor: pointer;
}
.radio-row input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--ink);
}

.consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 15px;
  line-height: 22px;
  padding: 20px 0 28px;
}
.consent input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--ink);
  margin-top: 3px;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
}
.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: var(--ink);
}

/* ----------------------------------------------------------------- tables */

.t-loc {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 24px;
}
.t-loc th, .t-loc td {
  text-align: left;
  padding: 18px 16px 18px 0;
  border-bottom: 1px solid var(--hairline-soft);
  vertical-align: top;
}
.t-loc thead th {
  font-family: var(--ff-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 10px;
}
.t-loc td .mono { white-space: nowrap; }
.t-loc tbody tr:hover { background: rgba(22,21,19,0.025); }
.t-loc td.num { font-family: var(--ff-mono); white-space: nowrap; }

/* ----------------------------------------------------------------- placeholder image (still life) */

.still {
  background: var(--paper-deep);
  border: 1px solid var(--hairline-soft);
  position: relative;
  overflow: hidden;
  display: block;
}
.still::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(22,21,19,0.04) 0,
    rgba(22,21,19,0.04) 1px,
    transparent 1px,
    transparent 12px
  );
}
.still__label {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  z-index: 2;
}
.still__num {
  position: absolute;
  left: 16px;
  top: 14px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  z-index: 2;
}

/* ----------------------------------------------------------------- pullquote */

.pullquote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 26px;
  line-height: 34px;
  letter-spacing: -0.01em;
  padding: 32px 0 32px 28px;
  border-left: 1px solid var(--ink);
  margin: 0;
}

.callout {
  background: var(--paper-deep);
  padding: 32px 36px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.callout h4 {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 400;
}

/* ----------------------------------------------------------------- dl */

dl.def {
  display: grid;
  grid-template-columns: 180px 1fr;
  column-gap: 24px;
  row-gap: 16px;
  margin: 0;
}
dl.def dt {
  font-family: var(--ff-display);
  font-size: 19px;
  font-style: italic;
  padding-top: 2px;
}
dl.def dd {
  margin: 0;
  font-size: 15px;
  line-height: 24px;
}
@media (max-width: 640px) {
  dl.def { grid-template-columns: 1fr; row-gap: 6px; }
  dl.def dt { padding-top: 12px; }
}

/* ----------------------------------------------------------------- bullets */

ul.dots { list-style: none; padding: 0; margin: 0 0 1em; }
ul.dots li {
  padding-left: 22px;
  position: relative;
  margin-bottom: 12px;
  line-height: 26px;
}
ul.dots li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 5px;
  height: 5px;
  background: var(--ink);
  border-radius: 50%;
}

/* ----------------------------------------------------------------- testimonial */

.test {
  padding: 36px 0;
  border-bottom: 1px solid var(--hairline-soft);
}
.test:last-child { border-bottom: 0; }
.test blockquote {
  font-family: var(--ff-display);
  font-style: italic;
  font-size: 28px;
  line-height: 36px;
  margin: 0 0 16px;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.test cite {
  font-family: var(--ff-mono);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ----------------------------------------------------------------- TOC */

.toc {
  position: sticky;
  top: 100px;
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 22px;
}
.toc a { display: block; padding: 6px 0; border-bottom: 1px solid var(--hairline-soft); color: var(--ink); }
.toc a:hover { color: var(--aubergine); }

/* ----------------------------------------------------------------- fade-in */

.fade-up {
  opacity: 0;
  transform: translateY(8px);
  animation: fadeUp 240ms ease-out forwards;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up { animation: none; opacity: 1; transform: none; }
  * { transition: none !important; animation: none !important; }
}

/* ----------------------------------------------------------------- map placeholder */

.map-still {
  aspect-ratio: 4 / 3;
  background: var(--paper-deep);
  position: relative;
  border: 1px solid var(--hairline);
  overflow: hidden;
}

/* ----------------------------------------------------------------- success panel */

.success {
  background: var(--paper-deep);
  border: 1px solid var(--ink);
  padding: 40px 36px;
}

/* ----------------------------------------------------------------- helpers */

.spacer-8  { height: 8px; }
.spacer-16 { height: 16px; }
.spacer-24 { height: 24px; }
.spacer-32 { height: 32px; }
.spacer-48 { height: 48px; }
.spacer-64 { height: 64px; }
.spacer-96 { height: 96px; }

.col-7 { grid-column: span 7; }
.col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; }
.col-4 { grid-column: span 4; }
.col-3 { grid-column: span 3; }
.col-8 { grid-column: span 8; }
.col-10 { grid-column: span 10; }
.col-12 { grid-column: span 12; }

@media (max-width: 768px) {
  .col-7, .col-6, .col-5, .col-4, .col-3, .col-8, .col-10 { grid-column: span 12; }
}

.eyebrow-num {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
}

.kicker {
  font-family: var(--ff-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* underline link variant for inline body */
.u-link {
  border-bottom: 1px solid currentColor;
  padding-bottom: 1px;
}
.u-link:hover { color: var(--aubergine); }
