/* AndroCap — Projet Santé : Andropause
   Palette tirée du logo : violet -> prune -> corail -> orange */

:root {
  --violet: #5a1fe0;
  --violet-dark: #3f12a8;
  --plum: #9a4fb0;
  --coral: #ef9a82;
  --orange: #ffa24d;
  --ink: #1f1640;
  --text: #3a3355;
  --muted: #6b6485;
  --line: #e6e0f0;
  --soft: #f7f4fb;
  --white: #ffffff;
  --gradient: linear-gradient(90deg, var(--violet) 0%, var(--plum) 50%, var(--orange) 100%);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(31, 22, 64, 0.08);
  --wrap: 1160px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--violet); }
a:hover { color: var(--violet-dark); }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  padding: 10px 16px;
  border-radius: 8px;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* ---------- Bandeau institutionnel ---------- */

.topbar {
  background: var(--ink);
  color: #d9d2ee;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 7px;
  padding-bottom: 7px;
}
.topbar strong { color: var(--white); font-weight: 600; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: var(--gradient);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 62px; width: auto; }

.nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 2px;
}
.nav a {
  display: block;
  padding: 10px 11px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-radius: 8px;
  white-space: nowrap;
}
.nav a:hover { background: var(--soft); color: var(--violet); }
.nav a[aria-current="page"] {
  color: var(--violet);
  background: var(--soft);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 12px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Accueil : hero ---------- */

.hero {
  background:
    radial-gradient(900px 420px at 0% 0%, rgba(90, 31, 224, 0.07), transparent 70%),
    radial-gradient(700px 380px at 100% 100%, rgba(255, 162, 77, 0.10), transparent 70%),
    var(--white);
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  padding-top: 56px;
  padding-bottom: 64px;
}
.hero-logo { width: min(400px, 82%); margin: 0 0 8px -14px; mix-blend-mode: multiply; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 14px;
}
.hero h1 { margin-bottom: 0.35em; }
.hero h1 span { display: block; font-size: 0.5em; font-weight: 400; color: var(--muted); margin-top: 10px; letter-spacing: 0; }
.hero .lead { font-size: 1.15rem; color: var(--text); max-width: 34em; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  border: 2px solid transparent;
}
.btn-primary { background: var(--violet); color: var(--white); }
.btn-primary:hover { background: var(--violet-dark); color: var(--white); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn-ghost:hover { border-color: var(--violet); color: var(--violet); }

.hero-visual { position: relative; }
.hero-visual::before {
  content: "";
  position: absolute;
  inset: 26px -18px -18px 26px;
  border-radius: 22px;
  background: var(--gradient);
  opacity: 0.9;
}
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  max-height: 580px;
  width: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(160deg, #2a1c5c 0%, #6a3a9a 55%, #e8946f 100%);
  box-shadow: var(--shadow);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
}

/* ---------- Sections ---------- */

.section { padding: 72px 0; }
.section.alt { background: var(--soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head p { font-size: 1.08rem; color: var(--muted); margin: 0; }

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

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 22px;
}
.card h3 { margin-bottom: 0.45em; }
.card p:last-child, .card ul:last-child { margin-bottom: 0; }

.num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: var(--white);
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 16px;
}

/* Liens vers les parties (accueil) */
.part-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.part-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  border-color: var(--violet);
  color: var(--text);
}
.part-link .kicker {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--plum);
  margin-bottom: 8px;
}
.part-link p { font-size: 0.95rem; color: var(--muted); flex: 1; }
.part-link .more { font-weight: 600; font-size: 0.92rem; color: var(--violet); margin-top: 12px; }

/* Objectifs */
.goal-banner {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 28px;
  margin-bottom: 26px;
  text-align: center;
}

/* ---------- Pages intérieures ---------- */

.page-head {
  background:
    radial-gradient(800px 300px at 100% 0%, rgba(255, 162, 77, 0.14), transparent 70%),
    var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 44px 0 46px;
}
.crumbs { font-size: 0.86rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.page-head h1 { margin-bottom: 0.3em; }
.page-head .lead { font-size: 1.12rem; max-width: 46em; margin: 0; }

.sub-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.sub-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
}
.sub-nav a:hover { border-color: var(--violet); color: var(--violet); }

.source-note {
  font-size: 0.86rem;
  color: var(--muted);
  margin-top: 26px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Chiffres clés */
.stat .value {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.6vw, 2.9rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  white-space: nowrap;
}
.stat p { font-size: 0.97rem; }

/* Listes à puces */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  position: relative;
  padding: 0 0 0 26px;
  margin-bottom: 12px;
}
.list li:last-child { margin-bottom: 0; }
.list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gradient);
}

/* Mise en avant */
.feature {
  background: var(--ink);
  color: #e4def5;
  border-radius: var(--radius);
  padding: 34px 36px;
  margin-bottom: 22px;
}
.feature .eyebrow { color: var(--orange); }
.feature h2 { color: var(--white); margin-bottom: 0.4em; }
.feature p { margin: 0; max-width: 48em; font-size: 1.05rem; }

.callout {
  background: #fff6ec;
  border: 1px solid #f6d7b3;
  border-radius: var(--radius);
  padding: 22px 26px;
  margin-top: 22px;
}
.callout strong { color: var(--ink); }
.callout p { margin: 0; }

.target .big {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 700;
  color: var(--violet);
  line-height: 1.1;
  margin-bottom: 14px;
}
.target .label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 6px;
}

/* Sources */
.refs { list-style: none; counter-reset: ref; margin: 0; padding: 0; }
.refs li {
  counter-increment: ref;
  position: relative;
  padding: 18px 0 18px 54px;
  border-bottom: 1px solid var(--line);
}
.refs li::before {
  content: counter(ref);
  position: absolute;
  left: 0;
  top: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--violet);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.refs strong { color: var(--ink); }

/* Navigation précédent / suivant */
.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.pager a {
  text-decoration: none;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pager a span { font-size: 0.8rem; font-weight: 500; color: var(--muted); }
.pager a:hover { color: var(--violet); }
.pager .next { text-align: right; margin-left: auto; }

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

.site-footer {
  background: var(--ink);
  color: #cfc7e6;
  padding: 48px 0 28px;
  font-size: 0.93rem;
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 48px;
}
.site-footer h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 14px;
}
.site-footer .name { font-family: var(--serif); font-size: 1.5rem; color: var(--white); margin-bottom: 4px; }
.site-footer .tag { color: var(--orange); letter-spacing: 0.18em; text-transform: uppercase; font-size: 0.78rem; margin-bottom: 14px; }
.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2;
  column-gap: 32px;
}
.site-footer li { margin-bottom: 8px; break-inside: avoid; }
.site-footer a { color: #cfc7e6; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer .legal {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.84rem;
  color: #a89fc6;
}

/* ---------- Adaptatif ---------- */

@media (max-width: 1100px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    padding: 10px 24px 18px;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 2px; }
  .nav a { padding: 12px 12px; font-size: 1rem; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; padding-top: 36px; padding-bottom: 56px; }
  .hero-visual { max-width: 460px; margin-right: 18px; }
  .hero-photo { aspect-ratio: 4 / 3.6; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .cols { grid-template-columns: 1fr; gap: 32px; }
  .section { padding: 52px 0; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .topbar .hide-sm { display: none; }
  .brand img { height: 52px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .feature { padding: 26px 22px; }
  .site-footer ul { columns: 1; }
  .pager { flex-direction: column; }
  .pager .next { text-align: left; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .part-link { transition: none; }
}
