/* Polices locales (OFL, voir src/assets/fonts/*-OFL.txt). Aucun appel à
   Google Fonts : les fichiers sont servis depuis /assets/fonts/. */
@font-face {
  font-family: Manrope;
  src: url('/assets/fonts/manrope.ttf') format('truetype');
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}


/* Jetons de design (voir 03-design/tokens.json et direction-artistique.md du
   kit). Une seule source de vérité pour couleurs, typographies, grille. */
:root {
  --paper: #faf9f6;
  --ink: #241529;
  --citron: #e4f47a;
  --muted: #655d66;
  --line: #d4cfd3;
  /* Bande crème (méthode de l'accueil) : --muted y garde un contraste AA (~5,4:1). */
  --cream: #f0eee9;
  --control: #807580;
  --white: #fff;
  --error: #a02a3c;
  --success: #246547;

  --sans: Manrope, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;

  --max: 1320px;
  --side: clamp(22px, 4vw, 64px);
  --motion: 200ms;
}


/* Reset minimal, typographie de base, liens, focus visible, sélection. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 5px;
}

::selection {
  background: var(--citron);
  color: var(--ink);
}

img {
  max-width: 100%;
  display: block;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: min(calc(100% - var(--side) * 2), var(--max));
  margin-inline: auto;
}

.skip {
  position: fixed;
  left: 20px;
  top: -90px;
  background: var(--ink);
  color: #fff;
  z-index: 30;
  padding: 12px;
}

.skip:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Réassurance ("Gratuit · 30 minutes · Sans engagement · Rappel sous 24 h
   ouvrées") : sous les boutons du hero d'accueil, sous le bouton du bloc de
   clôture (couleur claire, voir .closing-action) et au-dessus du bouton
   d'envoi du formulaire de contact. */
.reassurance {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 18px 0;
  padding: 0;
  font-size: 13px;
  color: var(--muted);
}

/* Dans le hero, la ligne passe sur la photo : pastille claire pour rester lisible. */
.home-hero .reassurance {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(250, 249, 246, 0.88);
  color: var(--ink);
}

.reassurance li:not(:first-child)::before {
  content: '·';
  margin: 0 10px;
}

/* Marqueur visible des champs légaux non complétés (spec §4). Jamais publié
   sans que la valeur réelle vienne remplacer ce texte. */
.todo {
  background: var(--citron);
  color: var(--ink);
  padding: 0 4px;
  font-weight: 600;
  box-decoration-break: clone;
}


/* En-tête et navigation principale (état actif, menu mobile). */
.site-header {
  height: 116px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  position: relative;
  z-index: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 19px;
  font-size: 27px;
  font-weight: 600;
  letter-spacing: -1.1px;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 42px;
  height: 44px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 42px;
  font-size: 14px;
}

.nav a {
  padding: 12px 0;
  white-space: nowrap;
}

.nav a[aria-current='page'] {
  text-decoration: underline;
  text-underline-offset: 7px;
}

/* Bouton compact rempli (plutôt qu'un simple lien souligné), cohérent avec
   .button ailleurs sur le site. Le libellé visuel se raccourcit entre 961 et
   1280px (voir .nav-contact-short en 11-responsive.css) ; l'aria-label de
   l'ancre reste toujours "Demander un appel gratuit" pour un nom accessible
   stable, indépendant du texte affiché. */
.nav .nav-contact {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  background: var(--ink);
  color: #fff;
  font-weight: 500;
}

.nav .nav-contact:hover {
  background: #3c2942;
  text-decoration: none;
}

.nav-contact-short {
  display: none;
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--control);
  padding: 8px 12px;
  color: var(--ink);
  min-height: 44px;
}


/* Hero d'accueil (photographie + H1 deux styles) et surtitre partagé. */
.eyebrow {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  line-height: 1.6;
  text-transform: uppercase;
  margin: 0 0 24px;
}

.home-top {
  position: relative;
  overflow: hidden;
}

/* La photo est un <picture> (srcset AVIF/WebP) : le wrapper porte le
   positionnement, l'<img> interne remplit le cadre. */
.home-top > .hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.home-top > .hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.home-top::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(250, 249, 246, 0.3) 0%, rgba(250, 249, 246, 0.08) 48%, transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.home-top .site-header,
.home-hero {
  position: relative;
  z-index: 1;
}

.home-top .site-header .nav-contact {
  display: none;
}

.home-top .site-header {
  justify-content: flex-start;
  gap: 10vw;
}

.home-top .nav {
  gap: 42px;
}

.home-hero {
  padding: 64px 0 100px;
  min-height: 625px;
}

.home-title {
  font-size: clamp(64px, 7.25vw, 108px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.065em;
  margin: 0;
  max-width: 1000px;
}

.home-title > span {
  display: block;
  white-space: nowrap;
}

.home-title em {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.16em;
  line-height: 0.94;
  letter-spacing: -0.035em;
  display: block;
  white-space: nowrap;
  font-style: italic;
}

.dot {
  color: var(--citron);
}

.hero-sub {
  font-size: 24px;
  line-height: 1.4;
  max-width: 510px;
  margin: 34px 0 30px;
  letter-spacing: -0.025em;
}

.buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  min-height: 54px;
  padding: 14px 26px;
  background: var(--ink);
  color: white;
  border: 1px solid var(--ink);
  font-size: 14px;
  font-weight: 500;
  transition: background var(--motion), transform var(--motion);
  text-decoration: none;
}

