/* Comparez vos retraites — charte reprise de la couverture du livre OCEAN 1968 */
@font-face { font-family: "Anton"; src: url("../fonts/Anton-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/CormorantGaramond-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/CormorantGaramond-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("../fonts/CormorantGaramond-MediumItalic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../fonts/RobotoCondensed-Light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../fonts/RobotoCondensed-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto Condensed"; src: url("../fonts/RobotoCondensed-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/Montserrat-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  /* palette de la couverture */
  --nuit: #062845; --abysse: #07182B; --bleu: #004A91; --bleu-vif: #007ACE; --rouge: #DF3829; --rouge-vif: #F42D0D;
  --bordeaux: #59343D; --ivoire: #F5E8DB; --papier: #FBF6F1; --gris-bleu: #93A3B5; --brume: #C9D3DE;
  /* encre sur papier */
  --encre: #0B1E33; --encre-2: #3C4E63; --encre-3: #6B7A8C; --filet: #DDD3C7; --papier-2: #F3ECE3;
  /* carrières : A = bleu, B = rouge (validés daltonisme sur papier et sur nuit) */
  --a: #1569B5; --b: #DF3829; --a-nuit: #3A9BE0; --b-nuit: #E8503F;
  --a-pale: #D6E5F3; --b-pale: #F7DAD5;
  --ok: #2E7D4F;
  --f-titre: "Anton", "Impact", "Arial Narrow Bold", sans-serif;
  --f-serif: "Cormorant Garamond", "Garamond", "Georgia", serif;
  --f-texte: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --f-label: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --r: 4px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1180px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--nuit); color: var(--papier);
  font-family: var(--f-texte); font-size: 17px; line-height: 1.55; font-weight: 400;
  min-height: 100vh; overflow-x: hidden;
}
/* halo tricolore de la couverture : bleu à gauche, lumière au centre, rouge à droite */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(60% 55% at 0% 30%, rgba(0, 74, 145, .55), transparent 70%),
    radial-gradient(60% 55% at 100% 30%, rgba(223, 56, 41, .42), transparent 70%),
    radial-gradient(38% 42% at 50% 8%, rgba(251, 246, 241, .16), transparent 70%),
    linear-gradient(180deg, var(--nuit) 0%, var(--abysse) 100%);
}
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("../img/grain.png"); mix-blend-mode: soft-light;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:hover { color: var(--ivoire); }
:focus-visible { outline: 3px solid var(--ivoire); outline-offset: 2px; border-radius: 2px; }
.papier :focus-visible { outline-color: var(--a); }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ivoire); color: var(--encre); padding: 8px 14px; z-index: 100; }
.skip:focus { top: 8px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------------------------------------------------------------- typographie */
.label { font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--brume); }
.titre-grain {
  font-family: var(--f-titre); font-weight: 400; text-transform: uppercase; letter-spacing: .005em; line-height: .92;
  color: var(--ivoire);
  background: url("../img/grain.png"), linear-gradient(var(--ivoire), var(--ivoire));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: none;
}
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1.section-titre, h2.section-titre, .section-titre { font-family: var(--f-titre); font-weight: 400; text-transform: uppercase; font-size: clamp(30px, 4.4vw, 48px); line-height: 1; color: var(--ivoire); letter-spacing: .01em; }
.chapeau { font-family: var(--f-serif); font-weight: 600; font-size: clamp(21px, 2.4vw, 27px); line-height: 1.25; color: var(--papier); max-width: 46ch; margin: 10px 0 0; }
.tricolore { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 5px; height: 4px; width: min(100%, 520px); }
.tricolore span:nth-child(1) { background: var(--bleu-vif); } .tricolore span:nth-child(2) { background: var(--papier); } .tricolore span:nth-child(3) { background: var(--rouge-vif); }
.tricolore.petit { width: 120px; height: 3px; gap: 3px; }
p { margin: 0 0 .9em; }
.muted { color: var(--brume); }
.num { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- en-tête */
.entete { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: rgba(6, 40, 69, .88); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid rgba(201, 211, 222, .14); }
.entete .wrap { display: flex; align-items: center; gap: 18px; min-height: 60px; }
.marque { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.marque b { font-family: var(--f-titre); font-weight: 400; font-size: 22px; letter-spacing: .02em; color: var(--ivoire); line-height: 1; }
.marque small { font-family: var(--f-label); font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--brume); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-family: var(--f-texte); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; padding: 8px 10px; color: var(--brume); border-bottom: 2px solid transparent; }
.nav a[aria-current="page"] { color: var(--ivoire); border-bottom-color: var(--ivoire); }
.nav a.livre { border: 1px solid rgba(245, 232, 219, .6); border-radius: var(--r); color: var(--ivoire); margin-left: 6px; }
.nav a.livre:hover { background: var(--ivoire); color: var(--nuit); }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid rgba(245, 232, 219, .5); color: var(--ivoire); border-radius: var(--r); padding: 8px 12px; font: 700 14px var(--f-texte); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; background: var(--abysse); padding: 8px var(--gutter) 16px; border-bottom: 1px solid rgba(201, 211, 222, .2); }
  .nav.ouvert { display: flex; }
  .nav a { padding: 12px 4px; font-size: 16px; }
  .nav a.livre { margin: 8px 0 0; text-align: center; }
}

