.finance-feature-head{display:flex;align-items:flex-end;justify-content:space-between;gap:var(--space-5);margin-bottom:var(--space-5)}
.finance-feature-head h1{margin:0;font-size:var(--font-size-2xl)}
.finance-feature-head p{margin:var(--space-1) 0 0;color:var(--color-text-muted)}
.finance-eyebrow{display:block;margin-bottom:var(--space-1);color:var(--color-amber-700);font-size:var(--font-size-xs);font-weight:800;text-transform:uppercase;letter-spacing:.06em}
.finance-actions,.finance-row-actions{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}
.finance-toolbar{display:grid;grid-template-columns:minmax(14rem,1fr) auto auto auto;gap:var(--space-3);margin-bottom:var(--space-5)}
.finance-toolbar input,.finance-toolbar select{min-height:var(--touch-target);border:.0625rem solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3);background:var(--color-surface);color:var(--color-text)}
.finance-table-wrap{overflow:auto}
.finance-table{width:100%;border-collapse:collapse;min-width:48rem}
.finance-table th,.finance-table td{padding:var(--space-4);border-bottom:.0625rem solid var(--color-border);text-align:left;vertical-align:middle}
.finance-table th{font-size:var(--font-size-xs);text-transform:uppercase;color:var(--color-text-muted);letter-spacing:.04em}
.finance-table td small,.finance-config-card small,.finance-student-card small,.finance-payment-card small{display:block;margin-top:var(--space-1);color:var(--color-text-muted)}
.finance-badge{display:inline-flex;align-items:center;min-height:1.75rem;border-radius:999px;padding:var(--space-1) var(--space-3);font-size:var(--font-size-xs);font-weight:800;background:var(--color-anthracite-100);color:var(--color-anthracite-700)}
.finance-badge--success{background:var(--color-anthracite-100);color:var(--color-success)}
.finance-badge--warning{background:var(--color-amber-100);color:var(--color-warning)}
.finance-badge--danger{background:var(--color-anthracite-100);color:var(--color-danger)}
.finance-badge--muted{background:var(--color-anthracite-100);color:var(--color-text-muted)}
.finance-pager{display:flex;justify-content:space-between;align-items:center;gap:var(--space-3);margin-top:var(--space-4);color:var(--color-text-muted)}
.finance-pager>div{display:flex;align-items:center;gap:var(--space-3)}
.finance-empty{padding:var(--space-8);text-align:center;color:var(--color-text-muted)}
.finance-card-list{display:grid;gap:var(--space-3)}
.finance-student-card,.finance-payment-card,.finance-config-card{padding:var(--space-5)}
.finance-student-card__top,.finance-config-card{display:flex;justify-content:space-between;align-items:flex-start;gap:var(--space-4)}
.finance-money-row{display:grid;grid-template-columns:repeat(3,1fr);gap:var(--space-2);margin:var(--space-4) 0;padding:var(--space-3);border-radius:var(--radius-md);background:var(--color-surface-soft)}
.finance-money-row span{font-size:var(--font-size-xs);color:var(--color-text-muted)}
.finance-money-row strong{display:block;margin-top:var(--space-1);color:var(--color-text)}
.finance-payment-card{display:grid;grid-template-columns:1fr auto;gap:var(--space-2) var(--space-4);align-items:center}
.finance-payment-card__amount{text-align:right}.finance-payment-card__amount span{display:block;color:var(--color-text-muted);font-size:var(--font-size-xs)}
.finance-config-card__value{text-align:right;display:grid;justify-items:end;gap:var(--space-2)}
.finance-tabs{display:flex;gap:var(--space-2);overflow:auto;margin-bottom:var(--space-4);padding-bottom:var(--space-1)}
.finance-tabs button{min-height:var(--touch-target);border:.0625rem solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-2) var(--space-4);background:var(--color-surface);font-weight:800;white-space:nowrap}
.finance-tabs button[aria-selected="true"]{background:var(--color-anthracite-950);color:var(--color-surface);border-color:var(--color-anthracite-950)}
.finance-selected-student{padding:var(--space-4);margin-bottom:var(--space-4);border-radius:var(--radius-md);background:var(--color-amber-100)}
.finance-selected-student span,.finance-selected-student small{display:block;color:var(--color-text-muted);font-size:var(--font-size-xs)}
.finance-search-results{display:grid;gap:var(--space-2);margin:var(--space-4) 0;max-height:22rem;overflow:auto}
.finance-search-result{width:100%;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);padding:var(--space-3) var(--space-4);background:var(--color-surface);text-align:left}
.finance-search-result strong,.finance-search-result span{display:block}.finance-search-result span{margin-top:var(--space-1);color:var(--color-text-muted);font-size:var(--font-size-xs)}
.is-muted{opacity:.55}
.students-recovery{display:grid;gap:var(--space-4);margin-bottom:var(--space-5)}
.students-recovery__head{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--space-5);padding-bottom:var(--space-2)}
.students-recovery__head h1{margin:0;color:var(--color-text);font-size:clamp(1.55rem,2.4vw,2rem);letter-spacing:-.025em}
.students-recovery__head p{margin:.35rem 0 0;color:var(--color-text-muted)}
.students-recovery__actions{display:flex;align-items:center;justify-content:flex-end;gap:var(--space-2);flex-wrap:wrap}
.students-recovery__collect{min-height:2.75rem;padding-inline:1.15rem}
.students-recovery-tabs{display:flex;align-items:center;gap:.45rem;overflow-x:auto;padding-bottom:.15rem;scrollbar-width:thin}
.students-recovery-tabs button{min-height:2.2rem;border:.0625rem solid var(--color-border);border-radius:.75rem;padding:.45rem .85rem;background:var(--color-surface);color:var(--color-text);font:inherit;font-size:var(--font-size-sm);font-weight:800;white-space:nowrap;cursor:pointer}
.students-recovery-tabs button[aria-pressed="true"]{border-color:var(--color-anthracite-950);background:var(--color-anthracite-950);color:var(--color-surface)}
.students-recovery-tabs--status{padding-top:.1rem}
.students-recovery-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--space-3);padding:var(--space-4);border:.0625rem solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface);box-shadow:var(--shadow-sm)}
.students-recovery-summary article{min-width:0;padding:var(--space-3);border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface-soft)}
.students-recovery-summary span{display:block;color:var(--color-text-muted);font-size:.68rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase}
.students-recovery-summary strong{display:block;margin-top:.35rem;color:var(--color-text);font-size:1.1rem;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.students-recovery-summary .is-collected strong{color:var(--color-success)}
.students-recovery-summary .is-remaining strong{color:var(--color-danger)}
.students-recovery-search{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:.55rem;min-height:3rem;padding:.35rem .5rem .35rem .85rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);box-shadow:var(--shadow-sm)}
.students-recovery-search>span{color:var(--color-text-muted);font-size:1.2rem}
.students-recovery-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;color:var(--color-text);font:inherit}
.students-recovery-search input::placeholder{color:var(--color-text-muted)}
.students-recovery-table .finance-table{min-width:58rem}
.students-recovery-table__number{width:3.5rem;text-align:center!important;color:var(--color-text-muted)}
.students-recovery-table__number strong{color:var(--color-text)}
.student-pay-disabled{cursor:not-allowed;opacity:.65}
.students-recovery-card__number{margin-bottom:.45rem;color:var(--color-text-muted);font-size:.68rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase}
.students-recovery-progress{display:grid;gap:.35rem;margin:-.15rem 0 var(--space-4)}
.students-recovery-progress>div{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);color:var(--color-text-muted);font-size:var(--font-size-xs)}
.students-recovery-progress progress{width:100%;height:.45rem;border:0;border-radius:999px;overflow:hidden;background:var(--color-anthracite-100)}
.students-recovery-progress progress::-webkit-progress-bar{background:var(--color-anthracite-100)}
.students-recovery-progress progress::-webkit-progress-value{background:var(--color-success)}
.students-recovery-progress progress::-moz-progress-bar{background:var(--color-success)}
.payments-school-only{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.7rem;padding:.75rem .85rem;border:1px solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface-soft)}
.payments-school-only span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:.6rem;background:var(--color-amber-100);color:var(--color-amber-700);font-weight:900}
.payments-school-only strong,.payments-school-only small{display:block}.payments-school-only small{margin-top:.15rem;color:var(--color-text-muted)}
@media(max-width:64rem){.students-recovery-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.students-recovery__head{align-items:stretch;flex-direction:column}.students-recovery__actions{justify-content:flex-start}}
@media(max-width:47.99rem){.students-recovery{gap:var(--space-3)}.students-recovery__head h1{font-size:1.45rem}.students-recovery__actions{display:grid;grid-template-columns:1fr 1fr}.students-recovery__actions .students-recovery__collect{grid-column:1/-1}.students-recovery__actions .btn{width:100%}.students-recovery-summary{gap:.55rem;padding:.65rem}.students-recovery-summary article{padding:.7rem}.students-recovery-summary strong{font-size:.9rem}.students-recovery-search{grid-template-columns:auto minmax(0,1fr);padding:.65rem .8rem}.students-recovery-search .btn{display:none}.students-recovery-tabs{margin-inline:-.25rem;padding-inline:.25rem}.students-recovery-mobile .finance-student-card{padding:var(--space-4)}}