.button:hover {
  background: #3c2942;
  text-decoration: none;
  transform: translateY(-2px);
}

.button.secondary {
  color: var(--ink);
  border-color: var(--control);
  background: rgba(250, 249, 246, 0.65);
}

.button.secondary:hover {
  background: #fff;
}

.button[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.65;
}
.button[aria-disabled='true']:hover {
  transform: none;
}

.arrow {
  font-size: 21px;
  font-family: Arial, sans-serif;
  font-weight: 400;
}

/* Sur mobile, la photo devient un bloc indépendant après le texte (DA §Hero
   et photographie) ; masquée par défaut, réaffichée sous 640px. */
.home-mobile-photo {
  display: none;
}

.home-mobile-photo img {
  width: 100%;
  height: 305px;
  object-fit: cover;
  object-position: 77% center;
}


/* Rythme éditorial : sections espacées, grands blocs projets alternés,
   liste d'expertises numérotée, méthode en quatre temps, CTA de clôture. */
.section {
  padding-block: 104px;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
}

.section-title {
  font-family: var(--serif);
  font-size: 62px;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 32px;
}

.section-lede {
  max-width: 620px;
  font-size: 18px;
  margin: 0;
  color: var(--muted);
}

.showcase-heading {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 54px;
}

.showcase-heading .section-title {
  margin-bottom: 0;
}

.editorial-project {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 60px;
  align-items: center;
  margin-block: 64px;
}

.editorial-project.reverse {
  grid-template-columns: 1fr 1.45fr;
}

.editorial-project.reverse .project-media {
  order: 2;
}

.editorial-project.reverse .project-copy {
  order: 1;
}

.project-media {
  display: block;
  position: relative;
  overflow: hidden;
  background: #eeede8;
}

.project-media img {
  width: 100%;
  aspect-ratio: 1.5;
  object-fit: cover;
  transition: transform 0.4s;
}

.project-media:hover img {
  transform: scale(1.018);
}

.project-copy h3 {
  font-size: 31px;
  line-height: 1.2;
  letter-spacing: -0.035em;
  font-weight: 600;
  margin: 0 0 22px;
}

.project-copy p {
  color: var(--muted);
  font-size: 16px;
}

.status {
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 17px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  min-height: 44px;
  font-size: 14px;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
}

.section-grid {
  display: grid;
  grid-template-columns: 1fr 1.7fr;
  gap: 64px;
}

.expertise-list {
  border-top: 1px solid var(--line);
}

.expertise-row {
  display: grid;
  grid-template-columns: 40px 1fr 26px;
  gap: 20px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.expertise-row:hover {
  text-decoration: none;
}

.expertise-row:hover h3 {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.expertise-row .num {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--muted);
  padding-top: 6px;
}

.expertise-row h3 {
  margin: 0 0 8px;
  font-weight: 500;
  font-size: 23px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.expertise-row p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
  max-width: 570px;
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
  margin: 48px 0;
}

.method-step {
  border-top: 1px solid var(--control);
  padding-top: 20px;
}

.method-step .num {
  font: italic 38px/1 var(--serif);
}

.method-step h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 23px 0 12px;
}

.method-step p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}

.closing {
  padding: 92px 0;
  background: var(--ink);
  color: var(--paper);
}

.closing .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 56px;
}

.closing h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 64px;
  line-height: 1.04;
  max-width: 630px;
  margin: 0;
}

.closing .button {
  background: var(--citron);
  border-color: var(--citron);
  color: var(--ink);
  white-space: nowrap;
}

