.planche-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.planche-tabs a { padding: .8rem; min-height: 44px; border-bottom: 3px solid transparent; }
.planche-tabs a[aria-current="page"] { border-color: var(--blue); background: var(--blue-soft); }
.planche-filters { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; margin-bottom: 1.5rem; align-items: end; }
.planche-filters > * { min-width: 0; }
@media screen {
 .planche-table { table-layout: fixed; }
 .planche-table th, .planche-table td { padding: .8rem .65rem; }
 .planche-table th { letter-spacing: 0; }
 .planche-table th:nth-child(1) { width: 5rem; }
 .planche-table th:nth-child(2) { width: 6.8rem; }
 .planche-table th:nth-child(3) { width: 6rem; }
 .planche-table th:nth-child(5) { width: 6.5rem; }
 .planche-table th:nth-child(6) { width: 4.5rem; }
 .planche-table th:nth-child(7) { width: 9.5rem; }
 .planche-table td { overflow-wrap: normal; }
 .planche-table td:nth-child(4) { overflow-wrap: anywhere; }
 .planche-table td strong, .planche-table td small { display: block; }
 .planche-table .button { white-space: nowrap; padding-inline: .8rem; }
 .planche-table .mobile-cell-label { display: none; }
}
@media screen and (max-width: 1200px) {
 .planche-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .table-wrap > .planche-table { display: block; min-width: 0; }
 .planche-table > thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
 .planche-table > tbody { display: block; }
 .planche-table > tbody > tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem 1rem; padding: 1rem; border-bottom: 1px solid var(--line); }
 .planche-table > tbody > tr > td { display: block; width: auto; min-width: 0; padding: 0; border: 0; overflow-wrap: anywhere; }
 .planche-table td::before { content: attr(data-label); display: block; color: var(--text-secondary); font-size: .8rem; font-weight: 600; margin-bottom: .2rem; }
 .planche-table td:nth-child(4) { grid-column: 1 / -1; grid-row: 1; }
 .planche-table td:nth-child(7), .planche-table td[colspan] { grid-column: 1 / -1; }
 .planche-table td:nth-child(4)::before, .planche-table td[colspan]::before { display: none; }
 .planche-table .actions { gap: .5rem; }
 .planche-table .actions .button { width: auto; min-height: 44px; }
}
@media screen and (max-width: 620px) {
 .planche-table > tbody > tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.planche-check { display: flex; gap: .5rem; align-items: center; min-height: 44px; }
.planche-period-title { font-size: 1.4rem; }
.planche-period-title small { font-size: 1rem; font-weight: 400; }
.planche-year, .planche-degree, .planche-degree-settings { border-block: 1px solid var(--line); padding-block: .5rem; }
.planche-year { margin-bottom: 1.25rem; }
.planche-year summary, .planche-degree summary, .planche-degree-settings summary { cursor: pointer; min-height: 48px; padding: .75rem; overflow-wrap: anywhere; }
.planche-year summary span { margin-left: 1rem; color: var(--text-secondary); }
.planche-degree { margin-left: 1rem; }
.planche-content { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 16px; line-height: 1.75; background: var(--surface-solid); padding: 1.25rem; border-block: 1px solid var(--line); }
.planche-snapshot { display: flex; flex-wrap: wrap; gap: 2rem; }
.planche-snapshot dd { margin-left: 0; }
.planche-editor textarea { min-height: 440px; line-height: 1.6; }
.meeting-degrees #meeting_degrees { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.meeting-degrees #meeting_degrees > div { display: flex; align-items: center; gap: .5rem; min-height: 44px; max-width: 100%; }
.meeting-degrees label { overflow-wrap: anywhere; }
.meeting-section { grid-template-columns: minmax(0, 1fr); gap: 1rem; padding-block: 1.25rem; border-bottom: 1px solid var(--line); }
.meeting-section h2 { font-size: 1.35rem; margin: 0; }
@media screen {
 #planches-a-lire .button, #planches-regroupees .button { min-height: 44px; }
 #planches-regroupees td:first-child, #planches-regroupees td:nth-child(3) { overflow-wrap: normal; word-break: normal; }
}
.planche-settings { padding-block: 1rem; }
.planche-settings h2, .planche-import-row h2 { font-size: 1.25rem; }
.planche-degree-settings > .form-grid { padding: .75rem; }
.planche-import-row { padding-block: 1rem; border-bottom: 1px solid var(--line); }
.planche-variables { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .75rem; padding: 1rem 2rem; }
.planche-variables code { white-space: normal; overflow-wrap: anywhere; }
.planche-print { max-width: 210mm; margin: 1rem auto; background: white; padding: 1.5rem; }
.planche-sheet { color: #111; font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 1.28; letter-spacing: 0; width: 100%; min-height: 270mm; box-sizing: border-box; padding: 10mm 13mm; display: flex; flex-direction: column; }
.planche-letterhead { margin-bottom: 9mm; }
.planche-document-year { text-align: right; font-size: 13px; font-weight: 700; margin: 0 0 4mm; }
.planche-obedience { display: flex; align-items: center; gap: 3mm; margin-bottom: 3mm; font-size: 12px; line-height: 1.2; font-weight: 700; }
.planche-obedience-logo { display: block; width: 18mm; height: 18mm; object-fit: contain; }
.planche-invocation, .planche-salutation { text-align: center; font-size: 14px; font-weight: 700; margin: 3mm 0 0; overflow-wrap: anywhere; }
.planche-document-text { overflow-wrap: anywhere; }
.planche-document-text p { margin: 0 0 3mm; white-space: pre-wrap; orphans: 3; widows: 3; }
.planche-document-footer { margin-top: auto; padding-top: 5mm; break-inside: avoid; }
.planche-signatures { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4mm 2mm; font-weight: 700; }
.planche-signatures p { margin: 0; }
.planche-signature-master { grid-column: 2; text-align: center; }
.planche-signature-orator { grid-column: 1; grid-row: 2; }
.planche-signature-secretary { grid-column: 3; grid-row: 2; text-align: right; }
.planche-lodge-logo { display: block; width: 24mm; height: 24mm; object-fit: contain; margin: 13mm auto 0; }
@media screen and (max-width: 700px) {
 .planche-sheet { padding: 20px 16px; min-height: 0; font-size: 16px; line-height: 1.5; }
 .planche-document-year { font-size: 12px; }
 .planche-invocation, .planche-salutation { font-size: 13px; }
 .planche-signatures { font-size: 12px; }
}
@media print {
 html:has(.planche-sheet), body:has(.planche-sheet) { min-height: 0; }
 body:has(.planche-sheet) .skip-link { display: none !important; }
 .planche-sheet { width: 100%; min-height: 270mm; padding: 0; font-size: 10.5pt; line-height: 1.22; }
 .planche-sheet .planche-document-year { font-size: 10pt; }
 .planche-sheet .planche-invocation, .planche-sheet .planche-salutation { font-size: 10.5pt; }
}
@media screen and (max-width: 700px) {
 .planche-filters, .planche-variables { grid-template-columns: minmax(0,1fr); }
 .planche-tabs a { flex: 1 1 140px; }
 .planche-degree { margin-left: .4rem; }
 .planche-content, .planche-print { padding: .8rem; }
}
@media print {
 .no-print { display: none !important; }
 .planche-print { padding: 0; max-width: none; margin: 0; }
 .planche-content { border: 0; padding: 0; }
}
