/* ============================================
   EDUCATIF MIKN - style.css COMPLET
   ============================================ */

/* Évite le léger décalage horizontal quand la scrollbar apparaît / disparaît (menus, modales). */
html {
  scrollbar-gutter: stable;
}

/* ---- Variables ---- */
:root {
  --orange: #f97316;
  --orange-dark: #ea580c;
  --primary: #f97316;
  --bg-body: #f1f5f9;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-sidebar: #020617;
  --text-main: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.09);
  --radius: 14px;
  /* MIKN palette (orange + teal direction / école) */
  --mikn-teal: #0d9488;
  --mikn-teal-light: #14b8a6;
  --mikn-teal-soft: rgba(13, 148, 136, 0.12);
  --mikn-blue-soft: rgba(59, 130, 246, 0.12);
  --mikn-amber-soft: rgba(245, 158, 11, 0.14);
  --mikn-orange-soft: rgba(249, 115, 22, 0.14);
  --shadow-color: rgba(15, 23, 42, 0.12);
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 20px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 8px 28px rgba(15, 23, 42, 0.1);
  --dash-ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Messagerie (fil chat moderne, bulles MIKN — orange primaire) */
  --mikn-msg-thread-bg: #f0f2f5;
  --mikn-msg-sent-bg: var(--primary);
  --mikn-msg-sent-fg: #ffffff;
  --mikn-msg-received-bg: #ffffff;
  --mikn-msg-received-border: #e5e7eb;
  --mikn-msg-accent-soft: color-mix(in srgb, var(--primary) 14%, var(--bg-card));
  --mikn-msg-rail-bg: color-mix(in srgb, var(--bg-card) 88%, var(--mikn-msg-thread-bg));
}

/* Status Badges */
.mikn-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.mikn-status-badge--success {
  background: rgba(34, 197, 94, 0.1);
  color: #166534;
}
[data-theme="dark"] .mikn-status-badge--success {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
}

/* Subscription Offers Grid */
@media (min-width: 1024px) {
  .prof-plans-inline--horizontal {
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

[data-theme="dark"] {
  --bg-body: #0f172a;
  --bg-main: #1e293b;
  --bg-card: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border: #334155;
  --shadow-color: rgba(0, 0, 0, 0.35);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.2), 0 6px 24px rgba(0, 0, 0, 0.28);
  --shadow-card-hover: 0 10px 32px rgba(0, 0, 0, 0.38);
  --mikn-msg-thread-bg: color-mix(in srgb, var(--bg-main) 82%, #020617);
  --mikn-msg-sent-bg: var(--primary);
  --mikn-msg-sent-fg: #ffffff;
  --mikn-msg-received-bg: color-mix(in srgb, var(--bg-card) 94%, #334155);
  --mikn-msg-received-border: color-mix(in srgb, var(--border) 85%, transparent);
  --mikn-msg-accent-soft: color-mix(in srgb, var(--primary) 18%, var(--bg-card));
  --mikn-msg-rail-bg: color-mix(in srgb, var(--bg-main) 92%, #0f172a);
}

/* Thème : interrupteur soleil/lune (même principe que la landing) */
.landing-theme-switch {
  position: relative;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 999px;
  flex-shrink: 0;
}

.header-actions .landing-theme-switch {
  align-self: center;
}

.landing-theme-switch:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.landing-theme-switch__track {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 56px;
  height: 30px;
  padding: 0 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff7ed, #e0f2fe 55%, #cffafe);
  box-shadow:
    inset 0 1px 3px rgba(15, 23, 42, 0.12),
    0 2px 10px rgba(249, 115, 22, 0.12);
  transition: background 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="dark"] .landing-theme-switch__track {
  background: linear-gradient(135deg, #0f172a, #1e3a5f 45%, #312e81);
  box-shadow:
    inset 0 1px 4px rgba(0, 0, 0, 0.45),
    0 0 20px rgba(59, 130, 246, 0.15);
}

.landing-theme-switch__glyph {
  font-size: 12px;
  line-height: 1;
  opacity: 0.35;
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1), transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
}

html[data-theme="light"] .landing-theme-switch__glyph--sun {
  opacity: 1;
  transform: scale(1.08);
}

html[data-theme="dark"] .landing-theme-switch__glyph--moon {
  opacity: 1;
  transform: scale(1.08);
}

.landing-theme-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff, #f1f5f9);
  box-shadow:
    0 2px 8px rgba(15, 23, 42, 0.18),
    0 0 0 1px rgba(15, 23, 42, 0.06);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="dark"] .landing-theme-switch__thumb {
  transform: translateX(26px);
  background: linear-gradient(180deg, #334155, #1e293b);
  box-shadow:
    0 2px 10px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.2);
}

.landing-theme-switch__thumb-icon {
  font-size: 11px;
  line-height: 1;
}

html[data-theme="light"] .landing-theme-switch__thumb-icon--moon {
  display: none;
}

html[data-theme="dark"] .landing-theme-switch__thumb-icon--sun {
  display: none;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text-main);
  background: var(--bg-body);
  font-size: 15px;
  line-height: 1.5;
}

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  text-decoration: none;
}

input,
select,
textarea {
  font-family: inherit;
}

/* ============================================
   BOUTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  background: var(--orange);
  color: #fff;
  padding: 9px 20px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  transition: background .15s;
  white-space: nowrap;
}

.btn:hover {
  background: var(--orange-dark);
}

.btn-secondary {
  background: var(--border);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: #d1d5db;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ============================================
   INPUTS
   ============================================ */
.input {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 9px 12px;
  font-size: 14px;
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, .18);
}

textarea.input {
  resize: vertical;
}

/* ============================================
   BADGES
   ============================================ */
.badge-blue {
  display: inline-block;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ============================================
   TOAST
   ============================================ */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow);
  z-index: 9999;
  min-width: 220px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform .25s, opacity .25s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   PAGE CONNEXION
   ============================================ */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 20px;
  gap: 0;
}

.login-card {
  background: var(--bg-card);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.login-logo-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 900;
  color: #fff;
}

.login-logo-text {
  font-size: 18px;
  font-weight: 800;
}

.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.login-card .subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.role-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.role-tabs [data-role] {
  flex: 1;
  min-width: 80px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  transition: all .12s;
}

.role-tabs [data-role].active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

.login-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.login-actions .btn {
  flex: 1;
}

.login-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ============================================
   HEADER
   ============================================ */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 28px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}

.header-title h1 {
  font-size: 20px;
  font-weight: 800;
}

.header-title p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-user {
  font-size: 13px;
  color: var(--text-muted);
}

.header-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: min(220px, 42vw);
  padding: 4px 10px 4px 4px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-main);
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}

.header-user-chip:hover {
  background: color-mix(in srgb, var(--primary) 8%, var(--bg-main));
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}

.header-user-chip--static {
  cursor: default;
  pointer-events: none;
  user-select: none;
}

.header-user-chip--static:hover {
  background: var(--bg-main);
  border-color: var(--border);
}

.header-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mkn-header-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 88%, #1e293b), var(--primary));
  overflow: hidden;
  flex-shrink: 0;
}

.mkn-header-avatar--photo img,
.mkn-header-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Paramètres : carte photo de profil (une action principale) */
.mkn-settings-photo-card {
  margin: 0 0 20px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 94%, var(--bg-main));
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.mkn-settings-photo-card__head {
  margin-bottom: 14px;
}

.mkn-settings-photo-card__title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.mkn-settings-photo-card__hint {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.mkn-settings-photo-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.mkn-settings-photo-preview {
  width: 104px;
  height: 104px;
  min-width: 104px;
  min-height: 104px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid color-mix(in srgb, var(--primary) 22%, var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.mkn-settings-photo-preview--has-photo {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}

.mkn-settings-photo-preview--loading {
  opacity: 0.72;
  pointer-events: none;
}

.mkn-settings-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mkn-settings-photo-preview__initials {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--primary);
  line-height: 1;
}

.mkn-settings-photo-card__actions {
  flex: 1;
  min-width: min(100%, 200px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.mkn-settings-photo-btn {
  min-height: 44px;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 10px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.mkn-settings-photo-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mkn-settings-photo-btn:not(:disabled):active {
  transform: scale(0.98);
}

.mkn-settings-photo-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mkn-settings-photo-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-muted);
}

.mkn-settings-photo-status {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
}

.mkn-settings-photo-card--directeur {
  margin-bottom: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .mkn-settings-photo-btn {
    transition: none;
  }
  .mkn-settings-photo-btn:not(:disabled):active {
    transform: none;
  }
  .mkn-settings-photo-preview {
    transition: none;
  }
}

.mikn-msg-list-avatar--photo,
.prof-dash-msg-avatar--photo,
.mikn-msg-avatar--photo {
  padding: 0;
  overflow: hidden;
}

.mikn-msg-list-avatar--photo img,
.prof-dash-msg-avatar--photo img,
.mikn-msg-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: inherit;
}

.mikn-msg-list-avatar--photo {
  border-radius: 12px;
}

.prof-dash-msg-avatar--photo,
.mikn-msg-avatar--photo {
  border-radius: 50%;
}

.school-chat-avatar {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 70%, #334155), var(--primary));
  overflow: hidden;
  flex-shrink: 0;
}

.school-chat-avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Avatars prédéfinis (initiales + dégradé) */
.mikn-avatar {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  overflow: hidden;
}
.mikn-avatar--xs {
  width: 22px;
  height: 22px;
  min-width: 22px;
  border-radius: 50%;
  font-size: 9px;
}
.mikn-avatar--sm {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 12px;
  font-size: 13px;
}
.mikn-avatar--md {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  font-size: 11px;
}
.mikn-avatar--lg {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 50%;
  font-size: 12px;
}
.mikn-avatar--xl {
  width: 104px;
  height: 104px;
  min-width: 104px;
  border-radius: 50%;
  font-size: 32px;
  letter-spacing: -0.02em;
}
.mikn-avatar--dash {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  font-size: 13px;
}
.mikn-avatar--picker {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 12px;
  font-size: 15px;
}
.mikn-avatar--fallback {
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 88%, #1e293b), var(--primary));
}
.mkn-header-avatar > .mikn-avatar {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 50%;
  font-size: 11px;
}
.mkn-settings-photo-preview > .mikn-avatar {
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}
.mikn-msg-list-avatar.mikn-avatar {
  border: 1px solid color-mix(in srgb, var(--primary) 25%, var(--border));
}
.mikn-msg-list-avatar.mikn-avatar.mikn-avatar--fallback {
  color: var(--primary);
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 35%, var(--bg-main)), var(--bg-main));
}
.parent-dash-msg-preview-avatar.mikn-avatar {
  margin: 0;
}
.mkn-settings-avatar-row {
  align-items: flex-start !important;
}
.mkn-settings-avatar-actions {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}
.mkn-settings-avatar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 300px;
}
.mkn-settings-avatar-choice {
  margin: 0;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  font: inherit;
  color: inherit;
}
.mkn-settings-avatar-choice:hover {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
}
.mkn-settings-avatar-choice:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.mkn-settings-avatar-choice--selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent);
}
.mkn-settings-avatar-clear--active {
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
}
.mikn-dir-profs-list-avatar {
  align-self: flex-start;
  margin-top: 2px;
}

/* ============================================
   LAYOUT
   ============================================ */
.layout {
  display: flex;
  min-height: calc(100vh - 61px);
}

/* ---- Sidebar ---- */
.sidebar {
  width: 250px;
  background: var(--bg-sidebar);
  color: #e5e7eb;
  padding: 20px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 8px;
}

.logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #fff;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-title {
  font-weight: 700;
  font-size: 14px;
  color: #f1f5f9;
}

.sidebar-subtitle {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.nav-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #475569;
  margin: 18px 0 6px 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: background .12s, color .12s;
  position: relative;
}

.nav-item:hover {
  background: rgba(148, 163, 184, .12);
  color: #e2e8f0;
}

.nav-item.active {
  background: var(--orange);
  color: #fff;
  font-weight: 600;
}

/* White inversion for sidebar icons */
.sidebar .sidebar-nav .nav-item.active .nav-icon,
.sidebar .sidebar-nav .nav-item:hover .nav-icon {
  filter: brightness(0) invert(1);
}

.nav-icon {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

/* Invitation parent : indicateur de chargement (keyframes absentes → spinner « buggé ») */
.invite-send-loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(249, 115, 22, 0.22);
  border-top-color: var(--orange, #f97316);
  border-radius: 50%;
  vertical-align: middle;
  flex-shrink: 0;
  animation: invite-send-spin 0.7s linear infinite;
}

@keyframes invite-send-spin {
  to {
    transform: rotate(360deg);
  }
}

.msg-conv-role--director {
  color: #0f766e !important;
  font-weight: 700;
}

.msg-conv-role--teacher {
  color: #4f46e5 !important;
  font-weight: 600;
}

.nav-badge {
  margin-left: auto;
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  min-width: 22px;
  min-height: 22px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.92), 0 2px 6px rgba(0, 0, 0, 0.25);
  letter-spacing: 0.02em;
}

.nav-item.active .nav-badge {
  box-shadow: 0 0 0 2px var(--orange, #f97316), 0 2px 6px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
  .nav-badge {
    min-width: 24px;
    min-height: 24px;
    font-size: 12px;
    padding: 4px 9px;
  }
}

/* ---- Planning : pastilles liées aux annonces (show_on_planning) ---- */
.planning-sorties-strip {
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.35);
  box-shadow: 0 8px 28px rgba(15, 118, 110, 0.08);
}

.planning-sorties-strip__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.planning-sorties-strip__icon {
  font-size: 22px;
  line-height: 1;
}

.planning-sorties-strip__icon--marker {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #059669;
  flex-shrink: 0;
  align-self: center;
}

.planning-sorties-strip__title {
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.planning-sorties-strip__hint {
  font-size: 11px;
  color: var(--text-muted);
  flex: 1 1 100%;
}

@media (min-width: 640px) {
  .planning-sorties-strip__hint {
    flex: 1 1 auto;
    margin-left: auto;
    text-align: right;
  }
}

.planning-sorties-strip__scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.planning-sorties-strip__card {
  flex: 0 0 auto;
  min-width: 158px;
  max-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid rgba(16, 185, 129, 0.28);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.planning-sorties-strip__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.18);
}

.planning-sorties-strip__card-date {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #059669;
}

.planning-sorties-strip__card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.planning-sorties-strip__card-class {
  font-size: 11px;
  color: var(--text-muted);
}

.planning-day-head--sortie {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.12), transparent);
  border-radius: 10px 10px 0 0;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-bottom: none;
}

.planning-sortie-pill {
  display: inline-block;
  max-width: 100%;
  font-size: 9px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.35);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Grille planning partagée (directeur / prof) : plages libres optionnelles */
.planning-timetable__gap {
  pointer-events: none;
  background: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--text-muted, #64748b) 14%, transparent),
    color-mix(in srgb, var(--text-muted, #64748b) 14%, transparent) 4px,
    color-mix(in srgb, var(--text-muted, #64748b) 6%, transparent) 4px,
    color-mix(in srgb, var(--text-muted, #64748b) 6%, transparent) 8px
  );
  border-radius: 4px;
  opacity: 0.85;
}

@media (prefers-reduced-motion: reduce) {
  .planning-timetable__gap {
    background: color-mix(in srgb, var(--text-muted, #64748b) 12%, transparent);
  }
}

/* ---- Directeur : emploi du temps (bandeaux, liste, récap) ---- */
.dir-planning-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin: -8px 0 16px;
  line-height: 1.55;
}

.dir-planning-panel__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.dir-planning-class-filter {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dir-planning-class-filter__lbl {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.dir-planning-class-filter .input {
  min-width: 200px;
  max-width: 280px;
}

.dir-planning-context {
  margin-bottom: 16px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dir-planning-context__row--primary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 24px;
}

.dir-planning-civil-week {
  flex: 1 1 260px;
  min-width: 0;
}

.dir-planning-civil-week__lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dir-planning-civil-week__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.dir-planning-civil-week__range {
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  flex: 1 1 180px;
  min-width: 0;
  line-height: 1.35;
}

.dir-planning-civil-week__step {
  padding: 6px 12px;
  min-width: 44px;
  min-height: 44px;
}

.dir-planning-civil-week__today {
  padding: 6px 12px;
  font-size: 12px;
  min-height: 44px;
}

.dir-planning-week-type {
  flex: 1 1 220px;
  min-width: 0;
}

.dir-planning-week-type__lbl {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.dir-planning-week-type__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-planning-week-type__btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 999px;
  min-height: 44px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.dir-planning-week-type__btn.is-active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
}

.dir-planning-context__meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}

.dir-planning-context__hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 12px 0 0;
  line-height: 1.45;
}

.dir-modal-planning-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
  line-height: 1.45;
  max-width: 42em;
}

.dir-planning-zone-line {
  font-size: 12px;
  color: var(--text-muted);
  margin: 10px 0 0;
  line-height: 1.5;
}

.dir-planning-zone-link {
  display: inline;
  padding: 2px 8px;
  font-size: 12px;
  margin: 0 2px;
  vertical-align: baseline;
}

.dir-planning-cal-hint__text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.45;
}

.dir-planning-recap {
  margin-bottom: 14px;
}

.dir-planning-recap__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}

.dir-planning-recap__chip {
  flex: 1 1 120px;
  min-width: 100px;
  max-width: 200px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dir-planning-recap__chip--nonschool {
  border-color: color-mix(in srgb, var(--border) 70%, #6366f1);
  background: color-mix(in srgb, var(--bg-main) 92%, rgba(99, 102, 241, 0.08));
}

.dir-planning-recap__chip--empty {
  border-color: color-mix(in srgb, var(--border) 65%, #f97316);
  background: color-mix(in srgb, var(--bg-main) 94%, rgba(249, 115, 22, 0.06));
}

.dir-planning-recap__chip-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main, var(--text));
  line-height: 1.25;
}

.dir-planning-recap__chip-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.dir-planning-recap__chip--banal {
  border-color: color-mix(in srgb, var(--border) 50%, #64748b);
  background: color-mix(in srgb, var(--bg-main) 88%, rgba(100, 116, 139, 0.14));
}

.dir-planning-recap__chip--event {
  border-color: color-mix(in srgb, var(--border) 45%, #c026d3);
  background: color-mix(in srgb, var(--bg-main) 90%, rgba(192, 38, 211, 0.1));
}

.dir-planning-recap__chip--holiday {
  border-color: color-mix(in srgb, var(--border) 45%, #dc2626);
  background: color-mix(in srgb, var(--bg-main) 90%, rgba(220, 38, 38, 0.08));
}

.dir-planning-recap__chip--vacation {
  border-color: color-mix(in srgb, var(--border) 45%, #6366f1);
  background: color-mix(in srgb, var(--bg-main) 90%, rgba(99, 102, 241, 0.1));
}

.dir-planning-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dir-planning-view-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-main);
}

.dir-planning-view-toggle__tab {
  border: none;
  background: transparent;
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease;
}

.dir-planning-view-toggle__tab.is-active {
  background: color-mix(in srgb, var(--primary) 18%, var(--bg-card));
  color: var(--primary);
}

.dir-planning-view-toggle__tab:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  z-index: 1;
}

.dir-planning-gaps-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.dir-planning-gaps-toggle__text {
  line-height: 1.35;
}

.dir-planning-gaps-toggle__switch.toggle-switch {
  margin: 0;
}

.dir-annonces-tab.is-active {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, var(--bg-card));
  color: var(--primary);
  font-weight: 700;
}

.dir-planning-legend-wrap {
  margin-bottom: 12px;
}

.mikn-planning-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}

.mikn-planning-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.mikn-planning-legend__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mikn-planning-legend__dot--vac {
  background: #6366f1;
}

.mikn-planning-legend__dot--hol {
  background: #dc2626;
}

.dir-planning-grid-host {
  min-height: 120px;
}

.dir-planning-grid-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.dir-planning-view--list {
  margin-top: 0;
}

.dir-planning-list-host {
  min-height: 80px;
}

.dir-planning-list__day {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}

.dir-planning-list__day:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.dir-planning-list__day-title {
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main, var(--text));
}

.dir-planning-list__cal-wrap {
  margin: 0 0 12px;
}

.dir-planning-list__cal-wrap .planning-cal-banner {
  text-align: left;
}

.dir-planning-list__day--cal .dir-planning-list__day-title {
  margin-bottom: 6px;
}

.dir-planning-list__day-banner {
  margin: 0 0 10px;
  padding: 8px 12px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
  background: color-mix(in srgb, var(--bg-main) 88%, rgba(99, 102, 241, 0.12));
  border: 1px solid color-mix(in srgb, var(--border) 75%, #6366f1);
  color: var(--text-muted);
}

.dir-planning-list__empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.dir-planning-list__items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dir-planning-list__item {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-left: 4px solid var(--planning-accent, var(--primary));
}

.dir-planning-list__item-time {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--planning-accent, var(--primary));
  min-width: 108px;
}

.dir-planning-list__item-body {
  flex: 1 1 200px;
  min-width: 0;
}

.dir-planning-list__item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main, var(--text));
  line-height: 1.35;
}