/* Bouton + réassurance du bloc de clôture, empilés sous le titre. */
.closing-action {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

/* Fond aubergine (--ink) : la réassurance reprend le --paper du bloc en
   version légèrement atténuée, avec un contraste largement AA (~9:1). */
.closing-action .reassurance {
  margin: 0;
  color: rgba(250, 249, 246, 0.75);
}

/* Grille de cartes texte (section « Un besoin, une brique » de /expertises/). */
.charge-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.charge-card {
  background: var(--paper);
  padding: 28px 24px 30px;
}
.charge-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}
.charge-answer {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Section « Un besoin, une brique » (accueil) : réutilise .charge-grid /
   .charge-card, avec un intitulé de brique en plus des deux paragraphes. */
.brique-name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  font-weight: 400;
  margin: 0 0 14px;
}
.brique-explication {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.brique-exemple {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}
.brique-exemple strong {
  color: var(--ink);
  font-weight: 600;
}
.brique-cta {
  margin-top: 40px;
}

/* --- Accueil ---------------------------------------------------------------
   Rythme : sections papier séparées d'un filet, bande crème (méthode),
   bande aubergine (confiance), bloc de clôture aubergine. */
.section--band {
  border-top: 0;
}
.section--band + .section,
.section + .closing {
  border-top: 0;
}
.section--cream {
  background: var(--cream);
}
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink .eyebrow,
.section--ink .section-lede,
.section--ink p {
  color: rgba(250, 249, 246, 0.78); /* ~10:1 sur --ink */
}
.section--ink .section-title em {
  color: var(--citron);
}
.section--ink a:focus-visible {
  outline-color: var(--citron);
}

/* Cartes « avant → après » : un seul lien par carte. */
.gain-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.gain-grid > li {
  display: flex;
}
.gain-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 44px;
  padding: 30px 28px 32px;
  background: var(--paper);
  transition: background-color var(--motion);
}
a.gain-card:hover {
  text-decoration: none;
  background: var(--white);
}
a.gain-card:focus-visible {
  outline-offset: -3px;
  z-index: 1;
}
.gain-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 36px 22px 0;
}
.gain-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}
.gain-arrow {
  flex-shrink: 0;
  width: 48px;
  height: 26px;
  padding: 0 4px;
  background: var(--citron);
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  transition: transform var(--motion);
}
a.gain-card:hover .gain-arrow {
  transform: translateX(6px);
}
.gain-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin: 0;
}
.gain-text {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.gain-go {
  position: absolute;
  top: 26px;
  right: 24px;
  font-size: 17px;
  color: var(--muted);
  transition: color var(--motion);
}
a.gain-card:hover .gain-go {
  color: var(--ink);
}
.gain-cta {
  margin-top: 40px;
}

/* Service clé en main : liste compacte (titres seuls). */
.expertise-list--compact .expertise-row {
  padding: 18px 0;
  align-items: center;
}
.expertise-list--compact .expertise-row .num {
  padding-top: 0;
}
.expertise-list--compact .expertise-row h3 {
  margin: 0;
  font-size: 22px;
}

/* Méthode en frise : pastilles citron reliées par un filet ; l'ordre est porté par <ol>. */
.timeline {
  list-style: none;
  margin: 8px 0 20px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.timeline-step {
  position: relative;
}
.timeline-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 28px;
  left: 72px;
  right: -16px;
  height: 1px;
  background: var(--control);
}
.timeline-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--citron);
  font: italic 30px/1 var(--serif);
  margin-bottom: 20px;
}
.timeline-period {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 6px;
}
.timeline-step h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 8px;
}
.timeline-step p:last-child {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}
.timeline-note {
  margin: 0 0 28px;
}
.band-tools {
  margin-top: 56px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
/* Grand écran : titre et mention à gauche, logos à droite (une seule bande basse). */
@media (min-width: 961px) {
  .band-tools .tools-strip {
    display: grid;
    grid-template-columns: 1fr 1.7fr;
    column-gap: 64px;
    align-items: start;
  }
  .band-tools .tools-grid {
    grid-column: 2;
    grid-row: 1 / span 2;
    padding-top: 4px;
  }
  .band-tools .tools-strip .form-help {
    margin-bottom: 0;
  }
  /* Accueil : sections un peu plus serrées, les bandes de couleur marquent déjà le rythme. */
  .home-main .section {
    padding-block: 88px;
  }
}

/* Confiance : trois engagements sur fond aubergine. */
.trust-points {
  list-style: none;
  margin: 40px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.trust-points li {
  border-top: 2px solid var(--citron);
  padding-top: 18px;
}
.trust-points h3 {
  color: var(--paper);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px;
}
.trust-points p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* Apparition douce au défilement : ne masque rien sans JavaScript (html.js-ready
   posé par site.js) ni quand l'utilisateur limite les animations. */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .reveal {
    transition: opacity 0.7s ease, transform 0.7s ease;
  }
  .js-ready .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(24px);
  }
}
@media print {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
}


/* Pied de page : navigation secondaire et informations réelles. */
.site-footer {
  padding: 64px 0 28px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 45px;
  margin-bottom: 50px;
}

.footer-top p {
  max-width: 300px;
  font-size: 14px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  font-size: 13px;
}

.footer-links a {
  min-height: 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-size: 11px;
  color: var(--muted);
}


/* Hero intérieur, mise en page de lecture (sommaire + contenu), FAQ, liens
   liés, notices d'avertissement. */
.page-hero {
  padding: 68px 0 70px;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(52px, 6vw, 84px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.055em;
  max-width: 1100px;
  margin: 0;
}

.page-hero h1 em {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.15em;
  line-height: 0.98;
  letter-spacing: -0.028em;
  display: block;
  font-style: italic;
}

.page-hero .intro {
  font-size: 22px;
  line-height: 1.5;
  max-width: 800px;
  margin: 32px 0 0;
  color: var(--muted);
}

.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 36px;
}

.crumb a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 780px);
  gap: 75px;
  justify-content: space-between;
  padding-block: 80px;
}

.aside {
  font-size: 12px;
  color: var(--muted);
}

.aside p {
  margin-top: 0;
}

.aside a {
  display: block;
  min-height: 40px;
}

.reading {
  min-width: 0;
  overflow-wrap: anywhere;
}

.reading h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 44px;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
}

.reading p {
  margin: 0 0 24px;
}

.reading ul,
.reading ol {
  padding-left: 24px;
  margin: 20px 0 24px;
}

.reading li {
  padding-left: 5px;
  margin-bottom: 11px;
}

.reading-section {
  margin-bottom: 54px;
}

.reading-section:last-child {
  margin-bottom: 0;
}

.reading-section a {
  text-decoration: underline;
}

.notice {
  border-left: 3px solid var(--citron);
  padding: 18px 24px;
  margin-bottom: 36px;
  background: #f0eee9;
  font-size: 14px;
  line-height: 1.65;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
}

.notice p {
  margin: 0;
}

.faq {
  padding-top: 20px;
}

.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  min-height: 44px;
  list-style: none;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
