/* ==========================================================================
   Practical Review Weekly - feuille de style unique
   Mobile d'abord : base 360px, puis 480 / 768 / 1024 en min-width.
   Nommage BEM. Palette en propriétés personnalisées.
   ========================================================================== */

:root {
  --ink: #0d0b2b;
  --text: #1f2433;
  --muted: #565d70;
  --link: #0b3fae;
  --blue: #1747d1;
  --blue-dark: #0f2f9c;
  --hl: #4f86ff;
  --tint: #f3f5fb;
  --line: #e1e5ef;
  --night: #0f1424;
  --night-line: #262e47;
  --night-muted: #a3aecb;
  --white: #fff;

  --font-head: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
  --font-body: "Open Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, "Liberation Sans", sans-serif;

  --fs-body: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --radius: 6px;
  --radius-lg: 14px;
  --shadow: 0 8px 24px rgba(13, 11, 43, 0.12);

  --col: 852px;
  --gutter: 16px;
}

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

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

body {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.75;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

body > * {
  min-width: 0;
}

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

img,
video {
  display: block;
  height: auto;
}

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

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

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

h1,
h2,
h3 {
  font-family: var(--font-head);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  padding: 12px 16px;
  background: var(--white);
  color: var(--ink);
  font: 600 1rem/1.2 var(--font-head);
}

.skip-link:focus {
  left: 16px;
}

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

/* --------------------------------------------------------------------------
   Barre de lecture
   -------------------------------------------------------------------------- */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: 3px;
  pointer-events: none;
}

.progress__bar {
  display: block;
  height: 100%;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

/* --------------------------------------------------------------------------
   Masthead
   -------------------------------------------------------------------------- */
.masthead {
  position: relative;
  z-index: 10;
  background: var(--white);
  box-shadow: 0 6px 16px rgba(13, 11, 43, 0.08);
}

.masthead__bar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 14px var(--gutter);
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.masthead__label {
  margin: 0;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 700 0.75rem/1.5 var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.logo {
  display: inline-flex;
  align-items: stretch;
  font: italic 800 clamp(1rem, 4.6vw, 1.5rem) / 1 var(--font-head);
  letter-spacing: -0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo__a {
  padding: 0.3em 0.32em 0.3em 0;
  color: var(--ink);
}

.logo__b {
  padding: 0.3em 0.55em 0.3em 0.5em;
  background: var(--blue);
  color: var(--white);
  clip-path: polygon(7% 0, 100% 0, 93% 100%, 0 100%);
}

/* --------------------------------------------------------------------------
   En-tête d'article
   -------------------------------------------------------------------------- */
.article {
  min-width: 0;
}

.article__header {
  padding-top: 22px;
}

.article__eyebrow {
  margin: 0 0 10px;
  font: 600 0.875rem/1.4 var(--font-body);
  color: var(--ink);
}

.article__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.75rem, 1.2rem + 2.6vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.article__dek {
  margin: 18px 0 0;
  font-size: clamp(1.125rem, 1rem + 0.55vw, 1.375rem);
  line-height: 1.5;
  color: #333a4d;
}

/* --------------------------------------------------------------------------
   Médias
   -------------------------------------------------------------------------- */
.media {
  margin: 32px 0;
}

.media--hero {
  margin: 26px 0 0;
}

.media__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius);
  background: #cfd5e4;
}

.media__frame > img,
.media__frame > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media--hero .media__frame {
  aspect-ratio: 16 / 10;
}

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

.media--aside .media__frame > img {
  object-position: 62% 50%;
}

.media--wide .media__frame > img {
  object-position: 50% 62%;
}

.media__caption {
  margin: 10px 0 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Signature de l'article et pastilles
   -------------------------------------------------------------------------- */
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 24px;
  margin-top: 20px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--ink);
}

.byline__author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.byline__avatar {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font: 700 0.6875rem/1 var(--font-head);
  letter-spacing: 0.02em;
}

.byline__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin: 0;
}

.byline__check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  border-bottom: 1px dotted currentColor;
}

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

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.badges__item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 6px 13px 6px 10px;
  border-radius: 999px;
  background: var(--night);
  color: var(--white);
  font: 500 0.8125rem/1.3 var(--font-body);
}