/* P021-R1 — Élèves/Recouvrement : rendu mobile dédié, sans impact desktop. */
@media(max-width:47.99rem){
  .students-recovery-mobile-view{width:100%;max-width:100%;min-width:0;overflow-x:hidden}
  .students-recovery--mobile{width:100%;max-width:100%;min-width:0;gap:.75rem;margin-bottom:1rem}
  .students-recovery-mobile-head{display:grid;gap:.75rem;min-width:0}
  .students-recovery-mobile-head>div:first-child{min-width:0}
  .students-recovery-mobile-head h1{max-width:100%;margin:0;font-size:1.22rem;line-height:1.22;letter-spacing:-.02em;overflow-wrap:anywhere}
  .students-recovery-mobile-head p{max-width:100%;margin:.3rem 0 0;color:var(--color-text-muted);font-size:.82rem;line-height:1.35;overflow-wrap:anywhere}
  .students-recovery-mobile-actions{display:grid;gap:.5rem;width:100%;min-width:0}
  .students-recovery-mobile-actions__collect{width:100%;min-height:2.75rem;justify-content:center;gap:.35rem;padding:.65rem .8rem;font-size:.9rem}
  .students-recovery-mobile-actions__secondary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;min-width:0}
  .students-recovery-mobile-actions__secondary .btn{width:100%;min-width:0;min-height:var(--touch-target);padding:.55rem .45rem;font-size:.78rem;line-height:1.15;white-space:normal}
  .students-recovery-mobile-filters{display:grid;gap:.55rem;min-width:0;width:100%}
  .students-recovery--mobile .students-recovery-tabs{width:100%;max-width:100%;min-width:0;margin:0;padding:0}
  .students-recovery--mobile .students-recovery-tabs--classes{overflow-x:auto;overscroll-behavior-inline:contain;scroll-snap-type:x proximity;padding-bottom:.2rem}
  .students-recovery--mobile .students-recovery-tabs--classes button{flex:0 0 auto;scroll-snap-align:start;min-height:2.15rem;padding:.4rem .72rem;font-size:.78rem}
  .students-recovery--mobile .students-recovery-tabs--status{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;overflow:visible}
  .students-recovery--mobile .students-recovery-tabs--status button{min-width:0;min-height:var(--touch-target);padding:.42rem .2rem;font-size:.76rem;white-space:normal}
  .students-recovery-mobile-summary{min-width:0;width:100%}
  .students-recovery--mobile .students-recovery-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;width:100%;min-width:0;padding:.55rem;border-radius:1rem}
  .students-recovery--mobile .students-recovery-summary article{min-width:0;padding:.65rem;border-radius:.75rem}
  .students-recovery--mobile .students-recovery-summary span{font-size:.6rem;line-height:1.2;letter-spacing:.04em}
  .students-recovery--mobile .students-recovery-summary strong{margin-top:.25rem;font-size:.88rem;line-height:1.2;overflow-wrap:anywhere}
  .students-recovery-search--mobile{grid-template-columns:auto minmax(0,1fr);width:100%;max-width:100%;min-width:0;min-height:2.75rem;padding:.45rem .7rem;border-radius:.8rem}
  .students-recovery-search--mobile input{min-width:0;font-size:.88rem}
  .students-recovery-search__submit{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap}
  .students-recovery-mobile{width:100%;max-width:100%;min-width:0;gap:.65rem}
  .students-recovery-mobile-card{width:100%;max-width:100%;min-width:0;overflow:hidden;padding:.8rem;border-radius:1rem}
  .students-recovery-mobile-card__head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-width:0;margin-bottom:.55rem}
  .students-recovery-mobile-card__head .students-recovery-card__number{margin:0;flex:0 0 auto}
  .students-recovery-mobile-card__head .finance-badge{min-width:0;max-width:62%;min-height:1.5rem;padding:.25rem .55rem;font-size:.64rem;text-align:center;white-space:normal}
  .students-recovery-mobile-card__identity{display:grid;gap:.12rem;min-width:0;padding-bottom:.6rem;border-bottom:1px solid var(--color-border)}
  .students-recovery-mobile-card__identity strong{min-width:0;font-size:.98rem;line-height:1.2;overflow-wrap:anywhere}
  .students-recovery-mobile-card__identity span,.students-recovery-mobile-card__identity small{color:var(--color-text-muted);font-size:.75rem;line-height:1.25;overflow-wrap:anywhere}
  .students-recovery-mobile-card__identity small{margin:0}
  .students-recovery-mobile-card .finance-money-row.students-recovery-mobile-card__money{grid-template-columns:repeat(3,minmax(0,1fr));gap:.35rem;margin:.65rem 0;padding:.55rem}
  .students-recovery-mobile-card .students-recovery-mobile-card__money span{min-width:0;font-size:.62rem;line-height:1.2}
  .students-recovery-mobile-card .students-recovery-mobile-card__money strong{font-size:.8rem;line-height:1.15;overflow-wrap:anywhere}
  .students-recovery-mobile-card .students-recovery-mobile-card__money small{font-size:.58rem;line-height:1.15;overflow-wrap:anywhere}
  .students-recovery-mobile-card .students-recovery-progress{margin:0 0 .65rem}
  .students-recovery-mobile-card__actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem;width:100%}
  .students-recovery-mobile-card__actions .btn{width:100%;min-width:0;min-height:var(--touch-target);padding:.5rem .35rem;font-size:.78rem;line-height:1.15;white-space:normal}
  .students-recovery-mobile-card__actions .btn:only-child{grid-column:1/-1}
  .students-recovery-mobile-empty{padding:1.25rem .9rem}
  .students-recovery-mobile-empty p{margin:.35rem 0 0;font-size:.82rem}
  .students-recovery-pager--mobile{display:grid;gap:.55rem;width:100%;min-width:0;margin-top:.75rem;font-size:.75rem}
  .students-recovery-pager--mobile>span{text-align:center}
  .students-recovery-pager--mobile>div{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:.45rem;width:100%;min-width:0}
  .students-recovery-pager--mobile .btn{width:100%;min-width:0;padding:.45rem .35rem;font-size:.72rem}
}
@media(max-width:23.5rem){
  .students-recovery--mobile .students-recovery-tabs--status{grid-template-columns:repeat(2,minmax(0,1fr))}
  .students-recovery-mobile-card .finance-money-row.students-recovery-mobile-card__money{grid-template-columns:1fr}
  .students-recovery-mobile-actions__secondary{grid-template-columns:1fr}
}