/* Remplace le triangle du navigateur par un « + » discret qui pivote à l'ouverture. */
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--control);
  border-radius: 50%;
  font-weight: 400;
  line-height: 1;
  transition: transform var(--motion), background-color var(--motion);
}
.faq details[open] summary::after {
  transform: rotate(45deg);
  background: var(--citron);
  border-color: var(--citron);
}

.faq details p {
  font-size: 16px;
  color: var(--muted);
  margin: 18px 0 4px;
}

.related {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.related h2 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 400;
  margin: 0 0 24px;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 38px;
}

.related-links a {
  border-bottom: 1px solid var(--control);
  min-height: 44px;
  padding: 7px 0;
  font-size: 14px;
}


/* Formulaire de contact : balisage figé par docs/contrat-formulaire.md.
   Champs pleine largeur sur mobile, erreurs proches des champs, piège anti-
   spam masqué visuellement mais focusable exclu (tabindex=-1). */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
  padding-block: 80px;
}

.contact-layout h2 {
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
}

.contact-layout aside p {
  font-size: 16px;
  color: var(--muted);
}

.form-row {
  margin-bottom: 26px;
}

.form-row label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 9px;
}

.form-row input,
.form-row select,
.form-row textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--control);
  border-radius: 2px;
  background: transparent;
  color: var(--ink);
  padding: 14px 16px;
  min-height: 52px;
}

.form-row textarea {
  min-height: 160px;
  resize: vertical;
}

.form-row input:invalid:not(:placeholder-shown) {
  border-color: var(--error);
}

.form-help {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-top: 8px;
}

.form-error {
  font-size: 12px;
  color: var(--error);
  display: block;
  margin-top: 8px;
  font-weight: 600;
}

.form-errors {
  border: 1px solid var(--error);
  color: var(--error);
  padding: 16px 20px;
  margin-bottom: 26px;
  font-size: 14px;
}

.form-errors:focus-visible {
  outline: 3px solid var(--error);
  outline-offset: 3px;
}

.form-status {
  font-size: 14px;
  color: var(--muted);
  margin-top: 16px;
}

.form-status[data-state='success'] {
  color: var(--success);
  font-weight: 600;
}

.form-status[data-state='error'] {
  color: var(--error);
  font-weight: 600;
}

.form-notice {
  font-size: 12px;
  margin: 24px 0;
  color: var(--muted);
}

.form-notice a {
  text-decoration: underline;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

/* Piège anti-spam : masqué visuellement, exclu de la tabulation, jamais
   présenté à un humain (spec §formulaire, contrat-formulaire.md). */
.hp {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  left: -9999px;
}


/* Portefeuille : filtres par famille et liste des dossiers déclarés. */
.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 30px 0 44px;
}

.filter {
  border: 1px solid var(--control);
  background: transparent;
  color: var(--ink);
  padding: 12px 18px;
  font-size: 12px;
  min-height: 44px;
}

.filter[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: white;
}

.portfolio-item {
  border-top: 1px solid var(--line);
  padding: 30px 0;
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 28px;
  align-items: start;
}

.portfolio-item h2 {
  font-size: 25px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin: 0 0 8px;
  font-weight: 500;
}

.portfolio-item p {
  color: var(--muted);
  font-size: 15px;
  max-width: 700px;
  margin: 0;
}

.portfolio-item .num {
  font-size: 12px;
  color: var(--muted);
}

.portfolio-item .text-link {
  white-space: nowrap;
}

.portfolio-list {
  padding-bottom: 55px;
}

.empty {
  padding: 25px;
  background: #f0eee9;
}

.utility {
  min-height: 50vh;
}

/* CTA de fin d'index sectoriel ("Votre secteur n'est pas cité ?"). */
.sector-index-cta {
  margin-top: 60px;
}

.code-field {
  font-family: monospace;
  font-size: 13px;
  overflow-wrap: anywhere;
  color: var(--muted);
}


/* Bandeau « Outils avec lesquels nous travaillons » (accueil, pages service /
   sector_detail / sector avec `tools`). Logos monochromes (currentColor) issus
   de simple-icons ; puce texte sobre pour les marques sans icône disponible.
   Zones non cliquables : aucun lien vers les marques (voir scripts/lib/logos.mjs). */
.tools-strip-section {
  padding-block: 64px;
  border-top: 1px solid var(--line);
}

.tools-strip-title {
  font-family: var(--sans);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.tools-strip .form-help {
  margin: 0 0 28px;
  max-width: 620px;
}

.tools-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 40px;
}

.tools-item {
  display: flex;
  align-items: center;
  min-height: 26px;
}

.tools-logo {
  height: 24px;
  width: auto;
  color: var(--ink);
  flex-shrink: 0;
}

.tools-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: 13px/1.4 var(--sans);
  color: var(--ink);
  white-space: nowrap;
}

.tools-strip--compact .tools-strip-title {
  font-size: 18px;
}

.tools-strip--compact .tools-grid {
  gap: 20px 30px;
}

.tools-strip--compact .tools-logo {
  height: 22px;
}

.tools-strip--compact .tools-chip {
  padding: 3px 12px;
  font-size: 12px;
}

/* Logo + nom dans la même pastille que les marques sans icône. */
.tools-chip--logo {
  gap: 8px;
}
.tools-chip--logo .tools-logo,
.tools-strip--compact .tools-chip--logo .tools-logo {
  height: 16px;
}

