/* Composition choisie : direction à gauche, dossiers lisibles et espaces métier séparés. */
.student-add-methods { padding:0 0 22px; margin-bottom:20px; border-bottom:1px solid var(--border-subtle); }
.student-add-methods p { font-size:15px; color:var(--text-muted); margin-bottom:13px; }
.student-add-methods>div { display:flex; flex-wrap:wrap; gap:10px; }
.student-add-methods [aria-pressed=true] { background:var(--accent); color:var(--accent-contrast); }
.student-add-methods [aria-pressed=false] { background:transparent; color:var(--text-main); border-color:var(--border-subtle); }
.student-bulk-panel h3 { font-size:21px; font-weight:500; }
.student-bulk-panel p { font-size:15px; line-height:1.7; margin:17px 0; color:var(--text-muted); }
.view-filters { display:flex; flex-wrap:wrap; align-items:end; gap:14px; margin-bottom:20px; }
.view-filters label { display:block; font-size:13px; color:var(--text-muted); flex:1 1 175px; min-width:0; }
.view-filters input,.view-filters select { display:block; width:100%; min-width:0; max-width:100%; margin-top:7px; padding:12px; border:1px solid var(--border-subtle); border-radius:8px; background:var(--bg-surface); color:var(--text-main); font-size:14px; }
.view-date-filters { flex-basis:100%; }
.view-date-filters summary { color:var(--accent); cursor:pointer; padding:12px 0; font-size:14px; }
.view-date-filters>div { display:flex; flex-wrap:wrap; gap:14px; padding-top:10px; }
.view-filter-summary { font-size:14px; color:var(--text-muted); margin-bottom:18px; }
@media(max-width:650px){.view-filters label{flex-basis:100%;}.view-filters input,.view-filters select{font-size:16px;}.student-bulk-panel .btn{white-space:normal;}.student-add-methods .btn{flex:1 1 100%;}}
.layout-sidebar { position:fixed; inset:0 auto 0 0; width:242px; padding:30px 18px 20px; background:var(--bg-surface); color:var(--text-main); border-right:1px solid var(--border-subtle); display:flex; flex-direction:column; z-index:60; overflow-y:auto; }
.layout-brand { display:flex; align-items:center; gap:12px; font-size:22px; font-weight:600; }
.layout-monogram { width:48px; height:48px; border:1px solid color-mix(in srgb,var(--accent) 38%,var(--border-subtle)); border-radius:14px; background:color-mix(in srgb,var(--accent) 9%,transparent); color:var(--accent); display:grid; place-items:center; font:500 30px/1 Fraunces,Georgia,serif; letter-spacing:-.01em; flex-shrink:0; }
.layout-monogram[data-len="2"] { font-size:21px; letter-spacing:-.03em; }
.layout-brand small { display:block; font-size:10px; letter-spacing:.15em; font-weight:400; color:var(--text-muted); margin-top:6px; }
.layout-school { margin:30px 9px; font-size:14px; line-height:1.6; }
.layout-school strong { display:block; font-weight:500; }
.layout-school>span { display:block; color:var(--text-muted); font-size:12px; margin-top:5px; }
.layout-navigation { display:grid; gap:7px; }
.layout-nav { width:100%; display:flex; align-items:center; gap:12px; padding:15px 12px; border:0; background:transparent; color:var(--text-muted); border-radius:9px; text-align:left; font:500 15px Inter,system-ui,sans-serif; cursor:pointer; }
.layout-nav>span { color:var(--accent); font-size:20px; min-width:20px; }
.layout-nav:hover { background:var(--bg-hover); color:var(--text-main); }
.layout-nav.active { background:var(--accent-dim); color:var(--accent); }
.layout-sidebar-bottom { margin-top:auto; padding-top:28px; }
.layout-product-label { display:block; font-size:12px; color:var(--text-muted); margin:0 12px 10px; }
#layoutDemoRegions { display:grid; gap:8px; margin:20px 6px 0; }
#layoutDemoRegions .btn { width:100%; white-space:normal; font-size:12px; padding:10px; }
.composition-enabled .app-header { margin-left:242px; padding:17px 28px; }
.composition-enabled .header-inner { max-width:none; }
.composition-enabled .brand-eyebrow { font-size:10px; }
.composition-enabled .brand-titles h1 { font-size:17px; }
.composition-enabled .brand-titles p { font-size:12px; }
.composition-enabled .header-controls { gap:12px; }
.composition-enabled .main-container { margin-left:242px; max-width:none; padding:32px 32px 70px; }
.composition-enabled .workspace-intro,.composition-enabled .nav-tabs { display:none; }
.composition-enabled .appearance-menu summary { font-size:14px; padding:10px 12px; }
.composition-enabled .site-presets button { font-size:14px; }
.composition-enabled .appearance-content { width:315px; }
.composition-enabled .appearance-caption { font-size:11px; }
.composition-enabled .theme-mode-btn { font-size:11px; }
.composition-enabled .control-group select,.composition-enabled .control-group input { font-size:14px; }
.composition-enabled .control-group label { font-size:12px; }
.composition-enabled .network-pill { display:none; }
.composition-enabled .btn { font-size:14px; min-height:43px; padding:10px 16px; }
.composition-enabled .btn-sm { min-height:36px; font-size:13px; }
.layout-page-heading { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:28px; }
.layout-eyebrow { display:block; font-size:11px; letter-spacing:.13em; color:var(--text-muted); margin-bottom:10px; }
.layout-page-heading h1 { font-size:32px; letter-spacing:-.035em; line-height:1.22; font-weight:600; }
.layout-page-heading p { font-size:16px; color:var(--text-muted); margin-top:10px; }
#layoutStatus { color:var(--accent); font-size:15px; }
#layoutStatus:empty { display:none; }
#layoutStatus:not(:empty) { margin-bottom:20px; }
.composition-enabled .demo-panel { padding:0; margin-bottom:25px; }
.composition-enabled .demo-panel summary { cursor:pointer; list-style-position:inside; padding:15px 18px; color:var(--text-main); font-size:14px; }
.composition-enabled .demo-panel summary>span { color:var(--text-muted); font-size:12px; margin-left:12px; }
.composition-enabled .demo-panel[open] { padding:0 18px 18px; }
.composition-enabled .demo-panel[open] summary { padding-left:0; }
.composition-enabled .demo-panel>strong { font-size:14px; }
.composition-enabled .demo-panel>p { font-size:13px; }
.composition-enabled .demo-panel .btn,.composition-enabled .demo-panel label,.composition-enabled .demo-panel select { font-size:13px; }
.composition-enabled .kpi-grid { gap:16px; }
.composition-enabled .kpi-card { padding:25px; }
.composition-enabled .kpi-label { font-size:14px; align-items:flex-start; gap:12px; }
.composition-enabled .kpi-value-kmf { font-size:32px; }
.composition-enabled .kpi-value-eur,.composition-enabled .kpi-sub { font-size:13px; }
.composition-enabled .kpi-label>span:last-child { font-size:11px; }
.layout-dashboard-grid { display:grid; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); gap:20px; }
.layout-panel { background:var(--bg-surface); color:var(--text-main); border:1px solid var(--border-subtle); border-radius:14px; padding:25px; }
.layout-section-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:20px; }
.layout-section-heading h2,.layout-panel h3 { font-size:20px; font-weight:600; letter-spacing:-.025em; }
.layout-badge { padding:6px 10px; background:var(--accent-dim); color:var(--accent); border-radius:7px; font-size:12px; white-space:nowrap; }
.layout-avatar { width:42px; height:46px; border-radius:9px; background:var(--bg-elevated); color:var(--text-muted); display:grid; place-items:center; font-size:14px; font-weight:500; flex-shrink:0; }
.layout-priority { display:flex; align-items:center; gap:14px; border-top:1px solid var(--table-border); padding:22px 0; }
.layout-priority-name { min-width:0; }
.layout-priority-name strong { display:block; font-size:16px; font-weight:500; }
.layout-priority-name>span { display:block; color:var(--text-muted); font-size:13px; margin-top:7px; }
.layout-priority-action { text-align:right; margin-left:auto; }
.layout-priority-action>strong { display:block; font-size:17px; font-weight:500; }
.layout-text-action { display:inline-block; border:0; background:transparent; color:var(--accent); padding:10px 0; margin-right:14px; font-size:14px; cursor:pointer; text-align:left; }
.layout-priority-action .layout-text-action { margin-right:0; font-size:12px; white-space:nowrap; }
.layout-full { width:100%; }
.layout-shortcut { display:flex; align-items:center; justify-content:space-between; gap:12px; width:100%; padding:24px 0; border:0; border-bottom:1px solid var(--table-border); background:transparent; color:var(--text-main); text-align:left; font-size:17px; cursor:pointer; }
.layout-shortcut>span:last-child { color:var(--accent); }
.layout-shortcut small { display:block; color:var(--text-muted); margin-top:8px; font-size:14px; }
.layout-empty { padding:25px 0; font-size:16px; line-height:1.7; color:var(--text-muted); }
/* Le dossier est la vue principale des élèves. La grille annuelle garde son propre écran. */
.layout-desk { display:grid; grid-template-columns:285px minmax(0,1fr); background:var(--bg-surface); border:1px solid var(--border-subtle); border-radius:15px; }
.layout-student-list { padding:23px 17px; border-right:1px solid var(--border-subtle); min-width:0; }
.layout-student-list .layout-section-heading { margin-bottom:23px; padding:0 4px; }
.layout-field { display:block; font-size:13px; color:var(--text-muted); margin-bottom:15px; }
.layout-field input,.layout-field select { display:block; width:100%; background:var(--bg-deep); color:var(--text-main); border:1px solid var(--border-subtle); border-radius:8px; padding:12px; font-size:14px; margin-top:8px; }
#layoutStudentList { display:grid; gap:7px; max-height:640px; overflow-y:auto; margin:18px 0; scrollbar-width:thin; }
.layout-pupil { display:flex; align-items:center; gap:12px; width:100%; border:1px solid transparent; border-radius:10px; padding:15px 10px; background:transparent; color:var(--text-main); text-align:left; cursor:pointer; }
.layout-pupil.selected { background:var(--accent-dim); border-color:var(--border-subtle); }
.layout-pupil:hover { background:var(--bg-hover); }
.layout-pupil strong { display:block; font-size:15px; font-weight:500; line-height:1.5; }
.layout-pupil small { display:block; margin-top:7px; font-size:12px; color:var(--text-muted); }
.layout-student-detail { padding:30px; min-width:0; }
.layout-record-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; }
.layout-record-heading h2 { font-size:32px; font-weight:600; letter-spacing:-.035em; line-height:1.2; }
.layout-record-heading p { font-size:14px; color:var(--text-muted); margin-top:10px; }
.layout-record-tabs { display:flex; flex-wrap:wrap; gap:25px; border-bottom:1px solid var(--border-subtle); margin:27px 0; }
.layout-record-tabs button { border:0; border-bottom:2px solid transparent; background:transparent; color:var(--text-muted); padding:0 0 16px; font-size:15px; cursor:pointer; }
.layout-record-tabs button.active { color:var(--accent); border-color:var(--accent); }
.layout-record-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:26px; }
.layout-record-metrics span { display:block; font-size:13px; color:var(--text-muted); }
.layout-record-metrics strong { display:block; font-size:25px; font-weight:500; letter-spacing:-.035em; margin-top:13px; }
.layout-state { display:inline-flex; background:var(--bg-elevated); color:var(--text-muted); border-radius:7px; padding:7px 10px; font-size:12px; white-space:nowrap; }
.layout-state.paid { color:var(--green-text); background:var(--green-bg); }
.layout-state.partial { color:var(--orange-text); background:var(--orange-bg); }
.layout-state.late { color:var(--red-text); background:var(--red-bg); }
.layout-payment-row { display:flex; align-items:center; gap:15px; padding:18px 0; border-top:1px solid var(--table-border); font-size:15px; }
.layout-payment-row>div:first-child { min-width:95px; margin-right:auto; }
.layout-payment-row strong { font-size:15px; font-weight:500; }
.layout-payment-row small { display:block; color:var(--text-muted); font-size:12px; margin-top:6px; }
.layout-payment-end { text-align:right; }
.layout-payment-check { color:var(--green-text); width:70px; text-align:center; }
.layout-record-bottom { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:20px; }
.layout-record-bottom .layout-panel { padding:22px; }
.layout-record-bottom h3 { font-size:18px; }
.layout-record-bottom p { font-size:14px; color:var(--text-muted); line-height:1.7; margin-top:12px; }
.layout-history { margin-top:20px; }
.layout-history h3 { margin-bottom:18px; }
.layout-history .layout-payment-row>strong { margin-left:auto; }
.layout-result-table { border-collapse:collapse; width:100%; font-size:15px; }
.layout-result-table th,.layout-result-table td { text-align:left; padding:15px 10px; border-bottom:1px solid var(--table-border); }
.layout-result-table th { font-size:13px; font-weight:500; color:var(--text-muted); background:var(--table-head-bg); }
.layout-result-mention { font-size:15px; padding:20px 0; }
.layout-inline-actions { display:flex; gap:12px; flex-wrap:wrap; margin-top:20px; }
.layout-family { display:grid; grid-template-columns:140px minmax(0,1fr); gap:20px; padding:25px 0; font-size:16px; }
.layout-family dt { color:var(--text-muted); }
.layout-family dd { overflow-wrap:anywhere; }
/* Même taille de lecture dans les modules existants : aucun zoom navigateur requis. */
.composition-enabled #tab-notes h2,.composition-enabled #tab-import h2 { font-family:Inter,system-ui,sans-serif; font-size:27px; font-weight:500; }
.composition-enabled #tab-notes h3,.composition-enabled #tab-import h3,.composition-enabled #tab-settings h3 { font-size:20px; }
.composition-enabled #tab-notes p,.composition-enabled #tab-import p { font-size:15px; max-width:none; }
.composition-enabled #tab-notes label,.composition-enabled #tab-import label { font-size:14px; }
.composition-enabled #tab-notes input:not([type=checkbox]),.composition-enabled #tab-notes select,.composition-enabled #tab-notes textarea,.composition-enabled #tab-import input,.composition-enabled #tab-import select { font-size:15px; padding:12px; }
.composition-enabled .grade-input { width:82px; }
.composition-enabled .mmbt-table th { font-size:12px; padding:17px 12px; }
.composition-enabled .mmbt-table td { font-size:14px; padding:20px 12px; }
.composition-enabled .student-name { font-size:15px; }
.composition-enabled .student-parent { font-size:12px; }
.composition-enabled .student-matricule { font-size:11px; }
.composition-enabled .month-pill { font-size:13px; padding:9px; }
.composition-enabled .pill-sub { font-size:11px; }
.composition-enabled .class-pill,.composition-enabled .status-legend { font-size:13px; }
.composition-enabled .search-input { font-size:14px; padding:13px; }
.composition-enabled .fee-amount { font-size:14px; }
.composition-enabled .fee-discount { font-size:12px; }
.composition-enabled .modal-header h2 { font-size:23px; }
.composition-enabled .form-field label { font-size:14px; }
.composition-enabled .form-field input,.composition-enabled .form-field select { font-size:16px; }
@media(min-width:1350px) { #layoutDashboardMetrics .kpi-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media(max-width:1349px) {
  .layout-sidebar { width:220px; padding:24px 14px; }
  .composition-enabled .app-header,.composition-enabled .main-container { margin-left:220px; }
  .composition-enabled .main-container { padding:27px 23px 60px; }
  .layout-desk { grid-template-columns:245px minmax(0,1fr); }
  .layout-student-detail { padding:24px; }
  .layout-record-heading { align-items:flex-start; flex-wrap:wrap; }
  .layout-record-metrics strong { font-size:22px; }
  .layout-payment-row { gap:10px; }
  .layout-record-bottom { grid-template-columns:1fr; }
  .layout-dashboard-grid { grid-template-columns:1fr; }
  .layout-page-heading { align-items:flex-start; }
}
@media(max-width:1000px) {
  .layout-sidebar { width:195px; padding:20px 10px; }
  .layout-nav { font-size:13px; padding:13px 10px; gap:9px; }
  .composition-enabled .app-header,.composition-enabled .main-container { margin-left:195px; }
  .composition-enabled .main-container { padding:24px 20px 50px; }
  .layout-page-heading { flex-direction:column; gap:18px; }
  .layout-page-heading h1 { font-size:29px; }
  .layout-desk { grid-template-columns:210px minmax(0,1fr); }
  .layout-student-list { padding:20px 12px; }
  .layout-pupil { flex-wrap:wrap; }
  .layout-record-metrics { grid-template-columns:1fr; gap:15px; }
  .layout-record-metrics>div { display:flex; justify-content:space-between; align-items:center; gap:12px; }
  .layout-record-metrics strong { margin:0; }
  .layout-record-tabs { gap:17px; }
  .layout-record-tabs button { font-size:13px; }
  .layout-payment-row { flex-wrap:wrap; }
  .layout-record-heading h2 { font-size:27px; }
  .layout-student-detail { padding:20px; }
  .layout-panel { padding:20px; }
  .layout-priority { flex-wrap:wrap; }
}
@media(max-width:720px) {
  .layout-sidebar { position:static; width:auto; padding:18px; border-right:0; border-bottom:1px solid var(--border-subtle); overflow:visible; }
  .layout-brand { font-size:20px; }
  .layout-school { display:none; }
  .layout-navigation { display:flex; overflow-x:auto; margin:18px -2px 0; padding-bottom:4px; gap:6px; scrollbar-width:thin; }
  .layout-nav { width:auto; flex-shrink:0; font-size:14px; padding:12px; }
  .layout-sidebar-bottom { padding-top:12px; margin-top:0; display:flex; gap:12px; flex-wrap:wrap; align-items:center; }
  .layout-product-label { display:none; }
  .layout-sidebar-bottom>.layout-nav { font-size:12px; padding:6px; }
  #layoutDemoRegions { display:flex; margin:0; gap:7px; }
  #layoutDemoRegions .btn { font-size:11px; min-height:35px; padding:7px; width:auto; }
  .composition-enabled .app-header { margin:0; padding:15px 18px; position:static; }
  .composition-enabled .app-header .brand-block { display:none; }
  .composition-enabled .header-controls { gap:9px; }
  .composition-enabled .main-container { margin:0; padding:25px 18px 50px; }
  .composition-enabled .control-group select { font-size:13px; }
  .composition-enabled .kpi-card { padding:20px 16px; }
  .composition-enabled .kpi-value-kmf { font-size:26px; }
  .composition-enabled .kpi-label { font-size:12px; flex-wrap:wrap; }
  .composition-enabled .kpi-label>span:last-child { font-size:10px; }
  .composition-enabled .kpi-sub,.composition-enabled .kpi-value-eur { font-size:12px; }
  .layout-desk { grid-template-columns:1fr; }
  .layout-student-list { border-right:0; border-bottom:1px solid var(--border-subtle); padding:20px; }
  #layoutStudentList { max-height:280px; }
  .layout-pupil { flex-wrap:nowrap; }
  .layout-student-detail { padding:22px 18px; }
  .layout-record-metrics { grid-template-columns:1fr; }
  .layout-priority-action { margin-left:56px; text-align:left; }
  .layout-priority-action strong { display:inline; margin-right:15px; }
  .layout-priority-name>span { font-size:12px; }
  .layout-payment-row { gap:12px; }
  .layout-payment-end { margin-left:auto; }
  .layout-payment-check { width:30px; }
  .layout-family { grid-template-columns:1fr; gap:10px; }
  .layout-family dd { margin-bottom:12px; }
  .composition-enabled .demo-panel summary>span { display:none; }
  .composition-enabled .demo-panel .phase2-controls { flex-direction:column; align-items:stretch; }
  .composition-enabled #tab-notes .kpi-card,.composition-enabled #tab-import .kpi-card { padding:20px; }
}
@media print {
  .layout-sidebar,.layout-page-heading,#layoutStatus { display:none !important; }
  .composition-enabled .app-header,.composition-enabled .main-container { margin:0; }
}