/* P024-R6 — Fiche élève et saisie compacte, sans nouveau moteur. */
.student-profile-drawer{width:min(34rem,100%);padding:0;overflow:hidden;display:flex;flex-direction:column;background:var(--color-surface)}
.student-profile-head{position:relative;flex:0 0 auto;padding:1.35rem 4rem 1.1rem 1.5rem;border-bottom:.0625rem solid var(--color-border);background:linear-gradient(135deg,var(--color-surface) 0%,var(--color-amber-100) 170%)}
.student-profile-head h2{margin:.15rem 0 .55rem;color:var(--color-text);font-size:1.65rem;line-height:1.08;letter-spacing:-.025em}
.student-profile-head .finance-close{top:1rem;right:1rem}
.student-profile-meta{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.student-profile-chip{display:inline-flex;align-items:center;min-height:1.75rem;padding:.25rem .65rem;border:.0625rem solid var(--color-border);border-radius:999px;background:var(--color-surface);color:var(--color-text-muted);font-size:.7rem;font-weight:800}
.student-profile-chip--class{border-color:var(--color-amber-400);background:var(--color-amber-100);color:var(--color-amber-700)}
.student-profile-body{min-height:0;flex:1 1 auto;overflow:auto;padding:0 1.5rem 1.2rem;overscroll-behavior:contain}
.student-profile-section{padding:1rem 0;border-bottom:.0625rem solid var(--color-border)}
.student-profile-section:last-child{border-bottom:0}
.student-profile-section h3{display:flex;align-items:baseline;gap:.4rem;margin:0 0 .7rem;color:var(--color-text);font-size:.92rem}
.student-profile-section h3::before{content:"";flex:0 0 .24rem;width:.24rem;height:1rem;border-radius:999px;background:var(--color-amber-600)}
.student-profile-section h3 small{color:var(--color-text-muted);font-size:.68rem;font-weight:600}
.student-profile-contact{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:.8rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface-soft)}
.student-profile-contact>div{min-width:0}.student-profile-contact strong,.student-profile-contact span{display:block;overflow-wrap:anywhere}.student-profile-contact strong{font-size:.9rem}.student-profile-contact span{margin-top:.2rem;color:var(--color-text-muted);font-size:.78rem}
.student-whatsapp{border-color:var(--color-whatsapp)!important;background:var(--color-whatsapp)!important;color:var(--color-surface)!important;font-weight:850;box-shadow:var(--shadow-sm)}
.student-whatsapp:hover{background:var(--color-whatsapp-hover)!important;color:var(--color-surface)!important}
.student-profile-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.6rem}
.student-profile-kpi{min-width:0;padding:.8rem;border:.0625rem solid transparent;border-radius:var(--radius-lg)}
.student-profile-kpi span,.student-profile-kpi small{display:block;font-size:.68rem}.student-profile-kpi span{color:var(--color-text-muted)}.student-profile-kpi strong{display:block;margin:.3rem 0 0;font-size:1.03rem;font-variant-numeric:tabular-nums}.student-profile-kpi small{margin-top:.3rem;color:var(--color-text-muted);line-height:1.25}
.student-profile-kpi--expected{border-color:var(--color-dashboard-blue-soft);background:var(--color-dashboard-blue-soft)}.student-profile-kpi--expected strong{color:var(--color-dashboard-blue)}
.student-profile-kpi--paid{border-color:var(--color-dashboard-success-soft);background:var(--color-dashboard-success-soft)}.student-profile-kpi--paid strong{color:var(--color-dashboard-success)}
.student-profile-kpi--rest{border-color:var(--color-dashboard-danger-soft);background:var(--color-dashboard-danger-soft)}.student-profile-kpi--rest strong{color:var(--color-dashboard-danger)}
.student-profile-list{display:grid;gap:.45rem}
.student-profile-row{display:flex;align-items:center;justify-content:space-between;gap:.8rem;padding:.65rem .75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}
.student-profile-row>div{min-width:0}.student-profile-row strong,.student-profile-row span,.student-profile-row small{display:block}.student-profile-row small,.student-profile-row span{color:var(--color-text-muted);font-size:.7rem}.student-profile-row small{margin-top:.15rem}.student-profile-row>strong{font-variant-numeric:tabular-nums;text-align:right}
.student-profile-empty{display:grid;gap:.2rem;padding:.75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface-soft)}.student-profile-empty span{color:var(--color-text-muted);font-size:.72rem}.student-profile-empty--success{border-color:var(--color-dashboard-success-soft);background:var(--color-dashboard-success-soft)}.student-profile-empty--success strong{color:var(--color-dashboard-success)}
.student-profile-reliquat-action{display:flex;justify-content:flex-end;margin-top:.65rem}.student-profile-reliquat-action .btn{max-width:100%}
.student-profile-actions{display:flex;justify-content:flex-end;gap:.55rem;flex:0 0 auto;padding:.8rem 1.5rem;border-top:.0625rem solid var(--color-border);background:var(--color-surface)}
.student-entry-drawer{width:min(42rem,100%);padding:0;overflow:hidden;display:flex;flex-direction:column;background:var(--color-surface)}
.student-entry-head{position:relative;flex:0 0 auto;padding:1.25rem 4rem 1rem 1.5rem;border-bottom:.0625rem solid var(--color-border);background:linear-gradient(135deg,var(--color-surface) 0%,var(--color-dashboard-blue-soft) 170%)}
.student-entry-head h2{margin:.1rem 0 .25rem;font-size:1.5rem}.student-entry-head p{margin:0;color:var(--color-text-muted);font-size:.78rem;line-height:1.35}.student-entry-head .finance-close{top:.85rem;right:1rem}
.student-entry-form{min-height:0;flex:1 1 auto;overflow:auto;padding:1rem 1.5rem 0;gap:.8rem;overscroll-behavior:contain}
.student-entry-note{display:grid;grid-template-columns:auto 1fr;gap:.25rem .65rem;padding:.7rem .8rem;border:.0625rem solid var(--color-dashboard-blue-soft);border-radius:var(--radius-md);background:var(--color-dashboard-blue-soft);color:var(--color-dashboard-blue)}.student-entry-note::before{content:"i";grid-row:1/3;display:grid;place-items:center;width:1.45rem;height:1.45rem;border-radius:999px;background:var(--color-dashboard-blue);color:var(--color-surface);font-weight:900}.student-entry-note strong{font-size:.75rem}.student-entry-note span{font-size:.7rem;line-height:1.35}
.student-entry-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem .9rem}.student-entry-field{min-width:0}.student-entry-field input,.student-entry-field select,.student-entry-field textarea{min-height:2.55rem}.student-entry-field small{display:block;margin-top:.25rem;color:var(--color-text-muted);font-size:.66rem;line-height:1.3}.student-entry-field--wide{grid-column:1/-1}.student-entry-feedback{margin:0}.student-entry-actions{position:sticky;bottom:0;display:flex;justify-content:flex-end;gap:.6rem;margin:0 -1.5rem;padding:.8rem 1.5rem max(.8rem,env(safe-area-inset-bottom));border-top:.0625rem solid var(--color-border);background:var(--color-surface);z-index:2}.student-entry-actions .btn{min-width:10rem}
@media(max-width:47.99rem){
  .student-profile-overlay,.student-entry-overlay{align-items:stretch}
  .student-profile-drawer,.student-entry-drawer{align-self:stretch;width:100%;height:100dvh;max-height:100dvh;border-radius:0}
  .student-profile-head,.student-entry-head{padding:1rem 3.5rem .8rem 1rem}.student-profile-head h2,.student-entry-head h2{font-size:1.25rem}.student-profile-head .finance-close,.student-entry-head .finance-close{top:.55rem;right:.75rem}
  .student-profile-body{padding:0 1rem 1rem}.student-profile-section{padding:.8rem 0}.student-profile-contact{grid-template-columns:1fr;padding:.7rem}.student-whatsapp{width:100%;justify-content:center}.student-profile-kpis{gap:.4rem}.student-profile-kpi{padding:.65rem .55rem}.student-profile-kpi span,.student-profile-kpi small{font-size:.61rem}.student-profile-kpi strong{font-size:.88rem}.student-profile-row{padding:.55rem .6rem}.student-profile-actions{display:grid;grid-template-columns:1fr 1fr;padding:.7rem 1rem max(.7rem,env(safe-area-inset-bottom))}.student-profile-actions .btn{width:100%;min-width:0}.student-profile-actions .btn:only-child{grid-column:1/-1}
  .student-entry-form{padding:.8rem 1rem 0}.student-entry-grid{grid-template-columns:1fr;gap:.65rem}.student-entry-field--wide{grid-column:auto}.student-entry-note{padding:.65rem}.student-entry-actions{display:grid;grid-template-columns:1fr 1fr;margin:0 -1rem;padding:.7rem 1rem max(.7rem,env(safe-area-inset-bottom))}.student-entry-actions .btn{width:100%;min-width:0;padding-inline:.55rem}
  .student-profile-reliquat-action .btn{width:100%}
}
@media(max-width:23.5rem){.student-profile-kpis{grid-template-columns:1fr}.student-profile-actions,.student-entry-actions{grid-template-columns:1fr}}

