/* Les deux feuilles papier (Victor Hugo et Wilson) (dossier Feuilles/), même gabarit, générées depuis la configuration et la journée. */
.ps { font-family: Arial, "Liberation Sans", Helvetica, sans-serif; color: #1B2A41; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.ps .page { background: #fff; position: relative; overflow: hidden; }
.ps img.logo { position: absolute; left: 0; top: 0; width: auto; }
.ps img.wm { position: absolute; right: 0; top: -.75pt; }
.ps.ink img.logo, .ps.ink img.wm { display: none; }

/* ─── Programme Housekeeping : A4 paysage ─── */
.prog .page { width: 841.89pt; height: 595.28pt; padding: 18pt 24pt 0 24pt; }
.prog .top { position: relative; height: 37pt; border-bottom: .8pt solid #1B2A41; }
.prog .logo { height: 34pt; }
.prog .top h1 { position: absolute; left: 40pt; top: 15pt; margin: 0; font-size: 13.5pt; font-weight: 700; line-height: 1; }
.prog .site { position: absolute; left: 40pt; top: 0; font-size: 9pt; font-weight: 700; color: #9A4A2E; }
.prog .wm { width: 135pt; height: auto; }
.prog .fields { position: absolute; left: 316pt; right: 0; top: 15pt; display: flex; gap: 12pt; font-size: 8.5pt; color: #7A8391; align-items: baseline; }
.prog .fields .v { font-size: 11pt; color: #1B2A41; border-bottom: .8pt solid #DDE1E7; min-width: 170pt; padding: 0 2pt; height: 14pt; display: inline-block; }
.prog .fields .dt { position: absolute; right: 0; top: 2pt; font-size: 10pt; color: #1B2A41; }
.prog .cols { display: flex; gap: 14pt; margin-top: 7pt; }
.prog .col { width: 255pt; flex: none; position: relative; min-height: 505pt; }
.prog .col + .col::before { content: ""; position: absolute; left: -7.3pt; top: -2pt; bottom: 0; border-left: .4pt solid #DDE1E7; }
.prog .hd { position: relative; height: 11pt; margin-bottom: 9pt; border-bottom: .5pt solid #9AA3AF; font-size: 6.5pt; color: #7A8391; }
.prog .hd span { position: absolute; top: 3pt; }
.prog .hd .h1 { left: 64pt; width: 34pt; text-align: center; } .prog .hd .h2 { left: 98pt; width: 38pt; text-align: center; }
.prog .hd .h3 { left: 136pt; width: 34pt; text-align: center; } .prog .hd .h4 { left: 176pt; }
.prog .bt { height: 20pt; padding-top: 2pt; font-size: 11.5pt; font-weight: 700; color: #9A4A2E; } .prog .bt small { font-size: 8pt; font-weight: 400; color: #7A8391; margin-left: 3pt; }
.prog .fl { height: 10pt; padding-top: 2.2pt; font-size: 6.8pt; color: #7A8391; }
.prog .rm { position: relative; height: 20pt; border-bottom: .5pt solid #DDE1E7; }
.prog .rm.zb { background: #F3F4F6; box-shadow: -3pt 0 0 #F3F4F6; }
.prog .cd { position: absolute; left: 0; top: 3.7pt; font-size: 12pt; font-weight: 700; }
.prog .ty { position: absolute; left: 0; width: 58pt; text-align: right; top: 7pt; font-size: 7.5pt; font-weight: 700; color: #7A8391; }
.prog .k { position: absolute; top: 0; height: 20pt; display: flex; align-items: center; justify-content: center; }
.prog .k1 { left: 64pt; width: 34pt; } .prog .k2 { left: 98pt; width: 38pt; } .prog .k3 { left: 136pt; width: 34pt; }
.ps .box { width: 10pt; height: 10pt; border: .8pt solid #1B2A41; background: #fff; position: relative; display: inline-block; }
.ps .box.on::after { content: ""; position: absolute; left: 2.8pt; top: .3pt; width: 2.8pt; height: 5.8pt; border: solid #1B2A41; border-width: 0 1.2pt 1.2pt 0; transform: rotate(40deg); }
.prog .nt { position: absolute; left: 176pt; top: 3pt; width: 76pt; height: 14pt; font-size: 7.5pt; line-height: 14pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prog .rm.s-d { background: #DCF1DE; box-shadow: -3pt 0 0 #DCF1DE; } .prog .rm.s-d .cd { color: #247A33; } .prog .rm.s-d .box.on, .prog .rm.s-d .box.on::after { border-color: #2E8B3E; }
.prog .rm.s-r { background: #E1ECF9; box-shadow: -3pt 0 0 #E1ECF9; } .prog .rm.s-r .cd { color: #2F6DB5; } .prog .rm.s-r .box.on, .prog .rm.s-r .box.on::after { border-color: #2F6DB5; }
.prog .rm.s-p { background: #F9D9D5; box-shadow: -3pt 0 0 #F9D9D5; } .prog .rm.s-p .cd { color: #B3261E; } .prog .rm.s-p .box.on, .prog .rm.s-p .box.on::after { border-color: #B3261E; }
.prog .tot { margin-top: 11pt; position: relative; }
.prog .tl { height: 20pt; display: flex; align-items: flex-end; font-size: 9pt; }
.prog .tl span { width: 64pt; } .prog .tl b { width: 86pt; text-align: center; font-weight: 400; font-size: 11pt; border-bottom: .5pt solid #9AA3AF; padding-bottom: 1pt; min-height: 14pt; }
.prog .tl.hrc { margin-top: 6pt; } .prog .tl.hrc .box { width: 11pt; height: 11pt; margin-bottom: 1pt; }
.prog .free { position: absolute; left: 160pt; top: 0; width: 95pt; }
.prog .free .bt { margin-bottom: 0; font-size: 10pt; line-height: 10pt; height: 20pt; padding-top: 0; }
.prog .free .fr { display: block; width: 95pt; height: 28pt; margin-bottom: 3pt; border-left: 2pt solid #9A4A2E; background: #F3F4F6; font-size: 8pt; padding: 2pt 3pt; overflow: hidden; line-height: 1.2; }
/* Économie d'encre : version allégée (sans logo, sans fond, traits fins) */
.prog.ink .top { border-bottom: .5pt solid #9AA3AF; }
.prog.ink .top h1 { left: 0; top: 7pt; font-size: 18pt; font-weight: 400; }
.prog.ink .site { left: auto; right: 0; font-size: 10pt; font-weight: 400; }
.prog.ink .rm.zb, .prog.ink .rm.s-d, .prog.ink .rm.s-r, .prog.ink .rm.s-p { background: none; box-shadow: none; }
.prog.ink .free .fr { background: none; }
.prog.ink .cd { font-weight: 400; } .prog.ink .bt { font-weight: 400; }

/* ─── Feuille Gouvernante : A4 portrait ─── */
.gouv .page { width: 595.28pt; height: 841.89pt; padding: 16pt 28pt 0 28pt; }
.gouv .top { position: relative; height: 34pt; border-bottom: .8pt solid #1B2A41; }
.gouv .logo { height: 31pt; }
.gouv .top h1 { position: absolute; left: 36pt; top: 12pt; margin: 0; font-size: 12pt; font-weight: 700; line-height: 1; }
.gouv .site { position: absolute; left: 36pt; top: 0; font-size: 8pt; font-weight: 700; color: #9A4A2E; }
.gouv .wm { width: 130pt; height: auto; }
.gouv .today { position: absolute; right: 0; top: 17pt; font-size: 9.5pt; }
.gouv.ink .top h1, .gouv.ink .site { left: 0; }
.gouv .bh { height: 15pt; padding-top: 2pt; font-size: 10.5pt; font-weight: 700; color: #9A4A2E; margin-top: 3pt; }
.gouv .flds { display: flex; height: 13pt; align-items: baseline; font-size: 7.5pt; color: #7A8391; gap: 4pt; margin-bottom: 3pt; }
.gouv .flds .v { font-size: 9.5pt; color: #1B2A41; border-bottom: .5pt solid #A9B1BD; padding: 0 2pt; height: 12pt; width: 150pt; display: inline-block; }
.gouv .flds input.v { font: 9.5pt Arial, sans-serif; border-top: 0; border-left: 0; border-right: 0; outline: 0; background: transparent; }
.gouv .flds .hk { margin-left: auto; } .gouv .flds .hk .v { width: 130pt; }
.gouv .grid { display: grid; grid-template-columns: 40pt 46pt repeat(5, 27pt) 1fr; }
.gouv .gh > * { border-top: .5pt solid #5F6B7B; border-bottom: .5pt solid #5F6B7B; font-size: 7pt; font-weight: 700; color: #7A8391; display: flex; align-items: center; justify-content: center; height: 40pt; }
.gouv .gh .rot span { writing-mode: vertical-rl; transform: rotate(180deg); }
.gouv .gh .ob { justify-content: flex-start; padding-left: 5pt; border-right: .5pt solid #5F6B7B; }
.gouv .gc > * { height: 12pt; border-bottom: .5pt solid #5F6B7B; font-size: 8.5pt; font-weight: 700; text-align: center; line-height: 12pt; }
.gouv .gc .lab { font-size: 6pt; font-weight: 400; color: #7A8391; }
.gouv .gc .ob { border-right: .5pt solid #5F6B7B; }
.gouv .rm { display: contents; }
.gouv .rm > * { height: 18pt; border-bottom: .4pt solid #A9B1BD; }
.gouv .rm.zb > * { background: #F3F4F6; }
.gouv .rm.end > * { border-bottom: .5pt solid #5F6B7B; }
.gouv .rm .ty { border-right: .5pt solid #A9B1BD; font-size: 6.5pt; color: #7A8391; text-align: center; line-height: 18pt; }
.gouv .rm .cd { font-size: 10pt; font-weight: 700; text-align: center; line-height: 18pt; }
.gouv .rm .k { display: flex; align-items: center; justify-content: center; }
.gouv .rm .k .box { width: 9pt; height: 9pt; border-width: .7pt; }
.gouv .rm .k .box.on::after { left: 2.1pt; top: -.1pt; width: 2.3pt; height: 4.9pt; border-width: 0 1.1pt 1.1pt 0; }
.gouv button.k { padding: 0; border: 0; border-bottom: .4pt solid #A9B1BD; background: transparent; cursor: pointer; }
.gouv .rm .ob { border-right: .5pt solid #5F6B7B; padding: 0 5pt; font-size: 7.5pt; line-height: 18pt; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gouv .rm .ob input { width: 100%; height: 100%; border: 0; background: transparent; font: 7.5pt Arial, sans-serif; color: #1B2A41; outline: 0; padding: 0; }
.gouv .rm .k.b.on, .gouv .rm .k.br.on { background: #DCF1DE; } .gouv .rm .k.b.on .box::after, .gouv .rm .k.br.on .box::after { border-color: #247A33; }
.gouv .rm .k.rc.on { background: #E1ECF9; } .gouv .rm .k.rc.on .box::after { border-color: #2F6DB5; }
.gouv .rm .k.ar.on, .gouv .rm .k.bk.on { background: #E4E8F0; }
.gouv .rm.g .cd { background: #DCF1DE; color: #247A33; } .gouv .rm.r .cd { background: #E1ECF9; color: #2F6DB5; }
.gouv .tot { display: grid; grid-template-columns: 86pt repeat(5, 27pt) 1fr; height: 15pt; align-items: end; margin-top: 3pt; border-top: .8pt solid #1B2A41; }
.gouv .tot > * { text-align: center; font-size: 10pt; font-weight: 700; padding-top: 2pt; }
.gouv .tot .l { text-align: left; font-size: 8pt; color: #9A4A2E; padding-left: 2pt; }
.gouv .gh > :first-child, .gouv .gc > :first-child, .gouv .rm > :first-child { border-left: .5pt solid #5F6B7B; }
.gouv.ink .rm.zb > *, .gouv.ink .rm .k.on, .gouv.ink .rm.g .cd, .gouv.ink .rm.r .cd { background: none !important; }

/* ─── Aperçu à l'écran ─── */
.preview { overflow-x: auto; overflow-y: hidden; border-radius: 18px; background: #d9dce1; padding: 8px; scrollbar-width: none; }
.preview .page { margin: 0 auto 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.preview .page:last-child { margin-bottom: 0; }

.preview.zoomable { cursor: zoom-in; }
.tab-feuilles .pills, .tab-gouvernante .pills { flex-wrap: wrap; }

/* ─── Vue agrandie (plein écran, zoom, cases à toucher) ─── */
.sheet.sv .nav .glass-btn { width: 44px; height: 44px; }
.sv-bar { flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px 8px; }
.sv-bar .chips { flex: 1; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.sv-bar .chip { flex: none; min-height: 40px; font-size: 15px; padding: 0 14px; }
.sv-title { flex: 1; font-size: 13px; color: var(--sec); line-height: 1.3; }
.sv-short { display: none; }
@media (max-width: 640px) {
  .sv-long { display: none; } .sv-short { display: inline; }
  .sv-bar { flex-wrap: wrap; gap: 6px; }
  .sv-bar .chips { flex: 1 1 100%; }
  .sv-zoomctl { margin-left: auto; }
  .sv-zoomctl .tool, .sv-pct { min-height: 40px; }
  .sv-zoomctl .tool { width: 40px; }
}
.sv-zoomctl { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }
.sv-zoomctl .tool { flex: none; width: 44px; min-height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.sv-pct { min-width: 64px; min-height: 44px; border-radius: 999px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--glass); box-shadow: inset 0 0 0 .5px var(--sep); }
.sv-body { flex: 1; min-height: 0; overflow: auto; background: #d9dce1; padding: 8px; touch-action: pan-x pan-y; overscroll-behavior: none; -webkit-overflow-scrolling: touch; user-select: none; -webkit-user-select: none; }
.sv-zoom { width: max-content; margin: 0 auto; }
.sv-zoom .page { margin: 0 0 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.sv-zoom .page:last-child { margin-bottom: 0; }
.sv-hint { flex: none; padding: 6px 14px calc(var(--safe-bottom) + 8px); font-size: 12px; color: var(--sec); text-align: center; border-top: .5px solid var(--sep); background: var(--bg); }
/* Le zoom pose la bulle et l'annulation au-dessus de la feuille plein écran */
body.sv-open .scrim { z-index: 98; }
body.sv-open .bubble { z-index: 99; }
body.sv-open .confirm-scrim { z-index: 100; } body.sv-open .confirm { z-index: 101; }

.ps.inter button { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; text-align: inherit; }
.ps.inter .tap { cursor: pointer; }
.ps.inter .rm.tap:hover { background: #FFF6D8; box-shadow: -3pt 0 0 #FFF6D8; }
.ps.inter .k:hover .box { background: #FFF1B8; }
.ps.inter .k:active .box { transform: scale(.82); }
.prog.inter .nt { text-align: left; }
.prog.inter .nt:empty::after { content: "+ note"; color: #B5BBC5; font-size: 6.5pt; opacity: 0; }
.prog.inter .rm:hover .nt:empty::after { opacity: 1; }
.prog .nt em { font-style: italic; color: #7A8391; }
.gouv.inter .tap:hover { background: #FFF6D8 !important; }
.gouv.inter .rm .k.tap:not(.on):hover .box { background: #FFF1B8; }
.gouv.inter .rm .k:active .box { transform: scale(.82); }

#print { display: none; }
@media print {
  html, body { background: #fff !important; height: auto; }
  #print { display: block; }
  #print .page { margin: 0; break-after: page; page-break-after: always; box-shadow: none; }
  #print .page:last-child { break-after: auto; page-break-after: auto; }
}

/* ─── Onglet Feuilles : la feuille directement agrandie, qui remplit la place disponible ─── */
.sv-inline { display: flex; flex-direction: column; margin-top: 12px; height: calc(100dvh - var(--safe-top) - 250px); min-height: 380px; }
.sv-inline .sv-bar { padding: 0 0 8px; }
.sv-inline .sv-tools { flex-wrap: nowrap; gap: 10px; }
.sv-acts { flex: 1; min-width: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.sv-acts::-webkit-scrollbar { display: none; }
.sv-inline .sv-zoomctl { margin-left: 0; }
.sv-inline .sv-tools .chip { min-height: 44px; flex: none; }
.sv-inline .sv-tools .chip svg { width: 18px; height: 18px; }
.sv-inline .sv-body { border-radius: 18px; }
@media (min-width: 1024px) { .sv-inline { height: calc(100dvh - 170px); } }
@media (max-width: 599px) {
  .sv-head { display: none; }   /* le sélecteur Programme / Gouvernante dit déjà où l'on est */
  .sv-inline { height: calc(100dvh - var(--safe-top) - 182px); margin-top: 10px; }
  .sv-inline .sv-pct { display: none; }
}
