/* === Pages métier et page sécurité ===
   Mise en page commune de use-case-*.html et security.html :
   en-tête (risque + CTA démo), puis des sections dont l'ordre varie d'une page
   à l'autre : cas vécu (#scenario), document d'exemple (#comment), risques
   (#risques), section propre au métier, conformité (#conformite), CTA final
   vers index.html#demo.
   Les composants (cartes .risque, étapes .comment-step, .conformite-item,
   schéma .schema) sont dans styles.css, partagés avec l'accueil. */

main > .section { padding-left: 0; padding-right: 0; }
.section h2 { text-wrap: balance; }

/* --- En-tête : le risque du métier en une phrase --- */
.page-hero { padding-top: 64px; padding-bottom: 72px; border-bottom: 1px solid var(--border); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 56px; align-items: center; }
.page-hero h1 { font-size: 50px; line-height: 1.04; letter-spacing: -0.035em; color: var(--ink); margin-bottom: 22px; }
.page-hero-lead { font-size: 18.5px; line-height: 1.55; color: var(--text-secondary); max-width: 540px; margin-bottom: 30px; }
.page-hero-lead strong { color: var(--ink); font-weight: 600; }
.page-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 32px; }
.page-hero-proofs { list-style: none; display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--border); max-width: 540px; }
.page-hero-proofs li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.page-hero-proofs svg { flex: 0 0 18px; color: var(--accent); }
.page-hero-visual { margin: 0; }
.page-hero-visual .schema { --schema-height: 340px; --schema-scale: 0.84; --schema-label-size: 17px; }
.page-hero-visual figcaption { margin-top: 14px; font-size: 13px; color: var(--text-muted); text-align: center; }

/* --- Photos des fiches métier (website/photos/, crédits dans photos/CREDITS.md) ---
   La photo couvre tout l'en-tête, sous un dégradé bleu profond qui porte le texte
   en blanc à gauche et laisse voir l'image à droite. La figure reste dans le HTML
   (alt, crédit) mais sort du flux. */