/* P025-R3 — Reliquats structurés, abandon sécurisé et délégation individuelle. */
.student-profile-row--reliquat{align-items:flex-start;flex-wrap:wrap}.student-reliquat-breakdown{display:grid;grid-template-columns:repeat(4,minmax(5rem,1fr));gap:.35rem;flex:1 1 18rem}.student-reliquat-breakdown>span{padding:.45rem .5rem;border-radius:var(--radius-md);background:var(--color-surface-soft);font-size:.65rem}.student-reliquat-breakdown strong{display:block;margin-top:.15rem;color:var(--color-text);font-size:.78rem;font-variant-numeric:tabular-nums}.student-profile-row--reliquat>.finance-row-actions{flex:0 0 100%;justify-content:flex-end}.payments-context-note{display:block;color:var(--color-text-muted);font-size:.7rem;line-height:1.35}
.permission-sensitive-card{display:grid;gap:.8rem}.permission-sensitive-search{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.65rem;align-items:end}.permission-sensitive-search .field{margin:0}.permission-sensitive-list{display:grid;gap:.55rem}.permission-sensitive-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto;gap:.75rem;align-items:center;padding:.75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}.permission-sensitive-row__identity,.permission-sensitive-row__state{display:grid;gap:.18rem;min-width:0}.permission-sensitive-row__identity strong,.permission-sensitive-row__identity small,.permission-sensitive-row__state small{overflow-wrap:anywhere}.permission-sensitive-row__identity small,.permission-sensitive-row__state small{color:var(--color-text-muted);font-size:.7rem}.permission-sensitive-badge{display:inline-flex;width:max-content;max-width:100%;align-items:center;padding:.22rem .55rem;border-radius:999px;font-size:.68rem;font-weight:850}.permission-sensitive-badge.is-active{background:var(--color-dashboard-success-soft);color:var(--color-dashboard-success)}.permission-sensitive-badge.is-inactive{background:var(--color-surface-soft);color:var(--color-text-muted)}.permission-sensitive-pager{display:flex;justify-content:space-between;gap:.75rem;align-items:center;color:var(--color-text-muted);font-size:.72rem}.permission-sensitive-pager>div{display:flex;gap:.4rem}
@media(max-width:47.99rem){.student-reliquat-breakdown{grid-template-columns:repeat(2,minmax(0,1fr));flex-basis:100%}.student-profile-row--reliquat>.finance-row-actions{display:grid;grid-template-columns:1fr 1fr;width:100%}.student-profile-row--reliquat>.finance-row-actions .btn{width:100%}.permission-sensitive-search{grid-template-columns:1fr}.permission-sensitive-search .btn{width:100%}.permission-sensitive-row{grid-template-columns:1fr}.permission-sensitive-row>.btn{width:100%}.permission-sensitive-pager{align-items:stretch;flex-direction:column}.permission-sensitive-pager>div{display:grid;grid-template-columns:1fr 1fr}.permission-sensitive-pager .btn{width:100%}}
@media(max-width:23.5rem){.student-reliquat-breakdown{grid-template-columns:1fr}.student-profile-row--reliquat>.finance-row-actions{grid-template-columns:1fr}}