.dir-planning-list__week {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 6px;
  background: color-mix(in srgb, var(--planning-accent, var(--primary)) 16%, transparent);
  color: var(--planning-accent, var(--primary));
  vertical-align: middle;
}

.dir-planning-list__item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
}

.dir-planning-list__meta-tag {
  font-size: 11px;
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-main) 92%, var(--border));
}

.dir-planning-list__del {
  flex: 0 0 auto;
  align-self: center;
  font-size: 12px;
  padding: 6px 12px;
  min-height: 40px;
}

.dir-school-hours-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---- Main content ---- */
.main-content {
  flex: 1;
  padding: 28px 32px 48px;
  background: var(--bg-main);
  overflow-x: hidden;
}

/* ============================================
   VUES
   ============================================ */
.view {
  display: none;
}

.view.active {
  display: block;
}

/* ============================================
   CARTES STATS
   ============================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.card-icon-yellow {
  background: #fef3c7;
}

.card-icon-blue {
  background: #dbeafe;
}

.card-icon-green {
  background: #d1fae5;
}

.card-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.card-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  margin-top: 20px;
}

/* ─── Professeur — tableau de bord : confort / compact (barre = .dir-dashboard-toolbar) ─── */
.prof-dashboard-mosaic {
  display: grid;
  gap: 16px;
  align-items: start;
}

@media (max-width: 767px) {
  #view-dashboard.prof-dash--large .prof-dashboard-mosaic,
  #view-dashboard.prof-dash--compact .prof-dashboard-mosaic {
    grid-template-columns: 1fr;
  }

  #view-dashboard.prof-dash--large .prof-dash-mosaic-item,
  #view-dashboard.prof-dash--compact .prof-dash-mosaic-item {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  #view-dashboard.prof-dash--large .prof-dashboard-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #view-dashboard.prof-dash--compact .prof-dashboard-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  /* Confort : bandeau KPI sur toute la largeur. Compact : une colonne en desktop (≥1024) pour laisser un widget à côté. */
  #view-dashboard.prof-dash--large .prof-dashboard-mosaic .prof-dash-mosaic-item[data-prof-dash-widget="cards"] {
    grid-column: 1 / -1;
  }
}

/* Compact tablette : KPI sur toute la ligne pour une sous-grille 2×2 lisible */
@media (min-width: 768px) and (max-width: 1023px) {
  #view-dashboard.prof-dash--compact .prof-dashboard-mosaic .prof-dash-mosaic-item[data-prof-dash-widget="cards"] {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  #view-dashboard.prof-dash--compact .prof-dashboard-mosaic {
    gap: 12px;
  }
}

#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .panel {
  padding: 13px 16px;
}

/* Widget « Messages récents » prof : liste avec avatar / initiales */
.prof-dash-msg-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.prof-dash-msg-li {
  margin: 0;
  padding: 0;
}

.prof-dash-msg-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 12px 4px;
  margin: 0;
  border: none;
  border-bottom: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border-radius: 10px;
  transition: background 0.18s ease;
  box-sizing: border-box;
}

.prof-dash-msg-row:hover {
  background: color-mix(in srgb, var(--primary) 6%, var(--bg-main));
}

.prof-dash-msg-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.prof-dash-msg-li:last-child .prof-dash-msg-row {
  border-bottom: none;
}

.prof-dash-msg-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 88%, #1e293b), var(--primary));
}

.prof-dash-msg-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.prof-dash-msg-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.prof-dash-msg-name {
  font-weight: 700;
  font-size: 14px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prof-dash-msg-time {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.prof-dash-msg-role {
  font-size: 11px;
  color: var(--text-muted);
}

.prof-dash-msg-snippet {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.prof-dash-mosaic-item {
  min-width: 0;
}

.prof-dash-mosaic-item > .cards,
.prof-dash-mosaic-item > .panel {
  margin-top: 0;
  margin-bottom: 0;
}

.prof-dash-mosaic__chrome {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-main);
  border: 1px dashed var(--border);
}

.prof-dash-mosaic__chrome[hidden] {
  display: none !important;
}

#view-dashboard.prof-dashboard--edit .prof-dash-mosaic__chrome:not([hidden]) {
  display: flex;
}

.prof-dash-mosaic__handle {
  cursor: grab;
  padding: 8px 14px !important;
  min-height: 44px;
  min-width: 44px;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.prof-dash-mosaic__handle:active {
  cursor: grabbing;
}

.prof-dash-mosaic__vis-wrap,
.dir-dash-mosaic__vis-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.prof-dash-mosaic__vis-lbl,
.dir-dash-mosaic__vis-lbl {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  user-select: none;
}

.prof-dash-mosaic__vis.toggle-switch,
.dir-dash-mosaic__vis.toggle-switch {
  flex-shrink: 0;
}

#view-dashboard.prof-dashboard--edit .prof-dash-mosaic-item.prof-dash-mosaic-item--off > :not(.prof-dash-mosaic__chrome) {
  opacity: 0.48;
}

#view-dashboard.dir-dashboard--edit .dir-dash-mosaic-item.dir-dash-mosaic-item--off > :not(.dir-dash-mosaic__chrome) {
  opacity: 0.48;
}

/* Directeur — tableau de bord mosaïque (réordonnancement, largeur) */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dir-dashboard-toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

/* Aligné sur prof-dashboard-toolbar__row : titre + contrôles sur une ligne quand la place le permet */
.dir-dashboard-toolbar__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  justify-content: space-between;
  width: 100%;
}

.dir-dashboard-toolbar__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.dir-dashboard-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}

/* Libellé à gauche du select (plus compact que la pile label / champ) */
.dir-dashboard-toolbar__preset {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-width: 0;
}

.dir-dashboard-toolbar__preset-lbl {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.dir-dashboard-toolbar__field .input,
.dir-dashboard-toolbar__preset .input {
  min-height: 44px;
}

.dir-dashboard-toolbar__select {
  width: auto;
  min-width: min(11.5rem, 100vw - 8rem);
  max-width: 14rem;
}

.dir-dashboard-toolbar__preset .mikn-cdd {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 14rem;
}

.dir-dashboard-toolbar__edit-btn {
  font-size: 13px;
  padding: 9px 14px;
  min-height: 44px;
}

.dir-dashboard-toolbar__hint {
  margin: 0;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Select « Modèle » / « Affichage » : au-dessus des tuiles (stacking + pas de clip du menu natif) */
#view-dashboard.view.active {
  position: relative;
  z-index: 0;
  overflow: visible;
}

#view-dashboard .dir-dashboard-toolbar {
  position: relative;
  z-index: 40;
  overflow: visible;
  /* pas d’isolation : sinon le menu mikn-cdd (z-index élevé) reste confiné au contexte de la barre */
}

/* Liste Modèle / Affichage : ancrée au trigger, largeur ≥ bouton, au-dessus de la mosaïque (évite reflow page) */
#view-dashboard .dir-dashboard-toolbar__preset .mikn-cdd-menu:not(.mikn-cdd-menu--fixed) {
  left: 0;
  right: auto;
  min-width: 100%;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2rem));
}

#view-dashboard .dir-dashboard-toolbar__actions {
  position: relative;
  z-index: 1;
}

#view-dashboard .dir-dashboard-mosaic {
  position: relative;
  z-index: 1;
}

#view-dashboard .dir-dash-mosaic-item {
  position: relative;
  z-index: 0;
}

@supports (overflow: clip) {
  /* Uniquement espace directeur (évite d’élargir le clip sur prof/parent qui ont aussi #view-dashboard) */
  body.mikn-app .layout > .main-content:has(#dirDashboardMosaic) {
    overflow-x: clip;
    overflow-y: visible;
  }
}

/* ─── Mosaïque directeur : layout global large / compact (pas de --col-6 par widget) ─── */
.dir-dashboard-mosaic {
  display: grid;
  align-items: start;
}

/* Mobile (max 767px) : une colonne, widgets empilés */
@media (max-width: 767px) {
  #view-dashboard.dir-dash--large .dir-dashboard-mosaic {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  #view-dashboard.dir-dash--compact .dir-dashboard-mosaic {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  #view-dashboard.dir-dash--large .dir-dash-mosaic-item,
  #view-dashboard.dir-dash--compact .dir-dash-mosaic-item {
    grid-column: 1 / -1;
  }
}

/* Tablette + desktop ≥ 768px : 2 colonnes (~50 % / bloc) */
@media (min-width: 768px) {
  #view-dashboard.dir-dash--large .dir-dashboard-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  #view-dashboard.dir-dash--compact .dir-dashboard-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  #view-dashboard.dir-dash--large .dir-dash-mosaic-item,
  #view-dashboard.dir-dash--compact .dir-dash-mosaic-item {
    min-width: 0;
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  #view-dashboard.dir-dash--compact .dir-dashboard-mosaic {
    gap: 12px;
  }
}

.dir-dash-mosaic-item .panel-header {
  align-items: flex-start;
}

#view-dashboard.dir-dash--large .dir-dash-mosaic-item .panel-header h2 {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
  font-size: 16px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item .panel-header h2 {
  min-width: 0;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
  font-size: 14px;
}

.dir-dash-mosaic-item .panel-header .btn {
  flex-shrink: 0;
}

#view-dashboard.dir-dash--large .dir-dash-mosaic-item > .cards,
#view-dashboard.dir-dash--large .dir-dash-mosaic-item > .panel {
  margin-top: 0;
  margin-bottom: 0;
  min-width: 0;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards,
#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .panel,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .panel {
  margin-top: 0;
  margin-bottom: 0;
  min-width: 0;
  padding: 13px 16px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item .panel-header,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item .panel-header {
  margin-bottom: 10px;
  gap: 8px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards {
  gap: 10px;
  padding: 12px 14px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards .card,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards .card {
  padding: 12px 14px;
  gap: 10px;
  min-height: 0;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards .card-icon,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards .card-icon {
  width: 40px;
  height: 40px;
  font-size: 20px;
  border-radius: 11px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards .card-value,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards .card-value {
  font-size: 20px;
}

#view-dashboard.dir-dash--compact .dir-dash-mosaic-item > .cards .card-label,
#view-dashboard.prof-dash--compact .prof-dash-mosaic-item > .cards .card-label {
  font-size: 12px;
  margin-top: 2px;
}

#view-dashboard.dir-dash--compact #dirDashShortcuts {
  gap: 8px !important;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)) !important;
}

#view-dashboard.dir-dash--large #dirDashShortcuts {
  gap: 12px !important;
}

@media (max-width: 767px) {
  #view-dashboard .dir-dashboard-toolbar {
    padding: 10px 12px;
    margin-bottom: 12px;
    gap: 6px;
  }

  #view-dashboard .dir-dashboard-toolbar__row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  #view-dashboard .dir-dashboard-toolbar__actions {
    flex-direction: column;
    align-items: stretch;
  }

  #view-dashboard .dir-dashboard-toolbar__preset {
    width: 100%;
  }

  #view-dashboard .dir-dashboard-toolbar__select {
    min-width: 0;
    width: 100%;
    max-width: none;
  }

  #view-dashboard .dir-dashboard-toolbar__preset .mikn-cdd {
    max-width: none;
    width: 100%;
  }

  #view-dashboard.dir-dash--compact .dir-dashboard-toolbar {
    padding: 10px 12px;
    margin-bottom: 12px;
  }
}

/*
 * KPI directeur : en Confort, le bloc stats occupe toute la largeur (2 colonnes mosaïque).
 * En Compact desktop, le bloc stats ne span qu’une colonne (~50 %) pour laisser un autre widget à côté ;
 * les 4 KPI restent en grille 2×2 à l’intérieur (#dirDashCards).
 */
@media (min-width: 768px) {
  #view-dashboard.dir-dash--large .dir-dash-mosaic-item[data-dir-dash-section="stats"] {
    grid-column: 1 / -1;
  }
}

#dirDashCards {
  display: grid;
  align-items: stretch;
  gap: 16px;
}

/* ─── KPI prof (#dashCards.prof-kpi-grid) : sous-grille indépendante du directeur ─── */
#dashCards.prof-kpi-grid {
  display: grid;
  align-items: stretch;
}

/* Confort prof : aligné sur la grille KPI directeur (bandeau pleine largeur) */
#view-dashboard.prof-dash--large #dashCards.prof-kpi-grid {
  gap: 16px;
}

/* Compact prof : densité type directeur compact */
#view-dashboard.prof-dash--compact #dashCards.prof-kpi-grid {
  gap: 10px;
}

/* Mobile : 1 carte par ligne */
@media (max-width: 767px) {
  #dirDashCards {
    grid-template-columns: 1fr;
  }

  #view-dashboard.prof-dash--large #dashCards.prof-kpi-grid,
  #view-dashboard.prof-dash--compact #dashCards.prof-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablette : directeur & prof confort → 2×2 puis 4 colonnes au desktop */
@media (min-width: 768px) and (max-width: 1023px) {
  #dirDashCards {
    grid-template-columns: repeat(2, minmax(11.5rem, 1fr));
  }

  #view-dashboard.prof-dash--large #dashCards.prof-kpi-grid {
    grid-template-columns: repeat(2, minmax(11.5rem, 1fr));
  }

  /* Compact prof : 2×2 avec mini lisible sur toute la largeur du bloc */
  #view-dashboard.prof-dash--compact #dashCards.prof-kpi-grid {
    grid-template-columns: repeat(2, minmax(min(100%, 10.75rem), 1fr));
  }
}

@media (min-width: 1024px) {
  #dirDashCards {
    grid-template-columns: repeat(4, minmax(10.5rem, 1fr));
  }

  #view-dashboard.prof-dash--large #dashCards.prof-kpi-grid {
    grid-template-columns: repeat(4, minmax(10.5rem, 1fr));
  }

  /* Compact prof desktop : une demi-colonne mosaïque → 2×2 à l’intérieur */
  #view-dashboard.prof-dash--compact #dashCards.prof-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mode compact directeur : grille 2×2 sur tablette & desktop */
@media (min-width: 768px) {
  #view-dashboard.dir-dash--compact #dirDashCards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

#dirDashCards .card,
#dashCards .card {
  flex-direction: row;
  align-items: center;
  align-self: stretch;
  min-height: 4.75rem;
  height: auto;
  box-sizing: border-box;
}

#dirDashCards .card-content,
#dashCards .card-content {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  writing-mode: horizontal-tb;
}

#dirDashCards .card-value,
#dashCards .card-value {
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: normal;
  overflow-wrap: normal;
  line-height: 1.15;
}

#dirDashCards .card-label,
#dashCards .card-label {
  writing-mode: horizontal-tb;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  line-height: 1.35;
  font-size: 13px;
  max-width: 100%;
}

#view-dashboard.dir-dash--compact #dirDashCards .card,
#view-dashboard.prof-dash--compact #dashCards .card {
  min-height: 4.25rem;
}

#view-dashboard.dir-dash--compact #dirDashCards .card-label,
#view-dashboard.prof-dash--compact #dashCards .card-label {
  font-size: 12px;
  line-height: 1.32;
}

#view-dashboard.dir-dash--compact #dirDashCards .card-value,
#view-dashboard.prof-dash--compact #dashCards .card-value {
  font-size: 20px;
}

.dir-dash-mosaic__chrome {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg-main);
  border: 1px dashed var(--border);
}

.dir-dash-mosaic__chrome[hidden] {
  display: none !important;
}

#view-dashboard.dir-dashboard--edit .dir-dash-mosaic__chrome:not([hidden]) {
  display: flex;
}

