.rapport-page { background: var(--gris-fond); }
.rp { max-width: 860px; margin: 0 auto; padding: 24px 20px 80px; }
.rp-barre { position: sticky; top: calc(var(--entete) + 8px); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border: 1px solid var(--gris-ligne); border-radius: 980px; padding: 8px 8px 8px 18px; margin-bottom: 22px; box-shadow: var(--ombre); }
.rp-retour { color: var(--encre); font-size: .92rem; opacity: .8; }
.rp-retour:hover { opacity: 1; }
.rp-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-vide { background: #fff; border-radius: var(--r-l); padding: 48px 36px; text-align: center; }
.rp-vide h1 { font-size: 1.8rem; margin: 0 0 8px; }
.rp-feuille { position: relative; background: #fff; border-radius: 6px; box-shadow: var(--ombre-papier); padding: 52px 56px 64px; margin-bottom: 26px; min-height: 1100px; display: flex; flex-direction: column; }
.rp-feuille h2 { font-size: 1.75rem; line-height: 1.15; margin: 4px 0 8px; color: var(--nuit); }
.rp-tete { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--gris-ligne); padding-bottom: 14px; margin-bottom: 30px; }
.rp-logo { display: flex; flex-direction: column; font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; line-height: 1.05; color: var(--nuit); }
.rp-logo small { font-family: var(--police); font-size: .6rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--action); margin-top: 3px; }
.rp-date { font-size: .82rem; color: var(--gris-texte); }
.rp-intro { color: var(--gris-texte); margin: 0 0 26px; max-width: 60ch; }
.rp-pied { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; font-size: .72rem; color: var(--gris-texte); border-top: 1px solid var(--gris-ligne); }
.rp-couv { background: linear-gradient(180deg, #fff 0, #fff 60%, var(--gris-fond) 100%); }
.rp-sur { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--action); margin: 18px 0 6px; }
.rp-couv h1 { font-size: 2.6rem; line-height: 1.05; letter-spacing: -.03em; color: var(--nuit); margin: 0 0 12px; }
.rp-enjeu { background: var(--nuit); color: #fff; border-radius: var(--r-m); padding: 26px 30px; margin: 4px 0 18px; }
.rp-enjeu-sur { margin: 0; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .7; }
.rp-enjeu-v { margin: 6px 0 2px; font-family: var(--police-titre); font-size: 2.7rem; font-weight: 700; letter-spacing: -.03em; line-height: 1.05; }
.rp-enjeu-l { margin: 0; opacity: .82; font-size: .95rem; }
.rp-gains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.rp-gain { border: 1px solid var(--gris-ligne); border-radius: var(--r-m); padding: 18px 18px 16px; background: #fff; }
.rp-gain.alerte { border-color: #f1c89a; background: var(--alerte-doux); }
.rp-gain-sur { margin: 0 0 8px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--gris-texte); }
.rp-gain-v { margin: 0; font-family: var(--police-titre); font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; color: var(--ok); line-height: 1.1; }
.rp-gain.alerte .rp-gain-v { color: var(--alerte); }
.rp-gain-l { margin: 2px 0 10px; font-size: .86rem; font-weight: 500; line-height: 1.35; }
.rp-gain-x { margin: 0; font-size: .8rem; color: var(--gris-texte); line-height: 1.45; }
.rp-resume { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; border-top: 1px solid var(--gris-ligne); padding-top: 18px; }
.rp-resume p { margin: 0; font-size: .82rem; color: var(--gris-texte); line-height: 1.35; }
.rp-resume .rp-resume-v { font-family: var(--police-titre); font-size: 1.3rem; font-weight: 700; color: var(--encre); margin-bottom: 2px; }
.rp-resume-v small { font-size: .85rem; font-weight: 500; color: var(--gris-texte); }
.rp-note { font-size: .74rem; color: var(--gris-texte); margin: 18px 0 0; }
.rp-frise { list-style: none; margin: 0; padding: 0; position: relative; }
.rp-frise::before { content: ""; position: absolute; left: 35px; top: 10px; bottom: 10px; width: 2px; background: var(--gris-ligne); }
.rp-ev { position: relative; display: grid; grid-template-columns: 72px 1fr; gap: 18px; padding: 0 0 22px; break-inside: avoid; }
.rp-ev-date { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 18px; background: #fff; border: 1.5px solid var(--gris-ligne); font-size: .78rem; color: var(--gris-texte); line-height: 1.1; }
.rp-ev-date b { font-size: 1.45rem; color: var(--encre); font-family: var(--police-titre); }
.rp-ev-date small { font-size: .66rem; }
.rp-ev.fort .rp-ev-date { border-color: var(--action); background: var(--action-doux); }
.rp-ev.proche .rp-ev-date { border-color: var(--alerte); background: var(--alerte-doux); }
.rp-ev.passee { opacity: .5; }
.rp-ev h3 { margin: 6px 0 4px; font-size: 1.05rem; }
.rp-ev p { margin: 0 0 6px; font-size: .9rem; color: var(--gris-texte); line-height: 1.45; }
.rp-ev-reste { font-size: .76rem; font-weight: 600; color: var(--action); }
.rp-ev.proche .rp-ev-reste { color: var(--alerte); }
.rp-vide-txt { color: var(--gris-texte); }
.rp-tables { display: grid; gap: 18px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.rp-table caption { text-align: left; font-weight: 600; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--gris-texte); padding-bottom: 6px; }
.rp-table td { padding: 10px 0; border-bottom: 1px solid var(--gris-ligne); vertical-align: top; }
.rp-table td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; }
.rp-table tr.fort td { font-weight: 700; }
.rp-hyp { margin-top: 24px; background: var(--gris-fond); border-radius: var(--r-s); padding: 16px 18px; font-size: .78rem; color: var(--gris-texte); line-height: 1.5; }
.rp-hyp p { margin: 0 0 8px; } .rp-hyp p:last-child { margin: 0; }
.rp-etape { margin-bottom: 22px; }
.rp-etape h3 { display: flex; align-items: center; gap: 10px; font-size: 1.1rem; margin: 0 0 10px; }
.rp-etape h3 span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--nuit); color: #fff; font-size: .8rem; }
.rp-etape.passee h3 span { background: var(--ok); }
.rp-dems { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rp-dem { border: 1px solid var(--gris-ligne); border-radius: var(--r-s); padding: 12px 14px; break-inside: avoid; }
.rp-dem.fait { background: var(--ok-doux); border-color: transparent; }
.rp-dem-tete { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rp-dem h4 { margin: 0; font-size: .95rem; font-weight: 600; }
.rp-dem.fait h4 { color: var(--ok); }
.rp-statut { flex: none; font-size: .72rem; font-weight: 600; padding: 2px 10px; border-radius: 980px; }
.rp-statut.ok { color: var(--ok); background: #fff; }
.rp-statut.afaire { color: var(--alerte); background: var(--alerte-doux); }
.rp-statut.passe { color: var(--gris-texte); background: var(--gris-fond); }
.rp-dem-date { margin: 4px 0 0; font-size: .8rem; font-weight: 600; color: var(--action); }
.rp-docs { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.rp-docs li { position: relative; padding-left: 24px; font-size: .84rem; line-height: 1.4; }
.rp-docs li::before { content: ""; position: absolute; left: 0; top: 2px; width: 13px; height: 13px; border: 1.5px solid #a1a1a6; border-radius: 3px; }
.rp-suite { position: relative; }
.rp-suite.verrouille { max-height: 1250px; overflow: hidden; }
.rp-suite.verrouille .rp-feuille { filter: blur(5px); user-select: none; pointer-events: none; }
.rp-verrou { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-start; justify-content: center; padding-top: 120px;
  background: linear-gradient(180deg, rgba(245,245,247,0) 0, rgba(245,245,247,.75) 30%, var(--gris-fond) 75%); }
.rp-verrou[hidden] { display: none; }
.rp-verrou-carte { background: #fff; border-radius: var(--r-l); box-shadow: var(--ombre-papier); padding: 32px 34px; max-width: 470px; text-align: center; }
.rp-verrou-sur { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--action); }
.rp-verrou-carte h2 { font-size: 1.4rem; line-height: 1.2; margin: 8px 0 14px; }
.rp-verrou-carte ul { text-align: left; margin: 0 0 20px; padding: 0; list-style: none; display: grid; gap: 8px; font-size: .9rem; }
.rp-verrou-carte li { position: relative; padding-left: 26px; }
.rp-verrou-carte li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.rp-verrou-carte .btn { width: 100%; }
.rp-verrou-pied { margin: 10px 0 0; font-size: .78rem; color: var(--gris-texte); }
.rp-dialogue { border: 0; border-radius: var(--r-l); padding: 30px 30px 24px; max-width: 430px; width: calc(100% - 32px); box-shadow: var(--ombre-papier); text-align: center; }
.rp-dialogue::backdrop { background: rgba(11,31,58,.35); backdrop-filter: blur(3px); }
.rp-alerte-ico { display: grid; place-items: center; width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%; background: var(--alerte-doux); color: var(--alerte); font-weight: 800; font-size: 1.3rem; }
.rp-dialogue h2 { font-size: 1.2rem; line-height: 1.25; margin: 0 0 8px; }
.rp-dialogue p { color: var(--gris-texte); font-size: .92rem; margin: 0 0 20px; }
.rp-alerte-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .rp-feuille { padding: 30px 22px 40px; min-height: 0; }
  .rp-couv h1 { font-size: 2rem; }
  .rp-gains, .rp-resume { grid-template-columns: 1fr; }
  .rp-enjeu-v { font-size: 2.1rem; }
  .rp-barre { border-radius: var(--r-m); position: static; }
}
@media print {
  @page { size: A4; margin: 14mm 14mm 12mm; }
  .rapport-page { background: #fff; }
  .rp { max-width: none; padding: 0; }
  .rp-feuille { box-shadow: none; border-radius: 0; padding: 0; margin: 0; min-height: 268mm; break-after: page; }
  .rp-feuille:last-child { break-after: auto; }
  .rp-suite.verrouille { max-height: none; overflow: visible; }
  .rp-suite.verrouille .rp-feuille { filter: none; }
  .rp-couv { background: #fff; }
  .rp-enjeu, .rp-gain, .rp-dem.fait, .rp-statut, .rp-ev-date, .rp-etape h3 span, .rp-hyp { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rp-feuille h2 { font-size: 1.5rem; }
  .rp-couv h1 { font-size: 2.2rem; }
  #rp-demarches { min-height: 0; }
}
.rp-ident { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0 0 26px; }
.rp-ident label { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--gris-texte); }
.rp-ident input, .rp-ident select, .rp-ident textarea { font: inherit; font-size: .95rem; font-weight: 400; color: var(--encre, #1d1d1f); padding: 10px 12px; border: 1.5px solid var(--gris-ligne); border-radius: 10px; background: #fff; resize: vertical; }
.rp-ident input:focus, .rp-ident select:focus, .rp-ident textarea:focus { outline: none; border-color: var(--action); }
.rp-l-liste { margin: 0; padding: 0; list-style: none; counter-reset: l; display: grid; gap: 10px; }
.rp-l-liste li { counter-increment: l; display: grid; grid-template-columns: 30px 1fr; column-gap: 10px; font-size: .92rem; }
.rp-l-liste li::before { content: counter(l); grid-row: span 2; width: 26px; height: 26px; border-radius: 50%; background: var(--gris-fond); display: grid; place-items: center; font-size: .78rem; font-weight: 700; }
.rp-l-liste span { color: var(--gris-texte); font-size: .84rem; }
.rp-l-barre { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 6px 0 10px; font-size: .84rem; color: var(--gris-texte); }
.rp-l-barre > span:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
.rp-lettre { font-family: Georgia, "Times New Roman", serif; font-size: 1rem; line-height: 1.6; color: #1d1d1f; padding: 64px 72px; }
.rp-l-exp { margin-bottom: 34px; }
.rp-l-dest { margin: 0 0 34px 55%; }
.rp-l-lieu { margin: 0 0 26px 55%; }
.rp-l-objet { margin: 0 0 26px; }
.rp-l-corps p { margin: 0 0 14px; }
.rp-l-corps ul { margin: 0 0 14px; padding-left: 22px; }
.rp-cases { padding-left: 14px; }
.rp-l-sign { margin: 30px 0 0 55%; }
.rp-l-sign span { display: block; margin-top: 64px; font-size: .78rem; color: var(--gris-texte); font-family: system-ui, sans-serif; }
.rp-l-pj { margin-top: auto; padding-top: 26px; font-size: .86rem; }
.rp-blanc { display: inline-block; vertical-align: baseline; height: 1em; border-bottom: 1.5px dotted #8e8e93; }
@media (max-width: 720px) {
  .rp-ident { grid-template-columns: 1fr; }
  .rp-lettre { padding: 30px 22px; font-size: .92rem; }
  .rp-l-dest, .rp-l-lieu, .rp-l-sign { margin-left: 0; }
}
@media print {
  .rp-lettre { padding: 0; min-height: 268mm; }
  body.rp-un .rp-feuille:not(.rp-cible) { display: none !important; }
  body.rp-un .rp-cible { break-after: auto; }
}
.rp-apercu { text-align: center; }
.rp-apercu[hidden] { display: none; }
.rp-apercu-sur { margin: 0; font-size: .78rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--action); }
.rp-apercu h2 { margin: 8px 0 8px; }
.rp-apercu .rp-intro { max-width: 520px; margin: 0 auto 22px; }
.rp-apercu-lettre { text-align: left; max-height: 400px; overflow: hidden; padding: 32px 44px; border: 1px solid var(--gris-ligne); border-radius: 12px; background: #fff; user-select: none; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
.rp-apercu .btn { margin-top: 18px; }
@media (max-width: 720px) { .rp-apercu-lettre { padding: 22px 18px; max-height: 380px; } }
.rp-apercu-lettre .rp-l-dest { margin-bottom: 22px; }
.rp-attente { color: #6e6e73; font-style: italic; }
.rp-l4 { min-width: 4em; }
.rp-l7 { min-width: 7em; }
.rp-l8 { min-width: 8em; }
.rp-l9 { min-width: 9em; }
.rp-l10 { min-width: 10em; }
.rp-l12 { min-width: 12em; }
.rp-l14 { min-width: 14em; }
