/*
 * Jingi Agency : sous-pages (services, prix, guides, études de cas, à propos, contact, 404).
 * Se charge APRÈS site.css et n'utilise que ses variables (:root). Toutes les règles sont rattachées
 * à une classe : le fichier peut aussi être chargé sur l'accueil (pied de page « maillage », bouton WhatsApp)
 * sans rien changer à ses sections.
 *
 * Sommaire
 *   1. Réglages            8. Grilles « points » et coches
 *   2. En-tête et menu     9. Méthode en 5 étapes
 *   3. Fil d'Ariane        10. Cartes de liens
 *   4. Hero de page        11. FAQ, bande d'appel à l'action
 *   5. Mise en page        12. Mini-formulaire de contact
 *   6. Prose               13. Pied de page « maillage »
 *   7. Tableaux            14. Bouton WhatsApp flottant, 404, apparitions, impression
 */

/* ---------- 1. Réglages ---------- */

:root {
  --measure: 68ch;                                         /* largeur de lecture */
  --page-top: calc(var(--nav-h) + clamp(20px, 4vh, 48px));
  --block-gap: clamp(88px, 13vh, 144px);                   /* entre deux sections */
  --wa-size: 56px;
  --edge: clamp(14px, 1.6vw, 24px);                        /* marge des éléments flottants */
  --consent-offset: 0px;                                   /* posé par page.js quand le bandeau cookies est visible */
}

/* ---------- 2. En-tête et menu ---------- */

.nav-links a[aria-current="page"] { color: var(--white); }
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }

/* Sélecteur de langue en liens (les pages traduites sont /en/ et /th/) */
.lang-links { display: flex; align-items: center; gap: 2px; }
.lang-links a {
  display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 44px; padding: 0 6px;
  font-size: 13px; color: var(--grey-1); transition: color 0.3s;
}
.lang-links a:hover, .lang-links a[aria-current="true"] { color: var(--white); }

/* Menu plein écran des sous-pages : toutes les pages, en deux groupes, défilable */
.menu-pages {
  justify-content: flex-start; align-items: stretch; gap: 40px;
  overflow-y: auto; overscroll-behavior: contain;
  padding: calc(var(--nav-h) + 20px) var(--gutter) calc(36px + env(safe-area-inset-bottom));
}
.menu-pages .menu-groups { display: grid; gap: 32px 48px; }
.menu-pages .menu-groups nav { gap: 0; }
.menu-label { margin-bottom: 6px; font-size: 13px; color: var(--grey-1); }
.menu-pages .menu-groups a {
  display: flex; align-items: center; min-height: 48px; padding: 4px 0;
  font: 400 clamp(22px, 6vw, 30px)/1.25 var(--f-display); letter-spacing: -0.005em;
  border-bottom: 1px solid var(--line);
}
.menu-pages .menu-groups a[aria-current="page"] { color: var(--grey-1); }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-top: auto; }
.menu-pages .menu-foot .btn { font: 500 15px/1 var(--f-text); }
.menu-pages .lang-links { flex-direction: row; gap: 2px; }
.menu-pages .lang-links a { font: 400 15px/1 var(--f-text); }
@media (min-width: 640px) { .menu-pages .menu-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1181px) { .menu-pages { display: none; } }

html.menu-open, html.menu-open body { overflow: hidden; }
html.menu-open .nav { background: var(--black); border-bottom-color: var(--line); transform: none; }

@media (max-width: 900px) { .nav-end .lang-links { display: none; } }

/* ---------- 3. Fil d'Ariane ---------- */

.crumbs { margin-bottom: clamp(24px, 5vh, 56px); }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--grey-1); }
.crumbs li { display: inline-flex; align-items: center; }
.crumbs li + li::before { content: ""; flex: none; width: 14px; height: 1px; margin: 0 12px; background: var(--grey-2); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; transition: color 0.3s; }
.crumbs a:hover { color: var(--white); }
.crumbs [aria-current="page"] { color: var(--grey-0); }

/* ---------- 4. Hero de page ---------- */

.page-hero { padding: var(--page-top) 0 clamp(64px, 10vh, 120px); }
.page-kicker { margin-bottom: 20px; font-size: 15px; color: var(--grey-1); }
.page-title {
  max-width: 15.5em;
  font: 400 clamp(38px, 5.9vw, 92px)/1.06 var(--f-display);
  letter-spacing: -0.025em; text-wrap: balance;
}
.page-hero-foot {
  display: grid; grid-template-columns: minmax(0, 64ch) auto; align-items: end; justify-content: space-between;
  gap: 40px 64px; margin-top: clamp(40px, 7vh, 80px);
}