/* P026 — Cycle de vie des élèves : sortie, transfert, abandon et correction d'import. */
.students-departures .students-recovery__head{align-items:flex-start}
.students-lifecycle-tabs{margin-top:.65rem}
.students-lifecycle-note{display:grid;gap:.35rem;margin:.75rem 0;padding:.8rem .9rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface-soft)}
.students-lifecycle-note strong{font-size:.78rem;color:var(--color-text)}
.students-lifecycle-note span,.students-lifecycle-note small{color:var(--color-text-muted);font-size:.7rem;line-height:1.4}
.students-lifecycle-note--profile{margin:0}
.students-lifecycle-note--profile>div{display:flex;align-items:center;gap:.55rem;flex-wrap:wrap}
.students-departures-table td small{display:block;margin-top:.18rem;color:var(--color-text-muted);font-size:.68rem;line-height:1.3}
.students-lifecycle-card-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;margin:.65rem 0}
.students-lifecycle-card-meta>span{display:grid;gap:.15rem;padding:.55rem;border-radius:var(--radius-md);background:var(--color-surface-soft)}
.students-lifecycle-card-meta small{color:var(--color-text-muted);font-size:.64rem}
.students-lifecycle-card-meta strong{font-size:.78rem;overflow-wrap:anywhere}
.students-lifecycle-card-meta p{grid-column:1/-1;margin:0;padding:.55rem;border-left:.2rem solid var(--color-border);color:var(--color-text-muted);font-size:.72rem;line-height:1.4}
.student-profile-finance-note{margin:-.35rem 0 .7rem;color:var(--color-text-muted);font-size:.68rem;line-height:1.4}
.student-entry-note--danger{border-color:var(--color-dashboard-danger-soft);background:var(--color-dashboard-danger-soft);color:var(--color-dashboard-danger)}
.student-entry-note--danger::before{content:"!";background:var(--color-dashboard-danger)}
.student-lifecycle-confirm{display:flex;align-items:flex-start;gap:.55rem;padding:.7rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);font-size:.75rem;line-height:1.4}
.student-lifecycle-confirm input{margin-top:.15rem;flex:0 0 auto}
.student-lifecycle-danger{border-color:var(--color-dashboard-danger)!important;color:var(--color-dashboard-danger)!important;font-weight:850}
.student-lifecycle-danger:hover{background:var(--color-dashboard-danger-soft)!important;color:var(--color-dashboard-danger)!important}
.student-remove-import-modal{width:min(32rem,calc(100% - 2rem))}
@media(max-width:47.99rem){
  .students-departures .students-recovery__head{display:grid;gap:.55rem}
  .students-lifecycle-tabs{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:.35rem!important;overflow:visible!important}
  .students-lifecycle-tabs button{min-width:0!important;white-space:normal!important;font-size:.72rem!important}
  .students-lifecycle-note{margin:.55rem 0;padding:.7rem}
  .students-lifecycle-card-meta{grid-template-columns:1fr 1fr}
  .student-remove-import-modal{width:100%;max-width:none;border-radius:0;min-height:100dvh}
}
@media(max-width:23.5rem){.students-lifecycle-card-meta{grid-template-columns:1fr}.students-lifecycle-card-meta p{grid-column:auto}}
.student-responsible-results{display:grid;gap:.45rem}.student-responsible-result{display:grid;gap:.15rem;width:100%;padding:.7rem .8rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);color:var(--color-text);text-align:left;cursor:pointer}.student-responsible-result:hover,.student-responsible-result:focus-visible{border-color:var(--color-amber-400);background:var(--color-amber-100)}.student-responsible-result span,.student-responsible-result small{color:var(--color-text-muted);font-size:.7rem}.student-responsible-selected{grid-template-columns:auto 1fr auto;align-items:center}.student-responsible-selected::before{grid-row:1/3}.student-responsible-flags{display:flex;gap:.6rem;flex-wrap:wrap}.student-responsible-flags label{display:flex;align-items:center;gap:.4rem;min-height:2.35rem;padding:.55rem .75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface-soft);font-size:.78rem;font-weight:700}.student-responsible-flags input{width:1rem;height:1rem}.student-responsible-verified{align-items:flex-start}.student-responsible-verified>.btn{flex:0 0 auto}
@media(max-width:47.99rem){.student-responsible-selected{grid-template-columns:auto 1fr}.student-responsible-selected .btn{grid-column:1/-1;width:100%}.student-responsible-flags{display:grid;grid-template-columns:1fr 1fr}.student-responsible-verified{align-items:stretch;flex-direction:column}.student-responsible-verified>.btn{width:100%}}

