/* ========================================
   PAGE D'UN ARTICLE DU BLOG (/blog/:slug)
   Haut de page : grande photo, texte sur un fond sombre fondu. Lecture : sommaire collant à
   gauche (ordinateur) ou menu (tablette, mobile), partage. Bas de page : réalisations liées,
   articles à lire aussi (cartes de la page Blog, blog-list.css), appel à contact.
   ======================================== */

/* ---- Haut de page ---- */
.ba-hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(420px, calc(80vh - var(--site-header-h, 96px)), 760px);
  min-height: clamp(420px, calc(80svh - var(--site-header-h, 96px)), 760px);
  padding: 0;
  overflow: hidden;
  background: var(--site-green-deep, #10201a);
  isolation: isolate;
}

.ba-hero:not(.has-image) {
  min-height: 0;
  background:
    radial-gradient(ellipse at 85% 0%, rgba(157, 198, 107, 0.16) 0%, rgba(157, 198, 107, 0) 55%),
    var(--site-green-deep, #10201a);
}

.ba-hero-media,
.ba-hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ba-hero-media {
  z-index: -2;
}

.ba-hero-media img {
  object-fit: cover;
  object-position: center;
  animation:
    ba-fade 1.4s cubic-bezier(0.16, 1, 0.3, 1) both,
    ba-drift 28s ease-in-out 1.4s infinite alternate;
}

@keyframes ba-fade {
  from {
    opacity: 0;
    transform: scale(1.03);
  }
}

@keyframes ba-drift {
  to {
    transform: scale(1.06);
  }
}

/* Fondu vers le vert de la page en bas de la photo */
.ba-hero.has-image::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  z-index: -1;
  height: 42%;
  background: linear-gradient(180deg, rgba(16, 32, 26, 0) 0%, rgba(16, 32, 26, 0.7) 60%, var(--site-green-deep, #10201a) 100%);
  pointer-events: none;
}

.ba-hero-inner {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(56px, 7vw, 110px) clamp(20px, 4vw, 56px) clamp(40px, 4.5vw, 72px);
}

.ba-hero-content {
  position: relative;
  max-width: 860px;
  animation: ba-rise 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes ba-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* Fond sombre fondu derrière le texte (ovale qui s'éteint avant ses bords) */
.ba-hero.has-image .ba-hero-content::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -260px;
  z-index: -1;
  width: calc(80% + 520px); /* centre à 40 % du texte : le fond couvre surtout la gauche, où commence le texte */
  height: 190%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.76) 36%, rgba(0, 0, 0, 0.55) 60%, rgba(0, 0, 0, 0.26) 80%, rgba(0, 0, 0, 0.07) 93%, rgba(0, 0, 0, 0) 100%);
  transform: translateY(-50%);
  pointer-events: none;
}

.ba-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-bottom: 18px;
  font-family: var(--site-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.ba-breadcrumb a {
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.2s ease;
}

.ba-breadcrumb a:hover {
  color: var(--site-lime);
}

.ba-category,
.ba-eyebrow {
  margin: 0 0 12px;
  font-family: var(--site-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.ba-title {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(38px, 4.2vw, 64px);
  font-weight: 600;
  line-height: 1.04;
  color: #fff;
  text-wrap: balance;
}

.ba-lead {
  max-width: 720px;
  margin: 20px 0 0;
  font-family: var(--site-sans);
  font-size: clamp(16px, 1.2vw, 18px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}

.ba-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin: 22px 0 0;
  font-family: var(--site-sans);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.ba-dot {
  width: 4px;
  height: 4px;
  background: var(--site-lime);
  border-radius: 50%;
}

/* ---- Lecture ---- */
.ba-reading {
  position: relative;
  padding: clamp(44px, 5vw, 80px) 0 clamp(64px, 7vw, 110px);
  overflow: clip;
  background: var(--site-green-deep, #10201a);
  isolation: isolate;
}

.ba-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 740px);
  justify-content: center;
  gap: clamp(48px, 6vw, 96px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}

/* Colonne de gauche : sommaire et partage, collants pendant la lecture */
.ba-aside {
  position: sticky;
  top: calc(var(--site-header-h, 96px) + 28px);
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 28px;
  max-height: calc(100vh - var(--site-header-h, 96px) - 56px);
  /* Marge intérieure : le défilement de la colonne rognait le bas des cercles de partage */
  padding: 2px 2px 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.ba-toc-title {
  margin: 0 0 14px;
  font-family: var(--site-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.ba-toc ol,
.ba-toc-mobile ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ba-toc ol {
  border-left: 1px solid rgba(157, 198, 107, 0.2);
}

.ba-toc a {
  position: relative;
  display: block;
  padding: 7px 0 7px 16px;
  font-family: var(--site-sans);
  font-size: 13.5px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.62);
  transition: color 0.25s ease;
}

.ba-toc .is-h3 a {
  padding-left: 30px;
  font-size: 13px;
}

.ba-toc a::before {
  content: "";
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: -1px;
  width: 2px;
  background: var(--site-lime);
  border-radius: 2px;
  transform: scaleY(0);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-toc a:hover {
  color: #fff;
}

.ba-toc a.is-active {
  color: #fff;
}

.ba-toc a.is-active::before {
  transform: scaleY(1);
}

/* Partage */
.ba-share-label {
  margin: 0 0 12px;
  font-family: var(--site-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.ba-share-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ba-share-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: rgba(255, 255, 255, 0.85);
  background: transparent;
  border: 1px solid rgba(157, 198, 107, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.ba-share-btn svg {
  width: 18px;
  height: 18px;
}

.ba-share-btn:hover,
.ba-copy.is-done {
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-color: var(--site-lime);
}

.ba-share-btn:focus-visible,
.ba-toc a:focus-visible,
.ba-back:focus-visible,
.ba-btn:focus-visible,
.ba-project:focus-visible,
.ba-zoom:focus-visible {
  outline: 2px solid var(--site-lime);
  outline-offset: 3px;
}

.ba-copy-done {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  padding: 0;
  font-family: var(--site-sans);
  font-size: 12px;
  white-space: nowrap;
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-radius: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-copy-done:not(:empty) {
  padding: 4px 9px;
}

/* ---- Contenu de l'article ---- */
.ba-body {
  min-width: 0;
  font-family: var(--site-sans);
  font-size: 18px;
  font-weight: 300;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.86);
}

.ba-body > * + * {
  margin-top: 1.25em;
}

.ba-text p {
  margin: 0;
}

.ba-text strong {
  font-weight: 600;
  color: #fff;
}

.ba-text a {
  color: var(--site-lime);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.ba-text a:hover {
  color: #fff;
}

.ba-heading {
  margin-bottom: 0;
  font-family: var(--site-serif);
  font-weight: 600;
  line-height: 1.12;
  color: #fff;
  scroll-margin-top: calc(var(--site-header-h, 96px) + 24px);
}

h2.ba-heading {
  margin-top: 2em;
  font-size: clamp(30px, 2.4vw, 38px);
}

h3.ba-heading {
  margin-top: 1.7em;
  font-size: clamp(24px, 1.8vw, 28px);
}

h4.ba-heading {
  margin-top: 1.5em;
  font-size: 21px;
}

.ba-body > .ba-heading:first-child,
.ba-toc-mobile + .ba-heading {
  margin-top: 0;
}

.ba-heading + * {
  margin-top: 0.7em;
}

h2.ba-heading::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin-top: 14px;
  background: var(--site-lime);
  border-radius: 2px;
}

.ba-list {
  margin-bottom: 0;
  padding: 0;
  list-style: none;
  counter-reset: ba-item;
}

.ba-list li {
  position: relative;
  padding-left: 30px;
}

.ba-list li + li {
  margin-top: 0.55em;
}

ul.ba-list li::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 6px;
  width: 7px;
  height: 7px;
  background: var(--site-lime);
  border-radius: 50%;
}

ol.ba-list li {
  counter-increment: ba-item;
}

ol.ba-list li::before {
  content: counter(ba-item);
  position: absolute;
  top: 0.2em;
  left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-radius: 50%;
}

.ba-quote {
  position: relative;
  margin: 2em 0 0;
  padding: 6px 0 6px 28px;
  border-left: 2px solid var(--site-lime);
}

.ba-quote + * {
  margin-top: 2em;
}

.ba-quote p {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(24px, 2vw, 30px);
  font-style: italic;
  font-weight: 500;
  line-height: 1.35;
  color: #fff;
}

.ba-figure,
.ba-gallery {
  margin: 2em 0 0;
}

.ba-figure + *,
.ba-gallery + * {
  margin-top: 2em;
}

.ba-zoom {
  position: relative;
  display: block;
  overflow: hidden;
  background: #152a21;
  border-radius: 16px;
  cursor: zoom-in;
}

.ba-zoom img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-zoom:hover img {
  transform: scale(1.03);
}

.ba-figure figcaption,
.ba-gallery figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  font-style: italic;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}

.ba-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.ba-gallery-grid.is-1 {
  grid-template-columns: minmax(0, 1fr);
}

.ba-gallery-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ba-gallery-grid .ba-zoom {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}

.ba-gallery-grid .ba-zoom img {
  height: 100%;
  object-fit: cover;
}

.ba-gallery-grid.is-1 .ba-zoom {
  aspect-ratio: auto;
}

/* Fin de l'article : retour au blog et partage */
.ba-end {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 3em;
  padding-top: 28px;
  border-top: 1px solid rgba(157, 198, 107, 0.18);
}

.ba-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.ba-back svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-back:hover {
  color: #fff;
}

.ba-back:hover svg {
  transform: translateX(-5px);
}

.ba-end .ba-share {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ba-end .ba-share-label {
  margin: 0;
}

/* Sommaire tablette et mobile : masqué sur ordinateur */
.ba-toc-mobile {
  display: none;
}

/* ---- Bas de page : réalisations liées, à lire aussi ---- */
.ba-more {
  position: relative;
  padding: clamp(56px, 6vw, 96px) 0;
  background: var(--site-green, #172c23);
}

.ba-similar {
  background: var(--site-green-deep, #10201a);
}

.ba-more-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px 24px;
  margin-bottom: clamp(24px, 3vw, 40px);
}

.ba-more-head .ba-eyebrow {
  flex-basis: 100%;
  margin: 0;
}

.ba-more-title {
  margin: 0;
  font-family: var(--site-serif);
  font-size: clamp(32px, 3vw, 46px);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
}

.ba-more-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--site-sans);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.ba-more-link svg,
.ba-project-link svg,
.ba-btn svg {
  width: 16px;
  height: 16px;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-more-link:hover {
  color: #fff;
}

.ba-more-link:hover svg {
  transform: translateX(5px);
}

.ba-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ba-projects-grid.is-1 {
  grid-template-columns: minmax(0, 560px);
}

.ba-projects-grid.is-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Carte d'une réalisation : photo pleine, texte en bas sur un dégradé */
.ba-project {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 100%;
  min-height: clamp(300px, 26vw, 400px);
  overflow: hidden;
  color: #fff;
  background: linear-gradient(145deg, #1f3a2e, #142820);
  border: 1px solid rgba(157, 198, 107, 0.14);
  border-radius: 18px;
  isolation: isolate;
  transition: border-color 0.3s ease, box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-project img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.ba-project::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(10, 20, 16, 0) 35%, rgba(10, 20, 16, 0.55) 62%, rgba(10, 20, 16, 0.92) 100%);
}

.ba-project .bl-placeholder {
  top: 40%;
  z-index: -2;
}

.ba-project:hover {
  border-color: rgba(157, 198, 107, 0.45);
  box-shadow: 0 30px 50px -34px rgba(0, 0, 0, 0.9);
}

.ba-project:hover img {
  transform: scale(1.06);
}

.ba-project:hover .ba-project-link svg {
  transform: translateX(5px);
}

.ba-project-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}

.ba-project-category {
  font-family: var(--site-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--site-lime);
}

.ba-project-title {
  font-family: var(--site-serif);
  font-size: clamp(23px, 1.8vw, 28px);
  font-weight: 600;
  line-height: 1.1;
}

.ba-project-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  font-family: var(--site-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--site-lime);
}

/* Books liés : mêmes cartes que les réalisations ; la carte ouvre la galerie (books.js) */
.ba-books .ba-project {
  cursor: pointer;
}

/* Réalisations puis books : une seule bande verte, moins d'espace entre les deux */
.ba-projects + .ba-books {
  padding-top: 0;
}

/* ---- Article introuvable (404) ---- */
.ba-missing {
  position: relative;
  padding: clamp(80px, 10vw, 150px) 0 clamp(64px, 8vw, 110px);
  overflow: hidden;
  text-align: center;
  background: var(--site-green-deep, #10201a);
  isolation: isolate;
}

.ba-missing-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 20px;
}

.ba-missing-leaf {
  width: 64px;
  margin-bottom: 20px;
  color: var(--site-lime);
  opacity: 0.5;
}

.ba-missing .ba-lead {
  margin: 18px auto 0;
}

.ba-missing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 28px;
  margin-top: 32px;
}

/* ---- Aperçu de l'admin : rappel en bas de l'écran ---- */
.ba-preview-bar {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  max-width: calc(100vw - 32px);
  padding: 10px 18px;
  font-family: var(--site-sans);
  font-size: 13.5px;
  color: #fff;
  background: rgba(16, 32, 26, 0.94);
  border: 1px solid var(--site-lime);
  border-radius: 999px;
  box-shadow: 0 18px 40px -16px rgba(0, 0, 0, 0.8);
  transform: translateX(-50%);
}

@media (max-width: 575px) {
  .ba-preview-bar {
    gap: 8px;
    padding: 8px 14px;
    font-size: 12px;
  }
}

.ba-preview-bar strong {
  padding: 3px 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-radius: 999px;
}

/* ---- Appel à contact : photo de l'article en fondu ---- */
.ba-cta {
  position: relative;
  padding: clamp(64px, 8vw, 110px) 0;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 120%, rgba(157, 198, 107, 0.16) 0%, rgba(157, 198, 107, 0) 60%),
    var(--site-green, #172c23);
  isolation: isolate;
}

.ba-cta.has-bg {
  background: var(--site-green, #172c23);
}

/* Fondu sur les quatre bords (deux dégradés croisés, sur le conteneur : aucun filtre sur l'image) */
.ba-cta-media {
  position: absolute;
  inset: 0;
  z-index: -2;
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 28%, #000 72%, rgba(0, 0, 0, 0) 100%), linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 32%, #000 68%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, #000 28%, #000 72%, rgba(0, 0, 0, 0) 100%), linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, #000 32%, #000 68%, rgba(0, 0, 0, 0) 100%);
  mask-composite: intersect;
}

.ba-cta-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}

.ba-cta.has-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 42% 46% at 50% 50%, rgba(10, 20, 16, 0.6) 0%, rgba(10, 20, 16, 0.25) 60%, rgba(10, 20, 16, 0) 100%);
  pointer-events: none;
}

.ba-cta-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.ba-cta h2 {
  margin: 0 0 16px;
  font-family: var(--site-serif);
  font-size: clamp(34px, 3.4vw, 52px);
  font-weight: 600;
  line-height: 1.05;
  color: #fff;
}

.ba-cta-text {
  max-width: 540px;
  margin: 0 auto 28px;
  font-family: var(--site-sans);
  font-size: clamp(15px, 1.15vw, 17px);
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

.ba-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 28px;
  font-family: var(--site-sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-green-deep, #10201a);
  background: var(--site-lime);
  border-radius: 999px;
  transition: background-color 0.25s ease;
}

.ba-btn:hover {
  color: var(--site-green-deep, #10201a);
  background: #b5d68c;
}

.ba-btn:hover svg {
  transform: translateX(5px);
}

/* ========================================
   TABLETTE ET MOBILE
   ======================================== */
/* Tailles alignées sur le reste du site (accueil, À propos, pages services) */
@media (max-width: 1199px) {
  .ba-layout {
    grid-template-columns: 210px minmax(0, 700px);
    gap: 48px;
  }

  .ba-title {
    font-size: clamp(32px, 3.8vw, 42px);
  }

  .ba-lead {
    font-size: 15px;
  }

  .ba-body {
    font-size: 15.5px;
    line-height: 1.75;
  }

  h2.ba-heading {
    font-size: clamp(26px, 2.8vw, 30px);
  }

  h3.ba-heading {
    font-size: 22px;
  }

  h4.ba-heading {
    font-size: 18px;
  }

  .ba-quote p {
    font-size: 23px;
  }

  .ba-more-title,
  .ba-cta h2 {
    font-size: clamp(28px, 3.4vw, 36px);
  }

  .ba-cta-text {
    font-size: 15px;
  }

  .ba-project-title {
    font-size: 22px;
  }
}

@media (max-width: 991px) {
  .ba-hero {
    min-height: calc(62vh - var(--site-header-h, 76px));
    min-height: calc(62svh - var(--site-header-h, 76px));
  }

  .ba-breadcrumb {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .ba-category,
  .ba-eyebrow {
    font-size: 11.5px;
  }

  .ba-title {
    font-size: clamp(28px, 4.4vw, 34px);
  }

  .ba-lead {
    margin-top: 16px;
    font-size: 14.5px;
  }

  .ba-meta {
    margin-top: 18px;
    font-size: 12px;
  }

  .ba-body {
    font-size: 15px;
  }

  .ba-body > * + * {
    margin-top: 1.15em;
  }

  h2.ba-heading {
    font-size: 26px;
  }

  h3.ba-heading {
    font-size: 21px;
  }

  h4.ba-heading {
    font-size: 17.5px;
  }

  h2.ba-heading::after {
    width: 36px;
    margin-top: 12px;
  }

  .ba-quote p {
    font-size: 22px;
  }

  .ba-figure figcaption,
  .ba-gallery figcaption {
    font-size: 13px;
  }

  .ba-share-btn {
    width: 38px;
    height: 38px;
  }

  .ba-share-btn svg {
    width: 17px;
    height: 17px;
  }

  .ba-back,
  .ba-more-link {
    font-size: 11.5px;
  }

  .ba-project-body {
    padding: 20px;
  }

  .ba-project-title {
    font-size: 20px;
  }

  .ba-project-category {
    font-size: 10.5px;
  }

  .ba-project-link {
    font-size: 11px;
  }

  .ba-cta-text {
    font-size: 14.5px;
  }

  .ba-btn {
    height: 48px;
    padding: 0 24px;
    font-size: 12px;
  }

  .ba-hero.has-image .ba-hero-content::before {
    left: -160px;
    width: calc(85% + 320px);
  }

  /* Une colonne : le sommaire devient un menu au début de l'article, le partage passe à la fin */
  .ba-layout,
  .ba-layout.no-toc {
    grid-template-columns: minmax(0, 720px);
  }

  .ba-aside {
    display: none;
  }

  .ba-toc-mobile {
    position: relative;
    z-index: 4;
    display: block;
    margin-bottom: 2em;
  }

  .ba-toc-mobile summary {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 42px;
    padding: 0 16px;
    font-family: var(--site-sans);
    font-size: 13.5px;
    list-style: none;
    color: #fff;
    background: rgba(23, 44, 35, 0.9);
    border: 1px solid rgba(157, 198, 107, 0.3);
    border-radius: 999px;
    cursor: pointer;
    transition: border-color 0.25s ease;
  }

  .ba-toc-mobile summary::-webkit-details-marker {
    display: none;
  }

  .ba-toc-mobile summary:hover,
  .ba-toc-mobile[open] summary {
    border-color: var(--site-lime);
  }

  .ba-toc-mobile summary:focus-visible {
    outline: 2px solid var(--site-lime);
    outline-offset: 3px;
  }

  .ba-toc-mobile .ba-toc-title {
    margin: 0;
  }

  .ba-toc-count {
    flex: 1;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
  }

  .ba-toc-mobile summary svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--site-lime);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .ba-toc-mobile[open] summary svg {
    transform: rotate(180deg);
  }

  .ba-toc-mobile ol {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    max-height: 60vh;
    overflow-y: auto;
    padding: 6px;
    background: #142820;
    border: 1px solid rgba(157, 198, 107, 0.3);
    border-radius: 16px;
    box-shadow: 0 24px 40px -20px rgba(0, 0, 0, 0.8);
    animation: ba-drop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes ba-drop {
    from {
      opacity: 0;
      transform: translateY(-6px);
    }
  }

  .ba-toc-mobile a {
    display: block;
    padding: 9px 14px;
    font-size: 13.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.88);
    border-radius: 10px;
    transition: background-color 0.2s ease;
  }

  .ba-toc-mobile .is-h3 a {
    padding-left: 28px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
  }

  .ba-toc-mobile a:hover {
    background: rgba(157, 198, 107, 0.1);
  }

  .ba-toc-mobile + .ba-heading,
  .ba-toc-mobile + * {
    margin-top: 0;
  }

  .ba-projects-grid,
  .ba-projects-grid.is-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ba-projects-grid.is-1 {
    grid-template-columns: minmax(0, 1fr);
  }

  .ba-project {
    min-height: 260px;
  }
}

/* Tablette : deux colonnes, le troisième article resterait seul sur sa ligne */
@media (min-width: 576px) and (max-width: 991px) {
  .ba-similar .bl-grid li:nth-child(3) {
    display: none;
  }
}

@media (max-width: 575px) {
  .ba-hero-inner {
    padding: 44px 20px 30px;
  }

  .ba-breadcrumb {
    margin-bottom: 10px;
    font-size: 11.5px;
  }

  .ba-category,
  .ba-eyebrow {
    margin-bottom: 10px;
    font-size: 11px;
  }

  .ba-title {
    font-size: 26px;
    line-height: 1.1;
  }

  .ba-lead {
    margin-top: 12px;
    font-size: 13.5px;
    line-height: 1.6;
  }

  .ba-meta {
    margin-top: 14px;
    font-size: 11.5px;
  }

  .ba-reading {
    padding: 32px 0 56px;
  }

  .ba-body {
    font-size: 14px;
    line-height: 1.7;
  }

  h2.ba-heading {
    font-size: 23px;
  }

  h3.ba-heading {
    font-size: 19px;
  }

  h4.ba-heading {
    font-size: 16.5px;
  }

  .ba-list li {
    padding-left: 26px;
  }

  ol.ba-list li::before {
    width: 20px;
    height: 20px;
    font-size: 11px;
  }

  .ba-quote {
    padding-left: 18px;
  }

  .ba-quote p {
    font-size: 20px;
  }

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

  .ba-zoom {
    border-radius: 12px;
  }

  .ba-figure figcaption,
  .ba-gallery figcaption {
    font-size: 12.5px;
  }

  .ba-toc-mobile summary {
    height: 40px;
    padding: 0 16px;
    font-size: 13px;
  }

  .ba-toc-mobile .ba-toc-title {
    font-size: 11px;
  }

  .ba-toc-count {
    font-size: 12.5px;
  }

  .ba-end {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .ba-share-btn {
    width: 36px;
    height: 36px;
  }

  .ba-share-btn svg {
    width: 16px;
    height: 16px;
  }

  .ba-more {
    padding: 44px 0;
  }

  .ba-more-title {
    font-size: 26px;
  }

  .ba-projects-grid,
  .ba-projects-grid.is-2 {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ba-project {
    min-height: 0;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .ba-project-body {
    gap: 6px;
    padding: 16px 18px;
  }

  .ba-project-title {
    font-size: 19px;
  }

  .ba-cta {
    padding: 52px 0;
  }

  .ba-cta h2 {
    font-size: 26px;
  }

  .ba-cta-text {
    margin-bottom: 22px;
    font-size: 13.5px;
  }

  .ba-btn {
    height: 44px;
    padding: 0 22px;
    font-size: 11.5px;
  }

  .ba-missing {
    padding: 64px 0 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ba-hero-media img,
  .ba-hero-content,
  .ba-toc-mobile ol {
    animation: none;
  }

  .ba-zoom img,
  .ba-project img,
  .ba-toc a::before {
    transition: none;
  }
}

/* Mobile : cartes réalisations et books du bas des pages en portrait (4:5), comme les autres
   cartes de réalisation */
@media (max-width: 575px) {
  .ba-project {
    aspect-ratio: 4 / 5;
  }
}
