/* ==========================================================================
   Bébé arrive — Guide de la grossesse aux premiers mois
   Feuille de style — mobile-first, palette pastel chaude
   ========================================================================== */

:root {
  --bg: #fdf8f3;
  --bg-soft: #fbf1e8;
  --card: #ffffff;
  --ink: #463832;
  --ink-soft: #75645b;
  --line: #f0e2d8;
  --accent: #d97757;
  --accent-deep: #b9593c;
  --accent-soft: #fbe4d9;
  --rose: #e8a6ad;
  --rose-soft: #fbeaed;
  --sage: #7fa286;
  --sage-soft: #eaf2ec;
  --blue: #8ba9c6;
  --blue-soft: #e9f0f7;
  --gold: #d9a441;
  --gold-soft: #fbf3df;
  --danger: #c0453a;
  --danger-bg: #fdecea;
  --danger-line: #efb3ad;
  --radius: 1.15rem;
  --radius-sm: 0.7rem;
  --shadow: 0 6px 24px rgba(120, 84, 66, 0.08);
  --shadow-hover: 0 10px 32px rgba(120, 84, 66, 0.14);
  --header-h: 64px;
  --font-title: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: inline-block;
  vertical-align: middle;
}

a {
  color: var(--accent-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.wrap {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  top: -3.5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--accent-deep);
  color: #fff;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0.75rem;
  color: #fff;
}

/* ---------- Header / navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-title);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.brand svg {
  width: 26px;
  height: 26px;
  color: var(--accent);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

.nav-menu {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.8rem 1.25rem 1.2rem;
  background: rgba(253, 248, 243, 0.98);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
  max-height: calc(100vh - var(--header-h));
  overflow-y: auto;
}

.nav-menu.is-open {
  display: flex;
}

.nav-menu a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-menu a .nav-num {
  font-family: var(--font-title);
  font-size: 0.8rem;
  color: var(--accent);
  min-width: 1.1rem;
}

.nav-menu a:hover {
  background: var(--accent-soft);
  color: var(--ink);
}

.nav-menu a.active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.nav-menu a.nav-star {
  color: var(--gold);
}

.nav-menu a.nav-star.active,
.nav-menu a.nav-star:hover {
  background: var(--gold-soft);
  color: var(--accent-deep);
}

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

  .nav-menu {
    position: static;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.1rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .nav-menu a {
    padding: 0.4rem 0.55rem;
    font-size: 0.88rem;
  }

  .nav-menu a .nav-num {
    display: none;
  }
}

/* ---------- Héro ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(42rem 22rem at 85% -10%, var(--rose-soft) 0%, transparent 60%),
    radial-gradient(38rem 20rem at -10% 110%, var(--sage-soft) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-soft) 0%, var(--bg) 100%);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.95rem;
  margin-bottom: 1.4rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--accent-deep);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-eyebrow svg {
  width: 15px;
  height: 15px;
}

.hero h1 {
  font-size: clamp(2rem, 5.2vw, 3.4rem);
  font-weight: 700;
  max-width: 21ch;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-deep);
}

.hero-sub {
  margin: 1.3rem 0 0;
  max-width: 56ch;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(217, 119, 87, 0.35);
}

.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--card);
  color: var(--accent-deep);
  border: 1px solid var(--line);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.hero-note {
  display: flex;
  gap: 0.8rem;
  margin-top: 2.6rem;
  padding: 1.05rem 1.25rem;
  background: var(--blue-soft);
  border: 1px solid #cfdfee;
  border-radius: var(--radius);
  color: #44586b;
  font-size: 0.95rem;
  max-width: 62ch;
}

.hero-note svg {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 0.15rem;
  color: var(--blue);
}

.hero-note p {
  margin: 0;
}

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

main {
  display: block;
}

.section {
  padding: 3.2rem 0 1rem;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.section-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.section-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 1rem;
  font-family: var(--font-title);
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  box-shadow: 0 5px 14px rgba(217, 119, 87, 0.3);
}

.section:nth-of-type(even) .section-num {
  background: var(--sage);
  box-shadow: 0 5px 14px rgba(127, 162, 134, 0.3);
}

.section-header h2 {
  font-size: clamp(1.45rem, 3.4vw, 2.05rem);
}

.section-lead {
  margin: -0.6rem 0 1.6rem;
  max-width: 72ch;
  color: var(--ink-soft);
  font-size: 1.04rem;
}

.cards {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 820px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .card.card-wide {
    grid-column: 1 / -1;
  }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.18rem;
  margin-bottom: 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--line);
}

.card h3 .dot {
  flex: none;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--accent);
}

.section:nth-of-type(even) .card h3 .dot {
  background: var(--sage);
}

.card li {
  position: relative;
  padding-left: 1.35rem;
  margin-bottom: 0.7rem;
  color: var(--ink-soft);
}

.card li:last-child {
  margin-bottom: 0;
}

.card li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.72em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  transform: translateY(-50%);
}

.section:nth-of-type(even) .card li::before {
  background: var(--sage-soft);
  border-color: var(--sage);
}

.card li strong,
.alert strong {
  color: var(--ink);
}

/* Marqueurs forts dans le texte source */
.card li em {
  font-style: normal;
  font-weight: 800;
  color: var(--accent-deep);
}

/* ---------- Alertes sécurité ---------- */

.alert {
  display: flex;
  gap: 0.8rem;
  margin: 1.25rem 0;
  padding: 1.05rem 1.2rem;
  border-radius: var(--radius);
  background: var(--danger-bg);
  border: 1px solid var(--danger-line);
  border-left: 5px solid var(--danger);
  color: #6d2b25;
  font-size: 0.98rem;
}

.alert svg {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 0.1rem;
  color: var(--danger);
}

.alert p {
  margin: 0;
}

.alert p + p {
  margin-top: 0.5rem;
}

.alert .alert-title {
  display: block;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.82rem;
  color: var(--danger);
  margin-bottom: 0.25rem;
}

/* ---------- Bloc "10 points essentiels" ---------- */

.section-essentiels {
  margin-top: 3rem;
}

.essentiels {
  position: relative;
  overflow: hidden;
  border-radius: calc(var(--radius) + 0.4rem);
  padding: 2.4rem 1.6rem 2.2rem;
  background:
    radial-gradient(30rem 16rem at 110% -20%, rgba(255, 255, 255, 0.22) 0%, transparent 55%),
    linear-gradient(135deg, #e8996f 0%, var(--accent) 45%, #c9684a 100%);
  color: #fff;
  box-shadow: 0 16px 44px rgba(185, 89, 60, 0.32);
}

@media (min-width: 700px) {
  .essentiels {
    padding: 3rem 3rem 2.6rem;
  }
}

.essentiels-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.essentiels-badge svg {
  width: 15px;
  height: 15px;
}

.essentiels h2 {
  color: #fff;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin-bottom: 0.4rem;
}

.essentiels .essentiels-intro {
  margin: 0.4rem 0 1.8rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.02rem;
}

.points {
  display: grid;
  gap: 0.85rem;
  counter-reset: point;
}

@media (min-width: 820px) {
  .points {
    grid-template-columns: repeat(2, 1fr);
  }
}

.points li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1rem 1.15rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.97rem;
  line-height: 1.55;
}

.points li .point-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  background: #fff;
  color: var(--accent-deep);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1rem;
}

.points li.point-alert {
  background: rgba(255, 255, 255, 0.92);
  border-color: #fff;
  color: #6d2b25;
}

.points li.point-alert .point-num {
  background: var(--danger);
  color: #fff;
}

/* ---------- Sources ---------- */

.section-sources .card {
  padding: 1.6rem 1.7rem;
}

.sources-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.85rem;
  color: var(--ink-soft);
  font-size: 0.97rem;
}

.sources-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.68em;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: var(--blue-soft);
  border: 1.5px solid var(--blue);
  transform: translateY(-50%) rotate(45deg);
}

.sources-list a {
  font-weight: 700;
  word-break: break-word;
}

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

.site-footer {
  margin-top: 4rem;
  padding: 2.6rem 0 2.2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 760px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr;
  }
}

.site-footer h2 {
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.site-footer p {
  margin: 0 0 0.7rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px dashed var(--line);
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
}

/* ---------- Bouton retour en haut ---------- */

.back-to-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--accent-deep);
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.back-to-top svg {
  width: 20px;
  height: 20px;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-soft);
}

/* ---------- Accessibilité mouvement ---------- */

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
