:root{--navy:#172554;--navy-2:#1e3a8a;--blue:#2563eb;--surface:#fff;--bg:#f4f7fb;--text:#172033;--muted:#64748b;--line:#e2e8f0;--danger:#dc2626;--success:#15803d;--radius:18px;--shadow:0 8px 28px rgba(15,23,42,.08)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,"Segoe UI",sans-serif;padding-bottom:84px}.app-header{background:linear-gradient(135deg,var(--navy),#203b78);color:#fff;box-shadow:0 3px 16px rgba(15,23,42,.18)}.app-header-inner{min-height:64px;display:flex;align-items:center;gap:14px;padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}.app-brand{display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:750;white-space:nowrap}.brand-mark{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#fff;color:var(--navy);font-size:.85rem;font-weight:900}.icon-button{color:#fff;border:1px solid rgba(255,255,255,.28);font-size:1.3rem;line-height:1}.desktop-nav{align-items:center;gap:4px;margin-left:20px}.desktop-nav a{color:rgba(255,255,255,.75);text-decoration:none;padding:10px 12px;border-radius:10px;font-size:.92rem}.desktop-nav a:hover,.desktop-nav a.active{color:#fff;background:rgba(255,255,255,.12)}.user-chip{margin-left:auto;background:rgba(255,255,255,.12);padding:8px 12px;border-radius:999px;font-size:.86rem}.app-main{max-width:1280px;padding:22px 16px}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin-bottom:20px}.page-heading h1{font-size:clamp(1.65rem,4vw,2.35rem);font-weight:800;margin:0;letter-spacing:-.035em}.eyebrow{text-transform:uppercase;letter-spacing:.12em;color:var(--blue);font-size:.72rem;font-weight:800;margin:0 0 5px}.page-subtitle{color:var(--muted);margin:.4rem 0 0}.btn-touch{min-height:46px;border-radius:12px;font-weight:700;padding:.65rem 1rem}.content-card,.responsive-table-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px}.responsive-table-card{padding:6px 14px;overflow:hidden}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:18px;display:flex;align-items:center;gap:14px}.stat-icon{width:44px;height:44px;border-radius:14px;background:#eff6ff;color:var(--blue);display:grid;place-items:center;font-weight:900;font-size:1.2rem}.stat-value{font-size:1.8rem;font-weight:850;line-height:1}.stat-label{font-size:.82rem;color:var(--muted);margin-top:5px}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.section-title h2{font-size:1.15rem;font-weight:800;margin:0}.mobile-list{display:grid;gap:12px}.list-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:15px;color:inherit;text-decoration:none;box-shadow:0 3px 12px rgba(15,23,42,.04)}.list-card-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.list-card strong{display:block}.list-card small{display:block;color:var(--muted);margin-top:4px}.alert-card{border-left:4px solid #f59e0b}.status-dot{width:9px;height:9px;border-radius:50%;background:#f59e0b;margin-top:6px}.status-pill{display:inline-flex;align-items:center;background:#eef2ff;color:#3730a3;border-radius:999px;padding:5px 9px;font-size:.75rem;font-weight:750;text-transform:capitalize}.empty-state{text-align:center;color:var(--muted);padding:34px 16px}.empty-state span{display:grid;place-items:center;margin:auto;width:52px;height:52px;border-radius:50%;background:#ecfdf5;color:var(--success);font-size:1.5rem}.empty-state p{margin:10px 0 0}.two-column-layout{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(290px,.8fr);gap:18px;align-items:start}.mobile-form{display:grid;gap:13px}.mobile-form label,.form-grid label,.comment-field{display:grid;gap:6px}.mobile-form label>span,.form-grid label>span,.comment-field>span{font-size:.82rem;font-weight:700;color:#475569}.form-control,.form-select{min-height:46px;border-radius:11px;border-color:#cbd5e1}.form-control:focus,.form-select:focus{border-color:#60a5fa;box-shadow:0 0 0 .22rem rgba(37,99,235,.13)}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.form-grid .full{grid-column:1/-1}.search-sticky{position:sticky;top:72px;z-index:20;margin-bottom:14px}.search-box{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:0 14px;box-shadow:0 6px 20px rgba(15,23,42,.08)}.search-box input{width:100%;border:0;outline:0;min-height:48px;background:transparent;font-size:16px}.student-directory-card{display:flex;align-items:center;gap:12px}.avatar{flex:0 0 auto;width:44px;height:44px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,#dbeafe,#e0e7ff);color:var(--navy-2);font-weight:850}.avatar-large{width:64px;height:64px;border-radius:20px;font-size:1.15rem}.chevron{font-size:1.6rem;color:#94a3b8}.student-profile{display:flex;align-items:center;gap:15px;margin-bottom:20px}.student-profile h1{font-size:2rem;margin:0;font-weight:850}.course-heading{align-items:center}.course-count{background:#fff;border:1px solid var(--line);border-radius:15px;padding:10px 14px;text-align:center;min-width:130px}.course-count strong{font-size:1.5rem;display:block;line-height:1;color:var(--danger)}.course-count small{font-size:.72rem;color:var(--muted)}.student-cards{display:grid;gap:14px}.student-card{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:16px;transition:.2s}.student-card.has-anomaly{border-color:#fca5a5;box-shadow:0 8px 26px rgba(220,38,38,.11)}.student-card-header{display:flex;align-items:center;gap:11px;margin-bottom:14px}.student-card-header h2{font-size:1rem;margin:0;font-weight:800}.student-card-header small{color:var(--muted)}.btn-clear-student{margin-left:auto;border:0;background:transparent;color:var(--blue);font-weight:700;font-size:.8rem;padding:8px}.action-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.action-toggle{position:relative}.action-toggle input{position:absolute;opacity:0;pointer-events:none}.action-toggle span{display:flex;min-height:48px;align-items:center;justify-content:center;text-align:center;border:1px solid #cbd5e1;background:#f8fafc;border-radius:12px;padding:8px;font-size:.83rem;font-weight:700;cursor:pointer;transition:.15s}.action-toggle input:checked+span{background:#fee2e2;border-color:#ef4444;color:#991b1b;box-shadow:inset 0 0 0 1px #ef4444}.comment-field{margin-top:12px}.action-bar{position:fixed;z-index:1020;left:0;right:0;bottom:66px;background:rgba(255,255,255,.96);backdrop-filter:blur(14px);border-top:1px solid var(--line);padding:10px max(14px,env(safe-area-inset-right)) 10px max(14px,env(safe-area-inset-left));display:flex;justify-content:space-between;align-items:center;gap:10px}.action-bar strong{font-size:1.2rem}.pb-action-bar{padding-bottom:82px}.bottom-nav{position:fixed;z-index:1030;left:0;right:0;bottom:0;min-height:66px;padding-bottom:env(safe-area-inset-bottom);background:#fff;border-top:1px solid var(--line);box-shadow:0 -5px 20px rgba(15,23,42,.08);display:grid;grid-template-columns:repeat(5,1fr)}.bottom-nav a,.bottom-nav button{border:0;background:transparent;text-decoration:none;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:1.15rem}.bottom-nav small{font-size:.65rem;font-weight:700}.bottom-nav .active{color:var(--blue)}.bottom-nav .bottom-primary span{width:38px;height:38px;border-radius:14px;background:var(--blue);color:#fff;display:grid;place-items:center;margin-top:-15px;box-shadow:0 6px 14px rgba(37,99,235,.3)}.mobile-menu-links{display:grid;gap:6px}.mobile-menu-links a{color:var(--text);text-decoration:none;padding:13px 12px;border-radius:11px;font-weight:700}.mobile-menu-links a:hover{background:#eff6ff}.decision-card{padding:17px}.timeline{position:relative}.timeline-item{display:grid;grid-template-columns:18px 1fr;gap:10px;padding-bottom:18px}.timeline-marker{width:12px;height:12px;border-radius:50%;background:var(--blue);margin-top:6px;position:relative}.timeline-marker:after{content:"";position:absolute;top:12px;left:5px;width:2px;height:calc(100% + 18px);background:#dbeafe}.timeline-item:last-child .timeline-marker:after{display:none}.timeline-content{padding-bottom:2px}.auth-body{min-height:100vh;background:radial-gradient(circle at top,#dbeafe 0,#f8fafc 44%,#eef2ff 100%);display:grid;place-items:center;padding:20px}.auth-shell{width:min(100%,430px)}.auth-brand{display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:18px}.auth-brand strong,.auth-brand small{display:block}.auth-brand small{color:var(--muted)}.auth-shell .card{border:0;border-radius:22px;box-shadow:0 18px 50px rgba(15,23,42,.14)}.mobile-alert{border-radius:14px}.table{margin:0}.table th{white-space:nowrap}.table>:not(caption)>*>*{padding:.9rem .65rem}.row-action{text-align:right}
@media(max-width:991.98px){.stats-grid{grid-template-columns:repeat(2,1fr)}.two-column-layout{grid-template-columns:1fr}.app-main{padding-top:18px}.content-card{padding:15px}.form-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:767.98px){body{padding-bottom:76px}.app-header-inner{min-height:58px}.app-brand span:last-child{font-size:.92rem}.brand-mark{width:34px;height:34px}.app-main{padding:15px 12px}.page-heading{align-items:center;margin-bottom:15px}.page-heading h1{font-size:1.7rem}.page-heading .btn-touch{font-size:.85rem;min-height:42px;padding:.55rem .75rem}.stats-grid{gap:9px}.stat-card{padding:13px;gap:10px;border-radius:15px}.stat-icon{width:38px;height:38px}.stat-value{font-size:1.45rem}.stat-label{font-size:.73rem}.responsive-table-card{padding:5px 12px}.responsive-table-card table,.responsive-table-card thead,.responsive-table-card tbody,.responsive-table-card th,.responsive-table-card td,.responsive-table-card tr{display:block}.responsive-table-card thead{display:none}.responsive-table-card tr{padding:12px 0;border-bottom:1px solid var(--line)}.responsive-table-card tr:last-child{border-bottom:0}.responsive-table-card td{border:0;padding:5px 0;display:flex;justify-content:space-between;gap:16px;text-align:right}.responsive-table-card td:before{content:attr(data-label);color:var(--muted);font-size:.78rem;text-align:left}.responsive-table-card .row-action{display:block;padding-top:9px}.responsive-table-card .row-action a{width:100%;min-height:42px;display:grid;place-items:center}.form-grid{grid-template-columns:1fr}.course-heading{align-items:flex-start}.course-count{min-width:105px;padding:8px}.action-grid{grid-template-columns:repeat(2,1fr)}.search-sticky{top:66px}.student-profile h1{font-size:1.55rem}}
@media(max-width:390px){.page-heading{gap:8px}.page-heading h1{font-size:1.5rem}.stats-grid{grid-template-columns:1fr 1fr}.action-grid{grid-template-columns:1fr}.course-count{min-width:90px}.course-count small{display:none}.action-bar .btn{font-size:.8rem}}
.user-area{margin-left:auto;align-items:center;gap:10px}.user-chip{margin-left:0;display:flex;flex-direction:column;line-height:1.15}.user-chip small{font-size:.67rem;color:rgba(255,255,255,.72);margin-top:3px}.admin-nav-link{border:1px solid rgba(255,255,255,.18)}.menu-section-label{font-size:.7rem;font-weight:850;text-transform:uppercase;letter-spacing:.12em;color:#64748b;padding:0 12px 7px}.admin-menu-links{border-left:3px solid #2563eb;padding-left:8px}.admin-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.admin-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px;color:var(--text);text-decoration:none;box-shadow:var(--shadow)}.admin-card:hover{border-color:#93c5fd;transform:translateY(-1px)}.admin-card-icon{width:46px;height:46px;display:grid;place-items:center;border-radius:14px;background:#eff6ff;font-size:1.3rem}.admin-card div{flex:1}.admin-card strong,.admin-card small{display:block}.admin-card small{color:var(--muted);margin-top:4px}.auth-intro{text-align:center;margin-bottom:18px}.auth-intro h1{font-size:1.8rem;font-weight:850;margin:10px 0 6px}.auth-intro p{color:var(--muted);margin:0}.auth-lock{width:58px;height:58px;display:grid;place-items:center;margin:auto;border-radius:19px;background:#dbeafe;font-size:1.55rem}.auth-help{text-align:center;color:var(--muted);font-size:.78rem;margin-top:18px}
@media(max-width:767.98px){.admin-grid{grid-template-columns:1fr}.auth-intro h1{font-size:1.55rem}}
.class-launch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.class-launch-form{margin:0}.class-launch-button{width:100%;min-height:132px;border:1px solid #bfdbfe;border-radius:18px;background:linear-gradient(145deg,#eff6ff,#fff);padding:18px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;color:var(--text);box-shadow:0 6px 18px rgba(37,99,235,.08)}.class-launch-button:hover{border-color:#2563eb;transform:translateY(-1px)}.class-launch-name{font-size:1.25rem;font-weight:850}.class-launch-button small{color:var(--muted)}.class-launch-button strong{color:var(--blue)}.teacher-admin-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.teacher-admin-tile{display:flex;flex-direction:column;text-decoration:none;color:inherit}.teacher-admin-tile>span{font-size:1.5rem}.teacher-admin-tile small{color:var(--muted)}.class-checkbox-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.class-checkbox{position:relative}.class-checkbox input{position:absolute;opacity:0}.class-checkbox span{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:13px;padding:12px;background:#fff;cursor:pointer}.class-checkbox input:checked+span{border-color:#2563eb;background:#eff6ff;box-shadow:inset 0 0 0 1px #2563eb}.class-checkbox small{color:var(--muted)}
@media(max-width:767.98px){.class-launch-grid,.class-checkbox-grid{grid-template-columns:1fr 1fr}.teacher-admin-links{grid-template-columns:1fr 1fr}.class-launch-button{min-height:112px;padding:14px}}
@media(max-width:420px){.class-launch-grid,.class-checkbox-grid,.teacher-admin-links{grid-template-columns:1fr}}

.metric-card{display:flex;flex-direction:column;text-decoration:none;color:inherit}.metric-card small{margin-top:auto;color:#2563eb}.admin-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1rem;margin-top:1.5rem}.admin-action-grid a{background:#fff;border:1px solid #dbe3ef;border-radius:16px;padding:1.25rem;text-decoration:none;font-weight:700;color:#172554}.form-card{max-width:720px;padding:1.25rem;display:grid;gap:1rem}.form-card label{display:grid;gap:.4rem;font-weight:600}.form-card input,.form-card select{min-height:48px;border:1px solid #cbd5e1;border-radius:10px;padding:.7rem}

/* V2.1 — tableau de bord administrateur */
.admin-metric-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.admin-metric{position:relative;overflow:hidden;display:flex;align-items:center;gap:14px;min-height:142px;padding:20px;background:#fff;border:1px solid var(--line);border-radius:20px;box-shadow:var(--shadow);text-decoration:none;color:var(--text);transition:transform .18s,border-color .18s,box-shadow .18s}.admin-metric:after{content:"";position:absolute;width:92px;height:92px;border-radius:50%;right:-32px;bottom:-38px;background:currentColor;opacity:.07}.admin-metric:hover{transform:translateY(-3px);border-color:#93c5fd;box-shadow:0 14px 34px rgba(15,23,42,.12)}.metric-symbol{flex:0 0 auto;width:52px;height:52px;border-radius:17px;display:grid;place-items:center;font-size:1.55rem;background:#eff6ff;color:#1d4ed8}.admin-metric div{display:flex;flex-direction:column}.admin-metric small{font-weight:750;color:var(--muted)}.admin-metric strong{font-size:2.25rem;line-height:1.05;margin:.2rem 0}.admin-metric em{font-size:.75rem;font-style:normal;color:#2563eb}.metric-classes .metric-symbol{background:#ecfdf5;color:#047857}.metric-students .metric-symbol{background:#f5f3ff;color:#6d28d9}.metric-imports .metric-symbol{background:#fff7ed;color:#c2410c}.metric-years .metric-symbol{background:#fefce8;color:#a16207}.active-year-chip{display:flex;flex-direction:column;min-width:150px;padding:12px 16px;background:#172554;color:#fff;border-radius:15px;box-shadow:var(--shadow)}.active-year-chip small{opacity:.72}.active-year-chip strong{font-size:1.05rem}.admin-action-grid a{display:flex;align-items:center;gap:12px}.admin-action-grid a>span{width:42px;height:42px;border-radius:13px;background:#eff6ff;display:grid;place-items:center;font-size:1.25rem}.admin-action-grid a div{display:flex;flex-direction:column}.admin-action-grid a small{color:var(--muted);font-weight:500;margin-top:3px}.year-card{display:flex;align-items:center;justify-content:space-between;gap:18px}.year-card h2{font-size:1.2rem;margin:0}.year-card p{margin:.35rem 0;color:var(--muted)}.year-actions{display:flex;gap:8px;flex-wrap:wrap}.year-actions form{margin:0}.status-active{background:#dcfce7;color:#166534}.check-line{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:10px!important}.check-line input{min-height:auto!important}.student-row-actions{display:flex;align-items:center;gap:12px}.student-main-link{flex:1}.student-main-link span{display:block;color:var(--blue);font-size:.8rem;margin-top:4px}
@media(max-width:1199.98px){.admin-metric-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:767.98px){.admin-metric-grid{grid-template-columns:repeat(2,1fr)}.admin-metric{min-height:124px;padding:15px}.metric-symbol{width:44px;height:44px}.admin-metric strong{font-size:1.8rem}.active-year-chip{min-width:125px}.year-card{align-items:flex-start;flex-direction:column}.year-actions{width:100%}}
@media(max-width:420px){.admin-metric-grid{grid-template-columns:1fr}.admin-metric{min-height:105px}.active-year-chip{display:none}.student-row-actions{align-items:flex-start}}

/* Connexion — composition mobile compacte */
.auth-body{place-items:start center;padding:clamp(28px,8vh,72px) 20px 20px}
.auth-brand{margin-bottom:14px}
.auth-intro-login{margin-bottom:12px}
.auth-intro-login .auth-lock{width:54px;height:54px}
@media(max-width:480px){.auth-body{padding:24px 14px 18px}.auth-brand{margin-bottom:12px}.auth-intro-login{margin-bottom:10px}.auth-shell .card-body{padding:20px!important}}

/* Tableau de bord enseignant — cartes compactes mobile first */
.teacher-kanban-card{min-height:0;padding:15px}
.teacher-class-line{align-items:center;justify-content:flex-start;gap:8px;white-space:nowrap}
.teacher-class-line .teacher-kanban-kicker{margin:0;flex:0 0 auto}
.teacher-class-line h2{font-size:1.2rem;flex:0 0 auto}
.teacher-class-meta{min-width:0;overflow:hidden;text-overflow:ellipsis;color:var(--muted);font-size:.78rem}
.teacher-class-line .teacher-student-count{margin-left:auto;flex:0 0 auto;padding:6px 8px}
.teacher-kanban-metrics{gap:9px;margin:13px 0}
.teacher-class-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(116px,auto);gap:8px;align-items:stretch;margin:13px 0}
.teacher-class-actions .teacher-kanban-metric{min-width:0}
.teacher-class-actions .teacher-kanban-action{display:flex;min-width:0}
.teacher-class-actions .teacher-kanban-action .btn{width:100%;height:100%;padding:.55rem .65rem;white-space:nowrap}
.teacher-follow-label-short{display:none}
.teacher-kanban-metric{min-height:62px;padding:9px 11px;flex-direction:row;align-items:center;gap:8px}
.teacher-kanban-metric span{line-height:1.15}
.teacher-metric-value{flex:0 0 auto;min-width:42px;min-height:42px;display:grid;place-items:center;border-radius:12px;background:#fff;color:inherit;text-decoration:none;font-size:1.65rem;line-height:1;font-weight:900;box-shadow:0 2px 8px rgba(15,23,42,.08)}
.teacher-metric-value:hover,.teacher-metric-value:focus-visible{color:inherit;outline:2px solid currentColor;outline-offset:2px}
.teacher-kanban-metric--malus .teacher-metric-value{color:#c2410c}
.teacher-kanban-metric--warning .teacher-metric-value{color:#a16207}
.teacher-kanban-action{margin-top:0}
.teacher-weekly-summary{margin:13px 0 0}
.teacher-chart-disclosure{margin-top:10px}
.teacher-chart-disclosure summary{display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:42px;padding:8px 10px;border:1px solid var(--line);border-radius:11px;background:#fff;color:#334155;font-size:.78rem;font-weight:850;cursor:pointer;list-style:none}
.teacher-chart-disclosure summary::-webkit-details-marker{display:none}
.teacher-chart-disclosure summary i{width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .18s ease}
.teacher-chart-disclosure[open] summary i{transform:rotate(225deg)}
.teacher-chart-disclosure .teacher-malus-chart{margin-top:8px}
@media(max-width:650px){.teacher-kanban-card{padding:13px}.teacher-dashboard-heading{margin-bottom:14px}.teacher-kanban-grid{gap:12px}.teacher-class-line{gap:6px}.teacher-class-line h2{font-size:1.08rem}.teacher-class-meta{font-size:.72rem}.teacher-class-line .teacher-student-count{font-size:.68rem}.teacher-kanban-metrics{margin:11px 0}.teacher-kanban-metric{padding:8px 9px}.teacher-kanban-metric span{font-size:.72rem}.teacher-weekly-summary{padding:10px}}
@media(max-width:430px){.teacher-class-actions{grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;gap:6px;margin:11px 0}.teacher-class-actions .teacher-kanban-metric{min-height:58px;padding:7px;flex-direction:column;justify-content:center;text-align:center}.teacher-class-actions .teacher-kanban-metric span{font-size:.64rem}.teacher-class-actions .teacher-metric-value{min-width:36px;min-height:36px;font-size:1.35rem}.teacher-class-actions .teacher-kanban-action .btn{padding:.45rem .55rem}.teacher-follow-label{display:none}.teacher-follow-label-short{display:inline}}

/* Tableau de bord enseignant — cartes Kanban par classe */
.teacher-dashboard-heading{margin-bottom:22px}.teacher-kanban-grid{display:grid;grid-template-columns:repeat(3,minmax(280px,1fr));gap:18px;align-items:stretch}.teacher-kanban-card{position:relative;display:flex;flex-direction:column;min-height:290px;padding:20px;background:var(--surface);border:1px solid var(--line);border-top:5px solid var(--blue);border-radius:20px;box-shadow:var(--shadow);overflow:hidden}.teacher-kanban-card::after{content:"";position:absolute;right:-40px;top:-55px;width:150px;height:150px;border-radius:50%;background:rgba(37,99,235,.06);pointer-events:none}.teacher-kanban-card__header{position:relative;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.teacher-kanban-kicker{display:block;margin-bottom:5px;color:var(--blue);font-size:.7rem;font-weight:850;letter-spacing:.12em;text-transform:uppercase}.teacher-kanban-card h2{margin:0;font-size:1.55rem;font-weight:850;letter-spacing:-.025em}.teacher-kanban-card__header p{margin:5px 0 0;color:var(--muted);font-size:.88rem}.teacher-student-count{flex:0 0 auto;padding:7px 10px;background:#eff6ff;color:#1d4ed8;border-radius:999px;font-size:.74rem;font-weight:800}.teacher-kanban-metrics{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:24px 0 20px}.teacher-kanban-metric{min-height:98px;padding:14px;border-radius:15px;border:1px solid var(--line);display:flex;flex-direction:column;justify-content:space-between}.teacher-kanban-metric span{font-size:.78rem;font-weight:750;color:#475569}.teacher-kanban-metric strong{font-size:2rem;line-height:1;font-weight:900}.teacher-kanban-metric--malus{background:#fff7ed;border-color:#fed7aa}.teacher-kanban-metric--malus strong{color:#c2410c}.teacher-kanban-metric--warning{background:#fefce8;border-color:#fde68a}.teacher-kanban-metric--warning strong{color:#a16207}.teacher-kanban-action{margin-top:auto}.teacher-kanban-action .btn{display:flex;align-items:center;justify-content:center;gap:9px}.teacher-kanban-action .btn span{font-size:1.1rem}@media(max-width:1050px){.teacher-kanban-grid{grid-template-columns:repeat(2,minmax(260px,1fr))}}@media(max-width:650px){.teacher-kanban-grid{grid-template-columns:1fr}.teacher-kanban-card{min-height:270px;padding:17px}.teacher-kanban-metrics{margin-top:20px}.teacher-kanban-card h2{font-size:1.4rem}}
.teacher-metric-link{text-decoration:none;color:inherit;transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease}.teacher-metric-link:hover,.teacher-metric-link:focus-visible{transform:translateY(-2px);box-shadow:0 10px 22px rgba(15,23,42,.10);outline:none}.teacher-kanban-metric.teacher-metric-link small{margin-top:8px;font-size:.69rem;font-weight:800;color:#64748b}.teacher-kanban-metric--malus.teacher-metric-link:hover,.teacher-kanban-metric--malus.teacher-metric-link:focus-visible{border-color:#fb923c}.teacher-kanban-metric--warning.teacher-metric-link:hover,.teacher-kanban-metric--warning.teacher-metric-link:focus-visible{border-color:#eab308}.teacher-student-count.teacher-metric-link{display:inline-flex;align-items:center}.teacher-student-count.teacher-metric-link:hover,.teacher-student-count.teacher-metric-link:focus-visible{background:#dbeafe;color:#1e40af}

/* V2.1.11 — synthèse disciplinaire hebdomadaire dans les cartes de classe */
.teacher-weekly-summary{margin:-4px 0 18px;padding:13px;background:#f8fafc;border:1px solid var(--line);border-radius:15px}.teacher-weekly-summary__title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:9px}.teacher-weekly-summary__title span{font-size:.76rem;font-weight:850;color:#334155;text-transform:uppercase;letter-spacing:.07em}.teacher-weekly-summary__title small{font-size:.68rem;color:var(--muted)}.teacher-weekly-table{display:grid;grid-template-columns:54px repeat(5,minmax(32px,1fr));border:1px solid #dbe3ef;border-radius:11px;overflow:hidden;background:#fff}.teacher-weekly-table>*{min-height:33px;display:grid;place-items:center;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0}.teacher-weekly-table>*:nth-child(6n){border-right:0}.teacher-weekly-table>*:nth-last-child(-n+6){border-bottom:0}.teacher-weekly-table__corner{background:#f1f5f9}.teacher-weekly-table__day{background:#f1f5f9;color:#475569;font-size:.66rem;font-weight:850;text-transform:uppercase}.teacher-weekly-table__label{justify-items:start!important;padding-left:7px;font-size:.65rem;font-weight:850}.teacher-weekly-table__label--malus{color:#c2410c;background:#fff7ed}.teacher-weekly-table__label--warning{color:#a16207;background:#fefce8}.teacher-weekly-table__value{font-size:.82rem;font-weight:900}.teacher-weekly-table__value--malus{color:#c2410c}.teacher-weekly-table__value--warning{color:#a16207}@media(max-width:380px){.teacher-weekly-table{grid-template-columns:48px repeat(5,minmax(29px,1fr))}.teacher-weekly-summary{padding:10px}.teacher-weekly-table__label{font-size:.6rem;padding-left:5px}.teacher-weekly-table__value{font-size:.76rem}}

/* V2.1.12 — Synthèse disciplinaire par élève */
.discipline-note{padding:1rem 1.2rem;background:#f8fafc;border-bottom:1px solid #e5e7eb}.count-badge{display:inline-flex;min-width:2.4rem;height:2.4rem;align-items:center;justify-content:center;border-radius:999px;font-weight:800}.malus-count{background:#fff3cd;color:#7a5200}.warning-count{background:#ffe5b4;color:#7a3e00}.sanction-count{background:#f8d7da;color:#842029}.discipline-actions{display:flex;gap:.6rem;align-items:flex-start;flex-wrap:wrap}.discipline-actions form{margin:0}.sanction-form{display:grid;grid-template-columns:minmax(145px,1fr) minmax(145px,1fr) auto;gap:.4rem;min-width:430px}.settings-card{max-width:680px;padding:1.4rem}@media(max-width:760px){.discipline-summary-table thead{display:none}.discipline-summary-table,.discipline-summary-table tbody,.discipline-summary-table tr,.discipline-summary-table td{display:block;width:100%}.discipline-summary-table tr{padding:1rem;border-bottom:1px solid #e5e7eb}.discipline-summary-table td{border:0;padding:.3rem 0}.sanction-form{grid-template-columns:1fr;min-width:100%;width:100%}.discipline-actions{display:grid;width:100%}.discipline-actions form:first-child button{width:100%}}

/* V2.1.13 — fiche disciplinaire élève */
.count-link{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;transition:transform .15s ease,box-shadow .15s ease}
.count-link:hover{transform:translateY(-2px);box-shadow:0 5px 14px rgba(15,23,42,.16)}
.student-discipline-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin-bottom:1.25rem}
.student-kpi{display:flex;align-items:center;justify-content:space-between;padding:1rem 1.15rem;border:1px solid #dbe4ee;border-radius:14px;background:#fff;text-decoration:none;color:inherit;box-shadow:0 5px 18px rgba(15,23,42,.06)}
.student-kpi span{font-weight:600;color:#526071}.student-kpi strong{font-size:1.65rem;color:#172033}
.period-block{margin-bottom:1.5rem;border:1px solid #dbe4ee;border-radius:16px;background:#fff;overflow:hidden;box-shadow:0 6px 20px rgba(15,23,42,.06)}
.period-title{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem 1.25rem;background:#f5f8fc;border-bottom:1px solid #e3eaf2}
.period-title h2{margin:0;font-size:1.15rem}.period-title small{color:#667085}.period-title>span{font-size:.85rem;font-weight:700;background:#e7eef8;padding:.35rem .65rem;border-radius:999px}
.discipline-section{padding:1rem 1.25rem;scroll-margin-top:1rem}.discipline-section+.discipline-section{border-top:1px solid #edf1f5}
.discipline-section h3{display:flex;align-items:center;gap:.55rem;margin:0 0 .75rem;font-size:1rem}.discipline-section h3 span{font-size:.78rem;background:#edf2f7;border-radius:999px;padding:.22rem .5rem}
.empty-line{margin:0;color:#758195;font-style:italic}
@media(max-width:720px){.student-discipline-kpis{grid-template-columns:1fr}.period-title{align-items:flex-start;flex-direction:column}}


/* V2.1.14 — niveaux d'avertissement */
.warning-level-list{display:grid;gap:1rem;margin-bottom:1.5rem}.warning-level-row{display:grid;grid-template-columns:80px minmax(220px,1fr) 180px 90px;gap:1rem;align-items:end;padding:1rem;border:1px solid #e5e7eb;border-radius:16px;background:#fff}.level-number{font-weight:800;font-size:1.05rem;padding-bottom:.65rem}.warning-level-row label,.new-level-box label{display:block;font-size:.78rem;font-weight:700;color:#64748b;margin-bottom:.35rem}.color-field{display:flex;align-items:center;gap:.7rem}.color-field input[type=color]{width:52px;height:42px;border:0;padding:0;background:transparent}.color-field code{font-size:.78rem}.level-active{display:flex!important;gap:.5rem;align-items:center;padding-bottom:.65rem}.new-level-box{padding:1rem;border-radius:16px;background:#f8fafc;margin-bottom:1rem}.new-level-box h2{font-size:1rem}.discipline-process-note{display:grid;gap:.3rem;padding:1rem;border-left:5px solid #0d6efd;background:#eef5ff;border-radius:10px;margin-bottom:1rem}.warning-level-legend{display:flex;flex-wrap:wrap;gap:.65rem;margin:0 0 1rem}.warning-level-legend span,.warning-color-badge{display:inline-flex;align-items:center;gap:.45rem;padding:.35rem .6rem;border-radius:999px;background:#f8fafc;border:1px solid #e5e7eb;font-size:.78rem;font-weight:700}.warning-level-legend i,.warning-color-badge i{width:.8rem;height:.8rem;border-radius:50%;background:var(--level-color,var(--warning-color,#6c757d));box-shadow:0 0 0 2px #fff,0 0 0 3px var(--level-color,var(--warning-color,#6c757d))}.malus-history-row{background:color-mix(in srgb,var(--warning-color) 13%,white)}.malus-history-row td:first-child{border-left:5px solid var(--warning-color)}.discipline-actions .btn small{display:block;font-size:.65rem;font-weight:500}@media(max-width:800px){.warning-level-row{grid-template-columns:1fr 1fr}.level-number{grid-column:1/-1}.level-active{padding-bottom:.4rem}}

/* Tableau de bord enseignant : total hebdomadaire et résumé de période */
.teacher-weekly-table{grid-template-columns:54px repeat(5,minmax(32px,1fr)) minmax(42px,1fr)}
.teacher-weekly-table>*:nth-child(7n){border-right:0}
.teacher-weekly-table>*:nth-child(6n){border-right:1px solid #e2e8f0}
.teacher-weekly-table>*:nth-last-child(-n+7){border-bottom:0}
.teacher-weekly-table__day--total,.teacher-weekly-table__value--total{font-weight:950;background:#eef2ff}
.teacher-period-link{display:flex;justify-content:flex-end;margin-top:10px;font-size:.78rem;font-weight:850;text-decoration:none}
.period-summary-filters{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:16px;margin-bottom:20px}
.period-summary-filters label{font-size:.8rem;font-weight:800;color:#475569}
.period-summary-filters .form-select{margin-top:6px}
.period-summary-table th:not(:first-child),.period-summary-table td:not(:first-child){text-align:center}
@media(max-width:600px){.period-summary-filters{grid-template-columns:1fr}.teacher-weekly-table{grid-template-columns:48px repeat(5,minmax(28px,1fr)) minmax(38px,1fr)}}

/* Tableau de bord enseignant — trois actions uniformes */
.teacher-class-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.teacher-class-actions .teacher-kanban-metric,.teacher-class-actions .teacher-action-tile{min-height:76px;padding:9px 10px;border:1px solid var(--line);border-radius:15px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:6px;text-align:center}
.teacher-class-actions .teacher-kanban-metric span,.teacher-class-actions .teacher-action-tile span{font-size:.7rem;font-weight:750;line-height:1.15;color:#475569}
.teacher-class-actions .teacher-metric-value,.teacher-class-actions .teacher-action-tile strong{min-width:38px;min-height:38px;display:grid;place-items:center;border-radius:11px;background:#fff;font-size:1.45rem;font-weight:900;line-height:1;box-shadow:0 2px 8px rgba(15,23,42,.08)}
.teacher-class-actions .teacher-kanban-action{display:flex;margin:0}
.teacher-class-actions .teacher-action-tile{width:100%;color:#1d4ed8;background:#eff6ff;border-color:#bfdbfe;cursor:pointer;font-family:inherit}
.teacher-class-actions .teacher-action-tile strong{color:#1d4ed8}
.teacher-class-actions .teacher-action-tile:hover,.teacher-class-actions .teacher-action-tile:focus-visible{border-color:#60a5fa;outline:2px solid #2563eb;outline-offset:2px}
@media(max-width:430px){.teacher-class-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.teacher-class-actions .teacher-kanban-metric,.teacher-class-actions .teacher-action-tile{min-height:72px;padding:7px 5px}.teacher-class-actions .teacher-kanban-metric span,.teacher-class-actions .teacher-action-tile span{font-size:.62rem}.teacher-class-actions .teacher-metric-value,.teacher-class-actions .teacher-action-tile strong{min-width:34px;min-height:34px;font-size:1.3rem}}
.period-detail-block{margin-bottom:22px}.period-detail-heading{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;margin-bottom:18px}.period-detail-heading h2{margin:2px 0 4px}.period-detail-heading p{margin:0;color:#64748b}.period-stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:22px}.period-stat{padding:15px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;display:flex;flex-direction:column}.period-stat strong{font-size:1.55rem;line-height:1}.period-stat span{margin-top:6px;color:#64748b;font-size:.82rem;font-weight:700}.period-event-sections{display:grid;gap:22px}.period-event-section h3{display:flex;align-items:center;gap:8px;margin:0 0 10px}.period-event-section h3 span{display:inline-flex;min-width:26px;height:26px;padding:0 7px;align-items:center;justify-content:center;border-radius:999px;background:#e2e8f0;font-size:.75rem}.period-empty{margin:0;padding:13px;border-radius:10px;background:#f8fafc;color:#64748b}.period-detail-table td:first-child{white-space:nowrap}.warning-color-dot{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:7px;vertical-align:1px}@media(max-width:600px){.period-detail-heading{flex-direction:column}.period-stat-grid{grid-template-columns:1fr}.period-detail-table{min-width:650px}}

.student-name-link{color:inherit;text-decoration:none}.student-name-link:hover{text-decoration:underline}.count-link{text-decoration:none;transition:transform .15s ease,box-shadow .15s ease}.count-link:hover{transform:translateY(-1px);box-shadow:0 3px 10px rgba(15,23,42,.14)}

/* V2.1.22 — évolution mensuelle des malus actifs */
.teacher-malus-chart{margin-top:14px;padding:12px 12px 8px;border:1px solid #e2e8f0;border-radius:13px;background:#fff}
.teacher-malus-chart__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:5px}
.teacher-malus-chart__heading strong{display:block;font-size:.82rem;color:#334155}
.teacher-malus-chart__heading small{display:block;margin-top:2px;font-size:.68rem;color:#64748b}
.teacher-malus-chart__canvas{display:block;width:100%;height:150px}
.teacher-malus-chart__fallback{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 11px;margin-top:2px;font-size:.65rem;color:#64748b}
.teacher-malus-chart__fallback b{color:#334155}
@media(max-width:600px){.teacher-malus-chart__canvas{height:135px}.teacher-malus-chart{padding-left:8px;padding-right:8px}}
.teacher-malus-chart__svg{display:block;width:100%;height:auto;min-height:145px;overflow:visible}
.teacher-malus-chart__grid{stroke:#e2e8f0;stroke-width:1}
.teacher-malus-chart__axis-label,.teacher-malus-chart__week-label{fill:#64748b;font-size:10px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}
.teacher-malus-chart__line{fill:none;stroke:#f59e0b;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.teacher-malus-chart__point{fill:#fff;stroke:#f59e0b;stroke-width:3}
.teacher-malus-chart__value{fill:#334155;font-size:11px;font-weight:700;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}

/* V2.1.25 — résumé annuel en trois graphiques */
.annual-charts-stack{display:grid;gap:20px}.annual-chart-card{overflow:hidden}.annual-chart-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:8px}.annual-chart-heading h2{margin:1px 0 5px;font-size:1.2rem}.annual-chart-heading p{margin:0;color:#64748b;font-size:.84rem}.annual-chart-heading>strong{display:grid;place-items:center;min-width:54px;height:54px;padding:0 10px;border-radius:16px;background:#f1f5f9;font-size:1.45rem}.annual-line-chart{display:block;width:100%;height:auto;min-height:235px;overflow:visible}.annual-line-chart__grid{stroke:#e2e8f0;stroke-width:1}.annual-line-chart__axis,.annual-line-chart__month{fill:#64748b;font-size:11px;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}.annual-line-chart__line{fill:none;stroke:var(--chart-color);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}.annual-line-chart__point{fill:#fff;stroke:var(--chart-color);stroke-width:4}.annual-line-chart__value{fill:#334155;font-size:12px;font-weight:800;font-family:system-ui,-apple-system,"Segoe UI",sans-serif}.annual-chart-card--malus{--chart-color:#f59e0b}.annual-chart-card--warnings{--chart-color:#2563eb}.annual-chart-card--sanctions{--chart-color:#dc2626}@media(max-width:700px){.annual-chart-card{padding:14px 8px}.annual-chart-heading{padding:0 8px}.annual-line-chart{min-width:760px}.annual-chart-card{overflow-x:auto}.annual-chart-heading{position:sticky;left:0}.annual-chart-heading>strong{min-width:48px;height:48px}}

.teacher-weekly-table__link{color:inherit;text-decoration:none;cursor:pointer;transition:transform .15s ease,filter .15s ease,box-shadow .15s ease}.teacher-weekly-table__link:hover,.teacher-weekly-table__link:focus-visible{filter:brightness(.96);transform:translateY(-1px);box-shadow:inset 0 0 0 2px rgba(15,23,42,.16);outline:none}.warning-color-chip{display:inline-flex;align-items:center;gap:.45rem}.warning-color-chip i{width:.85rem;height:.85rem;border-radius:50%;background:var(--warning-color);border:1px solid rgba(15,23,42,.18)}

/* Filtre des motifs dans le détail des malus actifs */
.malus-motif-filter-card{margin-bottom:18px}.malus-motif-filter{display:grid;gap:16px}.malus-motif-filter__heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.malus-motif-filter__heading strong{display:block;font-size:1rem}.malus-motif-filter__heading small{display:block;color:var(--muted);margin-top:3px}.malus-motif-filter__shortcuts,.malus-motif-filter__actions{display:flex;flex-wrap:wrap;gap:8px}.malus-motif-filter__options{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:9px}.malus-motif-checkbox{position:relative}.malus-motif-checkbox input{position:absolute;opacity:0;pointer-events:none}.malus-motif-checkbox span{display:flex;align-items:center;min-height:44px;padding:9px 12px 9px 38px;border:1px solid #cbd5e1;border-radius:11px;background:#f8fafc;font-size:.86rem;font-weight:700;cursor:pointer;position:relative}.malus-motif-checkbox span:before{content:"";position:absolute;left:12px;width:17px;height:17px;border:2px solid #94a3b8;border-radius:4px;background:#fff}.malus-motif-checkbox input:checked+span{border-color:#2563eb;background:#eff6ff;color:#1e3a8a}.malus-motif-checkbox input:checked+span:before{content:"✓";display:grid;place-items:center;border-color:#2563eb;background:#2563eb;color:#fff;font-size:.72rem}.malus-motif-checkbox input:focus-visible+span{outline:3px solid rgba(37,99,235,.22);outline-offset:2px}@media(max-width:640px){.malus-motif-filter__heading{display:grid}.malus-motif-filter__options{grid-template-columns:1fr}}

/* Graphique annuel hebdomadaire du tableau de bord enseignant */
.teacher-annual-chart__scroll{overflow-x:auto;overflow-y:hidden;padding-bottom:.25rem}
.teacher-chart-legend{display:flex;gap:1rem;align-items:center;flex-wrap:wrap;font-size:.82rem;font-weight:700}
.teacher-chart-legend__item{display:inline-flex;align-items:center;gap:.4rem}
.teacher-chart-legend__item::before{content:"";width:1.5rem;height:.2rem;border-radius:999px;background:currentColor}
.teacher-chart-legend__item--malus{color:#2563eb}
.teacher-chart-legend__item--warning{color:#d97706}
.teacher-malus-chart__line--malus{stroke:#2563eb}
.teacher-malus-chart__line--warning{stroke:#d97706}
.teacher-malus-chart__point--malus{fill:#2563eb;stroke:#fff;stroke-width:1.5}
.teacher-malus-chart__point--warning{fill:#d97706;stroke:#fff;stroke-width:1.5}

/* Malus actifs — tableau compact et valeurs tactiles */
.teacher-counter-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.teacher-counter-table{min-width:690px;margin:0}
.teacher-counter-table th,.teacher-counter-table td{vertical-align:middle;text-align:center}
.teacher-counter-table th:first-child,.teacher-counter-table td:first-child{text-align:left;position:sticky;left:0;background:#fff;z-index:1}
.teacher-counter-table thead th:first-child{background:#f8fafc;z-index:2}
.teacher-counter-table .student-name-link{display:inline-flex;min-height:42px;align-items:center;color:var(--text);text-decoration:none}
.teacher-counter-table .student-name-link:hover,.teacher-counter-table .student-name-link:focus-visible{color:var(--blue);text-decoration:underline}
@media(max-width:760px){.teacher-counter-table.discipline-summary-table{display:table;width:100%}.teacher-counter-table.discipline-summary-table thead{display:table-header-group}.teacher-counter-table.discipline-summary-table tbody{display:table-row-group}.teacher-counter-table.discipline-summary-table tr{display:table-row;padding:0;border:0}.teacher-counter-table.discipline-summary-table th,.teacher-counter-table.discipline-summary-table td{display:table-cell;width:auto;padding:.65rem .55rem;border-bottom:1px solid #e5e7eb}.teacher-counter-table th{font-size:.7rem;line-height:1.15;white-space:normal}.teacher-counter-table td:first-child{min-width:150px}.teacher-counter-table .count-badge{min-width:2.2rem;height:2.2rem}}
/* Malus actifs — toutes les colonnes visibles sur mobile */
.counter-heading-short{display:none}
@media(max-width:760px){.teacher-counter-table-wrap{overflow-x:visible}.teacher-counter-table{width:100%;min-width:0;table-layout:fixed}.teacher-counter-table th:first-child,.teacher-counter-table td:first-child{position:static;width:36%;min-width:0}.teacher-counter-table th:not(:first-child),.teacher-counter-table td:not(:first-child){width:16%}.teacher-counter-table.discipline-summary-table th,.teacher-counter-table.discipline-summary-table td{padding:.55rem .2rem}.teacher-counter-table th{font-size:.6rem}.teacher-counter-table .student-name-link{min-height:36px;font-size:.76rem;line-height:1.15;overflow-wrap:anywhere}.teacher-counter-table .count-badge{min-width:1.9rem;width:1.9rem;height:1.9rem;padding:0;font-size:.78rem}.counter-heading-full{display:none}.counter-heading-short{display:inline}}
@media(max-width:370px){.teacher-counter-table th:first-child,.teacher-counter-table td:first-child{width:32%}.teacher-counter-table th:not(:first-child),.teacher-counter-table td:not(:first-child){width:17%}.teacher-counter-table.discipline-summary-table th,.teacher-counter-table.discipline-summary-table td{padding:.48rem .1rem}.teacher-counter-table .student-name-link{font-size:.7rem}.teacher-counter-table .count-badge{min-width:1.75rem;width:1.75rem;height:1.75rem;font-size:.72rem}}
/* Fiche disciplinaire élève — synthèse et historiques compacts */
.student-history-table{width:100%;table-layout:fixed;margin:0}
.student-history-table th,.student-history-table td{vertical-align:middle;overflow-wrap:anywhere}
.student-history-table--malus th:nth-child(1){width:25%}.student-history-table--malus th:nth-child(2){width:55%}.student-history-table--malus th:nth-child(3){width:20%}
.student-history-table--warnings th:nth-child(1){width:24%}.student-history-table--warnings th:nth-child(2){width:43%}.student-history-table--warnings th:nth-child(3){width:11%}.student-history-table--warnings th:nth-child(4){width:22%}
.student-history-table--warnings th:nth-child(3),.student-history-table--warnings td:nth-child(3){text-align:center}
.student-history-table--sanctions th:nth-child(1){width:23%}.student-history-table--sanctions th:nth-child(2){width:35%}.student-history-table--sanctions th:nth-child(3){width:28%}.student-history-table--sanctions th:nth-child(4){width:14%}
.student-history-table--sanctions th:nth-child(4),.student-history-table--sanctions td:nth-child(4){text-align:center}
@media(max-width:720px){.student-discipline-kpis{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:12px}.student-kpi{min-width:0;min-height:70px;padding:8px 5px;flex-direction:column;justify-content:center;gap:4px;text-align:center}.student-kpi span{font-size:.66rem;line-height:1.15}.student-kpi strong{font-size:1.35rem}.discipline-section{padding:.8rem .65rem}.student-history-table th,.student-history-table td{padding:.55rem .3rem;font-size:.72rem;line-height:1.2}.student-history-table th{font-size:.64rem}.student-history-table .btn{padding:.3rem .4rem;font-size:.65rem;white-space:normal}.student-history-table .warning-color-badge{padding:.28rem .35rem;font-size:.68rem;gap:.3rem}.student-history-table .warning-color-badge i{width:.6rem;height:.6rem}.student-history-table--malus th:nth-child(1){width:27%}.student-history-table--malus th:nth-child(2){width:51%}.student-history-table--malus th:nth-child(3){width:22%}.student-history-table--warnings th:nth-child(1){width:24%}.student-history-table--warnings th:nth-child(2){width:41%}.student-history-table--warnings th:nth-child(3){width:12%}.student-history-table--warnings th:nth-child(4){width:23%}.student-history-table--sanctions th:nth-child(1){width:23%}.student-history-table--sanctions th:nth-child(2){width:37%}.student-history-table--sanctions th:nth-child(3){width:25%}.student-history-table--sanctions th:nth-child(4){width:15%}}
/* Avertissements de la classe — compteurs visibles et actions conservées */
.warning-actions-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.warning-actions-table{min-width:860px;margin:0}
.warning-actions-table th,.warning-actions-table td{vertical-align:middle;text-align:center}
.warning-actions-table th:first-child,.warning-actions-table td:first-child{text-align:left}
.warning-actions-table .student-name-link{color:var(--text);text-decoration:none}
.warning-actions-table .student-name-link:hover,.warning-actions-table .student-name-link:focus-visible{color:var(--blue);text-decoration:underline}
.warning-actions-mobile{display:none}
@media(max-width:760px){.warning-actions-table-wrap{overflow-x:visible}.warning-actions-table.discipline-summary-table{display:table;width:100%;min-width:0;table-layout:fixed}.warning-actions-table.discipline-summary-table thead{display:table-header-group}.warning-actions-table.discipline-summary-table tbody{display:table-row-group}.warning-actions-table.discipline-summary-table tr{display:table-row;padding:0;border:0}.warning-actions-table.discipline-summary-table th,.warning-actions-table.discipline-summary-table td{display:table-cell;width:20%;padding:.55rem .2rem;border-bottom:1px solid #e5e7eb}.warning-actions-table.discipline-summary-table th:first-child,.warning-actions-table.discipline-summary-table td:first-child{width:40%}.warning-actions-table th{font-size:.6rem;line-height:1.1;white-space:normal}.warning-actions-table .student-name-link{font-size:.76rem;line-height:1.15;overflow-wrap:anywhere}.warning-actions-table .count-badge{min-width:1.95rem;width:1.95rem;height:1.95rem;padding:0;font-size:.78rem}.warning-actions-table .warning-actions-heading,.warning-actions-table .warning-actions-desktop{display:none}.warning-actions-table .warning-actions-mobile{display:table-row}.warning-actions-table .warning-actions-mobile td{width:100%;padding:.55rem;background:#f8fafc;text-align:left}.warning-actions-mobile .discipline-actions{display:grid;grid-template-columns:minmax(82px,.7fr) minmax(0,2fr);gap:.45rem;align-items:stretch}.warning-actions-mobile .discipline-actions>form:first-child button{height:100%;width:100%}.warning-actions-mobile .sanction-form{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;min-width:0;width:100%}.warning-actions-mobile .sanction-form .form-select,.warning-actions-mobile .sanction-form .btn{min-height:42px}}
@media(max-width:380px){.warning-actions-mobile .discipline-actions{grid-template-columns:1fr}.warning-actions-mobile .sanction-form{grid-template-columns:minmax(0,1fr) auto}.warning-actions-table.discipline-summary-table th:first-child,.warning-actions-table.discipline-summary-table td:first-child{width:37%}.warning-actions-table.discipline-summary-table th,.warning-actions-table.discipline-summary-table td{width:21%}}
/* Avertissements — deux actions simples et choix de sanction dédié */
.warning-actions-table .student-name-link{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;white-space:normal;line-height:1.2}
.warning-actions-table .discipline-actions{display:grid;grid-template-columns:repeat(2,minmax(88px,1fr));gap:.45rem;width:100%}
.warning-actions-table .discipline-actions>form,.warning-actions-table .discipline-actions>a,.warning-actions-table .discipline-actions>button{margin:0;width:100%}
.warning-actions-table .discipline-actions .btn{width:100%;min-height:42px;display:flex;align-items:center;justify-content:center}
.sanction-choice-form{max-width:720px;margin:0 auto;display:grid;gap:18px}
.sanction-choice-form fieldset{margin:0;padding:0;border:0}
.sanction-choice-form legend{margin-bottom:14px;font-size:1rem;font-weight:850}
.sanction-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.sanction-choice{position:relative;margin:0}
.sanction-choice input{position:absolute;opacity:0;pointer-events:none}
.sanction-choice span{min-height:58px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:13px;background:#f8fafc;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.86rem;font-weight:750;cursor:pointer;transition:.15s}
.sanction-choice input:checked+span{color:#991b1b;background:#fee2e2;border-color:#dc2626;box-shadow:inset 0 0 0 1px #dc2626}
.sanction-choice input:focus-visible+span{outline:3px solid rgba(37,99,235,.3);outline-offset:2px}
.sanction-save-button{width:100%}
@media(max-width:760px){.warning-actions-mobile .discipline-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.warning-actions-mobile .discipline-actions>a,.warning-actions-mobile .discipline-actions>button{height:100%}.sanction-page-heading{margin-bottom:14px}.sanction-choice-form{padding:14px}.sanction-choice-grid{gap:8px}.sanction-choice span{min-height:54px;padding:8px;font-size:.78rem}}
/* Avertissements — une seule ligne par élève et une seule paire d’actions */
.warning-actions-table{width:100%;min-width:0;table-layout:fixed}
.warning-actions-table th:first-child,.warning-actions-table td:first-child{width:30%}
.warning-actions-table th:nth-child(2),.warning-actions-table td:nth-child(2),.warning-actions-table th:nth-child(3),.warning-actions-table td:nth-child(3),.warning-actions-table th:nth-child(4),.warning-actions-table td:nth-child(4){width:12%}
.warning-actions-table th:nth-child(5),.warning-actions-table td:nth-child(5){width:34%}
.warning-actions-table .student-name-link{max-height:2.4em;overflow-wrap:anywhere;word-break:normal}
.warning-actions-table .discipline-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
.warning-actions-table .discipline-actions .btn{padding:.35rem .3rem;white-space:normal;font-size:.75rem}
@media(max-width:760px){.warning-actions-table.discipline-summary-table th:first-child,.warning-actions-table.discipline-summary-table td:first-child{width:30%}.warning-actions-table.discipline-summary-table th:nth-child(2),.warning-actions-table.discipline-summary-table td:nth-child(2),.warning-actions-table.discipline-summary-table th:nth-child(3),.warning-actions-table.discipline-summary-table td:nth-child(3),.warning-actions-table.discipline-summary-table th:nth-child(4),.warning-actions-table.discipline-summary-table td:nth-child(4){width:11%}.warning-actions-table.discipline-summary-table th:nth-child(5),.warning-actions-table.discipline-summary-table td:nth-child(5){width:37%}.warning-actions-table .warning-actions-heading,.warning-actions-table .warning-actions-cell{display:table-cell}.warning-actions-table .discipline-actions{grid-template-columns:1fr;gap:3px}.warning-actions-table .discipline-actions .btn{min-height:32px;font-size:.65rem;line-height:1.1}.warning-actions-table .student-name-link{font-size:.72rem}.warning-actions-table .count-badge{min-width:1.7rem;width:1.7rem;height:1.7rem}}
/* Avertissements — Avertir et Sanctionner côte à côte, même sur téléphone */
@media(max-width:760px){
 .warning-actions-table.discipline-summary-table th:first-child,.warning-actions-table.discipline-summary-table td:first-child{width:24%}
 .warning-actions-table.discipline-summary-table th:nth-child(2),.warning-actions-table.discipline-summary-table td:nth-child(2),.warning-actions-table.discipline-summary-table th:nth-child(3),.warning-actions-table.discipline-summary-table td:nth-child(3),.warning-actions-table.discipline-summary-table th:nth-child(4),.warning-actions-table.discipline-summary-table td:nth-child(4){width:10%}
 .warning-actions-table.discipline-summary-table th:nth-child(5),.warning-actions-table.discipline-summary-table td:nth-child(5){width:46%}
 .warning-actions-table .discipline-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:3px}
 .warning-actions-table .discipline-actions .btn{min-width:0;min-height:36px;padding:3px 1px;white-space:nowrap;font-size:.61rem;letter-spacing:-.02em}
 .warning-actions-table .student-name-link{font-size:.68rem}
 .warning-actions-table .count-badge{min-width:1.55rem;width:1.55rem;height:1.55rem;font-size:.72rem}
 .warning-actions-table.discipline-summary-table th,.warning-actions-table.discipline-summary-table td{padding:.48rem .08rem}
}
/* Fiche élève — matière puis date courte pour chaque malus */
.malus-subject-date strong,.malus-subject-date small{display:block}
.malus-subject-date strong{font-size:.82rem;overflow-wrap:anywhere}
.malus-subject-date small{margin-top:3px;color:var(--muted);font-size:.7rem;line-height:1.15}

/* Détail hebdomadaire — filtres de motifs repliables */
.malus-filter-disclosure{padding:0;overflow:hidden}
.malus-filter-disclosure>summary{min-height:58px;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;background:#fff}
.malus-filter-disclosure>summary::-webkit-details-marker{display:none}
.malus-filter-disclosure>summary strong,.malus-filter-disclosure>summary small{display:block}
.malus-filter-disclosure>summary small{margin-top:2px;color:var(--muted);font-size:.76rem}
.malus-filter-disclosure__status{display:flex;align-items:center;gap:10px;color:#475569;font-size:.72rem;font-weight:750;white-space:nowrap}
.malus-filter-disclosure__status i{width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);transition:transform .18s ease}
.malus-filter-disclosure[open] .malus-filter-disclosure__status i{transform:rotate(225deg)}
.malus-filter-disclosure[open]>summary{border-bottom:1px solid var(--line);background:#f8fafc}
.malus-filter-disclosure>.malus-motif-filter{padding:16px}
@media(max-width:520px){.malus-filter-disclosure>summary{padding:10px 12px}.malus-filter-disclosure>summary small{display:none}.malus-filter-disclosure__status{font-size:.66rem}.malus-filter-disclosure>.malus-motif-filter{padding:12px}}

/* Détail hebdomadaire — malus regroupés et lisibles par élève */
.weekly-malus-table{width:100%;table-layout:fixed;margin:0}
.weekly-malus-table th:first-child,.weekly-malus-table td:first-child{width:28%}
.weekly-malus-table th,.weekly-malus-table td{vertical-align:top}
.weekly-malus-student .student-name-link{display:block;color:var(--text);text-decoration:none;line-height:1.2}
.weekly-malus-student .student-name-link:hover,.weekly-malus-student .student-name-link:focus-visible{color:var(--blue);text-decoration:underline}
.weekly-malus-student>small{display:block;margin-top:5px;color:var(--muted);font-size:.7rem}
.weekly-student-malus-list{display:grid;gap:7px}
.weekly-student-malus-item{min-height:38px;padding:7px 9px;display:grid;grid-template-columns:minmax(118px,.42fr) minmax(0,1fr);align-items:center;gap:10px;border:1px solid #e2e8f0;border-radius:10px;background:#f8fafc}
.weekly-student-malus-item time{color:#475569;font-size:.72rem;font-weight:750;white-space:nowrap}
.weekly-student-malus-item strong{font-size:.8rem;line-height:1.2;overflow-wrap:anywhere}
.weekly-student-malus-item__detail{display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:0}
.weekly-student-malus-item__detail span{flex:0 0 auto;padding:3px 7px;border:1px solid currentColor;border-radius:999px;background:#fff;color:#475569;font-size:.66rem;font-weight:850;line-height:1.1}
@media(max-width:600px){.weekly-malus-table th:first-child,.weekly-malus-table td:first-child{width:34%}.weekly-malus-table th,.weekly-malus-table td{padding:.6rem .35rem}.weekly-malus-student .student-name-link{font-size:.76rem;overflow-wrap:anywhere}.weekly-student-malus-item{padding:6px 7px;grid-template-columns:1fr;gap:3px}.weekly-student-malus-item time{font-size:.66rem}.weekly-student-malus-item strong{font-size:.74rem}.weekly-student-malus-item__detail{align-items:flex-start}.weekly-student-malus-item__detail span{padding:2px 5px;font-size:.6rem}}

/* Détail hebdomadaire — alternance visuelle des élèves et de leurs malus */
.weekly-malus-table tbody tr:nth-child(odd){--student-row-bg:#f0f7ff;--student-item-bg:#e4f0ff;--student-accent:#3b82f6}
.weekly-malus-table tbody tr:nth-child(even){--student-row-bg:#fff8e8;--student-item-bg:#fff0c7;--student-accent:#f59e0b}
.weekly-malus-table tbody tr>td{background:var(--student-row-bg)}
.weekly-malus-table tbody tr>td:first-child{border-left:4px solid var(--student-accent)}
.weekly-malus-table tbody tr+tr>td{border-top:6px solid #fff}
.weekly-malus-table .weekly-student-malus-item{background:var(--student-item-bg);border-color:var(--student-accent)}
.weekly-malus-table .weekly-student-malus-item time{color:#334155}
@media(max-width:600px){.weekly-malus-table tbody tr>td:first-child{border-left-width:3px}.weekly-malus-table tbody tr+tr>td{border-top-width:5px}}