.badges__icon {
  flex: none;
  width: 16px;
  height: 16px;
  color: var(--hl);
}

/* --------------------------------------------------------------------------
   Corps de l'article
   -------------------------------------------------------------------------- */
.article__body {
  margin-top: clamp(32px, 5vw, 52px);
}

:where(.prose) p {
  margin: 0 0 1.15em;
}

:where(.prose) strong {
  font-weight: 700;
  color: var(--ink);
}

:where(.prose) a {
  font-weight: 600;
}

.lede {
  font-size: clamp(1.1875rem, 1.05rem + 0.5vw, 1.3125rem);
  line-height: 1.65;
  color: var(--ink);
}

.chapter {
  display: flow-root;
  margin-top: clamp(44px, 7vw, 72px);
}

.chapter__title {
  margin: 0 0 18px;
  font-weight: 800;
  font-size: clamp(1.4375rem, 1.15rem + 1.25vw, 2rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.chapter__num {
  color: var(--blue);
}

.checklist,
.plain-list {
  margin: 0 0 1.4em;
  padding: 0;
  list-style: none;
}

.checklist__item {
  position: relative;
  margin: 0 0 0.7em;
  padding-left: 38px;
}

.checklist__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.38em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--blue);
}

.checklist__item::after {
  content: "";
  position: absolute;
  left: 6px;
  top: calc(0.38em + 6px);
  width: 12px;
  height: 7px;
  border-left: 3px solid var(--white);
  border-bottom: 3px solid var(--white);
  transform: rotate(-45deg);
}

.plain-list__item {
  position: relative;
  margin: 0 0 0.85em;
  padding-left: 22px;
}

.plain-list__item::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.78em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--blue);
}

/* Etapes numérotées */
.steps {
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps__item {
  position: relative;
  counter-increment: step;
  padding: 20px 0 20px 56px;
  border-top: 1px solid var(--line);
}

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

.steps__item::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 22px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  font: 800 1rem/1 var(--font-head);
}

.steps__title {
  display: block;
  margin-bottom: 4px;
  font: 700 1.125rem/1.35 var(--font-head);
  color: var(--ink);
}

.steps__text {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Appels à l'action
   -------------------------------------------------------------------------- */
.cta {
  margin: 30px 0 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 14px 26px;
  border-radius: 10px;
  background: var(--blue);
  color: var(--white);
  font: 700 1.0625rem/1.3 var(--font-head);
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(23, 71, 209, 0.28);
  transition: background-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(23, 71, 209, 0.34);
}

.btn__arrow {
  flex: none;
  width: 20px;
  height: 20px;
  transition: transform 0.18s ease;
}

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

.cta-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  font: 700 1.0625rem/1.4 var(--font-head);
  color: var(--link);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.cta-link__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  transition: transform 0.18s ease;
}

.cta-link:hover .cta-link__arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   Bandeau de clôture + tableau récapitulatif
   -------------------------------------------------------------------------- */
.band {
  margin-top: clamp(56px, 8vw, 96px);
  padding: clamp(40px, 6vw, 72px) 0;
  background: var(--tint);
}

.band .chapter {
  margin-top: 0;
}

.facts {
  margin: 28px 0 0;
  border-radius: var(--radius-lg);
  background: var(--night);
  color: var(--white);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.facts__table {
  width: 100%;
  border-collapse: collapse;
}

.facts__table,
.facts__body,
.facts__row,
.facts__head,
.facts__cell,
.facts__caption {
  display: block;
}

.facts__caption {
  padding: 20px 20px 8px;
  font: 700 0.8125rem/1.3 var(--font-head);
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  color: #8fb0ff;
}

.facts__row {
  padding: 14px 20px 16px;
  border-top: 1px solid var(--night-line);
}

.facts__row:first-child {
  margin-top: 8px;
}

.facts__head {
  font: 600 0.8125rem/1.4 var(--font-head);
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  color: var(--night-muted);
}

.facts__cell {
  margin: 4px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--white);
}

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

.legal__back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.legal__eyebrow {
  margin: 8px 0 10px;
  font: 600 0.875rem/1.4 var(--font-body);
  color: var(--ink);
}

