/* ==========================================================================
   Honest Herald - feuille de style unique
   Mobile d'abord (360px), puis 480 / 768 / 1024 en min-width.
   Direction artistique : carte blanche centrée sur fond blanc, titre noir
   en sans-serif gras centré, texte léger très aéré, pastille verte
   fluo, cartes crème, boutons noirs rectangulaires en capitales.
   ========================================================================== */

:root {
  --ink: #1b1b1d;
  --ink-2: #44444a;
  --muted: #66666d;
  --line: #e4e4e1;
  --paper: #ffffff;
  --lime: #a4ff9f;
  --green: #1f6b3a;
  --cream: #fdf4cd;
  --cream-line: #ecdc9a;
  --cream-ink: #2b2713;
  --navy: #16244b;
  --navy-line: #d6dae8;
  --navy-tint: #f4f6fb;
  --black: #0f0f10;

  --font-head: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-brand: "Playfair Display", Georgia, "Times New Roman", serif;

  --pad: clamp(16px, 5vw, 40px);
  --radius: 3px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: clamp(1.0625rem, 1.02rem + 0.15vw, 1.125rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
video,
svg {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

a {
  color: inherit;
}

strong,
b {
  font-weight: 700;
}

[v-cloak] {
  display: none !important;
}

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--black);
  color: #fff;
  font: 700 0.9rem/1.2 var(--font-head);
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}

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

/* ---------- Carte de page ---------- */

.page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  background: var(--paper);
}

@media (min-width: 880px) {
  body {
    padding: 24px 0 56px;
  }

  .page {
    box-shadow: 0 0 22px rgba(0, 0, 0, 0.16);
  }
}

/* ---------- Progression de lecture et retour en haut (petite-vue) ---------- */

.read-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 4px;
  z-index: 60;
  pointer-events: none;
}

.read-progress__bar {
  display: block;
  height: 100%;
  width: 0;
  background: var(--green);
  transition: width 0.12s linear;
}

.to-top {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 55;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--black);
  color: #fff;
  border-radius: 50%;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.to-top:hover {
  background: var(--lime);
  color: var(--black);
  transform: translateY(-2px);
}

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

/* ---------- Masthead ---------- */

.masthead {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand label"
    "tag tag";
  align-items: center;
  gap: 12px;
  padding: 16px var(--pad) 6px;
}

.brand {
  grid-area: brand;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  justify-self: start;
}

.brand__mark {
  flex: none;
  width: 46px;
  height: 46px;
}

.brand__text {
  display: flex;
  flex-direction: column;
}

.brand__name {
  font-family: var(--font-brand);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
  line-height: 1;
  transition: color 0.2s ease;
}

.brand:hover .brand__name {
  color: var(--green);
}

.brand__sub {
  margin-top: 6px;
  font: 600 0.625rem/1 var(--font-head);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.masthead__label {
  grid-area: label;
  align-self: start;
  margin: 8px 0 0;
  font: 400 0.8125rem/1 var(--font-body);
  color: var(--muted);
  text-align: right;
}

.masthead__link {
  grid-area: label;
  align-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 2px;
  font: 600 0.875rem/1.2 var(--font-head);
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--lime);
  text-decoration-thickness: 3px;
  transition: text-decoration-color 0.2s ease;
}

.masthead__link:hover {
  text-decoration-color: var(--green);
}

.topic-tag {
  grid-area: tag;
  justify-self: start;
  margin: 0;
  padding: 5px 10px;
  background: var(--lime);
  color: var(--black);
  border-radius: 4px;
  font: 700 clamp(0.9rem, 0.82rem + 0.3vw, 1.0625rem) / 1.35 var(--font-body);
}

.masthead.masthead--simple {
  grid-template-areas: "brand label";
}

@media (min-width: 768px) {
  .masthead {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "brand label"
      "brand tag";
    row-gap: 14px;
    padding-top: 30px;
  }

  .masthead__label {
    justify-self: end;
    margin-top: 0;
  }

  .topic-tag {
    justify-self: end;
    align-self: start;
  }

  .masthead__link {
    justify-self: end;
  }

  .masthead.masthead--simple {
    grid-template-areas: "brand label";
    padding-top: 22px;
  }
}

/* ---------- Tête d'article ---------- */

.article {
  padding: 0 var(--pad);
}

.article__head {
  padding: clamp(26px, 5vw, 48px) 0 clamp(22px, 3.5vw, 34px);
  text-align: center;
}

