/* ==========================================================================
   formerguy.com - feuille de style unique
   Mobile d'abord (base 360px), puis min-width: 480 / 768 / 1024.
   Thème clair uniquement : couleurs de texte et de fond toujours explicites.
   ========================================================================== */

:root {
  color-scheme: only light;

  --navy: #12305a;
  --navy-deep: #0d2447;
  --ink: #161616;
  --text: #262626;
  --muted: #5b6068;
  --paper: #ffffff;

  --strip: #eeeeee;
  --strip-ink: #555555;
  --line: #e1e1dc;

  --tint-grey: #f4f4f2;
  --tint-sand: #f7f1e6;
  --tint-green: #edf7ef;
  --tint-blue: #f1f4f8;

  --green: #1a7f3c;
  --green-dark: #146630;
  --green-ink: #0f4a24;
  --green-line: #3a9d5d;
  --mint: #b9f6c4;
  --mint-ink: #10381d;

  --focus: #1a5fd0;

  --radius: 8px;
  --col: 684px;
  --pad: 16px;
  --font: "Helvetica Neue", Helvetica, Arial, "Liberation Sans", sans-serif;

  --section-gap: 2.5rem;
  --band-pad: 2.5rem;
}

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

html {
  background-color: #ffffff;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "masthead"
    "main"
    "footer";
  min-height: 100vh;
  background-color: #ffffff;
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

body > * {
  min-width: 0;
}

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

img,
video {
  height: auto;
}

a {
  color: var(--navy);
  text-underline-offset: 3px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

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

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --------------------------------------------------------------------------
   Barre de lecture (décor, pilotée par assets/js/main.js)
   -------------------------------------------------------------------------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  background-color: transparent;
  pointer-events: none;
}

.reading-progress span {
  display: block;
  height: 100%;
  width: 100%;
  background-color: var(--green);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --------------------------------------------------------------------------
   Masthead : bandeau marine, nom de domaine, bandeau gris "Publireportage"
   -------------------------------------------------------------------------- */
.masthead {
  grid-area: masthead;
  background-color: #ffffff;
  color: var(--ink);
}

.masthead__bar {
  background-color: var(--navy);
  color: #ffffff;
  padding: 14px var(--pad) 13px;
}

.brand {
  display: inline-block;
  padding: 2px 0;
  color: #ffffff;
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
}

.brand:hover {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.masthead a:focus-visible {
  outline-color: #ffffff;
}

.brand__tag {
  margin: 3px 0 0;
  color: #d3dcea;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
}

.label-strip {
  margin: 0;
  padding: 6px var(--pad);
  background-color: var(--strip);
  color: var(--strip-ink);
  border-bottom: 1px solid #e0e0e0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Colonne éditoriale
   -------------------------------------------------------------------------- */
.article,
.legal {
  grid-area: main;
  background-color: #ffffff;
  color: var(--text);
}

.wrap {
  width: 100%;
  max-width: calc(var(--col) + (var(--pad) * 2));
  margin-inline: auto;
  padding-inline: var(--pad);
}

.wrap--wide {
  max-width: calc(1000px + (var(--pad) * 2));
}

/* --------------------------------------------------------------------------
   En-tête d'article : badges, signature, titre, chapeau, photo d'ouverture
   -------------------------------------------------------------------------- */
.post-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "tags"
    "byline"
    "title"
    "dek"
    "hero";
  padding-top: 22px;
}

.tag-row {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 7px 10px;
  background-color: var(--mint);
  color: var(--mint-ink);
  border-radius: 4px;
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.1;
}

.byline {
  grid-area: byline;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.headline {
  grid-area: title;
  margin: 0 0 14px;
  color: var(--ink);
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem);
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
}

.dek {
  grid-area: dek;
  margin: 0 0 22px;
  color: #222222;
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.3125rem);
  font-weight: 700;
  line-height: 1.55;
}

.hero {
  grid-area: hero;
  margin: 0;
}

/* --------------------------------------------------------------------------
   Médias : photos, boucle vidéo, légendes
   -------------------------------------------------------------------------- */
.media {
  margin: 1.75rem 0 1.75rem;
}

.media--hero {
  margin-top: 0;
  margin-bottom: 0;
}

.media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: #2a2a2a;
}

.media--hero img {
  aspect-ratio: 4 / 3;
}

.media--wide img {
  aspect-ratio: 16 / 9;
}

.media figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.video-frame {
  width: 100%;
  aspect-ratio: 1200 / 630;
  overflow: hidden;
  border-radius: var(--radius);
  background-color: #1b1b1b;
}

.video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background-color: #1b1b1b;
}

/* --------------------------------------------------------------------------
   Texte courant
   -------------------------------------------------------------------------- */
.prose {
  padding-top: 1.5rem;
  padding-bottom: 0.5rem;
}

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

.prose h2,
.legal h2,
.band h2,
.closing h2 {
  margin: var(--section-gap) 0 0.6em;
  color: var(--ink);
  font-size: clamp(1.375rem, 1.1rem + 1.1vw, 1.75rem);
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.005em;
}