/* Projets construits par l'équipe (accueil, /realisations/). */
.projets-grid {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.projet-card {
  background: var(--paper);
  display: flex;
  flex-direction: column;
}
.projet-corps {
  padding: 30px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.projet-card--visuel .projet-corps {
  padding-top: 24px;
}
/* Visuel provisoire (illustration SVG 960×600), remplaçable par une capture de même format. */
.projet-visuel {
  background: #e8e5de;
  border-bottom: 1px solid var(--line);
}
.projet-visuel img {
  width: 100%;
  height: auto;
  aspect-ratio: 8 / 5;
  object-fit: cover;
}
.projets-grid--compact .projet-corps {
  gap: 8px;
  padding-bottom: 28px;
}
.projets-grid--compact .projet-nom {
  font-size: 22px;
}
.projets-grid--compact .projet-accroche {
  font-size: 20px;
}
.projet-card .status {
  margin: 0;
}
.projet-nom {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
}
.projet-accroche {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.25;
  margin: 0;
}
.projet-description,
.projet-preuve {
  font-size: 15px;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}
.projet-preuve strong {
  color: var(--ink);
  font-weight: 600;
}
.projet-tech {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.projet-tech li {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
}
.projet-card .text-link {
  align-self: flex-start;
  margin-top: auto;
}

/* Note « votre logiciel n'est pas dans la liste ». */
.tools-connect {
  margin: 24px 0 0;
  max-width: 720px;
  font-size: 15px;
  line-height: 1.6;
}

/* Stack technique : deux groupes de badges. */
.tech-stack .section-lede {
  margin-bottom: 32px;
}
.tech-groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.tech-groups .tools-strip-title {
  font-size: 16px;
}

/* Frise en semaines : 4 étapes, libellé de période en petites capitales. */
.method-steps--4 {
  grid-template-columns: repeat(4, 1fr);
}
.method-steps--4 .method-step .num {
  font-family: var(--sans);
  font-style: normal;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.price-line {
  max-width: 720px;
  margin: 8px 0 24px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.35;
}
.signature-line {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
  margin-top: 16px;
}

/* WhatsApp : lien secondaire, n'apparaît que si un numéro est configuré. */
.whatsapp-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.closing .whatsapp-link {
  color: var(--paper);
}
.whatsapp-block {
  padding-bottom: 40px;
}

@media (max-width: 960px) {
  .tech-groups,
  .method-steps--4,
  .projets-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .tech-groups,
  .method-steps--4,
  .projets-grid {
    grid-template-columns: 1fr;
  }
  .price-line {
    font-size: 20px;
  }
}


/* Points de rupture de la maquette : 1100 / 960 / 640 (voir tokens.json).
   Approche desktop-first par max-width, fidèle à la référence validée. */

@media (min-width: 1600px) {
  .home-title {
    font-size: 110px;
  }
  .home-hero {
    min-height: 705px;
    padding-top: 90px;
  }
  .home-top > .hero-photo {
    object-position: center 45%;
  }
}

/* Entre 961 et 1280px, le bouton .nav-contact affiche un libellé court pour
   ne pas casser l'en-tête (nav + bouton) ; l'aria-label de l'ancre reste
   "Demander un appel gratuit" dans tous les cas (voir headerHtml). */
@media (max-width: 1280px) and (min-width: 961px) {
  .nav-contact-full {
    display: none;
  }
  .nav-contact-short {
    display: inline;
  }
}

@media (max-width: 1100px) {
  .home-title {
    font-size: 7.5vw;
  }
  .home-hero {
    padding-top: 55px;
    min-height: 570px;
  }
  .hero-sub {
    font-size: 21px;
    max-width: 410px;
  }
  .home-top .site-header {
    gap: 7vw;
  }
  .nav {
    gap: 23px;
  }
  .brand {
    font-size: 24px;
    gap: 13px;
  }
  .section-grid,
  .showcase-heading {
    gap: 40px;
  }
  .editorial-project {
    gap: 38px;
  }
  .content-layout {
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 45px;
  }
  .section-title {
    font-size: 53px;
  }
  .closing h2 {
    font-size: 56px;
  }
  .contact-layout {
    gap: 48px;
  }
  .footer-top {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

@media (max-width: 1100px) {
  .trust-points {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 960px) {
  .charge-grid,
  .gain-grid {
    grid-template-columns: 1fr 1fr;
  }
  /* Frise verticale : pastille à gauche, filet vertical vers l'étape suivante. */
  .timeline {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .timeline-step {
    padding-left: 76px;
    min-height: 56px;
  }
  .timeline-num {
    position: absolute;
    top: 0;
    left: 0;
  }
  .timeline-step:not(:last-child)::after {
    top: 64px;
    bottom: -20px;
    left: 28px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .site-header {
    height: 96px;
  }
  .nav {
    gap: 20px;
  }
  .nav-contact {
    display: none;
  }
  .home-top .nav {
    gap: 26px;
  }
  .home-top .site-header {
    gap: 5vw;
  }
  .home-hero {
    min-height: 520px;
    padding-top: 38px;
    padding-bottom: 75px;
  }
  .hero-sub {
    font-size: 20px;
    max-width: 370px;
  }
  .section {
    padding-block: 80px;
  }
  .section-grid,
  .showcase-heading {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .showcase-heading {
    margin-bottom: 32px;
  }
  .method-steps {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .content-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    padding-block: 60px;
  }
  .aside {
    display: none;
  }
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }
  .contact-layout aside {
    max-width: 660px;
    /* Sur petit écran, le formulaire passe avant les explications. */
    order: 2;
  }
  .closing .wrap {
    display: block;
  }
  .closing .button {
    margin-top: 30px;
  }
  .portfolio-item {
    grid-template-columns: 28px 1fr;
  }
  .portfolio-item > .text-link {
    grid-column: 2;
    justify-self: start;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-top > div:first-child {
    grid-column: 1 / -1;
  }
  .footer-top p {
    max-width: 480px;
  }
}

@media (max-width: 640px) {
  .charge-grid,
  .gain-grid {
    grid-template-columns: 1fr;
  }
  .gain-card {
    padding: 24px 20px 26px;
  }
  .gain-quote {
    font-size: 22px;
    margin-bottom: 16px;
  }
  .gain-go {
    top: 22px;
    right: 18px;
  }
  .band-tools {
    margin-top: 40px;
    padding-top: 32px;
  }
  .charge-quote {
    font-size: 22px;
  }
  body {
    font-size: 16px;
  }
  .site-header {
    height: 90px;
    gap: 15px;
  }
  .brand {
    font-size: 23px;
    gap: 11px;
  }
  .brand img {
    width: 30px;
    height: 35px;
  }
  .menu-toggle {
    display: block;
  }
  .nav {
    display: flex;
    gap: 0;
    align-items: stretch;
    flex-direction: column;
    position: absolute;
    top: 75px;
    left: 0;
    right: 0;
    padding: 20px;
    background: var(--paper);
    border: 1px solid var(--line);
    box-shadow: 0 14px 26px rgba(36, 21, 41, 0.08);
  }
  /* Sans JavaScript, le menu reste visible en flux (voir requirement §9 :
     "menu visible sans JS comme dans la maquette"). */
  .js-ready .nav:not(.open) {
    display: none;
  }
  .nav a {
    padding: 13px 4px;
  }
  .nav .nav-contact {
    display: block;
    margin-top: 8px;
    padding: 12px 18px;
  }
  .home-top .site-header {
    justify-content: space-between;
    gap: 12px;
  }
  .home-top .nav {
    gap: 0;
  }
  .home-top .site-header .nav-contact {
    display: block;
  }
  .home-top > .hero-photo {
    display: none;
  }
  .home-top::after {
    display: none;
  }
  .home-hero {
    padding: 44px 0 0;
    min-height: 0;
  }
  .home-title {
    font-size: clamp(38px, 10.5vw, 67px);
    letter-spacing: -0.065em;
    line-height: 1.04;
  }
  .home-title > span {
    white-space: normal;
  }
  .home-title em {
    font-size: 1.25em;
    white-space: normal;
    line-height: 0.96;
    max-width: 100%;
    margin-top: 7px;
    letter-spacing: -0.035em;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 0.2em;
    margin-bottom: 25px;
  }
  .hero-sub {
    font-size: 19px;
    max-width: 100%;
    margin: 27px 0;
  }
  .buttons {
    align-items: stretch;
    gap: 12px;
  }
  .buttons .button {
    flex: 1 1 auto;
    padding-inline: 18px;
    font-size: 13px;
  }
  .home-mobile-photo {
    display: block !important;
    margin-top: 40px;
  }
  .home-hero.wrap {
    width: 100%;
  }
  .hero-mobile-copy {
    width: calc(100% - var(--side) * 2);
    margin-inline: auto;
  }
  .section {
    padding-block: 64px;
  }
  .section-title {
    font-size: 46px;
    line-height: 1.03;
  }
  .section-lede {
    font-size: 16px;
  }
  .editorial-project,
  .editorial-project.reverse {
    grid-template-columns: 1fr;
    gap: 24px;
    margin-block: 45px;
  }
  .editorial-project.reverse .project-media,
  .editorial-project.reverse .project-copy {
    order: initial;
  }
  .project-copy h3 {
    font-size: 28px;
    margin-bottom: 15px;
  }
  .project-copy p {
    font-size: 15px;
  }
  .status {
    font-size: 9px;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
  }
  .expertise-row {
    grid-template-columns: 26px 1fr 20px;
    gap: 14px;
    padding-block: 23px;
  }
  .expertise-row h3 {
    font-size: 22px;
  }
  .expertise-row p {
    font-size: 14px;
  }
  .method-steps {
    grid-template-columns: 1fr;
    gap: 30px;
    margin: 32px 0;
  }
  .method-step h3 {
    margin: 15px 0 8px;
  }
  .method-step p {
    max-width: 480px;
  }
  .closing {
    padding: 60px 0;
  }
  .closing h2 {
    font-size: 45px;
  }
  .closing .button {
    white-space: normal;
    text-align: center;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 35px 20px;
  }
  .footer-links {
    font-size: 12px;
    gap: 14px;
  }
  .footer-bottom {
    display: block;
    font-size: 10px;
  }
  .footer-bottom span {
    display: block;
    margin-top: 10px;
  }
  .site-footer {
    padding-top: 50px;
  }
  .page-hero {
    padding: 36px 0 44px;
  }
  .page-hero h1 {
    /* 43px à 390px ; plus petit en dessous pour que les mots longs (« d’automatisation ») tiennent à 320px. */
    font-size: clamp(34px, 11vw, 43px);
    line-height: 1.06;
    overflow-wrap: break-word;
  }
  .page-hero h1 em {
    font-size: 1.2em;
  }
  .page-hero .intro {
    font-size: 19px;
    margin-top: 24px;
  }
  .crumb {
    margin-bottom: 24px;
    font-size: 10px;
  }
  .content-layout {
    padding-block: 44px;
  }
  .reading h2 {
    font-size: 36px;
  }
  .reading-section {
    margin-bottom: 42px;
  }
  .reading p,
  .reading li {
    font-size: 16px;
  }
  .faq summary {
    font-size: 15px;
  }
  .notice {
    padding: 15px 18px;
    font-size: 13px;
  }
  .contact-layout {
    padding-block: 45px;
  }
  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form-row {
    margin-bottom: 23px;
  }
  .portfolio-item {
    gap: 16px;
    grid-template-columns: 24px 1fr;
  }
  .portfolio-item h2 {
    font-size: 23px;
  }
  .portfolio-item p {
    font-size: 14px;
  }
  .filters {
    gap: 8px;
    margin-top: 25px;
  }
  .filter {
    padding: 10px 13px;
    font-size: 11px;
  }
  .related {
    padding-block: 48px;
  }
  .related h2 {
    font-size: 36px;
  }
  .related-links {
    gap: 12px 28px;
  }
  .tools-strip-section {
    padding-block: 48px;
  }
  .tools-strip-title {
    font-size: 19px;
  }
  .tools-grid {
    gap: 18px 24px;
  }
}

/* Dégradation propre sans JavaScript : le menu mobile reste dans le flux au
   lieu d'être un panneau caché (requirement §9). */
@media (max-width: 640px) {
  html:not(.js-ready) .site-header {
    height: auto;
    min-height: 90px;
    flex-wrap: wrap;
    padding-block: 20px;
  }
  html:not(.js-ready) .nav {
    position: static;
    flex-basis: 100%;
    box-shadow: none;
  }
  html:not(.js-ready) .menu-toggle {
    display: none;
  }
}

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

@media print {
  .nav,
  .menu-toggle,
  .buttons,
  .closing,
  .site-footer,
  .aside,
  .filters {
    display: none !important;
  }
  body {
    background: white;
  }
  .wrap {
    width: 100%;
  }
  .home-top > .hero-photo {
    opacity: 0.15;
  }
  .section {
    padding-block: 30px;
  }
  .content-layout {
    display: block;
  }
  .page-hero h1 {
    font-size: 42px;
  }
  .reading-section {
    break-inside: avoid;
  }
}


/* Bandeau de consentement : carte en bas à gauche (le robot de l'assistant
   reste en bas à droite), pleine largeur sur mobile. Accepter et Refuser
   ont exactement le même style. */
.consent {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(440px, calc(100vw - 40px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 18px 48px rgba(36, 21, 41, 0.2);
  font-family: var(--sans);
}
.consent[hidden] {
  display: none;
}
.consent-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.consent-text {
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.5;
}
.consent-text a {
  color: inherit;
}
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.consent-button {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.consent-button:hover {
  background: #3c2942;
}
.consent-button:focus-visible,
.consent-open:focus-visible {
  outline: 3px solid var(--citron);
  outline-offset: 2px;
}
.consent-open {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.consent-open[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .consent {
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    border-radius: 6px 6px 0 0;
  }
}


/* Assistant IA du site (bouton flottant + panneau). Concaténé à site.css
   UNIQUEMENT si config/site.config.json → assistant_enabled vaut true
   (voir scripts/build.mjs). Jetons de 01-tokens.css ; aucune animation
   quand l'utilisateur demande la réduction des mouvements. */

.assistant[hidden],
.assistant-panel[hidden],
.assistant-typing[hidden] {
  display: none;
}

.assistant {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  font-family: var(--sans);
}

/* Bulle d'accroche au-dessus du bouton. */
.assistant-teaser {
  position: relative;
  max-width: 300px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 4px 14px;
  background: var(--paper);
  box-shadow: 0 12px 32px rgba(36, 21, 41, 0.18);
}
.assistant-teaser[hidden] {
  display: none;
}
.assistant-teaser-open {
  display: block;
  padding: 0 26px 0 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  cursor: pointer;
}
.assistant-teaser-close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 32px;
  height: 32px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.assistant.is-open .assistant-teaser {
  display: none;
}

.assistant-toggle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 22px 8px 8px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(36, 21, 41, 0.32);
}
.assistant-toggle:hover {
  background: #3c2942;
}
.assistant-toggle:focus-visible {
  outline: 3px solid var(--citron);
  outline-offset: 3px;
}

/* Pastille citron avec l'étincelle IA et le voyant « en ligne ». */
.assistant-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--citron);
}
.assistant-spark {
  fill: var(--ink);
}
.assistant-status {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 12px;
  height: 12px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #3ecf6e;
}
.assistant-toggle-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.assistant-toggle-title {
  font-size: 15px;
  font-weight: 700;
}
.assistant-toggle-sub {
  font-size: 12px;
  opacity: 0.8;
}

/* Panneau ouvert : le bouton se réduit à la pastille. */
.assistant-toggle[aria-expanded='true'] {
  padding: 8px;
}
.assistant-toggle[aria-expanded='true'] .assistant-toggle-text {
  display: none;
}

/* Questions en un clic. */
.assistant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.assistant-chip {
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.assistant-chip:hover {
  background: var(--citron);
}
.assistant-chip--primary {
  background: var(--ink);
  color: var(--paper);
}
.assistant-chip--primary:hover {
  background: #3c2942;
}
.assistant-chip:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
}
.assistant-messages .assistant-chips {
  margin: 0 0 4px;
}

.assistant-panel {
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 40px));
  max-height: min(620px, calc(100vh - 110px));
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 18px 48px rgba(36, 21, 41, 0.2);
  overflow: hidden;
}

.assistant-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--white);
}

.assistant-title {
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 26px;
  line-height: 1.1;
  color: var(--white);
}

.assistant-close {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 2px;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.assistant-head button:focus-visible {
  outline-color: var(--citron);
  outline-offset: 2px;
}

.assistant-notice {
  margin: 0;
  padding: 10px 18px;
  background: var(--citron);
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.assistant-messages {
  flex: 1 1 auto;
  min-height: 140px;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overscroll-behavior: contain;
}

.assistant-messages:focus {
  outline: none;
}

.assistant-msg {
  max-width: 88%;
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.assistant-msg a {
  color: inherit;
  text-decoration: underline;
}

.assistant-msg-assistant {
  align-self: flex-start;
  background: var(--white);
  border: 1px solid var(--line);
  border-bottom-left-radius: 2px;
}

.assistant-msg-user {
  align-self: flex-end;
  background: var(--ink);
  color: var(--white);
  border-bottom-right-radius: 2px;
}

.assistant-msg-info {
  align-self: stretch;
  max-width: none;
  background: var(--cream);
  border-left: 3px solid var(--ink);
  border-radius: 2px;
  font-size: 14px;
}

.assistant-msg-success {
  border-left-color: var(--success);
}

.assistant-msg-error {
  border-left-color: var(--error);
}

.assistant-typing {
  margin: 0;
  padding: 0 18px 8px;
  color: var(--muted);
  font-size: 13px;
}

.assistant-form {
  border-top: 1px solid var(--line);
  padding: 12px 18px 14px;
}

.assistant-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
}

.assistant-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.assistant-input {
  flex: 1 1 auto;
  min-height: 48px;
  max-height: 140px;
  padding: 10px 12px;
  border: 1px solid var(--control);
  border-radius: 2px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 16px; /* 16px : évite le zoom automatique d'iOS au focus. */
  line-height: 1.4;
  resize: none;
}

.assistant-send {
  flex: none;
  min-height: 48px;
  min-width: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: var(--ink);
  color: var(--white);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.assistant-send:disabled,
.assistant-input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.assistant-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 8px;
}

.assistant-privacy {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.assistant-privacy a {
  color: inherit;
  text-decoration: underline;
}

.assistant-reset {
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
}

/* Réserve de place en bas de page pour que le bouton flottant ne masque
   jamais la fin du contenu (pied de page). Classe posée par assistant.js. */
.has-assistant .site-footer {
  padding-bottom: 96px;
}

@media (prefers-reduced-motion: no-preference) {
  .assistant-toggle {
    transition: background var(--motion), transform var(--motion);
  }
  .assistant-toggle:hover {
    transform: translateY(-2px);
  }
  /* Voyant « en ligne » qui pulse doucement, pour attirer l'œil sans gêner. */
  .assistant-status {
    animation: assistant-pulse 2.4s ease-out infinite;
  }
  .assistant-panel:not([hidden]) {
    animation: assistant-in 180ms ease-out;
  }
  .assistant-teaser:not([hidden]) {
    animation: assistant-in 240ms ease-out;
  }
}

@keyframes assistant-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(62, 207, 110, 0.6);
  }
  70%,
  100% {
    box-shadow: 0 0 0 10px rgba(62, 207, 110, 0);
  }
}

@keyframes assistant-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Mobile : bouton compact et panneau pleine largeur en bas de l'écran. */
@media (max-width: 640px) {
  .assistant {
    right: 12px;
    bottom: 12px;
  }
  .assistant-toggle {
    min-height: 54px;
    padding: 6px 16px 6px 6px;
  }
  .assistant-avatar {
    width: 42px;
    height: 42px;
  }
  .assistant-toggle-sub {
    display: none;
  }
  .assistant.is-open {
    left: 0;
    right: 0;
    bottom: 0;
  }
  .assistant.is-open .assistant-toggle {
    display: none;
  }
  .assistant-panel {
    width: 100%;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
  }
  .has-assistant .site-footer {
    padding-bottom: 80px;
  }
}

/* Bouton d'accès à l'assistant dans les appels à l'action : pastille citron
   avec l'étincelle IA, au même poids visuel que les autres boutons. */
.assistant-open {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 18px 6px 6px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.assistant-open:hover {
  background: var(--citron);
}
.assistant-open:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}
.assistant-open-badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--citron);
}
.assistant-open:hover .assistant-open-badge {
  background: var(--paper);
}
.assistant-open-icon {
  fill: var(--ink);
}
.closing .assistant-open {
  border-color: var(--paper);
  background: transparent;
  color: var(--paper);
}
.closing .assistant-open:hover {
  background: var(--citron);
  color: var(--ink);
}
.assistant-open[hidden] {
  display: none;
}

/* Mobile : le bandeau de consentement occupe le bas de l'écran ; le bouton
   de l'assistant reprend sa place une fois le choix fait. */
@media (max-width: 640px) {
  .has-consent-banner .assistant {
    display: none;
  }
}
