/* ==========================================================================
   ISIS Hub — feuille de style unique
   - Aucune ressource externe, aucun style en ligne : tout passe par des classes.
   - Couleurs : uniquement des variables CSS (thèmes clair et sombre).
   - Mise en page : container queries « app » (remplacées par des media
     queries dans la version livrée, voir README).
   ========================================================================== */

/*@@FONT@@*/
@font-face {
  font-family: "Inter";
  src: url("fonts/InterVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/*@@ENDFONT@@*/

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
img, svg { display: block; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Tokens
   ========================================================================== */
.app {
  
  --font: "Inter", "InterVariable", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --r-xl: 22px; --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  --head-h: 64px;
  --hour: 56px;
  --gw: 44px;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --spring: cubic-bezier(.34, 1.36, .64, 1);
  --d-fast: 160ms; --d: 260ms; --d-slow: 520ms;

  /* Clair */
  --bg: #F5F4F0;
  --surface: #FFFFFF;
  --surface-2: #FAFAF8;
  --sunken: #EEEDE8;
  --thumb: #FFFFFF;
  --hover: rgba(30, 28, 20, .045);
  --press: rgba(30, 28, 20, .08);
  --line: rgba(30, 28, 20, .09);
  --line-2: rgba(30, 28, 20, .16);
  --text: #1D1C19;
  --text-2: #57544D;
  --text-3: #6F6C64;

  /* Accent ISIS (provisoire : à caler sur la charte) */
  --brand: #0B6E7F;
  --brand-hover: #085A68;
  --brand-ink: #FFFFFF;
  --brand-soft: #E2F1F3;
  --brand-ring: rgba(11, 110, 127, .28);
  --focus: #0B6E7F;

  --room-bg: #1D1C19;
  --room-ink: #FFFFFF;

  --cm: #1F4FD1;  --cm-soft: #EAF0FD;
  --td: #A9430A;  --td-soft: #FDF0E5;
  --tp: #6A2FC9;  --tp-soft: #F3ECFE;
  --exam: #B42318; --exam-ink: #FFFFFF; --exam-soft: #FDE9E7;
  --ok: #17803D;  --ok-soft: #E5F4EA;
  --err: #B42318; --err-soft: #FDECEA;

  --scrim: rgba(24, 22, 16, .34);
  --skel: #ECEBE6; --skel-hi: #F7F6F2;

  --shadow-1: 0 1px 1px rgba(25, 22, 10, .03), 0 2px 6px -2px rgba(25, 22, 10, .06);
  --shadow-2: 0 2px 4px rgba(25, 22, 10, .04), 0 14px 34px -14px rgba(25, 22, 10, .18);
  --shadow-3: 0 30px 80px -20px rgba(25, 22, 10, .32), 0 2px 6px rgba(25, 22, 10, .06);

  color-scheme: light;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--d) var(--ease), color var(--d) var(--ease);
}



/* ==========================================================================
   Primitives
   ========================================================================== */
.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.ic--xs { width: 14px; height: 14px; }
.ic--sm { width: 16px; height: 16px; }
.ic--lg { width: 22px; height: 22px; }
.ic--xl { width: 28px; height: 28px; stroke-width: 1.4; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--brand-ring); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text);
  font: 550 13.5px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--ease), box-shadow var(--d-fast);
}
.btn:hover { background: color-mix(in srgb, var(--surface), var(--text) 5%); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--brand); border-color: transparent; color: var(--brand-ink); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn--lg { height: 48px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn .ic { margin-inline: -2px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-arrow { transition: transform var(--d) var(--ease); }
a:hover > .btn-arrow, .btn:hover > .btn-arrow { transform: translate(2px, -2px); }

.icon-btn {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; padding: 0;
  border-radius: 10px; border: 1px solid transparent;
  background: transparent; color: var(--text-2);
  transition: background-color var(--d-fast), color var(--d-fast), transform var(--d-fast) var(--ease);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn[disabled] { opacity: .35; pointer-events: none; }
.icon-btn--outline { border-color: var(--line-2); background: var(--surface); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--sunken); color: var(--text-2);
  font: 600 11.5px/1 var(--font); letter-spacing: .01em; white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.chip--brand { background: var(--brand-soft); color: var(--brand); }
.chip--outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); }
.count {
  display: inline-grid; place-items: center;
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px;
  background: var(--brand); color: var(--brand-ink);
  font: 700 11.5px/1 var(--font); font-variant-numeric: tabular-nums;
}
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px;
  border-radius: 6px; border: 1px solid var(--line-2); background: var(--surface);
  font: 600 11px/1 var(--mono); color: var(--text-2);
}
.pill-note {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 550 12px/1 var(--font); color: var(--text-2); white-space: nowrap;
}

/* Contrôle segmenté */
.seg {
  position: relative; isolation: isolate;
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 3px; border-radius: 11px; background: var(--sunken);
}
.seg-btn {
  position: relative; z-index: 1;
  height: 30px; padding: 0 14px; border: 0; border-radius: 8px;
  background: transparent; color: var(--text-2);
  font: 550 13px/1 var(--font);
  transition: color var(--d) var(--ease);
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { color: var(--text); }
.seg-thumb {
  position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px;
  width: calc((100% - 6px) / 2); border-radius: 8px;
  background: var(--thumb); box-shadow: var(--shadow-1);
  transition: transform var(--d) var(--spring);
}
.seg[data-active="week"] .seg-thumb { transform: translateX(100%); }

/* Champs */
.field { display: grid; gap: 7px; }
.label { font: 550 13px/1.2 var(--font); color: var(--text); }
.hint { font: 400 12.5px/1.45 var(--font); color: var(--text-3); }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--text);
  font: 400 15px/1 var(--font);
  transition: border-color var(--d-fast), box-shadow var(--d) var(--ease), background-color var(--d-fast);
}
.input::placeholder { color: var(--text-3); }
.input:hover { border-color: color-mix(in srgb, var(--line-2), var(--text) 18%); }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.input[aria-invalid="true"] { border-color: var(--err); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .icon-btn { position: absolute; right: 6px; top: 6px; }

.check { position: relative; display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.check-box {
  position: relative; flex: none; width: 20px; height: 20px; margin-top: 1px;
  border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface);
  transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--spring);
}
.check-box::after {
  content: ""; position: absolute; left: 5.5px; top: 1.5px; width: 5px; height: 10px;
  border: solid var(--brand-ink); border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0); transition: transform var(--d) var(--spring);
}
.check input:checked + .check-box { background: var(--brand); border-color: var(--brand); }
.check input:checked + .check-box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check-box { outline: 2px solid var(--focus); outline-offset: 2px; }
.check-text { display: grid; gap: 2px; font: 500 14px/1.35 var(--font); }

.avatar {
  display: inline-grid; place-items: center; flex: none;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand);
  font: 650 12.5px/1 var(--font); letter-spacing: .02em;
}
.av-1 { background: var(--cm-soft); color: var(--cm); }
.av-2 { background: var(--td-soft); color: var(--td); }
.av-3 { background: var(--tp-soft); color: var(--tp); }
.av-4 { background: var(--brand-soft); color: var(--brand); }
.av-5 { background: var(--sunken); color: var(--text-2); }
.av-6 { background: var(--ok-soft); color: var(--ok); }

.alert {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: 12px;
  font: 550 13.5px/1.4 var(--font);
}
.alert--error { background: var(--err-soft); color: var(--err); animation: shake .42s var(--ease) both; }

.spinner {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}

.divider-v { width: 1px; height: 22px; background: var(--line-2); flex: none; }

/* Logo (marque ISIS Hub, originale) */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font: 680 16px/1 var(--font); letter-spacing: -.015em; white-space: nowrap;
}
.logo {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand); color: var(--brand-ink);
}
.logo svg { width: 18px; height: 18px; fill: currentColor; }
.logo .logo-dot { transform-origin: 14.5px 14.5px; animation: logoBeat 4s var(--ease-io) infinite; }
.logo--lg { width: 44px; height: 44px; border-radius: 13px; }
.logo--lg svg { width: 26px; height: 26px; }
.brand-name small {
  display: block; margin-top: 3px;
  font: 550 11px/1 var(--font); letter-spacing: .02em; color: var(--text-3);
}

/* ==========================================================================
   En-tête
   ========================================================================== */
.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 10px;
  height: var(--head-h); padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
}
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.top-date {
  display: flex; align-items: center; gap: 8px; margin-right: 8px;
  font: 550 13.5px/1 var(--font); color: var(--text-2); white-space: nowrap;
}
.top-date b { color: var(--text); font-weight: 650; }

.menu-anchor { position: relative; }
.promo-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 30px; padding: 0 8px 0 10px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--surface);
  font: 650 13px/1 var(--font); letter-spacing: .01em;
  transition: background-color var(--d-fast), border-color var(--d-fast);
}
.promo-btn:hover { border-color: color-mix(in srgb, var(--line-2), var(--text) 18%); }
.promo-btn .ic { color: var(--text-3); transition: transform var(--d) var(--ease); }
.promo-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.avatar-btn { padding: 0; border: 0; background: none; border-radius: 50%; margin-left: 6px; }
.avatar-btn .avatar { transition: box-shadow var(--d-fast); }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px var(--brand-ring); }

.menu {
  position: absolute; top: calc(100% + 8px); z-index: 60; min-width: 220px;
  padding: 6px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  transform-origin: top left; animation: pop var(--d) var(--spring) both;
}
.menu--right { right: 0; transform-origin: top right; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu-head b { display: block; font: 650 13.5px/1.3 var(--font); }
.menu-head span { font: 500 12px/1.3 var(--font); color: var(--text-3); }
.menu-label { padding: 6px 10px 4px; font: 600 11px/1 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 36px; padding: 0 10px; border: 0; border-radius: 9px;
  background: transparent; text-align: left; text-decoration: none;
  font: 550 13.5px/1 var(--font); color: var(--text);
}
.menu-item:hover { background: var(--hover); }
.menu-item[aria-checked="true"]::after {
  content: ""; margin-left: auto; width: 6px; height: 11px; transform: rotate(45deg) translate(-2px, -1px);
  border: solid var(--brand); border-width: 0 2px 2px 0;
}
.menu-item--danger { color: var(--err); }
.menu-item small { margin-left: 4px; font-weight: 500; color: var(--text-3); }

/* ==========================================================================
   Grille bento
   ========================================================================== */
.main { width: 100%; max-width: 1480px; margin: 0 auto; padding: 16px 24px 40px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-auto-rows: 64px; grid-auto-flow: row dense; gap: 16px; }
.bento > .tile { min-height: 0; overflow: hidden; grid-column: span 12; }
.tile--edt .cal { flex: 1; min-height: 0; overflow: auto; margin-right: -8px; padding: 0 8px 4px 0; overscroll-behavior: contain; scrollbar-width: thin; }
.tile--edt .cal-head { position: sticky; top: 0; z-index: 6; background: var(--surface); padding-bottom: 4px; margin-bottom: 2px; }
.tile--moodle .moodle-layout { flex: 1; min-height: 0; }
.moodle-list { display: flex; flex-direction: column; min-height: 0; max-height: 100%; }
.moodle-list .course-list { overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; }
.class-chip { height: 26px; padding: 0 10px; font-size: 12.5px; color: var(--text); }

.tile {
  position: relative; min-width: 0;
  display: flex; flex-direction: column;
  padding: 18px 20px 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-1);
  transition: box-shadow var(--d) var(--ease), opacity var(--d) var(--ease), transform var(--d-slow) var(--ease), filter var(--d) var(--ease);
}
.bento > .tile { animation: rise .6s var(--ease) both; }
.bento > .tile:nth-child(2) { animation-delay: 70ms; }
.bento > .tile:nth-child(3) { animation-delay: 140ms; }
.bento.is-ready > .tile { animation: none; }
.tile-ghost { visibility: hidden; }

.tile-head {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px;
  min-height: 36px; margin-bottom: 14px;
}
.tile-title { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.tile-title h2 { font: 680 16px/1.2 var(--font); letter-spacing: -.015em; white-space: nowrap; }
.tile-icon {
  display: grid; place-items: center; flex: none;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--sunken); color: var(--text-2);
}
.tile-link {
  display: inline-flex; align-items: center; gap: 4px;
  font: 550 13px/1 var(--font); color: var(--text-2); text-decoration: none;
  padding: 6px 8px; margin: -6px -8px -6px 0; border-radius: 8px;
}
.tile-link:hover { color: var(--text); background: var(--hover); }

/* ==========================================================================
   Emploi du temps
   ========================================================================== */
.tile--edt { --slot: calc(var(--hour) / 12); }
.edt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.nav-group { display: flex; align-items: center; gap: 2px; padding: 2px; border-radius: 11px; border: 1px solid var(--line); }
.nav-group .icon-btn { width: 32px; height: 32px; border-radius: 8px; }
.nav-group .btn { height: 32px; border-radius: 8px; }
.edt-date {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin: -4px 0 14px;
}
.edt-date h3 { font: 700 26px/1.1 var(--font); letter-spacing: -.025em; }
.edt-date span { font: 550 13.5px/1 var(--font); color: var(--text-3); }
.edt-date .when-week { display: none; }
.tile--edt[data-view="week"] .edt-date .when-day { display: none; }
.tile--edt[data-view="week"] .edt-date .when-week { display: inline; }

.daystrip { display: none; }

/* Maintenant / ensuite */
.nownext { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
.tile--edt[data-view="week"] .nownext { display: none; }
.nn {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px; min-width: 0;
  padding: 12px 14px; border-radius: 16px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.nn--now { background: var(--brand-soft); border-color: transparent; }
.nn-body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.nn-kicker {
  display: flex; align-items: center; gap: 8px;
  font: 650 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3);
}
.nn--now .nn-kicker { color: var(--brand); }
.nn-title { font: 620 14.5px/1.25 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nn-sub { font: 500 12.5px/1.3 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nn .room { height: 46px; padding: 0 14px; font-size: 21px; border-radius: 12px; }
.countdown {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  font: 650 11.5px/1 var(--font); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: 0; text-transform: none;
}
.bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--brand) 18%, transparent); overflow: hidden; margin-top: 6px; }
.bar-fill { display: block; height: 100%; width: var(--p, 0%); border-radius: inherit; background: var(--brand); animation: grow 1.1s var(--ease) both; transition: width 1s linear; }
.live-dot {
  position: relative; width: 8px; height: 8px; flex: none; border-radius: 50%;
  background: currentColor;
}
.live-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: currentColor; animation: ping 1.8s var(--ease) infinite;
}