/* ---------------------------------------------------------------- pages */
main { display: block; }
.page { padding-block: 28px 56px; }
@media (max-width: 760px) { .page .bloc-tete .chapeau { font-size: 19px; } }
.page[hidden] { display: none !important; }
.bloc { margin-top: 56px; }
.bloc-tete { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }

/* héro */
.hero { padding-block: clamp(16px, 4vw, 44px) 8px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(46px, 6.6vw, 92px); }
.hero h1 .l2 { white-space: nowrap; }
.hero .tricolore { margin-top: 18px; }
.hero .chapeau { font-size: clamp(23px, 2.6vw, 32px); max-width: 26ch; margin-top: 14px; }
.saisie-rapide { margin-top: 22px; background: var(--papier); color: var(--encre); border-radius: var(--r); padding: 18px; max-width: 560px; box-shadow: 0 18px 50px rgba(0, 0, 0, .3); }
.saisie-rapide label { display: block; font-weight: 700; font-size: 18px; margin-bottom: 10px; }
.saisie-rapide .ligne { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.saisie-rapide .rassure { margin: 12px 0 0; font-size: 14px; color: var(--encre-3); }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- boutons et champs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px; border-radius: var(--r); border: 2px solid var(--encre); background: var(--encre); color: var(--papier); font: 700 16px var(--f-texte); text-transform: uppercase; letter-spacing: .07em; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--nuit); color: var(--ivoire); }
.btn.clair { background: var(--ivoire); color: var(--nuit); border-color: var(--ivoire); }
.btn.clair:hover { background: var(--papier); color: var(--nuit); }
.btn.contour { background: transparent; color: var(--encre); border-color: var(--encre); }
.btn.contour:hover { background: var(--encre); color: var(--papier); }
.btn.contour-clair { background: transparent; color: var(--ivoire); border-color: rgba(245, 232, 219, .7); }
.btn.contour-clair:hover { background: var(--ivoire); color: var(--nuit); }
.btn.petit { min-height: 40px; padding: 6px 14px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn[disabled] { opacity: .55; cursor: progress; }

.annee { display: inline-flex; align-items: stretch; border: 2px solid var(--encre); border-radius: var(--r); background: #fff; overflow: hidden; }
.annee button { width: 46px; border: 0; background: var(--papier-2); color: var(--encre); font: 700 22px var(--f-texte); cursor: pointer; }
.annee button:hover { background: var(--filet); }
.champ .annee input[type="text"], .annee input { width: 4.2em; min-height: 0; box-shadow: none; border-radius: 0; border: 0; text-align: center; font: 400 30px var(--f-titre); letter-spacing: .03em; color: var(--encre); padding: 4px 2px; background: #fff; }
.annee input:focus { outline: none; }
.annee:focus-within { box-shadow: 0 0 0 3px var(--a-pale); }
.raccourcis { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.puce { border: 1px solid var(--filet); background: var(--papier); color: var(--encre-2); border-radius: 999px; padding: 4px 12px; font: 400 14px var(--f-texte); cursor: pointer; min-height: 32px; }
.puce:hover, .puce[aria-pressed="true"] { border-color: var(--encre); color: var(--encre); }
.puce[aria-pressed="true"] { background: var(--encre); color: var(--papier); }

.champ { display: flex; flex-direction: column; gap: 6px; }
.champ > label, .champ > .champ-lab { font-weight: 700; font-size: 15px; color: var(--encre); }
.champ .aide { font-size: 13.5px; color: var(--encre-3); line-height: 1.4; }
.champ input[type="text"], .champ select { font: 400 17px var(--f-texte); color: var(--encre); background: #fff; border: 2px solid #B9AFA3; border-radius: var(--r); padding: 10px 12px; min-height: 46px; width: 100%; max-width: 100%; }
.champ input[type="text"]:focus, .champ select:focus { border-color: var(--encre); outline: none; box-shadow: 0 0 0 3px var(--a-pale); }
.champ .erreur { color: #A12418; font-size: 14px; font-weight: 700; }
.pas { display: inline-flex; align-items: stretch; border: 2px solid #B9AFA3; border-radius: var(--r); background: #fff; overflow: hidden; }
.pas button { width: 44px; border: 0; background: var(--papier-2); font: 700 20px var(--f-texte); color: var(--encre); cursor: pointer; }
.champ .pas input[type="text"], .pas input { width: 4.5em; min-height: 0; padding: 4px 2px; box-shadow: none; border-radius: 0; text-align: center; border: 0; font: 400 18px var(--f-texte); color: var(--encre); background: #fff; }
.pas input:focus { outline: none; }
.pas:focus-within { border-color: var(--encre); }
.segments { display: flex; flex-wrap: wrap; gap: 6px; }
.segments label { position: relative; }
.segments input { position: absolute; opacity: 0; inset: 0; }
.segments span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 12px; border: 1.5px solid #B9AFA3; border-radius: var(--r); background: #fff; color: var(--encre-2); font-size: 15px; cursor: pointer; }
.segments input:checked + span { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.segments input:focus-visible + span { outline: 3px solid var(--a); outline-offset: 2px; }
/* salaire personnel (comparateur détaillé) */
.champ-salaire .facultatif { font: 400 12px var(--f-label); letter-spacing: .08em; text-transform: uppercase; color: var(--encre-3); margin-left: 6px; }
.sal-ligne { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.montant { display: flex; align-items: center; flex: 1 1 170px; max-width: 290px; min-width: 0; border: 2px solid #B9AFA3; border-radius: var(--r); background: #fff; padding-right: 12px; }
.montant:focus-within { border-color: var(--encre); box-shadow: 0 0 0 3px var(--a-pale); }
.champ .montant input[type="text"] { flex: 1 1 auto; width: auto; min-width: 0; border: 0; box-shadow: none; min-height: 46px; text-align: right; font: 400 22px var(--f-titre); letter-spacing: .03em; padding: 6px 8px 6px 12px; }
.champ .montant input[type="text"]:focus { box-shadow: none; }
.montant input::placeholder { color: #A8A096; }
.montant .unite { font-size: 15px; color: var(--encre-2); white-space: nowrap; }
.segments.compact span { min-height: 50px; padding: 6px 14px; }
.champ-salaire .raccourcis { margin-top: 0; }
.champ-salaire .aide a { color: var(--a); }

/* ---------------------------------------------------------------- papier (résultats) */
.papier { background: var(--papier); color: var(--encre); border-radius: var(--r); }
.papier a { color: var(--a); }
.papier .muted { color: var(--encre-3); }

/* ---------------------------------------------------------------- pyramide des générations */
.pyramide { position: relative; }
.pyr-rang { display: grid; grid-template-columns: 1fr; gap: 6px; padding: 7px 0; cursor: default; }
.pyr-lab { display: flex; justify-content: center; align-items: baseline; gap: 10px; flex-wrap: wrap; text-align: center; }
.pyr-lab .nom { font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brume); }
.pyr-lab .val { font-family: var(--f-titre); font-size: 26px; color: var(--ivoire); letter-spacing: .02em; }
.pyr-lab .proj { font-family: var(--f-label); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--nuit); background: var(--brume); padding: 2px 6px; border-radius: 3px; }
.pyr-barre { height: 30px; margin-inline: auto; border-radius: 4px; background: var(--ivoire); position: relative; transition: width .6s ease; }
.pyr-barre.projetee { background: repeating-linear-gradient(135deg, var(--gris-bleu) 0 7px, #B7C3D0 7px 14px); }
.pyr-rang:hover .pyr-barre, .pyr-rang:focus-within .pyr-barre { box-shadow: 0 0 0 2px var(--nuit), 0 0 0 4px var(--ivoire); }
.pyr-rang.marque-a .pyr-barre { box-shadow: 0 0 0 2px var(--nuit), 0 0 0 5px var(--a-nuit); }
.pyr-rang.marque-b .pyr-barre { box-shadow: 0 0 0 2px var(--nuit), 0 0 0 5px var(--b-nuit); }
.pyr-sol { height: 10px; margin-top: 6px; background: linear-gradient(90deg, transparent, rgba(201, 211, 222, .35), transparent); border-radius: 2px; }
.bulle { position: absolute; z-index: 30; pointer-events: none; background: var(--papier); color: var(--encre); border-radius: var(--r); padding: 10px 12px; font-size: 14px; line-height: 1.4; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); max-width: 280px; }
.bulle b { display: block; font-size: 15px; }

/* cartes générations */
.cartes-gen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .cartes-gen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cartes-gen { grid-template-columns: 1fr; } }
.carte-gen { padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.carte-gen h3 { font-family: var(--f-titre); font-weight: 400; font-size: 26px; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.carte-gen .nes { font-size: 14px; color: var(--encre-3); }
.carte-gen .gros { font-family: var(--f-titre); font-size: 44px; line-height: 1; color: var(--encre); }
.carte-gen .gros small { display: block; font-family: var(--f-texte); font-size: 14px; color: var(--encre-2); margin-top: 4px; letter-spacing: 0; }
.carte-gen dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0; font-size: 15px; border-top: 1px solid var(--filet); padding-top: 10px; }
.carte-gen dt { color: var(--encre-2); } .carte-gen dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.pastille { display: inline-block; font-family: var(--f-label); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; padding: 3px 7px; border-radius: 3px; background: var(--papier-2); color: var(--encre-2); border: 1px solid var(--filet); align-self: flex-start; }
.pastille.proj { background: #E4EAF1; color: #33475E; border-color: #C7D2DE; }

/* onglets */
.onglets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.onglets button { border: 1px solid rgba(201, 211, 222, .45); background: transparent; color: var(--brume); border-radius: 999px; padding: 7px 14px; font: 700 14px var(--f-texte); letter-spacing: .03em; cursor: pointer; min-height: 38px; }
.onglets button[aria-selected="true"] { background: var(--ivoire); color: var(--nuit); border-color: var(--ivoire); }

/* tableaux */
.table-defil { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.donnees { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
table.donnees th, table.donnees td { padding: 9px 10px; border-bottom: 1px solid var(--filet); text-align: right; white-space: nowrap; }
table.donnees th:first-child, table.donnees td:first-child { text-align: left; white-space: normal; min-width: 170px; }
table.donnees thead th { font-family: var(--f-label); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-2); font-weight: 600; border-bottom: 2px solid var(--encre); vertical-align: bottom; }
table.donnees tr.groupe td { background: var(--papier-2); font-weight: 700; text-align: left; font-family: var(--f-label); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--encre-2); }
table.donnees td.fort { font-weight: 700; }
table.donnees .ca { color: var(--a); font-weight: 700; } table.donnees .cb { color: var(--b); font-weight: 700; }
table.donnees tr.cle td { background: #EEF4EA; font-weight: 700; }

/* ---------------------------------------------------------------- comparateur */
.comparateur { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 16px; align-items: stretch; }
.carriere { padding: 18px 18px 20px; border-top: 6px solid var(--a); display: flex; flex-direction: column; gap: 14px; }
.carriere.b { border-top-color: var(--b); }
.carriere-tete { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.carriere-tete h2 { white-space: nowrap; }
.carriere-tete h2 { font-family: var(--f-titre); font-weight: 400; font-size: 28px; text-transform: uppercase; letter-spacing: .01em; }
.carriere.a .carriere-tete h2 { color: var(--a); } .carriere.b .carriere-tete h2 { color: var(--b); }
.inverser { align-self: center; width: 52px; height: 52px; border-radius: 50%; border: 2px solid rgba(245, 232, 219, .7); background: var(--nuit); color: var(--ivoire); cursor: pointer; display: grid; place-items: center; }
.inverser:hover { background: var(--ivoire); color: var(--nuit); }
.inverser svg { width: 24px; height: 24px; }
.regimes { display: flex; flex-wrap: wrap; gap: 6px; }
.regimes label { position: relative; }
.regimes input { position: absolute; opacity: 0; inset: 0; }
.regimes span { display: inline-flex; align-items: center; min-height: 38px; padding: 6px 11px; border: 1.5px solid #B9AFA3; border-radius: var(--r); background: #fff; color: var(--encre-2); font-size: 15px; cursor: pointer; }
.regimes input:checked + span { background: var(--encre); color: var(--papier); border-color: var(--encre); }
.regimes input:focus-visible + span { outline: 3px solid var(--a); outline-offset: 2px; }
.note-regime { font-size: 14px; color: #7A2A1F; background: #FBE9E5; border-radius: var(--r); padding: 8px 10px; }
@media (max-width: 760px) { .comparateur { grid-template-columns: 1fr; } .inverser { justify-self: center; } }

/* résultat */
.resultat { margin-top: 22px; }
.phrase-cle { padding: clamp(20px, 3.5vw, 36px); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(16px, 3vw, 34px); align-items: center; }
.phrase-cle .ecart { font-family: var(--f-titre); font-size: clamp(64px, 11vw, 132px); line-height: .9; color: var(--encre); letter-spacing: .01em; }
.phrase-cle p { font-family: var(--f-serif); font-weight: 600; font-size: clamp(22px, 2.7vw, 32px); line-height: 1.22; margin: 0; }
.phrase-cle .preuve { font-family: var(--f-texte); font-size: 16px; color: var(--encre-2); margin-top: 10px; font-weight: 400; line-height: 1.45; }
.phrase-cle .preuve b.ca { color: var(--a); } .phrase-cle .preuve b.cb { color: var(--b); }
@media (max-width: 640px) { .phrase-cle { grid-template-columns: 1fr; } }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.cartes-cles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
@media (max-width: 1000px) { .cartes-cles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .cartes-cles { grid-template-columns: 1fr; } }
.carte-cle { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.carte-cle .t { font-size: 14.5px; color: var(--encre-2); font-weight: 700; line-height: 1.25; min-height: 2.5em; }
.carte-cle .vals { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: baseline; }
.carte-cle .vals .k { font-family: var(--f-label); font-size: 11px; font-weight: 600; letter-spacing: .1em; }
.carte-cle .vals .k.a { color: var(--a); } .carte-cle .vals .k.b { color: var(--b); }
.carte-cle .vals .v { font-family: var(--f-titre); font-size: 25px; line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--encre); }
.carte-cle .d { font-size: 14px; font-weight: 700; color: var(--encre-2); border-top: 1px solid var(--filet); padding-top: 7px; }
.carte-cle .d svg { width: 14px; height: 14px; vertical-align: -2px; }

.frise { padding: 18px 18px 8px; margin-top: 14px; }
.frise h3, .papier h3.sous-titre { font-family: var(--f-label); font-weight: 600; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--encre-2); margin-bottom: 8px; }
.frise svg { width: 100%; height: auto; display: block; }

.en-clair { padding: 18px 20px; margin-top: 14px; }
.en-clair ul { margin: 0; padding-left: 1.1em; }
.en-clair li { margin-bottom: 8px; line-height: 1.45; }

/* capitalisation */
.capi { margin-top: 38px; }
.capi-grille { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .capi-grille { grid-template-columns: 1fr; } }
.capi-carte { padding: 18px; border-left: 6px solid var(--a); display: flex; flex-direction: column; gap: 10px; }
.capi-carte.b { border-left-color: var(--b); }
.capi-carte h3 { font-family: var(--f-titre); font-weight: 400; font-size: 22px; text-transform: uppercase; letter-spacing: .01em; }
.capi-carte .ecart-capi { font-family: var(--f-titre); font-size: clamp(38px, 5vw, 54px); line-height: 1; }
.capi-carte .ecart-capi small { display: block; font-family: var(--f-texte); font-size: 15px; color: var(--encre-2); letter-spacing: 0; margin-top: 4px; }
.capi-barres { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; font-size: 14px; }
.capi-barres .barre { height: 18px; border-radius: 0 4px 4px 0; background: var(--encre-3); min-width: 2px; }
.capi-barres .barre.capital { background: var(--ok); }
.capi-barres .val { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.capi-note { font-size: 14px; color: var(--brume); margin-top: 12px; max-width: 80ch; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; align-items: center; }
details.detail { margin-top: 26px; }
details.detail > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 10px; font: 700 16px var(--f-texte); text-transform: uppercase; letter-spacing: .07em; color: var(--ivoire); padding: 12px 0; border-top: 1px solid rgba(201, 211, 222, .25); }
details.detail > summary::-webkit-details-marker { display: none; }
details.detail > summary::before { content: "+"; font: 400 24px var(--f-titre); width: 24px; text-align: center; }
details.detail[open] > summary::before { content: "–"; }
details.detail .papier { padding: 8px 14px 14px; }

.avertissement { font-size: 14.5px; color: var(--brume); border-left: 3px solid var(--brume); padding: 6px 12px; margin-top: 18px; max-width: 90ch; }
.avertissement a { color: var(--ivoire); }

/* barre fixe mobile */
.barre-mobile { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--papier); color: var(--encre); padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); display: none; align-items: center; gap: 10px; box-shadow: 0 -8px 24px rgba(0, 0, 0, .3); font-size: 14.5px; }
.barre-mobile .rés { font-weight: 700; flex: 1; line-height: 1.25; }
.barre-mobile .rés b { font-family: var(--f-titre); font-weight: 400; font-size: 20px; }
@media (max-width: 760px) { .barre-mobile.active { display: flex; } body.avec-barre { padding-bottom: 78px; } }

/* ---------------------------------------------------------------- comparateur détaillé */
.onglets-pers { display: none; }
.personnes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.personne { padding: 18px; border-top: 6px solid var(--a); display: flex; flex-direction: column; gap: 14px; }
.personne.b { border-top-color: var(--b); }
.personne h2 { font-family: var(--f-titre); font-weight: 400; font-size: 28px; text-transform: uppercase; }
.personne.a h2 { color: var(--a); } .personne.b h2 { color: var(--b); }
.grille-champs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grille-champs .large { grid-column: 1 / -1; }
details.section-champs { border-top: 1px solid var(--filet); padding-top: 10px; }
details.section-champs > summary { cursor: pointer; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; list-style: none; }
details.section-champs > summary::-webkit-details-marker { display: none; }
details.section-champs > summary .res { font-weight: 400; font-size: 14px; color: var(--encre-3); text-align: right; }
details.section-champs > summary::after { content: "Modifier"; font-size: 13px; color: var(--a); font-weight: 700; text-decoration: underline; margin-left: 8px; white-space: nowrap; }
details.section-champs[open] > summary::after { content: "Fermer"; }
details.section-champs .grille-champs { margin-top: 14px; }
.outils-pers { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .onglets-pers { display: flex; gap: 6px; margin-bottom: 12px; position: sticky; top: calc(60px + env(safe-area-inset-top, 0px)); z-index: 20; background: var(--nuit); padding: 8px 0; }
  .onglets-pers button { flex: 1; min-height: 44px; border-radius: var(--r); border: 1.5px solid rgba(201, 211, 222, .5); background: transparent; color: var(--brume); font: 700 15px var(--f-texte); text-transform: uppercase; letter-spacing: .05em; }
  .onglets-pers button[aria-selected="true"] { background: var(--ivoire); color: var(--nuit); }
  .personnes { grid-template-columns: 1fr; }
  .personnes[data-vue="a"] .personne.b, .personnes[data-vue="b"] .personne.a, .personnes[data-vue="res"] .personne { display: none; }
  .grille-champs { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- méthodologie et textes */
.texte { max-width: 74ch; }
.texte h2 { font-family: var(--f-titre); font-weight: 400; text-transform: uppercase; font-size: clamp(26px, 3.4vw, 36px); color: var(--ivoire); margin: 44px 0 12px; line-height: 1.05; }
.texte h3 { font-family: var(--f-serif); font-weight: 600; font-size: 24px; color: var(--ivoire); margin: 26px 0 8px; }
.texte ul { padding-left: 1.2em; } .texte li { margin-bottom: 6px; }
.texte a { color: var(--ivoire); text-decoration-color: rgba(245, 232, 219, .5); text-underline-offset: 3px; }
.encadre { background: rgba(251, 246, 241, .07); border: 1px solid rgba(201, 211, 222, .25); border-radius: var(--r); padding: 16px 18px; margin: 16px 0; }
.encadre h3 { margin-top: 0; }
.sommaire { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 15px; margin: 18px 0 8px; }
.sommaire a { color: var(--brume); }
.telechargements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .telechargements { grid-template-columns: 1fr; } }
.telechargement { padding: 16px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.telechargement b { font-size: 17px; } .telechargement span { font-size: 14px; color: var(--encre-3); }
.sources li { font-size: 15.5px; }
.lexique dt { font-weight: 700; color: var(--ivoire); margin-top: 10px; } .lexique dd { margin: 2px 0 0; }

/* livre */
.livre-bloc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: center; padding: clamp(18px, 3vw, 30px); }
.livre-bloc img { width: 200px; border-radius: 2px; box-shadow: 0 16px 40px rgba(0, 0, 0, .45); }
.livre-bloc h2 { font-family: var(--f-titre); font-weight: 400; font-size: clamp(34px, 5vw, 56px); text-transform: uppercase; line-height: .95; }
.livre-bloc .sous { font-family: var(--f-serif); font-weight: 600; font-size: 24px; margin: 8px 0 14px; }
@media (max-width: 620px) { .livre-bloc { grid-template-columns: 1fr; } .livre-bloc img { width: 150px; } }

.cta-duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 700px) { .cta-duo { grid-template-columns: 1fr; } }
.cta { padding: 22px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
.cta h3 { font-family: var(--f-titre); font-weight: 400; text-transform: uppercase; font-size: 30px; line-height: 1; }
.cta p { margin: 0; color: var(--encre-2); }
.cta .fleche { font-weight: 700; color: var(--a); text-transform: uppercase; letter-spacing: .07em; font-size: 14px; }

/* partage */
.fenetre { position: fixed; inset: 0; z-index: 60; background: rgba(7, 24, 43, .78); display: grid; place-items: center; padding: 16px; }
.fenetre[hidden] { display: none !important; }
.fenetre-boite { background: var(--papier); color: var(--encre); border-radius: var(--r); max-width: 620px; width: 100%; max-height: 92vh; overflow: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.fenetre-boite h2 { font-family: var(--f-titre); font-weight: 400; font-size: 30px; text-transform: uppercase; }
.fenetre-boite img { border-radius: var(--r); border: 1px solid var(--filet); }
.fenetre-boite textarea { width: 100%; min-height: 90px; font: 400 15px var(--f-texte); border: 2px solid #B9AFA3; border-radius: var(--r); padding: 10px; color: var(--encre); }
.liens-partage { display: flex; flex-wrap: wrap; gap: 8px; }
.fermer { align-self: flex-end; background: none; border: 0; font: 700 15px var(--f-texte); text-transform: uppercase; letter-spacing: .06em; color: var(--encre-2); cursor: pointer; padding: 6px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ivoire); color: var(--nuit); padding: 10px 16px; border-radius: var(--r); font-weight: 700; z-index: 80; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.toast[hidden] { display: none !important; }

/* pied de page */
.pied { border-top: 1px solid rgba(201, 211, 222, .2); margin-top: 40px; padding-block: 28px 40px; font-size: 14.5px; color: var(--brume); }
.pied .wrap { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; }
.pied a { color: var(--brume); }
.pied .liens { display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: flex-end; }
@media (max-width: 700px) { .pied .wrap { grid-template-columns: 1fr; } .pied .liens { justify-content: flex-start; } }

@media print {
  @page { size: A4; margin: 16mm 15mm; }
  :root { color-scheme: light !important; }
  html { background: #fff !important; }
  body::before, body::after, .entete, .pied, .actions, .barre-mobile, .onglets-pers, .skip, .sommaire, .toast, .fenetre { display: none !important; }
  body { background: #fff !important; color: #0B1E33 !important; font-size: 11pt; }
  .page { padding: 0; }
  .texte, .texte p, .texte li, .texte dd, .texte h2, .texte h3, .texte dt, .texte a, .chapeau, .label, .section-titre, .muted, .titre-grain { color: #0B1E33 !important; -webkit-text-fill-color: #0B1E33 !important; background: none !important; }
  .texte h2 { break-after: avoid; font-size: 20pt; margin-top: 18pt; }
  .texte a { text-decoration: none; }
  .encadre { background: #F3ECE3 !important; border-color: #DDD3C7 !important; break-inside: avoid; }
  .telechargements { display: none !important; }
  details > summary { list-style: none; }
  details:not([open]) > *:not(summary) { display: block !important; }
}
