/* ==========================================================================
   Easy School Teachers — système de design de l'espace Professeurs
   (connexion /espace/login + coquille /espace/*). Feuille autonome :
   ne dépend ni de app.css ni de portail.css.
   Sections : 1. Jetons  2. Marque  3. Connexion  4. Coquille  5. Tableau de bord
              6. Composants de pages  7. Responsive  8. Impression
   ========================================================================== */

/* 1. Jetons ---------------------------------------------------------------- */
:root {
    --t-navy: #06402a;
    --t-navy-2: #07532e;
    --t-ink: #141b4d;
    --t-text: #1d2a5e;
    --t-muted: #56658a;
    --t-blue: #0e7a46;
    --t-blue-d: #07532e;
    --t-blue-x: #054a28;
    --t-gold: #c99945;
    --t-gold-d: #a87a2e;
    --t-line: #e3e9f4;
    --t-line-2: #cdd7e8;
    --t-bg: #f4f7fc;
    --t-card: #ffffff;
    --t-shadow: 0 4px 16px rgba(6, 64, 42, .05);
    --t-shadow-lg: 0 30px 60px rgba(6, 64, 42, .18);
    --t-radius: 14px;
    --t-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    /* Compatibilité : vues partagées (messagerie, QR d'accès) */
    --es-primary: #0e7a46;
    --es-primary-rgb: 22, 119, 255;
    --es-card-bg: #ffffff;
    --es-body-bg: #f4f7fc;
    --es-border: #e3e9f4;
    --es-text: #141b4d;
    --es-text-muted: #56658a;
    --es-shadow: 0 4px 16px rgba(6, 64, 42, .06);
    --es-grad: linear-gradient(90deg, #07532e, #0e7a46);
}
html[lang="ar"] { --t-font: "Noto Kufi Arabic", "Cairo", "Inter", system-ui, sans-serif; }

.tone-blue   { --c: #0e7a46; --soft: #e6f2ea; --soft2: #e0f3ea; --strong: #0a6236; }
.tone-violet { --c: #304790; --soft: #eff1f9; --soft2: #e3e7f4; --strong: #2f3d6e; }
.tone-green  { --c: #22b35e; --soft: #e5f7ec; --soft2: #cdeedb; --strong: #148a45; }
.tone-amber  { --c: #f0a01b; --soft: #fff3dc; --soft2: #fde5b4; --strong: #c27400; }
.tone-cyan   { --c: #1a747a; --soft: #e6f4f5; --soft2: #cfeaec; --strong: #145a5f; }
.tone-rose   { --c: #e5487b; --soft: #fde8ef; --soft2: #fad0de; --strong: #b9255a; }
.tone-indigo { --c: #314482; --soft: #f0f3f9; --soft2: #e3e7f5; --strong: #2d395e; }
.tone-teal   { --c: #0f9d8a; --soft: #e0f5f1; --soft2: #c3ebe3; --strong: #0b7668; }
.tone-red    { --c: #e5303f; --soft: #fde6e8; --soft2: #fbd0d4; --strong: #b81d2b; }

/* 2. Marque ---------------------------------------------------------------- */
.tb-brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--t-navy); flex: 0 0 auto; }
.tb-mark { height: 86px; width: auto; display: block; }
.tb-word { display: flex; flex-direction: column; align-items: center; line-height: 1; font-family: var(--t-font); }
.tb-l1 { font-size: 36px; font-weight: 900; letter-spacing: -.01em; white-space: nowrap; }
.tb-l1 b { color: var(--t-navy-2); font-weight: 900; }
.tb-l1 em { font-style: normal; background: linear-gradient(90deg, #1b7146, #1e8250); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-l2 { margin-top: 3px; font-size: 21px; font-weight: 800; letter-spacing: .42em; padding-left: .42em; background: linear-gradient(90deg, #c98a0a, #c99945 50%, #c98a0a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tb-l3 { margin-top: 6px; font-size: 12.5px; font-weight: 500; color: var(--t-navy-2); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.tb-l3::before, .tb-l3::after { content: ""; width: 34px; height: 1.5px; background: var(--t-navy-2); }

/* 3. Connexion ------------------------------------------------------------- */
.tl-body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: #fff; font-family: var(--t-font); color: var(--t-ink); -webkit-font-smoothing: antialiased; }
.tl-env-ribbon, .ts-env-ribbon { background: repeating-linear-gradient(-45deg, #f59e0b 0 18px, #f7ab25 18px 36px); color: #3b2300; text-align: center; font-weight: 800; font-size: 14px; padding: 6px 12px; letter-spacing: .01em; position: relative; z-index: 1040; }
.tl-env-ribbon i, .ts-env-ribbon i { margin-right: 8px; }

.tl-header { position: relative; z-index: 5; background: rgba(255, 255, 255, .97); box-shadow: 0 2px 12px rgba(6, 64, 42, .06); }
.tl-header-in { max-width: 1480px; margin: 0 auto; height: 108px; padding: 0 4.6%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.tl-header .tb-mark { height: 90px; }
/* Navigation, langues et contenu du pied de page : assets/css/portal-chrome.css */

.tl-stage { position: relative; flex: 1 0 auto; display: flex; }
.tl-photo { position: absolute; inset: 0 0 -80px 0; background: #e9eef5 url("../img/teachers/login-hero.jpg") left top / cover no-repeat; }
.tl-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .28) 26%, rgba(255, 255, 255, 0) 42%); }
.tl-stage-in { position: relative; z-index: 2; width: 100%; max-width: 1480px; margin: 0 auto; padding: 26px 2.3% 46px 4.4%; display: grid; grid-template-columns: minmax(0, 1fr) 522px; gap: 40px; align-items: start; }
.tl-hero { padding-top: 48px; max-width: 470px; }
.tl-headline { margin: 0; font-size: clamp(40px, 4.45vw, 66px); font-weight: 800; line-height: 1.02; letter-spacing: -.04em; color: #141a4d; }
.tl-headline span { display: block; }
.tl-headline .blue { background: linear-gradient(90deg, #0e7a46, #196d43); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tl-headline i { font-style: normal; color: var(--t-gold); -webkit-text-fill-color: var(--t-gold); }
.tl-lead { margin: 18px 0 0; font-size: 22px; line-height: 1.38; color: #3a4769; max-width: 380px; }
.tl-goldbar { display: block; width: 66px; height: 5px; margin-top: 22px; border-radius: 3px; background: var(--t-gold); }

.tl-card { position: relative; background: #fff; border-radius: 22px; box-shadow: var(--t-shadow-lg); padding: 24px 32px 22px; margin-top: 2px; }
.tl-card-logo { display: block; width: 262px; max-width: 70%; height: auto; margin: 0 auto 18px; }
.tl-title { margin: 0 0 6px; font-size: 33px; font-weight: 800; letter-spacing: -.025em; color: #141a4d; }
.tl-sub { margin: 0 0 20px; font-size: 19px; line-height: 1.42; color: #4d5c80; }
.tl-field { margin-bottom: 14px; }
.tl-input { position: relative; display: flex; align-items: center; height: 54px; border: 1.5px solid var(--t-line-2); border-radius: 9px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.tl-input:focus-within { border-color: var(--t-blue); box-shadow: 0 0 0 4px rgba(14, 122, 70, .13); }
.tl-input > i:first-child { font-size: 21px; color: var(--t-navy-2); margin: 0 18px 0 18px; }
.tl-input input, .tl-input select { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--t-ink); appearance: none; -webkit-appearance: none; padding-right: 12px; }
.tl-input input::placeholder { color: #4d5c80; opacity: 1; }
.tl-input .tl-caret { position: absolute; right: 16px; pointer-events: none; color: var(--t-muted); }
.tl-eye { border: 0; background: none; padding: 0 16px; height: 100%; color: var(--t-navy-2); font-size: 21px; cursor: pointer; border-radius: 0 9px 9px 0; }
.tl-eye:focus-visible { outline: 3px solid rgba(14, 122, 70, .35); }
.tl-field.is-invalid .tl-input { border-color: #dc3545; }
.tl-err { margin: 6px 2px 0; font-size: 13.5px; color: #c62828; display: flex; gap: 6px; align-items: center; }
.tl-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 18px; font-size: 17px; }
.tl-options a { color: var(--t-blue-d); text-decoration: underline; text-underline-offset: 3px; }
.tl-check { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; color: var(--t-ink); margin: 0; }
.tl-check input, .ts-check input { appearance: none; -webkit-appearance: none; width: 24px; height: 24px; border-radius: 5px; border: 1.5px solid var(--t-line-2); background: #fff; display: inline-grid; place-items: center; margin: 0; cursor: pointer; flex: 0 0 auto; }
.tl-check input:checked, .ts-check input:checked { background: var(--t-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.485 3.929a1 1 0 0 1 0 1.414l-6.364 6.364a1 1 0 0 1-1.414 0L2.515 8.515a1 1 0 1 1 1.414-1.414L6.414 9.586l5.657-5.657a1 1 0 0 1 1.414 0z'/%3E%3C/svg%3E") center / 15px no-repeat; border-color: var(--t-blue); }
.tl-check input:focus-visible { outline: 3px solid rgba(14, 122, 70, .35); outline-offset: 2px; }
.tl-submit { width: 100%; height: 62px; border: 0; border-radius: 10px; background: linear-gradient(90deg, var(--t-blue-x), var(--t-blue)); color: #fff; font: inherit; font-size: 22px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 18px; cursor: pointer; box-shadow: 0 12px 24px rgba(14, 122, 70, .28); transition: filter .15s, transform .15s; }
.tl-submit i { font-size: 24px; }
.tl-submit:hover { filter: brightness(1.07); }
.tl-submit:active { transform: translateY(1px); }
.tl-submit:focus-visible { outline: 3px solid rgba(201, 153, 69, .8); outline-offset: 3px; }
.tl-submit[disabled] { opacity: .8; cursor: progress; }
.tl-help { margin-top: 18px; padding-top: 14px; border-top: 1.5px solid #dfe6f2; display: flex; justify-content: center; align-items: center; gap: 18px; }
.tl-help > i { font-size: 40px; color: var(--t-blue-d); }
.tl-help b { display: block; font-size: 16px; color: var(--t-ink); font-weight: 700; }
.tl-help a { font-size: 16px; color: var(--t-blue-d); text-decoration: underline; text-underline-offset: 3px; }
.tl-help a i { text-decoration: none; display: inline-block; margin-left: 4px; }
.tl-secure { margin-top: 14px; background: #f2f9f6; border-radius: 10px; padding: 14px 20px; display: flex; align-items: center; justify-content: center; gap: 20px; color: #3a4769; font-size: 14px; line-height: 1.45; }
.tl-secure i { font-size: 32px; color: var(--t-navy-2); }
.tl-secure span { max-width: 260px; }
.tl-env { position: absolute; top: 14px; left: 18px; display: flex; justify-content: center; align-items: center; gap: 0; font-size: 11px; opacity: .85; }
.tl-env:hover, .tl-env:focus-within { opacity: 1; }
.tl-env-lbl { color: var(--t-muted); margin-right: 8px; }
.tl-env a { border: 1px solid #d8e1ef; padding: 3px 12px; color: var(--t-muted); text-decoration: none; background: #fff; }
.tl-env a + a { border-left: 0; }
.tl-env a:first-of-type { border-radius: 999px 0 0 999px; }
.tl-env a:last-of-type { border-radius: 0 999px 999px 0; }
.tl-env a.on { background: var(--t-navy); color: #fff; border-color: var(--t-navy); font-weight: 700; }
.is-formation .tl-env a.on { background: #f59e0b; border-color: #f59e0b; color: #3b2300; }
.tl-flash { margin-bottom: 14px; display: grid; gap: 8px; }
.tl-alert, .ts-alert { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-radius: 10px; font-size: 14.5px; line-height: 1.4; border: 1px solid transparent; }
.tl-alert-danger, .ts-alert-danger { background: #fdecee; color: #a3192a; border-color: #f8c9cf; }
.tl-alert-success, .ts-alert-success { background: #e7f7ee; color: #146c3a; border-color: #bfe8cf; }
.tl-alert-warning, .ts-alert-warning { background: #fff5e0; color: #8a5300; border-color: #fbdca0; }
.tl-alert-info, .ts-alert-info { background: #eff8f3; color: #165636; border-color: #d6eee2; }

.tl-footer { position: relative; z-index: 3; margin-top: -60px; color: #fff; }
.tl-wave { display: block; width: 100%; height: 104px; }
.tl-footer-in { background: var(--t-navy); margin-top: -1px; padding: 0 4.6% 22px; }

/* 4. Coquille -------------------------------------------------------------- */
.ts-body { margin: 0; background: var(--t-bg); font-family: var(--t-font); color: var(--t-ink); -webkit-font-smoothing: antialiased; }
/* Lien d'évitement : masqué au-dessus de l'écran (et non à gauche, ce qui créait
   un défilement horizontal géant en arabe / RTL), révélé au focus clavier. */
.ts-skip { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 2000; background: var(--t-navy); color: #fff; padding: 10px 16px; border-radius: 0 0 10px 10px; transition: top .15s; }
.ts-skip:focus { top: 0; }
.ts-top { position: sticky; top: 0; z-index: 1030; height: 100px; background: #fff; box-shadow: 0 2px 14px rgba(6, 64, 42, .06); display: flex; align-items: center; gap: 24px; padding: 0 30px 0 34px; }
.ts-top .tb-mark { height: 84px; }
.ts-top .tb-l1 { font-size: 34px; }
.ts-top .tb-l2 { font-size: 20px; }
.ts-top .tb-l3 { font-size: 10.5px; }
.ts-top .tb-l3::before, .ts-top .tb-l3::after { width: 24px; }
.ts-burger { border: 0; background: #eef3fb; color: var(--t-navy); width: 44px; height: 44px; border-radius: 12px; font-size: 26px; display: grid; place-items: center; }
.ts-campus-wrap { margin: 0 auto; }
.ts-campus { height: 58px; border: 1.5px solid #d5ddeb; border-radius: 10px; background: #fff; padding: 0 18px; display: flex; align-items: center; gap: 14px; font: inherit; font-size: 17px; color: var(--t-ink); cursor: pointer; }
.ts-campus > i:first-child { font-size: 28px; color: var(--t-navy-2); }
.ts-campus b { font-weight: 700; }
.ts-campus .dot { margin: 0 4px; }
.ts-campus:hover { border-color: #b8c7e2; }
.ts-top-actions { display: flex; align-items: center; gap: 22px; }
.ts-bell { position: relative; border: 0; background: none; width: 52px; height: 52px; font-size: 30px; color: var(--t-navy-2); border-radius: 12px; display: grid; place-items: center; }
.ts-bell:hover { background: #f1f5fb; }
.ts-badge { position: absolute; top: 2px; right: 2px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 999px; background: #ef2b3a; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; border: 2px solid #fff; }
.ts-vsep { width: 1.5px; height: 54px; background: #e1e7f1; }
.ts-user { border: 0; background: none; display: flex; align-items: center; gap: 14px; padding: 4px; border-radius: 14px; text-align: left; color: var(--t-ink); }
.ts-user:hover { background: #f5f8fd; }
.ts-avatar { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(135deg, #183d2a, #142763); color: #fff; font-weight: 700; font-size: 23px; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; }
.ts-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ts-user-tx b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.ts-user-tx span { font-size: 16px; color: var(--t-muted); }
.ts-user-tx span i { margin-left: 8px; font-size: 13px; }
.ts-menu { border: 0; border-radius: 14px; box-shadow: 0 18px 44px rgba(6, 64, 42, .16); padding: 8px; min-width: 270px; font-size: 14.5px; }
.ts-menu .dropdown-item { display: flex; align-items: center; gap: 12px; border-radius: 9px; padding: 9px 12px; color: var(--t-ink); font-weight: 500; white-space: normal; }
.ts-menu .dropdown-item i { color: var(--t-blue-d); font-size: 17px; }
.ts-menu .dropdown-item:hover, .ts-menu .dropdown-item:focus { background: #eef6f0; }
.ts-menu .dropdown-item.text-danger i { color: #d6293b; }
.ts-menu-sep { height: 1px; background: var(--t-line); margin: 6px 4px; }
.ts-menu-head { padding: 10px 12px 8px; }
.ts-menu-head small { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--t-muted); font-weight: 700; }
.ts-menu-head b { display: block; font-size: 15px; }
.ts-menu-head span { font-size: 13px; color: var(--t-muted); }
.ts-menu-langs { display: flex; gap: 6px; padding: 4px 8px; }
.ts-menu-langs a { flex: 1; text-align: center; padding: 6px; border-radius: 8px; text-decoration: none; color: var(--t-ink); font-weight: 600; background: #f3f6fb; }
.ts-menu-langs a.on { background: var(--t-blue); color: #fff; }
.ts-notif { width: 360px; padding: 0; overflow: hidden; }
.ts-notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--t-line); }
.ts-notif-list { max-height: 380px; overflow: auto; }
.ts-notif-item { display: flex; gap: 12px; padding: 10px 16px; text-decoration: none; color: var(--t-ink); border-bottom: 1px solid #f0f3f8; }
.ts-notif-item.unread { background: #f4f8ff; }
.ts-notif-item .ic { width: 36px; height: 36px; border-radius: 10px; background: #e6f2ea; color: var(--t-blue); display: grid; place-items: center; flex: 0 0 auto; }
.ts-notif-item .tx { display: flex; flex-direction: column; min-width: 0; font-size: 13.5px; }
.ts-notif-item .tx span { color: var(--t-muted); }
.ts-notif-item .tx small { color: #8b97b0; font-size: 12px; }
.ts-linkbtn { border: 0; background: none; color: var(--t-blue-d); font-size: 13px; font-weight: 600; padding: 0; }

.ts-wrap { display: grid; grid-template-columns: 262px minmax(0, 1fr); min-height: calc(100vh - 100px); }
.ts-side { position: sticky; top: 100px; height: calc(100vh - 100px); background: #fff; border-right: 1px solid #edf1f7; display: flex; flex-direction: column; padding: 38px 0 0; overflow: hidden; }
.ts-nav { display: flex; flex-direction: column; gap: 3px; padding: 0 14px 0 8px; overflow-y: auto; }
.ts-nav a { position: relative; display: flex; align-items: center; gap: 16px; height: 52px; padding: 0 12px 0 14px; border-radius: 9px; text-decoration: none; color: #1b2a6b; font-size: 16.5px; white-space: nowrap; font-weight: 500; letter-spacing: -.005em; transition: background .15s, color .15s; }
.ts-nav a i { font-size: 24px; width: 26px; text-align: center; color: var(--t-navy-2); }
.ts-nav a:hover { background: #f4fbf8; }
.ts-nav a.on { background: linear-gradient(90deg, #1a6f45, #1e7f4e); color: #fff; font-weight: 600; box-shadow: 0 8px 18px rgba(14, 122, 70, .28); }
.ts-nav a.on i { color: #fff; }
.ts-nav a:focus-visible { outline: 3px solid rgba(14, 122, 70, .4); outline-offset: 1px; }
.ts-count { margin-left: 4px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; background: #ef2b3a; color: #fff; font-size: 13.5px; font-weight: 700; display: grid; place-items: center; }
.ts-side-foot { margin-top: auto; position: relative; flex: 0 0 auto; }
.ts-side-foot svg { display: block; width: 100%; height: 108px; }
.ts-side-foot p { position: absolute; left: 0; right: 0; bottom: 0; margin: 0; padding: 0 8px 14px 18px; background: transparent; color: #fff; font-size: 11.5px; line-height: 1.45; }
.ts-side-foot a { color: #fff; text-decoration: none; }
.ts-side-foot a:hover { text-decoration: underline; }
.ts-main { padding: 26px 30px 40px 26px; min-width: 0; outline: 0; }
.ts-flashes { display: grid; gap: 8px; margin-bottom: 16px; }
.ts-alert { align-items: center; }
.ts-alert > span { flex: 1; }
.ts-alert-x { border: 0; background: none; color: inherit; opacity: .7; padding: 0 4px; }
.ts-tabbar { display: none; }

/* 5. Tableau de bord ------------------------------------------------------- */
.ts-hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 16px; flex-wrap: wrap; }
.ts-hello h1 { margin: 0; font-size: 50px; font-weight: 800; letter-spacing: -.04em; line-height: 1.05; color: #121a4d; }
.ts-hello h1 .blue { color: var(--t-blue); }
.ts-hello h1 .gold { color: var(--t-gold); font-style: normal; }
.ts-hello p { margin: 4px 0 0; font-size: 20px; color: #3a4769; }
.ts-hello-meta { display: flex; align-items: center; gap: 18px; font-size: 17px; color: var(--t-ink); padding-bottom: 26px; }
.ts-hello-meta i.bi { font-size: 26px; color: var(--t-navy-2); margin-right: 14px; vertical-align: -4px; }
.ts-hello-meta .sep { width: 1.5px; height: 28px; background: #dbe2ee; }
.ts-hello-meta .sync { font-size: 15.5px; color: #33416a; }
.ts-hello-meta .dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #22b35e; margin-right: 10px; box-shadow: 0 0 0 4px rgba(34, 179, 94, .14); }

.ts-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ts-kpi { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 14px; border-radius: var(--t-radius); border: 1px solid var(--t-line); background: linear-gradient(135deg, var(--soft) 0%, #fff 58%); box-shadow: var(--t-shadow); text-decoration: none; color: var(--t-ink); min-height: 132px; transition: transform .15s, box-shadow .15s; }
.ts-kpi:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(6, 64, 42, .09); color: var(--t-ink); }
.ts-kpi .ic { width: 62px; height: 62px; border-radius: 16px; background: var(--soft2); color: var(--strong); display: grid; place-items: center; font-size: 30px; flex: 0 0 auto; }
.ts-kpi .bd { display: flex; flex-direction: column; min-width: 0; flex: 1; padding-top: 4px; }
.ts-kpi .lb { font-size: 15.5px; font-weight: 700; color: var(--t-ink); padding-right: 30px; }
.ts-kpi .vl { display: flex; align-items: center; gap: 10px; font-size: 44px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; color: var(--strong); }
.ts-kpi.tone-blue .vl { color: var(--t-ink); }
.ts-kpi .sb { font-size: 14px; color: var(--t-muted); line-height: 1.35; }
.ts-kpi .sb b { font-weight: 600; }
.ts-kpi .sb b.up { color: #148a45; }
.ts-kpi .sb b.down { color: #c0182b; }
.ts-kpi .go { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .85); color: var(--t-navy-2); display: grid; place-items: center; font-size: 15px; box-shadow: 0 1px 4px rgba(6, 64, 42, .08); }
.ts-kpi .ts-bar { margin: 6px 0 8px; }
.ts-spark { width: 96px; height: 34px; margin-left: 6px; }
.ts-spark polyline { fill: none; stroke: #22b35e; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.ts-spark circle { fill: #22b35e; }
.ts-bar { display: block; height: 9px; border-radius: 9px; background: #e3e8f2; overflow: hidden; }
.ts-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #1a6f45, #1e7f4e); transition: width .6s ease; }
.ts-bar.gold > span { background: linear-gradient(90deg, #c99945, #f7c44d); }
.ts-bar.green > span { background: linear-gradient(90deg, #22b35e, #3fd07b); }

.ts-row { display: grid; gap: 16px; margin-top: 16px; }
.ts-row--main { grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); align-items: start; }
.ts-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ts-row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ts-row--side { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.ts-stack { display: grid; gap: 16px; min-width: 0; }
.ts-card { background: var(--t-card); border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: 14px 16px 14px; box-shadow: var(--t-shadow); min-width: 0; }
.ts-card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.ts-card-h h2 { margin: 0; font-size: 18.5px; font-weight: 800; letter-spacing: -.025em; color: #18205a; display: flex; align-items: center; gap: 12px; }
.ts-card-h h2 > i { font-size: 22px; color: var(--t-navy-2); }
.ts-card-h h2 small { font-size: 14px; font-weight: 500; color: var(--t-muted); letter-spacing: 0; margin-left: -4px; }
.ts-card-h h3 { margin: 0; font-size: 16.5px; font-weight: 800; color: #18205a; }

.ts-btn-ghost, .ts-btn-soft, .ts-btn-primary, .ts-btn-danger, .ts-btn-light, .ts-btn-success { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 9px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background .15s, filter .15s, border-color .15s; line-height: 1.2; }
.ts-btn-ghost { border: 1.5px solid #d5e8de; background: #fff; color: #0a6236; padding: 6px 12px; font-size: 14px; }
.ts-btn-ghost:hover { background: #f4fbf8; border-color: #c0e0d0; color: #0a6236; }
.ts-btn-soft { border: 1.5px solid #c4e7d5; background: #f6fbf8; color: #0a6236; padding: 8px 14px; font-size: 15px; }
.ts-btn-soft:hover { background: #ecf7f2; color: #0a6236; }
.ts-btn-primary { border: 0; background: linear-gradient(90deg, var(--t-blue-d), var(--t-blue)); color: #fff; padding: 11px 18px; font-size: 15px; box-shadow: 0 8px 18px rgba(14, 122, 70, .25); }
.ts-btn-primary:hover { filter: brightness(1.07); color: #fff; }
.ts-btn-success { border: 0; background: linear-gradient(90deg, #148a45, #22b35e); color: #fff; padding: 11px 18px; font-size: 15px; }
.ts-btn-success:hover { filter: brightness(1.07); color: #fff; }
.ts-btn-danger { border: 1.5px solid #f5c2c8; background: #fff; color: #c0182b; padding: 8px 14px; font-size: 14.5px; }
.ts-btn-danger:hover { background: #fdecee; color: #c0182b; }
.ts-btn-light { border: 1.5px solid var(--t-line); background: #fff; color: var(--t-ink); padding: 9px 14px; font-size: 14.5px; }
.ts-btn-light:hover { background: #f5f8fd; color: var(--t-ink); }
.ts-btn-primary:focus-visible, .ts-btn-ghost:focus-visible, .ts-btn-soft:focus-visible, .ts-btn-light:focus-visible, .ts-btn-success:focus-visible, .ts-btn-danger:focus-visible { outline: 3px solid rgba(14, 122, 70, .4); outline-offset: 2px; }
button[disabled].ts-btn-primary, button[disabled].ts-btn-success { opacity: .6; cursor: not-allowed; }

/* Emploi du temps */
.ts-edt { --rowh: 46px; font-size: 12px; border: 1px solid #e6ebf3; border-radius: 10px; overflow: hidden; }
.ts-edt--lg { --rowh: 58px; }
.ts-edt-head { display: grid; grid-template-columns: 54px repeat(var(--days), minmax(0, 1fr)); background: #fbfcfe; border-bottom: 1px solid #e6ebf3; }
.ts-edt-day { text-align: center; padding: 6px 2px; border-left: 1px solid #e6ebf3; line-height: 1.25; }
.ts-edt-day b { display: block; font-size: 13px; font-weight: 700; color: var(--t-ink); }
.ts-edt-day small { font-size: 12.5px; color: var(--t-muted); }
.ts-edt-day.today { background: #eef6f0; }
.ts-edt-day.today b { color: var(--t-blue-d); }
.ts-edt-body { display: grid; grid-template-columns: 54px repeat(var(--days), minmax(0, 1fr)); height: calc(var(--rows) * var(--rowh)); }
.ts-edt-hours { display: flex; flex-direction: column; }
.ts-edt-hours span { height: var(--rowh); padding: 4px 0 0 8px; font-size: 12px; color: var(--t-muted); }
.ts-edt-col { position: relative; border-left: 1px solid #e6ebf3; background-image: linear-gradient(#eef2f8 1px, transparent 1px); background-size: 100% var(--rowh); }
.ts-slot { position: absolute; left: 3px; right: 3px; top: calc(var(--top) * var(--rowh) + 2px); height: calc(var(--len) * var(--rowh) - 4px); border-radius: 4px; border-left: 3px solid var(--c); background: var(--soft2); padding: 3px 6px; color: var(--t-ink); text-decoration: none; overflow: hidden; line-height: 1.22; transition: filter .15s; }
.ts-slot:hover { filter: brightness(.97); color: var(--t-ink); }
.ts-slot b { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-slot span { display: block; font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #2a376a; }
.ts-slot small { display: block; font-size: 11px; color: #4b5a80; white-space: nowrap; }
.ts-edt--lg .ts-slot { padding: 6px 9px; border-left-width: 4px; }
.ts-edt--lg .ts-slot b { font-size: 14px; }
.ts-edt--lg .ts-slot span { font-size: 13px; }
.ts-edt--lg .ts-slot small { font-size: 12.5px; }
.ts-edt-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Classes (accueil) */
.ts-classes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-classes li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 30px auto; align-items: center; gap: 14px; padding: 8px 12px; border: 1px solid #e8edf5; border-radius: 10px; }
.ts-cbadge { width: 52px; height: 46px; border-radius: 8px; background: var(--c); color: #fff; font-size: 21px; font-weight: 800; display: grid; place-items: center; letter-spacing: -.02em; }
.ts-classes .nm { text-decoration: none; color: var(--t-ink); min-width: 0; }
.ts-classes .nm b { display: block; font-size: 15.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-classes .nm span { display: block; font-size: 14.5px; color: var(--t-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-classes .ef { font-size: 14.5px; color: var(--t-muted); white-space: nowrap; }
.ts-round { width: 28px; height: 28px; border-radius: 50%; background: #eef2f8; color: var(--t-navy-2); display: grid; place-items: center; text-decoration: none; font-size: 13px; }
.ts-round:hover { background: #dfe7f5; color: var(--t-navy-2); }
.tp-sec { display: inline-block; vertical-align: 2px; margin-left: 4px; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 6px; border-radius: 5px; }
.tp-sec.fr { background: #e6f2ea; color: #0a6236; }
.tp-sec.ar { background: #e5f7ec; color: #148a45; }
.ts-chart { position: relative; height: 150px; }

/* Listes */
.ts-list { list-style: none; margin: 0; padding: 0; }
.ts-list li + li { border-top: 1px solid #eef2f8; }
.ts-list li > a, .ts-list li > .ts-li { display: flex; align-items: center; gap: 14px; padding: 9px 6px; color: var(--t-ink); text-decoration: none; border-radius: 8px; }
.ts-list li > a:hover { background: #f7f9fd; }
.ts-list .tx { flex: 1; min-width: 0; }
.ts-list .tx b { display: block; font-size: 14.5px; font-weight: 700; color: #1d2a66; overflow: hidden; text-overflow: ellipsis; }
.ts-list .tx small { display: block; font-size: 13px; color: var(--t-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-list .go { color: var(--t-navy-2); font-size: 15px; }
.ts-date { width: 46px; flex: 0 0 auto; border-radius: 8px; background: var(--soft); text-align: center; padding: 4px 0; line-height: 1.1; }
.ts-date b { display: block; font-size: 17px; font-weight: 800; color: var(--strong); }
.ts-date small { font-size: 12px; color: var(--strong); }
.ts-chip { display: inline-flex; align-items: center; border-radius: 999px; background: var(--soft2); color: var(--strong); padding: 4px 14px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.ts-dot { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; }
.dot-red { background: #ea2c3a; }
.dot-amber { background: #f5a524; }
.dot-blue { background: #0e7a46; }
.dot-green { background: #22b35e; }
.dot-none { border: 2px solid #8a97b1; }
.ts-mini { display: flex; align-items: center; gap: 10px; width: 150px; flex: 0 0 auto; }
.ts-mini .ts-bar { flex: 1; }
.ts-mini small { font-size: 12.5px; color: var(--t-muted); min-width: 34px; text-align: right; }
.ts-ricon { width: 46px; height: 46px; border-radius: 10px; background: #eef3fb; color: var(--t-navy-2); display: grid; place-items: center; font-size: 22px; flex: 0 0 auto; }
.ts-list--req li > a { padding: 10px 8px; border: 1px solid #e8edf5; border-radius: 10px; margin-bottom: 8px; }
.ts-list--req li + li { border-top: 0; }
.tp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.tp-pill--amber { background: #fdf0c9; color: #915400; }
.tp-pill--green { background: #dcf5e5; color: #127a3c; }
.tp-pill--red { background: #fde2e4; color: #c0182b; }
.tp-pill--slate { background: #edf0f5; color: #4d5a73; }
.tp-pill--blue { background: #ebf7f1; color: #0a6236; }
.tp-pill--violet { background: #eff1f9; color: #2f3d6e; }

/* Point d'attention */
.ts-attention { margin-top: 16px; display: grid; grid-template-columns: 58px 170px minmax(0, 1fr) auto 32px; align-items: center; gap: 20px; background: linear-gradient(90deg, #fff6e2, #fffaf1); border: 1.5px solid #f6cf73; border-radius: var(--t-radius); padding: 10px 18px; }
.ts-attention .ic { width: 54px; height: 54px; border-radius: 50%; background: #ffe7a6; color: #f0a000; display: grid; place-items: center; font-size: 26px; }
.ts-attention .hd b { display: block; font-size: 19px; font-weight: 800; color: var(--t-gold-d); margin-bottom: 8px; letter-spacing: -.02em; }
.ts-attention .tx { border-left: 2px solid #f2c24f; padding-left: 18px; min-width: 0; }
.ts-attention .tx b { display: block; font-size: 16.5px; font-weight: 800; color: #141a4d; }
.ts-attention .tx span { font-size: 14.5px; color: var(--t-muted); }
.ts-attention .x { border: 0; background: none; color: var(--t-navy-2); font-size: 18px; width: 32px; height: 32px; border-radius: 8px; }
.ts-attention .x:hover { background: rgba(0, 0, 0, .05); }
.ts-attention.is-hidden { display: none; }

/* 6. Composants de pages ---------------------------------------------------- */
.ts-page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.ts-page-h h1 { margin: 0; font-size: 34px; font-weight: 800; letter-spacing: -.035em; color: #121a4d; display: flex; align-items: center; gap: 14px; }
.ts-page-h h1 > i { font-size: 30px; color: var(--t-blue); }
.ts-page-h p { margin: 4px 0 0; font-size: 16px; color: var(--t-muted); }
.ts-page-h .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.ts-crumb { font-size: 13.5px; margin-bottom: 6px; }
.ts-crumb a { color: var(--t-blue-d); text-decoration: none; }
.ts-crumb a:hover { text-decoration: underline; }
.ts-empty { text-align: center; padding: 34px 12px; color: var(--t-muted); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.ts-empty i { font-size: 36px; color: #b3c0d8; margin-bottom: 4px; }
.ts-empty b { color: var(--t-ink); font-size: 15px; }
.ts-empty span { font-size: 13.5px; max-width: 360px; }
.ts-empty a { color: var(--t-blue-d); }
.ts-empty.sm { padding: 18px 10px; }
.ts-empty.sm i { font-size: 28px; }

.ts-tabs { display: inline-flex; gap: 4px; background: #e9eef7; padding: 4px; border-radius: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.ts-tabs a, .ts-tabs button { border: 0; background: none; padding: 8px 16px; border-radius: 9px; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--t-muted); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.ts-tabs a.on, .ts-tabs button.on { background: #fff; color: var(--t-ink); box-shadow: 0 2px 8px rgba(6, 64, 42, .08); }
.ts-tabs .n { background: #dfe6f3; color: var(--t-ink); border-radius: 999px; padding: 0 8px; font-size: 12px; }
.ts-tabs a.on .n { background: var(--t-blue); color: #fff; }

.ts-form .ts-label, .ts-label { display: block; font-size: 13.5px; font-weight: 700; color: var(--t-ink); margin-bottom: 6px; }
.ts-label .req { color: #d6293b; }
.ts-form .form-control, .ts-form .form-select, .ts-input { border: 1.5px solid var(--t-line-2); border-radius: 9px; min-height: 44px; font-size: 15px; color: var(--t-ink); }
.ts-form textarea.form-control { min-height: 90px; }
.ts-form .form-control:focus, .ts-form .form-select:focus, .ts-input:focus { border-color: var(--t-blue); box-shadow: 0 0 0 4px rgba(14, 122, 70, .13); }
.ts-hint { font-size: 12.5px; color: var(--t-muted); margin-top: 4px; }
.ts-fieldset { border: 1px solid var(--t-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; }
.ts-fieldset legend { float: none; width: auto; font-size: 14px; font-weight: 800; padding: 0 6px; margin: 0; color: #18205a; }

.ts-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ts-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.ts-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--t-muted); font-weight: 700; padding: 10px 10px; border-bottom: 1.5px solid var(--t-line); text-align: left; white-space: nowrap; background: #fbfcfe; }
.ts-table td { padding: 10px 10px; border-bottom: 1px solid #eef2f8; vertical-align: middle; }
.ts-table tbody tr:hover td { background: #fafcff; }
.ts-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.ts-table .ctr { text-align: center; }
.ts-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ts-person .av { width: 36px; height: 36px; border-radius: 50%; background: #ebf7f1; color: var(--t-navy-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.ts-person b { display: block; font-size: 14.5px; }
.ts-person small { display: block; color: var(--t-muted); font-size: 12.5px; }

.ts-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ts-stat { background: #fff; border: 1px solid var(--t-line); border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 12px; box-shadow: var(--t-shadow); }
.ts-stat .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--soft2); color: var(--strong); display: grid; place-items: center; font-size: 20px; flex: 0 0 auto; }
.ts-stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.ts-stat span { font-size: 12.5px; color: var(--t-muted); }

/* Cartes de classes (page Mes classes) */
.ts-class-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.ts-class { background: #fff; border: 1px solid var(--t-line); border-radius: var(--t-radius); padding: 16px; box-shadow: var(--t-shadow); display: flex; flex-direction: column; gap: 12px; border-top: 4px solid var(--c); }
.ts-class-top { display: flex; align-items: center; gap: 14px; }
.ts-class-top h3 { margin: 0; font-size: 18px; font-weight: 800; }
.ts-class-top small { color: var(--t-muted); font-size: 13px; }
.ts-class-meta { display: flex; gap: 16px; font-size: 13.5px; color: var(--t-muted); flex-wrap: wrap; }
.ts-class-meta b { color: var(--t-ink); }
.ts-class-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }

/* Appel */
.ts-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.ts-chips a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--t-line-2); background: #fff; color: var(--t-ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.ts-chips a .b { width: 26px; height: 22px; border-radius: 6px; background: var(--c); color: #fff; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; }
.ts-chips a.on { border-color: var(--c); background: var(--soft); }
.ts-roll { list-style: none; margin: 0; padding: 0; }
.ts-roll li { display: grid; grid-template-columns: 34px minmax(160px, 1fr) auto minmax(0, 220px); align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid #eef2f8; }
.ts-roll li.is-abs { background: #fff6f7; }
.ts-roll li.is-ret { background: #fffaf0; }
.ts-roll li.is-per { background: #f4f8ff; }
.ts-roll .n { font-size: 12.5px; color: var(--t-muted); text-align: right; }
.ts-seg { display: inline-flex; border: 1.5px solid var(--t-line-2); border-radius: 10px; overflow: hidden; background: #fff; }
.ts-seg label { margin: 0; position: relative; }
.ts-seg input { position: absolute; opacity: 0; pointer-events: none; }
.ts-seg span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13.5px; font-weight: 600; color: var(--t-muted); cursor: pointer; border-left: 1px solid var(--t-line); user-select: none; }
.ts-seg label:first-child span { border-left: 0; }
.ts-seg input:focus-visible + span { outline: 3px solid rgba(14, 122, 70, .4); outline-offset: -3px; }
.ts-seg input:checked + span.p { background: #22b35e; color: #fff; }
.ts-seg input:checked + span.a { background: #e5303f; color: #fff; }
.ts-seg input:checked + span.r { background: #f0a01b; color: #fff; }
.ts-seg input:checked + span.e { background: #0e7a46; color: #fff; }
.ts-roll .motif { min-height: 38px; font-size: 13.5px; }
.ts-roll li.is-pre .motif { visibility: hidden; }
.ts-rollbar { position: sticky; bottom: 0; z-index: 5; background: rgba(255, 255, 255, .96); backdrop-filter: blur(6px); border-top: 1px solid var(--t-line); margin: 0 -16px -14px; padding: 12px 16px; border-radius: 0 0 var(--t-radius) var(--t-radius); display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.ts-counts { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.ts-counts span { padding: 4px 10px; border-radius: 999px; font-weight: 700; }
.ts-counts .p { background: #dcf5e5; color: #127a3c; }
.ts-counts .a { background: #fde2e4; color: #c0182b; }
.ts-counts .r { background: #fdf0c9; color: #915400; }
.ts-counts .e { background: #ebf7f1; color: #0a6236; }

/* Notes */
.ts-note { width: 92px; text-align: center; font-weight: 700; font-size: 15px; border: 1.5px solid var(--t-line-2); border-radius: 8px; min-height: 40px; padding: 4px 6px; }
.ts-note:focus { border-color: var(--t-blue); outline: 0; box-shadow: 0 0 0 4px rgba(14, 122, 70, .13); }
.ts-note.is-bad { border-color: #dc3545; background: #fff5f6; }
.ts-note[readonly] { background: #f5f7fb; border-color: #e3e9f4; }
.ts-obs { min-height: 40px; font-size: 13.5px; }
.ts-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.ts-steps span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #eef2f8; color: var(--t-muted); font-weight: 600; }
.ts-steps span.on { background: var(--t-blue); color: #fff; }
.ts-steps span.done { background: #dcf5e5; color: #127a3c; }
.ts-steps span.bad { background: #fde2e4; color: #c0182b; }
.ts-steps i.sep { color: #b3c0d8; }
.ts-lock { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; background: #f1f5fb; border: 1px dashed #cde3d8; font-size: 14px; color: #33416a; }
.ts-lock i { font-size: 22px; color: var(--t-navy-2); }

/* Timeline (progression, historique) */
.ts-timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.ts-timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: #e1e8f3; }
.ts-timeline li { position: relative; padding: 0 0 14px 14px; }
.ts-timeline li::before { content: ""; position: absolute; left: -17px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--t-blue); }
.ts-timeline li b { display: block; font-size: 14.5px; }
.ts-timeline li small { color: var(--t-muted); font-size: 12.5px; }
.ts-timeline li p { margin: 2px 0 0; font-size: 13.5px; color: #3a4769; }
.ts-prog { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 16px; align-items: center; }
.ts-ring { --p: 0; width: 76px; height: 76px; border-radius: 50%; background: conic-gradient(var(--t-blue) calc(var(--p) * 1%), #e3e8f2 0); display: grid; place-items: center; flex: 0 0 auto; }
.ts-ring b { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 16px; font-weight: 800; }

/* Profil / CV */
.ts-profile { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ts-profile .ph { width: 96px; height: 96px; border-radius: 50%; background: linear-gradient(135deg, #183d2a, #142763); color: #fff; font-size: 34px; font-weight: 800; display: grid; place-items: center; overflow: hidden; flex: 0 0 auto; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #e0f3ea; }
.ts-profile .ph img { width: 100%; height: 100%; object-fit: cover; }
.ts-profile h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ts-kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px 14px; font-size: 14.5px; margin: 0; }
.ts-kv dt { color: var(--t-muted); font-weight: 600; }
.ts-kv dd { margin: 0; font-weight: 600; color: var(--t-ink); }
.ts-repeat-row { display: grid; gap: 8px; align-items: start; margin-bottom: 8px; }
.ts-repeat-row .rm { border: 0; background: #fdecee; color: #c0182b; border-radius: 8px; width: 40px; height: 44px; }
.ts-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ts-tags span { background: #eef6f0; color: #0a6236; border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }

/* Messagerie partagée dans la coquille */
.ts-main .cm-head h1 { font-size: 30px !important; font-weight: 800; letter-spacing: -.03em; color: #121a4d; }

/* 7. Responsive ----------------------------------------------------------- */
@media (max-width: 1500px) {
    .ts-hello h1 { font-size: 44px; }
    .ts-kpi .vl { font-size: 38px; }
    .ts-kpi .ic { width: 54px; height: 54px; font-size: 26px; }
    .ts-top .tb-l1 { font-size: 30px; }
    .ts-top .tb-l2 { font-size: 18px; }
    .ts-campus { font-size: 15.5px; }
    .ts-classes li { grid-template-columns: 46px minmax(0, 1fr) auto 28px auto; gap: 10px; }
    .ts-cbadge { width: 46px; height: 42px; font-size: 18px; }
    .ts-btn-soft { padding: 7px 10px; font-size: 14px; }
}
@media (max-width: 1280px) {
    .ts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-row--main, .ts-row--side { grid-template-columns: minmax(0, 1fr); }
    .ts-row--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ts-attention { grid-template-columns: 54px minmax(0, 1fr) auto 32px; }
    .ts-attention .hd { display: none; }
    .ts-user-tx { display: none; }
    .tl-stage-in { grid-template-columns: minmax(0, 1fr) 480px; }
}
@media (max-width: 1100px) {
    .ts-campus .tx { display: none; }
    .ts-campus { height: 48px; padding: 0 12px; }
}
@media (max-width: 991.98px) {
    .ts-top { height: 74px; padding: 0 14px; gap: 12px; }
    .ts-top .tb-mark { height: 56px; }
    .ts-top .tb-l1 { font-size: 22px; }
    .ts-top .tb-l2 { font-size: 13px; }
    .ts-top .tb-l3 { display: none; }
    .ts-campus-wrap { margin: 0 0 0 auto; }
    .ts-top-actions { gap: 8px; }
    .ts-vsep { display: none; }
    .ts-avatar { width: 44px; height: 44px; font-size: 17px; }
    .ts-wrap { display: block; min-height: 0; }
    .ts-side.offcanvas-lg { position: fixed; top: 0; height: 100%; width: 290px; padding-top: 0; }
    .ts-side .offcanvas-header { padding: 12px 16px; border-bottom: 1px solid var(--t-line); }
    .ts-side .offcanvas-header .tb-mark { height: 48px; }
    .ts-side .offcanvas-header .tb-l1 { font-size: 19px; }
    .ts-side .offcanvas-header .tb-l2 { font-size: 11px; }
    .ts-side .offcanvas-header .tb-l3 { display: none; }
    .ts-nav { padding: 14px 12px; }
    .ts-main { padding: 18px 14px 96px; }
    .ts-hello h1 { font-size: 34px; }
    .ts-hello p { font-size: 16px; }
    .ts-hello-meta { padding-bottom: 0; font-size: 14px; }
    .ts-hello-meta i.bi { font-size: 20px; margin-right: 8px; }
    .ts-page-h h1 { font-size: 26px; }
    .ts-tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1035; background: #fff; border-top: 1px solid var(--t-line); box-shadow: 0 -6px 20px rgba(6, 64, 42, .08); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
    .ts-tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none; color: var(--t-muted); font-size: 11.5px; font-weight: 600; padding: 4px 0; border-radius: 10px; }
    .ts-tabbar a i { font-size: 21px; }
    .ts-tabbar a.on { color: var(--t-blue); }
    .ts-edt { min-width: 620px; }
    .ts-card--edt { overflow-x: auto; }
    .ts-roll li { grid-template-columns: minmax(0, 1fr) auto; }
    .ts-roll li .n { display: none; }
    .ts-roll li .motif { grid-column: 1 / -1; }
    .ts-roll li.is-pre .motif { display: none; }
    .ts-prog { grid-template-columns: minmax(0, 1fr); }

    .tl-header-in { height: auto; padding: 10px 16px; flex-wrap: wrap; }
    .tl-header .tb-mark { height: 58px; }
    .tl-header .tb-l1 { font-size: 24px; }
    .tl-header .tb-l2 { font-size: 14px; }
    .tl-header .tb-l3 { font-size: 10px; }
    .tl-stage-in { grid-template-columns: minmax(0, 1fr); padding: 0 16px 90px; gap: 0; }
    .tl-photo { inset: 0 0 auto 0; height: 360px; background-position: 30% center; }
    .tl-photo::after { background: linear-gradient(180deg, rgba(255, 255, 255, .15) 0%, rgba(255, 255, 255, .55) 60%, #fff 100%); }
    .tl-hero { padding: 28px 4px 24px; min-height: 330px; display: flex; flex-direction: column; justify-content: flex-end; }
    .tl-headline { font-size: 40px; }
    .tl-lead { font-size: 17px; }
    .tl-card { max-width: 560px; width: 100%; margin: 0 auto; padding: 22px 20px; }
    .tl-env { position: static; margin-top: 14px; }
    .tl-footer { margin-top: -40px; }
    .tl-wave { height: 70px; }
    .tl-footer-in { padding: 0 16px 20px; }
}
@media (max-width: 640px) {
    .ts-kpis { grid-template-columns: minmax(0, 1fr); }
    .ts-row--3, .ts-row--2 { grid-template-columns: minmax(0, 1fr); }
    .ts-top .tb-word { display: none; }
    .ts-hello { flex-direction: column; align-items: flex-start; }
    .ts-hello-meta { flex-wrap: wrap; gap: 8px; }
    .ts-hello-meta .sep { display: none; }
    .ts-classes li { grid-template-columns: 44px minmax(0, 1fr) 28px; }
    .ts-classes li .ef { display: none; }
    .ts-classes li .ts-btn-soft { grid-column: 1 / -1; }
    .ts-attention { grid-template-columns: 1fr; text-align: left; }
    .ts-attention .ic { display: none; }
    .ts-attention .tx { border-left: 0; padding-left: 0; }
    .ts-attention .x { position: absolute; right: 8px; top: 8px; }
    .ts-attention { position: relative; }
    .ts-mini { width: 96px; }
    .ts-kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .ts-kv dd { margin-bottom: 8px; }
    .ts-notif { width: calc(100vw - 24px); }
    .tl-headline { font-size: 34px; }
    .tl-card-logo { width: 200px; }
    .tl-title { font-size: 26px; }
    .tl-sub { font-size: 16px; }
    .tl-options { font-size: 15px; }
    .tl-submit { font-size: 19px; height: 56px; }
    .tl-header .tb-word { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .ts-kpi, .ts-bar > span, .tl-submit { transition: none; }
}

/* RTL (arabe) */
[dir="rtl"] .ts-kpi .go { right: auto; left: 14px; }
[dir="rtl"] .ts-kpi .lb { padding-right: 0; padding-left: 30px; }
[dir="rtl"] .ts-side { border-right: 0; border-left: 1px solid #edf1f7; }
[dir="rtl"] .ts-attention .tx { border-left: 0; border-right: 2px solid #f2c24f; padding-left: 0; padding-right: 18px; }
[dir="rtl"] .bi-chevron-right, [dir="rtl"] .bi-arrow-right { transform: scaleX(-1); display: inline-block; }
[dir="rtl"] .ts-table th { text-align: right; }

/* 8. Impression ----------------------------------------------------------- */
@media print {
    .ts-top, .ts-side, .ts-tabbar, .ts-env-ribbon, .ts-flashes, .ts-attention .x, .no-print { display: none !important; }
    .ts-wrap { display: block; }
    .ts-main { padding: 0; }
    .ts-body { background: #fff; }
    .ts-card { box-shadow: none; break-inside: avoid; }
}

/* En-têtes des cartes compactes : titre et action sur une seule ligne */
.ts-row--3 .ts-card-h { flex-wrap: nowrap; }
.ts-row--3 .ts-card-h h2 { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-row--3 .ts-card-h h2 > i { flex: 0 0 auto; }

/* Code d'accès temporaire (remis par l'administration) — lien discret sous le bouton */
.tl-code { display: flex; justify-content: center; align-items: center; gap: .4rem; margin-top: .5rem; font-size: .84rem; color: #5b6b8c; text-decoration: none; }
.tl-code:hover { color: #18653e; text-decoration: underline; text-underline-offset: 3px; }
.tl-code:focus-visible { outline: 3px solid #18653e; outline-offset: 3px; border-radius: 6px; }
html[dir="rtl"] .tl-submit .bi-arrow-right { transform: scaleX(-1); display: inline-block; }

/* Marque de l'établissement (logo Al-Andalus dominant) — app/views/espace/_brand.php */
.tb-brand picture { display: block; }
.tb-word-school { align-items: flex-start; }
.tb-word-school .tb-l2 { font-size: 18px; letter-spacing: .04em; padding-left: 0; }
.tb-word-school .tb-l3::before { display: none; }
[dir="rtl"] .tb-word-school .tb-l2 { letter-spacing: 0; }