/* Grille horaire */
.cal { position: relative; min-height: 0; }
.cal-head {
  display: grid; grid-template-columns: var(--gw) repeat(5, minmax(0, 1fr)); column-gap: 6px;
  margin-bottom: 6px;
}
.tile--edt[data-view="day"] .cal-head { display: none; }
.cal-dh {
  display: flex; align-items: baseline; justify-content: center; gap: 6px;
  height: 34px; padding-top: 8px; border-radius: 10px;
  font: 550 12.5px/1 var(--font); color: var(--text-3); text-transform: capitalize;
}
.cal-dh b { font: 680 15px/1 var(--font); color: var(--text); font-variant-numeric: tabular-nums; }
.cal-dh.is-today { color: var(--brand); }
.cal-dh.is-today b {
  display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 4px;
  margin-top: -6px; border-radius: 8px; background: var(--brand); color: var(--brand-ink);
}

.cal-body {
  position: relative;
  display: grid; grid-template-columns: var(--gw) repeat(5, minmax(0, 1fr)); column-gap: 6px;
  padding-top: 8px; touch-action: pan-y;
}
.tile--edt[data-view="day"] .cal-body { grid-template-columns: var(--gw) minmax(0, 1fr); }
.tile--edt[data-view="day"] .day-col:not(.is-active) { display: none; }

.cal-gutter, .day-col {
  display: grid; grid-template-rows: repeat(132, var(--slot)); grid-auto-rows: 0;
}
.hr {
  grid-column: 1; align-self: start; transform: translateY(-50%);
  padding-right: 10px; text-align: right;
  font: 550 11.5px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap;
}
.now-tag {
  grid-column: 1; align-self: start; justify-self: end; z-index: 3;
  transform: translateY(-50%); margin-right: 2px;
  padding: 3px 5px; border-radius: 6px;
  background: var(--brand); color: var(--brand-ink);
  font: 700 10.5px/1 var(--font); font-variant-numeric: tabular-nums;
}
.day-col {
  position: relative;
  grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 4px;
  border-radius: 12px;
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% var(--hour);
  box-shadow: inset 0 -1px 0 var(--line);
}
.tile--edt[data-view="week"] .day-col.is-today { background-color: color-mix(in srgb, var(--brand) 5%, transparent); }
.cal-anim { animation: calIn .42s var(--ease) backwards; }
.day-col.slide-from-right { animation: slideFromRight .34s var(--ease) both; }
.day-col.slide-from-left { animation: slideFromLeft .34s var(--ease) both; }

/* Ligne « maintenant » */
.nowline {
  grid-column: 1 / -1; align-self: start; z-index: 0; pointer-events: none;
  position: relative; height: 0; border-top: 2px solid var(--brand);
  transform: translateY(calc(var(--slot) * var(--m, 0) / 5 - 1px));
  transition: transform 1s linear;
}
.nowline::before {
  content: ""; position: absolute; left: -5px; top: -6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
  box-shadow: 0 0 0 3px var(--surface);
}
.nowline::after {
  content: ""; position: absolute; left: -5px; top: -6px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--brand);
  animation: ping 2s var(--ease) infinite;
}
.now-tag { transform: translateY(calc(var(--slot) * var(--m, 0) / 5 - 50%)); }
.m1 { --m: 1; } .m2 { --m: 2; } .m3 { --m: 3; } .m4 { --m: 4; }

/* Cours */
.ev {
  container: ev / size;
  grid-column: 1 / -1; position: relative; z-index: 1;
  margin: 1px 0; border-radius: 12px; overflow: hidden;
  background: var(--cm-soft); color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cm) 16%, transparent);
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease), opacity var(--d) var(--ease), filter var(--d) var(--ease);
}
.ev--td { background: var(--td-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--td) 16%, transparent); }
.ev--tp { background: var(--tp-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tp) 16%, transparent); }
.ev:hover { transform: translateY(-1px); z-index: 2; }
.lane-a { grid-column: 1; }
.lane-b { grid-column: 2; }
.ev.is-past { opacity: .5; filter: saturate(.5); }
.ev.is-past:hover, .ev.is-past:focus-within { opacity: 1; filter: none; }
.ev.is-now {
  z-index: 2;
  box-shadow: 0 0 0 2px var(--brand), 0 12px 30px -12px color-mix(in srgb, var(--brand) 60%, transparent);
  animation: breathe 3.2s var(--ease-io) infinite;
}
.ev-in { display: flex; flex-direction: column; gap: 5px; height: 100%; padding: 8px 9px; min-width: 0; }
.ev-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ev-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.room {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  height: 24px; padding: 0 8px 0 6px; border-radius: 7px;
  background: var(--surface); color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line-2), 0 1px 2px rgba(25, 22, 10, .06);
  font: 700 13px/1 var(--font); letter-spacing: .01em; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.room-pin { width: 13px; height: 13px; color: var(--cm); stroke-width: 2; }
.ev--td .room-pin { color: var(--td); } .ev--tp .room-pin { color: var(--tp); }
.ev-title {
  font: 620 13px/1.25 var(--font); color: var(--text);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
}
.ev-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
  font: 500 12px/1.35 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums;
}
.ev-meta .ic { width: 13px; height: 13px; margin-right: -4px; }
.ev-teacher { display: inline-flex; align-items: center; gap: 4px; }
.type {
  display: inline-grid; place-items: center; height: 19px; padding: 0 6px; border-radius: 5px;
  background: color-mix(in srgb, var(--cm) 14%, transparent); color: var(--cm);
  font: 750 11px/1 var(--font); letter-spacing: .05em;
}
.type--td { background: color-mix(in srgb, var(--td) 14%, transparent); color: var(--td); }
.type--tp { background: color-mix(in srgb, var(--tp) 14%, transparent); color: var(--tp); }
.exam {
  display: inline-flex; align-items: center; gap: 4px;
  height: 19px; padding: 0 7px; border-radius: 5px;
  background: var(--exam); color: var(--exam-ink);
  font: 750 11px/1 var(--font); letter-spacing: .03em;
}
.live {
  display: inline-flex; align-items: center; gap: 6px; height: 19px; padding: 0 7px; border-radius: 5px;
  background: var(--brand); color: var(--brand-ink); font: 700 11px/1 var(--font);
}
.ev-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; min-width: 0; }
.ev-moodle {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: -6px; padding: 3px 6px; border-radius: 6px;
  font: 600 12px/1 var(--font); color: var(--text-2); text-decoration: none; white-space: nowrap;
  transition: background-color var(--d-fast), color var(--d-fast);
}
.ev-moodle:hover { background: color-mix(in srgb, var(--text) 8%, transparent); color: var(--text); }
.ev-moodle .approx { font-weight: 750; color: var(--td); }
.ev .bar { margin-top: 0; flex: 1; max-width: 220px; }
.ev-title { flex-shrink: 0; }

/* Adaptation à la taille du cours */
@container ev (min-width: 330px) {
  .ev-in { flex-direction: row; align-items: stretch; gap: 14px; padding: 10px 12px; }
  .ev-in > .room { height: 30px; padding: 0 10px 0 8px; font-size: 15px; border-radius: 9px; align-self: flex-start; }
  .ev-main { flex: 1; gap: 5px; }
  .ev-title { font-size: 14.5px; -webkit-line-clamp: 1; }
  .ev-foot { margin-top: auto; }
}
@container ev (max-width: 329.98px) {
  .ev-in > .room { align-self: flex-start; }
}
@container ev (max-height: 84px) {
  .ev-in { gap: 3px; padding-block: 6px; }
  .ev-teacher, .ev-group { display: none; }
}
@container ev (max-height: 64px) {
  .ev-foot { display: none; }
}
@container ev (min-width: 330px) and (max-height: 84px) {
  .ev-in { align-items: center; padding-block: 6px; }
  .ev-in > .room { height: 26px; font-size: 13.5px; align-self: center; }
  .ev-main { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 8px; row-gap: 2px; align-content: center; }
  .ev-top { grid-row: 1; flex-wrap: nowrap; }
  .ev-title { grid-row: 1; grid-column: 2; align-self: center; }
  .ev-meta, .ev-foot { grid-column: 1 / -1; contain: inline-size; }
}
@container ev (max-width: 329.98px) and (max-height: 70px) {
  .ev-top, .ev-meta { display: none; }
  .ev-title { -webkit-line-clamp: 1; }
}
@container ev (max-width: 329.98px) and (max-height: 140px) {
  .ev-teacher, .ev-group, .ev-code { display: none; }
}
@container ev (max-width: 329.98px) and (max-height: 112px) {
  .ev-foot { display: none; }
}
@container ev (max-width: 170px) {
  .room { font-size: 12.5px; padding: 0 6px 0 5px; height: 22px; }
  .ev-title { font-size: 12.5px; }
  .ev-moodle-label { display: none; }
}

/* Plein écran */
.tile--edt .when-expanded { display: none; }
.tile--edt.is-expanded .when-expanded { display: inline-grid; }
.tile--edt.is-expanded .when-collapsed { display: none; }
.tile--edt.is-expanded {
  position: fixed; z-index: 40;
  top: calc(var(--head-h) + 8px); left: 24px; right: 24px; bottom: 24px;
  box-shadow: var(--shadow-3);
}
.tile--edt.is-expanded .cal { flex: 1; overflow: auto; --hour: max(52px, calc((100dvh - var(--head-h) - 200px) / 11)); }
.has-expanded .bento > .tile:not(.is-expanded) {
  opacity: 0; transform: translateY(18px) scale(.97); filter: blur(2px); pointer-events: none;
}
.has-overlay .bento > .tile, .has-overlay .dock { opacity: .0; transform: scale(.975); pointer-events: none; }

/* ==========================================================================
   Mails
   ========================================================================== */
.mail-list { margin: 0 -10px; overflow: auto; min-height: 0; overscroll-behavior: contain; scrollbar-width: thin; }
.mail-row {
  position: relative; width: 100%;
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto;
  grid-template-areas: "av from time" "av subj subj" "av prev prev";
  column-gap: 12px; row-gap: 1px;
  padding: 10px 10px 10px 14px; border: 0; border-radius: 12px;
  background: transparent; text-align: left;
  transition: background-color var(--d-fast), transform var(--d-fast) var(--ease);
}
.mail-row:hover { background: var(--hover); }
.mail-row:active { transform: scale(.995); }
.mail-row .avatar { grid-area: av; margin-top: 1px; }
.mail-from { grid-area: from; font: 520 13.5px/1.35 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-time { grid-area: time; padding-top: 2px; font: 500 12px/1.3 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.mail-subj { grid-area: subj; font: 520 13.5px/1.35 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-prev { grid-area: prev; font: 400 12.5px/1.4 var(--font); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row.is-unread .mail-from, .mail-row.is-unread .mail-subj { font-weight: 680; }
.mail-row.is-unread .mail-time { color: var(--brand); font-weight: 650; }
.mail-row.is-unread::before {
  content: ""; position: absolute; left: 3px; top: 22px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--brand);
}
.mail-row.is-opening { background: var(--hover); }

/* Lecteur de mail (plein écran dans le Hub) */
.reader {
  position: fixed; z-index: 45;
  top: calc(var(--head-h) + 8px); left: 24px; right: 24px; bottom: 24px;
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-3);
}
.reader-bar {
  display: flex; align-items: center; gap: 8px; flex: none;
  height: 60px; padding: 0 14px; border-bottom: 1px solid var(--line);
}
.reader-count { font: 550 13px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; margin: 0 4px; }
.reader-bar .spacer { flex: 1; }
.reader-scroll { flex: 1; overflow: auto; overscroll-behavior: contain; }
.reader-body { max-width: 760px; margin: 0 auto; padding: 36px 32px 64px; }
.reader-subject { font: 700 28px/1.2 var(--font); letter-spacing: -.025em; margin-bottom: 22px; }
.reader-meta {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px; row-gap: 2px; align-items: center;
  padding-bottom: 20px; margin-bottom: 26px; border-bottom: 1px solid var(--line);
}
.reader-meta .avatar { width: 44px; height: 44px; font-size: 14px; grid-row: span 2; }
.reader-from { font: 650 15px/1.3 var(--font); }
.reader-from span { font-weight: 450; color: var(--text-3); }
.reader-to { font: 500 13px/1.4 var(--font); color: var(--text-2); grid-column: 2; }
.reader-date { grid-column: 3; grid-row: 1; font: 500 13px/1.3 var(--font); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.reader-text { display: grid; gap: 14px; font: 400 15.5px/1.68 var(--font); color: var(--text); }
.reader-anim > * { animation: rise .5s var(--ease) both; }
.reader-anim > *:nth-child(2) { animation-delay: 60ms; }
.reader-anim > *:nth-child(3) { animation-delay: 120ms; }

/* ==========================================================================
   Moodle
   ========================================================================== */
.moodle-layout { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(0, 2.1fr); gap: 18px; align-items: start; }
.spotlight {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 10px; min-height: 196px;
  padding: 18px 18px 16px; border-radius: 18px;
  background: var(--brand); color: var(--brand-ink); text-decoration: none;
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease);
}
.spotlight:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--brand) 80%, transparent); }
.spotlight-deco { position: absolute; z-index: -1; right: -26px; bottom: -34px; width: 170px; height: 170px; fill: currentColor; opacity: .1; }
.spot-kicker {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  height: 28px; padding: 0 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--brand-ink) 14%, transparent);
  font: 620 12.5px/1 var(--font); font-variant-numeric: tabular-nums;
}
.spot-title { font: 700 20px/1.22 var(--font); letter-spacing: -.02em; }
.spot-meta { font: 500 12.5px/1.4 var(--font); }
.spot-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font: 650 13.5px/1 var(--font); }
.spot-auto { font: 500 11.5px/1.3 var(--font); }