/* P027 — Parent/Tuteur vérifié et remise fratrie annuelle, dans les UI existantes. */
.school-fees-fraternity-card{align-items:flex-start}
.school-fees-fraternity-paliers{display:flex;gap:.4rem;flex-wrap:wrap;margin-top:.55rem}
.school-fees-fraternity-paliers>span{display:inline-flex;align-items:center;gap:.2rem;padding:.3rem .55rem;border:.0625rem solid var(--color-border);border-radius:999px;background:var(--color-surface-soft);color:var(--color-text-muted);font-size:.68rem}
.school-fees-fraternity-paliers strong{color:var(--color-text)}
.school-fees-fraternity-toggle{padding:.75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface-soft)}
.school-fees-fraternity-rows{display:grid;gap:.6rem}
.school-fees-fraternity-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:.65rem;align-items:end;padding:.7rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-lg);background:var(--color-surface)}
.school-fees-fraternity-row .field{margin:0}
.school-fees-fraternity-row .btn{margin-bottom:.08rem}
@media(max-width:47.99rem){
  .school-fees-fraternity-card{display:grid;gap:.7rem}
  .school-fees-fraternity-card .school-fees-card__value{align-items:stretch;width:100%}
  .school-fees-fraternity-card .school-fees-card__value .btn{width:100%}
  .school-fees-fraternity-paliers{display:grid;grid-template-columns:1fr}
  .school-fees-fraternity-paliers>span{border-radius:var(--radius-md)}
  .school-fees-fraternity-row{grid-template-columns:1fr 1fr}
  .school-fees-fraternity-row .btn{grid-column:1/-1;width:100%}
}
@media(max-width:23.5rem){.school-fees-fraternity-row{grid-template-columns:1fr}}

