/* ==========================================================================
   Pages des agents, design v3 (maquette, page agent), par étapes. Présentation seulement : le contenu des
   fiches ne change pas. Chargée sur les fiches « Agents IA », après agent-v2.css et design-v3.css.
   ========================================================================== */

.single-ai_agent, .agent-sub { --av3-pad: max(64px, calc((100% - 1312px) / 2)); }

/* ===== Étape 1 : héros =====
   Bandeau aux couleurs de l'agent (dégradé de sa fiche), texte à gauche, portrait 3D en grand à droite,
   posé sur le bas du bandeau. La scène illustrée (outils, cartes) suit, sous le bandeau. */
/* Le bandeau monte jusqu'en haut de la page, sous l'en-tête (transparent en haut de page). */
:is(.single-ai_agent, .agent-sub) .wp-site-blocks > .wp-block-post-content { margin-block-start: 0; }
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-hs { padding: 0 0 40px; background: var(--bg, #f5f4ee); }
:is(.single-ai_agent, .agent-sub) .agent-hs__intro {
  position: relative;
  box-sizing: border-box;
  align-items: flex-start;
  gap: 20px;
  min-height: 620px;
  padding: 150px calc(var(--av3-pad) + 440px) 72px var(--av3-pad);
  overflow: hidden;
  background: linear-gradient(180deg, var(--c1, var(--agent, #e9e6dc)) 0%, var(--c2, var(--agent, #f5f4ee)) 100%);
  text-align: left;
}
:is(.single-ai_agent, .agent-sub) .agent-hs__portrait {
  position: absolute;
  z-index: 0;
  right: calc(var(--av3-pad) + 20px);
  bottom: 0;
  height: min(540px, calc(100% - 96px));
  margin: 0;
  pointer-events: none;
}
:is(.single-ai_agent, .agent-sub) .agent-hs__portrait img { display: block; width: auto; height: 100%; max-width: none; }
:is(.single-ai_agent, .agent-sub) .agent-hs__intro > :not(.agent-hs__portrait) { position: relative; z-index: 1; }

/* Fil d'Ariane en texte, sans pastille */
:is(.single-ai_agent, .agent-sub) .agent-hs__crumb { gap: 0; padding: 0; border: 0; background: none; font-size: var(--fs-sm, 14px); color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-hs__crumb-face { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-hs__crumb a { color: var(--text-2); text-decoration: none; }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-hs__crumb a:hover { color: var(--ink); text-decoration: underline; } }
:is(.single-ai_agent, .agent-sub) .agent-hs__crumb strong { font-weight: 400; color: var(--ink); }

/* Titre sur deux lignes, la seconde en gris, aligné à gauche */
:is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__title,
:is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__sub {
  max-width: 13em;
  font-size: clamp(40px, 4vw, var(--fs-h1, 56px)) !important;
  line-height: 1.08 !important;
  letter-spacing: -1.2px !important;
  text-wrap: balance;
}
:is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__sub { margin-top: -20px; color: rgb(26 26 26 / .55); }
:is(.single-ai_agent, .agent-sub) .agent-hs__lead { max-width: 34em; font-size: var(--fs-body, 16px); line-height: 1.5; color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-hs__ctas { justify-content: flex-start; gap: 8px; margin-top: 6px; }
:is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__price { margin-top: -6px; font-size: var(--fs-sm, 14px); color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-hs__trust { justify-content: flex-start; gap: 6px 20px; font-size: var(--fs-sm, 14px); color: var(--text-2); }

/* Héros de la maquette (fiches ayant un portrait de 3/4, inc/agent-page-v3.php) : bandeau de 560 px, fil d'Ariane,
   titre et boutons à gauche ; portrait de 3/4 posé sur le bas du bandeau, trois bulles en verre autour qui
   suivent le pointeur. L'accroche, le prix et les garanties passent dessous (.agent-hs__after) ; sur ordinateur,
   le bandeau reste en place et la suite de la page remonte par-dessus. */
:is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) { min-height: 560px; padding: 132px calc(var(--av3-pad) + 520px) 56px var(--av3-pad); justify-content: center; }
:is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) .agent-hs__ctas { margin-top: 12px; }
/* Le texte s'arrête avant la première bulle */
:is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) :is(.agent-hs__title, .agent-hs__sub) { max-width: min(13em, 600px); }
:is(.single-ai_agent, .agent-sub) .agent-hs__vis {
  position: absolute;
  z-index: 0;
  right: max(260px, calc(var(--av3-pad) + 220px));
  bottom: 0;
  height: calc(100% - 96px);
  aspect-ratio: 829 / 1072;
  margin: 0;
}
:is(.single-ai_agent, .agent-sub) .agent-hs__vis > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: 50% 100%;
  opacity: 0;
  transform: translateY(24px);
  animation: agentHsIn 1.1s cubic-bezier(.16, 1, .3, 1) .1s forwards;
}
.agent-hs__bub {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  width: max-content;
  max-width: 290px;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / .9);
  border-radius: 10px;
  background: rgb(255 255 255 / .82);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  font-size: 12.5px;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-align: left;
  opacity: 0;
  transform: translateY(14px);
  translate: var(--px, 0) var(--py, 0);
  animation: agentHsIn .9s cubic-bezier(.16, 1, .3, 1) forwards;
  animation-delay: calc(var(--k) * 160ms + 550ms);
  transition: translate .9s cubic-bezier(.2, .8, .2, 1);
}
.agent-hs__bub[style*="--k:0;"] { max-width: 230px; }
.agent-hs__bub .k { display: block; margin-bottom: 4px; font-size: 10px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--text-2); }
.agent-hs__bub .k .tm { font-style: normal; text-transform: none; }
.agent-hs__bub b { font-weight: 500; }
.agent-hs__bub .cts { display: flex; gap: 14px; white-space: nowrap; }
.agent-hs__bub .cts span b { display: block; font-size: var(--fs-h5, 20px); font-weight: 400; line-height: 1.1; }
.agent-hs__bub .bt { display: inline-block; margin-top: 8px; padding: 5px 9px; border-radius: 6px; background: rgb(26 26 26 / .88); font-weight: 500; color: #fff; }
@keyframes agentHsIn { to { opacity: 1; transform: none; } }

/* Sous le héros : l'accroche en grand, centrée, puis le prix et les garanties */
:is(.single-ai_agent, .agent-sub) .agent-hs__after {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 120px var(--av3-pad) 0;
  border-radius: 6px 6px 0 0;
  background: var(--bg, #f5f4ee);
  text-align: center;
}
:is(.single-ai_agent, .agent-sub) .agent-hs__after .agent-hs__lead { max-width: 1000px; margin: 0; font-family: var(--display); font-size: var(--fs-h2, 40px); line-height: 1.2; letter-spacing: -0.8px; color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-hs__after .agent-hs__price { margin: 0; font-size: var(--fs-body, 16px); color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-hs__after .agent-hs__trust { justify-content: center; gap: 10px 32px; margin: 0; font-size: var(--fs-body, 16px); color: var(--ink); }
@media (min-width: 1025px) {
  :is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) { position: sticky; top: 0; z-index: 0; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-hs:has(.agent-hs__vis) { padding-bottom: 0; }
  :is(.single-ai_agent, .agent-sub) .agent-hs:has(.agent-hs__vis) > :not(.agent-hs__intro) { position: relative; z-index: 1; background: var(--bg, #f5f4ee); }
  :is(.single-ai_agent, .agent-sub) .agent-hs:has(.agent-hs__vis) > .agent-hs__stage { margin-top: -1px; padding: 57px 0 40px; } /* -1 px : pas de fil du bandeau entre les deux */
  /* Les blocs qui suivent sont parfois moins larges que la page : leur fond déborde sur les côtés pour cacher le
     bandeau figé derrière eux. */
  :is(.single-ai_agent, .agent-sub) .agent-hs:has(.agent-hs__vis) > :not(.agent-hs__intro):not(.agent-hs__after) { box-shadow: 0 0 0 100vmax var(--bg, #f5f4ee); clip-path: inset(0 -100vmax); }
}
@media (prefers-reduced-motion: reduce) {
  :is(.single-ai_agent, .agent-sub) .agent-hs__vis > img, .agent-hs__bub { opacity: 1; transform: none; animation: none; }
}

/* La scène passe sous le bandeau */
:is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__stage { margin-top: 56px; }

@media (max-width: 1024px) {
  .single-ai_agent, .agent-sub { --av3-pad: 40px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__intro { padding-top: 130px; padding-right: calc(var(--av3-pad) + 300px); min-height: 560px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__portrait { right: 16px; height: min(420px, calc(100% - 96px)); }
}
/* Téléphone : texte au-dessus, portrait centré en bas du bandeau */
@media (max-width: 760px) {
  .single-ai_agent, .agent-sub { --av3-pad: 20px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__intro { min-height: 0; padding: 112px var(--av3-pad) 0; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__portrait { position: relative; right: auto; order: 99; align-self: center; height: 300px; margin-top: 8px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__title,
  :is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__sub { font-size: 34px !important; }
  :is(.single-ai_agent, .agent-sub) .agent-hs .agent-hs__sub { margin-top: -16px; }
}

/* ===== Étape 2 : questions, mise en route, données, appel final ===== */

/* Titres de section : 40 px, la seconde ligne en gris (comme la maquette) */
:is(.single-ai_agent, .agent-sub) :is(.agent-steps, .agent-sov, .agent-cta, .agent-faq) :is(.agent-section-title, p.agent-section-sub, .agent-faq__title, p.agent-faq__sub) {
  font-size: var(--fs-h2, 40px) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.8px !important;
}
:is(.single-ai_agent, .agent-sub) :is(.agent-steps, .agent-faq) :is(p.agent-section-sub, p.agent-faq__sub) { margin-top: 0; color: var(--text-mute, #8a8a8a); }
:is(.single-ai_agent, .agent-sub) :is(.agent-sov, .agent-cta) p.agent-section-lead,
:is(.single-ai_agent, .agent-sub) .agent-faq p.agent-faq__lead { padding-top: 14px; font-size: var(--fs-body, 16px); line-height: 1.5; }

/* Mise en route : titre à gauche (reste à l'écran), étapes numérotées à droite, séparées par des filets */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-steps {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 72px;
  align-items: start;
  padding: 120px var(--av3-pad);
  background: var(--bg, #f5f4ee);
}
:is(.single-ai_agent, .agent-sub) .agent-steps .agent-section-head { position: sticky; top: 130px; align-items: flex-start; max-width: none; margin: 0; text-align: left; }
:is(.single-ai_agent, .agent-sub) .agent-steps__in { display: flex; flex-direction: column; gap: 40px; max-width: none; margin: 0; }
:is(.single-ai_agent, .agent-sub) .agent-steps__list { gap: 0; }
:is(.single-ai_agent, .agent-sub) .agent-step,
:is(.single-ai_agent, .agent-sub) .agent-step.is-on,
:is(.single-ai_agent, .agent-sub) .agent-steps:not(.is-js) .agent-step:first-child {
  grid-template-columns: 64px minmax(0, 1fr);
  column-gap: 20px;
  padding: 28px 0;
  border-top: 1px solid rgb(0 0 0 / .1);
  border-radius: 0;
  background: none;
}
:is(.single-ai_agent, .agent-sub) .agent-step:last-child { border-bottom: 1px solid rgb(0 0 0 / .1); }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-step:not(.is-on):hover { background: none; } }
:is(.single-ai_agent, .agent-sub) .agent-steps .agent-step__n,
:is(.single-ai_agent, .agent-sub) .agent-step.is-on .agent-step__n,
:is(.single-ai_agent, .agent-sub) .agent-steps:not(.is-js) .agent-step:first-child .agent-step__n {
  grid-row: 1 / 4;
  align-self: start;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: none;
  font-family: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", system-ui, sans-serif);
  font-size: var(--fs-h3, 28px);
  font-weight: 400;
  line-height: 1;
  color: #b9b6ab;
}
:is(.single-ai_agent, .agent-sub) .agent-steps .agent-step__title { margin: 0; font-size: var(--fs-h5, 20px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.3; }
:is(.single-ai_agent, .agent-sub) .agent-steps .agent-step__desc { margin: 6px 0 0; font-size: var(--fs-body, 16px); line-height: 1.5; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-steps .agent-step__bar { display: none; }
/* Pas d'image à côté des étapes (maquette) : la liste seule. */
:is(.single-ai_agent, .agent-sub) .agent-steps__vis { display: none; }

/* Données : titre en haut, trois engagements en colonnes, sur fond crème (le dégradé chaud est réservé au bloc
   « base de connaissance », ajouté à une prochaine étape) */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-sov {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px 32px;
  align-items: start;
  padding: 120px var(--av3-pad);
  background: var(--bg, #f5f4ee);
  color: var(--ink);
}
:is(.single-ai_agent, .agent-sub) .agent-sov::before { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-sov__txt { grid-column: 1 / -1; max-width: 720px; }
:is(.single-ai_agent, .agent-sub) .agent-sov .agent-section-title { color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-sov p.agent-section-sub { color: var(--text-mute, #8a8a8a); }
:is(.single-ai_agent, .agent-sub) .agent-sov p.agent-section-lead { color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-sov__list { display: contents; }
:is(.single-ai_agent, .agent-sub) .agent-sov__item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid rgb(0 0 0 / .1);
  border-radius: 0;
  background: none;
}
:is(.single-ai_agent, .agent-sub) .agent-sov__item::before { position: static; width: 32px; height: 32px; margin-bottom: 8px; border-radius: 0; background: var(--i) center / 28px no-repeat; }
:is(.single-ai_agent, .agent-sub) .agent-sov__item--server { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round'%3E%3Crect x='4' y='4' width='16' height='7' rx='1.5'/%3E%3Crect x='4' y='13' width='16' height='7' rx='1.5'/%3E%3Cpath d='M8 7.5h.01M8 16.5h.01'/%3E%3C/svg%3E"); }
:is(.single-ai_agent, .agent-sub) .agent-sov__item--shield { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5l7 3v5c0 4.2-3 7.6-7 9-4-1.4-7-4.8-7-9v-5z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E"); }
:is(.single-ai_agent, .agent-sub) .agent-sov__item--folder { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='1.5' stroke-linejoin='round'%3E%3Cpath d='M3.5 7.5a2 2 0 0 1 2-2h4l2 2h7a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z'/%3E%3C/svg%3E"); }
:is(.single-ai_agent, .agent-sub) .agent-sov .agent-sov__title { font-size: var(--fs-h5, 20px); font-weight: 400; letter-spacing: -0.02em; color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-sov .agent-sov__desc { margin: 0; font-size: var(--fs-body, 16px); line-height: 1.5; color: var(--text-2); }

/* Questions : titre à gauche, accordéon à filets à droite (comme la page Tarifs) */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-faq { box-sizing: border-box; max-width: none; margin: 0; padding: 120px var(--av3-pad); background: var(--surface, #fff); }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__header { gap: 14px; }
:is(.single-ai_agent, .agent-sub) .agent-faq p.agent-faq__sub { margin-top: -14px; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__list { gap: 0; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__item,
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__item:last-child { padding: 0; border-top: 1px solid rgb(0 0 0 / .1); border-radius: 0; background: transparent; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__item:last-child { border-bottom: 1px solid rgb(0 0 0 / .1); }
:is(.single-ai_agent, .agent-sub) .agent-faq:not(.is-js) .agent-faq__item { padding: 22px 0; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__toggle { padding: 22px 0; border-radius: 0; }
:is(.single-ai_agent, .agent-sub) .agent-faq h3.agent-faq__q { font-family: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", system-ui, sans-serif) !important; font-size: var(--fs-h5, 20px); font-weight: 400 !important; letter-spacing: -0.02em !important; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__pm { width: 16px; height: 16px; border-radius: 0; background: none; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__pm svg { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__pm::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4.5 6.5 8 10l3.5-3.5' stroke='%23000' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__item.is-open .agent-faq__pm { transform: rotate(180deg); }
:is(.single-ai_agent, .agent-sub) .agent-faq .agent-faq__panel { padding: 0 40px 24px 0; }
:is(.single-ai_agent, .agent-sub) .agent-faq p.agent-faq__a { max-width: 720px; font-size: var(--fs-body, 16px); line-height: 1.55; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-faq p.agent-faq__a + p.agent-faq__a { margin-top: 12px; } /* réponse en plusieurs paragraphes */

/* Appel final : bandeau noir pleine largeur, l'exemple en carte blanche à droite */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-cta { padding: 120px var(--av3-pad); background: #1a1a1a; color: #fff; }
:is(.single-ai_agent, .agent-sub) .agent-cta::before { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-cta .agent-section-title { color: #fff; }
:is(.single-ai_agent, .agent-sub) .agent-cta p.agent-section-sub { color: rgb(255 255 255 / .5); }
:is(.single-ai_agent, .agent-sub) .agent-cta p.agent-section-lead { color: rgb(255 255 255 / .7); }
:is(.single-ai_agent, .agent-sub) .agent-cta .agentsia-button-primary .wp-block-button__link { background: #fff; color: #1a1a1a; }
:is(.single-ai_agent, .agent-sub) .agent-cta .is-style-outline .wp-block-button__link { border-color: rgb(255 255 255 / .3); background: transparent; color: #fff; box-shadow: none; }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-cta .is-style-outline .wp-block-button__link:hover { background: rgb(255 255 255 / .08); } }
:is(.single-ai_agent, .agent-sub) .agent-cta .agent-score { box-shadow: none; }

@media (max-width: 1024px) {
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-steps { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 72px; padding-bottom: 72px; }
  :is(.single-ai_agent, .agent-sub) .agent-steps .agent-section-head { position: relative; top: auto; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-sov { grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 72px; padding-bottom: 72px; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-faq,
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-cta { padding-top: 72px; padding-bottom: 72px; }
}

/* ===== Étape 4 : « Il connaît déjà votre entreprise » (base de connaissance), sur le dégradé chaud ===== */
.agent-kb {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 72px;
  align-items: center;
  padding: 120px var(--av3-pad);
  overflow: hidden;
  background: linear-gradient(180deg, #f6d59a 0%, #f9e8c5 70%, #f4d59a 100%);
}
.agent-kb__t { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.agent-kb__t > * { margin: 0; }
.agent-kb .agent-kb__k { font-size: var(--fs-kicker, 10px); font-weight: 700; line-height: 1.4; letter-spacing: .02em; text-transform: uppercase; color: var(--ink); }
.agent-kb .agent-kb__h { font-size: var(--fs-h2, 40px) !important; font-weight: 400 !important; line-height: 1.15 !important; letter-spacing: -0.8px !important; color: var(--ink); }
.agent-kb .agent-kb__p { max-width: 460px; font-size: var(--fs-body, 16px); line-height: 1.55; color: rgb(26 26 26 / .75); }
.agent-kb__ul { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; padding: 0; list-style: none; }
.agent-kb__ul li {
  padding-left: 26px;
  font-size: var(--fs-body, 16px);
  line-height: 1.4;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='%233d5a45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 .15em / 16px no-repeat;
}
.agent-kb__v { position: relative; justify-self: center; width: 100%; max-width: 560px; aspect-ratio: 1; container-type: inline-size; }
.agent-kb__r1, .agent-kb__r2 { position: absolute; left: 50%; top: 50%; border: 1px solid rgb(120 84 30 / .16); border-radius: 50%; transform: translate(-50%, -50%); }
.agent-kb__r1 { width: 60%; height: 60%; }
.agent-kb__r2 { width: 92%; height: 92%; }
.agent-kb__brain { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 330 / 250; transform: translate(-50%, -50%); }
.agent-kb__brain img { display: block; width: 100%; height: 100%; object-fit: contain; }
.agent-kb__in { position: absolute; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; transform: translate(-50%, -50%); }
.agent-kb__tile { display: grid; place-items: center; box-sizing: border-box; width: 44px; height: 44px; border: 1px solid rgb(120 84 30 / .14); border-radius: var(--r-card, 4px); background: #fffdf8; }
.agent-kb__tile svg { width: 19px; height: 19px; fill: none; stroke: #6b5130; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.agent-kb__lb { padding: 2px 6px; border-radius: var(--r-card, 4px); background: #fffdf8; font-size: var(--fs-xs, 12px); font-weight: 500; white-space: nowrap; }
/* Les agents tournent lentement sur l'anneau extérieur ; chaque avatar reste droit. */
.agent-kb__orb { position: absolute; inset: 0; animation: agent-kb-spin 140s linear infinite; }
.agent-kb__av { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; transform: rotate(var(--t)) translateX(min(257px, 46cqw)) rotate(calc(-1 * var(--t))); }
.agent-kb__f {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: var(--r-card, 4px);
  background: linear-gradient(180deg, var(--c1, #f3f3e7), var(--c2, #f3f3e7));
  animation: agent-kb-spin 140s linear infinite reverse;
}
.agent-kb__f img { position: absolute; left: -6%; top: -31%; width: 112%; max-width: none; height: auto; }
.agent-kb__av.is-me { z-index: 1; width: 68px; height: 68px; margin: -34px 0 0 -34px; }
.agent-kb__av.is-me .agent-kb__f { box-shadow: 0 0 0 3px #fff; }
@keyframes agent-kb-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .agent-kb__orb, .agent-kb__f { animation: none; }
}

/* ===== Étape 5 : « Il travaille avec le reste de l'équipe », autres agents, barre du bas ===== */

/* Frise : titre à gauche, scénario à droite en frise verticale, avatars 3D des agents */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-team {
  display: grid;
  grid-template-columns: 4fr 8fr;
  gap: 72px;
  align-items: start;
  padding: 120px var(--av3-pad);
  background: var(--surface, #fff);
}
:is(.single-ai_agent, .agent-sub) .agent-team::before { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-team__top { display: block; position: sticky; top: 130px; margin: 0; }
:is(.single-ai_agent, .agent-sub) .agent-team__top .agent-team__brain { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-team .agent-section-title,
:is(.single-ai_agent, .agent-sub) .agent-team p.agent-section-sub { font-size: var(--fs-h2, 40px) !important; font-weight: 400 !important; line-height: 1.15 !important; letter-spacing: -0.8px !important; }
:is(.single-ai_agent, .agent-sub) .agent-team p.agent-section-sub { color: var(--text-mute, #8a8a8a); }
:is(.single-ai_agent, .agent-sub) .agent-team p.agent-section-lead { padding-top: 14px; font-size: var(--fs-body, 16px); line-height: 1.5; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-team__scenario { margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
:is(.single-ai_agent, .agent-sub) .agent-team__scenario-head { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; }
:is(.single-ai_agent, .agent-sub) .agent-team .agent-team__scenario-title { margin: 0; font-family: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", system-ui, sans-serif) !important; font-size: var(--fs-h5, 20px); font-weight: 400 !important; letter-spacing: -0.02em !important; }
:is(.single-ai_agent, .agent-sub) .agent-team__tag { margin: 0; padding: 4px 7px; border-radius: var(--r-card, 4px); background: #efeee9; font-size: var(--fs-xs, 12px); font-weight: 500; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-team__steps { position: relative; display: flex; flex-direction: column; gap: 0; }
:is(.single-ai_agent, .agent-sub) .agent-team__steps::before { content: ""; position: absolute; left: 23px; top: 24px; bottom: 24px; width: 1px; background: rgb(0 0 0 / .14); }
:is(.single-ai_agent, .agent-sub) .agent-team__step {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 2px 20px;
  align-items: start;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
:is(.single-ai_agent, .agent-sub) .agent-team__step::before, :is(.single-ai_agent, .agent-sub) .agent-team__step::after { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-team__who { display: contents; }
:is(.single-ai_agent, .agent-sub) .agent-team__face { grid-column: 1; grid-row: 1 / 5; position: relative; width: 48px; height: 48px; margin: 0; overflow: hidden; border-radius: var(--r-card, 4px); box-shadow: 0 0 0 6px var(--surface, #fff); }
:is(.single-ai_agent, .agent-sub) .agent-team__face--3d { display: block; background: linear-gradient(180deg, var(--c1, #f3f3e7), var(--c2, #f3f3e7)); }
:is(.single-ai_agent, .agent-sub) .agent-team__face--3d img { position: absolute; left: -6%; top: -31%; width: 112%; max-width: none; height: auto; }
:is(.single-ai_agent, .agent-sub) .agent-team__who-name,
:is(.single-ai_agent, .agent-sub) .agent-team__who-time { grid-column: 2; margin: 0; font-size: var(--fs-xs, 12px); line-height: 1.4; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-team__who-name { grid-row: 1; font-weight: 500; color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-team__who-time { grid-row: 2; }
/* Étape « Vous » (pas de portrait) : un carré noir « Vous » dans la colonne des portraits, au lieu de la
   pastille noire de l'ancien style, qu'étirait la grille (texte noir sur noir). */
:is(.single-ai_agent, .agent-sub) .agent-team__who--you .agent-team__who-name {
  display: grid;
  grid-column: 1;
  grid-row: 1 / 5;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: var(--r-card, 4px);
  background: #1a1a1a;
  box-shadow: 0 0 0 6px var(--surface, #fff);
  font-size: var(--fs-xs, 12px);
  font-weight: 500;
  color: #fff;
}
:is(.single-ai_agent, .agent-sub) .agent-team__who--you .agent-team__who-time { grid-row: 1; }
/* Onglets des exemples (assets/js/agent-team-tabs.js) : plus de bouton noir ni d'anneau blanc autour du
   portrait. Onglet actif sur un fond gris clair, les autres atténués. */
:is(.single-ai_agent, .agent-sub) .agent-team__tabs { flex-direction: column; align-items: flex-start; gap: 4px; padding-top: 24px; }
:is(.single-ai_agent, .agent-sub) .agent-team__tab {
  gap: 12px;
  min-height: 0;
  padding: 6px 16px 6px 6px;
  border-radius: var(--r-card, 4px);
  background: transparent;
  color: rgb(26 26 26 / .5);
  font-size: var(--fs-body, 16px);
  font-weight: 400;
  transition: background-color .3s ease, color .3s ease;
}
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-team__tab:hover { color: var(--ink); } }
:is(.single-ai_agent, .agent-sub) .agent-team__tab[aria-selected="true"] { background: #f3f2ec; color: var(--ink); }
:is(.single-ai_agent, .agent-sub) .agent-team__tab .agent-team__face { width: 40px; height: 40px; box-shadow: none; opacity: .55; filter: grayscale(.6); transition: opacity .3s ease, filter .3s ease; }

:is(.single-ai_agent, .agent-sub) .agent-team__tab[aria-selected="true"] .agent-team__face { opacity: 1; filter: none; }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-team__tab:hover .agent-team__face { opacity: 1; filter: none; } }
:is(.single-ai_agent, .agent-sub) .agent-team__step-title { grid-column: 2; grid-row: 3; margin: 4px 0 0 !important; font-family: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", system-ui, sans-serif) !important; font-size: var(--fs-body, 16px) !important; font-weight: 500 !important; letter-spacing: -0.02em !important; line-height: 1.4; }
:is(.single-ai_agent, .agent-sub) .agent-team__step-desc { grid-column: 2; grid-row: 4; margin: 2px 0 0; font-size: var(--fs-sm, 14px); line-height: 1.5; color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-team__note { grid-column: 2; margin: 16px 0 0; font-size: var(--fs-sm, 14px); color: var(--text-2); }

/* « Ils font équipe avec lui » : six agents en cartes portrait */
.agent-rel { padding: 120px var(--av3-pad); background: var(--bg, #f5f4ee); }
.agent-rel__h { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 40px; }
.agent-rel__h h2 { margin: 0; font-size: var(--fs-h2, 40px) !important; font-weight: 400 !important; line-height: 1.15 !important; letter-spacing: -0.8px !important; }
.agent-rel__all { display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; border: 1px solid rgb(0 0 0 / .14); border-radius: 2px; background: #fff; font-size: var(--fs-sm, 14px); color: var(--ink); text-decoration: none; }
@media (hover: hover) { .agent-rel__all:hover { background: #1a1a1a; border-color: #1a1a1a; color: #fff; } }
.agent-rel__g { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.agent-rel__c { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.agent-rel__v { position: relative; display: block; aspect-ratio: 5 / 7; overflow: hidden; border-radius: var(--r-card, 4px); }
.agent-rel__v img { position: absolute; left: 50%; bottom: -14%; width: 100%; max-width: none; height: auto; margin-left: -50%; transition: transform .6s cubic-bezier(.16, 1, .3, 1); }
@media (hover: hover) { .agent-rel__c:hover .agent-rel__v img { transform: translateY(-4%); } }
.agent-rel__c b { font-size: var(--fs-body, 16px); font-weight: 500; letter-spacing: -0.02em; }
.agent-rel__c > span:last-child { font-size: var(--fs-sm, 14px); line-height: 1.35; color: var(--text-2); }

/* Barre collée en bas de l'écran (assets/js/agent-v3.js) : l'agent, trois garanties, ses deux boutons */
.agent-bar {
  position: fixed;
  z-index: 60;
  left: max(14px, calc((100% - 1440px) / 2 + 14px));
  right: max(14px, calc((100% - 1440px) / 2 + 14px));
  bottom: 4vh;
  display: flex;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
  padding: 14px 14px 14px 16px;
  border: 1px solid rgb(0 0 0 / .1);
  border-radius: var(--r-card, 4px);
  background: #fff;
  transform: translateY(calc(100% + 6vh));
  transition: transform .6s cubic-bezier(.16, 1, .3, 1);
}
.agent-bar.is-on { transform: none; }
.agent-bar__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.agent-bar__av { position: relative; flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: var(--r-card, 4px); background: linear-gradient(180deg, var(--c1, #f3f3e7), var(--c2, #f3f3e7)); }
.agent-bar__av img { position: absolute; left: -6%; top: -31%; width: 112%; max-width: none; height: auto; }
.agent-bar__id b { display: block; font-size: var(--fs-h5, 20px); font-weight: 400; letter-spacing: -0.3px; line-height: 1.15; }
.agent-bar__id span { display: block; overflow: hidden; font-size: var(--fs-sm, 14px); color: var(--text-2); white-space: nowrap; text-overflow: ellipsis; }
.agent-bar__re { display: flex; gap: 18px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: var(--fs-sm, 14px); color: var(--text-2); }
.agent-bar__re li {
  padding-left: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.5l3 3 6-7' stroke='%233d5a45' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 0 50% / 14px no-repeat;
  white-space: nowrap;
}
.agent-bar__btns { display: flex; flex: none; gap: 8px; }
.agent-bar__btns a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgb(0 0 0 / .14);
  border-radius: 2px;
  background: #fff;
  font-size: var(--fs-sm, 14px);
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.agent-bar .agent-bar__btns a { color: var(--ink) !important; text-decoration: none !important; }
.agent-bar .agent-bar__btns a.is-dark { border-color: #1a1a1a; background: #1a1a1a; color: #fff !important; }
@media (max-width: 1100px) {
  .agent-bar__re { display: none; }
  .agent-bar__btns { margin-left: auto; }
}
@media (max-width: 1024px) {
  .agent-kb { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 72px; padding-bottom: 72px; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-team { grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: 72px; padding-bottom: 72px; }
  :is(.single-ai_agent, .agent-sub) .agent-team__top { position: relative; top: auto; }
  :is(.single-ai_agent, .agent-sub) .agent-team__note { grid-column: auto; }
  .agent-rel { padding-top: 72px; padding-bottom: 72px; }
  .agent-rel__g { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-bar { left: 10px; right: 10px; bottom: 10px; gap: 10px; }
  .agent-bar__id span { display: none; }
  .agent-bar__btns a:not(.is-dark) { display: none; }
}
@media (max-width: 760px) {
  .agent-rel__g { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .agent-bar { transition: none; }
}

/* ===== Étape 6 : ancien héros (.agent-hero : sous-pages des agents, Chef de projet) =====
   Même présentation que le héros de l'étape 1 : bandeau aux couleurs de l'agent jusqu'en haut de la page,
   texte à gauche, portrait 3D à droite. L'illustration de l'ancien héros (constellation) laisse la place au portrait. */
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-hero,
:is(.single-ai_agent, .agent-sub) .agent-hero.has-background { margin: 0 !important; padding: 0 !important; background: transparent !important; overflow: visible; }
:is(.single-ai_agent, .agent-sub) .agent-hero__inner {
  display: block;
  box-sizing: border-box;
  max-width: none;
  min-height: 520px;
  margin: 0;
  padding: 150px calc(var(--av3-pad) + 440px) 72px var(--av3-pad);
  overflow: hidden;
  background: linear-gradient(180deg, var(--c1, var(--agent, #e9e6dc)) 0%, var(--c2, var(--agent, #f5f4ee)) 100%);
}
:is(.single-ai_agent, .agent-sub) .agent-hero__inner::after,
:is(.single-ai_agent, .agent-sub) .agent-hero__inner > .agent-hero__card { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-hero__portrait { position: absolute; z-index: 0; right: calc(var(--av3-pad) + 20px); bottom: 0; height: min(500px, calc(100% - 96px)); margin: 0; pointer-events: none; }
:is(.single-ai_agent, .agent-sub) .agent-hero__portrait img { display: block; width: auto; height: 100%; max-width: none; }
:is(.single-ai_agent, .agent-sub) .agent-hero__text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; max-width: none; margin: 0; text-align: left; }
:is(.single-ai_agent, .agent-sub) .agent-hero__text > * { margin: 0; }
:is(.single-ai_agent, .agent-sub) .agent-hero__text > .wp-block-spacer { display: none; }
:is(.single-ai_agent, .agent-sub) .agent-hero__crumb { display: block; padding: 0; border: 0; background: none; font-size: var(--fs-sm, 14px); color: var(--text-2); }
:is(.single-ai_agent, .agent-sub) .agent-hero__crumb a { color: var(--text-2); text-decoration: none; }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-hero__crumb a:hover { color: var(--ink); text-decoration: underline; } }
:is(.single-ai_agent, .agent-sub) .agent-hero__crumb-sep { margin: 0 4px; }
:is(.single-ai_agent, .agent-sub) .agent-hero h1.agent-hero__headline,
:is(.single-ai_agent, .agent-sub) .agent-hero p.agent-hero__subline {
  max-width: 13em;
  font-size: clamp(40px, 4vw, var(--fs-h1, 56px)) !important;
  font-weight: 400 !important;
  line-height: 1.08 !important;
  letter-spacing: -1.2px !important;
  text-align: left;
  text-wrap: balance;
}
:is(.single-ai_agent, .agent-sub) .agent-hero p.agent-hero__subline { margin-top: -20px; color: rgb(26 26 26 / .55); }
:is(.single-ai_agent, .agent-sub) .agent-hero p.agent-hero__desc { max-width: 34em; font-size: var(--fs-body, 16px); line-height: 1.5; color: var(--ink); text-align: left; }
:is(.single-ai_agent, .agent-sub) .agent-hero .agent-hero__ctas { justify-content: flex-start; gap: 8px; margin-top: 6px; }
:is(.single-ai_agent, .agent-sub) .agent-hero p.agent-hero__micro { font-size: var(--fs-sm, 14px); color: var(--text-2); text-align: left; }

/* Sous-pages : le texte simple (groupes sans classe « agent-… ») en colonne de lecture, l'appel final en bandeau
   noir. Les sections d'agent (héros, tâches, questions…) d'une sous-page gardent leur présentation pleine largeur. */
.agent-sub .agentsia-page-entry > .wp-block-group:not([class*="agent-"]):not(:has(.agent-hero__ctas)) { box-sizing: border-box; max-width: 740px; margin: 0 auto; padding: 0 24px; }
.agent-sub .agentsia-page-entry > .wp-block-group:not([class*="agent-"]):not(:has(.agent-hero__ctas)) h2 { margin: 56px 0 14px; font-size: var(--fs-h3, 28px) !important; font-weight: 400 !important; line-height: 1.2 !important; letter-spacing: -0.6px !important; }
.agent-sub .agentsia-page-entry > .wp-block-group:not([class*="agent-"]):not(:has(.agent-hero__ctas)) p { margin: 0 0 16px; font-size: var(--fs-body, 16px); line-height: 1.65; color: var(--ink); }
.agent-sub .agentsia-page-entry > .wp-block-spacer { height: 0 !important; }
.agent-sub .agentsia-page-entry > .agent-hero + .wp-block-spacer + .wp-block-group,
.agent-sub .agentsia-page-entry > .agent-hero + .wp-block-group { margin-top: 48px; }
.agent-sub .agentsia-page-entry > .wp-block-group.agent-faq { margin-top: 96px; }
.agent-sub .agentsia-page-entry > .wp-block-group:not(.agent-hero):has(> .wp-block-buttons.agent-hero__ctas) {
  box-sizing: border-box;
  max-width: none;
  margin: 0;
  padding: 120px var(--av3-pad);
  background: #1a1a1a;
  color: #fff;
  text-align: center;
}
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) h2 { margin: 0 0 14px; font-size: var(--fs-h2, 40px) !important; font-weight: 400 !important; letter-spacing: -0.8px !important; color: #fff; }
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) p { max-width: 640px; margin: 0 auto 24px; font-size: var(--fs-h5, 20px); line-height: 1.4; color: rgb(255 255 255 / .7); }
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) .agent-hero__ctas { justify-content: center; }
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) p a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) p:last-child { margin: 24px auto 0; font-size: var(--fs-sm, 14px); }
.agent-sub .agentsia-page-entry > .wp-block-group:has(> .wp-block-buttons.agent-hero__ctas) .wp-block-button__link { background: #fff; color: #1a1a1a; }

@media (max-width: 1024px) {
  :is(.single-ai_agent, .agent-sub) .agent-hero__inner { padding-top: 130px; padding-right: calc(var(--av3-pad) + 300px); }
  :is(.single-ai_agent, .agent-sub) .agent-hero__portrait { right: 16px; height: min(400px, calc(100% - 96px)); }
}
@media (max-width: 760px) {
  :is(.single-ai_agent, .agent-sub) .agent-hero__inner { display: flex; flex-direction: column; min-height: 0; padding: 112px var(--av3-pad) 0; }
  :is(.single-ai_agent, .agent-sub) .agent-hero__portrait { position: relative; right: auto; order: 99; align-self: center; height: 280px; margin-top: 8px; }
  :is(.single-ai_agent, .agent-sub) .agent-hero h1.agent-hero__headline,
  :is(.single-ai_agent, .agent-sub) .agent-hero p.agent-hero__subline { font-size: 34px !important; }
}

/* ===== « Pour aller plus loin » (.agentsia-related--subpages, écrit dans le contenu des fiches) =====
   Le contenu garde ses rangées de colonnes (3 + 2…) : on les fond en une seule grille régulière de cartes
   blanches, texte à gauche, titre en police éditoriale. La carte entière est cliquable (lien étendu) ;
   le texte du bouton, qui répète le titre, reste lu par les lecteurs d'écran mais n'est plus affiché. */
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  max-width: none;
  margin: 0;
  padding: 120px var(--av3-pad);
  background: var(--bg, #f5f4ee);
}
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > :not(.wp-block-columns) { grid-column: 1 / -1; justify-self: stretch; width: auto; max-width: none !important; margin-inline: 0 !important; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > .wp-block-spacer { display: none; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > h2.wp-block-heading {
  margin: 0 0 32px;
  text-align: left !important;
  font-size: var(--fs-h2, 40px) !important;
  font-weight: 400 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.8px !important;
  color: var(--ink);
}
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > .wp-block-columns,
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > .wp-block-columns > .wp-block-column { display: contents; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 200px;
  margin: 0;
  padding: 28px 28px 72px;
  border: 1px solid rgb(0 0 0 / .06);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  transition: border-color .3s ease, transform .3s cubic-bezier(.16, 1, .3, 1);
}
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card > * { align-self: stretch; width: auto; max-width: none !important; margin: 0 !important; text-align: left !important; }
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card:hover { transform: translateY(-3px); border-color: rgb(0 0 0 / .16); background: #fff; } }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card h3 {
  font-family: var(--display) !important;
  font-size: 24px !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  letter-spacing: -0.02em !important;
  color: var(--ink);
}
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card p { font-size: var(--fs-body, 16px); line-height: 1.5; letter-spacing: -0.02em; color: rgb(26 26 26 / .65); }
/* Flèche en bas à droite, qui glisse au survol */
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card::after {
  content: "";
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 32px;
  height: 32px;
  border: 1px solid rgb(0 0 0 / .12);
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4' stroke='%231a1a1a' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 50% / 14px no-repeat;
  transition: transform .3s cubic-bezier(.16, 1, .3, 1), background-color .3s, border-color .3s;
}
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card:hover::after { transform: translateX(4px); border-color: #1a1a1a; } }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-buttons { position: static; margin: 0; padding: 0; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-button { position: static; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-button__link {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  min-height: 0;
  padding: 0;
  border: 0 !important;
  border-radius: 8px;
  background: none !important;
  box-shadow: none !important;
  color: transparent !important;
  font-size: 0;
  transform: none !important;
}
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-button__link::before,
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-button__link::after { content: none !important; display: none !important; }
:is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card .wp-block-button__link:focus-visible { outline: 2px solid #1a1a1a; outline-offset: 2px; }

@media (max-width: 1024px) {
  :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 96px var(--av3-pad); }
}
@media (max-width: 640px) {
  :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages { grid-template-columns: minmax(0, 1fr); padding: 72px var(--av3-pad); }
  :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages > h2.wp-block-heading { font-size: 30px !important; margin-bottom: 16px; }
  :is(.single-ai_agent, .agent-sub) .agentsia-related--subpages .agentsia-card { min-height: 0; }
}

/* ===== Fonctionnalités (lignes .agent-feature-row) : cartes empilées de la maquette =====
   Le conteneur passe en blanc. Chaque ligne devient une carte : texte à gauche sur fond beige, visuel à droite sur
   l'aplat de sa couleur. Au défilement, les cartes se collent sous l'en-tête et la suivante recouvre la précédente,
   qui recule un peu (is-under, assets/js/agent-v3.js). Tablette, téléphone, écran bas : cartes simplement empilées. */
:is(.single-ai_agent, .agent-sub) .wp-block-group:has(> .agent-feature-row),
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-features { background-color: #fff !important; }
:is(.single-ai_agent, .agent-sub) .wp-block-group:has(> .agent-feature-row) { display: flex; flex-direction: column; gap: 24px; padding-bottom: 120px; }
:is(.single-ai_agent, .agent-sub) .wp-block-group:has(> .agent-feature-row) > .wp-block-spacer:last-child { display: none; }
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row,
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row--image-right {
  --af-h: min(520px, calc(100vh - var(--af-top, 120px) - 24px));
  position: sticky;
  top: var(--af-top, 120px);
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 1312px;
  min-height: var(--af-h);
  margin: 0 auto !important;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #f5f4ee;
  transform-origin: 50% 0;
  transition: transform .5s cubic-bezier(.16, 1, .3, 1), filter .5s cubic-bezier(.16, 1, .3, 1);
}
:is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row.is-under { transform: translateY(-16px) scale(.975); filter: brightness(.97); }
/* Texte toujours à gauche, visuel à droite (la maquette n'alterne pas) */
:is(.single-ai_agent, .agent-sub) .agent-feature-row > .agent-feature-panel--text { order: 1; display: flex; align-items: center; margin: 0; padding: 48px; background: #f5f4ee; }
:is(.single-ai_agent, .agent-sub) .agent-feature-row > .agent-feature-panel--visual,
:is(.single-ai_agent, .agent-sub) .agent-feature-row--image-right > .agent-feature-panel--visual {
  order: 2;
  display: grid;
  place-items: center;
  min-height: 0;
  margin: 0;
  padding: 40px;
  border-radius: 0;
}
:is(.single-ai_agent, .agent-sub) .agent-feature-panel--visual .wp-block-image { margin: 0; }
:is(.single-ai_agent, .agent-sub) .agent-feature-panel--visual .wp-block-image img { display: block; width: auto; max-width: 100%; height: auto; max-height: calc(var(--af-h) - 80px); margin: 0 auto; object-fit: contain; border-radius: 4px; }
:is(.single-ai_agent, .agent-sub) .agent-feature-panel__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 0; }
:is(.single-ai_agent, .agent-sub) .agent-feature-panel__inner > * { margin: 0 !important; }
:is(.single-ai_agent, .agent-sub) .agent-feature-row .agent-feature__subtitle {
  order: -1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: var(--fs-kicker, 10px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--text-2, rgb(26 26 26 / .65));
}
:is(.single-ai_agent, .agent-sub) .agent-feature-row .agent-feature__title {
  font-family: var(--wp--preset--font-family--instrument-sans, "Instrument Sans", system-ui, sans-serif) !important;
  font-size: var(--fs-h4, 24px) !important;
  font-weight: 400 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.02em !important;
  color: var(--ink);
}
:is(.single-ai_agent, .agent-sub) .agent-feature-row .agent-feature__desc { max-width: 420px; font-size: var(--fs-body, 16px); line-height: 1.5; letter-spacing: -0.02em; color: rgb(26 26 26 / .65); }
:is(.single-ai_agent, .agent-sub) .agent-feature-panel__inner .wp-block-group { display: flex; flex-direction: column; gap: 16px; max-width: none; margin: 0; }
:is(.single-ai_agent, .agent-sub) .agent-feature-panel__inner .wp-block-group > * { max-width: none; margin: 0 !important; }
/* Lien vers la sous-page : texte et flèche, pas de bouton */
:is(.single-ai_agent, .agent-sub) .agent-feature-row .wp-block-buttons { margin: 4px 0 0 !important; }
:is(.single-ai_agent, .agent-sub) .agent-feature-row .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0 0 3px;
  border: 0 !important;
  border-bottom: 1px solid rgb(0 0 0 / .2) !important;
  border-radius: 0;
  background: none !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font-size: var(--fs-sm, 14px);
  text-align: left;
  transform: none !important;
}
:is(.single-ai_agent, .agent-sub) .agent-feature-row .wp-block-button__link::before { content: none !important; }
:is(.single-ai_agent, .agent-sub) .agent-feature-row .wp-block-button__link::after {
  content: "" !important;
  display: block !important;
  flex: none;
  position: static !important;
  width: 14px;
  height: 14px;
  border: 0;
  border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3 8h10M9 4l4 4-4 4' stroke='%231a1a1a' stroke-width='1.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") 50% / 14px no-repeat !important;
  transition: transform .3s ease;
}
@media (hover: hover) { :is(.single-ai_agent, .agent-sub) .agent-feature-row .wp-block-button__link:hover::after { transform: translateX(3px); } }

/* Titre de la section fixé au-dessus des cartes (classe posée par assets/js/agent-v3.js) */
:is(.single-ai_agent, .agent-sub) .agent-features-head.is-fixed { position: sticky; top: 96px; z-index: 3; background: #fff; }
:is(.single-ai_agent, .agent-sub) .wp-block-columns.agent-features-head.is-fixed { margin-bottom: 0 !important; }

@media (max-width: 1024px), (max-height: 700px) {
  :is(.single-ai_agent, .agent-sub) .agent-features-head.is-fixed { position: relative; top: auto; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row,
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row--image-right,
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row.is-position-sticky { position: relative; top: auto; transform: none; filter: none; }
}
@media (max-width: 1024px) {
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row,
  :is(.single-ai_agent, .agent-sub) .wp-block-group.agent-feature-row--image-right { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  :is(.single-ai_agent, .agent-sub) .agent-feature-row > .agent-feature-panel--text { padding: 28px 20px; }
  :is(.single-ai_agent, .agent-sub) .agent-feature-row > .agent-feature-panel--visual,
  :is(.single-ai_agent, .agent-sub) .agent-feature-row--image-right > .agent-feature-panel--visual { padding: 20px; }
  :is(.single-ai_agent, .agent-sub) .agent-feature-panel--visual .wp-block-image img { max-height: none; }
  :is(.single-ai_agent, .agent-sub) .wp-block-group:has(> .agent-feature-row) { padding-bottom: 72px; }
}

/* Héros de la maquette, tablette et téléphone : portrait sous le texte, sans bulles */
@media (max-width: 1024px) {
  :is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) { min-height: 0; padding: 130px var(--av3-pad) 0; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__vis { position: relative; right: auto; order: 99; align-self: center; height: min(56svh, 460px); margin-top: 24px; }
  .agent-hs__bub { display: none; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__after { padding-top: 72px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__after .agent-hs__lead { font-size: 24px; }
}
@media (max-width: 760px) {
  :is(.single-ai_agent, .agent-sub) .agent-hs__intro:has(.agent-hs__vis) { padding-top: 112px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__vis { height: 360px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__after { padding-top: 56px; }
  :is(.single-ai_agent, .agent-sub) .agent-hs__after .agent-hs__trust { flex-direction: column; align-items: center; gap: 8px; }
}


/* Scène du héros et maquettes : avatar 3D de l'agent à la place de son visage dessiné (inc/agent-page-v3.php) */
.agent-hs__face3d .home-av3d img { left: -6%; top: -31%; width: 112%; height: auto; }
.agent-hs__mini.agent-hs__face3d .home-av3d img { left: -10%; top: -24%; width: 120%; }