.search {
  display: flex; align-items: center; gap: 10px;
  height: 42px; padding: 0 8px 0 12px; border-radius: 12px;
  background: var(--sunken); border: 1px solid transparent; color: var(--text-3);
  transition: background-color var(--d-fast), border-color var(--d-fast), box-shadow var(--d) var(--ease);
}
.search:focus-within { background: var(--surface); border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-ring); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; font: 450 14px/1 var(--font); color: var(--text); }
.search input::placeholder { color: var(--text-3); }
.course-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin: 10px -10px 0; }
.course {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px;
  padding: 8px 10px; border-radius: 12px; text-decoration: none;
  transition: background-color var(--d-fast);
}
.course:hover { background: var(--hover); }
.course-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--sunken); color: var(--text-2); }
.course.is-match .course-ic { background: var(--brand-soft); color: var(--brand); }
.course-name { display: block; font: 580 13.5px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-sub { display: block; font: 500 12px/1.35 var(--font); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course .btn-arrow { color: var(--text-3); }
.course:hover .btn-arrow { color: var(--text); transform: translate(2px, -2px); }
.course-empty { grid-column: 1 / -1; padding: 18px 10px; font: 500 13px/1.4 var(--font); color: var(--text-3); }

/* ==========================================================================
   Barre d'onglets téléphone
   ========================================================================== */
.dock { display: none; }

/* ==========================================================================
   Connexion
   ========================================================================== */
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); min-height: 100dvh; }
.auth-pane { display: flex; flex-direction: column; padding: 28px 40px; }
.auth-card { width: min(420px, 100%); margin: auto; display: grid; gap: 22px; padding: 40px 0; animation: rise .6s var(--ease) both; }
.auth-brand { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth h1 { font: 720 32px/1.1 var(--font); letter-spacing: -.03em; }
.auth-lead { margin-top: 8px; font: 400 15px/1.55 var(--font); color: var(--text-2); }
.auth-lead b { font-weight: 620; color: var(--text); }
.auth-form { display: grid; gap: 16px; }
.auth-foot { font: 450 12.5px/1.5 var(--font); color: var(--text-3); }
.auth-foot a { color: var(--text-2); text-underline-offset: 3px; }
.auth-foot a:hover { color: var(--text); }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

/* Démonstration « ce que voit le relais » */
.wire {
  display: grid; gap: 9px; padding: 12px 14px;
  border-radius: 14px; border: 1px dashed var(--line-2); background: var(--surface-2);
}
.wire-row { display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 12px; min-height: 24px; }
.wire-label { display: flex; align-items: center; gap: 6px; font: 550 12px/1.2 var(--font); color: var(--text-3); white-space: nowrap; }
.wire-typed { font: 650 15px/1 var(--mono); letter-spacing: .2em; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wire-typed.is-plain { letter-spacing: .02em; }
.wire-typed .caret { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -2px; background: var(--brand); animation: blink 1.1s steps(1) infinite; }
.hexrow {
  position: relative; overflow: hidden; white-space: nowrap;
  font: 500 12.5px/24px var(--mono); color: var(--text-2);
  -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent);
  mask-image: linear-gradient(90deg, #000 70%, transparent);
}
.hex-track { display: inline-flex; animation: hexdrift 22s linear infinite; }
.hex-track span { display: inline-block; width: 2.6ch; }
.hex-track .h { color: var(--brand); font-weight: 650; }
.hex-track .flip { animation: byteflip .32s var(--ease) both; }
.wire-note { display: grid; gap: 4px; padding-top: 9px; border-top: 1px solid var(--line); font: 450 12px/1.45 var(--font); color: var(--text-3); }
.wire-note b { color: var(--text-2); font-weight: 620; }

/* Panneau « Comment c'est sécurisé » */
.sec-pane { padding: 16px; display: flex; }
.sec {
  container: sec / inline-size;
  flex: 1; display: flex; flex-direction: column; gap: 26px;
  padding: 36px 40px; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  animation: rise .7s .1s var(--ease) both;
}
.sec-kicker { display: inline-flex; align-items: center; gap: 8px; font: 650 12px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.sec h2 { margin-top: 12px; font: 720 26px/1.18 var(--font); letter-spacing: -.025em; max-width: 26ch; }
.sec-lead { margin-top: 10px; font: 400 14.5px/1.55 var(--font); color: var(--text-2); max-width: 60ch; }

.schema {
  container: schema / inline-size; overflow: hidden;
  position: relative; padding: 22px 18px 18px; border-radius: 20px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.sch-grid { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sch-node { position: relative; z-index: 2; display: grid; justify-items: center; gap: 8px; text-align: center; }
.sch-ic {
  position: relative; display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 17px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text);
  box-shadow: var(--shadow-1);
}
.sch-node--page .sch-ic { background: var(--brand); color: var(--brand-ink); border-color: transparent; }
.sch-node--cas .sch-ic { background: var(--room-bg); color: var(--room-ink); border-color: transparent; }
.sch-node--relay .sch-ic { border-style: dashed; }
.sch-badge {
  position: absolute; right: -7px; bottom: -7px; display: grid; place-items: center;
  width: 24px; height: 24px; border-radius: 8px; background: var(--surface); color: var(--ok);
  box-shadow: 0 0 0 1px var(--line-2);
}
.sch-name { font: 680 13.5px/1.25 var(--font); }
.sch-desc { font: 500 12px/1.35 var(--font); color: var(--text-3); }
.sch-track {
  position: absolute; z-index: 1; top: 22px; height: 12px;
  left: calc(100% / 6); right: calc(100% / 6); transform: translateY(22px);
  border-radius: 999px; background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 25%, transparent);
}
.sch-lane { position: absolute; inset: 0; animation: travelX 3.6s linear infinite; }
.sch-lane:nth-child(2) { animation-delay: -1.2s; }
.sch-lane:nth-child(3) { animation-delay: -2.4s; }
.pkt {
  position: absolute; left: 0; top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 4px;
  height: 18px; padding: 0 6px; border-radius: 6px;
  background: var(--brand); color: var(--brand-ink);
  font: 650 10px/1 var(--mono); white-space: nowrap;
  animation: pktFade 3.6s linear infinite; animation-delay: inherit;
}
.pkt .ic { width: 10px; height: 10px; stroke-width: 2.2; }
.sch-sees { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.sees { padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); }
.sees-title { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font: 650 12px/1 var(--font); color: var(--text-2); }
.sees--no .sees-title { color: var(--ok); }
.sees ul { display: flex; flex-wrap: wrap; gap: 5px; }
.sees li { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 6px; background: var(--sunken); font: 550 11.5px/1 var(--font); color: var(--text-2); }
.sees--no li { background: var(--ok-soft); color: var(--ok); }
.sch-cap { margin-top: 14px; font: 500 12.5px/1.45 var(--font); color: var(--text-2); text-align: center; }

@container schema (max-width: 459.98px) {
  .sch-grid { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-left: 0; }
  .sch-node { grid-template-columns: 56px minmax(0, 1fr); justify-items: start; align-items: center; column-gap: 14px; row-gap: 2px; text-align: left; }
  .sch-node .sch-ic { grid-row: span 2; }
  .sch-name { align-self: end; }
  .sch-desc { align-self: start; }
  .sch-track { top: 28px; bottom: 28px; left: 22px; right: auto; width: 12px; height: auto; transform: none; }
  .sch-lane { animation-name: travelY; }
  .pkt { left: 50%; top: 0; }
  .sch-sees { grid-template-columns: minmax(0, 1fr); }
}

.facts-list { display: grid; gap: 4px; }
.fact-item {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 14px; align-items: start;
  padding: 12px 10px; margin: 0 -10px; border-radius: 14px;
  transition: background-color var(--d-fast);
}
.fact-item:hover { background: var(--hover); }
.fact-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: var(--sunken); color: var(--text-2); }
.fact-item b { display: block; margin-bottom: 2px; font: 650 14px/1.35 var(--font); }
.fact-item p { font: 400 13.5px/1.55 var(--font); color: var(--text-2); }
.fact-item code, .fact code { font: 550 12.5px/1 var(--mono); color: var(--text); padding: 2px 5px; border-radius: 5px; background: var(--sunken); }
@container sec (min-width: 620px) {
  .facts-list { grid-template-columns: 1fr 1fr; column-gap: 18px; }
}
.sec-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* ==========================================================================
   Choix de la promo
   ========================================================================== */
.onb { min-height: 100dvh; display: flex; flex-direction: column; padding: 28px 40px; }
.onb-inner { width: min(1000px, 100%); margin: auto; display: grid; gap: 36px; padding: 32px 0 48px; }
.onb-head { display: grid; gap: 14px; max-width: 640px; animation: rise .6s var(--ease) both; }
.onb h1 { font: 760 52px/1.02 var(--font); letter-spacing: -.04em; }
.onb-lead { font: 400 16.5px/1.55 var(--font); color: var(--text-2); }
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; border: 0; padding: 0; margin: 0; min-width: 0; }
.promo-opt { position: relative; display: block; animation: rise .6s var(--ease) both; }
.promo-opt:nth-of-type(2) { animation-delay: 60ms; }
.promo-opt:nth-of-type(3) { animation-delay: 120ms; }
.promo-opt:nth-of-type(4) { animation-delay: 180ms; }
.promo-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.promo-card {
  container: promo / inline-size;
  position: relative; height: 100%;
  display: flex; flex-direction: column; gap: 6px; min-height: 236px;
  padding: 20px 20px 22px; border-radius: 24px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1);
  transition: transform var(--d) var(--ease), box-shadow var(--d) var(--ease), border-color var(--d) var(--ease), background-color var(--d) var(--ease);
  pointer-events: none;
}
.promo-num {
  font: 780 112px/.9 var(--font); letter-spacing: -.06em; color: var(--text);
  margin: 6px 0 auto -4px; font-variant-numeric: tabular-nums;
  transition: color var(--d) var(--ease), transform var(--d-slow) var(--spring);
}
.promo-name { font: 720 20px/1.1 var(--font); letter-spacing: -.02em; }
.promo-sub { font: 500 13px/1.4 var(--font); color: var(--text-3); }
.promo-tick {
  position: absolute; top: 18px; right: 18px; display: grid; place-items: center;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--line-2); color: transparent;
  transition: background-color var(--d) var(--ease), border-color var(--d) var(--ease), color var(--d) var(--ease), transform var(--d) var(--spring);
}
.promo-opt:hover .promo-card { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.promo-opt input:focus-visible + .promo-card { outline: 2px solid var(--focus); outline-offset: 3px; }
.promo-opt input:checked + .promo-card { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow-2); background: color-mix(in srgb, var(--surface), var(--brand) 4%); }
.promo-opt input:checked + .promo-card .promo-num { color: var(--brand); transform: translateY(-2px); }
.promo-opt input:checked + .promo-card .promo-tick { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: scale(1.06); }
.promo-soon {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 236px;
  padding: 20px; border-radius: 24px; border: 1.5px dashed var(--line-2);
  color: var(--text-3); animation: rise .6s .24s var(--ease) both;
}
.promo-soon .ic { margin-bottom: auto; }
.promo-soon b { font: 650 15px/1.2 var(--font); color: var(--text-2); }
.promo-soon span { font: 450 13px/1.4 var(--font); }
.onb-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; animation: rise .6s .28s var(--ease) both; }
.onb-note { display: inline-flex; align-items: center; gap: 8px; font: 500 13px/1.4 var(--font); color: var(--text-3); }

@container promo (max-width: 300px) {
  .promo-num { font-size: 96px; }
}

/* ==========================================================================
   Transparence (feuille modale)
   ========================================================================== */
.sheet {
  position: fixed; inset: 12px 12px 12px auto; z-index: 70;
  width: min(500px, calc(100% - 24px)); height: auto; max-width: none; max-height: none;
  margin: 0; padding: 0; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 24px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-3);
}
dialog.sheet:not([open]) { display: none; }
.sheet::backdrop { background: rgba(24, 22, 16, .34); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.sheet.is-entering { animation: sheetInRight .42s var(--ease) both; }
.sheet.is-leaving { animation: sheetOutRight .26s var(--ease-io) both; }
.scrim { position: fixed; inset: 0; z-index: 65; background: var(--scrim); animation: fade .3s var(--ease) both; }
.sheet-grab { display: none; }
.sheet-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 18px; border-bottom: 1px solid var(--line); }
.sheet-head .tile-icon { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.sheet-head h2 { font: 720 20px/1.2 var(--font); letter-spacing: -.02em; }
.sheet-head p { margin-top: 3px; font: 450 13.5px/1.45 var(--font); color: var(--text-2); }
.sheet-head .icon-btn { margin: -4px -6px 0 auto; }
.sheet-body { flex: 1; overflow: auto; padding: 10px 22px 26px; overscroll-behavior: contain; }
.sheet-section { padding-top: 18px; }
.sheet-section + .sheet-section { margin-top: 8px; border-top: 1px solid var(--line); }
.sheet-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.sheet-section h3 { font: 650 12px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }

.facts { display: grid; }
.fact {
  display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 12px; align-items: baseline;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.fact:last-child { border-bottom: 0; }
.fact dt { display: flex; align-items: center; gap: 8px; font: 550 13px/1.4 var(--font); color: var(--text-3); }
.fact dt .ic { width: 15px; height: 15px; }
.fact dd { font: 550 13.5px/1.5 var(--font); color: var(--text); min-width: 0; }
.fact dd small { display: block; font-weight: 450; color: var(--text-3); font-size: 12.5px; }
.hosts { display: flex; flex-wrap: wrap; gap: 5px; }
.host { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 7px; background: var(--sunken); font: 550 12px/1 var(--mono); }
.host::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.stat { font-variant-numeric: tabular-nums; font-weight: 700; }

.checks { display: grid; gap: 2px; counter-reset: chk; }
.chk {
  display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start;
  padding: 9px 10px; margin: 0 -10px; border-radius: 12px;
  transition: background-color var(--d) var(--ease);
}
.chk b { display: block; font: 600 13.5px/1.4 var(--font); }
.chk span { display: block; font: 450 12.5px/1.45 var(--font); color: var(--text-3); }
.chk-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1.5px dashed var(--line-2); color: var(--text-3); }
.chk-ic svg { width: 14px; height: 14px; stroke-width: 2.4; }
.chk-ic .spinner { width: 14px; height: 14px; color: var(--brand); }
.chk.is-running { background: var(--hover); }
.chk.is-running .chk-ic { border-color: transparent; }
.chk.is-ok .chk-ic { border: 0; background: var(--ok); color: var(--surface); animation: popIn .36s var(--spring) both; }
.chk.is-ok .chk-ic path { stroke-dasharray: 24; animation: draw .4s .1s var(--ease) both; }
.chk.is-fail { background: var(--err-soft); }
.chk.is-fail .chk-ic { border: 0; background: var(--err); color: var(--surface); animation: popIn .36s var(--spring) both; }
.chk.is-fail span { color: var(--err); }
.chk-summary { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--ok-soft); color: var(--ok); font: 600 13px/1.4 var(--font); }
.chk-summary--fail { background: var(--err-soft); color: var(--err); }