/* Fenêtre d'actions d'un élève : de grands boutons, au pouce. */
#studentsGridBody .student-name,#whatsappLateBody .student-name{cursor:pointer;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:4px;text-decoration-color:var(--accent)}
#studentsGridBody .student-name:hover,#whatsappLateBody .student-name:hover{color:var(--accent)}
dialog.student-actions{width:min(460px,calc(100% - 24px));max-height:90dvh;overflow:auto;padding:22px;border:1px solid var(--border-subtle);border-radius:24px;background:var(--bg-surface);color:var(--text-main);box-shadow:0 30px 90px #00000055}
dialog.student-actions::backdrop{background:#000a;backdrop-filter:blur(4px)}
.sa-head{display:flex;align-items:center;gap:14px;margin-bottom:12px}.sa-head>div:nth-child(2){flex:1;min-width:0}.sa-head h2{margin:0;font-size:20px;line-height:1.25;overflow-wrap:anywhere}
.sa-avatar{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;font-weight:700;background:var(--accent-dim);color:var(--accent);flex-shrink:0}
.sa-sub,.sa-parent{margin:2px 0 0;font-size:13px;color:var(--text-muted)}.sa-parent{margin:0 0 16px}
.sa-close{background:transparent;border:1px solid var(--border-subtle);color:var(--text-main);border-radius:12px;width:40px;height:40px;font-size:24px;cursor:pointer;flex-shrink:0}
.sa-status{margin:0 0 6px;padding:10px 14px;border-radius:12px;font-weight:600;font-size:14px}.sa-status.late{background:#ff6a4d24;color:#d9480f}.sa-status.ok{background:#3fbf7f24;color:#1a8a4f}
.sa-actions{display:grid;gap:10px}
.sa-action{display:flex;flex-direction:column;gap:2px;text-align:left;text-decoration:none;cursor:pointer;font:inherit;color:var(--text-main);background:var(--bg-elevated);border:1px solid var(--border-subtle);border-radius:16px;padding:14px 16px;min-height:56px}
.sa-action strong{font-size:16px}.sa-action span{font-size:13px;color:var(--text-muted)}
.sa-action.gold{background:var(--accent);color:var(--accent-contrast);border-color:var(--accent)}.sa-action.gold span{color:inherit;opacity:.8}
.sa-action.green{background:#1fa855;color:#fff;border-color:#1fa855}.sa-action.green span{color:#e6fff0}
.sa-action:hover{filter:brightness(1.08)}