/* « En bref » : la réponse directe de 40 à 60 mots que citent les moteurs IA */
.answer { max-width: 64ch; font-size: clamp(17px, 1.3vw, 19.5px); line-height: 1.7; color: var(--grey-0); text-wrap: pretty; }
.answer-label { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.4; color: var(--grey-1); }
.answer-label::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--shu); box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.14); }

.byline { margin-top: 24px; font-size: 14px; line-height: 1.6; color: var(--grey-1); }
.byline a { color: var(--grey-0); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: text-decoration-color 0.3s, color 0.3s; }
.byline a:hover { color: var(--white); text-decoration-color: var(--white); }
.byline-sep { margin: 0 6px; color: var(--grey-2); }
.byline time { white-space: nowrap; }
@media (max-width: 600px) { .byline-sep { display: none; } .byline-date { display: block; } }

.page-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn-icon { flex: none; width: 18px; height: 18px; margin-right: 10px; fill: currentColor; }
.page-proof { display: flex; flex-wrap: wrap; gap: 8px 36px; margin-top: clamp(40px, 6vh, 64px); font-size: 14px; color: var(--grey-1); }
.page-proof li { display: flex; align-items: center; gap: 10px; }
.page-proof li::before { content: ""; width: 14px; height: 1px; background: var(--grey-2); }

/* ---------- 5. Mise en page : sommaire + contenu ---------- */

.page-layout {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding-top: clamp(64px, 10vh, 120px); padding-bottom: var(--block-gap);
  border-top: 1px solid var(--line);
}
.page-content { grid-column: 4 / span 8; min-width: 0; }

.toc {
  grid-column: 1 / span 3; grid-row: 1; align-self: start;
  position: sticky; top: calc(var(--nav-h) + 32px);
  max-height: calc(100vh - var(--nav-h) - 64px); overflow-y: auto; padding-right: 24px;
}
.toc-title { margin-bottom: 14px; font-size: 13px; color: var(--grey-1); }
.toc ol { border-left: 1px solid var(--line); }
.toc a { position: relative; display: block; padding: 7px 0 7px 18px; font-size: 14px; line-height: 1.45; color: var(--grey-1); transition: color 0.3s; }
.toc a::before {
  content: ""; position: absolute; left: -1px; top: 6px; bottom: 6px; width: 1px; background: var(--white);
  transform: scaleY(0); transition: transform 0.5s var(--ease);
}
.toc a:hover, .toc a[aria-current="true"] { color: var(--white); }
.toc a[aria-current="true"]::before { transform: scaleY(1); }

.block { scroll-margin-top: calc(var(--nav-h) + 24px); }
.block + .block { margin-top: var(--block-gap); }
.block > h2 {
  max-width: 21em; margin-bottom: 28px;
  font: 500 clamp(29px, 2.9vw, 44px)/1.18 var(--f-display); letter-spacing: -0.012em; text-wrap: balance;
}
.block > :not(h2) + * { margin-top: 44px; }

/* Titre de section pleine largeur (« À lire aussi »…) */
.section-title { font: 500 clamp(26px, 2.4vw, 36px)/1.2 var(--f-display); letter-spacing: -0.01em; }

@media (max-width: 1099px) {
  .page-layout { display: block; }
  .toc { display: none; }
}

/* ---------- 6. Prose ---------- */