.fingerprint {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--sunken);
}
.fingerprint code { flex: 1; min-width: 0; font: 550 12.5px/1.6 var(--mono); color: var(--text); word-break: break-all; }
.files { display: grid; margin-top: 10px; }
.file-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); font: 500 12.5px/1.3 var(--font); color: var(--text-2); }
.file-row:last-child { border-bottom: 0; }
.file-row code { font: 500 12px/1 var(--mono); color: var(--text-3); }
.sheet-foot-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 12px; font: 600 13px/1 var(--font); color: var(--brand); text-decoration: none; }
.sheet-foot-link:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   États : squelettes, vides, erreurs
   ========================================================================== */
.skel {
  display: block; border-radius: 8px;
  background: linear-gradient(90deg, var(--skel) 0%, var(--skel-hi) 50%, var(--skel) 100%);
  background-size: 200% 100%; animation: shimmer 1.6s linear infinite;
}
.skel--title { width: 140px; height: 18px; }
.skel--line { height: 12px; }
.skel--room { width: 64px; height: 44px; border-radius: 11px; }
.skel--av { width: 34px; height: 34px; border-radius: 50%; }
.skel--block { height: 100%; border-radius: 12px; }
.w-30 { width: 30%; } .w-40 { width: 40%; } .w-50 { width: 50%; } .w-60 { width: 60%; } .w-70 { width: 70%; } .w-80 { width: 80%; } .w-90 { width: 90%; }
.skel-ev { display: flex; gap: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.skel-ev > div { flex: 1; display: grid; gap: 8px; align-content: center; }
.skel-stack { display: grid; gap: 10px; }
.skel-mail { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding: 10px 0; }
.skel-mail > div { display: grid; gap: 7px; }
.skel-day { height: 380px; display: grid; grid-template-rows: 100px 70px 120px; gap: 14px; padding-left: 50px; position: relative; }

.empty {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  gap: 10px; padding: 36px 20px; border-radius: 16px;
  background: var(--surface-2); border: 1px dashed var(--line-2);
}
.empty-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-1); color: var(--text-2); margin-bottom: 4px; }
.empty--brand .empty-ic { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.empty--err { background: var(--err-soft); border-color: transparent; }
.empty--err .empty-ic { background: var(--surface); color: var(--err); }
.empty h3 { font: 680 16px/1.3 var(--font); letter-spacing: -.01em; }
.empty p { max-width: 36ch; font: 450 13.5px/1.5 var(--font); color: var(--text-2); }
.empty .btn { margin-top: 6px; }
.next-up {
  display: flex; align-items: center; gap: 12px; margin-top: 8px; padding: 10px 12px 10px 10px;
  border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left;
}
.next-up .room { height: 30px; font-size: 15px; }
.next-up > div > b { display: block; font: 620 13.5px/1.3 var(--font); }
.next-up > div > span { display: block; font: 500 12.5px/1.3 var(--font); color: var(--text-3); }
.port-err-host { font: 550 12px/1 var(--mono); color: var(--err); }

/* Planche d'états */
.states { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 28px 16px; }
.state { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.state-label { display: flex; align-items: center; gap: 8px; font: 650 12px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.state-label .chip { text-transform: none; letter-spacing: 0; }
.state > .tile { flex: 1; animation: none; }
.span-4 { grid-column: span 4; } .span-6 { grid-column: span 6; } .span-8 { grid-column: span 8; } .span-12 { grid-column: 1 / -1; }
.state-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 8px 0 22px; }
.page-head h1 { font: 740 30px/1.1 var(--font); letter-spacing: -.03em; }
.page-head p { margin-top: 6px; font: 450 14.5px/1.5 var(--font); color: var(--text-2); }

.tile-min { min-height: 360px; }

/* ==========================================================================
   Tablette
   ========================================================================== */
@media (max-width: 1179.98px) {
  .moodle-layout { grid-template-columns: minmax(0, 1fr); }
  .spotlight { min-height: 0; }
  .course-list { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-card { padding: 24px 0 8px; }
  .sec-pane { padding: 0 16px 16px; }
  .top-date .hide-md { display: none; }
  .span-4 { grid-column: span 6; } .span-8 { grid-column: 1 / -1; }
}


/* ==========================================================================
   Téléphone (dès 360 px)
   ========================================================================== */
@media (max-width: 759.98px) {
  .top { padding: 0 12px; gap: 8px; --head-h: 58px; height: 58px; }
  .brand .brand-name { display: none; }
  .top-date, .top-right .divider-v, .label-md { display: none; }
  .btn, .icon-btn { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .seg-btn { height: 38px; }
  .avatar-btn { margin-left: 2px; }

  .main { padding: 10px 12px 96px; }
  .bento { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; gap: 12px; }
  .bento > .tile { grid-column: 1 / -1; overflow: visible; }
  .tile--edt .cal, .moodle-list .course-list { overflow: visible; margin-right: 0; padding-right: 0; }
  .tile--edt .cal-head { position: static; }
  .bento > .tile.is-collapsed > :not(.tile-head):not(.tile-edit) { display: none; }
  .bento > .tile.is-collapsed .tile-head { margin-bottom: 0; }
  .is-editing .tile-edit { position: static; order: -1; transform: none; width: 100%; margin: -2px 0 12px; justify-content: flex-start; box-shadow: none; border: 0; background: var(--sunken); }
  .is-editing .edit-grip, .is-editing .edit-dim, .is-editing .edit-sep, .is-editing .resize-handle { display: none; }
  .is-editing .edit-fold { display: inline-flex; margin-left: auto; }
  .ic-d { display: none; } .ic-m { display: inline; }
  .eb-d { display: none; } .eb-m { display: inline; }
  .editbar { padding: 8px 12px 0; }
  .editbar-in { flex-wrap: wrap; }
  .editbar-text { flex-basis: calc(100% - 50px); }
  .journey { padding: 22px 16px; }
  .tile { padding: 16px 14px 16px; border-radius: 20px; }
  .tile--mail { max-height: none; }
  .mail-list { margin: 0 -6px; }

  .edt-tools .seg, .edt-tools [data-expand], .edt-tools .nav-group .btn { display: none; }
  .nav-group { border: 0; padding: 0; }
  .edt-date { margin-bottom: 10px; }
  .edt-date h3 { font-size: 22px; }
  .daystrip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin: 0 0 14px; }
  .ds-btn {
    display: grid; justify-items: center; gap: 4px; padding: 8px 0 9px;
    border: 0; border-radius: 12px; background: var(--sunken); color: var(--text-2);
    font: 600 11px/1 var(--font); text-transform: uppercase; letter-spacing: .05em;
    transition: background-color var(--d) var(--ease), color var(--d) var(--ease), transform var(--d-fast) var(--ease);
  }
  .ds-btn b { font: 700 17px/1 var(--font); letter-spacing: -.01em; text-transform: none; color: var(--text); font-variant-numeric: tabular-nums; }
  .ds-btn i { width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); font-style: normal; }
  .ds-btn.is-today i { background: var(--brand); }
  .ds-btn[aria-pressed="true"] { background: var(--text); color: var(--bg); }
  .ds-btn[aria-pressed="true"] b { color: var(--bg); }
  .ds-btn:active { transform: scale(.96); }
  .nownext { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .nn .room { height: 42px; font-size: 19px; }
  .moodle-layout { gap: 12px; }
  .spot-title { font-size: 18px; }

  .reader { top: 58px; left: 0; right: 0; bottom: 0; border-radius: 22px 22px 0 0; }
  .reader-bar { height: 56px; padding: 0 6px; }
  .reader-body { padding: 24px 18px 48px; }
  .reader-subject { font-size: 22px; }
  .reader-meta { grid-template-columns: 40px minmax(0, 1fr); }
  .reader-meta .avatar { width: 40px; height: 40px; }
  .reader-date { grid-column: 2; grid-row: auto; }
  .reader-bar .btn .label-md { display: none; }

  .dock {
    position: sticky; bottom: 14px; z-index: 25;
    display: flex; justify-content: space-around; gap: 4px;
    width: fit-content; margin: 18px auto 0; padding: 5px;
    border-radius: 999px; border: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
    box-shadow: var(--shadow-2);
    transition: opacity var(--d) var(--ease), transform var(--d) var(--ease);
  }
  .dock a {
    display: flex; align-items: center; gap: 7px; height: 44px; padding: 0 16px; border-radius: 999px;
    font: 620 13px/1 var(--font); color: var(--text-2); text-decoration: none;
    transition: background-color var(--d-fast), color var(--d-fast);
  }
  .dock a[aria-current="true"] { background: var(--text); color: var(--bg); }

  .auth-pane { padding: 18px 18px 8px; }
  .auth-card { gap: 20px; padding: 26px 0 10px; }
  .auth h1 { font-size: 28px; }
  .sec-pane { padding: 0 10px 12px; }
  .sec { padding: 24px 18px; border-radius: 24px; gap: 22px; }
  .sec h2 { font-size: 22px; }
  .wire-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }

  .onb { padding: 18px 18px 24px; }
  .onb-inner { gap: 26px; padding: 20px 0 16px; }
  .onb h1 { font-size: 38px; }
  .onb-lead { font-size: 15px; }
  .promo-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .promo-card { min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 18px; row-gap: 4px; align-items: center; padding: 16px 18px; border-radius: 20px; }
  .promo-num { grid-row: span 2; margin: 0; font-size: 64px; }
  .promo-name { align-self: end; }
  .promo-sub { align-self: start; }
  .promo-tick { top: 50%; right: 16px; margin-top: -14px; }
  .promo-soon { min-height: 0; flex-direction: row; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 20px; }
  .promo-soon .ic { margin: 0; }
  .onb-actions .btn { width: 100%; }

  .sheet { inset: auto 0 0 0; width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; border-bottom: 0; }
  .sheet.is-entering { animation-name: sheetInUp; }
  .sheet.is-leaving { animation-name: sheetOutDown; }
  .sheet-grab { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line-2); }
  .sheet-head { padding: 12px 18px 14px; }
  .sheet-body { padding: 6px 18px 28px; }
  .fact { grid-template-columns: minmax(0, 1fr); gap: 3px; }

  .states { gap: 22px; }
  .span-4, .span-6, .span-8 { grid-column: 1 / -1; }
  .page-head h1 { font-size: 24px; }
}

@media (max-width: 400px) {
  .ev-in > .room { font-size: 14px; }
  .nn { padding: 10px 12px; gap: 12px; }
  .dock a { padding: 0 13px; }
  .dock a span { font-size: 12.5px; }
}

/* ==========================================================================
   Maquettes statiques (canevas) : overlays dans le flux, pas d'entrée animée
   ========================================================================== */
.is-static .tile-edit, .is-static .editbar, .is-static .bento > .tile, .is-static .auth-card, .is-static .sec, .is-static .onb-head,
.is-static .promo-opt, .is-static .promo-soon, .is-static .onb-actions, .is-static .reader-anim > * { animation: none; }
.is-static.frame-phone { width: 390px; min-height: 844px; }
.is-static .reader { position: relative; inset: auto; min-height: 820px; }
.is-static.frame-phone .reader { min-height: 900px; border-radius: 22px; }
.is-static .tile--edt.is-expanded { position: relative; inset: auto; }
.is-static .tile--edt.is-expanded .cal { --hour: 64px; overflow: visible; }
.focus-edt .area-mail, .focus-edt .area-moodle { display: none; }
.focus-edt .bento > .area-edt { grid-column: 1 / -1; grid-row: auto; overflow: visible; }
.focus-edt .bento > .area-edt .cal { overflow: visible; }
.is-static .sheet-layer { position: absolute; inset: 0; z-index: 60; }
.is-static .sheet-layer .scrim { position: absolute; }
.is-static .sheet-layer .sheet { position: absolute; }
.is-static .composer { position: relative; inset: auto; min-height: 860px; }
.is-static .app-body { position: relative; }
.is-static .dock { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); margin: 0; }


/* ==========================================================================
   Personnalisation du bento
   ========================================================================== */