.legal__title {
  margin: 0;
  font-weight: 800;
  font-size: clamp(1.75rem, 1.3rem + 2.2vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.legal__updated {
  margin: 14px 0 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.legal__body {
  margin-top: clamp(28px, 4vw, 44px);
}

.legal__heading {
  margin: clamp(32px, 5vw, 48px) 0 12px;
  font-weight: 800;
  font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.625rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.legal__list {
  margin: 0 0 1.3em;
  padding-left: 1.3em;
}

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

.legal__list li::marker {
  color: var(--blue);
}

/* --------------------------------------------------------------------------
   Pied de page (imprimeur de la publication)
   -------------------------------------------------------------------------- */
.page-end {
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: calc(var(--col) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(48px, 7vw, 80px) var(--gutter) 56px;
  font-size: 0.8125rem;
  line-height: 1.65;
  color: var(--muted);
}

.page-end .address p {
  margin: 0;
}

.page-end .address p:first-child {
  font-weight: 700;
  color: var(--ink);
}

.page-end .meta_links {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 0 20px;
}

.page-end .meta_links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: rgba(86, 93, 112, 0.45);
}

.page-end .meta_links a:hover {
  color: var(--ink);
  text-decoration-color: currentColor;
}

.page-end .page_credit {
  max-width: 70ch;
  margin: 0;
}

/* --------------------------------------------------------------------------
   480px
   -------------------------------------------------------------------------- */
@media (min-width: 480px) {
  :root {
    --gutter: 20px;
  }

  .btn {
    width: auto;
    min-width: 280px;
  }

  .media--hero .media__frame {
    aspect-ratio: 2 / 1;
  }

  .badges__item {
    gap: 8px;
    padding: 6px 15px 6px 12px;
    font-size: 0.9375rem;
  }
}

/* --------------------------------------------------------------------------
   768px
   -------------------------------------------------------------------------- */
@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }

  .masthead__bar {
    justify-content: center;
    min-height: 84px;
    padding-block: 18px;
  }

  .masthead__label {
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
  }

  .article__header {
    padding-top: 28px;
  }

  .media--hero .media__frame {
    aspect-ratio: 852 / 380;
  }

  .media--aside {
    float: right;
    width: min(46%, 380px);
    margin: 8px 0 20px 32px;
  }

  .media--aside .media__frame {
    aspect-ratio: 1 / 1;
  }

  .media--wide .media__frame {
    aspect-ratio: 2 / 1;
  }

  .steps__item {
    padding: 24px 0 24px 72px;
  }

  .steps__item::before {
    top: 26px;
    width: 44px;
    height: 44px;
    font-size: 1.125rem;
  }

  .steps__title {
    font-size: 1.1875rem;
  }

  .facts__table {
    display: table;
  }

  .facts__body {
    display: table-row-group;
  }

  .facts__row {
    display: table-row;
    padding: 0;
  }

  .facts__row:first-child {
    margin-top: 0;
  }

  .facts__head,
  .facts__cell {
    display: table-cell;
    margin: 0;
    padding: 18px 24px;
    border-top: 1px solid var(--night-line);
    vertical-align: baseline;
  }

  .facts__head {
    width: 32%;
  }

  .facts__row {
    border-top: 0;
  }

  .facts__caption {
    display: table-caption;
    padding: 24px 24px 12px;
  }

  .page-end {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 40px;
  }

  .page-end .page_credit {
    grid-column: 1 / -1;
  }
}

/* --------------------------------------------------------------------------
   1024px
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) {
  :root {
    --gutter: 32px;
  }

  .article__eyebrow {
    margin-bottom: 14px;
  }

  .article__dek {
    margin-top: 22px;
  }

  .media--hero {
    margin-top: 34px;
  }

  .byline {
    margin-top: 24px;
  }

  .badges {
    margin-top: 26px;
  }

  .cta {
    margin-top: 38px;
  }

  .btn {
    min-height: 58px;
    padding-inline: 34px;
    font-size: 1.125rem;
  }

  .media--wide .media__frame {
    aspect-ratio: 852 / 400;
  }
}

/* --------------------------------------------------------------------------
   Préférences de mouvement
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