.prose { max-width: var(--measure); font-size: clamp(16.5px, 1.25vw, 18px); line-height: 1.8; color: var(--grey-0); }
.prose > * + * { margin-top: 1.15em; }
.prose p, .prose li { text-wrap: pretty; }
.prose .intro { font-size: clamp(18px, 1.35vw, 20px); line-height: 1.7; color: var(--white); }
.prose h3 { margin-top: 2.1em; font: 500 clamp(20px, 1.6vw, 24px)/1.35 var(--f-display); color: var(--white); }
.prose h3 + * { margin-top: 0.55em; }
.prose h4 { margin-top: 1.8em; font: 500 16px/1.5 var(--f-text); color: var(--white); }
.prose strong { font-weight: 500; color: var(--white); }
.prose em { font-style: italic; }
.prose a, .points a, .ticks a, .note a, .page-faq .faq-a a {
  color: var(--white); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 255, 255, 0.38); text-underline-offset: 0.24em;
  transition: text-decoration-color 0.3s;
}
.prose a:hover, .points a:hover, .ticks a:hover, .note a:hover, .page-faq .faq-a a:hover { text-decoration-color: var(--white); }
.prose ul > li, .prose ol > li { position: relative; padding-left: 28px; }
.prose ul > li + li, .prose ol > li + li { margin-top: 0.6em; }
.prose ul > li::before { content: ""; position: absolute; left: 0; top: 0.9em; width: 12px; height: 1px; background: var(--grey-1); }
.prose ol { counter-reset: li; }
.prose ol > li { counter-increment: li; padding-left: 40px; }
.prose ol > li::before {
  content: counter(li, decimal-leading-zero); position: absolute; left: 0; top: 0.12em;
  font: 400 15px/1.6 var(--f-display); color: var(--grey-1); font-variant-numeric: tabular-nums;
}
.prose blockquote {
  margin: 1.8em 0; padding: 2px 0 2px 24px; border-left: 1px solid var(--white);
  font: 400 clamp(20px, 1.7vw, 25px)/1.5 var(--f-display); color: var(--white);
}
.prose blockquote p + p { margin-top: 0.6em; }
.prose blockquote cite { display: block; margin-top: 12px; font: 400 14px/1.5 var(--f-text); font-style: normal; color: var(--grey-1); }
.prose code, .prose kbd {
  padding: 0.12em 0.4em; border: 1px solid var(--line); border-radius: 4px; background: #111;
  font: 0.86em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--white);
  overflow-wrap: anywhere;
}
.prose pre {
  overflow-x: auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 8px; background: #0a0a0a;
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--grey-0);
}
.prose pre code { padding: 0; border: 0; background: none; font-size: inherit; }
.prose hr { height: 1px; margin: 3em 0; border: 0; background: var(--line); }
.prose figure img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
.prose figcaption { margin-top: 10px; font-size: 14px; color: var(--grey-1); }

/* Encadré (mise en garde, « à vérifier au moment du projet »…) */
.note {
  max-width: min(100%, 680px); padding: 20px 22px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 15px; line-height: 1.7; color: var(--grey-1);
}
.note strong { font-weight: 500; color: var(--white); }

/* ---------- 7. Tableaux (défilement horizontal propre sur mobile) ---------- */

.table-figure { min-width: 0; }
.table-figure > figcaption { margin-bottom: 14px; font-size: 14px; line-height: 1.5; color: var(--grey-1); }
.table-wrap {
  overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  border-top: 1px solid var(--line-strong);
  scrollbar-width: thin; scrollbar-color: var(--grey-2) transparent;
  /* ombres de défilement : n'apparaissent que du côté où il reste du contenu */
  background:
    linear-gradient(90deg, var(--black) 30%, rgba(0, 0, 0, 0)) left / 48px 100% no-repeat local,
    linear-gradient(270deg, var(--black) 30%, rgba(0, 0, 0, 0)) right / 48px 100% no-repeat local,
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)) left / 18px 100% no-repeat scroll,
    linear-gradient(270deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0)) right / 18px 100% no-repeat scroll;
}
.table-wrap:focus-visible { outline-offset: 2px; }
.table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.table th, .table td { padding: 16px 22px 16px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.table thead th { padding-block: 14px; font: 500 13px/1.4 var(--f-text); color: var(--grey-1); border-bottom-color: var(--line-strong); white-space: nowrap; }
.table tbody th { min-width: 8.5em; font: 500 16px/1.4 var(--f-display); color: var(--white); }
.table td { color: var(--grey-0); }
.table td:last-child, .table th:last-child { padding-right: 0; }
.table-note { margin-top: 14px; font-size: 13px; color: var(--grey-1); }
@media (max-width: 700px) {
  .table { font-size: 14.5px; }
  /* la colonne de gauche reste visible pendant le défilement */
  .table tbody th, .table thead th:first-child { position: sticky; left: 0; z-index: 1; background: var(--black); box-shadow: 1px 0 0 var(--line); padding-left: 0; padding-right: 16px; }
  .table tbody th { min-width: 7.5em; max-width: 9em; }
  .table td:first-of-type { padding-left: 16px; }
  .table thead th:nth-child(2) { padding-left: 16px; }
}

/* ---------- 8. Grilles « points » et coches ---------- */

/* <ul class="points"><li><h3>…</h3><p>…</p></li></ul> : arguments, critères, preuves */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px clamp(28px, 3vw, 56px); }
.points > li { padding-top: 24px; border-top: 1px solid var(--line); }
.points h3 { font: 500 clamp(20px, 1.6vw, 24px)/1.3 var(--f-display); color: var(--white); }
.points p { margin-top: 10px; font-size: 16px; line-height: 1.7; color: var(--grey-1); }
.points p strong { font-weight: 500; color: var(--grey-0); }
.points-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* <ul class="ticks"> : livrables, check-lists */
.ticks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(28px, 3vw, 56px); max-width: 64em; }
.ticks > li { position: relative; padding: 15px 0 15px 32px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; color: var(--grey-0); }
.ticks > li::before {
  content: ""; position: absolute; left: 2px; top: 21px; width: 12px; height: 6px;
  border-left: 1px solid var(--white); border-bottom: 1px solid var(--white); transform: rotate(-45deg);
}
.ticks-1 { grid-template-columns: 1fr; max-width: var(--measure); }