.dir-dash-mosaic__handle {
  cursor: grab;
  padding: 8px 14px !important;
  min-height: 44px;
  min-width: 44px;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.dir-dash-mosaic__handle:active {
  cursor: grabbing;
}

.sortable-ghost.dir-dash-mosaic-item {
  opacity: 0.4;
}

.sortable-chosen.dir-dash-mosaic-item {
  box-shadow: var(--shadow-card-hover);
}

@media (prefers-reduced-motion: reduce) {
  .sortable-ghost.dir-dash-mosaic-item,
  .sortable-chosen.dir-dash-mosaic-item {
    transition: none;
  }
}

/* ============================================
   PANELS
   ============================================ */
.panel {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px 22px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.panel:last-child {
  margin-bottom: 0;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.panel-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.panel-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 14px;
}

/* ============================================
   QUICK ACTIONS
   ============================================ */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

/* ============================================
   TOGGLE SWITCH (iOS style)
   ============================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .toggle-slider {
  background-color: #475569;
}

.toggle-switch input:checked+.toggle-slider {
  background-color: #34c759;
}

[data-theme="dark"] .toggle-switch input:checked+.toggle-slider {
  background-color: #30d158;
}

.toggle-switch input:focus-visible+.toggle-slider {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

.toggle-switch input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

/* Paramètres professeur : grille 2 colonnes (évite de tout empiler verticalement) */
.prof-settings-panel {
  max-width: 1100px;
  margin: 0 auto;
}

.prof-settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 36px;
  align-items: start;
}

@media (max-width: 900px) {
  .prof-settings-grid {
    grid-template-columns: 1fr;
  }
}

.prof-settings-col--sidebar {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px 14px;
  background: var(--bg-main);
  max-height: min(70vh, 620px);
  overflow-y: auto;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .prof-settings-col--sidebar {
  background: rgba(15, 23, 42, 0.35);
}

.prof-settings-section {
  margin: 0;
}

.prof-settings-section h3 {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}

.prof-settings-main-stack > .prof-settings-section + .prof-settings-section {
  margin-top: 22px;
}

.prof-settings-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  width: 100%;
  transition: background .12s, border-color .12s;
}

.action-btn:hover {
  background: var(--bg-body);
  border-color: var(--orange);
  color: var(--orange);
}

[data-theme="dark"] .action-btn {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

[data-theme="dark"] .action-btn:hover {
  background: #1e293b;
  border-color: var(--orange);
  color: var(--orange);
}

.action-icon {
  font-size: 20px;
}

.action-hint {
  display: flex;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 2px 4px;
}

/* ============================================
   TABLEAU
   ============================================ */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th {
  text-align: left;
  padding: 8px 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
  border-bottom: none;
}

.table-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 0 !important;
}

/* ============================================
   LIST ITEMS
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.list-item:last-child {
  border-bottom: none;
}

/* ============================================
   PLAN DE CLASSE
   ============================================ */
.plan-grid-empty {
  padding: 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ============================================
   MODALS
   ============================================ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .55);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

[data-theme="dark"] .modal {
  background: rgba(0, 0, 0, .75);
}

.modal.show {
  display: flex;
}

/* Modale classe (prof / directeur) : corps scrollable si la liste d’élèves est longue */
#modalClass .modal-body,
#modalDirCreateClass .modal-body {
  max-height: min(72vh, 620px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Bloc intégré « élèves disponibles » dans la modale classe */
.class-modal-orphan-toggle {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.class-modal-orphan-toggle:hover {
  opacity: 0.88;
}

.class-modal-orphan-expand {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed color-mix(in srgb, var(--border) 90%, var(--primary));
}

.class-modal-orphan-expand__title {
  font-size: 14px;
  margin: 0 0 6px;
  font-weight: 700;
}

.class-modal-orphan-expand__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.class-modal-orphan-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  background: var(--bg-main);
}

.class-modal-orphan-list .class-modal-orphan-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
}

.class-modal-orphan-list .class-modal-orphan-row input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 3px;
}

.class-modal-orphan-list .class-modal-orphan-row > span:last-child {
  min-width: 0;
  flex: 1;
}

.class-modal-orphan-list .class-modal-orphan-row:last-child {
  border-bottom: none;
}

.class-modal-orphan-row__meta {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

.class-modal-orphan-confirm {
  margin-top: 12px;
  width: 100%;
}

.modal-content {
  background: var(--bg-card);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, .2);
  margin: auto;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 0;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  line-height: 1;
}

.modal-close:hover {
  background: var(--border);
}

/* Calendrier établissement (directeur) : import fériés + liste éditable */
.dir-cal-import-card {
  margin-bottom: 16px;
  padding: 12px;
  background: var(--bg-main);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dir-cal-import-card__row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
}

.dir-cal-import-card__field {
  margin: 0;
  flex: 1;
  min-width: 140px;
}

.dir-cal-import-card__field--btn {
  flex: 1 1 200px;
  max-width: 280px;
}

.dir-cal-import-card__btn-label {
  display: block;
  font-size: 12px;
  min-height: 1.2em;
}

.dir-cal-section {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border);
}

.dir-cal-section:last-child {
  border-bottom: none;
}

.dir-cal-section__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 6px;
}

.dir-cal-section__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.45;
}

.dir-cal-section__empty {
  margin: 8px 12px !important;
}

.dir-cal-section--other {
  margin-top: 14px;
}

.dir-cal-hol-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  align-items: flex-end;
}

.dir-cal-hol-row:last-child {
  border-bottom: none;
}

.dir-cal-hol-row__fields {
  flex: 1 1 220px;
  min-width: 0;
}

.dir-cal-hol-row__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.dir-cal-hol-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
}

.dir-cal-hol-title,
.dir-cal-hol-date {
  min-height: 44px;
  width: 100%;
  box-sizing: border-box;
}

.dir-cal-hol-date {
  max-width: 200px;
}

.dir-cal-hol-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 6px;
}

.dir-cal-hol-src {
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.85;
  margin-top: 2px;
  word-break: break-all;
}

.dir-cal-hol-btn {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 12px;
}

.dir-cal-other-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.dir-cal-other-row:last-child {
  border-bottom: none;
}

.dir-cal-other-row__main {
  flex: 1;
  min-width: 200px;
}

.dir-cal-other-row__title {
  font-weight: 600;
  font-size: 13px;
}

.dir-cal-other-row__meta {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.dir-cal-other-row__src {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
}

.dir-cal-modal-shell {
  max-width: 640px;
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.dir-cal-modal-header {
  flex-shrink: 0;
}

.dir-cal-modal-body {
  gap: 16px;
}

.dir-cal-lead {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

.dir-cal-panel__title {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 6px;
}

.dir-cal-panel__hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  line-height: 1.4;
}

.dir-cal-panel__field {
  margin-bottom: 0;
}

.dir-cal-panel--import {
  padding: 12px;
  background: var(--bg-main);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.dir-cal-import-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

@media (max-width: 480px) {
  .dir-cal-import-grid {
    grid-template-columns: 1fr;
  }
}

.dir-cal-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dir-cal-actions-row--reset {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.dir-cal-action-primary {
  flex: 1;
  min-width: 160px;
  min-height: 44px;
}

.dir-cal-reset-btn {
  flex: 1;
  min-width: 140px;
  min-height: 44px;
  font-size: 12px;
}

.dir-cal-manual-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.dir-cal-manual-grid__full {
  grid-column: 1 / -1;
}

@media (max-width: 540px) {
  .dir-cal-manual-grid {
    grid-template-columns: 1fr;
  }

  .dir-cal-manual-grid__full {
    grid-column: 1;
  }
}

.dir-cal-manual-submit {
  width: 100%;
  min-height: 44px;
}

.dir-cal-entries-scroll {
  max-height: min(520px, 55vh);
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-main);
  min-height: 120px;
}

.dir-cal-entries-inner {
  min-height: 72px;
}

.dir-cal-entries-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.dir-cal-entries-header__title {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
}

.dir-cal-entries-count {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.dir-cal-entries-loading,
.dir-cal-entries-fallback {
  padding: 14px 16px;
  margin: 0;
}

.dir-cal-section__hint {
  margin-bottom: 8px;
}

.modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 24px 20px;
}

/* Modal annonce directeur : liste des classes */
.dir-annonce-classes-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--text-muted) 40%, transparent) transparent;
}

.dir-annonce-classes-list::-webkit-scrollbar {
  width: 8px;
}

.dir-annonce-classes-list::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 45%, transparent);
  border-radius: 999px;
}

.prof-annonce-student-picker {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-card);
  box-shadow: 0 2px 10px var(--shadow-color, rgba(15, 23, 42, 0.05));
  scrollbar-width: thin;
}

.prof-annonce-student-picker::-webkit-scrollbar {
  width: 8px;
}

.prof-annonce-student-picker::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-muted) 45%, transparent);
  border-radius: 999px;
}

.dir-annonce-class-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 13px;
  transition: background 0.15s, border-color 0.15s;
}
.dir-annonce-class-item:hover {
  background: var(--bg-main);
  border-color: var(--text-muted);
}
.dir-annonce-class-item input {
  margin: 0;
  accent-color: var(--orange, #f97316);
}
.modal-annonce-directeur .modal-header {
  padding: 20px 24px 12px;
}
.modal-annonce-directeur .modal-body {
  max-height: 65vh;
  overflow-y: auto;
}

/* Confirmation publication annonce directeur */
.dir-annonce-success-block {
  padding: 32px 24px;
  text-align: center;
}
.dir-annonce-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dir-annonce-success-pop 0.4s ease-out;
}
.dir-annonce-success-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
}
@keyframes dir-annonce-success-pop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* ─── Planning : bandeaux jours calendrier (banalisé, événement, etc.) ─── */
.planning-cal-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 8px 4px 0;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
  border: 1px solid transparent;
  box-shadow: 0 1px 3px var(--shadow-color, rgba(15, 23, 42, 0.06));
}