.tile-edit, .resize-handle, .edit-fold, .ic-m, .eb-m { display: none; }
.ic-d, .ic-m { line-height: 0; }
.is-editing .bento > .tile {
  outline: 1.5px dashed color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: -1.5px;
  box-shadow: var(--shadow-2); animation: none;
}
.is-editing .bento > .tile > :not(.tile-edit):not(.resize-handle) {
  pointer-events: none; user-select: none; opacity: .5; filter: saturate(.6);
  transition: opacity var(--d) var(--ease), filter var(--d) var(--ease);
}
.is-editing .bento > .tile > .tile-head { opacity: .85; }
.is-editing .tile-edit {
  position: absolute; top: 12px; left: 50%; z-index: 7; transform: translateX(-50%);
  display: flex; align-items: center; gap: 2px; padding: 4px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  flex-wrap: wrap; justify-content: center; max-width: calc(100% - 24px);
  animation: fade .25s var(--ease) backwards;
}
.edit-grip {
  display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 10px;
  background: var(--sunken); color: var(--text-2); cursor: grab; touch-action: none;
}
.edit-grip:active { cursor: grabbing; }
.edit-grip .ic { stroke-width: 3; }
.edit-sep { width: 1px; height: 20px; margin: 0 4px; background: var(--line-2); }
.edit-dim { display: flex; align-items: center; gap: 2px; }
.edit-size { min-width: 56px; text-align: center; font: 650 12.5px/1 var(--font); font-variant-numeric: tabular-nums; color: var(--text); }
.is-editing .resize-handle {
  display: block; position: absolute; right: 4px; bottom: 4px; z-index: 7;
  width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px; background: transparent;
  cursor: nwse-resize; touch-action: none;
}
.resize-handle::before {
  content: ""; position: absolute; right: 8px; bottom: 8px; width: 13px; height: 13px;
  border-right: 3px solid var(--brand); border-bottom: 3px solid var(--brand); border-bottom-right-radius: 7px;
  transition: transform var(--d) var(--spring);
}
.resize-handle:hover::before { transform: translate(2px, 2px); }
.bento > .tile.is-dragging { z-index: 30; box-shadow: var(--shadow-3); outline-style: solid; transition: none; cursor: grabbing; }
.bento > .tile.is-resizing { outline-style: solid; outline-color: var(--brand); }

.editbar { position: sticky; top: var(--head-h); z-index: 28; padding: 12px 24px 0; animation: rise .35s var(--ease) both; }
.editbar-in {
  max-width: 1432px; margin: 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 10px 10px 10px 12px; border-radius: 16px;
  background: color-mix(in srgb, var(--brand-soft) 85%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.editbar .tile-icon { background: var(--brand); color: var(--brand-ink); }
.editbar-text { display: grid; gap: 1px; margin-right: auto; }
.editbar-text b { font: 680 14px/1.3 var(--font); }
.editbar-text span { font: 450 12.5px/1.4 var(--font); color: var(--text-2); }

@media (max-width: 759.98px) {
  .is-editing .tile-edit { position: static; order: -1; transform: none; width: 100%; margin: -2px 0 12px; justify-content: flex-start; box-shadow: none; border: 0; background: var(--sunken); }
  .is-editing .edit-grip, .is-editing .edit-dim, .is-editing .edit-sep, .is-editing .resize-handle { display: none; }
  .is-editing .edit-fold { display: inline-flex; margin-left: auto; }
  .ic-d { display: none; } .ic-m { display: inline; }
  .eb-d { display: none; } .eb-m { display: inline; }
  .editbar { padding: 8px 12px 0; }
  .editbar-in { flex-wrap: wrap; }
  .editbar-text { flex-basis: calc(100% - 50px); }
  .is-editing .bento > .tile > .tile-head { opacity: 1; filter: none; }
}
/* Semaine sans cours à l'école */
.week-note {
  grid-column: 2 / -1; grid-row: 1; z-index: 7; align-self: start; justify-self: center;
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  max-width: 380px; margin-top: 56px; padding: 26px 28px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: rise .4s var(--ease) both;
}
.week-note h3 { font: 680 17px/1.3 var(--font); }
.week-note p { font: 450 13.5px/1.5 var(--font); color: var(--text-2); }
.week-note .empty-ic { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.week-note[data-kind="company"] .wn-holiday, .week-note[data-kind="holiday"] .wn-company { display: none; }
.cal-body.week-in-right { animation: slideFromRight .36s var(--ease) both; }
.cal-body.week-in-left { animation: slideFromLeft .36s var(--ease) both; }

/* Mails : séparateurs et chargement de la suite */
.mail-sep {
  position: sticky; top: 0; z-index: 2; padding: 12px 14px 6px;
  font: 650 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--text-3);
  background: var(--surface);
}
.mail-more { padding: 0 10px 0 14px; }
.mail-more.is-end { padding: 16px 14px; font: 500 12.5px/1.4 var(--font); color: var(--text-3); text-align: center; }
.mail-row.is-new { animation: rise .45s var(--ease) both; }

/* ==========================================================================
   Connexion : tunnel scellé (une seule animation, 7 s en boucle)
   ========================================================================== */
.journey { container: journey / inline-size; padding: 30px 24px 22px; border-radius: 24px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.jr-stage { position: relative; display: grid; grid-template-columns: 92px minmax(0, 1fr) 92px; grid-template-rows: auto auto; column-gap: 6px; row-gap: 10px; align-items: center; }
.jr-end { position: relative; z-index: 3; display: grid; justify-items: center; gap: 8px; }
.jr-end b { font: 680 14px/1.2 var(--font); }
.jr-ic { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 22px; box-shadow: var(--shadow-1); }
.jr-you .jr-ic { background: var(--brand); color: var(--brand-ink); }
.jr-uni .jr-ic { background: var(--room-bg); color: var(--room-ink); }
.jr-ok { position: absolute; right: -7px; bottom: -7px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 3px var(--surface-2); opacity: 0; animation: jrOk 7s infinite; }
.jr-ok .ic { stroke-width: 2.6; }

.jr-tube {
  position: relative; z-index: 2; height: 54px; margin: 0 -10px; border-radius: 27px; overflow: hidden;
  background: var(--brand); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-ink) 18%, transparent), 0 10px 26px -14px var(--brand);
}
.jr-sheen { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--brand-ink) 22%, transparent) 50%, transparent 70%); background-size: 220% 100%; animation: jrSheen 2.6s linear infinite; }
.jr-lane { position: absolute; top: 0; bottom: 0; left: 66px; right: 66px; animation: jrMove 7s cubic-bezier(.55, 0, .35, 1) infinite; }
.jr-pkt { position: absolute; left: 0; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; height: 34px; min-width: 112px; padding: 0 12px; border-radius: 17px; background: var(--surface); color: var(--text); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .35); }
.jr-pkt > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font: 700 13px/1 var(--mono); }
.jr-plain { letter-spacing: .12em; animation: jrPlain 7s infinite; }
.jr-cipher { color: var(--brand); opacity: 0; animation: jrCipher 7s infinite; }
.jr-cipher .ic { stroke-width: 2.2; }
.jr-opened { color: var(--ok); font-family: var(--font) !important; opacity: 0; animation: jrOpened 7s infinite; }

.jr-relay { grid-column: 2; grid-row: 2; justify-self: center; position: relative; display: flex; align-items: center; gap: 12px; padding-top: 30px; }
.jr-link { position: absolute; left: 31px; top: 0; height: 30px; border-left: 2px dotted var(--line-2); }
.jr-beam { position: absolute; left: 31px; top: -6px; width: 70px; height: 40px; transform: translateX(-50%); clip-path: polygon(0 0, 100% 0, 60% 100%, 40% 100%); background: linear-gradient(to top, color-mix(in srgb, var(--text) 22%, transparent), transparent); opacity: 0; animation: jrBeam 7s infinite; }
.jr-ric { position: relative; display: grid; place-items: center; width: 62px; height: 62px; border-radius: 20px; background: var(--surface); border: 1.5px dashed var(--line-2); color: var(--text-2); }
.jr-ric > span { grid-area: 1 / 1; line-height: 0; }
.jr-eyeoff { opacity: 0; animation: jrEyeOff 7s infinite; color: var(--err); }
.jr-eye { animation: jrEye 7s infinite; }
.jr-rtxt { display: grid; gap: 3px; }
.jr-rtxt b { font: 680 14px/1.2 var(--font); }
.jr-sees { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font: 500 12.5px/1 var(--font); color: var(--text-3); }
.jr-sees code { white-space: nowrap; padding: 3px 6px; border-radius: 6px; background: var(--sunken); font: 600 12px/1 var(--mono); color: var(--text-2); }
.jr-sees em { font-style: normal; font-weight: 650; color: var(--err); opacity: 0; animation: jrEyeOff 7s infinite; }

.jr-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); counter-reset: none; }
.jr-steps li { display: flex; align-items: center; gap: 8px; font: 600 12.5px/1.3 var(--font); color: var(--text-3); }
.jr-steps i { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font: 700 11px/1 var(--font); font-style: normal; background: var(--sunken); color: var(--text-2); }
.jr-s1 { animation: jrS1 7s infinite; } .jr-s2 { animation: jrS2 7s infinite; } .jr-s3 { animation: jrS3 7s infinite; }
.jr-s1 i { animation: jrS1i 7s infinite; } .jr-s2 i { animation: jrS2i 7s infinite; } .jr-s3 i { animation: jrS3i 7s infinite; }

@container journey (max-width: 479.98px) {
  .jr-stage { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: auto 170px auto; row-gap: 0; }
  .jr-you { grid-column: 1; grid-row: 1; } .jr-uni { grid-column: 1; grid-row: 3; }
  .jr-tube { grid-column: 1; grid-row: 2; justify-self: center; width: 54px; height: auto; align-self: stretch; margin: 10px 0; }
  .jr-lane { left: 0; right: 0; top: 22px; bottom: 22px; animation-name: jrMoveY; }
  .jr-pkt { left: 50%; top: 0; min-width: 0; width: 46px; height: 46px; padding: 0; border-radius: 14px; }
  .jr-pkt > span { font-size: 0; letter-spacing: 0; }
  .jr-pkt > span::before { font: 700 12px/1 var(--mono); }
  .jr-plain::before { content: "••••"; } .jr-cipher span { display: none; } .jr-cipher .ic { width: 18px; height: 18px; }
  .jr-opened .ic { width: 18px; height: 18px; }
  .jr-relay { grid-column: 2; grid-row: 2; justify-self: start; padding: 0 0 0 26px; }
  .jr-link { left: 0; top: 50%; width: 26px; height: 0; border-left: 0; border-top: 2px dotted var(--line-2); }
  .jr-beam { left: -10px; top: 50%; width: 40px; height: 60px; transform: translateY(-50%); clip-path: polygon(0 0, 100% 40%, 100% 60%, 0 100%); background: linear-gradient(to left, color-mix(in srgb, var(--text) 22%, transparent), transparent); }
  .jr-steps { grid-template-columns: minmax(0, 1fr); }
}

