
  :root {
    --papier: #F4F6F5;
    --blanc: #FFFFFF;
    --encre: #1D2B2F;
    --encre-douce: #4A5A5E;
    --ardoise: #1F6F68;
    --ardoise-claire: #DCE8E4;
    --ocre: #9A5B12;
    --ocre-claire: #F6EBDD;
    --trait: #C9D3D0;
    --serif: "Source Serif 4", Georgia, serif;
    --sans: "Atkinson Hyperlegible", system-ui, sans-serif;
  }
  * { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--papier);
    color: var(--encre);
    font: 400 1.125rem/1.7 var(--serif);
    font-optical-sizing: auto;
  }
  a { color: var(--ardoise); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
  a:hover { text-decoration-thickness: 2px; }
  :focus-visible { outline: 3px solid var(--ardoise); outline-offset: 3px; border-radius: 2px; }

  /* ——— Ouverture : la photo porte le titre ——— */
  .ouverture {
    position: relative;
    min-height: min(78vh, 46rem);
    display: flex; flex-direction: column; justify-content: space-between;
    color: var(--blanc);
    background: var(--encre);
    overflow: hidden;
  }
  .ouverture > img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 40%;
    transform-origin: 55% 45%;
    animation: approche 24s ease-out both;
  }
  /* Une seule lente approche à l'ouverture, puis l'image se fige : pas de boucle. */
  @keyframes approche {
    from { transform: scale(1); }
    to   { transform: scale(1.08); }
  }
  @media (prefers-reduced-motion: reduce) {
    .ouverture > img { animation: none; }
  }
  .ouverture::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(16,26,29,.45) 0%, rgba(16,26,29,0) 28%, rgba(16,26,29,.35) 50%, rgba(16,26,29,.92) 100%);
  }
  .ouverture > * { position: relative; z-index: 1; }
  .site {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
    max-width: 68rem; width: 100%; margin: 0 auto; padding: 1.1rem 1.25rem;
    font: 700 1rem/1 var(--sans);
  }
  .site nav { display: flex; gap: 1.25rem; font-weight: 400; font-size: 0.9375rem; }
  .site nav a { font-weight: 400; }
  .site nav a:hover, .site .logo:hover { text-decoration: underline; text-underline-offset: 0.25em; }
  .site a { color: var(--blanc); text-decoration: none; letter-spacing: -0.01em; text-shadow: 0 1px 10px rgba(16,26,29,.7); }
  .titre { text-shadow: 0 1px 14px rgba(16,26,29,.55); }
  .titre { max-width: 44rem; width: 100%; margin: 0 auto; padding: 0 1.25rem 2.25rem; }
  h1 {
    font: 700 clamp(2.2rem, 8vw, 3.6rem)/1.06 var(--serif);
    letter-spacing: -0.025em;
    margin: 0 0 1rem;
    max-width: 16ch;
    text-wrap: balance;
  }
  .maj { font: 400 0.9375rem/1.5 var(--sans); margin: 0; opacity: .88; }
  .credit-photo { font: 400 0.75rem/1.4 var(--sans); opacity: .7; margin: 0.6rem 0 0; }
  .credit-photo a, .ouverture .credit-photo a { color: inherit; }

  main { max-width: 44rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

  .chapeau {
    font: 400 1.35rem/1.55 var(--serif);
    margin: 2.25rem 0 1.5rem;
    text-wrap: pretty;
  }

  .sommaire {
    font-family: var(--sans); font-size: 1rem; line-height: 1.45;
    border-top: 1px solid var(--trait); border-bottom: 1px solid var(--trait);
    padding: 1.1rem 0 0.6rem; margin: 0 0 2.5rem;
  }
  .sommaire p { margin: 0 0 0.6rem; font-weight: 700; }
  .sommaire p span { font-weight: 400; color: var(--encre-douce); }
  .sommaire ol { margin: 0; padding-left: 1.25rem; }
  .sommaire li { margin-bottom: 0.45rem; }
  .sommaire a { color: var(--encre); text-decoration-color: var(--trait); }

  /* ——— Photos dans le texte ——— */
  figure { margin: 2rem 0; }
  figure img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--trait); }
  figcaption { font: 400 0.9375rem/1.5 var(--sans); color: var(--encre-douce); margin-top: 0.6rem; }
  figcaption .credit-photo { opacity: 1; color: var(--encre-douce); }
  figcaption .credit-photo a { color: var(--encre-douce); }
  @media (min-width: 52rem) {
    figure.large { margin-left: -4rem; margin-right: -4rem; }
  }

  /* ——— Exergue ——— */
  .exergue {
    margin: 2.25rem 0; padding: 0;
    font: 400 1.6rem/1.35 var(--serif); font-style: italic;
    color: var(--ardoise); text-wrap: balance;
  }
  .exergue p { margin: 0; }
  .exergue footer { font: 400 0.875rem/1.4 var(--sans); font-style: normal; color: var(--encre-douce); margin-top: 0.75rem; }
  .exergue::before { content: "“"; display: block; font: 700 4rem/0.6 var(--serif); color: var(--trait); margin-bottom: 0.6rem; }

  h2 {
    font: 600 1.6rem/1.25 var(--serif);
    letter-spacing: -0.01em;
    margin: 3.25rem 0 1rem;
  }
  h3 { font: 700 1.0625rem/1.4 var(--sans); margin: 2rem 0 0.5rem; }
  p, ul, ol { margin: 0 0 1.1rem; }
  ul, ol { padding-left: 1.35rem; }
  li { margin-bottom: 0.5rem; }
  strong { font-weight: 600; }
  dfn { font-style: normal; font-weight: 600; }
  .trad { color: var(--encre-douce); }

  /* ——— Calculateur : l'élément de la page ——— */
  .calcul {
    background: var(--blanc);
    border: 1px solid var(--trait);
    border-radius: 14px;
    padding: 1.5rem 1.25rem 1.25rem;
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.5;
  }
  .calcul h2 { font: 700 1.25rem/1.3 var(--sans); margin: 0 0 0.35rem; letter-spacing: 0; }
  .calcul .consigne { color: var(--encre-douce); margin: 0 0 1.25rem; }
  .nombre { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
  .nombre label { font-weight: 700; }
  .stepper { display: inline-flex; align-items: center; border: 1px solid var(--trait); border-radius: 999px; }
  .stepper button {
    width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer;
    font: 700 1.25rem/1 var(--sans); color: var(--ardoise); border-radius: 999px;
  }
  .stepper button:disabled { color: var(--trait); cursor: default; }
  .stepper output { min-width: 2rem; text-align: center; font-weight: 700; font-size: 1.125rem; }

  .heritiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: 0.6rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
  .heritiers li { margin: 0; }
  .heritier {
    width: 100%; min-height: 4.75rem; padding: 0.6rem 0.4rem;
    border-radius: 10px; cursor: pointer;
    font: 400 0.875rem/1.3 var(--sans);
    border: 2px solid var(--trait); background: var(--papier); color: var(--encre-douce);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem;
    transition: background-color .15s, border-color .15s, color .15s;
  }
  .heritier b { font-size: 1rem; color: var(--encre); }
  .heritier[aria-pressed="true"] { background: var(--ardoise-claire); border-color: var(--ardoise); color: var(--ardoise); }

  .jauge { position: relative; height: 0.9rem; background: var(--papier); border-radius: 999px; border: 1px solid var(--trait); overflow: visible; margin: 0 0 0.4rem; }
  .jauge .rempli { position: absolute; inset: 0 auto 0 0; background: var(--ardoise); border-radius: 999px; transition: width .25s ease; }
  .jauge .seuil { position: absolute; top: -0.35rem; bottom: -0.35rem; left: 66.667%; width: 2px; background: var(--encre); }
  .reperes { position: relative; display: flex; justify-content: space-between; font-size: 0.8125rem; color: var(--encre-douce); margin-bottom: 1rem; }
  .reperes span:nth-child(2) { position: absolute; left: 66.667%; transform: translateX(-50%); }

  .verdict { margin: 0; padding: 0.9rem 1rem; border-radius: 10px; font-size: 1.0625rem; }
  .verdict.oui { background: var(--ardoise-claire); }
  .verdict.non { background: var(--ocre-claire); }
  .verdict strong { font-weight: 700; }
  .calcul .note { font-size: 0.875rem; color: var(--encre-douce); margin: 0.9rem 0 0; }

  /* ——— Le récit ——— */
  .recit { border-left: 3px solid var(--ardoise); padding: 0.1rem 0 0.1rem 1.25rem; }
  .recit p:last-child { margin-bottom: 0; }

  /* ——— Étapes : une vraie séquence ——— */
  .etapes { list-style: none; padding: 0; counter-reset: etape; margin: 1.25rem 0 1.5rem; }
  .etapes li {
    counter-increment: etape; position: relative;
    padding: 0 0 1.25rem 3.25rem; margin: 0;
  }
  .etapes li::before {
    content: counter(etape);
    position: absolute; left: 0; top: 0.1rem;
    width: 2.1rem; height: 2.1rem; border-radius: 50%;
    background: var(--ardoise); color: var(--blanc);
    font: 700 1rem/2.1rem var(--sans); text-align: center;
  }
  .etapes li:not(:last-child)::after {
    content: ""; position: absolute; left: 1.03rem; top: 2.5rem; bottom: 0.3rem;
    width: 2px; background: var(--trait);
  }
  .etapes strong { font-family: var(--sans); font-weight: 700; }

  .attention {
    background: var(--ocre-claire); border-radius: 10px; padding: 1rem 1.1rem;
    font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  }
  .attention p:last-child { margin-bottom: 0; }
  .attention strong { color: var(--ocre); }

  /* ——— Encart partenaire ——— */
  .partenaire {
    margin: 1.75rem 0; padding: 1.25rem; border-radius: 14px;
    background: var(--encre); color: var(--papier);
    font-family: var(--sans); font-size: 1rem; line-height: 1.55;
  }
  .partenaire { overflow: hidden; padding-top: 0; }
  .partenaire-photo { display: block; width: calc(100% + 2.5rem); max-width: none; margin: 0 -1.25rem 1rem; aspect-ratio: 16 / 7; object-fit: cover; height: auto; }
  .partenaire .mention { font-size: 0.8125rem; opacity: 0.75; margin: 0 0 0.5rem; }
  .partenaire .mention a { color: inherit; }
  .partenaire h3 { margin: 0 0 0.5rem; font-size: 1.1875rem; color: var(--blanc); }
  .partenaire a.bouton {
    display: inline-block; margin-top: 0.4rem; padding: 0.8rem 1.15rem; border-radius: 999px;
    background: var(--ardoise-claire); color: var(--encre); text-decoration: none; font-weight: 700;
  }
  .partenaire a.bouton:hover { background: var(--blanc); }
  .partenaire :focus-visible { outline-color: var(--ardoise-claire); }

  .situation { margin: 0 0 1.5rem; }
  .situation h3 { margin-top: 1.5rem; }

  .sources { font: 400 0.9375rem/1.6 var(--sans); color: var(--encre-douce); }
  .sources ul { padding-left: 1.1rem; }
  .avertissement { font: 400 0.9375rem/1.55 var(--sans); color: var(--encre-douce); border-top: 1px solid var(--trait); padding-top: 1.25rem; margin-top: 2.5rem; }

  @media (min-width: 40rem) {
    body { font-size: 1.1875rem; }
    .calcul { padding: 1.75rem 1.75rem 1.5rem; }
  }
  @media (prefers-reduced-motion: reduce) {
    .jauge .rempli, .heritier { transition: none; }
  }

  /* ——— Calculateur de l'indemnité ——— */
  .champ { display: grid; gap: 0.35rem; margin: 0 0 1rem; }
  .champ label { font-weight: 700; }
  .champ .aide { font-size: 0.875rem; color: var(--encre-douce); }
  .champ input {
    font: 400 1.125rem/1.2 var(--sans); padding: 0.7rem 0.8rem; width: 100%; max-width: 14rem;
    border: 1px solid var(--trait); border-radius: 10px; background: var(--papier); color: var(--encre);
  }
  .champ select {
    font: 400 1.0625rem/1.3 var(--sans); padding: 0.7rem 0.8rem; width: 100%;
    border: 1px solid var(--trait); border-radius: 10px; background: var(--papier); color: var(--encre);
  }
  .resultat { margin: 0.4rem 0 0; padding: 1rem; border-radius: 10px; background: var(--ardoise-claire); }
  .resultat .total { font: 700 2rem/1.1 var(--serif); color: var(--ardoise); display: block; margin: 0.2rem 0 0.5rem; }
  .resultat p { margin: 0 0 0.5rem; }
  .resultat p:last-child { margin-bottom: 0; }
  .plafond { background: var(--ocre-claire); padding: 0.6rem 0.8rem; border-radius: 8px; }

  /* ——— Bandeau des pages sans photo d'ouverture ——— */
  .bandeau { background: var(--encre); }
  .bandeau .site a { text-shadow: none; }

  /* ——— Pied de page commun ——— */
  .pied {
    background: var(--encre); color: var(--ardoise-claire);
    font: 400 0.9375rem/1.6 var(--sans);
  }
  .pied-in { max-width: 44rem; margin: 0 auto; padding: 2.5rem 1.25rem 2rem; }
  .pied .logo { color: var(--blanc); font-weight: 700; font-size: 1.125rem; text-decoration: none; }
  .pied p { margin: 0.6rem 0 1.25rem; max-width: 36rem; }
  .pied ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
  .pied li { margin: 0; }
  .pied a { color: var(--blanc); }
  .pied .petit { font-size: 0.8125rem; opacity: 0.75; margin: 0; }

  /* ——— Accueil ——— */
  .accueil h1 { max-width: 13ch; }
  .situations { list-style: none; padding: 0; margin: 1.25rem 0 0; border-top: 1px solid var(--trait); }
  .situations li { margin: 0; border-bottom: 1px solid var(--trait); }
  .situations a, .situations .bientot {
    display: block; padding: 1.15rem 0; text-decoration: none; color: var(--encre);
  }
  .situations .question { display: block; font: 600 1.25rem/1.3 var(--serif); }
  .situations a .question { text-decoration: underline; text-decoration-color: var(--trait); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
  .situations a:hover .question { text-decoration-color: var(--ardoise); }
  .situations .reponse { display: block; font: 400 1rem/1.5 var(--sans); color: var(--encre-douce); margin-top: 0.3rem; }
  .situations .bientot .question { color: var(--encre-douce); }
  .situations .bientot .reponse::before { content: "À paraître. "; font-weight: 700; }

  .sujets { display: grid; gap: 1.25rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
  .sujets li { margin: 0; padding: 1.1rem 1.15rem; background: var(--blanc); border: 1px solid var(--trait); border-radius: 12px; }
  .sujets h3 { margin: 0 0 0.35rem; font-size: 1.125rem; }
  .sujets p { margin: 0 0 0.5rem; font: 400 1rem/1.5 var(--sans); color: var(--encre-douce); }
  .sujets ul { margin: 0; padding-left: 1.1rem; font: 400 1rem/1.5 var(--sans); }
  .sujets .vide { font-style: italic; }
  @media (min-width: 40rem) { .sujets { grid-template-columns: 1fr 1fr; } }

  .engagements { counter-reset: none; list-style: none; padding: 0; margin: 1.25rem 0; }
  .engagements li { margin: 0 0 1rem; padding-left: 1.1rem; border-left: 3px solid var(--ardoise); }
  .engagements strong { display: block; font-family: var(--sans); }

  /* ——— Questionnaire d'orientation ——— */
  .questions fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; }
  .questions legend { font-weight: 700; margin-bottom: 0.5rem; }
  .choix { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .choix label {
    display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer;
    padding: 0.55rem 0.9rem; border: 2px solid var(--trait); border-radius: 999px; background: var(--papier);
  }
  .choix input { accent-color: var(--ardoise); }
  .choix label:has(input:checked) { border-color: var(--ardoise); background: var(--ardoise-claire); }
  .questions fieldset[hidden] { display: none; }

  /* ——— Tableau du rapport ——— */
  .dons { display: grid; gap: 0.6rem; margin: 0 0 1rem; }
  .don { display: grid; grid-template-columns: 6.5rem 1fr; align-items: center; gap: 0.6rem; }
  .don label { font-weight: 700; }
  .tableau { width: 100%; border-collapse: collapse; font-size: 0.9375rem; margin: 0.4rem 0 0.6rem; }
  .tableau th, .tableau td { text-align: right; padding: 0.4rem 0.3rem; border-bottom: 1px solid var(--trait); }
  .tableau th:first-child, .tableau td:first-child { text-align: left; }
  .tableau tbody tr:last-child td { border-bottom: 0; }
  .tableau.mots th, .tableau.mots td { text-align: left; vertical-align: top; }

  /* ——— Questions fréquentes ——— */
  .faq { margin: 2.5rem 0 1.5rem; }
  .faq details { border-top: 1px solid var(--trait); padding: 0.85rem 0; }
  .faq details:last-of-type { border-bottom: 1px solid var(--trait); }
  .faq summary {
    cursor: pointer; list-style: none; position: relative; padding-right: 2rem;
    font: 700 1.0625rem/1.4 var(--sans); color: var(--encre);
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after {
    content: "+"; position: absolute; right: 0.25rem; top: -0.1rem;
    font: 400 1.5rem/1 var(--sans); color: var(--ardoise);
  }
  .faq details[open] summary::after { content: "–"; }
  .faq summary:focus-visible { outline: 3px solid var(--sceau, var(--ardoise)); outline-offset: 3px; }
  .faq details p { margin: 0.6rem 0 0; }

  /* ——— Champs à compléter avant publication ——— */
  .a-completer { background: #FFE9A8; color: #5A3A00; padding: 0 0.2em; border-radius: 3px; }

  /* ——— Tableaux de texte à plusieurs colonnes sur petit écran ——— */
  @media (max-width: 480px) {
    .tableau.mots { font-size: 0.8125rem; }
    .tableau.mots th, .tableau.mots td { padding: 0.35rem 0.2rem; hyphens: auto; overflow-wrap: anywhere; }
  }

  /* ——— Recherche ——— */
  .recherche label { display: block; font: 700 1rem/1.4 var(--sans); margin: 0 0 0.5rem; }
  .recherche-ligne { display: flex; gap: 0.5rem; }
  .recherche input {
    flex: 1; min-width: 0; font: 400 1.0625rem/1.3 var(--sans); padding: 0.75rem 0.85rem;
    border: 2px solid var(--trait); border-radius: 6px; background: var(--blanc); color: var(--encre);
  }
  .recherche input:focus-visible { outline: 3px solid var(--ardoise); outline-offset: 1px; border-color: var(--ardoise); }
  .recherche button {
    font: 700 1rem/1 var(--sans); padding: 0 1.1rem; border: 0; border-radius: 6px;
    background: var(--ardoise); color: var(--blanc); cursor: pointer;
  }
  .recherche-etat { font: 400 0.9375rem/1.5 var(--sans); color: var(--encre-douce); margin: 1rem 0 0; }
  .resultats { list-style: none; padding: 0; margin: 1rem 0 0; }
  .resultats li { padding: 1rem 0; border-bottom: 1px solid var(--trait); }
  .resultats a { font: 600 1.2rem/1.35 var(--serif); }
  .resultats .rubrique { display: block; font: 400 0.8125rem/1.4 var(--sans); color: var(--ocre); margin-top: 0.25rem; }
  .resultats p { font: 400 0.9688rem/1.55 var(--sans); margin: 0.4rem 0 0; color: var(--encre); }
  .resultats .extrait { color: var(--encre-douce); }
  .resultats mark { background: var(--ocre-claire); color: inherit; padding: 0 0.1em; border-radius: 2px; }
  @media (max-width: 30rem) { .recherche-ligne { flex-direction: column; } .recherche button { padding: 0.8rem; } }