.article__title {
  margin: 0 0 0.55em;
  color: #222;
  font: 700 clamp(1.75rem, 1.1rem + 2.4vw, 2.5rem) / 1.16 var(--font-head);
  letter-spacing: -0.018em;
  text-wrap: balance;
}

.article__dek {
  max-width: 34em;
  margin: 0 auto 1em;
  color: var(--ink-2);
  font: 400 clamp(1.0625rem, 1rem + 0.35vw, 1.25rem) / 1.55 var(--font-body);
  text-wrap: pretty;
}

.byline {
  margin: 0;
  color: var(--muted);
  font: 400 0.8125rem/1.5 var(--font-body);
}

/* ---------- Médias ---------- */

.figure {
  margin: 2.4em 0;
}

.figure--hero {
  margin: 0 0 clamp(30px, 5vw, 52px);
}

.figure--inset {
  max-width: 560px;
  margin-inline: auto;
}

.figure img {
  width: 100%;
}

.figure--wide img {
  aspect-ratio: 2 / 1;
  object-fit: cover;
}

.figure figcaption {
  max-width: 34em;
  margin: 0.8em auto 0;
  color: var(--muted);
  font: 400 0.8125rem/1.5 var(--font-body);
  text-align: center;
}

.media {
  position: relative;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  background: #1a1a1c;
}

.media video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Texte courant ---------- */

.prose p {
  margin: 0 0 1.4em;
}

.prose .lead {
  font-size: 1.14em;
  line-height: 1.6;
  color: var(--ink);
}

.prose h2 {
  margin: 2.5em 0 0.8em;
  color: var(--black);
  font: 700 clamp(1.4rem, 1.2rem + 0.9vw, 1.75rem) / 1.22 var(--font-head);
  letter-spacing: -0.012em;
  text-wrap: balance;
}

.prose .kicker {
  width: fit-content;
  margin: 3.2em 0 0.9em;
  padding: 7px 11px;
  background: var(--lime);
  color: var(--black);
  border-radius: var(--radius);
  font: 700 0.75rem/1 var(--font-head);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.prose .kicker + h2 {
  margin-top: 0;
}

.prose ul {
  margin: 0 0 1.6em;
  padding-left: 1.4em;
}

.prose li {
  margin-bottom: 0.65em;
  padding-left: 0.2em;
}

.prose li::marker {
  color: var(--black);
}

/* Parcours numéroté */

.steps {
  margin: 1.8em 0 2em;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  margin: 0;
  padding: 0 0 1.2em 3.2em;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.15em;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  background: var(--black);
  color: var(--lime);
  border-radius: var(--radius);
  font: 800 1rem/1 var(--font-head);
}

.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 1.04rem;
  top: 2.5rem;
  bottom: 0.25em;
  width: 2px;
  background: var(--line);
}

/* Carte « bon réflexe » (forme carte citation : pastille + texte sur fond crème) */

.tip-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  margin: 1.9em 0;
  padding: 18px 16px;
  background: var(--cream);
  border: 1px solid var(--cream-line);
  color: var(--cream-ink);
}

.tip-card__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background: #fff;
  border: 1px solid var(--cream-line);
  border-radius: 50%;
  color: var(--green);
}

.tip-card__icon svg {
  width: 22px;
  height: 22px;
}

.tip-card__title {
  margin: 0 0 0.35em;
  font: 800 1rem/1.35 var(--font-head);
  color: var(--black);
}

.tip-card__text {
  margin: 0;
  font: 400 0.98rem/1.65 var(--font-body);
}

.prose .tip-card p {
  margin: 0;
}

.prose .tip-card .tip-card__title {
  margin-bottom: 0.35em;
}

@media (min-width: 768px) {
  .tip-card {
    grid-template-columns: 72px 1fr;
    gap: 22px;
    margin-inline: clamp(0px, 3vw, 28px);
    padding: 24px 26px;
  }

  .tip-card__icon {
    width: 64px;
    height: 64px;
  }

  .tip-card__icon svg {
    width: 30px;
    height: 30px;
  }

  .tip-card__text {
    font-size: 1.03rem;
  }
}

/* ---------- Boutons d'appel à l'action ---------- */

.cta-block {
  margin: 2.8em 0;
  text-align: center;
}

.cta-block::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  margin: 0 auto 1.3em;
  background: var(--black);
}

.cta-block__lead {
  margin: 0 0 1em;
  font: 700 clamp(1.15rem, 1.05rem + 0.5vw, 1.375rem) / 1.35 var(--font-head);
  text-wrap: balance;
}