/* P041 — nouvelles inscriptions par année, sans alourdir la synthèse Élèves. */
.students-new-enrollments{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);padding:.72rem .9rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface)}
.students-new-enrollments__current>div{display:flex;align-items:baseline;gap:.55rem}.students-new-enrollments__current span{color:var(--color-text-muted);font-size:.72rem;font-weight:800}.students-new-enrollments__current strong{font-size:.95rem}.students-new-enrollments__current small{display:block;margin-top:.12rem;color:var(--color-text-muted);font-size:.66rem}
.students-new-enrollments details{position:relative}.students-new-enrollments summary{cursor:pointer;color:var(--color-primary);font-size:.72rem;font-weight:800;white-space:nowrap}.students-new-enrollments__history{position:absolute;right:0;z-index:8;display:grid;gap:.45rem;min-width:15rem;margin-top:.45rem;padding:.75rem;border:.0625rem solid var(--color-border);border-radius:var(--radius-md);background:var(--color-surface);box-shadow:var(--shadow-lg)}
.students-new-enrollments__history>div{display:flex;align-items:center;justify-content:space-between;gap:var(--space-4);font-size:.72rem}.students-new-enrollments__history span{color:var(--color-text-muted)}
@media(max-width:47.99rem){.students-new-enrollments{align-items:flex-start}.students-new-enrollments__current>div{display:grid;gap:.08rem}.students-new-enrollments__history{position:fixed;left:var(--space-4);right:var(--space-4);bottom:var(--space-4);min-width:0;max-height:45vh;overflow:auto}.students-new-enrollments summary{padding:.25rem 0}}

