/* ==========================================================================
   Cabinet de sage-femme — Aurélie Besnier Coulon
   Feuille de style unique. Aucune dépendance externe, aucun JavaScript.
   Direction : « Chaleureux enveloppant » (argile, ocre, crème).
   ========================================================================== */

/* --- Réglages de base & jetons de couleur ------------------------------- */
:root {
  --bg:          #faf5ec;
  --bg-warm:     #f4ebdd;
  --surface:     #ffffff;
  --surface-alt: #f7efe2;
  --ink:         #33261f;
  --ink-soft:    #574439;
  --brand:       #9a4526; /* argile foncée — texte blanc lisible (≈6.4:1) */
  --brand-strong:#7e3a20; /* liens sur fond clair (≈7.7:1) */
  --brand-tint:  #f0ddd0;
  --accent:      #c98a3c; /* ocre — usage décoratif uniquement */
  --accent-deep: #7d4f18; /* ocre foncé — texte (≈6:1 sur fond clair) */
  --line:        #e3d4c2;
  --focus:       #1c3f8f;
  --radius:      18px;
  --radius-lg:   28px;
  --shadow:      0 1px 2px rgba(51, 38, 31, .06), 0 12px 32px -12px rgba(51, 38, 31, .18);
  --maxw:        68rem;
  --pad:         clamp(1.1rem, 4vw, 2.5rem);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 7rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.06rem/1.65 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  color: var(--ink);
  line-height: 1.2;
  font-weight: 600;
  margin: 0 0 .6em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 5vw, 3rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.1rem); }
h3 { font-size: clamp(1.2rem, 2.4vw, 1.45rem); }

p { margin: 0 0 1.1em; max-width: 62ch; }
a { color: var(--brand-strong); text-underline-offset: .18em; text-decoration-thickness: .07em; }
a:hover { color: var(--brand); }

img, svg { max-width: 100%; height: auto; }
ul, ol { padding-left: 1.25em; }
li { margin: .3em 0; }
strong { color: var(--ink); }

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

/* --- Lien d'évitement (RGAA) ------------------------------------------- */
.skip-link {
  position: absolute;
  left: .5rem;
  top: -4rem;
  z-index: 999;
  background: var(--ink);
  color: #fff;
  padding: .7rem 1.1rem;
  border-radius: 0 0 12px 12px;
  transition: top .18s ease;
}
.skip-link:focus { top: 0; color: #fff; }

/* --- Conteneur -------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.wrap--narrow { max-width: 46rem; }

/* --- En-tête & navigation ------------------------------------------- */
.site-header {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .6rem 1rem;
  padding-block: .7rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
}
.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; }
.brand-text span { font-size: .82rem; font-weight: 400; color: var(--ink-soft); }
.brand-mark {
  flex: none;
  width: 2.4rem; height: 2.4rem;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, var(--accent), var(--brand) 78%);
}

.site-nav details { position: relative; }
.site-nav summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .4rem .9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font: inherit;
  font-size: .98rem;
  color: var(--ink);
  cursor: pointer;
}
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after {
  content: "";
  width: .55rem; height: .55rem;
  border-right: 2px solid var(--ink-soft);
  border-bottom: 2px solid var(--ink-soft);
  transform: rotate(45deg) translateY(-2px);
}
.site-nav details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }

.nav-list {
  list-style: none;
  margin: .5rem 0 0;
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  position: absolute;
  right: 0;
  min-width: 15rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.nav-list a {
  display: block;
  padding: .6rem .8rem;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1rem;
}
.nav-list a:hover { background: var(--surface-alt); color: var(--ink); }
.nav-list a[aria-current="page"] {
  background: var(--brand-tint);
  color: var(--brand-strong);
  font-weight: 600;
}

@media (min-width: 62rem) {
  .site-nav summary { display: none; }
  .site-nav { flex-basis: 100%; margin-top: .4rem; border-top: 1px solid var(--line); padding-top: .4rem; }
  .site-nav details { position: static; }
  .nav-list {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    min-width: 0;
  }
  .nav-list a { padding: .5rem .7rem; font-size: .96rem; }
}

/* --- Boutons -------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, background-color .15s ease;
}
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-strong); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--brand-strong); border-color: var(--brand); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand-strong); }
.btn--light { background: #fff; color: var(--brand-strong); }
.btn--light:hover { background: var(--bg-warm); color: var(--brand-strong); }

/* --- Sections & rythme -------------------------------------------- */
main { display: block; }
.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section--warm { background: var(--bg-warm); }
.section--brand { background: var(--brand); color: #fff; }
.section--brand h1, .section--brand h2, .section--brand h3 { color: #fff; }
.section--brand a { color: #fff; }
.section--brand p { color: #fdf1e9; }

.section-lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 60ch; }
.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--accent-deep);
  margin-bottom: .8rem;
}

/* --- Héros page d'accueil --------------------------------------- */
.hero { position: relative; overflow: hidden; background: var(--bg-warm); }
.hero-grid {
  display: grid;
  gap: clamp(1.5rem, 5vw, 3rem);
  align-items: center;
  padding-block: clamp(2.5rem, 8vw, 5rem);
}
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
}
.hero h1 { margin-bottom: .3em; }
.hero .section-lead { margin-bottom: 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-visual {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 90% at 20% 15%, #f6d9a8 0%, transparent 55%),
    radial-gradient(120% 120% at 85% 80%, #d98a55 0%, transparent 55%),
    linear-gradient(150deg, var(--accent) 0%, var(--brand) 70%);
  box-shadow: var(--shadow);
}
@media (max-width: 52rem) { .hero-visual { max-width: 22rem; margin-inline: auto; } }

/* --- Grilles de cartes ---------------------------------------- */
.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-top: 1.8rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: .4em; }
.card p { margin-bottom: .6em; font-size: .99rem; color: var(--ink-soft); }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; transition: transform .15s ease; }
a.card:hover { transform: translateY(-3px); border-color: var(--brand); }
a.card .more { color: var(--brand-strong); font-weight: 600; }

.card-icon {
  width: 2.6rem; height: 2.6rem;
  border-radius: 12px;
  background: var(--brand-tint);
  display: grid;
  place-items: center;
  margin-bottom: .9rem;
}
.card-icon svg { width: 1.4rem; height: 1.4rem; stroke: var(--brand-strong); fill: none; stroke-width: 1.7; }

/* --- Contenu long (pages internes) -------------------------- */
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul { max-width: 62ch; }
.prose > :first-child { margin-top: 0; }

.callout {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent-deep);
  border-radius: 8px;
  padding: 1.1rem 1.3rem;
  margin: 1.6rem 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout--brand { background: var(--brand-tint); border-left-color: var(--brand); }

/* --- Encadré infos pratiques ------------------------------- */
.infobox {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.infobox h2 { font-size: 1.25rem; }
.infobox dl { margin: 0; display: grid; gap: .8rem; }
.infobox dt { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.infobox dd { margin: .1rem 0 0; }

/* --- Tableau des tarifs ----------------------------------- */
.table-scroll { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; min-width: 32rem; background: var(--surface); }
caption { text-align: left; padding: .9rem 1rem; font-weight: 600; color: var(--ink-soft); }
th, td { text-align: left; padding: .85rem 1rem; border-bottom: 1px solid var(--line); }
thead th { background: var(--surface-alt); font-size: .92rem; }
tbody tr:last-child td { border-bottom: 0; }
td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* --- Listes de contacts (urgences / violences) ----------- */
.contact-list { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: .6rem; }
.contact-list li {
  display: flex; flex-wrap: wrap; gap: .2rem 1rem; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; padding: .8rem 1rem; margin: 0;
}
.contact-list .num { font-weight: 700; color: var(--brand-strong); font-size: 1.05rem; min-width: 8rem; }

/* --- Fil d'Ariane ---------------------------------------- */
.breadcrumb { padding-top: 1.2rem; font-size: .9rem; color: var(--ink-soft); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; padding: 0; margin: 0; }
.breadcrumb li:not(:last-child)::after { content: "›"; margin-left: .35rem; color: var(--line); }

/* --- Pied de page --------------------------------------- */
.site-footer {
  background: var(--ink);
  color: #e9ddd2;
  padding-block: 2.6rem 1.6rem;
  margin-top: auto;
}
.site-footer a { color: #fff; }
.footer-grid { display: grid; gap: 1.6rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.site-footer h2 { color: #fff; font-size: 1rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: .35rem 0; }
.site-footer .fine { margin-top: 2rem; border-top: 1px solid #4b3b31; padding-top: 1.2rem; font-size: .86rem; color: #c3b3a6; }

.page-shell { display: flex; flex-direction: column; min-height: 100vh; }

/* --- Utilitaires --------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.stack > * + * { margin-top: 1.1rem; }
.split { display: grid; gap: 1.8rem; }
@media (min-width: 52rem) { .split--aside { grid-template-columns: 1fr 20rem; align-items: start; } }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