.page-hero--photo { position: relative; isolation: isolate; overflow: hidden; min-height: 600px; display: flex; align-items: center; padding-top: 96px; padding-bottom: 104px; border-bottom: 0; background: var(--ink); color: #ffffff; }
.page-hero--photo .page-hero-grid { display: block; width: 100%; }
.page-hero--photo .page-hero-text { max-width: 640px; }
.page-hero--photo .page-hero-photo { position: absolute; inset: 0; z-index: -1; margin: 0; max-width: none; width: auto; }
.page-hero-photo .photo-parallax { position: absolute; left: 0; right: 0; top: -10%; height: 120%; }
.page-hero-photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.page-hero-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0, 32, 91, 0.96) 0%, rgba(0, 32, 91, 0.88) 34%, rgba(0, 32, 91, 0.45) 68%, rgba(0, 32, 91, 0.15) 100%),
    linear-gradient(0deg, rgba(10, 31, 68, 0.55) 0%, rgba(10, 31, 68, 0) 40%);
}
.page-hero--photo h1 { color: #ffffff; }
.page-hero--photo .eyebrow { color: var(--accent-on-dark); }
.page-hero--photo .page-hero-lead { color: rgba(255, 255, 255, 0.82); }
.page-hero--photo .page-hero-lead strong { color: #ffffff; }
.page-hero--photo .page-hero-proofs { border-top-color: rgba(255, 255, 255, 0.22); }
.page-hero--photo .page-hero-proofs li { color: #ffffff; }
.page-hero--photo .page-hero-proofs svg { color: var(--accent-on-dark); }
.page-hero--photo .btn-primary { background: #ffffff; color: var(--ink); }
.page-hero--photo .btn-primary:hover { background: #e6ecf4; }
.page-hero--photo .btn-outline { border-color: rgba(255, 255, 255, 0.45); color: #ffffff; }
.page-hero--photo .btn-outline:hover { border-color: #ffffff; color: #ffffff; }
.page-hero--photo .btn:focus-visible { outline-color: #ffffff; }
.photo-credit { position: absolute; right: 16px; bottom: 12px; z-index: 1; margin: 0; padding: 2px 8px; font-size: 11px; line-height: 1.5; color: rgba(255, 255, 255, 0.85); background: rgba(10, 31, 68, 0.55); border-radius: 6px; }
.photo-credit a { color: inherit; text-decoration: underline; }

/* --- Page intégration (integration.html) : quatre modes, puis un bloc par mode --- */
.integ-modes { background: var(--bg-alt); }
.modes-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.mode-card { background: #ffffff; border: 1px solid var(--border); border-radius: 14px; padding: 24px 22px 22px; display: flex; flex-direction: column; }
.mode-num { font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.mode-card h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 6px; }
.mode-card h3 a { color: var(--ink); text-decoration: none; }
.mode-card h3 a::after { content: " →"; color: var(--accent); }
.mode-card h3 a:hover { color: var(--accent); }
.mode-card h3 a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.mode-card > p { font-size: 15px; line-height: 1.5; color: var(--text-secondary); margin-bottom: 18px; }
.mode-card dl { display: grid; gap: 10px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border); }
.mode-card dt { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.mode-card dd { font-size: 14px; line-height: 1.45; color: var(--ink); }
.integ-mode { background: #ffffff; scroll-margin-top: 56px; }
.integ-mode--alt { background: var(--bg-alt); }
.integ-mode .section-head { margin-bottom: 0; }
.integ-outils { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.integ-outils li { font-size: 14px; font-weight: 600; color: var(--ink); background: #ffffff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }
.integ-lien { margin-top: 20px; }
.integ-lien a { font-weight: 600; color: var(--accent); }
.integ-code { margin: 0 0 24px; }
.integ-code figcaption { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.integ-code pre { margin: 0; background: var(--ink); color: #ffffff; font-size: 13px; padding: 16px 20px; border-radius: 10px; overflow-x: auto; }
.lignes code { font-size: 0.92em; background: #ffffff; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.integ-fournisseurs { margin-top: 24px; }
.integ-fournisseurs-titre { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 10px; }
.provider-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; }
.provider-list li { font-size: 13px; color: var(--text-secondary); background: #ffffff; border: 1px solid var(--border); border-radius: 6px; padding: 3px 9px; }
@media (max-width: 1024px) { .modes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .modes-grid { grid-template-columns: minmax(0, 1fr); } }

/* --- Rapport d'analyse (use-case-agents.html) : même cadre que .avant-apres, sans animation --- */
.rapport-scan { background: #ffffff; color: var(--ink); border-radius: 14px; padding: 22px 24px; box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.5); }
.rapport-scan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 14px; margin-bottom: 6px; border-bottom: 1px solid var(--border); }
.section-dark .rapport-scan-head p, .rapport-scan-head p { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; color: var(--ink); }
.rapport-scan-risk { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: #ffffff; background: #B42318; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.rapport-scan-list { list-style: none; }
.section-dark .rapport-scan-list li, .rapport-scan-list li { color: var(--ink); display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 12px 0 12px 14px; border-bottom: 1px solid var(--border); position: relative; font-size: 14px; line-height: 1.5; }
.rapport-scan-list li::before { content: ""; position: absolute; left: 0; top: 16px; width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); }
.rapport-scan-list li.sev-high::before { background: #B42318; }
.rapport-scan-list li.sev-medium::before { background: #B54708; }
.rapport-scan-list li.sev-low::before { background: var(--accent); }
.rapport-scan-list b { color: var(--ink); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.rapport-scan-list span { color: var(--text-secondary); }
.section-dark .rapport-scan .avant-apres-note, .rapport-scan .avant-apres-note { color: var(--text-muted); }
@media (max-width: 640px) { .rapport-scan-list li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* --- En-têtes de section --- */
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 16px; }
.section-head p { font-size: 18px; line-height: 1.55; color: var(--text-secondary); }
.section-dark .section-head h2 { color: #ffffff; }

/* --- Risques --- */
.metier-risques { background: var(--bg-alt); }
.metier-risques-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.metier-risques-grid > li { display: flex; }
.metier-risques-grid .risque { flex: 1 1 auto; }

/* --- Ce que fait routtx : étapes + avant / après --- */
.metier-comment-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.metier-comment h2 { font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; margin-bottom: 16px; }
.metier-comment-lead { font-size: 17px; line-height: 1.55; margin-bottom: 28px; max-width: 480px; }
.avant-apres { background: #ffffff; color: var(--ink); border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0,0,0,0.55); overflow: hidden; }
.avant-apres-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.section-dark .avant-apres-head p { font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.avant-apres-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: #ffffff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.avant-apres-fields { padding: 18px 20px 6px; }
.avant-apres-fields > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 9px 0; border-bottom: 1px dashed var(--border); }
.avant-apres-fields > div:last-child { border-bottom: 0; }
.avant-apres-fields dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.avant-apres-fields dd { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 15px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.valeur { text-decoration: line-through; text-decoration-color: rgba(0,32,91,0.35); color: var(--text-secondary); font-weight: 400; }
.jeton { display: inline-block; padding: 1px 8px; border-radius: 4px; background: var(--ink); color: var(--accent-on-dark); font: 600 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.02em; }
.garde { font-weight: 600; color: var(--ink); }
.section-dark .avant-apres-note { padding: 12px 20px 16px; font-size: 13.5px; line-height: 1.5; color: var(--text-secondary); border-top: 1px solid var(--border); background: #ffffff; }

/* --- Document d'exemple animé (exemple.js) ---
   Tout est sous .ex-on, posé par le script : sans JS ou en mouvement réduit, valeur et jeton
   restent côte à côte. Valeur et jeton occupent la même cellule ; l'un cède la place à l'autre. */
.avant-apres { position: relative; }
.ex-on .valeur { text-decoration: none; color: var(--ink); font-weight: 600; transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease; border-radius: 3px; }
.ex-on .avant-apres-fields dd { display: grid; justify-items: start; }
.ex-on .valeur, .ex-on .jeton { grid-area: 1 / 1; }
.ex-on .jeton { opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s; }
.ex-on .ex-repere .valeur { background: rgba(0,99,178,0.18); }
.ex-on .ex-masque .valeur { opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s; }
.ex-on .ex-masque .jeton { opacity: 1; visibility: visible; transform: none; transition: opacity 0.3s ease, transform 0.3s ease; }
.ex-on .garde::after { content: "gardé lisible" / ""; display: block; margin-top: 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.04em; color: var(--text-muted); opacity: 0; transition: opacity 0.3s ease; }
.ex-on .ex-masque .garde::after { opacity: 1; }
.ex-on .avant-apres-head { flex-wrap: wrap; }
.ex-on .avant-apres-tag { white-space: normal; max-width: 100%; }
.ex-scan { display: none; }
.ex-on .ex-scan { display: block; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: #0063B2; box-shadow: 0 0 10px rgba(0,99,178,0.55); opacity: 0; pointer-events: none; }
.ex-on.ex-scanning .ex-scan { opacity: 1; animation: ex-balayage 1.2s linear forwards; }
@keyframes ex-balayage { from { top: 0; } to { top: 100%; } }
.ex-pied { display: none; }
.ex-on .ex-pied { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; min-height: 48px; border-top: 1px solid var(--border); }
.ex-on:not(.ex-fini) .ex-compteur { visibility: hidden; }
.ex-rejouer[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.ex-on .ex-pied .ex-compteur { margin: 0; font-size: 13px; font-weight: 600; color: var(--accent); }
.ex-rejouer { font: inherit; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 6px 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.ex-rejouer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
@media print {
  .ex-on .valeur { opacity: 0; visibility: hidden; }
  .ex-on .jeton { opacity: 1; visibility: visible; transform: none; }
  .ex-on .ex-scan, .ex-on .ex-rejouer { display: none; }
  /* L'étiquette finale s'imprime même si la séquence n'a pas été jouée. */
  .ex-on:not(.ex-fini) .avant-apres-tag { font-size: 0; }
  .ex-on:not(.ex-fini) .avant-apres-tag::after { content: "Ce que le modèle reçoit"; font-size: 11px; }
}

/* --- Démonstration d'injection (security.html #comment) ---
   Deux onglets (tabs.js : un PDF reçu, une page web consultée), un même scénario en trois
   temps. État par défaut (sans JS, mouvement réduit, sous 768 px) : ligne cachée révélée,
   puis « sans routtx », puis « avec routtx », empilés ; sans tabs.js, les deux panneaux
   se suivent. Sous .motion-on .pin-on, l'état suit l'étape active (:has ; sans :has,
   tout reste visible). Rouge d'alerte réservé à « sans routtx ». */
.piege-tabs { display: none; gap: 4px; padding: 4px; margin-bottom: 22px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 999px; max-width: 100%; }
.tabs-on .piege-tabs { display: inline-flex; }
.piege-tab { appearance: none; border: 0; background: transparent; color: rgba(255,255,255,0.8); font-size: 14px; font-weight: 600; line-height: 1.3; padding: 8px 16px; border-radius: 999px; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.piege-tab:hover { color: #ffffff; }
.piege-tab[aria-selected="true"] { background: #ffffff; color: var(--ink); }
.piege-tab:focus-visible { outline: 2px solid var(--accent-on-dark); outline-offset: 2px; }
.piege-panel[hidden] { display: none; }
.piege-panel + .piege-panel { margin-top: 40px; }
.section-dark .piege-panel-titre { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent-on-dark); margin-bottom: 10px; }
.tabs-on .piege-panel-titre { display: none; }

.piege-doc { background: #ffffff; color: var(--ink); border-radius: 14px; box-shadow: 0 30px 60px -24px rgba(0,0,0,0.55); overflow: hidden; transition: opacity .5s ease; }
.piege-doc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 18px; background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.piege-file { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; font-weight: 600; color: var(--text-secondary); }
.piege-file svg { flex: 0 0 16px; }
.piege-doc-tag { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: #ffffff; border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; white-space: nowrap; transition: opacity .4s ease; }
.piege-doc-body { padding: 16px 20px 18px; }
.piege .piege-doc p { color: var(--ink); }
.piege .piege-doc .piege-doc-title { font-size: 16px; font-weight: 800; letter-spacing: -0.015em; margin-bottom: 8px; }
.piege .piege-doc .piege-doc-text { font-size: 14.5px; line-height: 1.5; color: var(--text-secondary); }
.piege-lignes > div { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.piege-lignes dt { font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.piege-lignes dd { font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* La ligne cachée, révélée (encadré bleu) ; à l'entrée de l'épinglage, elle reprend son vrai aspect. */
.piege .piege-cache { display: block; margin-top: 12px; padding: 8px 10px; border-radius: 6px; background: var(--bg-alt); box-shadow: inset 0 0 0 1.5px var(--accent); font-size: 13px; line-height: 1.5; color: var(--ink); transition: font-size .4s ease, color .4s ease, background-color .4s ease, box-shadow .4s ease; }
.piege-cache-label { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.piege-instruction { overflow-wrap: anywhere; }
.piege-code { display: block; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--text-secondary); }
.piege-code .piege-instruction { color: var(--ink); font-weight: 600; }

.piege-issues { display: grid; gap: 14px; margin-top: 14px; }
.piege-sans, .piege-avec { background: #ffffff; color: var(--ink); border-radius: 12px; padding: 12px 16px 14px; box-shadow: 0 24px 48px -20px rgba(0,0,0,0.6); }
.piege-sans { border-left: 4px solid var(--danger); }
.piege-avec { border-left: 4px solid var(--accent); }
.piege .piege-issues p { color: var(--ink); }
.piege .piege-issues .piege-issue-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; }
.piege .piege-sans .piege-issue-head { color: var(--danger); }
.piege .piege-avec .piege-issue-head { color: var(--accent); }
.piege-issue-num { font-weight: 800; font-variant-numeric: tabular-nums; }
.piege .piege-issues .piege-reponse { font-size: 14.5px; line-height: 1.5; }
.piege .piege-issues .piege-md { margin-top: 6px; padding: 5px 8px; border-radius: 6px; background: var(--danger-light); color: var(--danger); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.piege .piege-issues .piege-requete { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--danger); }
.piege-requete-trajet { position: relative; flex: 0 0 64px; height: 2px; background: repeating-linear-gradient(90deg, var(--danger) 0 4px, transparent 4px 8px); }
.piege-requete-trajet::after { content: ""; position: absolute; top: -3px; left: 56px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.piege .piege-issues .piege-legende { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--danger); }
.piege .piege-issues .piege-badge { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--bg-alt); border: 1px solid var(--border); font-size: 13px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.piege-badge svg { flex: 0 0 16px; color: var(--accent); }
.piege .piege-issues .piege-bloque { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.piege .piege-issues .piege-reponse-titre { margin: 10px 0 4px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.piege-retire { display: inline-block; padding: 0 6px; border-radius: 4px; background: var(--ink); color: var(--accent-on-dark); font: 600 12px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: nowrap; }
.section-dark .piege-note { margin-top: 14px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,0.7); }

/* Épinglé : tout tient dans un écran ; la réponse « sans » puis « avec » occupe la même
   place sous le document. */
.motion-on .piege.pin-on h2 { font-size: 36px; }
.motion-on .piege.pin-on .metier-comment-lead { margin-bottom: 18px; }
.motion-on .piege.pin-on .piege-tabs { margin-bottom: 12px; }
.motion-on .piege.pin-on .comment-step { padding-top: 10px; padding-bottom: 10px; }
.motion-on .piege.pin-on .piege-sans,
.motion-on .piege.pin-on .piege-avec { grid-area: 1 / 1; visibility: hidden; opacity: 0; transform: translateY(16px); transition: opacity .45s ease, transform .45s ease, visibility 0s linear .45s; }
.motion-on .piege.pin-on:has([data-pin-step="2"].is-active) .piege-sans,
.motion-on .piege.pin-on:has([data-pin-step="3"].is-active) .piege-avec { visibility: visible; opacity: 1; transform: none; transition: opacity .45s ease, transform .45s ease, visibility 0s; }
.motion-on .piege.pin-on:has([data-pin-step="2"].is-active) .piege-requete-trajet::after { animation: piege-requete 1.2s ease-in .4s 2 both; }
@keyframes piege-requete { from { transform: translateX(-56px); opacity: 1; } 85% { opacity: 1; } to { transform: none; opacity: 0.2; } }
/* Entrée : le document paraît normal. PDF : ligne en blanc sur blanc, police de 1 px ;
   page web : seul le rendu est montré, pas le code source. */
.motion-on .piege.pin-on.pin-intro .piege-doc-tag { opacity: 0; }
.motion-on .piege.pin-on.pin-intro .piege-cache { padding: 0; background: transparent; box-shadow: none; font-size: 1px; line-height: 1.2; color: #ffffff; }
.motion-on .piege.pin-on.pin-intro .piege-cache-label,
.motion-on .piege.pin-on.pin-intro .piege-source { display: none; }

@media (max-width: 768px) {
  .tabs-on .piege-tabs { display: flex; }
  .piege-tab { flex: 1 1 0; padding: 8px 6px; font-size: 13px; white-space: nowrap; }
  .piege-doc-head { flex-wrap: wrap; padding: 10px 14px; }
  .piege-doc-body { padding: 14px 16px 16px; }
  .piege-lignes > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}

/* --- Conformité du métier --- */
.metier-conformite { background: var(--bg-alt); }
.metier-conformite-grid { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.metier-conformite-note { margin-top: 28px; font-size: 14px; line-height: 1.55; color: var(--text-secondary); max-width: 760px; }

/* --- Bloc à deux colonnes (page sécurité : familles d'attaques, données repérées, outils) --- */
.metier-liste { background: #ffffff; }
.liste-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; align-items: start; }
.liste-grid .section-head { margin-bottom: 0; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: 14px; font-weight: 600; color: var(--ink); background: #ffffff; border: 1px solid var(--border); border-radius: 999px; padding: 6px 14px; }
.chiffres { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--border); }
.chiffres p { display: flex; align-items: center; gap: 14px; }
.chiffres strong { font-size: 52px; font-weight: 800; letter-spacing: -0.04em; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; min-width: 3ch; }
.chiffres span { font-size: 15px; line-height: 1.5; color: var(--text-secondary); }
.lignes { list-style: none; border-top: 1px solid var(--border); }
.lignes li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.lignes h3 { font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 4px; }
.lignes h3 a { color: var(--accent); text-decoration: none; }
.lignes h3 a:hover { text-decoration: underline; }
.lignes p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); }

/* --- Cas vécu : récit + moments --- */
.metier-scenario { background: #ffffff; }
.scenario-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 64px; align-items: start; }
.scenario-grid .section-head { margin-bottom: 24px; }
.scenario-recit p { font-size: 17px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 16px; max-width: 620px; }
.scenario-recit p:last-child { margin-bottom: 0; }
.scenario-recit strong { color: var(--ink); font-weight: 600; }
.scenario-moments { list-style: none; border-left: 2px solid var(--border); padding-top: 4px; }
.scenario-moments li { position: relative; padding: 0 0 26px 26px; }
.scenario-moments li:last-child { padding-bottom: 0; }
.scenario-moments li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #ffffff; border: 2px solid var(--accent); }
.moment-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.scenario-moments h3 { font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 6px; }
.scenario-moments p { font-size: 15px; line-height: 1.55; color: var(--text-secondary); }

/* --- Deux colonnes comparées (ce qui reste / ce qui part, secret des affaires) --- */
.metier-colonnes { background: #ffffff; }
.colonnes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.colonne { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 14px; padding: 28px 28px 24px; }
.colonne--accent { background: #ffffff; border-top: 3px solid var(--accent); }
.colonne h3 { font-size: 19px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 14px; }
.colonne ul { list-style: none; display: grid; gap: 10px; }
.colonne li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.5; color: var(--text-secondary); }
.colonne li::before { content: ""; position: absolute; left: 0; top: 0.6em; width: 7px; height: 7px; border-radius: 2px; background: var(--accent); }
.metier-note { margin-top: 28px; font-size: 15px; line-height: 1.6; color: var(--text-secondary); max-width: 760px; }
.metier-note strong { color: var(--ink); font-weight: 600; }

/* --- Étapes d'un dossier (assurance) --- */
.metier-etapes { background: #ffffff; }
.etapes { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; counter-reset: etape; }
.etapes li { counter-increment: etape; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 22px 18px 20px; }
.etapes li::before { content: counter(etape, decimal-leading-zero); display: block; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.etapes h3 { font-size: 17px; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); margin-bottom: 8px; }
.etapes p { font-size: 14.5px; line-height: 1.55; color: var(--text-secondary); }
.etapes p + p { margin-top: 8px; }
.etapes b { color: var(--ink); font-weight: 600; }
.etapes--trois { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* --- Texte à gauche de l'exemple, sans étapes --- */
.section-dark .metier-comment-points { list-style: none; display: grid; gap: 18px; }
.section-dark .metier-comment-points h3 { font-size: 18px; line-height: 1.25; letter-spacing: -0.015em; margin-bottom: 4px; }
.section-dark .metier-comment-points p { font-size: 15px; line-height: 1.55; color: rgba(255,255,255,0.72); }
.jeton--retire { background: #ffffff; color: var(--ink); border: 1px solid var(--border); }

/* --- Autres métiers --- */
.autres-metiers { background: #ffffff; padding-top: 64px; padding-bottom: 64px; }
.autres-metiers h2 { font-size: 24px; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 20px; }
.autres-metiers ul { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.autres-metiers a { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 18px 20px; border: 1px solid var(--border); border-radius: 12px; text-decoration: none; color: inherit; transition: border-color .2s ease; }
.autres-metiers a:hover { border-color: var(--accent); }
.autres-metiers a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.autres-metiers b { font-size: 16px; color: var(--ink); }
.autres-metiers span { font-size: 14px; color: var(--text-secondary); }

/* --- Pages de fonctionnalités (feature-*.html) : écran réel à côté du texte, détail ligne par ligne ---
   .ecran-cadre recadre la capture sur sa partie gauche en mobile : réduite à 343 px, elle serait illisible. */
.page-hero--photo .h1-kicker { color: var(--accent-on-dark); }
.page-hero--photo code { color: #ffffff; background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28); border-radius: 4px; padding: 0 4px; font-size: 0.9em; white-space: nowrap; }
.fonction-ecran { background: #ffffff; }
.fonction-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
.fonction-grid--inverse { grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); }
.fonction-texte .section-head { margin-bottom: 24px; }
.fonction-texte > p { font-size: 17px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 16px; }
.fonction-texte code, .fonction-lignes code { white-space: nowrap; font-size: 0.9em; border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; }
.fonction-texte code { background: var(--bg-alt); }
.ecran { margin: 0; }
.ecran-cadre { overflow: hidden; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 24px 48px -32px rgba(0, 32, 91, 0.45); }
.ecran img { display: block; width: 100%; height: auto; }
.ecran figcaption { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.fonction-detail { background: var(--bg-alt); }
.fonction-lignes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; border-top: 0; }
.fonction-lignes li:nth-child(-n+2) { border-top: 1px solid var(--border); }
.fonction-lignes code { background: #ffffff; }
.fonction-lignes li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.lignes .offre { display: inline-block; margin: 2px 0 6px; padding: 1px 9px; font-size: 12.5px; font-weight: 600; line-height: 1.6; color: var(--accent); background: var(--bg-alt); border-radius: 999px; }
@media (max-width: 900px) {
  .fonction-grid, .fonction-grid--inverse { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .fonction-grid--inverse .ecran { order: 1; }
  .fonction-lignes { grid-template-columns: minmax(0, 1fr); }
  .fonction-lignes li:nth-child(2) { border-top: 0; }
}
@media (max-width: 640px) {
  .ecran-cadre { overflow-x: auto; }
  .ecran img { width: 170%; max-width: none; }
}

/* --- CTA final --- */
.cta-final { text-align: center; }
.cta-final h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 14px; }
.cta-final p { font-size: 17.5px; line-height: 1.55; max-width: 620px; margin: 0 auto 28px; }
.cta-final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

@media (max-width: 1024px) {
  .page-hero h1 { font-size: 44px; }
  .page-hero-grid, .metier-comment-grid, .liste-grid { gap: 36px; }
  .metier-risques-grid { gap: 16px; }
  .metier-risques-grid .risque { padding: 24px 20px 20px; }
  .metier-conformite-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .scenario-grid { gap: 40px; }
}
@media (max-width: 900px) {
  .page-hero-grid, .metier-comment-grid, .liste-grid, .scenario-grid { grid-template-columns: minmax(0, 1fr); }
  .colonnes-grid { grid-template-columns: minmax(0, 1fr); }
  .etapes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etapes--trois { grid-template-columns: minmax(0, 1fr); }
  .page-hero-visual { max-width: 560px; width: 100%; margin: 0 auto; }
  .metier-risques-grid { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
  .avant-apres { max-width: 560px; }
}
@media (max-width: 768px) {
  .page-hero.page-hero--photo { min-height: 0; padding-top: 56px; padding-bottom: 64px; }
  .page-hero-photo::after { background: linear-gradient(180deg, rgba(0, 32, 91, 0.55) 0%, rgba(0, 32, 91, 0.86) 40%, rgba(0, 32, 91, 0.95) 100%); }
  .photo-credit { right: 8px; bottom: 8px; }
  .page-hero { padding-top: 32px; padding-bottom: 48px; }
  .page-hero h1 { font-size: 34px; margin-bottom: 16px; }
  .page-hero-lead { font-size: 16.5px; margin-bottom: 22px; }
  .page-hero-actions { margin-bottom: 26px; }
  .page-hero-actions .btn { flex: 1 1 100%; justify-content: center; }
  .page-hero-visual .schema { --schema-height: 300px; }
  .section-head { margin-bottom: 32px; }
  .section-head h2, .metier-comment h2, .cta-final h2 { font-size: 30px; }
  .section-head p, .metier-comment-lead { font-size: 16px; }
  .avant-apres-fields > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .metier-conformite-grid, .autres-metiers ul { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .chiffres { grid-template-columns: minmax(0, 1fr); }
  .etapes { grid-template-columns: minmax(0, 1fr); }
  .scenario-recit p { font-size: 16px; }
  .colonne { padding: 22px 20px 20px; }
  .chiffres strong { font-size: 42px; }
  .cta-final-actions .btn { flex: 1 1 100%; justify-content: center; }
}