@media (max-width: 900px) { .points-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .points, .points-3, .ticks { grid-template-columns: 1fr; } .points { gap: 32px; } }

/* ---------- 9. Méthode en 5 étapes ---------- */

/* <ol class="stages"><li><span class="stage-num" aria-hidden="true">一</span><h3>…</h3><p>…</p></li></ol> */
.stages { border-bottom: 1px solid var(--line); }
.stages > li {
  display: grid; grid-template-columns: clamp(56px, 6vw, 88px) minmax(0, 1fr); column-gap: clamp(16px, 2vw, 32px);
  padding: 28px 0 32px; border-top: 1px solid var(--line);
}
.stage-num { grid-row: 1 / span 2; font: 400 clamp(36px, 3.4vw, 48px)/1 var(--f-display); color: var(--white); }
.stages h3 { align-self: center; font: 500 clamp(21px, 1.7vw, 25px)/1.3 var(--f-display); }
.stages p { margin-top: 8px; max-width: 58ch; font-size: 16px; line-height: 1.7; color: var(--grey-1); }

/* ---------- 10. Cartes de liens (« À lire aussi », services) ---------- */

.related { padding-block: var(--block-gap); border-top: 1px solid var(--line); }
.related + .related { padding-top: 0; border-top: 0; }
.related-head { margin-bottom: clamp(32px, 5vh, 56px); }
.related-head p { max-width: 52ch; margin-top: 12px; font-size: 15px; color: var(--grey-1); }