.prose .cta-block__lead {
  margin-bottom: 1em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  width: 100%;
  min-height: 56px;
  padding: 0.95em 1.4em;
  background: var(--black);
  color: #fff;
  border: 2px solid var(--black);
  border-radius: 2px;
  font: 700 0.875rem/1.3 var(--font-head);
  letter-spacing: 0.07em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn::after {
  content: "\2192";
  flex: none;
  font-size: 1.15em;
  transition: transform 0.2s ease;
}

.btn:hover {
  background: var(--lime);
  color: var(--black);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
  transform: translateY(-2px);
}

.btn:hover::after {
  transform: translateX(4px);
}

.btn:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 4px;
}

@media (min-width: 480px) {
  .btn {
    width: auto;
    padding-inline: 2em;
  }
}

/* ---------- Tableau récapitulatif (style tableau de l'accent) ---------- */

.table-wrap {
  margin: 1.8em 0 2.2em;
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  font: 400 0.98rem/1.55 var(--font-body);
}

.compare caption {
  padding: 0 0 0.9em;
  text-align: left;
  font: 700 1.05rem/1.3 var(--font-head);
  color: var(--navy);
}

.compare thead {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.compare tbody,
.compare tr,
.compare th,
.compare td {
  display: block;
}

.compare tr {
  margin-bottom: 12px;
  border: 1px solid var(--navy-line);
}

.compare tbody th {
  padding: 11px 14px;
  background: var(--navy);
  color: #fff;
  text-align: left;
  font: 700 0.95rem/1.4 var(--font-head);
}

.compare td {
  padding: 12px 14px;
}

.compare td::before {
  content: "Le bon réflexe : ";
  font-weight: 700;
  color: var(--navy);
}

@media (min-width: 768px) {
  .compare thead {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    display: table-header-group;
  }

  .compare tbody {
    display: table-row-group;
  }

  .compare tr {
    display: table-row;
    margin: 0;
    border: 0;
  }

  .compare th,
  .compare td {
    display: table-cell;
  }

  .compare thead th {
    padding: 13px 18px;
    background: var(--navy);
    color: #fff;
    text-align: left;
    font: 700 0.78rem/1.3 var(--font-head);
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .compare tbody th,
  .compare td {
    padding: 15px 18px;
    border-bottom: 1px solid var(--navy-line);
    vertical-align: top;
  }

  .compare tbody th {
    width: 42%;
    background: transparent;
    color: var(--black);
    font-weight: 700;
    font-size: 0.98rem;
  }

  .compare tbody tr:nth-child(even) th,
  .compare tbody tr:nth-child(even) td {
    background: var(--navy-tint);
  }

  .compare td::before {
    content: none;
  }
}

/* ---------- Pied de page éditeur ---------- */

.page-footer {
  margin-top: clamp(40px, 7vw, 72px);
  padding: 0 var(--pad) clamp(28px, 5vw, 44px);
  color: var(--muted);
  font: 400 0.8125rem/1.65 var(--font-body);
}

.publisher p {
  margin: 0;
}

.publisher__name {
  color: var(--ink-2);
  font-weight: 700;
}

.nav_legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 14px 0 8px;
}

.nav_legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.nav_legal a:hover {
  color: var(--green);
}

.nav_legal a[aria-current="page"] {
  color: var(--black);
  font-weight: 600;
}

.end_line {
  max-width: 62em;
  margin: 6px 0 0;
}

/* ---------- Pages juridiques ---------- */

.legal {
  padding: clamp(22px, 5vw, 44px) var(--pad) 8px;
}

.legal h1 {
  margin: 0 0 0.35em;
  color: #222;
  font: 700 clamp(1.75rem, 1.3rem + 1.8vw, 2.25rem) / 1.18 var(--font-head);
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.legal__meta {
  margin: 0 0 2em;
  color: var(--muted);
  font: 400 0.8125rem/1.5 var(--font-body);
}

.legal h2 {
  margin: 2.1em 0 0.6em;
  color: var(--black);
  font: 700 clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem) / 1.3 var(--font-head);
}

.legal p,
.legal li {
  font-weight: 400;
}

.legal p {
  margin: 0 0 1.15em;
}

.legal ul {
  margin: 0 0 1.4em;
  padding-left: 1.4em;
}

.legal li {
  margin-bottom: 0.5em;
}

.legal address {
  margin: 0 0 1.4em;
  padding: 4px 0 4px 16px;
  border-left: 4px solid var(--lime);
  font-style: normal;
  font-weight: 400;
}

.legal a {
  text-underline-offset: 3px;
}

.legal a:hover {
  color: var(--green);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