@keyframes jrSheen { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes jrMove { 0%, 12% { transform: translateX(0); } 80%, 100% { transform: translateX(100%); } }
@keyframes jrMoveY { 0%, 12% { transform: translateY(0); } 80%, 100% { transform: translateY(100%); } }
@keyframes jrPlain { 0%, 10% { opacity: 1; filter: none; } 14%, 100% { opacity: 0; filter: blur(4px); } }
@keyframes jrCipher { 0%, 11% { opacity: 0; transform: scale(.8); } 15%, 81% { opacity: 1; transform: none; } 85%, 100% { opacity: 0; transform: scale(.8); } }
@keyframes jrOpened { 0%, 83% { opacity: 0; transform: scale(.8); } 87%, 96% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes jrOk { 0%, 84% { opacity: 0; transform: scale(.4); } 88%, 97% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes jrBeam { 0%, 34% { opacity: 0; } 40%, 60% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes jrEye { 0%, 40% { opacity: 1; } 44%, 62% { opacity: 0; } 66%, 100% { opacity: 1; } }
@keyframes jrEyeOff { 0%, 40% { opacity: 0; } 44%, 62% { opacity: 1; } 66%, 100% { opacity: 0; } }
@keyframes jrS1 { 0%, 34% { color: var(--text); } 38%, 100% { color: var(--text-3); } }
@keyframes jrS2 { 0%, 36% { color: var(--text-3); } 40%, 66% { color: var(--text); } 70%, 100% { color: var(--text-3); } }
@keyframes jrS3 { 0%, 70% { color: var(--text-3); } 74%, 100% { color: var(--text); } }
@keyframes jrS1i { 0%, 34% { background: var(--brand); color: var(--brand-ink); } 38%, 100% { background: var(--sunken); color: var(--text-2); } }
@keyframes jrS2i { 0%, 36% { background: var(--sunken); color: var(--text-2); } 40%, 66% { background: var(--brand); color: var(--brand-ink); } 70%, 100% { background: var(--sunken); color: var(--text-2); } }
@keyframes jrS3i { 0%, 70% { background: var(--sunken); color: var(--text-2); } 74%, 100% { background: var(--ok); color: #fff; } }
@media (prefers-reduced-motion: reduce) {
  .jr-sheen, .jr-lane, .jr-plain, .jr-opened, .jr-ok, .jr-eye { animation: none; }
  .jr-lane { transform: translateX(50%); }
  .jr-plain, .jr-opened, .jr-eye { opacity: 0; }
  .jr-cipher, .jr-eyeoff, .jr-sees em, .jr-beam { animation: jrFadeHold 3s ease-in-out infinite alternate; opacity: 1; }
  .jr-s1, .jr-s2, .jr-s3, .jr-s1 i, .jr-s2 i, .jr-s3 i { animation: none; }
}
@keyframes jrFadeHold { from { opacity: .55; } to { opacity: 1; } }

.sec-lead--big { margin: 0; font-size: 16px; line-height: 1.62; max-width: 64ch; }
.sec-lead--big b { color: var(--text); font-weight: 650; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.details-chev { transition: transform var(--d) var(--ease); }
[aria-expanded="true"] > .details-chev { transform: rotate(180deg); }
.details { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); margin-top: -10px; }
.details.is-open { grid-template-rows: 1fr; }
.details-in { min-height: 0; overflow: hidden; visibility: hidden; transition: visibility 0s .45s; }
.details.is-open .details-in { visibility: visible; transition-delay: 0s; }
.details-pad { display: grid; gap: 20px; padding-top: 18px; border-top: 1px solid var(--line); opacity: 0; transform: translateY(-6px); transition: opacity .3s var(--ease), transform .45s var(--ease); }
.details.is-open .details-pad { opacity: 1; transform: none; transition-delay: .06s; }
.details-lead { font: 400 14.5px/1.6 var(--font); color: var(--text-2); }
.details-lead b { color: var(--text); font-weight: 620; }
.wire-title { font: 620 12.5px/1.3 var(--font); color: var(--text-2); }
.hex-track--static { animation: none; }
.sec { justify-content: center; }


/* Emploi du temps : 1, 2 ou 3 jours selon la largeur disponible */
.tile--edt { container: edt / inline-size; }
@container edt (min-width: 620px) {
  .tile--edt[data-view="day"] .cal-body, .tile--edt[data-view="day"] .cal-head { grid-template-columns: var(--gw) repeat(2, minmax(0, 1fr)); }
  .tile--edt[data-view="day"] .cal-head { display: grid; }
  .tile--edt[data-view="day"] .day-col.in-2 { display: grid; }
  .tile--edt[data-view="day"] .cal-dh:not(.in-2) { display: none; }
}
@container edt (min-width: 840px) {
  .tile--edt[data-view="day"] .cal-body, .tile--edt[data-view="day"] .cal-head { grid-template-columns: var(--gw) repeat(3, minmax(0, 1fr)); }
  .tile--edt[data-view="day"] .day-col.in-3 { display: grid; }
  .tile--edt[data-view="day"] .day-col.in-2:not(.in-3) { display: none; }
  .tile--edt[data-view="day"] .cal-dh.in-3 { display: flex; }
  .tile--edt[data-view="day"] .cal-dh.in-2:not(.in-3) { display: none; }
}
.tile--edt[data-view="day"] .cal-dh.is-active:not(.is-today) b { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; text-decoration-color: var(--line-2); }

/* Tuile Raccourcis */
.tile--links { container: links / inline-size; }
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 4px 8px; align-content: start; margin: 0 -8px; overflow: auto; min-height: 0; scrollbar-width: thin; }
.link { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; text-decoration: none; transition: background-color var(--d-fast); }
.link:hover { background: var(--hover); }
.link:hover .btn-arrow { transform: translate(2px, -2px); color: var(--text); }
.link .btn-arrow { color: var(--text-3); }
.link-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }
.link-txt { min-width: 0; }
.link-txt b { display: block; font: 620 13.5px/1.3 var(--font); }
.link-txt span { display: block; font: 500 12px/1.35 var(--font); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Espace libre de la grille : invitation à ajouter */
.slot {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 0; min-width: 0;
  padding: 12px; border-radius: var(--r-xl); text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line-2));
  background: color-mix(in srgb, var(--brand-soft) 45%, transparent); color: var(--text-2);
  transition: background-color var(--d) var(--ease), border-color var(--d) var(--ease), color var(--d) var(--ease);
  animation: fade .45s var(--ease) both;
}
.slot:hover { background: var(--brand-soft); border-color: var(--brand); color: var(--text); }
.slot-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--surface); color: var(--brand); box-shadow: var(--shadow-1); transition: transform var(--d) var(--spring); }
.slot:hover .slot-ic { transform: scale(1.08) rotate(90deg); }
.slot b { font: 650 13.5px/1.25 var(--font); }
.slot span { font: 500 12px/1.35 var(--font); color: var(--text-3); }
.slot.is-entering { animation: rise .4s var(--ease) both; }

/* Sélecteur de raccourcis */
.sheet-foot { display: flex; justify-content: space-between; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
.picker { height: fit-content; inset: auto 12px 12px auto; }
.pick-list { display: grid; gap: 2px; padding-top: 10px; }
.pick { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; margin: 0 -10px; border-radius: 12px; cursor: pointer; transition: background-color var(--d-fast); }
.pick:hover { background: var(--hover); }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--line-2); transition: background-color var(--d) var(--ease); }
.switch::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform var(--d) var(--spring); }
.pick input:checked + .switch { background: var(--brand); }
.pick input:checked + .switch::after { transform: translateX(16px); }
.pick input:focus-visible + .switch { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Redimensionnement continu : la tuile suit le pointeur, l'aperçu montre l'accroche */
.snap-ghost { z-index: 0; border-radius: var(--r-xl); border: 2px dashed var(--brand); background: color-mix(in srgb, var(--brand-soft) 70%, transparent); pointer-events: none; }
.bento > .tile.is-resizing { z-index: 25; justify-self: start; align-self: start; box-shadow: var(--shadow-3); transition: none; }
@media (max-width: 759.98px) { .slot, .snap-ghost { display: none; } }

/* Pastille Moodle d'un cours (en haut à droite, seulement si l'espace existe) */
.ev-mdl {
  position: absolute; top: 6px; right: 6px; z-index: 3;
  display: inline-flex; align-items: center; gap: 2px; height: 24px; padding: 0 6px; border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--text-2);
  box-shadow: inset 0 0 0 1px var(--line-2); font: 700 11px/1 var(--font); text-decoration: none;
  transition: color var(--d-fast), background-color var(--d-fast), transform var(--d-fast) var(--ease);
}
.ev-mdl:hover { color: var(--brand); background: var(--surface); transform: translateY(-1px); }
.ev-mdl .mdl-arrow { width: 11px; height: 11px; transition: transform var(--d) var(--ease); }
.ev-mdl:hover .mdl-arrow { transform: translate(1px, -1px); }
.ev-mdl.is-approx span { color: var(--td); }
.ev.has-mdl .ev-top { padding-right: 40px; }
@container ev (min-width: 330px) { .ev-main { padding-right: 46px; } .ev-top { padding-right: 0 !important; } }
/* Contenu qui dépasse : fondu propre plutôt qu'une coupe sèche */
.ev-in { -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 12px), transparent); mask-image: linear-gradient(to bottom, #000 calc(100% - 12px), transparent); }
.course-name, .link-txt b, .mail-subj, .nn-title { min-width: 0; }

/* Menu Affichage */
.menu--wide { min-width: 290px; }
.menu-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; padding: 0 10px; border-radius: 9px; cursor: pointer; font: 550 13.5px/1 var(--font); }
.menu-switch:hover { background: var(--hover); }
.menu-switch input, .mchip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.menu-switch input:checked + .switch { background: var(--brand); }
.menu-switch input:checked + .switch::after { transform: translateX(16px); }
.menu-switch input:focus-visible + .switch { outline: 2px solid var(--focus); outline-offset: 2px; }
.menu-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 10px 10px; }
.mchip { position: relative; }
.mchip span { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); font: 550 12.5px/1 var(--font); color: var(--text-2); cursor: pointer; transition: background-color var(--d-fast), color var(--d-fast), border-color var(--d-fast); }
.mchip input:checked + span { background: var(--brand-soft); border-color: transparent; color: var(--brand); }
.mchip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Tablette : hauteurs fixes, Raccourcis compacts sous Moodle */
@media (min-width: 760px) and (max-width: 1179.98px) {
  .bento { grid-auto-rows: auto; }
  .bento > [data-tile="edt"] { height: 780px; }
  .bento > [data-tile="mail"], .bento > [data-tile="moodle"] { height: 600px; }
  .bento > [data-tile="links"] { height: auto; }
}
@media (max-width: 1179.98px) {
  .tile--links .tile-head { margin-bottom: 10px; }
  .tile--links .links { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; overflow: visible; }
  .tile--links .link { display: inline-flex; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
  .tile--links .link-ic { width: 30px; height: 30px; border-radius: 50%; }
  .tile--links .link-txt span, .tile--links .link .btn-arrow { display: none; }
  .tile--links .link-txt b { white-space: nowrap; }
}

/* Logo ISIS (vectorisé, une seule couleur : accent, blanc ou noir) */
.isis-mark, .isis-full, .spotlight-deco { fill: currentColor; }
.isis-mark path, .isis-full path, .spotlight-deco path { fill: currentColor; fill-rule: evenodd; }
.isis-mark { width: auto; height: 30px; flex: none; color: var(--brand); }
.isis-full { width: auto; height: 46px; flex: none; color: var(--brand); }
.brand-name .brand-hub { color: var(--brand); }
.brand-sep { width: 1px; height: 30px; background: var(--line-2); flex: none; }
.brand-name--hub { font: 720 21px/1 var(--font); letter-spacing: -.02em; color: var(--text); }
.brand-name--hub small { margin-top: 4px; }
.spotlight-deco { width: 150px; height: 176px; right: -18px; bottom: -40px; opacity: .14; color: var(--brand-ink); }

/* Abonnement iCal */
.ical-list { display: grid; gap: 8px; }
.ical-opt {
  display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  padding: 12px 14px 12px 12px; border-radius: 16px; border: 1px solid var(--line-2); text-decoration: none;
  transition: background-color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--ease);
}
.ical-opt:hover { background: var(--hover); border-color: color-mix(in srgb, var(--brand) 40%, var(--line-2)); transform: translateY(-1px); }
.ical-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--sunken); color: var(--text); }
.ical-go { display: inline-flex; align-items: center; gap: 4px; font: 650 13px/1 var(--font); color: var(--brand); white-space: nowrap; }
.ical-tip { margin-top: 10px; font: 450 12.5px/1.5 var(--font); color: var(--text-3); }
.ical .fingerprint code { font-size: 11.5px; }
.ical-btn .ic { color: var(--brand); }

