/* polices du site, servies localement */
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/fira-sans-latin-ext-400.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(assets/fonts/fira-sans-latin-400.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/fira-sans-latin-ext-700.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Fira Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(assets/fonts/fira-sans-latin-700.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: italic; font-weight: 400 800; font-display: swap; src: url(assets/fonts/source-sans-3-latin-ext-400-800-i.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: italic; font-weight: 400 800; font-display: swap; src: url(assets/fonts/source-sans-3-latin-400-800-i.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/source-sans-3-latin-ext-400-800.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Source Sans 3'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(assets/fonts/source-sans-3-latin-400-800.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bes-bg: #EDEFD9;
  --bes-surface: #F7F8EA;
  --bes-text: #2B1631;
  --bes-muted: #574260;
  --bes-accent: #5B2A63;
  --bes-accent2: #7C8A2B;
  --bes-on-accent: #F7F8EA;
  --bes-line: #C9CDA6;
  --bes-radius: 0.5rem;
  --bes-font-display: "Fira Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bes-font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bes-font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --bes-wrap: 72rem;
}

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

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

body {
  margin: 0;
  background: var(--bes-bg);
  color: var(--bes-text);
  font-family: var(--bes-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

a {
  color: var(--bes-accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--bes-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* En-tête */

.bes-header {
  background: var(--bes-surface);
  border-bottom: 1px solid var(--bes-line);
}

.bes-header-inner {
  width: min(100% - 2rem, var(--bes-wrap));
  margin: 0 auto;
  padding: 0.75rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}

.bes-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--bes-font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--bes-accent);
  text-decoration: none;
}

.bes-brand svg {
  flex: none;
  width: 2rem;
  height: 2rem;
}

.bes-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.bes-nav a {
  display: inline-block;
  padding: 0.35rem 0;
  font-family: var(--bes-font-display);
  font-weight: 500;
  color: var(--bes-text);
  text-decoration: none;
  border-bottom: 2px solid transparent;
}

.bes-nav a:hover {
  border-bottom-color: var(--bes-accent2);
}

/* Premier écran */

.bes-hero {
  position: relative;
}

.bes-hero-photo {
  margin: 0;
  background: var(--bes-accent);
}

.bes-hero-photo img {
  display: block;
  width: 100%;
  height: clamp(15rem, 50vw, 36rem);
  object-fit: cover;
}

.bes-hero-inner {
  width: min(100% - 2rem, var(--bes-wrap));
  margin: 0 auto;
}

.bes-panel {
  position: relative;
  overflow: hidden;
  max-width: 41rem;
  margin-top: -5rem;
  padding: 1.75rem 1.75rem 1.9rem;
  background: var(--bes-accent);
  color: var(--bes-on-accent);
  border-radius: var(--bes-radius);
  border-left: 0.5rem solid var(--bes-accent2);
}

.bes-panel::after {
  content: "";
  position: absolute;
  right: -2.25rem;
  top: -2.25rem;
  width: 6.5rem;
  height: 6.5rem;
  border-radius: 50%;
  border: 0.7rem solid var(--bes-accent2);
  opacity: 0.55;
  pointer-events: none;
}

.bes-panel h1 {
  position: relative;
  margin: 0 0 0.9rem;
  font-family: var(--bes-font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 4.6vw, 2.6rem);
  line-height: 1.15;
  color: var(--bes-on-accent);
}

.bes-lead {
  position: relative;
  margin: 0;
  font-size: 1.1rem;
  color: var(--bes-on-accent);
}

.bes-lead .bes-num {
  color: var(--bes-on-accent);
  font-weight: 600;
}

/* Fiche : colonne de repères + texte */

.bes-sheet {
  width: min(100% - 2rem, var(--bes-wrap));
  margin: 2.5rem auto 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2rem;
}

.bes-aside {
  align-self: start;
  background: var(--bes-surface);
  border: 1px solid var(--bes-line);
  border-top: 0.35rem solid var(--bes-accent2);
  border-radius: var(--bes-radius);
  padding: 1.1rem 1.1rem 1.2rem;
}

.bes-aside h2 {
  margin: 0 0 0.8rem;
  font-family: var(--bes-font-display);
  font-size: 1.05rem;
  color: var(--bes-accent);
}

.bes-figures {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
  gap: 0.9rem 1rem;
}

.bes-figures div {
  min-width: 0;
}

.bes-figures dt {
  font-family: var(--bes-font-mono);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--bes-accent);
}

.bes-figures dd {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--bes-muted);
}

@media (min-width: 58rem) {
  .bes-sheet {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 3rem;
  }

  .bes-aside {
    position: sticky;
    top: 1.25rem;
  }

  .bes-figures {
    grid-template-columns: 1fr;
  }
}

/* Texte */

.bes-prose {
  max-width: 46rem;
  min-width: 0;
}

.bes-prose section + section {
  margin-top: 2.75rem;
}

.bes-prose h2 {
  margin: 0 0 0.8rem;
  font-family: var(--bes-font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.25;
  color: var(--bes-accent);
}

.bes-prose h3 {
  margin: 1.5rem 0 0.4rem;
  font-family: var(--bes-font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--bes-text);
}

.bes-prose p {
  margin: 0 0 1rem;
}

.bes-prose ul,
.bes-prose ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

.bes-prose li {
  margin-bottom: 0.4rem;
}

.bes-num {
  font-family: var(--bes-font-mono);
  font-size: 0.94em;
  font-weight: 500;
  white-space: nowrap;
}

/* Séquence réelle d'étapes */

.bes-steps {
  list-style: none;
  margin: 1.25rem 0 1rem;
  padding: 0;
  counter-reset: bes-step;
}

.bes-steps li {
  position: relative;
  margin: 0;
  padding: 0 0 1.25rem 3.25rem;
  counter-increment: bes-step;
}

.bes-steps li::before {
  content: counter(bes-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bes-accent);
  color: var(--bes-on-accent);
  font-family: var(--bes-font-mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.bes-steps li::after {
  content: "";
  position: absolute;
  left: 1.02rem;
  top: 2.3rem;
  bottom: 0.2rem;
  width: 2px;
  background: var(--bes-accent2);
}

.bes-steps li:last-child {
  padding-bottom: 0;
}

.bes-steps li:last-child::after {
  display: none;
}

.bes-steps strong {
  display: block;
  font-family: var(--bes-font-display);
  font-weight: 600;
  color: var(--bes-text);
}

/* Encadré */

.bes-note {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  background: var(--bes-surface);
  border: 1px solid var(--bes-line);
  border-left: 0.35rem solid var(--bes-accent);
  border-radius: var(--bes-radius);
}

.bes-note p:last-child {
  margin-bottom: 0;
}

.bes-note-title {
  margin: 0 0 0.35rem;
  font-family: var(--bes-font-display);
  font-weight: 600;
  color: var(--bes-accent);
}

/* Tableau */

.bes-table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--bes-line);
  border-radius: var(--bes-radius);
  background: var(--bes-surface);
}

.bes-table {
  width: 100%;
  min-width: 36rem;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.bes-table caption {
  padding: 0.75rem 1rem;
  text-align: left;
  font-family: var(--bes-font-display);
  font-weight: 600;
  color: var(--bes-accent);
}

.bes-table th,
.bes-table td {
  padding: 0.7rem 1rem;
  text-align: left;
  vertical-align: top;
  border-top: 1px solid var(--bes-line);
}

.bes-table thead th {
  background: var(--bes-accent);
  color: var(--bes-on-accent);
  font-family: var(--bes-font-display);
  font-weight: 600;
  border-top: 0;
}

.bes-table tbody th {
  font-family: var(--bes-font-display);
  font-weight: 600;
}

/* Figure dans le texte */

.bes-figure {
  margin: 1.5rem 0;
}

.bes-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--bes-radius);
}

.bes-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  color: var(--bes-muted);
}

/* Questions-réponses */

.bes-answers {
  margin-top: 3rem;
  padding-top: 1.75rem;
  border-top: 3px solid var(--bes-accent2);
}

.bes-answers > h2 {
  margin: 0 0 1rem;
}

.bes-answer {
  margin: 0 0 1rem;
  padding: 1rem 1.15rem;
  background: var(--bes-surface);
  border: 1px solid var(--bes-line);
  border-radius: var(--bes-radius);
}

.bes-answer h3 {
  margin: 0 0 0.4rem;
  font-family: var(--bes-font-display);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--bes-accent);
}

.bes-answer p {
  margin: 0;
}

/* Page simple (mentions légales) */

.bes-plain {
  width: min(100% - 2rem, 46rem);
  margin: 2.5rem auto 3.5rem;
}

.bes-plain h1 {
  font-family: var(--bes-font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  color: var(--bes-accent);
  margin: 0 0 1rem;
}

.bes-plain h2 {
  font-family: var(--bes-font-display);
  font-size: 1.3rem;
  color: var(--bes-accent);
  margin: 2rem 0 0.5rem;
}

/* Pied de page */

.bes-footer {
  background: var(--bes-accent);
  color: var(--bes-on-accent);
  padding: 1.75rem 0;
}

.bes-footer-inner {
  width: min(100% - 2rem, var(--bes-wrap));
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  justify-content: space-between;
}

.bes-footer-name {
  margin: 0;
  font-family: var(--bes-font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.bes-footer p {
  margin: 0;
}

.bes-footer a {
  color: var(--bes-on-accent);
}

.bes-footer a:focus-visible {
  outline-color: var(--bes-on-accent);
}

.bes-credits {
  flex-basis: 100%;
  font-size: 0.9rem;
}

@media (min-width: 40rem) {
  .bes-credits {
    flex-basis: auto;
  }
}

@media (max-width: 30rem) {
  .bes-panel {
    margin-top: -3.5rem;
    padding: 1.35rem 1.2rem 1.5rem;
  }
}

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