.prose > h2:first-child,
.band h2:first-child {
  margin-top: 0;
}

.prose h3,
.legal h3 {
  margin: 1.6em 0 0.4em;
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
}

.pull {
  margin: 1.6em 0;
  padding: 2px 0 2px 16px;
  border-left: 4px solid var(--navy);
  color: var(--ink);
  font-size: clamp(1.1875rem, 1.05rem + 0.7vw, 1.4375rem);
  font-weight: 700;
  line-height: 1.4;
}

.prose .pull {
  margin: 1.6em 0;
}

/* --------------------------------------------------------------------------
   Tuiles "ce que l'on fait" (proportions de grille de l'accent)
   -------------------------------------------------------------------------- */
.task-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin: 1.4rem 0 1.6rem;
  padding: 0;
  list-style: none;
}

.task {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon text";
  column-gap: 14px;
  align-content: start;
  padding: 18px;
  background-color: var(--tint-sand);
  color: var(--text);
  border-radius: var(--radius);
}

.task__icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  background-color: #ffffff;
  color: var(--navy);
  border-radius: 50%;
}

.task__icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.task__title {
  grid-area: title;
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.task__text {
  grid-area: text;
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.5;
}

.prose .task__text {
  margin: 0;
}

.prose .task__title {
  margin: 0 0 4px;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------------------
   Appel à l'action : bouton vert pleine colonne + note de redirection
   -------------------------------------------------------------------------- */
.cta-block {
  margin: 1.9rem 0 0.4rem;
  text-align: center;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 14px 18px;
  background-color: var(--green);
  color: #ffffff;
  border-radius: 6px;
  box-shadow: 0 2px 0 var(--green-dark), 0 8px 16px rgba(26, 127, 60, 0.22);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn::after {
  content: "\00a0\00bb";
}

.btn:hover {
  background-color: var(--green-dark);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 0 #0f4f26, 0 10px 18px rgba(26, 127, 60, 0.28);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 0 var(--green-dark);
}

.btn-note {
  max-width: 36em;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.prose .btn-note {
  margin: 10px auto 0;
}

/* --------------------------------------------------------------------------
   Étapes numérotées
   -------------------------------------------------------------------------- */
.steps {
  counter-reset: step;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.step {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-areas:
    "num title"
    "num text";
  column-gap: 14px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step::before {
  counter-increment: step;
  content: counter(step);
  grid-area: num;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background-color: var(--navy);
  color: #ffffff;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
}

.step__title {
  grid-area: title;
  margin: 0 0 2px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

.prose .step__title {
  margin: 0 0 2px;
  font-size: 1.0625rem;
}

.step__text {
  grid-area: text;
  margin: 0;
  font-size: 0.96875rem;
  line-height: 1.5;
}

.prose .step__text {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Liste à cocher (bloc vert clair, comme la fiche "gagnante" de la référence)
   -------------------------------------------------------------------------- */
.checklist {
  margin: 1.6rem 0;
  padding: 18px 18px 8px;
  background-color: var(--tint-green);
  color: var(--text);
  border: 2px solid var(--green-line);
  border-radius: var(--radius);
}

.prose .checklist h3,
.checklist__title {
  margin: 0 0 10px;
  color: var(--green-ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.3;
}

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

.checklist li {
  position: relative;
  margin: 0 0 12px;
  padding-left: 32px;
  font-size: 1rem;
  line-height: 1.5;
}

.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2px;
  width: 20px;
  height: 20px;
  background-color: var(--green);
  border-radius: 4px;
}

.checklist li::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 6px;
  width: 8px;
  height: 4px;
  border-left: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  transform: rotate(-45deg);
}

/* Liste simple "les limites" */
.plain-list {
  margin: 1.2rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.plain-list li {
  position: relative;
  margin: 0 0 0.8em;
  padding-left: 22px;
}

.plain-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.72em;
  width: 10px;
  height: 2px;
  background-color: var(--navy);
}

/* --------------------------------------------------------------------------
   Bandes pleine largeur : fond alterné
   -------------------------------------------------------------------------- */
.band {
  margin-top: var(--section-gap);
  padding: var(--band-pad) 0;
  background-color: var(--tint-blue);
  color: var(--text);
}

.band p {
  margin: 0 0 1.1em;
}

.compare {
  display: block;
  width: 100%;
  margin: 1.2rem 0 0;
  border-collapse: collapse;
  background-color: transparent;
  color: var(--text);
}

.compare thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.compare tbody {
  display: block;
}

.compare tr {
  display: block;
  margin: 0 0 10px;
  padding: 14px 16px;
  background-color: #ffffff;
  color: var(--text);
  border-radius: var(--radius);
}

.compare th,
.compare td {
  display: block;
  padding: 0;
  text-align: left;
  vertical-align: top;
}

.compare tbody th {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
}

.compare td {
  font-size: 1rem;
  line-height: 1.5;
}

.compare th::before,
.compare td::before {
  content: attr(data-label);
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compare td::before {
  color: var(--green-ink);
}

/* --------------------------------------------------------------------------
   Bande finale marine : dernier appel à l'action
   -------------------------------------------------------------------------- */
.closing {
  margin-top: var(--section-gap);
  padding: 2.5rem 0 3rem;
  background-color: var(--navy);
  color: #ffffff;
}

.closing__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "media"
    "text";
  gap: 1.5rem;
}

.closing__media {
  grid-area: media;
  margin: 0;
}

.closing__media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius);
  background-color: #0b1d3a;
}

.closing__media figcaption {
  margin-top: 8px;
  color: #c9d5e6;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.closing__text {
  grid-area: text;
}

.closing h2 {
  margin: 0 0 0.6em;
  color: #ffffff;
}

.closing p {
  margin: 0 0 1.1em;
  color: #e6ecf5;
}

.closing .btn-note {
  margin: 10px auto 0;
  color: #c9d5e6;
}

.closing a:focus-visible {
  outline-color: #ffffff;
}

/* --------------------------------------------------------------------------
   Pages légales et "à propos"
   -------------------------------------------------------------------------- */
.legal {
  padding: 28px 0 24px;
}

.legal-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(1.75rem, 1.35rem + 1.8vw, 2.375rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.policy-dates {
  margin: 0 0 1.6rem;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.legal .lede {
  margin: 0 0 1.4rem;
  color: #222222;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1.5;
}

.legal p,
.legal ul {
  margin: 0 0 1.1em;
}

.legal ul {
  padding-left: 1.2em;
}

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

.legal h2 {
  margin-top: 2.2rem;
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.5rem);
}

.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.5rem;
  color: var(--navy);
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   Pied de page : mentions de l'éditeur (une seule fois, sans cadre)
   -------------------------------------------------------------------------- */
.page-end {
  grid-area: footer;
  padding: 3rem 0 2.5rem;
  background-color: #ffffff;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

.page-end__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "publisher"
    "nav"
    "note";
  gap: 1.25rem;
}

.publisher {
  grid-area: publisher;
  color: var(--muted);
}

.publisher p {
  margin: 0;
}

.publisher strong {
  color: #3a3f48;
}

.nav_legal {
  grid-area: nav;
}

.nav_legal ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav_legal a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #3a3f48;
  text-decoration: underline;
}

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

.about_line {
  grid-area: note;
  margin: 0;
  color: var(--muted);
}

/* ==========================================================================
   >= 480px
   ========================================================================== */
@media (min-width: 480px) {
  .tag {
    font-size: 0.875rem;
    padding: 8px 11px;
  }

  .btn {
    font-size: 1.0625rem;
    padding: 15px 22px;
  }

  .task {
    padding: 20px;
  }

  .checklist {
    padding: 20px 22px 10px;
  }
}

/* ==========================================================================
   >= 768px
   ========================================================================== */
@media (min-width: 768px) {
  :root {
    --section-gap: 3.5rem;
    --band-pad: 4rem;
    --pad: 24px;
  }

  body {
    font-size: 1.125rem;
  }

  .masthead__bar {
    padding: 16px var(--pad) 15px;
  }

  .brand {
    font-size: 1.5rem;
  }

  .brand__tag {
    font-size: 0.875rem;
  }

  .post-head {
    padding-top: 30px;
  }

  .media--hero img {
    aspect-ratio: 3 / 2;
  }

  .media figcaption {
    font-size: 0.875rem;
  }

  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .step {
    padding: 20px 0;
  }

  .compare {
    display: table;
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  .compare thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
  }

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

  .compare tr {
    display: table-row;
    margin: 0;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
  }

  .compare th,
  .compare td {
    display: table-cell;
    padding: 16px 20px;
  }

  .compare thead th {
    padding: 0 20px 4px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
  }

  .compare tbody th {
    width: 36%;
    margin: 0;
    background-color: #ffffff;
    border-radius: var(--radius) 0 0 var(--radius);
  }

  .compare tbody td {
    background-color: #ffffff;
    border-radius: 0 var(--radius) var(--radius) 0;
  }

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

  .closing {
    padding: 4rem 0;
  }

  .closing__inner {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    grid-template-areas: "media text";
    align-items: center;
    gap: 2.5rem;
  }

  .page-end__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "publisher nav"
      "note note";
    gap: 1.5rem 2rem;
  }
}

/* ==========================================================================
   >= 1024px
   ========================================================================== */
@media (min-width: 1024px) {
  .masthead__bar {
    padding-inline: 24px;
  }

  .brand {
    font-size: 1.625rem;
  }

  .post-head {
    padding-top: 36px;
  }

  .prose {
    padding-top: 2rem;
  }

  .closing__inner {
    gap: 3.5rem;
  }

  .closing h2 {
    font-size: 1.875rem;
  }
}

/* Mouvement réduit */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
