/* ============================================================
   OreillerCervical.info — feuille de style complémentaire
   Palette : encre #14213A / lin #FBF8F3 / sauge #6E8B7B / terre #B96F52
   Typo : Fraunces (titres) + Instrument Sans (corps)
   ============================================================ */

:root {
  --encre: #14213A;
  --nuit-900: #101B31;
  --nuit-700: #22345A;
  --nuit-200: #C9D3E4;
  --nuit-100: #E4E9F2;
  --lin-50: #FBF8F3;
  --lin-100: #F5EFE5;
  --lin-200: #EADFCE;
  --lin-300: #D8C6AB;
  --sauge-100: #E7EEE9;
  --sauge-300: #A9C0B2;
  --sauge-500: #6E8B7B;
  --sauge-700: #4C665A;
  --terre-500: #B96F52;
  --muted: #5A6478;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
  color: var(--encre);
  background: var(--lin-50);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 500;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  letter-spacing: -0.015em;
}
ul, ol { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }
p { margin: 0; }

/* ---------- Utilitaires de mise en page ---------- */
.wrap { width: 100%; max-width: 76rem; margin-inline: auto; padding-inline: 1.25rem; }
@media (min-width: 768px) { .wrap { padding-inline: 2rem; } }
.section { padding-block: 3.5rem; }
@media (min-width: 1024px) { .section { padding-block: 5rem; } }
.section-lin { background: var(--lin-100); }
.section-nuit { background: var(--nuit-900); color: #F1F4F9; }
.section-nuit h1, .section-nuit h2, .section-nuit h3 { color: #FBF8F3; }
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--encre); color: #fff; padding: .75rem 1.25rem; border-radius: 0 0 .5rem 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--sauge-500); outline-offset: 2px; border-radius: .25rem; }

/* ---------- Bandeau ---------- */
.announce-bar { background: var(--nuit-900); color: #DCE4EF; padding: .5rem 0; letter-spacing: .04em; }
.announce-bar .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .35rem 1.5rem; font-size: 12px; }
@media (min-width: 640px) { .announce-bar .wrap { font-size: 12.5px; } }
.announce-bar .sep { opacity: .35; }

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 248, 243, .96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--lin-200);
}
.header-row { display: flex; align-items: center; justify-content: space-between; height: 4.25rem; gap: 1rem; }
@media (min-width: 768px) { .header-row { height: 5rem; } }
.brand { display: inline-flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand-name { font-family: 'Fraunces', Georgia, serif; font-size: 1.06rem; line-height: 1; color: var(--encre); letter-spacing: -.02em; }
.brand-dot { color: var(--sauge-500); }

.nav-link {
  display: inline-flex; align-items: center; gap: .35rem;
  color: var(--encre); font-size: .875rem; font-weight: 500;
  padding: .5rem .7rem; border-radius: .5rem;
  transition: background-color .18s ease, color .18s ease;
}
.nav-link:hover { background: var(--lin-100); }
.nav-link[aria-current="page"] { background: var(--sauge-100); color: var(--sauge-700); font-weight: 600; }
.nav-group { position: relative; }
.dropdown-panel {
  position: absolute; left: 0; top: calc(100% + .45rem); width: 19rem;
  padding: .6rem; background: #fff; border: 1px solid var(--lin-200);
  border-radius: .9rem; box-shadow: 0 28px 50px -30px rgba(16, 27, 49, .45);
  visibility: hidden; opacity: 0; transform: translateY(6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
[data-dropdown][data-open="true"] .dropdown-panel { visibility: visible; opacity: 1; transform: translateY(0); }
.dropdown-title {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .17em;
  color: var(--sauge-700); padding: .4rem .8rem .3rem; font-weight: 700;
}
.dropdown-item { display: block; padding: .45rem .8rem; border-radius: .45rem; font-size: .86rem; color: var(--encre); }
.dropdown-item:hover { background: var(--lin-50); }
.dropdown-item-strong { font-weight: 600; color: var(--nuit-700); border-top: 1px solid var(--lin-200); border-radius: 0 0 .45rem .45rem; margin-top: .3rem; padding-top: .6rem; }

.mobile-panel {
  display: none; max-height: calc(100vh - 4.25rem); overflow-y: auto;
  border-top: 1px solid var(--lin-200); background: var(--lin-50);
}
.mobile-panel.is-open { display: block; }
.mob-link { display: block; padding: .6rem .25rem; font-size: .95rem; font-weight: 500; border-bottom: 1px solid var(--lin-100); }
.mob-title { font-size: .68rem; text-transform: uppercase; letter-spacing: .17em; color: var(--sauge-700); font-weight: 700; padding: 1rem .25rem .35rem; }
.mob-sub { display: block; padding: .45rem .25rem .45rem 1rem; font-size: .9rem; color: var(--muted); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .8rem 1.4rem; border-radius: 999px; font-size: .875rem; font-weight: 600;
  line-height: 1; transition: transform .16s ease, background-color .18s ease, color .18s ease;
  text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--encre); color: #FBF8F3; }
.btn-primary:hover { background: var(--nuit-700); }
.btn-sauge { background: var(--sauge-700); color: #fff; }
.btn-sauge:hover { background: #3F574C; }
.btn-ghost { border: 1px solid var(--nuit-200); color: var(--encre); background: transparent; }
.btn-ghost:hover { border-color: var(--encre); background: #fff; }
.btn-light { background: var(--lin-50); color: var(--encre); }
.btn-light:hover { background: #fff; }
.btn-line { border: 1px solid rgba(251, 248, 243, .4); color: #FBF8F3; }
.btn-line:hover { background: rgba(251, 248, 243, .12); }
.btn-sm { padding: .55rem 1rem; font-size: .8rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; color: var(--nuit-700); border-bottom: 1px solid var(--sauge-300); padding-bottom: 2px; }
.link-arrow:hover { color: var(--sauge-700); border-color: var(--sauge-700); }

/* ---------- Typo éditoriale ---------- */
.kicker { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; font-weight: 700; color: var(--sauge-700); }
.kicker-light { color: var(--sauge-300); }
.lead { font-size: 1.06rem; line-height: 1.65; color: var(--muted); }
@media (min-width: 768px) { .lead { font-size: 1.15rem; } }
.muted { color: var(--muted); }
.section-nuit .lead, .section-nuit .muted { color: #C4CFDF; }

/* ---------- Cartes ---------- */
.card {
  display: flex; flex-direction: column; background: #fff;
  border: 1px solid var(--lin-200); border-radius: 1.1rem; overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 24px 40px -30px rgba(16, 27, 49, .5); }
.card-img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.card-body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.card h3 { font-size: 1.12rem; line-height: 1.3; }
.card p { font-size: .9rem; line-height: 1.6; color: var(--muted); }
.card .link-arrow { margin-top: auto; align-self: flex-start; font-size: .85rem; }
.grid-cards { display: grid; gap: 1.35rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-cards { grid-template-columns: repeat(3, 1fr); } }

.pill {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  padding: .3rem .7rem; border-radius: 999px;
  background: var(--sauge-100); color: var(--sauge-700);
}
.pill-terre { background: #F7E7E0; color: #93503A; }
.pill-nuit { background: var(--nuit-100); color: var(--nuit-700); }

/* ---------- Héros ---------- */
.hero { position: relative; overflow: hidden; background: var(--nuit-900); color: #F1F4F9; }
.hero-media { position: absolute; inset: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .48; }
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(105deg, rgba(16, 27, 49, .94) 0%, rgba(16, 27, 49, .78) 48%, rgba(16, 27, 49, .34) 100%);
}
.hero-inner { position: relative; padding-block: 4rem; }
@media (min-width: 1024px) { .hero-inner { padding-block: 6rem; } }
.hero h1 { font-size: clamp(2rem, 6vw, 3.6rem); line-height: 1.06; color: #FBF8F3; }
.hero p { color: #C9D5E5; }
.hero--short .hero-inner { padding-block: 3rem; }
@media (min-width: 1024px) { .hero--short .hero-inner { padding-block: 4rem; } }
.hero--short h1 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.hero-points { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .82rem; color: #D5DEEC; }
.hero-points li { display: flex; align-items: center; gap: .45rem; }
.hero-points svg { color: var(--sauge-300); flex-shrink: 0; }

/* ---------- Bandeau de réassurance ---------- */
.trust { background: var(--lin-100); border-bottom: 1px solid var(--lin-200); }
.trust-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; padding-block: 1.35rem; }
@media (min-width: 640px) { .trust-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; gap: .6rem; align-items: flex-start; font-size: .82rem; line-height: 1.45; color: var(--muted); }
.trust-item strong { display: block; color: var(--encre); font-size: .86rem; margin-bottom: .1rem; }

/* ---------- Corps d'article ---------- */
.prose { max-width: 46rem; }
.prose > * + * { margin-top: 1.05rem; }
.prose p, .prose li { font-size: 1rem; line-height: 1.75; color: #2C3A52; }
.prose h2 { font-size: 1.55rem; line-height: 1.25; margin-top: 2.4rem; color: var(--encre); }
.prose h3 { font-size: 1.16rem; line-height: 1.35; margin-top: 1.8rem; color: var(--nuit-700); }
.prose ul { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.prose ul > li { position: relative; padding-left: 1.4rem; }
.prose ul > li::before {
  content: ''; position: absolute; left: .1rem; top: .62rem;
  width: .42rem; height: .42rem; border-radius: 999px; background: var(--sauge-500);
}
.prose ol { list-style: decimal; padding-left: 1.4rem; display: flex; flex-direction: column; gap: .5rem; }
.prose ol > li { padding-left: .3rem; }
.prose ol > li::marker { color: var(--sauge-700); font-weight: 700; }
.prose a { color: var(--nuit-700); text-decoration: underline; text-decoration-color: var(--sauge-300); text-underline-offset: 3px; }
.prose a:hover { color: var(--sauge-700); }
.prose strong { color: var(--encre); font-weight: 650; }

/* ---------- Encadrés ---------- */
.note {
  background: var(--sauge-100); border-left: 3px solid var(--sauge-500);
  border-radius: 0 .75rem .75rem 0; padding: 1.1rem 1.25rem;
}
.note p { font-size: .94rem; line-height: 1.65; color: #35483D; }
.note-title { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; color: var(--sauge-700); margin-bottom: .35rem; }
.warn { background: #FBEDE6; border-left: 3px solid var(--terre-500); border-radius: 0 .75rem .75rem 0; padding: 1.1rem 1.25rem; }
.warn p { font-size: .94rem; line-height: 1.65; color: #6E3D2B; }

/* ---------- Tableaux ---------- */
.table-box { overflow-x: auto; border: 1px solid var(--lin-200); border-radius: .9rem; background: #fff; }
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 34rem; }
table.data caption { caption-side: top; text-align: left; padding: .95rem 1.1rem; font-size: .82rem; color: var(--muted); }
table.data th, table.data td { padding: .7rem 1.1rem; text-align: left; border-bottom: 1px solid var(--lin-100); vertical-align: top; }
table.data thead th { background: var(--lin-100); font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--nuit-700); font-weight: 700; }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ---------- Fil d'ariane ---------- */
.breadcrumb { font-size: .78rem; color: var(--muted); }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; list-style: none; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--sauge-700); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb [aria-current="page"] { color: var(--encre); font-weight: 600; }

/* ---------- Sommaire ---------- */
.toc { background: #fff; border: 1px solid var(--lin-200); border-radius: .9rem; padding: 1.2rem 1.35rem; }
.toc-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--sauge-700); margin-bottom: .6rem; }
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: .35rem; }
.toc li { counter-increment: toc; font-size: .88rem; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--sauge-500); font-weight: 700; margin-right: .55rem; font-size: .78rem; }
.toc a { color: var(--encre); }
.toc a:hover { color: var(--sauge-700); }

/* ---------- FAQ / accordéons ---------- */
.acc { border-bottom: 1px solid var(--lin-200); }
.acc-trigger {
  display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.05rem 0; text-align: left; font-weight: 600; font-size: .98rem; color: var(--encre);
}
.acc-trigger:hover { color: var(--sauge-700); }
.acc-trigger .chev { flex-shrink: 0; transition: transform .2s ease; color: var(--sauge-500); }
.acc-trigger[aria-expanded="true"] .chev { transform: rotate(45deg); }
.acc-panel { padding: 0 0 1.15rem; }
.acc-panel p { font-size: .94rem; line-height: 1.7; color: #2C3A52; }
.acc-panel p + p { margin-top: .6rem; }

/* ---------- Formulaire ---------- */
.field { display: flex; flex-direction: column; gap: .35rem; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .02em; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--nuit-200); border-radius: .55rem;
  padding: .7rem .85rem; font-size: .92rem; background: #fff; color: var(--encre);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--sauge-500); outline: 2px solid var(--sauge-100); }

/* ---------- Révélation au scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* ---------- Pied de page ---------- */
.site-footer { background: var(--nuit-900); color: #C4CFDF; }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3.5rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .17em; color: var(--sauge-300); font-family: inherit; font-weight: 700; margin-bottom: .85rem; }
.footer-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; font-size: .87rem; }
.footer-list a { color: #C4CFDF; }
.footer-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.footer-legal { border-top: 1px solid rgba(255, 255, 255, .13); padding-block: 1.35rem; display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; font-size: .78rem; color: #93A2B8; }
.footer-legal ul { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; list-style: none; }
.footer-legal a { color: #93A2B8; }
.footer-legal a:hover { color: #fff; }