/* P070 — Fiche élève : densité mobile, portée strictement au dialogue. */
@media (max-width:47.99rem){
  .student-profile-head{padding:.65rem 2.9rem .55rem .85rem}
  .student-profile-head h2{font-size:1.08rem;line-height:1.2;margin:.12rem 0 .3rem;overflow-wrap:anywhere}
  .student-profile-meta{gap:.3rem}
  .student-profile-chip{min-height:1.5rem;padding:.18rem .45rem;font-size:.65rem}
  .student-profile-body{padding:0 .85rem .6rem}
  .student-profile-section{padding:.65rem 0}
  .student-profile-section h3{margin-bottom:.48rem}
  .student-profile-contact{gap:.4rem;padding:.55rem}
  .student-profile-kpis{gap:.35rem}
  .student-profile-kpi{padding:.55rem .4rem}
  .student-profile-row{padding:.45rem .5rem}
  .student-profile-actions{gap:.4rem;padding:.45rem .85rem max(.45rem,env(safe-area-inset-bottom));max-height:min(32dvh,14rem);overflow-y:auto;overscroll-behavior:contain}
  .student-profile-actions .btn{min-height:2.75rem;padding:.5rem .55rem;line-height:1.15;white-space:normal}
}
@media (max-width:23.5rem){
  .student-profile-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .student-profile-actions .btn:only-child{grid-column:1/-1}
}