/* Proposer une idée */
.fb-btn .ic { color: var(--brand); }
.fb-form { display: contents; }
.fb-form[hidden] { display: none; }
.fb .sheet-body { display: grid; gap: 16px; padding-top: 18px; align-content: start; }
.fb-types { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.fb-type-row { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-type { position: relative; }
.fb-type input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fb-type span {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--line-2); font: 600 13px/1 var(--font); color: var(--text-2); cursor: pointer;
  transition: background-color var(--d-fast), color var(--d-fast), border-color var(--d-fast), transform var(--d-fast) var(--spring);
}
.fb-type span:hover { border-color: color-mix(in srgb, var(--line-2), var(--text) 18%); }
.fb-type input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: scale(1.02); }
.fb-type input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.counter { font: 500 12px/1 var(--font); color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.is-near { color: var(--td); }
.textarea { height: auto; min-height: 128px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select-wrap { position: relative; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.select-chev { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.fb-note { font: 450 12.5px/1.4 var(--font); color: var(--text-3); }
.fb-sent { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; padding: 40px 28px; }
.fb-sent-ic { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--ok); color: #fff; margin-bottom: 8px; animation: popIn .5s var(--spring) both; }
.fb-sent-ic .ic { stroke-width: 2.4; }
.fb-sent-ic path { stroke-dasharray: 24; animation: draw .5s .2s var(--ease) both; }
.fb-sent h3 { font: 720 21px/1.2 var(--font); letter-spacing: -.02em; }
.fb-sent p { max-width: 34ch; font: 450 14px/1.5 var(--font); color: var(--text-2); }
.fb-sent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* Visite guidée */
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-hole {
  position: fixed; z-index: 1; border-radius: 22px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(20, 19, 15, .58);
  transition: top .5s var(--ease), left .5s var(--ease), width .5s var(--ease), height .5s var(--ease), border-radius .5s var(--ease);
}
.tour-hole::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 2px solid var(--brand); animation: tourRing 2s var(--ease-io) infinite; }
.tour-hole.is-center::after { display: none; }
.tour-card {
  position: fixed; z-index: 2; width: min(360px, calc(100vw - 24px));
  padding: 18px 18px 14px; border-radius: 20px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); box-shadow: var(--shadow-3);
  transition: top .5s var(--ease), left .5s var(--ease), bottom .5s var(--ease);
}
.tour-card.is-swap > :not(.tour-actions) { animation: fade .35s var(--ease) both; }
.tour-step { display: inline-flex; align-items: center; gap: 6px; font: 650 11px/1 var(--font); letter-spacing: .07em; text-transform: uppercase; color: var(--brand); }
.tour-card h3 { margin-top: 8px; font: 720 18px/1.25 var(--font); letter-spacing: -.015em; }
.tour-text { margin-top: 6px; font: 450 14px/1.55 var(--font); color: var(--text-2); }
.tour-dots { display: flex; gap: 5px; margin-top: 14px; }
.tour-dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line-2); transition: width var(--d) var(--ease), background-color var(--d); }
.tour-dots .is-on { width: 18px; background: var(--brand); }
.tour-actions { display: flex; align-items: center; gap: 6px; margin-top: 14px; }
.tour-actions .spacer { flex: 1; }
@keyframes tourRing { 0%, 100% { opacity: .9; transform: scale(1); } 50% { opacity: .35; transform: scale(1.015); } }
@media (prefers-reduced-motion: reduce) {
  .tour-hole, .tour-card { transition: none; }
  .tour-hole::after { animation: none; }
}
/* Visite figée (canevas) */
.tour--static { position: absolute; }
.tour--static .tour-scrim { position: absolute; inset: 0; background: rgba(20, 19, 15, .58); }
.tour--static .tour-card { position: absolute; }
.tour-card--edt { top: 170px; left: calc(66.6% + 8px); }
.tour-card--intro { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.is-static .tour-focus { position: relative; z-index: 91; box-shadow: 0 0 0 4px var(--brand), var(--shadow-3); }
@media (max-width: 759.98px) {
  .tour-card--edt { left: 12px; right: 12px; top: auto; bottom: 16px; width: auto; }
  .tour-card--intro { left: 12px; right: 12px; top: auto; bottom: 16px; width: auto; transform: none; }
}

/* ==========================================================================
   v6 — mails (recherche, écriture), annuaire, maquettes, détail de cours, retours
   ========================================================================== */
.search--sm { height: 38px; margin-bottom: 8px; }
.mail-search-n { font: 600 11.5px/1 var(--font); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mail-write .ic { color: var(--brand); }
.mail-showmore { display: none; margin-top: 8px; }
.mail-noresult { padding: 24px 10px; text-align: center; }
.mail-row mark { background: color-mix(in srgb, var(--brand) 22%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.tile--mail .tile-head { margin-bottom: 10px; }
@media (max-width: 759.98px) {
  .tile--mail:not(.is-more) .mail-list > li:nth-child(n+6), .tile--mail:not(.is-more) .mail-more { display: none; }
  .tile--mail:not(.is-more) .mail-showmore { display: inline-flex; }
  .tile--mail.is-more .mail-list { max-height: 560px; overflow: auto; border-radius: 12px; }
  .tile--mail.is-searching .mail-showmore { display: none; }
}

.reader-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 26px; }
.reader-actions .ic { color: var(--brand); }

/* Écrire un message */
.composer .reader-bar { gap: 10px; }
.cmp-title { font: 700 16px/1 var(--font); letter-spacing: -.01em; }
.cmp-form { position: relative; max-width: 820px; margin: 0 auto; padding: 18px 28px 48px; display: flex; flex-direction: column; }
.cmp-row { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cmp-label { width: 48px; flex: none; font: 600 13px/1 var(--font); color: var(--text-3); }
.recips { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.recip-input, .cmp-subject { flex: 1; min-width: 140px; height: 34px; border: 0; background: transparent; outline: none; font: 450 15px/1 var(--font); color: var(--text); }
.cmp-subject { font-weight: 600; }
.rchip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 4px 0 3px; border-radius: 999px; background: var(--sunken); font: 600 13px/1 var(--font); animation: pop .25s var(--spring) both; }
.rchip .avatar { width: 24px; height: 24px; font-size: 10px; }
.rchip button { display: grid; place-items: center; width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font: 600 15px/1 var(--font); }
.rchip button:hover { background: var(--hover); color: var(--text); }
.cmp-cc-toggle[aria-pressed="true"] { background: var(--sunken); color: var(--text); }
.ac {
  position: absolute; z-index: 5; left: 86px; right: 28px; top: 62px; max-height: 320px; overflow: auto;
  padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  animation: pop .2s var(--ease) both;
}
.ac-item { display: grid; grid-template-columns: 32px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer; }
.ac-item .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.ac-item[aria-selected="true"], .ac-item:hover { background: var(--hover); }
.cmp-text { min-height: 280px; margin-top: 16px; padding: 0; border: 0; outline: none; resize: vertical; background: transparent; font: 400 15.5px/1.65 var(--font); color: var(--text); }
.cmp-quote { margin-top: 10px; padding: 12px 16px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); font: 400 14px/1.6 var(--font); color: var(--text-2); }
.cmp-quote-head { font-weight: 600; color: var(--text-3); margin-bottom: 4px; }
.cmp-foot { display: flex; align-items: center; gap: 6px; margin-top: 18px; font: 450 12.5px/1.4 var(--font); color: var(--text-3); }
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 95; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--text); color: var(--bg); box-shadow: var(--shadow-3); font: 600 14px/1.2 var(--font);
  animation: rise .35s var(--ease) both;
}
.toast .ic { color: var(--ok); }

/* Annuaire et maquettes (listes dans une fiche) */
.dir .sheet-body, .maq .sheet-body { display: grid; gap: 12px; align-content: start; padding-top: 16px; }
.dir-cats { gap: 6px; }
.dir-cats .fb-type span { height: 32px; font-size: 12.5px; }
.dir-list, .maq-list { display: grid; gap: 2px; margin: 0 -8px; }
.dir-item { position: relative; width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) 26px; align-items: center; gap: 12px; padding: 9px 8px; border: 0; border-radius: 12px; background: transparent; text-align: left; transition: background-color var(--d-fast); }
.dir-item:hover { background: var(--hover); }
.dir-item .avatar { width: 38px; height: 38px; }
.dir-mail { font: 500 11.5px/1.3 var(--mono) !important; }
.dir-check { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--line-2); color: transparent; transition: all var(--d) var(--spring); }
.dir-item.is-picked { background: var(--brand-soft); }
.dir-item.is-picked .dir-check { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); transform: scale(1.06); }
.maq-item { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 10px 8px; border-radius: 14px; transition: background-color var(--d-fast); }
.maq-item:hover { background: var(--hover); }
.maq-item.is-mine { background: var(--brand-soft); }
.maq-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--err-soft); color: var(--err); }
.maq-item .link-txt b { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.maq-item .chip { font-style: normal; }
button.link { width: 100%; border: 0; background: transparent; text-align: left; }

/* Cours cliquable + fiche détail */
.ev-hit { position: absolute; inset: 0; z-index: 2; width: 100%; padding: 0; border: 0; background: transparent; border-radius: inherit; cursor: pointer; }
.ev-hit:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.ev:has(.ev-hit:hover) { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--text) 25%, transparent), var(--shadow-2); }
.cs-head { align-items: flex-start; }
.cs-head-in { flex: 1; min-width: 0; }
.cs-kicker { display: flex; align-items: center; gap: 8px; font: 600 12.5px/1 var(--font); color: var(--text-3); }
.cs-head h2 { margin-top: 8px; font: 720 21px/1.2 var(--font); letter-spacing: -.02em; }
.cs-head p:not(.cs-kicker) { margin-top: 4px; font: 500 12.5px/1.3 var(--mono); color: var(--text-3); }
.course-sheet .sheet-body { padding-top: 16px; }
.cs-when { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); }
.cs-room { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px 0 11px; border-radius: 12px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); font: 760 20px/1 var(--font); }
.cs-room .room-pin { width: 18px; height: 18px; }
.cs-when b { display: block; font: 650 14.5px/1.3 var(--font); }
.cs-when > div > span { display: block; font: 500 13px/1.3 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }
.cs-when .live { margin-left: auto; }
.cs-facts { margin-top: 6px; }
.cs-facts dd { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cs-write { height: 28px; }
.cs-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cs-stat { padding: 12px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.cs-stat b { display: block; font: 750 24px/1 var(--font); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.cs-stat span { font: 500 12px/1.3 var(--font); color: var(--text-3); }
.cs-next { display: grid; gap: 2px; margin-top: 10px; }
.cs-next li { display: grid; grid-template-columns: 96px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); font: 500 13px/1.3 var(--font); color: var(--text-2); font-variant-numeric: tabular-nums; }
.cs-next li:last-child { border-bottom: 0; }
.cs-next-d { font-weight: 650; color: var(--text); }
.cs-exam { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--exam-soft); color: var(--exam); }
.cs-exam b { display: block; font: 650 14px/1.3 var(--font); }
.cs-exam span { font: 500 12.5px/1.4 var(--font); color: var(--text-2); }
.cs-none { font: 450 13.5px/1.5 var(--font); color: var(--text-3); }
.cs-notes { display: grid; gap: 6px; }
.cs-notes li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.cs-notes b { display: block; font: 620 13.5px/1.3 var(--font); }
.cs-notes span { font: 500 12px/1.35 var(--font); color: var(--text-3); }
.cs-grade { font: 760 17px/1 var(--font) !important; color: var(--text) !important; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Retours : onglets, mes propositions, statuts */
.fb-tabs { display: grid; margin: 14px 22px 0; }
.fb-tabs[data-active="week"] .seg-thumb { transform: translateX(100%); }
.fb-mine { padding-top: 14px; }
.fbm-list { display: grid; gap: 8px; }
.fbm { display: grid; gap: 6px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); }
.fbm-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fbm-meta { font: 500 12px/1 var(--font); color: var(--text-3); }
.fbm b { font: 620 14px/1.35 var(--font); }
.fbm-reply { display: flex; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font: 450 13px/1.45 var(--font); color: var(--text-2); }
.fbm-reply em { font-style: normal; font-weight: 650; color: var(--text); }
.fbm-reply .ic { margin-top: 3px; color: var(--brand); }
.status { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px; font: 650 11.5px/1 var(--font); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status--new { background: var(--brand-soft); color: var(--brand); }
.status--review { background: var(--td-soft); color: var(--td); }
.status--planned { background: var(--tp-soft); color: var(--tp); }
.status--done { background: var(--ok-soft); color: var(--ok); }
.status--declined { background: var(--sunken); color: var(--text-2); }

/* Administration des retours */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { display: grid; gap: 10px; justify-items: start; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); text-align: left; transition: border-color var(--d-fast), transform var(--d-fast) var(--ease); }
.kpi:hover { transform: translateY(-1px); }
.kpi.is-on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.kpi b { font: 760 30px/1 var(--font); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; margin-bottom: 10px; }
.select--sm { height: 42px; font-size: 13.5px; }
.adm-items { display: grid; gap: 2px; margin: 0 -10px; }
.adm-item { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 0; border-radius: 12px; background: transparent; text-align: left; transition: background-color var(--d-fast); }
.adm-item:hover { background: var(--hover); }
.adm-item.is-on { background: var(--brand-soft); }
.adm-votes { display: grid; justify-items: center; gap: 1px; padding: 6px 0; border-radius: 10px; border: 1px solid var(--line-2); color: var(--text-2); }
.adm-votes b { font: 700 13px/1 var(--font); color: var(--text); }
.adm-main { min-width: 0; }
.adm-main b { display: block; font: 620 14px/1.3 var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adm-main span { display: block; font: 500 12px/1.35 var(--font); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-detail { position: sticky; top: calc(var(--head-h) + 16px); display: grid; gap: 14px; }
.adm-head h2 { margin-top: 8px; font: 720 21px/1.25 var(--font); letter-spacing: -.02em; }
.adm-desc { font: 400 15px/1.6 var(--font); }
.textarea--sm { min-height: 72px; }
.adm-actions { display: flex; align-items: center; gap: 8px; }
.adm-actions .spacer { flex: 1; }
.adm-actions [data-adm-close] { display: none; }
@media (max-width: 1179.98px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .admin-grid { grid-template-columns: minmax(0, 1fr); } .admin-detail { position: static; } }
@media (max-width: 759.98px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 12px; } .kpi b { font-size: 24px; }
  .admin-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .admin-filters .search { grid-column: 1 / -1; }
  .adm-actions [data-adm-close] { display: inline-flex; }
  .cmp-form { padding: 10px 16px 40px; }
  .cmp-label { width: 36px; }
  .ac { left: 16px; right: 16px; }
  .cs-next li { grid-template-columns: 84px 1fr auto; }
  .cs-next li .type { display: none; }
  .maq-item { grid-template-columns: 40px minmax(0, 1fr) auto; }
  .maq-item .btn { display: none; }
}

/* Moodle s'adapte à sa propre largeur */
.tile--moodle { container: moodle / inline-size; }
@container moodle (max-width: 900px) { .course-list { grid-template-columns: minmax(0, 1fr); } }
@container moodle (max-width: 620px) { .moodle-layout { grid-template-columns: minmax(0, 1fr); } .spotlight { min-height: 0; } }
/* Icône du thème */
.theme-sun { display: none; }
.app[data-theme="dark"] .theme-sun { display: block; }
.app[data-theme="dark"] .theme-moon { display: none; }
/* Divers états statiques */
.is-static { position: relative; }
.is-static.reading .bento, .is-static.reading .dock { display: none; }
.frame-clip { height: 844px; overflow: hidden; }
.frame-desk { width: 1440px; height: 900px; min-height: 0; overflow: hidden; }
.tile-compact { --hour: 34px; }
.tile-compact .nownext { display: none; }
.expand-hint { display: none; }
.tile--edt.is-expanded .expand-hint { display: inline-flex; }

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { transform: scale(.4); } to { transform: none; } }
@keyframes calIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes slideFromRight { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes slideFromLeft { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 80%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 2px var(--brand), 0 12px 30px -12px color-mix(in srgb, var(--brand) 60%, transparent); }
  50% { box-shadow: 0 0 0 2px var(--brand), 0 0 0 6px color-mix(in srgb, var(--brand) 14%, transparent), 0 12px 30px -12px color-mix(in srgb, var(--brand) 60%, transparent); }
}
@keyframes grow { from { width: 0; } }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes shake { 15%, 85% { transform: translateX(-1px); } 30%, 70% { transform: translateX(3px); } 45%, 55% { transform: translateX(-4px); } }
@keyframes travelX { from { transform: translateX(0); } to { transform: translateX(100%); } }
@keyframes travelY { from { transform: translateY(0); } to { transform: translateY(100%); } }
@keyframes pktFade { 0% { opacity: 0; } 10%, 88% { opacity: 1; } 100% { opacity: 0; } }
@keyframes hexdrift { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes byteflip { from { opacity: 0; transform: translateY(-55%); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes draw { from { stroke-dashoffset: 24; } to { stroke-dashoffset: 0; } }
@keyframes logoBeat { 0%, 70%, 100% { transform: scale(1); } 80% { transform: scale(.82); } 90% { transform: scale(1.06); } }
@keyframes sheetInRight { from { opacity: 0; transform: translateX(32px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sheetOutRight { to { opacity: 0; transform: translateX(24px); } }
@keyframes sheetInUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOutDown { to { transform: translateY(100%); } }

/* Mouvement réduit : tout devient fondu */
@media (prefers-reduced-motion: reduce) {
  .bento > .tile, .auth-card, .sec, .onb-head, .promo-opt, .promo-soon, .onb-actions,
  .reader-anim > *, .cal-anim, .day-col.slide-from-right, .day-col.slide-from-left, .menu,
  .sheet.is-entering { animation-name: fade !important; }
  .sheet.is-leaving { animation-name: fadeOut !important; }
  .alert--error { animation: fade .3s both; }
  .ev.is-now { animation: none; }
  .live-dot::after, .nowline::after, .logo .logo-dot, .wire-typed .caret { animation: none; }
  .hex-track { animation: none; }
  .hex-track .flip { animation-name: fade; }
  .sch-lane { animation: none; }
  .pkt { animation: pktPulse 2.4s ease-in-out infinite; }
  .sch-lane:nth-child(1) .pkt { left: 18%; }
  .sch-lane:nth-child(2) .pkt { left: 50%; }
  .sch-lane:nth-child(3) .pkt { left: 82%; }
  .skel { animation: skelPulse 1.6s ease-in-out infinite; background: var(--skel); }
  .seg-thumb, .tile, .ev, .promo-card, .promo-num, .spotlight, .btn, .icon-btn, .mail-row, .nowline, .bar-fill { transition-property: opacity, background-color, color, border-color, box-shadow; }
  .has-expanded .bento > .tile:not(.is-expanded), .has-overlay .bento > .tile { transform: none; filter: none; }
  .promo-opt:hover .promo-card, .spotlight:hover, .ev:hover { transform: none; }
}
@keyframes fadeOut { to { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .details, .details-pad, .details-in { transition-property: opacity, visibility; }
  .is-editing .tile-edit, .editbar, .week-note, .cal-body.week-in-right, .cal-body.week-in-left, .mail-row.is-new { animation-name: fade; }
}
@keyframes pktPulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes skelPulse { 50% { opacity: .55; } }

/* ==========================================================================
   Placement horaire (généré) : 8 h → 19 h, pas de 5 min
   ========================================================================== */
.from-0800{grid-row-start:1}.to-0800{grid-row-end:1}
.from-0805{grid-row-start:2}.to-0805{grid-row-end:2}
.from-0810{grid-row-start:3}.to-0810{grid-row-end:3}
.from-0815{grid-row-start:4}.to-0815{grid-row-end:4}
.from-0820{grid-row-start:5}.to-0820{grid-row-end:5}
.from-0825{grid-row-start:6}.to-0825{grid-row-end:6}
.from-0830{grid-row-start:7}.to-0830{grid-row-end:7}
.from-0835{grid-row-start:8}.to-0835{grid-row-end:8}
.from-0840{grid-row-start:9}.to-0840{grid-row-end:9}
.from-0845{grid-row-start:10}.to-0845{grid-row-end:10}
.from-0850{grid-row-start:11}.to-0850{grid-row-end:11}
.from-0855{grid-row-start:12}.to-0855{grid-row-end:12}
.from-0900{grid-row-start:13}.to-0900{grid-row-end:13}
.from-0905{grid-row-start:14}.to-0905{grid-row-end:14}
.from-0910{grid-row-start:15}.to-0910{grid-row-end:15}
.from-0915{grid-row-start:16}.to-0915{grid-row-end:16}
.from-0920{grid-row-start:17}.to-0920{grid-row-end:17}
.from-0925{grid-row-start:18}.to-0925{grid-row-end:18}
.from-0930{grid-row-start:19}.to-0930{grid-row-end:19}
.from-0935{grid-row-start:20}.to-0935{grid-row-end:20}
.from-0940{grid-row-start:21}.to-0940{grid-row-end:21}
.from-0945{grid-row-start:22}.to-0945{grid-row-end:22}
.from-0950{grid-row-start:23}.to-0950{grid-row-end:23}
.from-0955{grid-row-start:24}.to-0955{grid-row-end:24}
.from-1000{grid-row-start:25}.to-1000{grid-row-end:25}
.from-1005{grid-row-start:26}.to-1005{grid-row-end:26}
.from-1010{grid-row-start:27}.to-1010{grid-row-end:27}
.from-1015{grid-row-start:28}.to-1015{grid-row-end:28}
.from-1020{grid-row-start:29}.to-1020{grid-row-end:29}
.from-1025{grid-row-start:30}.to-1025{grid-row-end:30}
.from-1030{grid-row-start:31}.to-1030{grid-row-end:31}
.from-1035{grid-row-start:32}.to-1035{grid-row-end:32}
.from-1040{grid-row-start:33}.to-1040{grid-row-end:33}
.from-1045{grid-row-start:34}.to-1045{grid-row-end:34}
.from-1050{grid-row-start:35}.to-1050{grid-row-end:35}
.from-1055{grid-row-start:36}.to-1055{grid-row-end:36}
.from-1100{grid-row-start:37}.to-1100{grid-row-end:37}
.from-1105{grid-row-start:38}.to-1105{grid-row-end:38}
.from-1110{grid-row-start:39}.to-1110{grid-row-end:39}
.from-1115{grid-row-start:40}.to-1115{grid-row-end:40}
.from-1120{grid-row-start:41}.to-1120{grid-row-end:41}
.from-1125{grid-row-start:42}.to-1125{grid-row-end:42}
.from-1130{grid-row-start:43}.to-1130{grid-row-end:43}
.from-1135{grid-row-start:44}.to-1135{grid-row-end:44}
.from-1140{grid-row-start:45}.to-1140{grid-row-end:45}
.from-1145{grid-row-start:46}.to-1145{grid-row-end:46}
.from-1150{grid-row-start:47}.to-1150{grid-row-end:47}
.from-1155{grid-row-start:48}.to-1155{grid-row-end:48}
.from-1200{grid-row-start:49}.to-1200{grid-row-end:49}
.from-1205{grid-row-start:50}.to-1205{grid-row-end:50}
.from-1210{grid-row-start:51}.to-1210{grid-row-end:51}
.from-1215{grid-row-start:52}.to-1215{grid-row-end:52}
.from-1220{grid-row-start:53}.to-1220{grid-row-end:53}
.from-1225{grid-row-start:54}.to-1225{grid-row-end:54}
.from-1230{grid-row-start:55}.to-1230{grid-row-end:55}
.from-1235{grid-row-start:56}.to-1235{grid-row-end:56}
.from-1240{grid-row-start:57}.to-1240{grid-row-end:57}
.from-1245{grid-row-start:58}.to-1245{grid-row-end:58}
.from-1250{grid-row-start:59}.to-1250{grid-row-end:59}
.from-1255{grid-row-start:60}.to-1255{grid-row-end:60}
.from-1300{grid-row-start:61}.to-1300{grid-row-end:61}
.from-1305{grid-row-start:62}.to-1305{grid-row-end:62}
.from-1310{grid-row-start:63}.to-1310{grid-row-end:63}
.from-1315{grid-row-start:64}.to-1315{grid-row-end:64}
.from-1320{grid-row-start:65}.to-1320{grid-row-end:65}
.from-1325{grid-row-start:66}.to-1325{grid-row-end:66}
.from-1330{grid-row-start:67}.to-1330{grid-row-end:67}
.from-1335{grid-row-start:68}.to-1335{grid-row-end:68}
.from-1340{grid-row-start:69}.to-1340{grid-row-end:69}
.from-1345{grid-row-start:70}.to-1345{grid-row-end:70}
.from-1350{grid-row-start:71}.to-1350{grid-row-end:71}
.from-1355{grid-row-start:72}.to-1355{grid-row-end:72}
.from-1400{grid-row-start:73}.to-1400{grid-row-end:73}
.from-1405{grid-row-start:74}.to-1405{grid-row-end:74}
.from-1410{grid-row-start:75}.to-1410{grid-row-end:75}
.from-1415{grid-row-start:76}.to-1415{grid-row-end:76}
.from-1420{grid-row-start:77}.to-1420{grid-row-end:77}
.from-1425{grid-row-start:78}.to-1425{grid-row-end:78}
.from-1430{grid-row-start:79}.to-1430{grid-row-end:79}
.from-1435{grid-row-start:80}.to-1435{grid-row-end:80}
.from-1440{grid-row-start:81}.to-1440{grid-row-end:81}
.from-1445{grid-row-start:82}.to-1445{grid-row-end:82}
.from-1450{grid-row-start:83}.to-1450{grid-row-end:83}
.from-1455{grid-row-start:84}.to-1455{grid-row-end:84}
.from-1500{grid-row-start:85}.to-1500{grid-row-end:85}
.from-1505{grid-row-start:86}.to-1505{grid-row-end:86}
.from-1510{grid-row-start:87}.to-1510{grid-row-end:87}
.from-1515{grid-row-start:88}.to-1515{grid-row-end:88}
.from-1520{grid-row-start:89}.to-1520{grid-row-end:89}
.from-1525{grid-row-start:90}.to-1525{grid-row-end:90}
.from-1530{grid-row-start:91}.to-1530{grid-row-end:91}
.from-1535{grid-row-start:92}.to-1535{grid-row-end:92}
.from-1540{grid-row-start:93}.to-1540{grid-row-end:93}
.from-1545{grid-row-start:94}.to-1545{grid-row-end:94}
.from-1550{grid-row-start:95}.to-1550{grid-row-end:95}
.from-1555{grid-row-start:96}.to-1555{grid-row-end:96}
.from-1600{grid-row-start:97}.to-1600{grid-row-end:97}
.from-1605{grid-row-start:98}.to-1605{grid-row-end:98}
.from-1610{grid-row-start:99}.to-1610{grid-row-end:99}
.from-1615{grid-row-start:100}.to-1615{grid-row-end:100}
.from-1620{grid-row-start:101}.to-1620{grid-row-end:101}
.from-1625{grid-row-start:102}.to-1625{grid-row-end:102}
.from-1630{grid-row-start:103}.to-1630{grid-row-end:103}
.from-1635{grid-row-start:104}.to-1635{grid-row-end:104}
.from-1640{grid-row-start:105}.to-1640{grid-row-end:105}
.from-1645{grid-row-start:106}.to-1645{grid-row-end:106}
.from-1650{grid-row-start:107}.to-1650{grid-row-end:107}
.from-1655{grid-row-start:108}.to-1655{grid-row-end:108}
.from-1700{grid-row-start:109}.to-1700{grid-row-end:109}
.from-1705{grid-row-start:110}.to-1705{grid-row-end:110}
.from-1710{grid-row-start:111}.to-1710{grid-row-end:111}
.from-1715{grid-row-start:112}.to-1715{grid-row-end:112}
.from-1720{grid-row-start:113}.to-1720{grid-row-end:113}
.from-1725{grid-row-start:114}.to-1725{grid-row-end:114}
.from-1730{grid-row-start:115}.to-1730{grid-row-end:115}
.from-1735{grid-row-start:116}.to-1735{grid-row-end:116}
.from-1740{grid-row-start:117}.to-1740{grid-row-end:117}
.from-1745{grid-row-start:118}.to-1745{grid-row-end:118}
.from-1750{grid-row-start:119}.to-1750{grid-row-end:119}
.from-1755{grid-row-start:120}.to-1755{grid-row-end:120}
.from-1800{grid-row-start:121}.to-1800{grid-row-end:121}
.from-1805{grid-row-start:122}.to-1805{grid-row-end:122}
.from-1810{grid-row-start:123}.to-1810{grid-row-end:123}
.from-1815{grid-row-start:124}.to-1815{grid-row-end:124}
.from-1820{grid-row-start:125}.to-1820{grid-row-end:125}
.from-1825{grid-row-start:126}.to-1825{grid-row-end:126}
.from-1830{grid-row-start:127}.to-1830{grid-row-end:127}
.from-1835{grid-row-start:128}.to-1835{grid-row-end:128}
.from-1840{grid-row-start:129}.to-1840{grid-row-end:129}
.from-1845{grid-row-start:130}.to-1845{grid-row-end:130}
.from-1850{grid-row-start:131}.to-1850{grid-row-end:131}
.from-1855{grid-row-start:132}.to-1855{grid-row-end:132}
.from-1900{grid-row-start:133}.to-1900{grid-row-end:133}
.p-0{--p:0%}
.p-5{--p:5%}
.p-10{--p:10%}
.p-15{--p:15%}
.p-20{--p:20%}
.p-25{--p:25%}
.p-30{--p:30%}
.p-35{--p:35%}
.p-40{--p:40%}
.p-45{--p:45%}
.p-50{--p:50%}
.p-55{--p:55%}
.p-60{--p:60%}
.p-65{--p:65%}
.p-70{--p:70%}
.p-75{--p:75%}
.p-80{--p:80%}
.p-85{--p:85%}
.p-90{--p:90%}
.p-95{--p:95%}
.p-100{--p:100%}
.skel-h40{height:42px}.skel-h70{height:70px}.skel-h180{height:196px}
.span-3x{grid-column:span 3}
@media (min-width:760px){.bento>.cw-1{grid-column:span 1}.bento>.cw-2{grid-column:span 2}.bento>.cw-3{grid-column:span 3}.bento>.cw-4{grid-column:span 4}.bento>.cw-5{grid-column:span 5}.bento>.cw-6{grid-column:span 6}.bento>.cw-7{grid-column:span 7}.bento>.cw-8{grid-column:span 8}.bento>.cw-9{grid-column:span 9}.bento>.cw-10{grid-column:span 10}.bento>.cw-11{grid-column:span 11}.bento>.cw-12{grid-column:span 12}}
@media (min-width:1180px){.bento>.rh-2{grid-row:span 2}.bento>.rh-3{grid-row:span 3}.bento>.rh-4{grid-row:span 4}.bento>.rh-5{grid-row:span 5}.bento>.rh-6{grid-row:span 6}.bento>.rh-7{grid-row:span 7}.bento>.rh-8{grid-row:span 8}.bento>.rh-9{grid-row:span 9}.bento>.rh-10{grid-row:span 10}.bento>.rh-11{grid-row:span 11}.bento>.rh-12{grid-row:span 12}.bento>.rh-13{grid-row:span 13}.bento>.rh-14{grid-row:span 14}.bento>.rh-15{grid-row:span 15}.bento>.rh-16{grid-row:span 16}.bento>.rh-17{grid-row:span 17}.bento>.rh-18{grid-row:span 18}.bento>.rh-19{grid-row:span 19}.bento>.rh-20{grid-row:span 20}}
@media (min-width:760px) and (max-width:1179.98px){.bento>.cw-3,.bento>.cw-4,.bento>.cw-5{grid-column:span 6}}
@media (max-width:1179.98px){.span-3x{grid-column:span 6}}
@media (max-width:759.98px){.span-3x{grid-column:1/-1}}
