*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;background:#f5f7fb;color:#172033}.top{background:#152238;color:#fff;padding:14px 20px;display:flex;justify-content:space-between;align-items:center}.top small{display:block;color:#afbdd4;margin-top:3px}.top a{color:#fff}.shell{display:grid;grid-template-columns:245px 1fr;min-height:calc(100vh - 64px)}aside{background:#fff;border-right:1px solid #dfe5ef;padding:14px;display:flex;flex-direction:column;gap:4px}aside a{padding:9px 10px;border-radius:7px;color:#23324b;text-decoration:none}aside a:hover{background:#eaf0fa}main{padding:22px;overflow:auto}h1{font-size:25px;margin-top:0}.card{background:#fff;border:1px solid #dfe5ef;border-radius:10px;padding:16px;margin-bottom:16px;box-shadow:0 2px 8px #14213d0d}.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}.stat{font-size:28px;font-weight:700}.muted{color:#68748a}.btn,button{display:inline-block;padding:8px 12px;border-radius:7px;border:1px solid #3867d6;background:#3867d6;color:#fff;text-decoration:none;cursor:pointer}.btn.secondary{background:#fff;color:#23324b;border-color:#bdc8da}.btn.danger{background:#b83232;border-color:#b83232}.btn.success{background:#218c5b;border-color:#218c5b}input,select,textarea{width:100%;padding:8px;border:1px solid #c8d1df;border-radius:6px;background:#fff}label{display:block;font-weight:600;margin:8px 0 5px}.row{display:flex;gap:10px;align-items:end;flex-wrap:wrap}.row>*{flex:1;min-width:140px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;background:#fff}th,td{border:1px solid #dce3ee;padding:7px;vertical-align:top}th{background:#eef3f9;text-align:left}.badge{display:inline-block;padding:3px 7px;border-radius:10px;background:#e6edf7;font-size:12px}.b-classic{background:#dce9ff}.b-module{background:#dff7e8}.slot{min-width:140px;height:80px}.slot.busy{background:#eef5ff}.slot.conflict{background:#ffe5e5}.alert{padding:10px 12px;border-radius:7px;margin:10px 0}.alert.ok{background:#e5f7ec}.alert.err{background:#fde6e6}.notice{background:#fff8dd;border:1px solid #f1d57b;padding:10px;border-radius:7px}.print-only{display:none}@media(max-width:850px){.shell{grid-template-columns:1fr}aside{display:grid;grid-template-columns:repeat(2,1fr);border-right:0;border-bottom:1px solid #ddd}.top{gap:10px;align-items:flex-start}}@media print{aside,.top,.no-print{display:none!important}.shell{display:block}main{padding:0}.card{box-shadow:none;border:0}.print-only{display:block}body{background:white}}
.setup-steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px}.setup-step{display:flex;gap:14px;align-items:flex-start}.setup-number{width:42px;height:42px;flex:0 0 42px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;background:#e8eef8;color:#18345c}.setup-step.step-ready{border-left:5px solid #218c5b}.setup-step.step-pending{border-left:5px solid #d29b22}.setup-body h3{margin-top:0}.status-ready{background:#dff7e8;color:#12613f}.status-pending{background:#fff0c8;color:#7a5300}.field-help{font-size:12px;color:#68748a;margin-top:4px}.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.compact{max-width:280px}.selected-info{background:#eef6ff;border:1px solid #b8d8ff;padding:10px;border-radius:7px;margin-top:8px}.hidden{display:none!important}
.official-timetable th,.official-timetable td,.global-timetable th,.global-timetable td{vertical-align:middle;text-align:center}.official-timetable th:first-child,.global-timetable th:first-child{white-space:nowrap;background:#e9ecef}.global-timetable td{min-width:85px}.status-ready{background:#dff7e8;color:#12613f}.status-pending{background:#fff0c8;color:#7a5300}button:disabled{opacity:.5;cursor:not-allowed}

/* V1.4 — navigation fixe, onglet actif et interfaces enrichies */
:root{--hh-header-h:68px;--hh-sidebar-w:260px;--hh-primary:#315fd4;--hh-primary-dark:#1d3f94;--hh-ink:#172033;--hh-muted:#68748a}
body{min-height:100vh}
.app-fixed-header{position:fixed;top:0;left:0;right:0;height:var(--hh-header-h);z-index:1000;box-shadow:0 2px 12px rgba(10,27,52,.16)}
.app-brand{display:flex;align-items:center;gap:10px;min-width:0}.app-brand-logo{width:42px;height:42px;border-radius:9px;object-fit:contain;background:#fff;padding:3px}.app-brand strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-user{white-space:nowrap}
.shell{display:block;min-height:100vh;padding-top:var(--hh-header-h)}
.app-fixed-sidebar{position:fixed;top:var(--hh-header-h);bottom:0;left:0;width:var(--hh-sidebar-w);overflow-y:auto;z-index:900;background:#fff;border-right:1px solid #dfe5ef;padding:14px;display:flex;flex-direction:column;gap:4px}
.app-fixed-sidebar a{position:relative;padding:9px 10px;border-radius:7px;color:#23324b;text-decoration:none;transition:.15s ease}.app-fixed-sidebar a:hover{background:#eaf0fa}.app-fixed-sidebar a.active{background:#dfe9ff;color:#153b94;font-weight:700}.app-fixed-sidebar a.active:before{content:"";position:absolute;left:0;top:7px;bottom:7px;width:4px;border-radius:4px;background:var(--hh-primary)}
.app-main{margin-left:var(--hh-sidebar-w);padding:22px;min-height:calc(100vh - var(--hh-header-h));overflow:visible}
.joint-switch{background:#f2f6ff;border:1px solid #cbd9ff;border-radius:10px;padding:12px 14px;margin-bottom:14px}.joint-switch small{display:block;color:var(--hh-muted);margin-top:5px;line-height:1.45}
.period-panels{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:10px}.day-period-panel{border:1px solid #dce3ee;border-radius:9px;padding:10px;background:#fbfcff}.period-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:6px;margin-top:8px}.period-check{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;border:1px solid #d7e0ec;border-radius:7px;background:#fff;font-weight:600}.period-check small{display:block;font-weight:400;color:#728099}.period-check input{flex:0 0 auto}
.institution-logo-preview{max-height:88px;max-width:150px;object-fit:contain;border:1px solid #dfe5ef;border-radius:9px;background:#fff;padding:6px}
.tt-print-header{display:flex;align-items:center;justify-content:center;gap:14px;text-align:center;margin-bottom:12px}.tt-print-header img{width:70px;height:70px;object-fit:contain}.tt-print-header h2,.tt-print-header p{margin:2px 0}
.program-all-class{background:#f8faff}.program-class-divider td{background:#e8eef8!important;font-weight:700;color:#18345c}
.calendar-optional{background:#eaf6ff;border:1px solid #b9ddff;padding:10px 12px;border-radius:8px;color:#21496f}

/* Connexion V1.4 */
.login-page{min-height:100vh;margin:0;background:radial-gradient(circle at 15% 15%,#dde8ff 0,#f5f7fb 36%,#eef3fb 100%);display:flex;align-items:center;justify-content:center;padding:28px}.login-shell{width:min(1120px,100%);min-height:640px;background:#fff;border:1px solid #dce5f2;border-radius:24px;box-shadow:0 28px 70px rgba(22,41,74,.18);overflow:hidden;display:grid;grid-template-columns:minmax(0,1.35fr) minmax(360px,.65fr)}.login-visual{position:relative;padding:52px;background:linear-gradient(145deg,#142640 0%,#214c8b 56%,#3b73d4 100%);color:#fff;overflow:hidden}.login-visual:after{content:"";position:absolute;width:340px;height:340px;border-radius:50%;background:rgba(255,255,255,.08);right:-110px;bottom:-130px}.login-visual h1{font-size:38px;line-height:1.08;margin:0 0 12px}.login-visual p{max-width:600px;color:#d8e4fa;font-size:16px;line-height:1.6}.teacher-scene{position:relative;height:340px;margin-top:28px}.schedule-board{position:absolute;left:5%;right:8%;top:8%;height:250px;background:#fff;border-radius:18px;box-shadow:0 18px 48px rgba(0,0,0,.25);padding:18px;transform:perspective(700px) rotateY(-5deg)}.schedule-board-title{height:17px;width:48%;background:#214c8b;border-radius:9px;margin-bottom:13px}.schedule-grid{display:grid;grid-template-columns:70px repeat(5,1fr);gap:4px}.schedule-grid span{height:31px;border-radius:5px;background:#e8eef8}.schedule-grid span.head{background:#cfdcf4}.schedule-grid span.busy{background:#8fb1ec}.teacher-figure{position:absolute;right:1%;bottom:0;width:175px;height:265px}.teacher-head{position:absolute;left:57px;top:0;width:62px;height:62px;border-radius:50%;background:#8b5a3c;box-shadow:inset -8px -5px rgba(0,0,0,.08)}.teacher-body{position:absolute;left:35px;top:58px;width:110px;height:160px;border-radius:48px 48px 18px 18px;background:#192d4a}.teacher-arm{position:absolute;left:5px;top:88px;width:100px;height:26px;border-radius:15px;background:#8b5a3c;transform:rotate(-28deg);transform-origin:right center}.teacher-pointer{position:absolute;left:-20px;top:70px;width:150px;height:5px;border-radius:3px;background:#f7c24e;transform:rotate(-22deg);transform-origin:right center}.login-panel{padding:58px 48px;display:flex;flex-direction:column;justify-content:center}.login-panel h2{font-size:30px;margin:0 0 8px}.login-panel .muted{font-size:15px;margin-bottom:22px}.login-panel input{padding:12px 13px}.login-panel button{width:100%;padding:12px;font-weight:700;margin-top:8px}.login-mark{display:inline-flex;align-items:center;gap:10px;margin-bottom:26px;color:#244f96;font-weight:700}.login-mark-dot{width:34px;height:34px;border-radius:10px;background:linear-gradient(135deg,#315fd4,#6e9af2);box-shadow:0 7px 16px rgba(49,95,212,.28)}

@media(max-width:850px){.app-fixed-header{position:sticky;height:auto;min-height:var(--hh-header-h)}.shell{padding-top:0}.app-fixed-sidebar{position:relative;top:auto;bottom:auto;width:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;border-right:0;border-bottom:1px solid #ddd}.app-main{margin-left:0}.login-shell{grid-template-columns:1fr}.login-visual{display:none}.login-panel{padding:42px 28px}.top{gap:10px;align-items:flex-start}}
@media print{.app-fixed-sidebar,.app-fixed-header,.no-print{display:none!important}.shell{padding-top:0}.app-main{margin-left:0;padding:0}.tt-print-header{display:flex!important}}


/* V1.4A — défilement réellement indépendant du contenu */
@media(min-width:851px){body.app-page{height:100vh;overflow:hidden}.app-page .shell{height:100vh;overflow:hidden}.app-page .app-main{height:calc(100vh - var(--hh-header-h));overflow-y:auto;overflow-x:auto}.app-page .app-fixed-sidebar{overflow-y:auto}}
/* V1.4B — horaires officiels */
.official-timetable,.global-timetable,.teacher-placement-grid{font-family:"Times New Roman",Times,serif}
.official-timetable th,.global-timetable th{font-weight:700;font-style:italic}
.vertical-up{font-family:"Times New Roman",Times,serif;font-weight:700;font-style:italic;writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;margin:auto}
.class-title-vertical{height:96px;min-width:28px}.course-token-vertical{height:62px;min-width:24px}
.recess-row th{background:#fff1a8!important;font-family:"Times New Roman",Times,serif;font-weight:700;font-style:italic;text-align:center}
.schedule-compact-label{font-family:"Times New Roman",Times,serif;font-weight:700;font-style:italic}
@media print{.official-timetable,.global-timetable{font-family:"Times New Roman",Times,serif}.vertical-up{font-weight:700;font-style:italic}}

/* V1.4D — responsive téléphone/tablette : sidebar off-canvas */
.mobile-menu-toggle,.sidebar-close,.sidebar-backdrop{display:none}
@media(max-width:1100px){
  :root{--hh-header-h:62px}
  html,body{max-width:100%;overflow-x:hidden}
  body.app-page{height:auto;min-height:100vh;overflow-x:hidden}
  .app-fixed-header{position:fixed!important;top:0;left:0;right:0;height:var(--hh-header-h)!important;min-height:var(--hh-header-h)!important;padding:8px 10px!important;display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;gap:9px!important;align-items:center!important;z-index:1400}
  .mobile-menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;width:auto;min-width:46px;min-height:42px;padding:8px 10px;background:#315fd4;border-color:#315fd4;border-radius:9px;font-weight:700;line-height:1}
  .mobile-menu-toggle>span:first-child{font-size:22px;line-height:1}
  .app-brand{min-width:0;overflow:hidden}.app-brand-logo{width:38px;height:38px;flex:0 0 38px}.app-brand>div{min-width:0}.app-brand strong,.app-brand small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.app-brand strong{font-size:13px}.app-brand small{font-size:10px;margin-top:1px}
  .app-user{font-size:12px;white-space:nowrap;text-align:right}.app-user-name,.app-user-sep{display:none}.app-user a{display:inline-block;padding:7px 5px}
  .shell{display:block!important;height:auto!important;min-height:100vh!important;padding-top:var(--hh-header-h)!important;overflow:visible!important}
  .app-main{margin-left:0!important;width:100%!important;min-width:0!important;height:auto!important;min-height:calc(100vh - var(--hh-header-h))!important;padding:14px 12px 26px!important;overflow:visible!important}
  .app-fixed-sidebar{display:flex!important;position:fixed!important;top:0!important;left:0!important;bottom:0!important;width:min(86vw,330px)!important;max-width:330px!important;height:100dvh!important;padding:0 12px 22px!important;border-right:1px solid #dfe5ef!important;border-bottom:0!important;background:#fff!important;z-index:1600!important;overflow-y:auto!important;overscroll-behavior:contain;transform:translateX(-105%);transition:transform .22s ease;box-shadow:12px 0 30px rgba(16,31,56,.22);grid-template-columns:none!important;gap:4px!important}
  body.sidebar-open .app-fixed-sidebar{transform:translateX(0)}
  .sidebar-close{position:sticky;top:0;z-index:3;display:flex;align-items:center;justify-content:space-between;width:calc(100% + 24px);margin:0 -12px 8px;padding:13px 15px;border:0;border-bottom:1px solid #dfe5ef;border-radius:0;background:#152238;color:#fff;font-size:15px;font-weight:700}
  .sidebar-close strong{font-size:28px;line-height:1;font-weight:400}
  .app-fixed-sidebar a{display:block;width:100%;flex:0 0 auto;padding:11px 10px;font-size:14px}
  .sidebar-backdrop{position:fixed;inset:0;display:block!important;width:100%;height:100%;padding:0;border:0;border-radius:0;background:rgba(5,15,31,.55);opacity:0;pointer-events:none;z-index:1500;transition:opacity .2s ease}
  body.sidebar-open .sidebar-backdrop{opacity:1;pointer-events:auto}
  body.sidebar-open{overflow:hidden!important;touch-action:none}
  .card{padding:13px}.grid{grid-template-columns:1fr}.row>*{min-width:min(100%,180px)}
  .table-wrap{max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  table{min-width:max-content}.official-timetable,.global-timetable{font-size:12px}
  h1{font-size:21px;line-height:1.2}
}
@media(max-width:520px){
  .mobile-menu-text{display:none}.mobile-menu-toggle{min-width:42px;padding:8px}
  .app-brand strong{font-size:12px}.app-brand small{display:none}
  .app-main{padding:12px 9px 24px!important}.card{border-radius:8px;padding:11px}
  .btn,button{max-width:100%}
}
@media print{.mobile-menu-toggle,.sidebar-close,.sidebar-backdrop{display:none!important}}

/* V1.6B — couche responsive globale téléphone, tablette et petits portables */
html{min-width:0;max-width:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body,.shell,.app-main{min-width:0;max-width:100%}
img,svg,video,canvas,iframe{max-width:100%;height:auto}
pre{max-width:100%;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere}
.card,.notice,.alert,.grid>*,.row>*,form,fieldset{min-width:0;max-width:100%}
.card,.notice,.alert,h1,h2,h3,h4,p,td,th,label{overflow-wrap:anywhere;word-break:normal}
.table-wrap{position:relative;width:100%;max-width:100%;overflow-x:auto!important;overflow-y:visible;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain}
.table-wrap>table{width:max-content;min-width:100%;max-width:none}

@media screen and (max-width:1100px){
  body.app-page{width:100%;max-width:100%;overflow-x:hidden!important}
  .app-fixed-header{padding-left:max(9px,env(safe-area-inset-left))!important;padding-right:max(9px,env(safe-area-inset-right))!important}
  .app-main{box-sizing:border-box;max-width:100vw!important;padding-left:max(12px,env(safe-area-inset-left))!important;padding-right:max(12px,env(safe-area-inset-right))!important}
  .app-main>*{max-width:100%}
  .app-fixed-sidebar{width:min(88vw,340px)!important;max-width:calc(100vw - 38px)!important;padding-bottom:max(22px,env(safe-area-inset-bottom))!important}
  .grid,.setup-steps,.period-panels{grid-template-columns:repeat(auto-fit,minmax(min(250px,100%),1fr))!important}
  .row{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(min(220px,100%),1fr));align-items:end!important;width:100%}
  .row>*,.row>[style*="min-width"]{width:100%!important;min-width:0!important;max-width:100%!important}
  input:not([type="checkbox"]):not([type="radio"]),select,textarea{display:block;width:100%!important;min-width:0!important;max-width:100%!important;font-size:16px}
  input[type="file"]{white-space:normal;overflow:hidden}
  button,.btn{min-height:42px;white-space:normal;text-align:center;overflow-wrap:anywhere}
  .inline-actions{width:100%;align-items:stretch}
  .inline-actions>*{min-width:0;max-width:100%}
  .card{width:100%;margin-left:0;margin-right:0}
  .table-wrap{border-radius:7px;box-shadow:inset -12px 0 10px -15px rgba(18,36,64,.5)}
  .table-wrap>table{display:table!important;width:max-content!important;min-width:100%!important;max-width:none!important;margin:0}
  .auto-table-wrap{margin-top:8px;margin-bottom:8px}
  table:not(.official-timetable):not(.global-timetable) th,table:not(.official-timetable):not(.global-timetable) td{min-width:110px}
  table th:first-child,table td:first-child{position:sticky;left:0;z-index:1;background:#fff}
  table th:first-child{z-index:2;background:#eef3f9}
  .slot{min-width:130px}
  .teacher-placement-grid,.official-timetable,.global-timetable{font-size:11px}
  .vertical-up{white-space:nowrap}
  .tt-print-header,.timetable-identity{max-width:100%;flex-wrap:wrap}
  .legend,.legend-bottom{max-width:100%;overflow-wrap:anywhere}
}

@media screen and (max-width:700px){
  :root{--hh-header-h:60px}
  .app-fixed-header{grid-template-columns:auto minmax(0,1fr) auto!important}
  .app-main{padding-top:12px!important;padding-bottom:max(24px,env(safe-area-inset-bottom))!important}
  h1{font-size:20px}h2{font-size:18px}h3{font-size:16px}
  .grid,.setup-steps,.period-panels,.row{grid-template-columns:minmax(0,1fr)!important}
  .inline-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .inline-actions>.btn,.inline-actions>button,.inline-actions>form,.inline-actions>div{width:100%!important;margin:0!important}
  .inline-actions>form button{width:100%}
  form[style*="display:inline"]{display:inline-block!important;max-width:100%}
  .card{padding:11px;margin-bottom:12px}
  th,td{padding:7px 6px}
  .setup-step{min-width:0}.setup-number{width:36px;height:36px;flex-basis:36px;font-size:17px}
  .period-check-grid{grid-template-columns:minmax(0,1fr)!important}
}

@media screen and (max-width:430px){
  .mobile-menu-toggle{min-width:40px!important;padding:7px!important}
  .app-brand-logo{width:34px!important;height:34px!important;flex-basis:34px!important}
  .app-brand strong{font-size:11px!important}.app-user a{font-size:11px;padding:6px 2px!important}
  .app-main{padding-left:max(8px,env(safe-area-inset-left))!important;padding-right:max(8px,env(safe-area-inset-right))!important}
  .inline-actions{grid-template-columns:minmax(0,1fr)!important}
  .btn,button{width:100%;margin:2px 0}
  td .btn,td button,td form{width:auto;max-width:180px}
  .card{padding:9px;border-radius:7px}
}

@media screen and (max-height:520px) and (orientation:landscape){
  :root{--hh-header-h:54px}
  .app-fixed-header{height:54px!important;min-height:54px!important;padding-top:5px!important;padding-bottom:5px!important}
  .app-brand-logo{width:34px!important;height:34px!important;flex-basis:34px!important}
  .app-main{padding-top:9px!important}
  .app-fixed-sidebar{width:min(72vw,340px)!important}
}

@media print{
  .auto-table-wrap{overflow:visible!important;max-width:none!important}
  .table-wrap>table{width:100%;min-width:0;max-width:none}
  table th:first-child,table td:first-child{position:static}
}

/* V1.6D — saisie sécurisée du mot de passe supérieur de l'horaire */
.timetable-guard-modal{position:fixed;inset:0;z-index:2600;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(7,18,36,.7);overflow:auto}
.timetable-guard-panel{width:min(520px,100%);max-height:calc(100vh - 36px);overflow:auto;padding:22px;background:#fff;border:1px solid #ccd6e5;border-radius:14px;box-shadow:0 24px 70px rgba(0,0,0,.32)}
.timetable-guard-panel h2{margin:0 0 8px;font-size:21px;color:#172033}.timetable-guard-panel p{line-height:1.45}.timetable-guard-icon{font-size:34px;margin-bottom:7px}.timetable-guard-operation{padding:9px 11px;background:#f1f5fb;border-radius:7px}.timetable-guard-panel input{font-size:16px;min-height:44px}.timetable-guard-panel .inline-actions{margin-top:14px;justify-content:flex-end}.timetable-guard-panel button.secondary{background:#fff;color:#23324b;border-color:#bdc8da}
@media(max-width:520px){.timetable-guard-modal{padding:9px}.timetable-guard-panel{max-height:calc(100vh - 18px);padding:16px;border-radius:10px}.timetable-guard-panel .inline-actions{grid-template-columns:1fr!important}}
@media print{.timetable-guard-modal{display:none!important}}

/* V1.6E — espace enseignant */
.teacher-space .app-fixed-sidebar{background:linear-gradient(180deg,#102b4e,#153d6e)!important}
.teacher-space .app-fixed-sidebar a{color:#edf5ff!important;opacity:1;border:1px solid transparent}
.teacher-space .app-fixed-sidebar a:hover,.teacher-space .app-fixed-sidebar a:focus-visible{background:rgba(255,255,255,.13);color:#fff!important;border-color:rgba(255,255,255,.08)}
.teacher-space .app-fixed-sidebar a.active{background:#fff;color:#17375f!important;border-color:#fff;box-shadow:0 5px 14px rgba(4,18,38,.2)}
.teacher-space .app-fixed-sidebar a.active:before{background:#6f9dff}
.teacher-welcome{background:linear-gradient(135deg,#edf5ff,#fff);border-left:5px solid #315fd4}
.teacher-welcome h2{margin-top:0}.teacher-action-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px}
.teacher-profile-card{max-width:1120px;margin:0 auto}.teacher-profile-hero{display:flex;align-items:center;gap:16px;margin-bottom:16px;padding:20px 22px;border-radius:14px;background:linear-gradient(135deg,#173b68,#315fd4);color:#fff;box-shadow:0 12px 28px rgba(28,69,128,.2)}.teacher-profile-hero h2{margin:5px 0 3px;font-size:23px}.teacher-profile-hero p{margin:0;color:#dfeaff}.teacher-profile-hero .badge{background:rgba(255,255,255,.17);color:#fff;letter-spacing:.04em}.teacher-profile-avatar{display:flex;align-items:center;justify-content:center;width:62px;height:62px;flex:0 0 62px;border:2px solid rgba(255,255,255,.55);border-radius:18px;background:rgba(255,255,255,.14);font-size:22px;font-weight:800}.teacher-profile-layout{display:grid;grid-template-columns:minmax(0,2fr) minmax(260px,.78fr);gap:16px;align-items:start}.teacher-profile-form-card,.teacher-account-card{margin:0}.teacher-section-heading h2,.teacher-account-card h2{margin:0 0 5px;font-size:20px}.teacher-section-heading p{margin:0 0 15px;color:#68748a}.teacher-profile-info{margin:0 0 15px;padding:11px 13px;border-left:4px solid #315fd4;border-radius:7px;background:#eef5ff;color:#294769}.teacher-profile-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px}.teacher-profile-fields input:disabled{background:#edf1f6;color:#667085;cursor:not-allowed}.teacher-profile-fields input:focus{outline:3px solid rgba(49,95,212,.12);border-color:#315fd4}.teacher-profile-actions{display:flex;justify-content:flex-end;margin-top:18px}.teacher-profile-actions button{min-height:42px;font-weight:700}.teacher-current-signature{display:flex;align-items:center;justify-content:space-between;gap:18px;flex-wrap:wrap;margin:14px 0;padding:12px;background:#f5f8fc;border:1px solid #e2e8f1;border-radius:8px}.teacher-current-signature img{display:block;width:auto;max-width:220px;max-height:80px;margin-top:7px}.teacher-remove-signature{display:flex;align-items:center;gap:8px;font-weight:600}.teacher-remove-signature input{width:auto;flex:0 0 auto;margin:0}.teacher-account-card{position:sticky;top:0;padding:20px;background:linear-gradient(180deg,#fff,#f6f9fd)}.teacher-account-icon{display:flex;align-items:center;justify-content:center;width:38px;height:38px;margin-bottom:13px;border-radius:11px;background:#e5edff;color:#315fd4;font-size:16px}.teacher-account-card>.muted{line-height:1.48}.teacher-account-card>.muted:first-of-type{margin-bottom:5px;font-size:12px;text-transform:uppercase;letter-spacing:.04em}.teacher-username{margin:0 0 16px;padding:10px 12px;border:1px solid #d9e2ef;border-radius:8px;background:#fff;font-weight:800;overflow-wrap:anywhere}.teacher-account-card .btn{width:100%;text-align:center;font-weight:700}.auth-settings-card{max-width:620px}.auth-settings-card input{margin-bottom:12px}
@media(max-width:900px){.teacher-profile-layout{grid-template-columns:1fr}.teacher-account-card{position:static}.teacher-profile-fields{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.teacher-action-grid{grid-template-columns:1fr}.teacher-current-signature{align-items:flex-start}.teacher-space .app-user .badge{display:none}.teacher-profile-hero{padding:16px}.teacher-profile-avatar{width:52px;height:52px;flex-basis:52px;border-radius:14px;font-size:18px}.teacher-profile-hero h2{font-size:19px}.teacher-profile-fields{grid-template-columns:1fr}.teacher-profile-actions button{width:100%}}

/* V1.6F — guide et analyse adaptative de l’import d’un horaire global */
.import-guide-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}.import-guide-heading h3{margin:7px 0 5px}.import-guide-heading p{margin:0;line-height:1.5}.import-guide-heading .btn{flex:0 0 auto}.import-format-table{font-size:13px}.import-format-table th{white-space:nowrap;background:#e7efff;color:#173b68}.import-guide-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin-top:14px}.import-guide-grid section{padding:13px;border:1px solid #dbe4f1;border-radius:10px;background:#f8faff}.import-guide-grid h4{margin:0 0 7px;color:#244f96}.import-guide-grid p{margin:6px 0;font-size:13px;line-height:1.5}.import-format-guide>.teacher-profile-info{margin-top:14px;margin-bottom:0}
@media(max-width:900px){.import-guide-heading{display:block}.import-guide-heading .btn{margin-top:12px}.import-guide-grid{grid-template-columns:1fr}}

/* V1.7 — suivi pédagogique en temps réel */
.monitor-space .app-fixed-sidebar{background:linear-gradient(180deg,#102b4e,#153d6e)!important}.monitor-space .app-fixed-sidebar a{color:#edf5ff!important}.monitor-space .app-fixed-sidebar a:hover{background:rgba(255,255,255,.13)}.monitor-space .app-fixed-sidebar a.active{background:#fff;color:#17375f!important;font-weight:700}.live-intro h3{margin:0 0 6px}.live-intro p{margin:0;line-height:1.55}.live-zone{overflow:hidden;border:0;box-shadow:0 14px 38px rgba(20,45,84,.13)}.live-zone-top{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding:18px;margin:-16px -16px 14px;background:linear-gradient(135deg,#102b4e,#315fd4);color:#fff}.live-eyebrow{display:block;margin-bottom:7px;color:#bcd3ff;font-size:11px;font-weight:800;letter-spacing:.11em}.live-title{margin:0 0 6px;font-size:25px;line-height:1.2}.live-status{margin:0;color:#e0eaff}.live-clock-panel{min-width:175px;padding:11px 14px;border:1px solid rgba(255,255,255,.25);border-radius:12px;background:rgba(255,255,255,.1);text-align:center}.live-clock-panel span,.live-clock-panel small{display:block}.live-clock{display:block;margin:3px 0;font-size:31px;letter-spacing:.05em}.live-timezone{color:#cbdcff}.live-meta{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:13px}.live-role{background:#e7efff;color:#173b68;font-weight:700}.live-class-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:11px}.live-class-card{min-width:0;padding:14px;border:1px solid #dce5f1;border-radius:11px;background:#fff}.live-class-card.is-occupied{border-left:5px solid #218c5b;background:linear-gradient(135deg,#f0fff7,#fff)}.live-class-card.is-free{border-left:5px solid #a9b4c5;background:#fafbfd}.live-class-name{font-size:16px;font-weight:800;color:#17375f}.live-class-path{margin-top:3px;color:#68748a;font-size:12px}.live-class-card dl{display:grid;grid-template-columns:88px minmax(0,1fr);gap:7px 8px;margin:13px 0 0}.live-class-card dt{font-size:11px;font-weight:800;letter-spacing:.04em;color:#68748a}.live-class-card dd{min-width:0;margin:0;font-weight:700;overflow-wrap:anywhere}.live-teacher{font-size:13px}.live-empty[hidden]{display:none}.live-zone-compact .live-class-grid{max-height:420px;overflow:auto;padding-right:3px}.live-zone-compact .live-class-card.is-free{display:none}

/* V1.9 — périodes scolaires et simulation hybride isolée */
.hybrid-engine-head{display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#eef4ff,#fff)}.hybrid-engine-head h3{margin:8px 0 5px}.hybrid-engine-head p{margin:0;max-width:920px}.generation-status-grid{grid-template-columns:repeat(5,minmax(145px,1fr))}.small-stat{font-size:25px}.danger-stat,.danger-text{color:#b42318!important}.generation-audit-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.row-warning td{background:#fff8dc}.row-danger td,.module-out-of-period{background:#fff0f0!important;color:#7c1f1f}.simulation-banner{border:2px solid #2b6adf;background:linear-gradient(135deg,#edf4ff,#fff)}.simulation-banner>.grid{grid-template-columns:repeat(4,minmax(120px,1fr));margin:12px 0}.simulation-banner>.grid>div{padding:12px;border:1px solid #cddcf7;border-radius:10px;background:#fff}.simulation-banner>.grid strong{font-size:24px;color:#234f9e}.danger-zone{border:2px solid #e5a2a2}.danger-zone>.grid{grid-template-columns:repeat(2,minmax(0,1fr))}.danger-zone form{padding:15px;border:1px solid #ebc3c3;border-radius:12px;background:#fffafa}.confirm-line{display:flex;align-items:flex-start;gap:8px;margin:9px 0}.confirm-line input{width:auto;flex:0 0 auto;margin-top:3px}.compact-notice{margin:6px 0;padding:7px 9px;font-size:12px}.period-range-grid{display:grid;grid-template-columns:repeat(4,minmax(170px,1fr));gap:14px}.period-range-card{padding:15px;border:1px solid #dce4f0;border-radius:12px;background:#fafbfd}.period-range-card.is-current{border:2px solid #258355;background:#effcf4}.period-range-card h4{margin:9px 0}.period-range-card input{margin-bottom:8px}
@media(max-width:1100px){.generation-status-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.period-range-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.hybrid-engine-head{align-items:stretch;flex-direction:column}.generation-status-grid,.generation-audit-grid,.danger-zone>.grid,.simulation-banner>.grid,.period-range-grid{grid-template-columns:1fr}.danger-zone form{min-width:0}.generation-status-grid .card{min-width:0}}
@media print{.module-out-of-period{background:#fff!important;color:#000!important;border:3px double #000!important}.simulation-banner{border:0!important;background:#fff!important}}

/* V1.9.1 — actions transactionnelles et propositions modulaires */
.slot-move-line{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.slot-move-description{min-width:0;flex:1}.slot-move-actions{display:flex;flex:0 0 auto;gap:7px;flex-wrap:wrap;justify-content:flex-end}.slot-move-actions button{font-size:12px;white-space:normal}.slot-move-confirm{background:#176b43;border-color:#176b43}.slot-move-undo{color:#7a2630!important;border-color:#d3a1a7!important}
.timetable-last-change{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 14px;border:1px solid #cbd9ee;border-left:5px solid #315fd4;border-radius:10px;background:#f4f8ff}.timetable-last-change>div{min-width:0;flex:1}.timetable-last-change form{flex:0 0 auto;margin:0}.timetable-last-change button{white-space:normal}
.module-slot-proposals{display:grid;gap:5px;margin-top:8px;padding-top:7px;border-top:1px dashed #b8c7db}.module-slot-proposals>small{color:#284b7b}.module-slot-proposals form{margin:0}.module-proposal-button{width:100%;max-width:100%;padding:5px 7px!important;font-size:11px!important;line-height:1.25}.teacher-placement-grid td{vertical-align:top}
@media(max-width:760px){.slot-move-line,.timetable-last-change{display:grid;grid-template-columns:1fr}.slot-move-actions{display:grid;grid-template-columns:1fr;justify-content:stretch}.slot-move-actions button,.timetable-last-change form,.timetable-last-change button{width:100%}}
@media print{.timetable-last-change,.module-slot-proposals,.slot-move-actions{display:none!important}}
@media(max-width:700px){.live-zone-top{display:block;margin:-11px -11px 12px;padding:15px}.live-title{font-size:19px}.live-clock-panel{min-width:0;margin-top:13px}.live-clock{font-size:27px}.live-class-grid{grid-template-columns:1fr}.live-class-card dl{grid-template-columns:78px minmax(0,1fr)}}

.notification-hero{display:flex;align-items:flex-start;gap:16px;background:linear-gradient(135deg,#edf5ff,#fff);border-left:5px solid #315fd4}.notification-hero h2{margin:0 0 7px}.notification-hero p{margin:0;line-height:1.55}.notification-icon{display:flex;align-items:center;justify-content:center;width:52px;height:52px;flex:0 0 52px;border-radius:14px;background:#315fd4;color:#fff;font-size:24px}.notification-settings .inline-actions{margin:14px 0}.notification-schedule{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:9px}.notification-session{display:flex;flex-direction:column;gap:5px;padding:11px;border:1px solid #dbe4f1;border-radius:9px;background:#f8faff}.notification-session span{font-weight:700;color:#17375f}.notification-session small{color:#68748a}.compact-actions{margin-top:7px}.compact-actions button{font-size:12px;padding:6px 8px}
@media(max-width:620px){.notification-hero{display:block}.notification-icon{margin-bottom:11px}.notification-schedule{grid-template-columns:1fr}}
.hhb-reminder-toast{position:fixed;right:18px;bottom:18px;z-index:2800;display:flex;flex-direction:column;gap:7px;width:min(390px,calc(100vw - 24px));padding:17px 45px 17px 18px;border:1px solid #92b4f3;border-left:6px solid #315fd4;border-radius:12px;background:#fff;box-shadow:0 18px 55px rgba(11,31,65,.28)}.hhb-reminder-toast strong{font-size:17px;color:#17375f}.hhb-reminder-toast span{line-height:1.45}.hhb-reminder-close{position:absolute;top:7px;right:8px;width:32px;min-height:32px;padding:0;border:0;background:transparent;color:#31506f;font-size:26px}.hhb-reminder-close:hover{background:#edf3ff}
@media(max-width:520px){.hhb-reminder-toast{right:12px;bottom:12px}}

/* V1.8 — recherche en direct, diaporama et conseil préventif de placement */
button.secondary{background:#fff;color:#23324b;border-color:#bdc8da}
.live-controls{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:12px;align-items:end;margin:0 0 13px;padding:12px;border:1px solid #dbe5f2;border-radius:11px;background:#f7faff}.live-teacher-search label{margin-top:0;color:#17375f}.live-teacher-search>div{display:grid;grid-template-columns:minmax(180px,1fr) auto auto;gap:7px}.live-display-controls{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.live-display-controls button.is-active{background:#173b68;color:#fff;border-color:#173b68}.live-slide-status{margin:4px 0 11px;text-align:right;font-size:12px}.live-search-results{margin:0 0 14px;padding:12px;border-left:5px solid #315fd4;border-radius:9px;background:#edf5ff}.live-search-results[hidden]{display:none}.live-search-results h3{margin:0 0 9px;color:#17375f}.live-teacher-result-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:9px}.live-teacher-result{padding:12px;border:1px solid #d5e0ef;border-radius:9px;background:#fff}.live-teacher-result.is-teaching{border-left:5px solid #218c5b}.live-teacher-result.is-free{border-left:5px solid #a9b4c5}.live-teacher-result-name{display:block;margin-bottom:8px;color:#17375f}.live-teacher-session{display:grid;gap:3px;margin-top:7px;padding:8px;border-radius:7px;background:#f2fff7;font-weight:700}.live-teacher-result p{margin:5px 0}.live-class-grid.live-grid-hidden{display:none}.live-class-grid.live-grid-slideshow{display:block;min-height:250px;overflow:visible}.live-grid-slideshow .live-class-card{display:none}.live-grid-slideshow .live-class-card.is-slide-active{display:block;min-height:245px;padding:28px;border-left-width:9px;box-shadow:0 14px 35px rgba(20,45,84,.14)}.live-grid-slideshow .live-class-name{font-size:28px}.live-grid-slideshow .live-class-path{font-size:15px}.live-grid-slideshow .live-class-card dl{grid-template-columns:150px minmax(0,1fr);gap:15px;margin-top:28px}.live-grid-slideshow .live-class-card dt{font-size:15px}.live-grid-slideshow .live-class-card dd{font-size:24px}.live-grid-slideshow .live-teacher{font-size:21px}
.slot-advice{margin:13px 0 4px;padding:12px;border:1px solid #d8e2ef;border-radius:10px;background:#f8faff}.slot-advice:empty{display:none}.slot-advice-summary{display:grid;gap:4px;padding:10px 12px;border-radius:8px}.slot-advice-summary.is-ok{border-left:5px solid #218c5b;background:#e9f9f0}.slot-advice-summary.is-conflict{border-left:5px solid #c43d3d;background:#fff0f0}.slot-advice-summary span{font-size:13px;color:#53627a}.slot-advice-errors,.slot-advice-warnings{margin:9px 0;padding-left:22px;line-height:1.45}.slot-advice-errors{color:#8d2525}.slot-advice-warnings{color:#795800}.slot-advice h4{margin:13px 0 8px}.slot-advice-choices{display:flex;gap:7px;flex-wrap:wrap}.slot-advice-choice{font-size:12px}.slot-advice-moves{margin:0;padding-left:22px}.slot-advice-moves li{margin:7px 0;padding:9px;border-radius:7px;background:#eef5ff}.slot-advice-moves small{display:block;margin-top:4px;color:#68748a}.slot-day-scan{padding:9px;border-left:4px solid #315fd4;background:#eef5ff}.period-check.advisor-ok{border-color:#6dc895;background:#ecfbf3}.period-check.advisor-ok:after{content:"✓";color:#147147;font-weight:900}.period-check.advisor-conflict{border-color:#e09a9a;background:#fff0f0}.period-check.advisor-conflict:after{content:"!";color:#a82c2c;font-weight:900}.period-check.advisor-preferred{box-shadow:inset 0 0 0 2px #e1ad2f}.joint-placement-form{display:grid;gap:7px;min-width:250px}.slot-advice-compact{font-size:12px;max-width:520px}.slot-advice-compact .slot-advice-choices{display:grid;grid-template-columns:1fr}.slot-advice-compact .slot-advice-choice{width:100%}
@media(max-width:900px){.live-controls{grid-template-columns:1fr}.live-display-controls{justify-content:flex-start}.live-teacher-result-grid{grid-template-columns:1fr}}
@media(max-width:620px){.live-teacher-search>div{grid-template-columns:1fr}.live-teacher-search button{width:100%}.live-display-controls{display:grid;grid-template-columns:1fr}.live-display-controls button{width:100%}.live-grid-slideshow .live-class-card{min-height:220px;padding:18px}.live-grid-slideshow .live-class-name{font-size:21px}.live-grid-slideshow .live-class-card dl{grid-template-columns:90px minmax(0,1fr);gap:10px;margin-top:18px}.live-grid-slideshow .live-class-card dd,.live-grid-slideshow .live-teacher{font-size:17px}.slot-advice-choices{display:grid;grid-template-columns:1fr}.slot-advice-choice{width:100%}}
@media print{.live-controls,.live-search-results,.live-slide-status,.slot-advice{display:none!important}}
.guard-disabled-card{border-left:5px solid #c43d3d;background:#fff7f7}.guard-disabled-card h3{color:#8d2525}

/* V1.9.2 — édition complète et synchronisée des lignes modulaires */
button.danger{background:#b83232;border-color:#b83232;color:#fff}.mod-template-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#edf4ff,#fff)}.mod-template-edit-head>div:first-child{min-width:0;flex:1}.mod-template-edit-head h2{margin:8px 0 5px;color:#17375f}.mod-template-edit-head p{margin:0;line-height:1.5}.mod-template-sync-badges{display:flex;gap:6px;flex-wrap:wrap;margin-top:11px}.mod-row-editor-list{display:grid;gap:14px}.mod-row-editor{margin:0}.mod-row-editor.is-inactive{border-left:6px solid #9aa6b7;background:#fafbfd}.mod-row-editor-new{margin-top:16px;border:2px dashed #7a9dd8;background:#f7faff}.mod-row-editor-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.mod-row-editor-title>div{display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:wrap}.mod-row-editor-title strong{color:#17375f;font-size:17px}.mod-row-editor-title small{color:#68748a;overflow-wrap:anywhere}.mod-row-number{display:inline-flex;align-items:center;justify-content:center;width:31px;height:31px;flex:0 0 31px;border-radius:9px;background:#315fd4;color:#fff;font-weight:800}.mod-row-editor-grid{display:grid;grid-template-columns:repeat(7,minmax(90px,1fr));gap:10px;align-items:end}.mod-row-editor-grid>div{min-width:0}.mod-row-editor-grid .mod-row-label{grid-column:span 2}.mod-row-editor-grid label{min-height:30px}.mod-row-editor-flags{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:13px}.mod-row-editor-flags fieldset{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0;padding:11px 12px;border:1px solid #d7e1ef;border-radius:9px;background:#f8faff}.mod-row-editor-flags legend{padding:0 5px;color:#294769;font-size:12px;font-weight:800}.mod-row-editor-flags label{display:flex;align-items:center;gap:5px;margin:0;font-size:13px}.mod-row-editor-flags input{width:auto;flex:0 0 auto;margin:0}.mod-row-editor-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;margin-top:14px;padding-top:13px;border-top:1px solid #e0e7f0}.mod-linked-classes{display:flex;align-items:center;justify-content:space-between;gap:15px}.mod-linked-classes p{margin:6px 0 0;overflow-wrap:anywhere}
@media(max-width:1180px){.mod-row-editor-grid{grid-template-columns:repeat(4,minmax(100px,1fr))}.mod-row-editor-grid .mod-row-label{grid-column:span 2}}
@media(max-width:760px){.mod-template-edit-head,.mod-linked-classes{display:grid;grid-template-columns:1fr}.mod-template-edit-head .inline-actions,.mod-row-editor-actions{display:grid;grid-template-columns:1fr}.mod-template-edit-head .inline-actions>*,.mod-row-editor-actions>*{width:100%}.mod-row-editor-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mod-row-editor-grid .mod-row-label{grid-column:span 2}.mod-row-editor-flags{grid-template-columns:1fr}.mod-row-editor-title{align-items:flex-start}.mod-linked-classes form,.mod-linked-classes button{width:100%}}
@media(max-width:480px){.mod-row-editor-grid{grid-template-columns:1fr}.mod-row-editor-grid .mod-row-label{grid-column:auto}.mod-row-editor-flags fieldset{display:grid;grid-template-columns:1fr}.mod-row-editor{padding:12px}.mod-row-editor-title>div{align-items:flex-start;flex-direction:column}.mod-row-number{margin-bottom:2px}}
@media print{.mod-template-edit-head{display:block;background:#fff}.mod-row-editor{break-inside:avoid}.mod-row-editor-new{display:none}.mod-row-editor-grid{grid-template-columns:repeat(4,1fr)}.mod-row-editor-flags{grid-template-columns:repeat(2,1fr)}}

/* V1.9.4 — contrôle des volumes et brouillon suivi en direct */
.hour-overrun{background:#fff0f0!important}.hour-overrun td{border-color:#e7b2b2!important}.live-version{font-weight:800;color:#284b7b}.live-version:not(:empty){padding:4px 8px;border-radius:999px;background:#eef4ff}.notification-settings input[type=number]{max-width:180px}.module-proposal-button{overflow-wrap:anywhere}.slot-volume-status{display:grid;gap:3px;margin-top:7px;padding:8px;border-radius:7px;background:#fff}.slot-volume-status span{font-size:12px;font-weight:700;color:#38506f}
@media(max-width:720px){#editeur-ligne .row{display:grid;grid-template-columns:1fr}#editeur-ligne .row>div{min-width:0!important}.notification-settings .row{display:grid;grid-template-columns:1fr}.notification-settings input[type=number]{max-width:none}}

/* V1.9.7 — autorisation lisible des consultations responsables */
.check-line{display:flex;align-items:flex-start;gap:8px;margin:8px 0 5px;line-height:1.35}.check-line input[type="checkbox"]{width:auto;flex:0 0 auto;margin:2px 0 0}.monitor-space select:disabled{color:#34445d;background:#f2f5f9;opacity:1}

/* V1.9.5 — rappels personnalisés et récapitulatifs plein écran */
.hhb-reminder-fullscreen{position:fixed;inset:0;z-index:5000;display:flex;align-items:center;justify-content:center;width:100vw;height:100vh;height:100dvh;padding:max(18px,env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) max(18px,env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));overflow:auto;background:linear-gradient(145deg,rgba(7,22,45,.97),rgba(27,69,135,.97));color:#172033}
.hhb-reminder-fullscreen-panel{width:min(980px,100%);max-height:100%;overflow:auto;padding:clamp(20px,4vw,46px);border:2px solid rgba(255,255,255,.72);border-radius:22px;background:#fff;box-shadow:0 28px 90px rgba(0,0,0,.48)}
.hhb-reminder-fullscreen-eyebrow{display:inline-block;margin-bottom:12px;padding:6px 11px;border-radius:999px;background:#e8f0ff;color:#214f9d;font-size:12px;font-weight:900;letter-spacing:.1em}
.hhb-reminder-fullscreen h2{margin:0 0 14px;color:#17375f;font-size:clamp(25px,4vw,43px);line-height:1.12}.hhb-reminder-fullscreen-message{margin:0 0 22px;font-size:clamp(16px,2vw,21px);line-height:1.58}
.hhb-reminder-session-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:11px;margin:18px 0 24px}.hhb-reminder-session-row{display:grid;gap:5px;padding:14px;border:1px solid #d8e3f2;border-left:6px solid #315fd4;border-radius:11px;background:#f7faff}.hhb-reminder-session-row strong{color:#17375f;font-size:17px}.hhb-reminder-session-row span{font-weight:800}.hhb-reminder-session-row small{color:#596a83;line-height:1.35}
.hhb-reminder-fullscreen-actions{display:flex;justify-content:flex-end;gap:10px;flex-wrap:wrap}.hhb-reminder-fullscreen-actions button,.hhb-reminder-fullscreen-actions .btn{min-height:46px;padding:11px 18px;font-weight:800}
body:has(.hhb-reminder-fullscreen){overflow:hidden}
@media(max-width:620px){.hhb-reminder-fullscreen{align-items:stretch;padding:0}.hhb-reminder-fullscreen-panel{width:100%;max-height:none;min-height:100%;border:0;border-radius:0;padding:22px 15px calc(22px + env(safe-area-inset-bottom))}.hhb-reminder-session-list{grid-template-columns:1fr}.hhb-reminder-fullscreen-actions{display:grid;grid-template-columns:1fr}.hhb-reminder-fullscreen-actions>*{width:100%}}
@media print{.hhb-reminder-fullscreen{display:none!important}}

/* V1.9.6 — source administrateur des rappels et marquage provisoire */
.btn.warning,button.warning{background:#b86900;border-color:#b86900;color:#fff}.reminder-admin-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;border-left:6px solid #23845c;background:linear-gradient(135deg,#effbf5,#fff)}.reminder-admin-hero.reminder-draft-enabled{border-left-color:#d07a00;background:linear-gradient(135deg,#fff4dc,#fff)}.reminder-admin-hero h2{margin:10px 0 7px}.reminder-admin-hero p{margin:0;max-width:900px;line-height:1.55}.reminder-source-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.reminder-mode-toggle{display:flex;align-items:flex-start;gap:12px;margin:16px 0;padding:15px;border:1px solid #d7e1ef;border-radius:10px;background:#f8faff}.reminder-mode-toggle input{width:auto;flex:0 0 auto;margin-top:3px}.reminder-mode-toggle span{display:grid;gap:5px}.reminder-mode-toggle small{color:#68748a;font-weight:400;line-height:1.45}.reminder-provisional-notice{border-left:6px solid #d07a00;font-weight:800}.reminder-provisional-label{width:max-content;background:#ffe5b5;color:#713d00;font-weight:900}.notification-session.is-provisional{border-left:6px solid #d07a00;background:#fffaf0}.hhb-reminder-fullscreen.is-provisional{background:linear-gradient(145deg,rgba(62,31,2,.98),rgba(170,91,0,.97))}.hhb-reminder-fullscreen.is-provisional .hhb-reminder-fullscreen-panel{border-color:#ffcf78}.hhb-reminder-fullscreen.is-provisional .hhb-reminder-fullscreen-eyebrow{background:#ffe5b5;color:#713d00}
@media(max-width:900px){.reminder-admin-hero{display:grid;grid-template-columns:1fr}.reminder-source-grid{grid-template-columns:1fr}}

/* V1.9.8A — registre d'appel, rapports et discipline : interface complète */
.attendance-quick-nav{display:flex;gap:8px;flex-wrap:wrap;margin:-4px 0 16px}.attendance-quick-nav .btn{font-size:13px}.attendance-dashboard-card{border-left:6px solid #258355;background:linear-gradient(135deg,#effbf5,#fff)}
.attendance-page{width:100%;max-width:1500px;margin:0 auto}.attendance-page .card{border-color:#d9e3f1;box-shadow:0 7px 24px rgba(25,52,91,.07)}
.attendance-hero{display:flex;align-items:center;gap:17px;padding:20px 22px;border:0!important;border-left:6px solid #315fd4!important;background:linear-gradient(135deg,#eef5ff 0%,#fff 72%)}.attendance-register-hero{border-left-color:#258355!important;background:linear-gradient(135deg,#ebfbf3 0%,#fff 72%)}.discipline-hero{border-left-color:#ba3b44!important;background:linear-gradient(135deg,#fff0f1 0%,#fff 72%)}
.attendance-hero-icon{display:flex;align-items:center;justify-content:center;width:54px;height:54px;flex:0 0 54px;border-radius:16px;background:#315fd4;color:#fff;font-size:25px;font-weight:900;box-shadow:0 9px 22px rgba(49,95,212,.25)}.attendance-register-hero .attendance-hero-icon{background:#258355;box-shadow:0 9px 22px rgba(37,131,85,.23)}.discipline-hero .attendance-hero-icon{background:#ba3b44;box-shadow:0 9px 22px rgba(186,59,68,.22)}
.attendance-hero-copy{min-width:0;flex:1}.attendance-eyebrow{display:block;margin-bottom:5px;color:#315fd4;font-size:11px;font-weight:900;letter-spacing:.1em}.attendance-register-hero .attendance-eyebrow{color:#1d744b}.discipline-hero .attendance-eyebrow{color:#9a2730}.attendance-hero h2{margin:0 0 6px;color:#17375f;font-size:22px}.attendance-hero p{max-width:900px;margin:0;color:#596a83;line-height:1.5}
.attendance-hero-state{display:grid;gap:7px;flex:0 0 auto;min-width:170px;padding:12px 14px;border:1px solid #d6e1f0;border-radius:11px;background:rgba(255,255,255,.88);text-align:center}.attendance-hero-state>span:not(.badge){color:#68748a;font-size:12px}.attendance-hero-state strong{color:#17375f;font-size:17px}
.attendance-register-identity{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:12px}.attendance-identity-item{display:grid;gap:5px;padding:13px 14px;border:1px solid #dce5f1;border-radius:10px;background:#f8faff}.attendance-identity-item span{color:#68748a;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.attendance-identity-item strong{color:#17375f;font-size:15px;line-height:1.35}
.attendance-filter-card{padding:15px 17px}.attendance-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(190px,1fr));gap:12px;align-items:end}.attendance-report-filters{grid-template-columns:minmax(150px,.65fr) minmax(190px,.8fr) minmax(250px,1.3fr) auto}.discipline-filters{grid-template-columns:minmax(190px,.8fr) minmax(220px,1fr) minmax(260px,1.25fr)}.attendance-filter-grid label{margin-top:0;color:#294769}.attendance-filter-submit button{width:100%;min-height:41px;font-weight:800}
.attendance-action-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:14px;padding-top:14px;border-top:1px solid #e0e7f0}.attendance-action-bar>span{color:#52637a;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}.attendance-action-bar .btn,.attendance-action-bar button{font-size:13px;font-weight:700}
.attendance-schedule-strip{display:grid;grid-template-columns:repeat(3,minmax(115px,1fr)) auto;gap:9px;margin-top:14px;padding-top:14px;border-top:1px solid #e0e7f0}.attendance-schedule-strip>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 11px;border-radius:9px;background:#edf5ff;color:#294769}.attendance-schedule-strip span{font-size:12px;font-weight:700}.attendance-schedule-strip strong{font-size:16px}.attendance-provisional{align-self:center;background:#ffe5b5;color:#713d00;font-weight:900;text-align:center}.attendance-schedule-alert{margin:14px 0 0}.attendance-empty-alert{border-left:5px solid #b83232;line-height:1.5}
.attendance-call-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}.attendance-call-card{position:relative;overflow:hidden;padding:0!important}.attendance-call-card:before{content:"";position:absolute;inset:0 auto 0 0;width:5px;background:#d39b27}.attendance-call-card.is-finalized:before{background:#258355}.attendance-call-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px 13px;background:linear-gradient(135deg,#f5f8fd,#fff)}.attendance-call-head h3{margin:0;color:#17375f;font-size:19px}.attendance-call-time{display:grid;gap:2px;min-width:76px;padding:8px 10px;border-radius:9px;background:#17375f;color:#fff;text-align:center}.attendance-call-time span{font-size:10px;text-transform:uppercase;letter-spacing:.07em}.attendance-call-time strong{font-size:18px}.attendance-call-state{display:flex;align-items:center;justify-content:space-between;gap:9px;padding:0 18px 12px}.attendance-call-state small{color:#68748a;text-align:right}.attendance-call-form{padding:0 18px 18px}.attendance-submit{width:100%;margin-top:12px;min-height:44px;font-weight:800}
.attendance-table-wrap{border:1px solid #dce4ef;border-radius:9px;box-shadow:none!important}.attendance-page table{font-size:13px}.attendance-page th{background:#e9f1fc;color:#27476e;font-size:11px;letter-spacing:.035em;text-transform:uppercase}.attendance-page td{vertical-align:middle}.attendance-entry-table{min-width:430px!important}.attendance-entry-table th:last-child,.attendance-entry-table td:last-child{width:175px}.attendance-entry-table td strong{display:block}.attendance-entry-table td small{display:block;margin-top:3px;color:#758196}.attendance-status-select{min-width:145px;font-weight:700}.attendance-call-form textarea{resize:vertical}
.attendance-results-card{padding:18px!important}.attendance-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.attendance-section-head h3{margin:0;color:#17375f}.attendance-section-head p{margin:5px 0 0;color:#68748a;line-height:1.45}.attendance-stat-grid{display:grid;grid-template-columns:repeat(6,minmax(105px,1fr));gap:9px;margin-bottom:15px}.attendance-stat{display:grid;gap:5px;padding:12px;border:1px solid #dce5f1;border-radius:10px;background:#f8faff}.attendance-stat span{color:#68748a;font-size:11px;font-weight:800;text-transform:uppercase}.attendance-stat strong{color:#17375f;font-size:23px}.attendance-stat-present{border-left:5px solid #258355;background:#f0fbf5}.attendance-stat-absent,.attendance-stat-fuite{border-left:5px solid #b83232;background:#fff5f5}.attendance-stat-malade{border-left:5px solid #c58c20;background:#fffaf0}.attendance-stat-dispense{border-left:5px solid #315fd4;background:#f3f6ff}.attendance-stat-rate{border-left:5px solid #17375f;background:#eef3f9}
.attendance-decision{display:inline-flex;align-items:center;min-height:26px;padding:4px 9px;border-radius:999px;background:#edf1f6;color:#45546a;font-size:11px;font-weight:900;white-space:nowrap}.attendance-decision-present{background:#dff7e8;color:#176b43}.attendance-decision-absent,.attendance-decision-fuite{background:#fde6e6;color:#a12525}.attendance-decision-malade{background:#fff0c8;color:#805700}.attendance-decision-dispense{background:#e5edff;color:#315fd4}.attendance-empty-cell{padding:24px!important;color:#68748a;text-align:center!important;font-style:italic}
.official-report{padding:22px;border:1px solid #d7e1ee;border-radius:12px;background:#fff;box-shadow:0 9px 28px rgba(25,52,91,.07)}.official-report-header{display:grid;grid-template-columns:86px minmax(0,1fr) 86px;align-items:center;gap:12px;padding-bottom:14px;border-bottom:2px solid #17375f;text-align:center}.official-report-logo-wrap{display:flex;align-items:center;justify-content:center;min-height:72px}.official-report-logo{display:block;max-width:76px;max-height:72px;object-fit:contain}.official-report-identity{display:grid;gap:3px}.official-report-identity strong{color:#142f54;font-family:"Times New Roman",serif;font-size:20px}.official-report-identity span{font-family:"Times New Roman",serif;font-size:13px}.official-report-title{text-align:center;padding:17px 0}.official-report-title>span{color:#64748b;font-size:10px;font-weight:900;letter-spacing:.16em}.official-report-title h2{margin:5px 0 4px;color:#172033;font-family:"Times New Roman",serif;font-size:21px}.official-report-title p{margin:0;font-family:"Times New Roman",serif}.attendance-report-kpis{display:grid;grid-template-columns:repeat(4,minmax(130px,1fr));gap:9px;margin-bottom:20px}.attendance-report-kpis>div{display:grid;gap:5px;padding:11px;border:1px solid #d9e3ef;border-radius:9px;background:#f7faff;text-align:center}.attendance-report-kpis span{color:#68748a;font-size:11px;font-weight:800;text-transform:uppercase}.attendance-report-kpis strong{color:#17375f;font-size:21px}.attendance-report-section+.attendance-report-section{margin-top:22px}.attendance-report-table{min-width:760px!important}.attendance-report-table th,.attendance-report-table td{text-align:center}.attendance-report-table th:first-child,.attendance-report-table td:first-child{text-align:left}
.discipline-export-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}.discipline-export-group{display:grid;gap:9px;padding:13px;border:1px solid #dce5f1;border-radius:10px;background:#f8faff}.discipline-export-group>strong{color:#17375f}.discipline-export-group .inline-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.discipline-export-group .btn{padding:7px 6px;font-size:12px;text-align:center}.discipline-situation-title{margin-top:4px}.discipline-class-block{margin-top:15px;border:1px solid #dbe4f0;border-radius:10px;overflow:hidden;break-inside:avoid}.discipline-class-block h4{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:11px 13px;background:#17375f;color:#fff}.discipline-class-block h4 small{color:#dce8f8;font-weight:500}.discipline-situation-table{min-width:720px!important}.discipline-open-case{font-size:12px;white-space:nowrap}.attendance-empty-state{display:grid;gap:5px;padding:25px;border:1px dashed #b9c6d8;border-radius:10px;background:#fafbfd;color:#68748a;text-align:center}.attendance-empty-state strong{color:#34445d;font-size:16px}.discipline-student-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin:26px 0 13px;padding:0 4px}.discipline-student-heading h2{margin:0;color:#17375f}.discipline-student-heading p{margin:4px 0 0;color:#68748a}.discipline-new-case{border-left:6px solid #ba3b44!important}.discipline-case-list{display:grid;gap:14px}.discipline-case{margin:0;padding:16px;border:1px solid #d7e1ef;border-left:5px solid #315fd4;border-radius:10px;background:#fafcff}.discipline-case-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(150px,.28fr);gap:14px;align-items:end}.discipline-case-head>div:first-child{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.discipline-case-head small{display:block;width:100%;color:#68748a}.discipline-case textarea{resize:vertical}
.attendance-status-PRESENT{color:#176b43}.attendance-status-ABSENT,.attendance-status-FUITE{color:#a12525}.attendance-status-MALADE{color:#8a5a00}.attendance-status-DISPENSE{color:#315fd4}
@media(max-width:1050px){.attendance-call-grid{grid-template-columns:1fr}.attendance-report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.attendance-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.discipline-export-grid{grid-template-columns:1fr}.discipline-export-group{grid-template-columns:140px minmax(0,1fr);align-items:center}}
@media(max-width:700px){.attendance-quick-nav,.attendance-register-identity,.attendance-filter-grid,.attendance-report-filters,.discipline-filters,.attendance-stat-grid,.attendance-report-kpis{display:grid;grid-template-columns:1fr}.attendance-quick-nav .btn{width:100%}.attendance-hero{align-items:flex-start;padding:16px}.attendance-hero-state{width:100%;min-width:0}.attendance-schedule-strip{grid-template-columns:1fr}.attendance-action-bar,.attendance-section-head,.discipline-student-heading{align-items:stretch;flex-direction:column}.attendance-action-bar .inline-actions{display:grid;grid-template-columns:1fr}.attendance-call-head{padding:15px 14px 11px}.attendance-call-state{align-items:flex-start;flex-direction:column;padding:0 14px 11px}.attendance-call-state small{text-align:left}.attendance-call-form{padding:0 14px 14px}.official-report{padding:12px}.official-report-header{grid-template-columns:58px minmax(0,1fr) 58px;gap:7px}.official-report-logo-wrap{min-height:54px}.official-report-logo{max-width:54px;max-height:54px}.official-report-identity strong{font-size:16px}.official-report-identity span{font-size:11px}.official-report .table-wrap{overflow:auto}.official-report table{min-width:720px}.discipline-export-group{grid-template-columns:1fr}.discipline-case-head{grid-template-columns:1fr}.discipline-class-block h4{align-items:flex-start;flex-direction:column}.discipline-history-card{padding:12px!important}}
@media(max-width:470px){.attendance-hero{display:grid;grid-template-columns:46px minmax(0,1fr)}.attendance-hero-icon{width:46px;height:46px;flex-basis:46px;border-radius:13px}.attendance-hero-copy h2{font-size:18px}.attendance-hero-copy p{font-size:13px}.attendance-hero-state{grid-column:1/-1}.attendance-register-identity{padding:9px}.discipline-export-group .inline-actions{grid-template-columns:1fr}.attendance-results-card{padding:12px!important}}
@media print{
  @page{size:A4 landscape;margin:10mm}
  .attendance-quick-nav,.attendance-page .no-print,.app-fixed-header,.app-fixed-sidebar,.sidebar-backdrop,#timetable-guard-modal,.app-main>h1{display:none!important}
  .shell,.app-main{display:block!important;height:auto!important;min-height:0!important;margin:0!important;padding:0!important;width:100%!important;overflow:visible!important}
  body.app-page{height:auto!important;overflow:visible!important;background:#fff!important}.attendance-page{max-width:none!important}.attendance-page .card,.official-report{box-shadow:none!important}
  .official-report{padding:0;border:0;border-radius:0}.official-report-header{grid-template-columns:78px minmax(0,1fr) 78px}.official-report .table-wrap,.attendance-page .table-wrap{overflow:visible!important}.official-report table,.attendance-page table{width:100%!important;min-width:0!important;font-size:9pt}.attendance-report-kpis{grid-template-columns:repeat(4,1fr)}.attendance-report-kpis>div{padding:7px}.attendance-report-section{break-inside:auto}.discipline-class-block{break-inside:avoid}.discipline-history-card{border:0!important;padding:0!important}.discipline-case{break-inside:avoid;background:#fff}tr{break-inside:avoid}
}