.planning-cal-banner__ic {
  font-size: 16px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.planning-cal-banner__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.planning-cal-banner__body strong {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.planning-cal-banner__hint {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.88;
}

.planning-cal-banner__sub {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.92;
  display: block;
  margin-top: 2px;
  word-break: break-word;
}

.planning-cal-banner--vacation {
  background: color-mix(in srgb, var(--bg-card) 82%, rgba(99, 102, 241, 0.22));
  border-color: color-mix(in srgb, var(--border) 55%, #6366f1);
  color: var(--text-main);
}

.planning-cal-banner--holiday {
  background: color-mix(in srgb, var(--bg-card) 82%, rgba(220, 38, 38, 0.16));
  border-color: color-mix(in srgb, var(--border) 50%, #f87171);
  color: var(--text-main);
}

.planning-cal-banner--banal {
  background: color-mix(in srgb, var(--bg-card) 78%, rgba(71, 85, 105, 0.28));
  border-color: color-mix(in srgb, var(--border) 40%, #64748b);
  color: var(--text-main);
}

.planning-cal-banner--closure {
  background: color-mix(in srgb, var(--bg-card) 82%, rgba(51, 65, 85, 0.2));
  border-color: color-mix(in srgb, var(--border) 50%, #475569);
  color: var(--text-main);
}

.planning-cal-banner--event {
  background: color-mix(in srgb, var(--bg-card) 82%, rgba(192, 38, 211, 0.16));
  border-color: color-mix(in srgb, var(--border) 45%, #d946ef);
  color: var(--text-main);
}

.planning-day-head--cal-emph {
  outline: 2px solid color-mix(in srgb, var(--primary) 35%, transparent);
  outline-offset: 1px;
}

.planning-timetable-col--cal-emph {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent);
}

.planning-day-head__title {
  margin-bottom: 2px;
}

.parent-planning-day-col--cal {
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--bg-main) 96%, rgba(99, 102, 241, 0.04));
}

/* ─── Annonces : cartes flux (directeur + prof) ─── */
.mikn-annonce-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mikn-annonce-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-card, 0 1px 2px rgba(15, 23, 42, 0.04));
  padding: 16px 18px;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.mikn-annonce-card:hover {
  box-shadow: var(--shadow-card-hover, 0 8px 28px rgba(15, 23, 42, 0.08));
  border-color: color-mix(in srgb, var(--border) 70%, var(--primary));
}

.mikn-annonce-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.mikn-annonce-card__identity {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.mikn-annonce-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, #0d9488, #6366f1);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.mikn-annonce-card__avatar--global {
  background: linear-gradient(135deg, #0d9488, #c026d3);
}

.mikn-annonce-card__avatar--teacher {
  background: linear-gradient(135deg, #6366f1, #4f8ef7);
  font-size: 12px;
}

.mikn-annonce-card__identity-text {
  min-width: 0;
}

.mikn-annonce-card__title {
  margin: 0 0 4px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-main);
}

.mikn-annonce-card__byline {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.mikn-annonce-card__author {
  font-weight: 600;
  color: var(--text-main);
}

.mikn-annonce-card__sep {
  opacity: 0.5;
}

.mikn-annonce-card__badge-role {
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6366f1;
  background: color-mix(in srgb, var(--bg-main) 88%, #6366f1);
  padding: 2px 8px;
  border-radius: 999px;
}

.mikn-annonce-card__expired {
  color: #dc2626;
  font-weight: 700;
}

.mikn-annonce-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.mikn-annonce-card__del {
  color: #b91c1c !important;
  border-color: color-mix(in srgb, #fecaca 60%, var(--border)) !important;
}

.mikn-annonce-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.mikn-annonce-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
}

.mikn-annonce-chip--muted {
  font-weight: 600;
  color: var(--text-muted);
}

.mikn-annonce-chip--planning {
  background: color-mix(in srgb, #d1fae5 55%, var(--bg-main));
  border-color: color-mix(in srgb, #6ee7b7 40%, var(--border));
  color: #047857;
}

.mikn-annonce-chip--type {
  background: color-mix(in srgb, #e0e7ff 45%, var(--bg-main));
  border-color: color-mix(in srgb, #a5b4fc 35%, var(--border));
  color: #3730a3;
}

.mikn-annonce-chip--approval {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

.mikn-annonce-chip--sortie {
  background: linear-gradient(135deg, #d1fae5, #ccfbf1);
  color: #047857;
  border-color: #99f6e4;
}

.mikn-annonce-chip--info {
  background: #dbeafe;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.mikn-annonce-chip--dir {
  background: color-mix(in srgb, #ccfbf1 55%, var(--bg-main));
  color: #0f766e;
  border-color: #99f6e4;
}

.mikn-annonce-card__body {
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  color: var(--text-main);
}

.mikn-annonce-card__body--muted {
  color: var(--text-muted);
  font-size: 13px;
}

.mikn-annonce-card__planning-line {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #047857;
}

.mikn-annonce-card__progress {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-main);
  border: 1px solid var(--border);
}

.mikn-annonce-card__progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

.mikn-annonce-card__progress-count {
  color: var(--text-muted);
  font-weight: 600;
}

.mikn-annonce-card__progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.mikn-annonce-card__progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #16a34a, #22c55e);
  transition: width 0.35s ease;
}

.mikn-annonce-card__progress-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
}

.mikn-ann--ok { color: #16a34a; }
.mikn-ann--wait { color: #ea580c; }
.mikn-ann--no { color: #dc2626; }

.mikn-annonce-card__foot {
  margin: 10px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.mikn-annonce-card__attach {
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #2563eb;
  background: #dbeafe;
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
}

/* Selects modales annonces : menu plus lisible */
.mikn-select-elevated,
.modal-annonce-directeur select.input,
#modalAnnonce select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1 1.5L6 6l5-4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px !important;
  box-shadow: 0 2px 10px var(--shadow-color, rgba(15, 23, 42, 0.06));
  border-radius: 12px !important;
  font-weight: 500;
}

.mikn-select-elevated:focus,
.modal-annonce-directeur select.input:focus,
#modalAnnonce select.input:focus {
  outline: none;
  border-color: var(--primary, #f97316);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent), 0 4px 14px var(--shadow-color, rgba(15, 23, 42, 0.08));
}

/* Messagerie : cartes conversation (rail gauche type chat moderne) */
.msg-conv-card {
  width: 100%;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  border-left: 4px solid transparent;
  background: color-mix(in srgb, var(--bg-card) 88%, var(--mikn-msg-thread-bg));
  cursor: pointer;
  touch-action: manipulation;
  margin-bottom: 6px;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}
.msg-conv-card:hover {
  background: color-mix(in srgb, var(--bg-card) 100%, var(--primary) 6%);
  border-color: color-mix(in srgb, var(--border) 70%, var(--primary));
  border-left-color: color-mix(in srgb, var(--primary) 35%, transparent);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.mikn-msg-rail .msg-conv-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.msg-conv-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mikn-msg-rail .msg-conv-role {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.msg-conv-role {
  font-size: 12px;
  color: #0d9488;
  font-weight: 500;
}
.msg-conv-role.prof-role { color: #6366f1; }
.msg-conv-role.director-role { color: #0d9488; }
.mikn-msg-rail .msg-conv-snippet {
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-conv-snippet {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-thread-header-name { font-weight: 700; font-size: 16px; color: var(--text-main); }
.msg-thread-header-role { font-size: 13px; color: #0d9488; margin-top: 2px; }
.msg-thread-header-role.prof-role { color: #6366f1; }
.msg-thread-header-role.director-role { color: #0d9488; }
.msg-list-col { width: 260px; max-width: 260px; min-width: 260px; flex-shrink: 0; border-right: 1px solid var(--border); padding-right: 14px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
.msg-thread-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
/* Conversation active : accent gauche + fond teinté MIKN */
.msg-conv-card.msg-conv-selected {
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border)) !important;
  border-left: 4px solid var(--primary) !important;
  background: var(--mikn-msg-accent-soft) !important;
  box-shadow: 0 2px 14px color-mix(in srgb, var(--primary) 12%, transparent);
  color: inherit !important;
}
.msg-conv-card.msg-conv-selected .msg-conv-name { color: var(--text-main) !important; }
.msg-conv-card.msg-conv-selected .msg-conv-role,
.msg-conv-card.msg-conv-selected .msg-conv-role.prof-role { color: var(--text-muted) !important; }
.msg-conv-card.msg-conv-selected .msg-conv-snippet { color: var(--text-muted) !important; }

/* Zone des bulles (héritage pages sans surface dédiée) */
.msg-thread-bubbles {
  width: 100%;
  padding: 16px 0 24px 12px;
  min-height: 120px;
  background: var(--mikn-msg-thread-bg);
  border-radius: 12px;
  box-sizing: border-box;
}
.msg-bubble-wrap { max-width: min(92%, 720px); }
.msg-bubble-wrap.msg-bubble-wrap-them {
  width: auto;
  min-width: 0;
  max-width: min(92%, 720px);
}
.msg-bubble-wrap.msg-bubble-wrap-them .msg-bubble { width: 100%; box-sizing: border-box; }
.msg-bubble-wrap.msg-bubble-wrap-mine { width: auto; max-width: min(92%, 720px); margin-left: auto; }
.msg-bubble {
  padding: 14px 18px 10px;
  border-radius: 20px;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.01em;
  max-width: 100%;
}
.msg-bubble-mine {
  background: linear-gradient(145deg, color-mix(in srgb, var(--mikn-msg-sent-bg) 92%, #fff), var(--mikn-msg-sent-bg));
  color: var(--mikn-msg-sent-fg);
  border: 1px solid color-mix(in srgb, var(--mikn-msg-sent-bg) 55%, #000);
  border-radius: 20px 20px 6px 20px;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 22%, transparent), 0 1px 2px rgba(15, 23, 42, 0.06);
}
.msg-bubble-them {
  background: var(--mikn-msg-received-bg);
  color: var(--text-main);
  border: 1px solid var(--mikn-msg-received-border);
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.msg-bubble-content { word-break: break-word; }
.msg-bubble-time {
  font-size: 10px;
  opacity: 0.85;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.msg-bubble-mine .msg-bubble-time { color: color-mix(in srgb, var(--mikn-msg-sent-fg) 75%, transparent); }
.msg-bubble-them .msg-bubble-time { color: var(--text-muted); }

/* —— Messagerie MIKN (fil, pièces jointes, layout responsive) —— */
.mikn-messaging-thread-scroll {
  scrollbar-gutter: stable;
}
.mikn-messaging-thread-surface {
  background: var(--mikn-msg-thread-bg);
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--border) 75%, transparent);
  box-sizing: border-box;
}
.mikn-msg-thread-bubbles.msg-thread-bubbles {
  background: transparent;
  border-radius: 0;
  padding: 16px 16px 24px;
  min-height: 80px;
}
@keyframes mikn-msg-bubble-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.mikn-msg-thread-bubbles--enter .mikn-message-bubble {
  opacity: 0;
}
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble {
  animation: mikn-msg-bubble-in 0.34s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(1) { animation-delay: 0ms; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(2) { animation-delay: 0.02s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(3) { animation-delay: 0.04s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(4) { animation-delay: 0.06s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(5) { animation-delay: 0.08s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(6) { animation-delay: 0.1s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(7) { animation-delay: 0.12s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(8) { animation-delay: 0.14s; }
.mikn-msg-thread-bubbles--enter-active .mikn-message-bubble:nth-child(n + 9) { animation-delay: 0.16s; }
.mikn-msg-thread-bubbles--enter-active .mikn-msg-date-sep {
  animation: mikn-msg-bubble-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.mikn-msg-date-sep {
  display: flex;
  justify-content: center;
  margin: 28px 0 20px;
  color: var(--text-muted);
}
.mikn-msg-date-sep::before,
.mikn-msg-date-sep::after {
  display: none;
}
.mikn-msg-date-sep span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: color-mix(in srgb, var(--bg-card) 88%, var(--border));
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  padding: 7px 16px;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.mikn-msg-deleted-row {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  padding: 10px 12px;
  margin: 6px 0 14px;
  background: var(--bg-main);
  border-radius: 12px;
  border: 1px dashed var(--border);
}
.mikn-message-bubble {
  margin-bottom: 6px;
}
.mikn-message-bubble--stack-follow {
  margin-bottom: 3px;
}
.mikn-message-bubble--stack-follow .msg-bubble-mine {
  border-radius: 18px;
}
.mikn-message-bubble--stack-follow .msg-bubble-them {
  border-radius: 18px;
}
.mikn-msg-avatar-slot {
  width: 38px;
  height: 38px;
  min-width: 38px;
  flex-shrink: 0;
  display: block;
}
.mikn-message-bubble__sender-row--stack-them,
.mikn-message-bubble__sender-row--stack-mine {
  min-height: 0;
  margin-bottom: 0;
}
.mikn-message-bubble__sender-row--stack-them .mikn-message-bubble__sender-spacer,
.mikn-message-bubble__sender-row--stack-mine .mikn-message-bubble__sender-spacer {
  min-height: 0;
}
.mikn-msg-row {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  max-width: min(85%, 640px);
}
.mikn-msg-row.msg-bubble-wrap-mine {
  align-self: flex-end;
  margin-left: auto;
  width: auto;
  max-width: min(85%, 640px);
}
.mikn-msg-row.msg-bubble-wrap-them {
  align-self: flex-start;
  width: auto;
  min-width: 0;
  max-width: min(85%, 640px);
}
.mikn-msg-row-inner,
.mikn-message-bubble__inner {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  width: 100%;
}
.msg-bubble-wrap-mine .mikn-msg-row-inner,
.msg-bubble-wrap-mine .mikn-message-bubble__inner {
  flex-direction: row-reverse;
}
.mikn-msg-avatar-lg {
  width: 38px !important;
  height: 38px !important;
  font-size: 12px !important;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--mikn-msg-thread-bg) 100%, transparent);
}
.mikn-msg-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.msg-bubble-wrap-mine .mikn-msg-col,
.msg-bubble-wrap-mine .mikn-message-bubble__column {
  align-items: flex-end;
}
.mikn-msg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  font-size: 11px;
  color: var(--text-muted);
  max-width: 100%;
}
.mikn-message-bubble__sender-row {
  width: 100%;
  justify-content: space-between;
  margin-bottom: 2px;
}
.mikn-message-bubble__sender-name {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}
.mikn-message-bubble--mine .mikn-message-bubble__sender-name {
  text-align: right;
}
.mikn-message-bubble__sender-spacer {
  flex: 1;
  min-height: 1px;
}
.mikn-message-bubble__shell {
  position: relative;
}
.mikn-message-bubble__time {
  margin-top: 4px;
  padding-top: 0;
  font-size: 10px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  opacity: 0.65;
  text-align: right;
}
.mikn-message-bubble--them .mikn-message-bubble__time {
  text-align: left;
  color: var(--text-muted);
}
.mikn-message-bubble--mine .mikn-message-bubble__time {
  color: color-mix(in srgb, var(--mikn-msg-sent-fg) 68%, transparent);
}
.mikn-message-bubble__time time {
  font-weight: 500;
}
.mikn-msg-meta-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.mikn-msg-more {
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  min-width: 36px;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 8px;
  flex-shrink: 0;
}
.mikn-msg-more:hover {
  background: color-mix(in srgb, var(--primary) 12%, transparent);
  color: var(--primary);
}
.mikn-msg-more:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.mikn-msg-text {
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}
.mikn-msg-bubble-enhanced {
  max-width: 100%;
  box-sizing: border-box;
}
.mikn-msg-bubble--parent-mine {
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 88%, #fff), var(--primary)) !important;
  color: #fff !important;
  border: 1px solid color-mix(in srgb, var(--primary) 50%, #9a3412) !important;
  border-radius: 20px 20px 6px 20px !important;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 25%, transparent) !important;
}
.mikn-msg-bubble--parent-mine .mikn-message-bubble__time {
  color: rgba(255, 255, 255, 0.78) !important;
}
.mikn-message-bubble__column {
  flex: 1;
  min-width: 0;
}
.mikn-msg-attach-wrap {
  max-width: 100%;
  overflow: hidden;
  border-radius: 12px;
  margin-top: 6px;
}
.mikn-msg-attach-thumb-btn {
  display: block;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  max-width: 100%;
  border-radius: 12px;
  overflow: hidden;
}
.mikn-msg-attach-thumb {
  max-width: 100%;
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  vertical-align: middle;
}
.mikn-msg-attach-fail {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

/* En-tête de fil (titre + sous-titre) */
.mikn-message-list-header h2,
.mikn-message-list-header .msg-thread-header-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin: 0;
  line-height: 1.25;
}
.mikn-message-list-header__subtitle,
.mikn-message-list-header p {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.4;
}

/* Barre de rédaction : capsule accueillante (Slack / Teams) */
.mikn-message-composer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin-top: 12px;
  padding: 0 2px 4px;
  border-top: none;
  background: transparent;
  border-radius: 0;
  flex-shrink: 0;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.mikn-message-composer--canal {
  margin-top: 12px;
  padding: 0;
}
.mikn-message-composer__capsule {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 52px;
  padding: 6px 8px 6px 10px;
  background: var(--bg-card);
  border-radius: 28px;
  border: 1px solid color-mix(in srgb, var(--border) 72%, var(--text-muted));
  box-shadow:
    0 4px 20px rgba(15, 23, 42, 0.07),
    0 1px 3px rgba(15, 23, 42, 0.05);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.mikn-message-composer__capsule:focus-within {
  border-color: color-mix(in srgb, var(--primary) 45%, var(--border));
  box-shadow:
    0 4px 22px color-mix(in srgb, var(--primary) 14%, transparent),
    0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent);
}
.mikn-message-composer__file {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mikn-message-composer__field {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.45;
  border-radius: 0;
  border: none;
  background: transparent;
  color: var(--text-main);
  box-shadow: none;
}
.mikn-message-composer__field::placeholder {
  color: var(--text-muted);
}
.mikn-message-composer__field:focus {
  outline: none;
  box-shadow: none;
}
.mikn-message-composer__capsule .input.mikn-message-composer__field {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}
.mikn-message-composer__attach {
  flex-shrink: 0;
  min-width: 44px;
  min-height: 44px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  border: none !important;
  background: transparent !important;
  color: var(--text-muted) !important;
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}
.mikn-message-composer__attach:hover {
  background: color-mix(in srgb, var(--primary) 10%, var(--bg-main)) !important;
  color: var(--primary) !important;
}
.mikn-message-composer__attach:active {
  transform: scale(0.96);
}
.mikn-message-composer__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 0;
  flex-shrink: 0;
}
.mikn-message-composer__send {
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50% !important;
  font-weight: 700;
  font-size: 0;
  background: linear-gradient(145deg, color-mix(in srgb, var(--primary) 90%, #fff), var(--primary)) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 2px 10px color-mix(in srgb, var(--primary) 35%, transparent);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}
.mikn-message-composer__send:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: scale(1.05);
  box-shadow: 0 4px 16px color-mix(in srgb, var(--primary) 40%, transparent);
}
.mikn-message-composer__send:active:not(:disabled) {
  transform: scale(0.97);
}
.mikn-message-composer__send:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.mikn-message-composer__send .mikn-message-composer__icon {
  flex-shrink: 0;
  opacity: 1;
}
.mikn-message-composer__send-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mikn-message-composer--disabled {
  opacity: 0.55;
  filter: grayscale(0.06);
  pointer-events: none;
}
.mikn-message-composer--disabled .mikn-message-composer__capsule {
  background: color-mix(in srgb, var(--bg-main) 92%, var(--border));
  box-shadow: none;
}
.mikn-message-composer--disabled .mikn-message-composer__field {
  cursor: not-allowed;
}

/* Liste + fil : colonne / pile sur petit écran */
@media (max-width: 720px) {
  .mikn-messaging-layout {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .mikn-messaging-layout__list {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    border-right: none !important;
    padding-right: 0 !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
    margin-bottom: 4px;
    max-height: min(40vh, 280px) !important;
  }
  .mikn-messaging-layout__thread {
    min-height: 280px;
  }
  #parentSidebarThread {
    max-height: min(45vh, 320px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mikn-message-composer,
  .mikn-message-composer__capsule,
  .mikn-message-composer__send,
  .mikn-message-composer__attach {
    transition: none;
  }
  .mikn-msg-thread-bubbles--enter .mikn-message-bubble,
  .mikn-msg-thread-bubbles--enter-active .mikn-message-bubble,
  .mikn-msg-thread-bubbles--enter-active .mikn-msg-date-sep {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Vue compacte desktop : messagerie moins « zoomée » (mobile inchangé ci-dessous) */
@media (min-width: 721px) {
  .mikn-messaging-layout.chat--compact .mikn-msg-rail .msg-conv-name,
  .mikn-messaging-layout.chat--compact .mikn-msg-list-line1 .msg-conv-name {
    font-size: 13px;
    letter-spacing: -0.01em;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-list-preview,
  .mikn-messaging-layout.chat--compact .mikn-msg-list-time {
    font-size: 10px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-rail .msg-conv-card.mikn-msg-list-card {
    padding: 5px 7px 5px 5px !important;
    margin-bottom: 3px !important;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-list-header h2,
  .mikn-messaging-layout.chat--compact .mikn-message-list-header .msg-thread-header-name {
    font-size: 15px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-list-header__subtitle,
  .mikn-messaging-layout.chat--compact .mikn-message-list-header p {
    font-size: 11px;
  }
  .mikn-messaging-layout.chat--compact .msg-thread-bubbles.mikn-msg-thread-bubbles,
  .mikn-messaging-layout.chat--compact .mikn-msg-thread-bubbles.msg-thread-bubbles {
    padding: 10px 12px 16px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-bubble__sender-name {
    font-size: 11px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-meta {
    font-size: 10px;
    margin-bottom: 2px;
  }
  .mikn-messaging-layout.chat--compact .msg-bubble-mine.mikn-msg-bubble-enhanced,
  .mikn-messaging-layout.chat--compact .msg-bubble-them.mikn-msg-bubble-enhanced {
    padding: 9px 13px 7px;
    font-size: 14px;
    line-height: 1.48;
    border-radius: 16px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-bubble__time {
    font-size: 9px;
    margin-top: 3px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-row {
    margin-bottom: 11px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-date-sep {
    margin: 18px 0 12px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-date-sep span {
    font-size: 10px;
    padding: 5px 12px;
  }
  .mikn-messaging-layout.chat--compact .mikn-msg-avatar-lg,
  .mikn-messaging-layout.chat--compact .mikn-msg-avatar-slot {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    font-size: 11px !important;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-composer__field {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 15px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-composer__capsule {
    min-height: 46px;
    padding: 4px 6px 4px 8px;
    border-radius: 24px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-composer__send {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
  }
  .mikn-messaging-layout.chat--compact .mikn-message-composer__attach {
    min-width: 40px;
    min-height: 40px;
  }
}

.mikn-msg-composer-limit {
  margin: 6px 4px 0;
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  min-height: 1em;
}
.mikn-msg-composer-limit--over {
  color: var(--danger, #dc2626);
  font-weight: 600;
}

.mikn-msg-older-loader {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 8px;
  text-align: center;
}

.mikn-msg-image-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100050;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}
.mikn-msg-image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  cursor: pointer;
}
.mikn-msg-image-modal__panel {
  position: relative;
  z-index: 1;
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg-card);
  border-radius: 16px;
  padding: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 24px 48px rgba(0,0,0,0.35);
}
.mikn-msg-image-modal__close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--bg-main);
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.mikn-msg-image-modal__toolbar {
  display: flex;
  justify-content: flex-start;
  padding-right: 48px;
}
.mikn-msg-image-modal__imgwrap {
  overflow: auto;
  max-height: calc(92vh - 100px);
  border-radius: 12px;
  background: var(--bg-main);
}
.mikn-msg-image-modal__img {
  display: block;
  max-width: 100%;
  width: auto;
  height: auto;
  margin: 0 auto;
}
.mikn-msg-list-card {
  text-align: left;
  border-radius: 16px !important;
  border: 1px solid transparent !important;
  border-left: 4px solid transparent !important;
  background: color-mix(in srgb, var(--bg-card) 92%, var(--mikn-msg-thread-bg)) !important;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.mikn-msg-list-card:hover {
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  border-color: color-mix(in srgb, var(--border) 65%, var(--primary)) !important;
  border-left-color: color-mix(in srgb, var(--primary) 30%, transparent) !important;
}
.mikn-msg-list-card.msg-conv-selected {
  border-left-color: var(--primary) !important;
  background: var(--mikn-msg-accent-soft) !important;
  box-shadow: 0 2px 14px color-mix(in srgb, var(--primary) 12%, transparent);
}
.mikn-msg-list-card__main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}
.mikn-msg-list-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 38%, var(--bg-main)), var(--bg-main));
  color: var(--primary);
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
}
.mikn-msg-list-card .mikn-msg-list-avatar.mikn-avatar--sm {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  border-radius: 14px !important;
  font-size: 14px !important;
}
.mikn-msg-list-text {
  flex: 1;
  min-width: 0;
}
.mikn-msg-list-meta {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.mikn-msg-list-time {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.mikn-msg-list-badge {
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  min-width: 22px;
  height: 22px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  text-align: center;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 40%, transparent);
}
/* Rail messagerie prof / parent : colonne conversations */
.mikn-msg-rail.msg-list-col,
.msg-list-col.mikn-msg-rail {
  width: 300px !important;
  max-width: 300px !important;
  min-width: 280px !important;
  background: var(--mikn-msg-rail-bg);
  border-radius: 16px;
  padding: 10px 10px 12px 12px !important;
  border-right: 1px solid color-mix(in srgb, var(--border) 85%, transparent) !important;
  box-shadow: none;
}

/* Sections (canaux / privées) : titres discrets + séparateur */
.mikn-msg-rail .mikn-msg-rail-section {
  margin: 10px 0 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.mikn-msg-rail .mikn-msg-rail-section:first-of-type {
  margin-top: 0;
}
.mikn-msg-rail .mikn-msg-rail-section__title {
  margin: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Liste compacte type appli chat (cartes moins hautes, 2 lignes max) */
.mikn-msg-rail .msg-conv-card.mikn-msg-list-card {
  padding: 6px 8px 6px 6px !important;
  margin-bottom: 4px !important;
  border-radius: 10px !important;
  gap: 0 !important;
  background: #fff !important;
  border: 1px solid color-mix(in srgb, var(--border) 55%, transparent) !important;
  border-left: 3px solid transparent !important;
  box-shadow: none !important;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
html[data-theme="dark"] .mikn-msg-rail .msg-conv-card.mikn-msg-list-card {
  background: color-mix(in srgb, var(--bg-card) 94%, #0f172a) !important;
  border-color: color-mix(in srgb, var(--border) 80%, transparent) !important;
}
.mikn-msg-rail .msg-conv-card.mikn-msg-list-card:hover {
  background: color-mix(in srgb, var(--bg-card) 100%, var(--primary) 8%) !important;
  border-color: color-mix(in srgb, var(--border) 50%, var(--primary) 25%) !important;
  border-left-color: color-mix(in srgb, var(--primary) 22%, transparent) !important;
  box-shadow: 0 1px 6px rgba(15, 23, 42, 0.05) !important;
  transform: none;
}
.mikn-msg-rail .msg-conv-card.mikn-msg-list-card.msg-conv-selected {
  background: color-mix(in srgb, #fff 88%, var(--primary) 12%) !important;
  border-color: color-mix(in srgb, var(--primary) 22%, var(--border)) !important;
  border-left: 4px solid var(--primary) !important;
  box-shadow: 0 1px 8px color-mix(in srgb, var(--primary) 14%, transparent) !important;
}
html[data-theme="dark"] .mikn-msg-rail .msg-conv-card.mikn-msg-list-card.msg-conv-selected {
  background: color-mix(in srgb, var(--bg-card) 82%, var(--primary) 18%) !important;
}
.mikn-msg-rail .msg-conv-card.mikn-msg-list-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mikn-msg-rail .mikn-msg-list-card__main--compact {
  align-items: center;
  gap: 8px;
}
.mikn-msg-rail .mikn-msg-list-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  align-self: center;
}
.mikn-msg-rail .mikn-msg-list-avatar-wrap .mikn-msg-list-avatar,
.mikn-msg-rail .mikn-msg-list-avatar-wrap .mikn-msg-list-avatar.mikn-avatar--sm {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  border-radius: 10px !important;
  font-size: 12px !important;
  font-weight: 800;
}
.mikn-msg-rail .mikn-msg-list-unread-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), #6366f1);
  border: 2px solid var(--bg-card, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 40%, transparent);
  pointer-events: none;
}
.mikn-msg-rail .mikn-msg-list-mid {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mikn-msg-rail .mikn-msg-list-line1 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.mikn-msg-rail .mikn-msg-list-line2 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}
.mikn-msg-rail .mikn-msg-list-preview {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mikn-msg-rail .msg-conv-card.msg-conv-selected .mikn-msg-list-preview {
  color: color-mix(in srgb, var(--text-main) 72%, var(--text-muted));
}
.mikn-msg-rail .mikn-msg-list-line1 .mikn-msg-list-time {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  color: color-mix(in srgb, var(--text-muted) 92%, var(--text-main));
  font-variant-numeric: tabular-nums;
}
.mikn-msg-rail .mikn-msg-list-line2 .mikn-msg-list-badge {
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 10px;
  background: linear-gradient(145deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #6366f1));
  box-shadow: 0 1px 6px color-mix(in srgb, var(--primary) 35%, transparent);
}

.mikn-msg-rail .msg-conv-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.mikn-msg-rail .msg-conv-card.msg-conv-selected .msg-conv-name {
  color: var(--text-main) !important;
}
.msg-list-col {
  background: color-mix(in srgb, var(--bg-card) 70%, var(--bg-main));
  border-radius: 14px;
  padding: 10px 10px 10px 12px !important;
}

/* ============================================
   QUIZ BUILDER
   ============================================ */
.template-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-tab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all .12s;
}

.template-tab.active,
.template-tab:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* Carnets de suivi : alignement des sous-onglets et marge bas de grille */
#view-carnets .template-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1.25;
  min-height: 36px;
  box-sizing: border-box;
}

#view-carnets #carnetsPaneEleves {
  padding-bottom: 8px;
}

#view-carnets #carnetsList {
  min-height: 1px;
}

.quiz-builder {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.quiz-question-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg-main);
}

[data-theme="dark"] .quiz-question-block {
  background: #0f172a;
  border-color: #334155;
}

.question-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 10px;
}

.quiz-option-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quiz-option-row input[type="radio"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.expiry-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fef3c7;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #92400e;
}

[data-theme="dark"] .expiry-row {
  background: #1c1400;
  color: #fbbf24;
}

.expiry-row label {
  font-weight: 600;
  white-space: nowrap;
}

.expiry-row input {
  flex: 1;
  width: auto;
}

/* ============================================
   RESPONSIVE MOBILE
   ============================================ */
@media (max-width: 768px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .main-content {
    padding: 16px;
  }

  .header {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .modal-content {
    max-width: 100%;
    border-radius: 16px;
  }
}

/* === PLAN DE SALLE === */
.seat-grid {
  display: grid;
  gap: 10px;
}

.seat-cell {
  position: relative;
  min-height: 70px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px dashed var(--border);
  transition: all 0.2s;
  font-size: 12px;
  text-align: center;
  padding: 4px;
}

.seat-cell.occupied {
  background: var(--primary);
  color: white;
  border: 2px solid var(--primary);
}

.seat-cell.empty:hover {
  border-color: var(--primary);
  background: var(--bg-hover);
}

.seat-unplaced {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  cursor: grab;
  background: var(--bg-card);
  user-select: none;
}

.plan-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.plan-free {
  background: #dcfce7;
  color: #15803d;
}

.plan-pro {
  background: #fef3c7;
  color: #b45309;
}

.plan-school {
  background: #ede9fe;
  color: #7c3aed;
}

.quiz-question-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.question-label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ============================================
   PATCH ÉLÈVE — Educatif MIKN
   Coller à la fin du style.css existant
============================================ */

/* ---- Boutons ---- */
.btn-primary {
  background: var(--orange);
  color: #fff;
}

.btn-primary:hover {
  background: var(--orange-dark);
}

.btn:disabled,
.btn-primary:disabled,
.btn-secondary:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 13px !important;
}

/* ---- Toast variantes ---- */
.toast.toast-success {
  border-color: rgba(22, 163, 74, .4);
  box-shadow: 0 4px 24px rgba(22, 163, 74, .12), var(--shadow);
}

.toast.toast-error {
  border-color: rgba(220, 38, 38, .4);
  box-shadow: 0 4px 24px rgba(220, 38, 38, .10), var(--shadow);
}

/* ---- Table wrap responsive ---- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-wrap .table {
  min-width: 700px;
}

/* ---- Séparateur ---- */
hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 4px 0;
}

/* ---- Badges génériques (utilisés dans eleve.html) ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-success {
  background: #d1fae5;
  color: #065f46;
}

.badge-error {
  background: #fee2e2;
  color: #991b1b;
}

.badge-purple {
  background: #ede9fe;
  color: #5b21b6;
}

/* ---- Tags ---- */
.tag {
  display: inline-block;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  font-weight: 600;
}

.tag-type {
  background: #ede9fe;
  color: #7c3aed;
}

/* ---- Barre de progression note ---- */
.progress-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}

.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width .3s;
}

/* ---- Moyenne bannière ---- */
.moyenne-banner {
  background: linear-gradient(135deg, var(--orange), #ea580c);
  color: #fff;
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(249, 115, 22, .28);
  transition: background .4s;
}

.moyenne-value {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1;
}

.moyenne-label {
  font-size: 14px;
  opacity: .85;
  margin-top: 4px;
}

.moyenne-sub {
  font-size: 13px;
  opacity: .7;
}

/* ---- Matières grid ---- */
.matieres-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.matiere-badge {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 12px 14px;
  border-left: 4px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.matiere-badge span {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.matiere-badge strong {
  font-size: 20px;
  font-weight: 800;
}

/* ---- Note rows (dashboard) ---- */
.note-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.note-row:last-child {
  border-bottom: none;
}

.note-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.note-title {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-score {
  font-size: 16px;
  flex-shrink: 0;
}

/* ---- Activity rows (dashboard) ---- */
.activity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}

.activity-row:last-child {
  border-bottom: none;
}

/* ---- Activity cards ---- */
.activity-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  border-left: 4px solid var(--border);
  transition: border-color .15s;
}

.activity-card:hover {
  border-left-color: var(--orange);
}

.activity-card.status-submitted {
  border-left-color: #16a34a;
}

.activity-card.status-graded {
  border-left-color: #7c3aed;
}

.activity-card.status-late {
  border-left-color: #dc2626;
}

.activity-card.status-in_progress {
  border-left-color: #f97316;
}

.activity-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.activity-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px;
}

.activity-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin: 8px 0;
  line-height: 1.5;
}

.activity-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.due-date {
  font-size: 13px;
  color: var(--text-muted);
}

.due-date.overdue {
  color: #dc2626;
  font-weight: 600;
}

.teacher-comment {
  font-size: 13px;
  color: #1d4ed8;
  background: #dbeafe;
  padding: 6px 10px;
  border-radius: 8px;
  margin-top: 8px;
  width: 100%;
}

/* ---- Filter tabs ---- */
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-tab {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .12s;
}

.filter-tab.active,
.filter-tab:hover {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}

/* ---- Quiz cards ---- */
.quiz-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.quiz-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.quiz-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ---- Quiz player ---- */
.quiz-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fef3c7;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 700;
  color: #92400e;
  transition: background .2s, color .2s;
}

.quiz-timer.danger {
  background: #fee2e2;
  color: #991b1b;
}

.quiz-progress-bar-wrap {
  background: var(--border);
  border-radius: 999px;
  height: 4px;
  margin: 12px 24px 0;
  overflow: hidden;
}

.quiz-question {
  background: var(--bg-main);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}

[data-theme="dark"] .quiz-question {
  background: #0f172a;
}

.quiz-question-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.quiz-q-num {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .06em;
}

.quiz-q-text {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  line-height: 1.5;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all .12s;
  font-size: 14px;
}

.quiz-option:hover {
  border-color: var(--orange);
  background: #fff7ed;
}

.quiz-option.selected {
  border-color: var(--orange);
  background: #fff7ed;
  font-weight: 600;
}

[data-theme="dark"] .quiz-option:hover,
[data-theme="dark"] .quiz-option.selected {
  background: #1c0f00;
  border-color: var(--orange);
}

.quiz-option input[type="radio"] {
  accent-color: var(--orange);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---- Résultat quiz ---- */
.quiz-result-score {
  text-align: center;
  padding: 20px 0;
}

.quiz-result-detail {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quiz-result-row {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.quiz-result-row.correct {
  background: #d1fae5;
  color: #065f46;
}

.quiz-result-row.wrong {
  background: #fee2e2;
  color: #991b1b;
}

.quiz-result-row.open {
  background: #fef3c7;
  color: #92400e;
}

.quiz-result-row small {
  display: block;
  margin-top: 3px;
  font-style: italic;
}

.quiz-result-row strong {
  margin-right: 4px;
}

/* ---- Messages ---- */
.msg-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px 0;
}

.msg-bubble {
  max-width: 78%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.5;
}

.msg-bubble.sent {
  align-self: flex-end;
  background: var(--orange);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.msg-bubble.received {
  align-self: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

[data-theme="dark"] .msg-bubble.received {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}

.msg-meta {
  font-size: 11px;
  opacity: .65;
  margin-top: 4px;
}

.msg-input-row {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

/* ---- Upload fichier ---- */
.file-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1.5px dashed var(--border);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-muted);
  transition: border-color .12s, color .12s;
}

.file-label:hover {
  border-color: var(--orange);
  color: var(--orange);
}

[data-theme="dark"] .file-label {
  border-color: #334155;
}

[data-theme="dark"] .file-label:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.file-label input {
  display: none;
}

.submission-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* ---- Empty state ---- */
.empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 14px;
}

/* ---- Responsive élève ---- */
@media (max-width: 768px) {
  .moyenne-banner {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .moyenne-value {
    font-size: 2.2rem;
  }

  .matieres-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .table-wrap .table {
    min-width: 600px;
  }

  .quiz-progress-bar-wrap {
    margin: 12px 16px 0;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .cards {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
  .sidebar, .header, .panel-header button, .btn, .nav-item, .no-print, .template-tab {
    display: none !important;
  }
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }
  .layout {
    grid-template-columns: 1fr !important;
  }
  body, .panel, .view, .fiche-tab-content {
    background: white !important;
    border: none !important;
    color: black !important;
    box-shadow: none !important;
  }
  .panel {
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ============================================
   BANDEROLE ANNONCE GLOBALE (admin → toutes apps)
   ============================================ */
.mkn-global-announcement-wrap {
  position: relative;
  z-index: 10050;
  width: 100%;
  color: #f8fafc;
  background: linear-gradient(135deg, #0c4a6e 0%, #075985 38%, #0e7490 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 4px 6px -1px rgba(15, 23, 42, 0.12),
    0 12px 32px rgba(8, 47, 73, 0.45);
}

/* Bandeau réduit : fine languette ▲ Annonce pour rouvrir */
.mkn-ann-expanded {
  width: 100%;
}

.mkn-ann-reopen-strip {
  display: none;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 30px;
  padding: 4px 16px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.9);
  background: transparent;
  box-sizing: border-box;
  transition: background 0.15s ease;
}

.mkn-ann-reopen-chevron {
  font-size: 9px;
  line-height: 1;
  opacity: 0.88;
}

.mkn-ann-reopen-strip:hover {
  background: rgba(255, 255, 255, 0.08);
}

.mkn-ann-reopen-strip:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.85);
  outline-offset: -2px;
}

.mkn-global-announcement-wrap--collapsed {
  box-shadow: 0 2px 8px rgba(8, 47, 73, 0.28);
}

.mkn-global-announcement-wrap--collapsed .mkn-ann-reopen-strip {
  display: flex;
}

.mkn-global-announcement-wrap--collapsed .mkn-ann-expanded {
  display: none !important;
}

.mkn-global-announcement-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px 20px;
  padding: 12px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Mode défilement : une seule ligne — texte à côté du badge Administrateur */
.mkn-global-announcement-inner--marquee {
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.mkn-ann-top-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.mkn-ann-top-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

/* Zone de défilement entre le pill et les actions */
.mkn-ann-top-left .mkn-ann-marquee-viewport {
  flex: 1;
  min-width: 48px;
  min-height: 1.75rem;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.mkn-ann-main {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.mkn-ann-icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.mkn-ann-copy {
  flex: 1;
  min-width: 0;
}

.mkn-ann-text-row {
  overflow: hidden;
  min-height: 1.35em;
}

.mkn-ann-marquee-viewport {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: 1.5em;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 calc(100% - 6%), transparent);
}

.mkn-ann-msg {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.mkn-ann-meta {
  margin-top: 6px;
}

.mkn-ann-author-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: none;
  color: rgba(248, 250, 252, 0.95);
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.mkn-ann-track {
  display: inline-block;
  white-space: nowrap;
  width: max-content;
  max-width: none;
  animation: mknAnnMarquee var(--mkn-marquee-sec, 36s) linear infinite;
  will-change: transform;
}

.mkn-ann-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 10px;
}

.mkn-ann-support-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: #ffffff;
  color: #0c4a6e;
  border: none;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.mkn-ann-support-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.18);
  background: #f1f5f9;
}

.mkn-ann-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 10px;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 400;
  color: rgba(248, 250, 252, 0.95);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.mkn-ann-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.45);
}

@media (max-width: 720px) {
  .mkn-global-announcement-inner {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .mkn-ann-actions {
    width: 100%;
    justify-content: flex-end;
  }

  /* Bandeau défilant : sur petit écran, message + badge sur une ligne, boutons en dessous */
  .mkn-global-announcement-inner--marquee .mkn-ann-top-row {
    flex-wrap: wrap;
  }

  .mkn-global-announcement-inner--marquee .mkn-ann-top-left {
    flex: 1 1 100%;
  }

  .mkn-global-announcement-inner--marquee .mkn-ann-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@keyframes mknAnnMarquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mkn-ann-track {
    animation: none !important;
  }
}

/* ============================================
   LANDING MIKN — main.landing-main (surcharge
   le bloc <style> de landing.html par spécificité)
   ============================================ */

/* Landing : sélection autorisée sur le contenu éditorial ; formulaires inchangés */
body.landing-page {
  -webkit-user-select: none;
  user-select: none;
}

body.landing-page .landing-main,
body.landing-page .landing-footer,
body.landing-page .landing-footer-note {
  -webkit-user-select: text;
  user-select: text;
}

body.landing-page input,
body.landing-page textarea,
body.landing-page select,
body.landing-page option {
  -webkit-user-select: text;
  user-select: text;
}

body.landing-page main.landing-main {
  display: block;
}

/* Thème landing : interrupteur animé défini dans landing.html */

/* Scroll reveal */
body.landing-page main.landing-main [data-landing-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.52s var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform 0.52s var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
  transition-delay: var(--landing-reveal-delay, 0ms);
}

body.landing-page main.landing-main [data-landing-reveal].landing-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main [data-landing-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Hero split + mock UI */
body.landing-page main.landing-main .landing-hero--split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 560px);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
  text-align: left;
  padding-top: clamp(8px, 2vw, 20px);
  padding-bottom: clamp(56px, 10vw, 96px);
}

@media (max-width: 900px) {
  body.landing-page main.landing-main .landing-hero--split {
    grid-template-columns: 1fr;
    text-align: center;
  }

  body.landing-page main.landing-main .landing-hero__copy {
    max-width: 640px;
    margin-inline: auto;
  }

  body.landing-page main.landing-main .landing-hero__cta {
    justify-content: center;
  }

  body.landing-page main.landing-main .landing-hero__trust {
    justify-content: center;
  }
}

body.landing-page main.landing-main .landing-hero__copy .landing-hero__title {
  max-width: none;
  margin-inline: 0;
}

body.landing-page main.landing-main .landing-hero__lead {
  max-width: 34rem;
  margin-inline: 0;
}

@media (max-width: 900px) {
  body.landing-page main.landing-main .landing-hero__lead {
    margin-inline: auto;
  }
}

body.landing-page main.landing-main .landing-hero__cta {
  justify-content: flex-start;
}

body.landing-page main.landing-main .landing-hero__cta-primary {
  transition:
    transform var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.landing-page main.landing-main .landing-hero__cta-primary:hover {
  transform: translateY(-2px);
}

body.landing-page main.landing-main .landing-hero__cta-primary:active {
  transform: translateY(0);
}

body.landing-page main.landing-main .landing-hero__cta-secondary {
  transition:
    transform var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    border-color var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    color var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.landing-page main.landing-main .landing-hero__cta-secondary:hover {
  transform: translateY(-2px);
}

body.landing-page main.landing-main .landing-hero__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

body.landing-page main.landing-main .landing-hero__trust li {
  position: relative;
  cursor: default;
  border-radius: 8px;
  padding: 6px 12px 6px calc(12px + 1.15em);
  margin: -6px -12px -6px 0;
  outline: none;
  transition:
    background-color 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

body.landing-page main.landing-main .landing-hero__trust li::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 50%;
  margin-top: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d9488, var(--orange));
}

body.landing-page main.landing-main .landing-hero__trust li:hover {
  background: rgba(13, 148, 136, 0.06);
}

body.landing-page main.landing-main .landing-hero__trust li:focus-visible {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #0d9488;
}

body.landing-page main.landing-main .landing-hero__trust li:focus-visible:hover {
  transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-hero__trust li {
    transition: box-shadow 0.15s ease, background-color 0.15s ease;
  }

  body.landing-page main.landing-main .landing-hero__trust li:focus-visible:hover {
    transform: none;
  }
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-hero__trust li:hover {
  background: rgba(13, 148, 136, 0.12);
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-hero__trust li:focus-visible {
  box-shadow: 0 0 0 2px #1e293b, 0 0 0 4px #2dd4bf;
}

/* Colonne hero droite : évite débordement grille */
body.landing-page main.landing-main .landing-hero__visual {
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.landing-page main.landing-main .landing-demo {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 548px;
  margin-inline: auto;
}

@media (prefers-reduced-motion: no-preference) {
  body.landing-page main.landing-main .landing-demo--role-flip .landing-mock__views-stack {
    animation: landingMockRoleStackNudge 0.52s var(--mock-role-ease);
  }
}

@keyframes landingMockRoleStackNudge {
  0% {
    transform: scale(1);
  }

  38% {
    transform: scale(0.987);
  }

  100% {
    transform: scale(1);
  }
}

body.landing-page main.landing-main .landing-mock__rolebar {
  display: inline-flex;
  align-self: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 12px;
  gap: 0;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-main);
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
}

body.landing-page main.landing-main .landing-mock__role-btn {
  flex: 0 0 auto;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  background: transparent;
  color: var(--text-muted);
  transition:
    background 0.28s cubic-bezier(0.22, 1, 0.36, 1),
    color 0.28s ease,
    box-shadow 0.28s ease,
    transform 0.2s ease;
}

body.landing-page main.landing-main .landing-mock__role-btn:hover {
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__role-btn:active {
  transform: scale(0.98);
}

body.landing-page main.landing-main .landing-mock__role-btn--active {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
}

body.landing-page main.landing-main .lv-device:has(.landing-demo--dir) .landing-mock__role-btn--active {
  background: linear-gradient(135deg, #0369a1, #0e7490);
  box-shadow: 0 4px 16px rgba(3, 105, 161, 0.32);
}

body.landing-page main.landing-main .lv-device:has(.landing-demo--parent) .landing-mock__role-btn--active {
  background: linear-gradient(135deg, #ea580c, #f97316);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
}

body.landing-page main.landing-main .landing-mock__role-btn:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Segmented control : pouce coulissant (colonnes égales) */
body.landing-page main.landing-main .landing-mock__rolebar--pill {
  position: relative;
}

body.landing-page main.landing-main .landing-mock__rolebar--pill .landing-mock__role-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / 3);
  border-radius: 999px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
  z-index: 0;
  transition:
    transform 0.36s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.36s ease,
    box-shadow 0.36s ease;
  pointer-events: none;
}

body.landing-page main.landing-main .lv-device:has(.landing-demo--dir) .landing-mock__rolebar--pill .landing-mock__role-thumb {
  transform: translateX(100%);
  background: linear-gradient(135deg, #0369a1, #0e7490);
  box-shadow: 0 4px 16px rgba(3, 105, 161, 0.32);
}

body.landing-page main.landing-main .lv-device:has(.landing-demo--parent) .landing-mock__rolebar--pill .landing-mock__role-thumb {
  transform: translateX(200%);
  background: linear-gradient(135deg, #ea580c, #f97316);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.35);
}

body.landing-page main.landing-main .landing-mock__rolebar--pill .landing-mock__role-btn {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
  background: transparent !important;
  box-shadow: none !important;
}

body.landing-page main.landing-main .landing-mock__rolebar--pill .landing-mock__role-btn--active {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
}

body.landing-page main.landing-main .landing-mock__rolebar--pill .landing-mock__role-btn:not(.landing-mock__role-btn--active) {
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-mock__rolebar--pill .landing-mock__role-thumb {
    transition: background 0.2s ease, box-shadow 0.2s ease;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-mock__role-btn {
    transition: background 0.15s ease, color 0.15s ease;
  }

  body.landing-page main.landing-main .landing-mock__role-btn:active {
    transform: none;
  }

  body.landing-page main.landing-main .landing-demo--role-flip .landing-mock__views-stack {
    animation: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  body.landing-page main.landing-main .lv-hero__visual:has(.lv-device--demo-alive) {
    perspective: 1100px;
    perspective-origin: 52% 42%;
  }

  body.landing-page main.landing-main .lv-device--demo-alive {
    animation: landingDemoFloat3d 9s ease-in-out infinite;
    transform-style: preserve-3d;
    backface-visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .lv-hero__visual:has(.lv-device--demo-alive) {
    perspective: none;
  }

  body.landing-page main.landing-main .lv-device--demo-alive {
    animation: none;
    backface-visibility: visible;
  }
}

@keyframes landingDemoFloat3d {
  0%, 100% {
    transform: translateY(0) rotateY(-5.5deg) rotateX(1.35deg);
  }

  33% {
    transform: translateY(-4px) rotateY(-5.85deg) rotateX(1.5deg);
  }

  66% {
    transform: translateY(2px) rotateY(-5.15deg) rotateX(1.1deg);
  }
}

/* Maquette produit (2 colonnes comme layout prof : rail + panel) */
body.landing-page main.landing-main .landing-mock {
  width: 100%;
  max-width: 548px;
  margin-inline: auto;
  border-radius: 14px;
  background: var(--border);
  border: 1px solid var(--border);
  box-shadow:
    0 22px 50px rgba(15, 23, 42, 0.14),
    0 10px 24px rgba(15, 23, 42, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(13, 148, 136, 0.06);
  overflow: hidden;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

body.landing-page.lp-v2 .lv-device.lv-device--demo-alive:hover {
  box-shadow:
    0 36px 72px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(13, 148, 136, 0.18);
}

html[data-theme="dark"] body.landing-page.lp-v2 .lv-device.lv-device--demo-alive:hover {
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(13, 148, 136, 0.22);
}

body.landing-page main.landing-main .landing-mock__shell {
  display: flex;
  align-items: stretch;
  min-height: 232px;
  max-height: min(47vh, 358px);
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Mini-dashboard : police unique (Inter, comme l’app) */
body.landing-page main.landing-main .landing-mock,
body.landing-page main.landing-main .landing-mock button {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

body.landing-page main.landing-main .landing-mock__rail,
body.landing-page main.landing-main .landing-mock__sidebar {
  flex-shrink: 0;
  width: 122px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 6px 5px 8px 6px;
  background: var(--bg-sidebar, #020617);
  color: #94a3b8;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  overflow-x: hidden;
  overflow-y: hidden;
  /* Au-dessus des vues en transition (transform) pour que les onglets restent cliquables */
  position: relative;
  z-index: 10;
  pointer-events: auto;
}

body.landing-page main.landing-main .landing-mock__rail-head {
  display: block;
  padding: 0;
  margin: 0;
  border-bottom: none;
}

/* Branding sidebar (structure identique les 3 rôles) */
body.landing-page main.landing-main .mock-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 6px 8px 4px;
  margin: 0 0 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

body.landing-page main.landing-main .mock-sidebar-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 7px;
  background: #e87722;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

body.landing-page main.landing-main .landing-mock--view-dir .mock-sidebar-avatar {
  background: linear-gradient(145deg, #0d9488, #14b8a6);
}

body.landing-page main.landing-main .landing-mock__brand-initial {
  display: none !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__brand-initial--prof,
body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__brand-initial--dir,
body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__brand-initial--parent {
  display: flex !important;
}

body.landing-page main.landing-main .mock-sidebar-brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  overflow: hidden;
  flex: 1;
}

body.landing-page main.landing-main .mock-sidebar-brand-name,
body.landing-page main.landing-main .mock-sidebar-brand-role {
  display: block;
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__brand-name-line,
body.landing-page main.landing-main .landing-mock__brand-role-line {
  display: none;
}

body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__brand-name-line--prof,
body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__brand-name-line--dir,
body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__brand-name-line--parent {
  display: block;
}

body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__brand-role-line--prof,
body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__brand-role-line--dir,
body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__brand-role-line--parent {
  display: block;
}

body.landing-page main.landing-main .mock-sidebar-brand-name .landing-mock__brand-name-line {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

body.landing-page main.landing-main .mock-sidebar-brand-role .landing-mock__brand-role-line {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  white-space: nowrap;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.landing-page main.landing-main .landing-mock__sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: relative;
  z-index: 1;
  pointer-events: auto;
}

body.landing-page main.landing-main .landing-mock__sidebar-nav[hidden] {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__sidebar-nav--dir {
  display: none;
}

body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__sidebar-nav--prof {
  display: none;
}

/* Une seule sidebar visible : display:flex sur .landing-mock__sidebar-nav surcharge l’attribut hidden */
body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__sidebar-nav--parent {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__sidebar-nav--parent {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__sidebar-nav--prof,
body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__sidebar-nav--dir {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__sidebar-nav--parent {
  display: flex !important;
}

body.landing-page main.landing-main .landing-mock__nav-section {
  margin: 0;
  padding: 10px 14px 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}

body.landing-page main.landing-main .landing-mock__nav-section:first-child {
  padding-top: 4px;
}

body.landing-page main.landing-main .landing-mock__nav-ic {
  display: inline-block;
  margin-right: 0;
  width: 16px;
  flex-shrink: 0;
  font-size: 13px;
  line-height: 1;
  text-align: center;
  vertical-align: -0.1em;
}

body.landing-page main.landing-main .landing-mock__sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 100%;
  text-align: left;
  border: none;
  cursor: pointer;
  pointer-events: auto;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
  padding: 6px 14px;
  margin-bottom: 2px;
  border-radius: 6px;
  line-height: 1.25;
  background: transparent;
  color: #94a3b8;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: normal;
  box-sizing: border-box;
}



body.landing-page main.landing-main .landing-mock__sidebar-nav-item:hover {
  background: rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

body.landing-page main.landing-main .--active {
  background: #e87722;
  color: #fff;
  font-weight: 600;
}

body.landing-page main.landing-main .landing-demo--dir .--active {
  background: linear-gradient(135deg, #0369a1, #0e7490);
}

body.landing-page main.landing-main .landing-mock__sidebar-nav-item:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
}

body.landing-page main.landing-main .landing-mock__stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  overflow: hidden;
  position: relative;
  z-index: 0;
}

/* Barre sous le chrome fenêtre : contexte (onglet) + heure, comme l’en-tête prof */
body.landing-page main.landing-main .lv-device__appbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.65rem 0.45rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

body.landing-page main.landing-main .lv-device__appbar-context {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.25;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.landing-page main.landing-main .lv-device__appbar-time {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  color: var(--text-main);
  text-align: right;
  white-space: nowrap;
  min-height: 1.2em;
}

body.landing-page main.landing-main .landing-mock__rolebar--chrome {
  margin: 0;
  align-self: center;
  padding: 2px;
  box-shadow: 0 1px 10px rgba(15, 23, 42, 0.07);
}

body.landing-page main.landing-main .landing-mock__rolebar--chrome .landing-mock__role-btn {
  font-size: 9px;
  padding: 5px 11px;
  letter-spacing: 0.05em;
}

body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  top: 2px;
  right: auto;
  bottom: 2px;
  left: 2px;
}

/* Chrome : lisibilité Prof / Directeur (clair + sombre) */
html[data-theme="light"] body.landing-page main.landing-main .landing-mock__rolebar--chrome {
  background: color-mix(in srgb, var(--bg-card) 92%, #0f766e);
  border: 1px solid color-mix(in srgb, var(--border) 55%, #0d9488);
}

html[data-theme="light"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.4);
}

html[data-theme="light"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn--active {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn:not(.landing-mock__role-btn--active) {
  color: color-mix(in srgb, var(--text-main) 88%, #0f172a);
}

html[data-theme="light"] body.landing-page main.landing-main .lv-device:has(.landing-demo--dir) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #075985, #0369a1);
  box-shadow: 0 2px 10px rgba(3, 105, 161, 0.42);
}

html[data-theme="light"] body.landing-page main.landing-main .lv-device:has(.landing-demo--parent) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 2px 10px rgba(234, 88, 12, 0.4);
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__rolebar--chrome {
  background: color-mix(in srgb, #0f172a 88%, #334155);
  border: 1px solid color-mix(in srgb, var(--border) 70%, #64748b);
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #14b8a6, #2dd4bf);
  box-shadow: 0 2px 14px rgba(45, 212, 191, 0.28);
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn--active {
  color: #0f172a;
  text-shadow: none;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn:not(.landing-mock__role-btn--active) {
  color: rgba(226, 232, 240, 0.78);
}

html[data-theme="dark"] body.landing-page main.landing-main .lv-device:has(.landing-demo--dir) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  box-shadow: 0 2px 14px rgba(14, 165, 233, 0.32);
}

html[data-theme="dark"] body.landing-page main.landing-main .lv-device:has(.landing-demo--parent) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-thumb {
  background: linear-gradient(135deg, #fb923c, #f97316);
  box-shadow: 0 2px 14px rgba(249, 115, 22, 0.35);
}

html[data-theme="dark"] body.landing-page main.landing-main .lv-device:has(.landing-demo--dir) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn--active {
  color: #0f172a;
}

html[data-theme="dark"] body.landing-page main.landing-main .lv-device:has(.landing-demo--parent) .landing-mock__rolebar--chrome.landing-mock__rolebar--pill .landing-mock__role-btn--active {
  color: #0f172a;
}

body.landing-page main.landing-main .lv-device__viewport--demo .landing-demo {
  max-width: none;
  width: 100%;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

body.landing-page main.landing-main .landing-mock--hero-device {
  max-width: none;
  width: 100%;
  margin-inline: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

body.landing-page main.landing-main .lv-device__viewport--demo .landing-mock__shell {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  min-height: 220px;
}

body.landing-page main.landing-main .landing-mock--hero-device .landing-mock__rail {
  padding-left: 6px;
  padding-right: 6px;
}

body.landing-page main.landing-main .landing-mock--hero-device .landing-mock__panel-head {
  padding-left: 6px;
  padding-right: 6px;
}

body.landing-page main.landing-main .landing-mock--hero-device .landing-mock__sheet {
  padding-left: 6px;
  padding-right: 6px;
}


/* Transition Prof ↔ Directeur : glissement horizontal + fondu (cohérent, sans blur) */
body.landing-page main.landing-main .landing-mock__views-stack {
  --mock-role-t: 0.48s;
  --mock-role-ease: cubic-bezier(0.33, 1, 0.68, 1);
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  transform-origin: 50% 50%;
}

body.landing-page main.landing-main .landing-mock__view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1)),
    visibility 0s linear var(--mock-role-t, 0.48s),
    transform var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

/* Prof au premier plan : la vue directeur attend à droite (prochaine carte) */
body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__view--prof {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
  transform: translate3d(0, 0, 0);
  transition:
    opacity var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1)),
    visibility 0s linear 0s,
    transform var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__view--dir {
  z-index: 1;
  transform: translate3d(18px, 0, 0) scale(0.986);
}

/* Directeur au premier plan : la vue prof recule vers la gauche */
body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__view--dir {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
  transform: translate3d(0, 0, 0);
  transition:
    opacity var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1)),
    visibility 0s linear 0s,
    transform var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__view--prof {
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transform: translate3d(-18px, 0, 0) scale(0.986);
}

/* Parent au premier plan : prof et direction en retrait */
body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--parent {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
  transform: translate3d(0, 0, 0);
  transition:
    opacity var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1)),
    visibility 0s linear 0s,
    transform var(--mock-role-t, 0.48s) var(--mock-role-ease, cubic-bezier(0.33, 1, 0.68, 1));
}

body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--prof {
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  transform: translate3d(-18px, 0, 0) scale(0.986);
}

body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--dir {
  opacity: 0;
  visibility: hidden;
  z-index: 0;
  transform: translate3d(-26px, 0, 0) scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-mock__view {
    transition: opacity 0.22s ease !important;
    transform: none !important;
  }

  body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__view--prof,
  body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__view--dir,
  body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--parent,
  body.landing-page main.landing-main .landing-mock--view-prof .landing-mock__view--dir,
  body.landing-page main.landing-main .landing-mock--view-dir .landing-mock__view--prof,
  body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--prof,
  body.landing-page main.landing-main .landing-mock--view-parent .landing-mock__view--dir {
    transform: none !important;
  }
}

body.landing-page main.landing-main .landing-mock__prof-page,
body.landing-page main.landing-main .landing-mock__dir-page,
body.landing-page main.landing-main .landing-mock__parent-page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Contenu panneau : défilement interne, en-tête fixe */
body.landing-page main.landing-main .landing-mock__prof-page > .landing-mock__sheet,
body.landing-page main.landing-main .landing-mock__dir-page > .landing-mock__sheet,
body.landing-page main.landing-main .landing-mock__parent-page > .landing-mock__sheet,
body.landing-page main.landing-main .landing-mock__dir-page > .landing-mock__dir-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  font-size: 11px;
  line-height: 1.4;
}

body.landing-page main.landing-main .landing-mock__panel-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* [hidden] seul perd face à display:flex ci-dessus (spécificité) — un seul panneau visible */
body.landing-page main.landing-main .landing-mock__prof-page[hidden],
body.landing-page main.landing-main .landing-mock__dir-page[hidden],
body.landing-page main.landing-main .landing-mock__parent-page[hidden] {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock__sheet--dash {
  padding-top: 4px;
}

body.landing-page main.landing-main .landing-mock__dash-cards {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
}

body.landing-page main.landing-main .landing-mock__dash-cards--prof {
  grid-template-columns: repeat(3, 1fr);
}

body.landing-page main.landing-main .landing-mock__dash-cards--dir {
  grid-template-columns: repeat(2, 1fr);
}

body.landing-page main.landing-main .landing-mock__dash-card {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__dash-card-ic {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__dash-card-val {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.15;
}

body.landing-page main.landing-main .landing-mock__dash-card-lbl {
  display: block;
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

body.landing-page main.landing-main .landing-mock__dash-panel-title {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__dash-table {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 400;
  margin-bottom: 4px;
}

body.landing-page main.landing-main .landing-mock__dash-tr {
  display: grid;
  grid-template-columns: 1fr 0.65fr 0.45fr;
  gap: 4px;
  padding: 4px 6px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__dash-tr:last-child {
  border-bottom: none;
}

body.landing-page main.landing-main .landing-mock__dash-tr--head {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  font-size: 11px;
  background: var(--bg-card);
}

body.landing-page main.landing-main .landing-mock__quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 8px;
}

body.landing-page main.landing-main .landing-mock__qa-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

body.landing-page main.landing-main .landing-mock__licence-block {
  margin-bottom: 8px;
  padding: 6px 7px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__licence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 500;
  margin-top: 6px;
  margin-bottom: 0;
  gap: 6px;
}

body.landing-page main.landing-main .landing-mock__synth-track--licence {
  height: 6px;
}

body.landing-page main.landing-main .landing-mock__synth-fill--licence {
  width: 83.33%;
  background: linear-gradient(90deg, #059669, #34d399);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
}

body.landing-page main.landing-main .landing-mock__synth--tight {
  margin-top: 4px;
}

body.landing-page main.landing-main .landing-mock__stub-note--tight {
  margin-bottom: 6px;
}

body.landing-page main.landing-main .landing-mock__select-fake--btn {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  border-color: transparent;
}

body.landing-page main.landing-main .landing-demo--dir .landing-mock__select-fake--btn {
  background: linear-gradient(135deg, #0369a1, #0e7490);
}

body.landing-page main.landing-main .landing-mock__kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-bottom: 6px;
}

body.landing-page main.landing-main .landing-mock__kpi {
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 4px;
  text-align: center;
}

body.landing-page main.landing-main .landing-mock__kpi-val {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

body.landing-page main.landing-main .landing-mock__kpi-lbl {
  display: block;
  font-size: 6.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.landing-page main.landing-main .landing-mock__stub-note {
  margin: 0;
  font-size: 7.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

body.landing-page main.landing-main .landing-mock__dir-body--solo {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 6px;
  -webkit-overflow-scrolling: touch;
}

body.landing-page main.landing-main .landing-mock__synth--inline {
  margin-top: 8px;
}

body.landing-page main.landing-main .landing-mock__fake-list--msgs span {
  font-size: 7.5px;
}

body.landing-page main.landing-main .landing-mock__dir-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

body.landing-page main.landing-main .landing-mock__dir-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.landing-page main.landing-main .landing-mock__dir-row {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 8px;
}

body.landing-page main.landing-main .landing-mock__dir-class {
  font-weight: 800;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__dir-teacher {
  color: var(--text-muted);
  font-weight: 600;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.landing-page main.landing-main .landing-mock__dir-badge {
  font-weight: 900;
  font-size: 7.5px;
  padding: 2px 5px;
  border-radius: 5px;
  background: #d1fae5;
  color: #065f46;
}

body.landing-page main.landing-main .landing-mock__dir-badge--watch {
  background: #fef3c7;
  color: #b45309;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__dir-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__dir-badge--watch {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}

body.landing-page main.landing-main .landing-mock__dir-callout {
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px dashed rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.06);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

body.landing-page main.landing-main .landing-mock__dir-callout-title {
  font-size: 7px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #c2410c;
}

body.landing-page main.landing-main .landing-mock__dir-callout-text {
  font-size: 7.5px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

body.landing-page main.landing-main .landing-mock__synth--global {
  margin-top: auto;
}

body.landing-page main.landing-main .landing-mock__dir-synth-fill {
  width: 78%;
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-mock__view {
    transition: none !important;
  }

  body.landing-page main.landing-main .landing-mock__view--dir {
    display: none !important;
  }

  body.landing-page main.landing-main .landing-mock__view--prof {
    position: relative !important;
    inset: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    pointer-events: auto !important;
    min-height: 188px;
  }

  body.landing-page main.landing-main .landing-mock__views-stack {
    min-height: 0;
  }
}

body.landing-page main.landing-main .landing-mock__panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px 8px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.05), transparent);
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__panel-h2 {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.3;
}

body.landing-page main.landing-main .landing-mock__panel-meta {
  display: block;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.35;
}

/* Titres / sous-titres dans le corps du panneau (vues sans bandeau séparé) */
body.landing-page main.landing-main .landing-mock__panel .landing-mock__panel-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-main);
  margin: 0 0 4px;
}

body.landing-page main.landing-main .landing-mock__panel .landing-mock__panel-subtitle {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 10px;
}

body.landing-page main.landing-main .landing-mock__panel h3,
body.landing-page main.landing-main .landing-mock__panel .section-label,
body.landing-page main.landing-main .landing-mock__panel .mock-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin: 10px 0 6px;
}

body.landing-page main.landing-main .landing-mock__panel .mock-section-label:first-of-type {
  margin-top: 4px;
}

body.landing-page main.landing-main .landing-mock__panel .item-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

body.landing-page main.landing-main .landing-mock__panel .item-meta {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 2px;
}

body.landing-page main.landing-main .landing-mock__panel .item-body {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-main);
  margin: 0;
}

/* Parent démo : filtres et cartes activités */
body.landing-page main.landing-main .landing-mock__panel .mock-filter-bar {
  margin-bottom: 8px;
}

body.landing-page main.landing-main .landing-mock__panel .mock-select {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__panel .mock-item-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__panel .mock-section-label--collapsible {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0.02em;
  margin-top: 6px;
  cursor: default;
}

body.landing-page main.landing-main .landing-mock__panel .item-badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
}

body.landing-page main.landing-main .landing-mock__panel .item-badge--green {
  background: #dcfce7;
  color: #15803d;
}

body.landing-page main.landing-main .landing-mock__panel .item-badge--orange {
  background: #ffedd5;
  color: #c2410c;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__panel .item-badge--green {
  background: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__panel .item-badge--orange {
  background: rgba(249, 115, 22, 0.18);
  color: #fdba74;
}

/* Parent démo : annonces compactes */
body.landing-page main.landing-main .landing-mock__panel .mock-annonce-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  background: var(--bg-card);
}

body.landing-page main.landing-main .landing-mock__panel .mock-annonce-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 8px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

body.landing-page main.landing-main .landing-mock__panel .mock-annonce-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  opacity: 0.92;
}

body.landing-page main.landing-main .landing-mock__panel .mock-annonce-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

body.landing-page main.landing-main .landing-mock__panel .mock-btn {
  font-size: 10px;
  font-family: inherit;
  padding: 5px 10px;
  min-height: 28px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  touch-action: manipulation;
}

body.landing-page main.landing-main .landing-mock__panel .mock-btn--green {
  background: #dcfce7;
  color: #16a34a;
}

body.landing-page main.landing-main .landing-mock__panel .mock-btn--red {
  background: #fee2e2;
  color: #dc2626;
}

body.landing-page main.landing-main .landing-mock__panel .mock-btn:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__panel .mock-btn--green {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__panel .mock-btn--red {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

body.landing-page main.landing-main .landing-mock__select-fake {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-main);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.landing-page main.landing-main .landing-mock__tabline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg-main);
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__tabline--dir {
  grid-template-columns: 1fr 1fr;
}

body.landing-page main.landing-main .landing-mock__tab {
  text-align: center;
  font-family: inherit;
  font-size: 7.5px;
  font-weight: 700;
  padding: 6px 3px 5px;
  color: var(--text-muted);
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  background: transparent;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.landing-page main.landing-main .landing-mock__tab:hover {
  color: var(--text-main);
  background: rgba(249, 115, 22, 0.06);
}

body.landing-page main.landing-main .landing-mock__tab--active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

body.landing-page main.landing-main .landing-mock__tab:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: -2px;
}

body.landing-page main.landing-main .landing-mock__sheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 6px 8px 6px;
  -webkit-overflow-scrolling: touch;
}

body.landing-page main.landing-main .landing-mock__carnet-panel[hidden] {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock__comp-list--compact {
  gap: 3px;
}

body.landing-page main.landing-main .landing-mock__fake-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 8px;
  font-weight: 600;
  color: var(--text-muted);
}

body.landing-page main.landing-main .landing-mock__fake-list span {
  padding: 5px 7px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__dir-panel[hidden] {
  display: none !important;
}

body.landing-page main.landing-main .landing-mock__dir-list--team {
  margin-bottom: 0;
}

body.landing-page main.landing-main .landing-mock__dir-row--team {
  grid-template-columns: 1fr auto;
}

body.landing-page main.landing-main .landing-mock__domain {
  font-size: 10px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-bottom: 8px;
}

body.landing-page main.landing-main .landing-mock__mini-class-rows,
body.landing-page main.landing-main .landing-mock__mini-activity-rows,
body.landing-page main.landing-main .landing-mock__mini-settings-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

body.landing-page main.landing-main .landing-mock__mini-class-row,
body.landing-page main.landing-main .landing-mock__mini-activity-row,
body.landing-page main.landing-main .landing-mock__mini-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__mini-class-row span:last-child,
body.landing-page main.landing-main .landing-mock__mini-activity-row span:last-child,
body.landing-page main.landing-main .landing-mock__mini-settings-row .landing-mock__mini-chevron {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 400;
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__mini-carnet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  font-size: 11px;
  font-weight: 400;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__mini-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__mini-pill--a {
  background: #dcfce7;
  color: #15803d;
}

body.landing-page main.landing-main .landing-mock__mini-pill--eca {
  background: #fef9c3;
  color: #a16207;
}

body.landing-page main.landing-main .landing-mock__mini-pill--na {
  background: #fee2e2;
  color: #b91c1c;
}

body.landing-page main.landing-main .landing-mock__parent-child-name {
  font-size: 11px;
  font-weight: 600;
}

body.landing-page main.landing-main .landing-mock__parent-child-meta {
  font-size: 10px;
  font-weight: 400;
}

/* Suivi pédagogique direction — aligné sur dirLoadSuivi (cartes + liste élèves) */
body.landing-page main.landing-main .landing-mock__dir-body--suivi {
  gap: 6px;
}

body.landing-page main.landing-main .landing-mock__suivi-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 2px;
}

body.landing-page main.landing-main .landing-mock__suivi-card {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 5px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__suivi-card-ic {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__suivi-card--ok .landing-mock__suivi-card-ic {
  background: #dcfce7;
  color: #16a34a;
}

body.landing-page main.landing-main .landing-mock__suivi-card--mid .landing-mock__suivi-card-ic {
  background: #fef3c7;
  color: #ca8a04;
}

body.landing-page main.landing-main .landing-mock__suivi-card--low .landing-mock__suivi-card-ic {
  background: #fee2e2;
  color: #dc2626;
}

body.landing-page main.landing-main .landing-mock__suivi-card-val {
  display: block;
  font-size: 11px;
  font-weight: 900;
  color: var(--text-main);
  line-height: 1.05;
}

body.landing-page main.landing-main .landing-mock__suivi-card-lbl {
  display: block;
  font-size: 6px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

body.landing-page main.landing-main .landing-mock__suivi-students {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

body.landing-page main.landing-main .landing-mock__suivi-stu {
  padding: 5px 6px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

body.landing-page main.landing-main .landing-mock__suivi-stu-main {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__suivi-stu-name {
  font-size: 8px;
  font-weight: 800;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__suivi-stu-class {
  font-size: 6.5px;
  font-weight: 600;
  color: var(--text-muted);
}

body.landing-page main.landing-main .landing-mock__suivi-stu-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

body.landing-page main.landing-main .landing-mock__suivi-stat {
  text-align: center;
  min-width: 44px;
}

body.landing-page main.landing-main .landing-mock__suivi-stat-val {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

body.landing-page main.landing-main .landing-mock__suivi-stat-val--hi {
  color: #16a34a;
}

body.landing-page main.landing-main .landing-mock__suivi-stat-val--mid {
  color: #ca8a04;
}

body.landing-page main.landing-main .landing-mock__suivi-stat-val--low {
  color: #dc2626;
}

body.landing-page main.landing-main .landing-mock__suivi-stat-lbl {
  font-size: 6px;
  color: var(--text-muted);
  font-weight: 600;
}

body.landing-page main.landing-main .landing-mock__suivi-stu-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

body.landing-page main.landing-main .landing-mock__suivi-pill {
  font-size: 5.5px;
  font-weight: 700;
  padding: 2px 4px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
  white-space: nowrap;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__suivi-stat-val--hi {
  color: #4ade80;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__suivi-stat-val--mid {
  color: #fcd34d;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__suivi-stat-val--low {
  color: #f87171;
}

/* Messagerie / messages — proche des vues prof & directeur */
body.landing-page main.landing-main .landing-mock__sheet--msg {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-top: 5px;
}

body.landing-page main.landing-main .landing-mock__legal-mini {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.35;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__msg-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__msg-tab {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 2px;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

body.landing-page main.landing-main .landing-mock__msg-tab--active {
  color: var(--orange);
  border-bottom-color: var(--orange);
}

body.landing-page main.landing-main .landing-mock__msg-tabs--dir .landing-mock__msg-tab--active {
  color: #0d9488;
  border-bottom-color: #0d9488;
}

body.landing-page main.landing-main .landing-mock__msg-split {
  display: flex;
  gap: 6px;
  min-height: 0;
  flex: 1;
  align-items: stretch;
}

body.landing-page main.landing-main .landing-mock__msg-col--list {
  flex: 0 0 38%;
  max-width: 42%;
  min-width: 0;
  border-right: 1px solid var(--border);
  padding-right: 5px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.landing-page main.landing-main .landing-mock__msg-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__msg-refresh {
  font-size: 8px;
  opacity: 0.65;
}

body.landing-page main.landing-main .landing-mock__conv-stack {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: auto;
  flex: 1;
  min-height: 48px;
}

body.landing-page main.landing-main .landing-mock__conv-item {
  display: block;
  font-size: 10px;
  font-weight: 500;
  padding: 4px 5px;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  color: var(--text-muted);
  text-align: left;
  line-height: 1.25;
}

body.landing-page main.landing-main .landing-mock__conv-item--active {
  border-color: rgba(249, 115, 22, 0.45);
  background: rgba(249, 115, 22, 0.08);
  color: var(--text-main);
  font-weight: 700;
}

body.landing-page main.landing-main .landing-mock__msg-col--thread {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.landing-page main.landing-main .landing-mock__msg-thread-head {
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}

body.landing-page main.landing-main .landing-mock__msg-thread-head strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__msg-thread-head span {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
}

body.landing-page main.landing-main .landing-mock__msg-bubbles {
  flex: 1;
  min-height: 36px;
  max-height: 140px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0;
}

body.landing-page main.landing-main .landing-mock__msg-bubbles--canal {
  max-height: 120px;
}

body.landing-page main.landing-main .landing-mock__bubble {
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  padding: 6px 8px;
  border-radius: 8px;
  max-width: 95%;
}

body.landing-page main.landing-main .landing-mock__bubble--them {
  align-self: flex-start;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__bubble--me {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.2), rgba(251, 146, 60, 0.12));
  border: 1px solid rgba(249, 115, 22, 0.35);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__bubble--dir {
  align-self: flex-start;
  background: rgba(13, 148, 136, 0.12);
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__bubble--prof {
  align-self: flex-end;
  background: var(--bg-main);
  border: 1px solid var(--border);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__msg-canal-caption {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 2px 0;
}

body.landing-page main.landing-main .landing-mock__msg-compose {
  display: flex;
  gap: 4px;
  align-items: center;
  padding-top: 4px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__msg-input-fake {
  flex: 1;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__msg-send-fake {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 6px;
  border-radius: 6px;
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  color: #fff;
  white-space: nowrap;
}

body.landing-page main.landing-main .landing-mock__sheet--msg-dir .landing-mock__msg-send-fake {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
}

/* Annonces direction — cartes type list-item */
body.landing-page main.landing-main .landing-mock__ann-card {
  padding: 6px 7px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-main);
  margin-bottom: 5px;
}

body.landing-page main.landing-main .landing-mock__ann-card:last-child {
  margin-bottom: 0;
}

body.landing-page main.landing-main .landing-mock__ann-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

body.landing-page main.landing-main .landing-mock__ann-meta {
  margin: 4px 0 6px;
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.35;
}

body.landing-page main.landing-main .landing-mock__ann-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}

body.landing-page main.landing-main .landing-mock__ann-chip {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__ann-body {
  margin: 0;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--text-main);
  white-space: pre-wrap;
}

body.landing-page main.landing-main .landing-mock__comp-list {
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

body.landing-page main.landing-main .landing-mock__comp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__comp-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.25;
  min-width: 0;
}

body.landing-page main.landing-main .landing-mock__status {
  flex-shrink: 0;
  font-size: 7.5px;
  font-weight: 800;
  padding: 2px 5px;
  border-radius: 5px;
  letter-spacing: 0.02em;
}

body.landing-page main.landing-main .landing-mock__status--a {
  background: #d1fae5;
  color: #065f46;
}

body.landing-page main.landing-main .landing-mock__status--ap {
  background: #bbf7d0;
  color: #14532d;
}

body.landing-page main.landing-main .landing-mock__status--eca {
  background: #fef3c7;
  color: #92400e;
}

body.landing-page main.landing-main .landing-mock__status--na {
  background: #fee2e2;
  color: #991b1b;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__status--a {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__status--ap {
  background: rgba(34, 197, 94, 0.22);
  color: #86efac;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__status--eca {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__status--na {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

body.landing-page main.landing-main .landing-mock__synth {
  padding: 5px 7px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

body.landing-page main.landing-main .landing-mock__synth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

body.landing-page main.landing-main .landing-mock__synth-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-mock__synth-pct {
  font-size: 10px;
  font-weight: 700;
  color: #0d9488;
}

body.landing-page main.landing-main .landing-mock__synth-track {
  position: relative;
  height: 5px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

body.landing-page main.landing-main .landing-mock__synth-fill {
  display: block;
  height: 100%;
  width: 62%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, var(--orange));
  transform-origin: left center;
  transform: scaleX(1);
}

body.landing-page main.landing-main .landing-mock__toasts {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 5px 8px 6px;
  border-top: 1px solid var(--border);
  background: var(--bg-main);
}

body.landing-page main.landing-main .landing-mock__toast {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border-radius: 7px;
  font-size: 7.5px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.05);
}

body.landing-page main.landing-main .landing-mock__toast-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

body.landing-page main.landing-main .landing-mock__toast--eval {
  border-left: 2px solid #0d9488;
}

body.landing-page main.landing-main .landing-mock__toast--eval .landing-mock__toast-dot {
  background: #14b8a6;
}

body.landing-page main.landing-main .landing-mock__toast--eval .landing-mock__toast-text {
  color: #0f766e;
}

body.landing-page main.landing-main .landing-mock__toast--ann {
  border-left: 2px solid var(--orange);
}

body.landing-page main.landing-main .landing-mock__toast--ann .landing-mock__toast-dot {
  background: var(--orange);
}

body.landing-page main.landing-main .landing-mock__toast--ann .landing-mock__toast-text {
  color: #c2410c;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__toast--eval .landing-mock__toast-text {
  color: #5eead4;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock__toast--ann .landing-mock__toast-text {
  color: #fdba74;
}

/* Animations maquette : vue visible + maquette dans le viewport (pas de pulse hors écran) */
@media (prefers-reduced-motion: no-preference) {
  body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-prof .landing-mock__synth-track--prof .landing-mock__synth-fill {
    animation: landingMockBarPulse 5.5s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }

  body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-dir .landing-mock__synth-track--dir .landing-mock__dir-synth-fill {
    animation: landingMockBarPulse 6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  }

  body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-prof .landing-mock__synth-track--prof::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
      105deg,
      transparent 35%,
      rgba(255, 255, 255, 0.45) 50%,
      transparent 65%
    );
    transform: translateX(-100%);
    animation: landingMockTrackShine 4s ease-in-out infinite;
    pointer-events: none;
  }

  body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-dir .landing-mock__synth-track--dir::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(
      105deg,
      transparent 35%,
      rgba(255, 255, 255, 0.45) 50%,
      transparent 65%
    );
    transform: translateX(-100%);
    animation: landingMockTrackShine 4.5s ease-in-out infinite 1.5s;
    pointer-events: none;
  }

  body.landing-page main.landing-main .landing-mock--in-view .landing-mock__toast--eval {
    animation: landingMockToastPulse 4s ease-in-out infinite;
  }

  body.landing-page main.landing-main .landing-mock--in-view .landing-mock__toast--ann {
    animation: landingMockToastPulseAnn 4s ease-in-out infinite 1.3s;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-mock__synth-fill,
  body.landing-page main.landing-main .landing-mock__dir-synth-fill,
  body.landing-page main.landing-main .landing-mock__toast--eval,
  body.landing-page main.landing-main .landing-mock__toast--ann {
    animation: none !important;
  }

  body.landing-page main.landing-main .landing-mock__synth-track--prof::after,
  body.landing-page main.landing-main .landing-mock__synth-track--dir::after {
    display: none !important;
  }
}

@keyframes landingMockBarPulse {
  0%, 100% {
    transform: scaleX(0.58);
  }

  50% {
    transform: scaleX(1);
  }
}

@keyframes landingMockTrackShine {
  0% {
    transform: translateX(-100%);
  }

  45%, 55% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
}

@keyframes landingMockToastPulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }

  50% {
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.18);
  }
}

@keyframes landingMockToastPulseAnn {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
  }

  50% {
    box-shadow: 0 3px 12px rgba(249, 115, 22, 0.2);
  }
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-prof .landing-mock__synth-track--prof::after,
html[data-theme="dark"] body.landing-page main.landing-main .landing-mock--in-view.landing-mock--view-dir .landing-mock__synth-track--dir::after {
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 65%
  );
}

/* Icônes cartes audience */
body.landing-page main.landing-main .landing-icon-svg {
  display: block;
  color: #0d9488;
}

body.landing-page main.landing-main .landing-card__icon--blue .landing-icon-svg {
  color: #0369a1;
}

body.landing-page main.landing-main .landing-card__icon--orange .landing-icon-svg {
  color: #ea580c;
}

body.landing-page main.landing-main .landing-card--audience .landing-card__icon {
  animation: none;
}

body.landing-page main.landing-main .landing-card--audience {
  transition:
    transform var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    border-color var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.landing-page main.landing-main .landing-card--audience:hover {
  transform: translateY(-3px);
  box-shadow: var(--ln-sh-lift, 0 12px 40px rgba(15, 23, 42, 0.078));
  border-color: var(--ln-line-teal, rgba(13, 148, 136, 0.22));
}

body.landing-page main.landing-main .landing-card--audience:active {
  transform: translateY(-2px);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-card--audience:hover,
  body.landing-page main.landing-main .landing-card--audience:active {
    transform: none;
  }
}

/* Grille audience : direction en tête sur desktop */
body.landing-page main.landing-main .landing-grid-3--audience {
  align-items: stretch;
}

/* Bento features */
body.landing-page main.landing-main .landing-features--bento {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.2vw, 20px);
}

@media (max-width: 720px) {
  body.landing-page main.landing-main .landing-features--bento {
    grid-template-columns: 1fr;
  }
}

body.landing-page main.landing-main .landing-feature--wide {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  body.landing-page main.landing-main .landing-feature--wide {
    grid-column: auto;
  }
}

body.landing-page main.landing-main .landing-section--features .landing-feature {
  transition:
    border-color var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    transform var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.landing-page main.landing-main .landing-section--features .landing-feature:hover {
  transform: translateY(-2px);
  box-shadow: var(--ln-sh-lift, 0 12px 40px rgba(15, 23, 42, 0.078));
}

body.landing-page main.landing-main .landing-section--features .landing-feature:focus {
  outline: none;
}

body.landing-page main.landing-main .landing-section--features .landing-feature:focus-visible {
  transform: translateY(-2px);
  box-shadow:
    var(--ln-sh-lift, 0 12px 40px rgba(15, 23, 42, 0.078)),
    0 0 0 2px #fff,
    0 0 0 4px #0d9488;
  border-color: rgba(13, 148, 136, 0.45);
}

body.landing-page main.landing-main .landing-section--features .landing-feature__num {
  animation: none;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-section--features .landing-feature:focus-visible {
  box-shadow:
    0 14px 40px rgba(0, 0, 0, 0.28),
    0 0 0 2px #1e293b,
    0 0 0 4px #2dd4bf;
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-section--features .landing-feature:hover,
  body.landing-page main.landing-main .landing-section--features .landing-feature:focus-visible {
    transform: none;
  }
}

/* CTA final : bouton */
body.landing-page main.landing-main .landing-cta-final__btn {
  transition:
    transform var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    background var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    color var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1)),
    box-shadow var(--ln-t, 0.24s) var(--ln-ease, cubic-bezier(0.22, 1, 0.36, 1));
}

body.landing-page main.landing-main .landing-cta-final__btn:hover {
  transform: translateY(-2px);
}

body.landing-page main.landing-main .landing-cta-final__btn:active {
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-cta-final__btn:hover {
    transform: none;
  }
}

/* Sections : espacement cohérent dans main */
body.landing-page main.landing-main > .landing-section {
  margin-bottom: clamp(56px, 10vw, 88px);
}

body.landing-page main.landing-main > .landing-section.landing-cta-final {
  margin-bottom: 0;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-mock {
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(148, 163, 184, 0.12);
}

/* ============================================
   LANDING — Parcours élève (timeline)
   ============================================ */

body.landing-page main.landing-main .landing-journey [data-landing-journey] {
  --journey-fill-ratio: 0;
}

body.landing-page main.landing-main .landing-journey__layout {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 0 8px 4px;
}

body.landing-page main.landing-main .landing-journey__line {
  position: absolute;
  left: 20px;
  top: 24px;
  bottom: 24px;
  width: 4px;
  border-radius: 4px;
  overflow: hidden;
  pointer-events: none;
}

body.landing-page main.landing-main .landing-journey__line-bg {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: inherit;
}

body.landing-page main.landing-main .landing-journey__line-fill {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(180deg, #0d9488 0%, #14b8a6 42%, var(--orange) 100%);
  transform-origin: top center;
  transform: scaleY(var(--journey-fill-ratio, 0));
  transition: transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

body.landing-page main.landing-main .landing-journey--reduce .landing-journey__line-fill {
  transition: none;
}

body.landing-page main.landing-main .landing-journey__steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

body.landing-page main.landing-main .landing-journey__step {
  position: relative;
  padding: 0 0 32px 56px;
}

body.landing-page main.landing-main .landing-journey__step:last-child {
  padding-bottom: 0;
}

body.landing-page main.landing-main .landing-journey__node {
  position: relative;
}

body.landing-page main.landing-main .landing-journey__icon {
  position: absolute;
  left: -44px;
  top: 4px;
  width: 40px;
  height: 40px;
  border-radius: var(--ln-r-sm, 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0d9488;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid rgba(13, 148, 136, 0.22);
}

body.landing-page main.landing-main .landing-journey__step:nth-child(2) .landing-journey__icon {
  color: var(--orange);
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.28);
}

body.landing-page main.landing-main .landing-journey__step:nth-child(3) .landing-journey__icon {
  color: #0369a1;
  background: rgba(3, 105, 161, 0.08);
  border-color: rgba(3, 105, 161, 0.22);
}

body.landing-page main.landing-main .landing-journey__card {
  padding: 18px 18px 16px;
  border-radius: var(--ln-r-md, 16px);
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--ln-sh-card, 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 28px rgba(15, 23, 42, 0.062));
}

body.landing-page main.landing-main .landing-journey__step-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--text-main);
}

body.landing-page main.landing-main .landing-journey__step-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

body.landing-page main.landing-main .landing-journey__mini {
  margin-top: 14px;
}

body.landing-page main.landing-main .landing-journey__mini--grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 160px;
}

body.landing-page main.landing-main .landing-journey__mini--grid span {
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--border), rgba(13, 148, 136, 0.15));
}

body.landing-page main.landing-main .landing-journey__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-top: 14px;
}

body.landing-page main.landing-main .landing-journey__pill {
  font-size: 10px;
  font-weight: 800;
  padding: 5px 10px;
  border-radius: var(--ln-r-sm, 12px);
}

body.landing-page main.landing-main .landing-journey__pill--a {
  background: #d1fae5;
  color: #065f46;
}

body.landing-page main.landing-main .landing-journey__pill--eca {
  background: #fef3c7;
  color: #92400e;
}

body.landing-page main.landing-main .landing-journey__microbar {
  flex: 1;
  min-width: 72px;
  max-width: 120px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

body.landing-page main.landing-main .landing-journey__microbar-fill {
  display: block;
  height: 100%;
  width: 68%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0d9488, var(--orange));
  transform-origin: left center;
}

body.landing-page main.landing-main .landing-journey__hint {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #0d9488;
}

body.landing-page main.landing-main .landing-journey__hint-icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

@media (prefers-reduced-motion: no-preference) {
  body.landing-page main.landing-main .landing-journey__microbar-fill {
    animation: landingJourneyMicroBar 3s ease-in-out infinite;
  }

  body.landing-page main.landing-main .landing-journey__hint-icon {
    animation: landingJourneyHintPulse 2.4s ease-in-out infinite;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.landing-page main.landing-main .landing-journey__microbar-fill,
  body.landing-page main.landing-main .landing-journey__hint-icon {
    animation: none !important;
  }
}

@keyframes landingJourneyMicroBar {
  0%, 100% {
    transform: scaleX(0.55);
  }

  50% {
    transform: scaleX(1);
  }
}

@keyframes landingJourneyHintPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}

@media (max-width: 600px) {
  body.landing-page main.landing-main .landing-journey__layout {
    padding-left: 0;
  }

  body.landing-page main.landing-main .landing-journey__line {
    left: 14px;
  }

  body.landing-page main.landing-main .landing-journey__step {
    padding-left: 48px;
  }

  body.landing-page main.landing-main .landing-journey__icon {
    left: -38px;
    width: 36px;
    height: 36px;
  }

  body.landing-page main.landing-main .landing-journey__icon svg {
    width: 22px;
    height: 22px;
  }
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-journey__pill--a {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}

html[data-theme="dark"] body.landing-page main.landing-main .landing-journey__pill--eca {
  background: rgba(251, 191, 36, 0.15);
  color: #fcd34d;
}

/* ============================================
   MIKN APP DASHBOARDS — UI cohérente (prof, direction, parent, élève, admin)
   Ne modifie pas la logique : uniquement présentation + animations visuelles.
   ============================================ */

body.mikn-app {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.mikn-app .header-title h1,
body.mikn-app .sidebar-title,
body.mikn-app .panel-header h2,
body.mikn-app .card-value {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
}

body.mikn-app .main-content {
  background: linear-gradient(165deg, var(--bg-main) 0%, var(--bg-body) 48%, var(--bg-main) 100%);
}

body.mikn-app .header {
  backdrop-filter: saturate(140%) blur(10px);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  border-bottom-color: color-mix(in srgb, var(--border) 85%, transparent);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

[data-theme="dark"] body.mikn-app .header {
  background: color-mix(in srgb, var(--bg-card) 88%, transparent);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}

body.mikn-app .btn {
  transition: background 0.2s var(--dash-ease), transform 0.18s var(--dash-ease), box-shadow 0.2s var(--dash-ease);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

body.mikn-app .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.28);
}

body.mikn-app .btn-secondary:hover {
  box-shadow: 0 4px 12px var(--shadow-color);
}

body.mikn-app .btn:active,
body.mikn-app .btn-icon:active {
  transform: translateY(0);
  transition-duration: 0.08s;
}

body.mikn-app .btn-icon {
  transition: border-color 0.2s var(--dash-ease), background 0.2s var(--dash-ease), transform 0.18s var(--dash-ease);
}

body.mikn-app .btn-icon:hover {
  border-color: color-mix(in srgb, var(--orange) 45%, var(--border));
  background: color-mix(in srgb, var(--orange) 8%, var(--bg-card));
}

body.mikn-app .panel {
  border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  box-shadow: var(--shadow-card);
  transition: border-color 0.22s var(--dash-ease), box-shadow 0.22s var(--dash-ease);
}

body.mikn-app .panel:hover {
  border-color: color-mix(in srgb, var(--border) 55%, var(--orange));
}

body.mikn-app .card {
  border: 1px solid color-mix(in srgb, var(--border) 65%, transparent);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s var(--dash-ease), box-shadow 0.22s var(--dash-ease), border-color 0.22s var(--dash-ease);
}

body.mikn-app .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
  border-color: color-mix(in srgb, var(--orange) 22%, var(--border));
}

body.mikn-app .card-icon {
  transition: transform 0.25s var(--dash-ease);
}

body.mikn-app .card:hover .card-icon {
  transform: scale(1.04);
}

body.mikn-app .nav-item {
  transition: background 0.18s var(--dash-ease), color 0.18s var(--dash-ease), transform 0.15s var(--dash-ease);
}

body.mikn-app .nav-item:hover {
  transform: translateX(2px);
}

body.mikn-app .nav-item.active {
  box-shadow: 0 4px 16px rgba(249, 115, 22, 0.25);
}

body.mikn-app .table th {
  padding: 10px 12px 10px 0;
  border-bottom-width: 2px;
}

body.mikn-app .table td {
  padding: 12px 12px 12px 0;
  transition: background 0.15s ease;
}

body.mikn-app .table tbody tr:hover td {
  background: color-mix(in srgb, var(--orange) 5%, transparent);
}

[data-theme="dark"] body.mikn-app .table tbody tr:hover td {
  background: color-mix(in srgb, var(--orange) 10%, transparent);
}

body.mikn-app .table-wrap {
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  overflow: hidden;
}

body.mikn-app .activity-card {
  transition: transform 0.22s var(--dash-ease), box-shadow 0.22s var(--dash-ease), border-left-color 0.2s var(--dash-ease);
}

body.mikn-app .activity-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

/* Tuiles « actions rapides » (remplace les gros blocs inline) */
.dash-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-card);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s var(--dash-ease), box-shadow 0.2s var(--dash-ease), border-color 0.2s var(--dash-ease);
  font: inherit;
  color: inherit;
  text-align: center;
}

.dash-tile:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
  border-color: color-mix(in srgb, var(--orange) 35%, var(--border));
}

.dash-tile:active {
  transform: translateY(-1px);
  transition-duration: 0.08s;
}

.dash-tile__ic {
  font-size: 26px;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex-shrink: 0;
}

.dash-tile__ic--teal {
  background: var(--mikn-teal-soft);
}

.dash-tile__ic--amber {
  background: var(--mikn-amber-soft);
}

.dash-tile__ic--blue {
  background: var(--mikn-blue-soft);
}

.dash-tile__ic--orange {
  background: var(--mikn-orange-soft);
}

.dash-tile__ic--green {
  background: rgba(16, 185, 129, 0.14);
}

.dash-tile__ic--violet {
  background: rgba(139, 92, 246, 0.14);
}

.dash-tile__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

/* Icônes stats admin manquantes */
.card-icon-purple {
  background: #ede9fe;
  color: #5b21b6;
}

.card-icon-teal {
  background: var(--mikn-teal-soft);
  color: var(--mikn-teal);
}

.card-icon-orange {
  background: var(--mikn-orange-soft);
  color: #c2410c;
}

[data-theme="dark"] .card-icon-purple {
  background: rgba(139, 92, 246, 0.2);
  color: #c4b5fd;
}

[data-theme="dark"] .card-icon-teal {
  background: rgba(13, 148, 136, 0.25);
  color: #5eead4;
}

[data-theme="dark"] .card-icon-orange {
  background: rgba(249, 115, 22, 0.2);
  color: #fdba74;
}

/* Révélation au scroll (alignée sur l’esprit landing-reveal) */
[data-dash-reveal] {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.55s var(--dash-ease), transform 0.55s var(--dash-ease);
  transition-delay: var(--dash-reveal-delay, 0ms);
}

[data-dash-reveal].dash-reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(1) {
  --dash-reveal-delay: 0ms;
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(2) {
  --dash-reveal-delay: 45ms;
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(3) {
  --dash-reveal-delay: 90ms;
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(4) {
  --dash-reveal-delay: 135ms;
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(5) {
  --dash-reveal-delay: 180ms;
}

body.mikn-app .cards > [data-dash-reveal]:nth-child(6) {
  --dash-reveal-delay: 225ms;
}

@media (prefers-reduced-motion: reduce) {
  [data-dash-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  body.mikn-app .btn:hover,
  body.mikn-app .card:hover,
  body.mikn-app .nav-item:hover,
  body.mikn-app .dash-tile:hover {
    transform: none;
  }

  body.mikn-app .card:hover .card-icon {
    transform: none;
  }

  body.mikn-app .activity-card:hover {
    transform: none;
  }
}

/* ============================================
   Lottie — styles UI (les JSON sont dans mikn-lottie-loaders.js)
   • .mikn-lottie-inline* + .mikn-btn-loading* → lottieflow-loading.json
   • .mikn-page-loader* → lottieflow-loading-page.json
   • .mikn-section-loader* → même JSON page, bloc dans une zone (ex. compétences)
   ============================================ */

.mikn-section-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 16px 12px;
  border-radius: var(--radius, 14px);
  background: color-mix(in srgb, var(--bg-main, #f8fafc) 88%, transparent);
  border: 1px dashed color-mix(in srgb, var(--border, #e2e8f0) 92%, var(--primary, #6366f1));
}

.mikn-section-loader__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.mikn-section-loader__lottie {
  width: 64px;
  height: 64px;
  line-height: 0;
}

.mikn-section-loader__lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.mikn-section-loader__msg {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  text-align: center;
  max-width: 28ch;
  line-height: 1.4;
}

.mikn-section-loader__fallback {
  width: 32px !important;
  height: 32px !important;
  margin: 8px auto !important;
}

.mikn-lottie-inline {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
  line-height: 0;
}

.mikn-lottie-inline svg {
  display: block;
}

.mikn-lottie-inline__fallback {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary, #6366f1) 22%, transparent);
  border-top-color: var(--primary, #6366f1);
  animation: mikn-lottie-fallback-spin 0.65s linear infinite;
}

.mikn-lottie-inline--reduce .mikn-lottie-inline__fallback {
  animation: none;
  opacity: 0.85;
}

@keyframes mikn-lottie-fallback-spin {
  to {
    transform: rotate(360deg);
  }
}

.mikn-btn--loading {
  pointer-events: none;
}

.mikn-btn-loading-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 1.2em;
}

.mikn-btn-loading-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: inherit;
}

.mikn-page-loader {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  /* Section : léger voile, pas d’effet plein écran massif */
  background: color-mix(in srgb, var(--bg-main, #f8fafc) 55%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: inherit;
}

html[data-theme="dark"] .mikn-page-loader {
  background: color-mix(in srgb, var(--bg-main, #0f172a) 58%, transparent);
}

.mikn-page-loader__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 14px;
  max-width: min(220px, calc(100% - 8px));
  background: var(--bg-card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: calc(var(--radius, 14px) * 0.85);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.mikn-page-loader__lottie {
  width: 72px;
  height: 72px;
  max-width: 20vw;
  max-height: 20vw;
}

.mikn-page-loader__lottie svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.mikn-page-loader__message {
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted, #64748b);
  text-align: center;
  line-height: 1.4;
  max-width: 18ch;
}

.mikn-page-loader__fallback {
  display: block;
  width: 28px;
  height: 28px;
  margin: 10px auto;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--primary, #6366f1) 22%, transparent);
  border-top-color: var(--primary, #6366f1);
  animation: mikn-lottie-fallback-spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
  .mikn-page-loader__fallback {
    animation: none;
    opacity: 0.9;
  }

  .mikn-lottie-inline__fallback {
    animation: none;
  }
}
/* --- Mikn Shared Event Grid / Modals --- */
.mikn-event-grid { 
  display: flex; 
  flex-direction: column; 
  gap: 15px; 
}
@media (min-width: 768px) {
  .mikn-event-grid { 
    display: grid; 
    grid-template-columns: 1.2fr 1fr; 
    gap: 15px 30px; 
    align-items: start; 
  }
}

/* Optimisation de l'espace vertical pour les modales paysage */
#modalProfAddEvent .modal-content,
#modalAddEvent .modal-content {
  max-width: 820px;
  max-height: 92vh;
  margin: auto; /* Aide au centrage si flex fails */
}

@media (min-width: 768px) {
  #modalProfAddEvent[style*="display: block"],
  #modalAddEvent[style*="display: block"] {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }
}

#modalProfAddEvent .form-group,
#modalAddEvent .form-group {
  margin-bottom: 0px;
}
#modalProfAddEvent .input,
#modalAddEvent .input {
  height: 36px;
  padding: 6px 10px;
}
#modalProfAddEvent textarea.input,
#modalAddEvent textarea.input {
  height: auto;
  min-height: 60px;
  max-height: 100px;
}

.mikn-color-swatch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.mikn-color-swatch { 
  width: 30px; 
  height: 30px; 
  border-radius: 50%; 
  border: 2px solid var(--border); 
  background: var(--bg-main); 
  cursor: pointer; 
  font-size: 14px; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  transition: transform .15s, box-shadow .15s;
}
.mikn-color-swatch:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mikn-color-preview {
  height: 6px; 
  border-radius: 3px; 
  background: #94a3b8; 
  margin-top: 8px; 
  transition: background .2s;
}


