/* ==========================================================================
   Guide des Médicaments d'Officine — feuille de style
   ========================================================================== */

:root {
  --navy: #0e2a3d;
  --navy-soft: #163c54;
  --blue: #1789bf;
  --blue-dark: #0f6a97;
  --sky: #d9f0fa;
  --sky-soft: #f2faFD;
  --ink: #1b2733;
  --muted: #52697a;
  --white: #ffffff;
  --line: #dfe9ee;
  --radius: 16px;
  --shadow: 0 10px 30px -12px rgba(14, 42, 61, 0.25);
  --font-head: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--navy);
}

h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; color: var(--ink); }

em { color: var(--blue-dark); font-style: normal; font-weight: 600; }

a { color: var(--blue-dark); }

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 0.5em;
}

.section { padding: 64px 0; }
.section-alt { background: var(--sky-soft); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 42, 61, 0.96);
  backdrop-filter: blur(6px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.15;
}
.brand em { color: #7fd6ff; font-style: normal; }
.brand-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  flex: none;
}

.site-nav {
  display: flex;
  gap: 28px;
}
.site-nav a {
  color: #d9ecf5;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a:focus-visible {
  color: #fff;
  border-color: var(--blue);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: #fff;
  transition: transform .2s ease, opacity .2s ease;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 13px 24px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(23, 137, 191, .6);
}
.btn-primary:hover { background: var(--blue-dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-dark); }

.btn-amazon { display: inline-block; line-height: 0; }
.btn-amazon img { border-radius: 8px; }

.link-btn {
  background: none;
  border: none;
  padding: 0;
  color: var(--blue-dark);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, var(--sky) 0%, var(--white) 100%);
  padding: 56px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy-soft);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 20px;
}
.hero-covers {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.hero-covers img {
  width: 46%;
  max-width: 220px;
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.hero-covers picture:nth-child(2) img { margin-top: 32px; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 32px;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
}
.card-icon {
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--sky);
  color: var(--blue-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin-top: 32px;
}
.product-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.product-card img { border-radius: 8px; }
.product-body h3 { margin-bottom: 0.4em; }
.product-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 14px;
}

.pro-note {
  margin-top: 40px;
  padding: 26px 28px;
  background: var(--navy);
  color: #eaf4fa;
  border-radius: var(--radius);
}
.pro-note h3 { color: #fff; }
.pro-note p { color: #eaf4fa; margin-bottom: 0; }
.pro-note a { color: #7fd6ff; }

/* ---------- Video ---------- */
.video-frame {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-top: 24px;
  background: var(--navy);
}
.video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- Two column ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* ---------- Contact ---------- */
.email-box {
  display: inline-block;
  background: var(--sky-soft);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 700;
}
.email-box a { text-decoration: none; }
.fine-print {
  font-size: 0.85rem;
  color: var(--muted);
}
.legal-box {
  background: var(--sky-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 28px;
}
.legal-box dl { margin: 0; }
.legal-box div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.legal-box div:last-child { border-bottom: 0; }
.legal-box dt { color: var(--muted); font-weight: 600; }
.legal-box dd { margin: 0; font-weight: 700; text-align: right; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #cfe3ec;
  padding: 32px 0;
}
.footer-inner { text-align: center; }
.site-footer .fine-print { color: #9db8c6; }
.back-to-top {
  color: #7fd6ff;
  text-decoration: none;
  font-weight: 700;
  display: inline-block;
  margin-top: 8px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 20, 28, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 200;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-height: 88vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,.25); }

/* ==========================================================================
   Responsive breakpoints
   ========================================================================== */
@media (min-width: 640px) {
  .hero-covers img { max-width: 240px; }
}

@media (min-width: 860px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .two-col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-soft);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .site-nav.is-open { max-height: 320px; }
  .site-nav a {
    padding: 14px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    border-radius: 0;
  }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .product-card { grid-template-columns: 1fr; }
  .product-card picture { justify-self: start; width: 130px; }
  .section { padding: 48px 0; }
  .legal-box div { flex-direction: column; gap: 2px; }
  .legal-box dd { text-align: left; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