/* 3 colonnes par défaut : prévoir 3 ou 6 cartes ; .cards-2 (2, 4 cartes) ; .cards-4 (4, 8 cartes) */
.cards {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line); border-left: 1px solid var(--line);
}
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cards > li { display: flex; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card {
  position: relative; flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 236px;
  padding: clamp(24px, 2.4vw, 36px) clamp(22px, 2.2vw, 32px);
  transition: background-color 0.45s var(--ease);
}
.card:hover { background: #0b0b0b; }
.card:focus-visible { outline-offset: -6px; }
.card-kicker { font-size: 13px; color: var(--grey-1); }
.card-title { font: 500 clamp(21px, 1.7vw, 25px)/1.3 var(--f-display); color: var(--white); text-wrap: balance; }
.card-text { max-width: 40ch; font-size: 15px; line-height: 1.65; color: var(--grey-1); }
.card::after {
  content: ""; width: 28px; height: 1px; margin-top: auto; background: var(--grey-1);
  transition: width 0.6s var(--ease), background-color 0.3s;
}
.card:hover::after, .card:focus-visible::after { width: 64px; background: var(--white); }
.card-text + .card-text { margin-top: -2px; }
.cards-in { margin-top: 8px; } /* variante dans une section .block */
@media (max-width: 1100px) { .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .cards, .cards-2, .cards-4 { grid-template-columns: 1fr; } }

/* ---------- 11. FAQ et bande d'appel à l'action ---------- */

.page-faq .faq-list summary { font-size: clamp(18px, 1.45vw, 22px); padding-block: 26px; }
.page-faq .faq-list summary:focus-visible { outline-offset: 2px; }
.page-faq .faq-a p { padding-bottom: 28px; font-size: 16px; line-height: 1.75; }

.cta-band { padding-block: var(--block-gap) calc(var(--block-gap) * 0.9); border-top: 1px solid var(--line); }
.cta-band-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px 64px; align-items: end; }
.cta-band-title { font: 400 clamp(40px, 5.2vw, 84px)/1.05 var(--f-display); letter-spacing: -0.02em; text-wrap: balance; }
.cta-band-text { max-width: 42ch; margin-bottom: 28px; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.6; color: var(--grey-0); }

/* ---------- 12. Mini-formulaire de contact (page.js : [data-contact-form]) ---------- */

.mini-form { display: grid; gap: 36px; max-width: 760px; }
.mini-form .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mini-form fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.mini-form legend { margin-bottom: 14px; padding: 0; font-size: 14px; color: var(--grey-1); }
.field select {
  width: 100%; padding: 10px 28px 12px 0; appearance: none; -webkit-appearance: none;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23fff' stroke-width='1.2'/%3E%3C/svg%3E") right 4px center / 12px 8px no-repeat;
  color: var(--white); border: 0; border-bottom: 1px solid var(--line-strong); border-radius: 0;
  font: 400 18px/1.5 var(--f-text); transition: border-color 0.3s;
}
.field select:focus { outline: none; border-bottom-color: var(--white); }
.field select option { background: #0c0c0c; color: var(--white); }
.field input:focus-visible, .field textarea:focus-visible, .field select:focus-visible { box-shadow: 0 1px 0 0 var(--white); }
.field textarea[aria-invalid="true"], .field select[aria-invalid="true"] { border-bottom-color: var(--shu); }
.mini-form .chips label { min-height: 44px; display: inline-flex; }
.mini-form .chips span { height: 44px; }
.mini-form-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.mini-form .form-note { font-size: 13px; color: var(--grey-1); }
@media (max-width: 700px) { .mini-form .fields { grid-template-columns: 1fr; } .mini-form-actions .btn { flex: 1 1 100%; } }

/* ---------- 13. Pied de page « maillage » (sous-pages et, plus tard, accueil) ---------- */

.footer-mesh { padding-top: clamp(80px, 13vh, 136px); }
.mesh-top {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px;
  padding-bottom: clamp(48px, 8vh, 80px);
}
.mesh-top .footer-claim { margin-bottom: 0; max-width: 22em; }
.mesh {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr) minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px clamp(24px, 3vw, 56px); padding-top: 44px; border-top: 1px solid var(--line);
}
.footer .mesh nav { display: block; }
.footer .lang-links { flex-direction: row; align-items: center; gap: 2px; }
.mesh-title { margin-bottom: 14px; font: 500 14px/1.4 var(--f-text); color: var(--white); }
.mesh ul { display: grid; }
.mesh a, .mesh button {
  display: inline-flex; align-items: center; gap: 10px; min-height: 38px; padding: 2px 0;
  font-size: 15px; line-height: 1.45; color: var(--grey-1); text-align: left; transition: color 0.3s;
}
.mesh a:hover, .mesh button:hover, .mesh a[aria-current="page"] { color: var(--white); }
.mesh-nap { margin-bottom: 10px; font-size: 15px; line-height: 1.6; color: var(--grey-0); }
.mesh-sub { margin: 12px 0 0; font-size: 13px; color: var(--grey-1); }
.mesh-col .mesh-nap + .mesh-sub { margin-top: 4px; }
.flag {
  flex: none; display: inline-grid; place-items: center; width: 28px; height: 20px; border: 1px solid var(--line-strong); border-radius: 4px;
  font: 500 10px/1 var(--f-text); letter-spacing: 0.06em; color: var(--grey-0);
}
.mesh-bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px;
  margin-top: 28px; font-size: 13px; color: var(--grey-1);
}
.mesh-bottom .footer-copy { margin: 0; color: var(--grey-1); }
.mesh-bottom .lang-links a { font-size: 13px; }
.footer-mesh .footer-mark { margin-top: clamp(72px, 12vh, 140px); }

@media (max-width: 1100px) { .mesh { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .mesh a, .mesh button { min-height: 44px; }
  .mesh-top .btn { width: 100%; }
}
@media (max-width: 520px) { .mesh { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- 14. Bouton WhatsApp flottant ---------- */

.wa-float {
  position: fixed; z-index: 140;
  right: calc(var(--edge) + env(safe-area-inset-right));
  bottom: calc(var(--edge) + env(safe-area-inset-bottom) + var(--consent-offset));
  display: grid; place-items: center; width: var(--wa-size); height: var(--wa-size); border-radius: 50%;
  background: var(--white); color: var(--black);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.4);
  transition: bottom 0.6s var(--ease), transform 0.5s var(--ease), opacity 0.35s, visibility 0.35s;
}
.wa-float svg { width: 27px; height: 27px; fill: currentColor; }
.wa-float:hover { transform: translateY(-2px) scale(1.04); }
.wa-float:focus-visible { outline-offset: 4px; }
.wa-float-label {
  position: absolute; right: calc(100% + 12px); top: 50%; padding: 9px 14px; border-radius: 999px;
  background: var(--white); color: var(--black); font-size: 13px; line-height: 1; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translate(6px, -50%); transition: opacity 0.3s, transform 0.5s var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .wa-float:hover .wa-float-label { opacity: 1; transform: translate(0, -50%); }
}
.wa-float:focus-visible .wa-float-label { opacity: 1; transform: translate(0, -50%); }
html.menu-open .wa-float, html.wa-hold .wa-float { opacity: 0; visibility: hidden; }
html.wa-hold .wa-float { transform: translateY(12px) scale(0.92); }
@media print { .wa-float { display: none; } }

/* ---------- 404 ---------- */

.error-hero { position: relative; min-height: min(88vh, 860px); display: flex; align-items: center; }
.error-hero .wrap { position: relative; }
.error-num {
  position: absolute; right: var(--gutter); top: 50%; transform: translateY(-50%);
  font: 400 clamp(140px, 22vw, 360px)/0.8 var(--f-display); letter-spacing: -0.04em;
  color: transparent; -webkit-text-stroke: 1px var(--line-strong); pointer-events: none; user-select: none;
}
.error-hero .page-title { position: relative; max-width: 12em; }
.error-hero .answer { position: relative; margin-top: 28px; }
.error-hero .page-actions { position: relative; margin-top: 40px; }
@media (max-width: 900px) {
  .error-hero { min-height: 0; padding-bottom: 72px; }
  .error-num { position: static; transform: none; display: block; margin-bottom: 24px; font-size: clamp(96px, 30vw, 160px); }
}

/* ---------- Responsive : hero, bande d'appel à l'action ---------- */

@media (max-width: 1100px) {
  .page-hero-foot { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 900px) {
  .cta-band-grid { grid-template-columns: 1fr; align-items: start; }
  .block > h2 { margin-bottom: 22px; }
  .block > :not(h2) + * { margin-top: 36px; }
  .prose { font-size: 16.5px; line-height: 1.78; }
  .card { min-height: 0; padding-block: 26px 28px; gap: 8px; }
  .card::after { margin-top: 18px; }
}
@media (max-width: 600px) {
  .crumbs { margin-bottom: 16px; }
  .page-hero { padding-bottom: 56px; }
  .page-hero-foot { margin-top: 32px; gap: 32px; }
  .stages > li { grid-template-columns: 44px minmax(0, 1fr); }
  .stage-num { font-size: 32px; }
}
@media (max-width: 520px) {
  .page-actions .btn, .cta-band .page-actions .btn { flex: 1 1 100%; }
  .page-proof { flex-direction: column; gap: 10px; }
}

/* ---------- Apparitions douces (page.js ajoute .reveal-on, jamais si mouvement réduit) ---------- */

.reveal-on :is(.block, .related, .cta-band, [data-fade]) { transition: opacity 0.9s var(--ease), transform 1.1s var(--ease); }
.reveal-on :is(.block, .related, .cta-band, [data-fade]):not(.is-in) { opacity: 0; transform: translateY(20px); }

@media (prefers-reduced-motion: reduce) {
  .reveal-on :is(.block, .related, .cta-band, [data-fade]):not(.is-in) { opacity: 1; transform: none; }
  .wa-float, .card, .card::after, .toc a::before { transition: none; }
}

/* ---------- Impression ---------- */

@media print {
  .nav, .menu, .toc, .consent, .toast, .footer-mark, .page-actions, .cta-band, .related { display: none !important; }
  body { background: #fff; color: #000; }
  .page-title, .block > h2, .prose, .prose strong, .prose a, .answer, .points h3, .stages h3, .table tbody th { color: #000; }
  .page-layout { display: block; border: 0; }
}
