/* ============================================================
   Aélio Academy — Direction Lagon (identité visuelle officielle)
   Navy #0B1F3A · Turquoise #14B8B0 · Or #F5A623 · Sable #F4F1EA
   ============================================================ */

@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-VariableFont_wght.ttf') format('truetype-variations'),
       url('../fonts/Raleway-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('../fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype-variations'),
       url('../fonts/Raleway-Italic-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype-variations'),
       url('../fonts/JetBrainsMono-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Charte Direction Lagon — codes stricts */
  --navy: #0B1F3A;
  --navy-mid: #1B3A5C;
  --turquoise: #14B8B0;
  --turquoise-deep: #0E847E;   /* texte/liens turquoise sur fond clair */
  --turquoise-light: #8BE3DE;  /* fonds d'accent doux */
  --or: #F5A623;
  --or-deep: #C4831A;
  --sable: #F4F1EA;
  --os: #EAE5D8;
  --ardoise: #5E6E82;
  --encre: #0A1628;
  --white: #FFFFFF;

  --or-soft: #FCEFD8;
  --turquoise-soft: #E3F6F4;

  --fg: var(--navy);
  --fg-muted: var(--ardoise);
  --fg-subtle: #8593A3;
  --border: #E1DACB;
  --border-strong: #CFC6AF;

  --font: 'Raleway', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-pill: 999px;
  --sh-sm: 0 1px 3px rgba(11,31,58,0.05);
  --sh-md: 0 8px 24px rgba(11,31,58,0.08);
  --sh-lg: 0 20px 48px rgba(11,31,58,0.14);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --grad-1: linear-gradient(135deg, #0B1F3A, #1B3A5C);
  --grad-2: linear-gradient(135deg, #0A1628, #0B1F3A 70%, #1B3A5C);
  --grad-3: linear-gradient(135deg, #0E847E, #14B8B0);
  --grad-4: linear-gradient(135deg, #1B3A5C, #5E6E82);
  --grad-5: linear-gradient(135deg, #0B1F3A 55%, #0E847E);
  --grad-6: linear-gradient(135deg, #0A1628, #1B3A5C 65%, #14B8B0);
}

* { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: 15px;
  line-height: 1.55; color: var(--fg); background: var(--sable);
}
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -0.015em; margin: 0; color: var(--fg); }
h1 { font-size: 2rem; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }
p { margin: 0 0 0.75rem; color: var(--fg-muted); }
a { color: var(--turquoise-deep); text-decoration: none; transition: color 200ms var(--ease); }
a:hover { color: var(--navy); }
svg { flex-shrink: 0; }

::selection { background: var(--turquoise-light); color: var(--navy); }

:focus-visible {
  outline: 2px solid var(--turquoise-deep);
  outline-offset: 2px;
  border-radius: 4px;
}

.eyebrow {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase; color: var(--turquoise-deep);
  margin-bottom: 0.35rem;
}
.rule-gold { display: block; width: 44px; height: 3px; border-radius: 2px; background: var(--or); border: 0; margin: 0.7rem 0 0; }
.muted { color: var(--fg-subtle); font-size: 0.85rem; }
.small { font-size: 0.85rem; }
.hide-sm {}

/* ============ STRUCTURE ============ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 236px; flex-shrink: 0;
  background: var(--navy);
  background-image:
    radial-gradient(circle at 85% 12%, rgba(20,184,176,0.10), transparent 55%),
    radial-gradient(circle at 10% 92%, rgba(20,184,176,0.08), transparent 50%);
  color: var(--white);
  display: flex; flex-direction: column;
  padding: 1.6rem 0.9rem 1.2rem;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar .logo { width: 150px; margin: 0.1rem 0 2rem 0.6rem; height: auto; display: block; }

/* ============ LOGO (SVG inline, wordmark hérite de currentColor) ============ */
.logo--light { color: var(--sable); }
.logo--dark { color: var(--navy); }
.sidebar nav { display: flex; flex-direction: column; gap: 3px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 0.7rem;
  color: rgba(244,241,234,0.68); padding: 0.62rem 0.85rem;
  border-radius: var(--r-md); font-size: 0.9rem; font-weight: 500;
  transition: background 200ms var(--ease), color 200ms var(--ease);
}
.sidebar nav a svg { width: 17px; height: 17px; fill: currentColor; opacity: 0.9; }
.sidebar nav a:hover { background: rgba(244,241,234,0.07); color: var(--white); }
.sidebar nav a.active { background: rgba(20,184,176,0.16); color: var(--turquoise-light); font-weight: 600; }
.sidebar .spacer { flex: 1; min-height: 1.5rem; }
.sidebar .whoami {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.9rem 0.6rem 0.5rem; border-top: 1px solid rgba(244,241,234,0.14);
  font-size: 0.78rem; color: rgba(244,241,234,0.66);
}
.sidebar .whoami strong { display: block; color: var(--white); font-weight: 600; font-size: 0.86rem; }
.btn-logout {
  margin-top: 0.5rem; background: none; border: 1px solid rgba(244,241,234,0.18);
  color: rgba(244,241,234,0.7); font-family: var(--font); font-size: 0.78rem;
  padding: 0.44rem 0.75rem; border-radius: var(--r-md); cursor: pointer; width: 100%;
  transition: border-color 200ms var(--ease), color 200ms var(--ease), background 200ms var(--ease);
}
.btn-logout:hover { border-color: var(--turquoise); color: var(--white); background: rgba(20,184,176,0.1); }

.content { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(244,241,234,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0.7rem 2.2rem; position: sticky; top: 0; z-index: 40;
}
.topbar .search { flex: 1; max-width: 400px; position: relative; }
.topbar .search input {
  width: 100%; border: 1px solid transparent; background: var(--os);
  border-radius: var(--r-pill); padding: 0.52rem 1rem 0.52rem 2.35rem;
  font-family: var(--font); font-size: 0.87rem; color: var(--fg);
  transition: border-color 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}
.topbar .search input:focus { outline: none; border-color: var(--turquoise-deep); background: var(--white); box-shadow: 0 0 0 3px rgba(14,132,126,0.15); }
.topbar .search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; fill: var(--fg-subtle); }
.topbar .spacer { flex: 1; }
.bell { position: relative; display: inline-flex; padding: 0.5rem; border-radius: 50%; transition: background 200ms var(--ease); }
.bell:hover { background: var(--os); }
.bell svg { width: 19px; height: 19px; fill: var(--navy-mid); }
.bell .dot {
  position: absolute; top: 1px; right: -1px;
  background: var(--or); color: var(--navy); font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: var(--r-pill);
  display: grid; place-items: center; padding: 0 4px; border: 2px solid var(--sable);
}

.avatar {
  display: inline-grid; place-items: center; border-radius: 50%;
  color: var(--white); font-weight: 600; flex-shrink: 0;
  width: 34px; height: 34px; font-size: 0.76rem; letter-spacing: 0.02em;
}
.avatar.lg { width: 58px; height: 58px; font-size: 1.15rem; }
.avatar.sm { width: 27px; height: 27px; font-size: 0.6rem; }

.main { flex: 1; padding: 2.4rem 2.2rem 3.5rem; max-width: 1120px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: 1.8rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1.2rem; flex-wrap: wrap; }
.breadcrumb { font-size: 0.8rem; color: var(--fg-subtle); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--fg-subtle); }
.breadcrumb a:hover { color: var(--turquoise-deep); }

/* ============ CARTES ============ */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.4rem; box-shadow: var(--sh-sm);
  transition: box-shadow 220ms var(--ease), transform 220ms var(--ease), border-color 220ms var(--ease);
}
a.card { display: block; }
a.card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); border-color: var(--turquoise-light); color: inherit; }
.section {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 1.7rem 1.8rem; box-shadow: var(--sh-sm); margin-bottom: 1.3rem;
}
.section > h2 { margin-bottom: 1rem; }
.flex { display: flex; align-items: center; gap: 0.75rem; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1.2rem; margin-bottom: 1.4rem; }
.kpi { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 1.25rem 1.4rem; box-shadow: var(--sh-sm); }
.kpi b {
  display: block; font-family: var(--font-mono); font-size: 1.9rem; font-weight: 700;
  color: var(--or-deep); line-height: 1.15;
}
.kpi span { font-size: 0.79rem; color: var(--fg-subtle); }
.kpi.gold { background: var(--navy); border-color: var(--navy); }
.kpi.gold b { color: var(--or); }
.kpi.gold span { color: rgba(244,241,234,0.7); }

.chip {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 0.28rem 0.7rem; border-radius: var(--r-pill);
  background: var(--os); color: var(--navy-mid);
}
.chip.gold { background: var(--or-soft); color: var(--or-deep); }
.chip.ok { background: var(--turquoise-soft); color: var(--turquoise-deep); }
.chip.ko { background: #FBEAEA; color: #A8453F; }

/* ============ COURS ============ */
.cover { border-radius: var(--r-lg) var(--r-lg) 0 0; height: 110px; position: relative; overflow: hidden; }
.cover::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 82% 120%, rgba(20,184,176,0.35), transparent 60%),
    radial-gradient(circle at 60% 140%, rgba(20,184,176,0.2), transparent 55%);
}
.cover.c1 { background: var(--grad-1); } .cover.c2 { background: var(--grad-2); }
.cover.c3 { background: var(--grad-3); } .cover.c4 { background: var(--grad-4); }
.cover.c5 { background: var(--grad-5); } .cover.c6 { background: var(--grad-6); }
.cover-count {
  position: absolute; left: 0.9rem; bottom: 0.7rem; z-index: 1;
  color: var(--white); font-size: 0.75rem; font-weight: 600;
  background: rgba(10,22,40,0.4); padding: 0.2rem 0.6rem; border-radius: var(--r-pill);
}
.course-card { padding: 0; overflow: hidden; }
.course-card .body { padding: 1.15rem 1.35rem 1.35rem; }
.course-card h3 { font-size: 1.08rem; }

.cover-pick input { display: none; }
.cover-pick .cover { width: 54px; height: 32px; border-radius: 8px; border: 2px solid transparent; cursor: pointer; display: block; transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease); }
.cover-pick input:checked + .cover { border-color: var(--turquoise); box-shadow: 0 0 0 2px rgba(20,184,176,0.25); }

.new-course-form { display: flex; gap: 0.6rem; align-items: center; }
.new-course-form input { width: 280px; }

/* ============ DROPZONE ============ */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  background: var(--white); padding: 2.2rem 1.5rem; text-align: center;
  margin-bottom: 0.9rem; cursor: pointer;
  transition: border-color 220ms var(--ease), background 220ms var(--ease);
}
.dropzone:hover, .dropzone.over { border-color: var(--turquoise); background: var(--turquoise-soft); }
.dropzone.busy { opacity: 0.6; pointer-events: none; }
.dropzone svg { width: 38px; height: 38px; fill: var(--turquoise-deep); margin-bottom: 0.3rem; }
.dropzone strong { font-weight: 600; color: var(--navy); font-size: 1.02rem; }
.dropzone span { font-size: 0.84rem; color: var(--fg-subtle); }
.dropzone .dz-or {
  margin: 0.4rem 0 0.2rem; font-family: var(--font-mono); text-transform: uppercase;
  font-size: 0.65rem; letter-spacing: 0.15em; color: var(--fg-subtle);
}
.dz-status { font-size: 0.84rem; color: var(--turquoise-deep); min-height: 1.1em; margin-top: 0.3rem; }

.quick-add {
  display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.3rem;
}
.quick-video {
  flex: 1; min-width: 260px; display: flex; align-items: center; gap: 0.5rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 0.35rem 0.4rem 0.35rem 0.8rem; box-shadow: var(--sh-sm);
}
.quick-video svg { width: 18px; height: 18px; fill: var(--navy-mid); }
.quick-video input { border: none; padding: 0.35rem 0.2rem; background: none; }
.quick-video input:focus { outline: none; box-shadow: none; }

.editor-grid { display: grid; grid-template-columns: 1fr 300px; gap: 1.3rem; align-items: start; }
.inline-details { border: none; padding: 0; margin: 0; background: none; }
.inline-details summary { font-size: 0.82rem; font-weight: 400; }

/* ============ PROGRESSION ============ */
.progress { background: var(--os); border-radius: var(--r-pill); height: 8px; overflow: hidden; flex: 1; min-width: 80px; }
.progress > span { display: block; height: 100%; background: var(--turquoise); border-radius: var(--r-pill); transition: width 450ms var(--ease); }
.ring { position: relative; width: 64px; height: 64px; flex-shrink: 0; }
.ring svg { transform: rotate(-90deg); }
.ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--navy); }

/* ============ TABLEAUX ============ */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th {
  text-align: left; font-family: var(--font-mono); font-weight: 700; font-size: 0.66rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-subtle);
  padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--border-strong);
}
td { padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--border); color: var(--fg-muted); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.row-link { cursor: pointer; transition: background 180ms var(--ease); }
tr.row-link:hover { background: var(--sable); }
.table-scroll { overflow-x: auto; }

/* ============ FORMULAIRES ============ */
label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--fg-muted); margin: 0.75rem 0 0.28rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="url"], input[type="search"], input[type="file"], textarea, select {
  width: 100%; font-family: var(--font); font-size: 0.9rem; color: var(--fg);
  background: var(--white); border: 1px solid var(--border-strong);
  border-radius: var(--r-md); padding: 0.6rem 0.78rem;
  transition: border-color 200ms var(--ease), box-shadow 200ms var(--ease);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--turquoise-deep); box-shadow: 0 0 0 3px rgba(14,132,126,0.14); }
textarea { resize: vertical; min-height: 84px; }
textarea.tall { min-height: 240px; font-size: 0.88rem; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0 0.9rem; }
.checkline { display: flex; align-items: center; gap: 0.55rem; margin: 0.5rem 0; font-size: 0.9rem; color: var(--fg-muted); font-weight: 400; }
.checkline input { width: auto; accent-color: var(--turquoise-deep); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  font-family: var(--font); font-size: 0.9rem; font-weight: 600;
  background: var(--turquoise); color: var(--navy); border: none; border-radius: var(--r-md);
  padding: 0.65rem 1.35rem; cursor: pointer; margin-top: 0.9rem;
  box-shadow: 0 2px 10px rgba(20,184,176,0.28);
  transition: filter 200ms var(--ease), transform 150ms var(--ease), box-shadow 200ms var(--ease);
}
.btn:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(20,184,176,0.34); color: var(--navy); }
.btn:active { transform: translateY(0); }
.btn.secondary { background: var(--os); color: var(--navy); box-shadow: none; }
.btn.secondary:hover { background: var(--border-strong); box-shadow: none; }
.btn.dark { background: var(--navy); color: var(--white); box-shadow: none; }
.btn.dark:hover { color: var(--white); filter: brightness(1.15); }
.btn.ghost { background: none; border: 1px solid var(--border-strong); color: var(--navy-mid); box-shadow: none; }
.btn.ghost:hover { border-color: var(--turquoise-deep); color: var(--turquoise-deep); box-shadow: none; transform: translateY(-1px); }
.btn.small { padding: 0.4rem 0.9rem; font-size: 0.79rem; margin-top: 0; }
.btn.danger { background: #FBEAEA; color: #A8453F; box-shadow: none; }
.btn.danger:hover { background: #F6DADA; color: #A8453F; }
.btn-icon {
  background: none; border: none; cursor: pointer; padding: 0.32rem; border-radius: var(--r-sm);
  color: var(--fg-subtle); display: inline-flex; transition: background 160ms var(--ease), color 160ms var(--ease);
}
.btn-icon:hover { background: var(--os); color: var(--navy); }
.btn-icon svg { width: 15px; height: 15px; fill: currentColor; }

details { border: 1px solid var(--border); border-radius: var(--r-md); padding: 0.75rem 1rem; margin-top: 1rem; background: var(--white); }
summary { cursor: pointer; font-weight: 600; color: var(--navy-mid); font-size: 0.9rem; }
details[open] summary { margin-bottom: 0.5rem; }

/* ============ LOGIN ============ */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; position: relative;
  background: var(--navy); overflow: hidden; padding: 1.5rem;
}
.login-orbits {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.login-card {
  position: relative; z-index: 1;
  background: var(--sable); border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  padding: 2.8rem; width: min(430px, 92vw); text-align: center;
}
.login-card .logo { width: 190px; margin-bottom: 1.6rem; height: auto; }
.login-card form { text-align: left; }
.login-error {
  background: var(--or-soft); border: 1px solid var(--or); border-radius: var(--r-md);
  color: var(--or-deep); font-size: 0.85rem; padding: 0.6rem 0.9rem; margin-top: 1rem; text-align: left;
}

/* ============ LISTES ============ */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list > li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0.3rem; border-bottom: 1px solid var(--border);
}
.item-list > li:last-child { border-bottom: none; }
.item-list .title { color: var(--fg); font-weight: 600; font-size: 0.93rem; }
.item-list .meta { font-size: 0.78rem; color: var(--fg-subtle); margin-top: 0.1rem; }

.lesson-row { display: flex; align-items: center; gap: 0.85rem; flex: 1; min-width: 0; }
.lesson-ico {
  width: 38px; height: 38px; border-radius: var(--r-md); flex-shrink: 0;
  display: grid; place-items: center; background: var(--os);
}
.lesson-ico svg { width: 17px; height: 17px; fill: var(--navy-mid); }
.lesson-ico.done { background: var(--turquoise-soft); }
.lesson-ico.done svg { fill: var(--turquoise-deep); }
.lesson-ico.locked { opacity: 0.5; }

.chapter-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.8rem;
  padding: 0.6rem 0.9rem; background: var(--sable); border-radius: var(--r-md);
  margin: 1.1rem 0 0.3rem; font-weight: 600; color: var(--navy); font-size: 0.92rem;
}
.chapter-head:first-of-type { margin-top: 0; }

/* ============ LECTEUR DE COURS ============ */
.player-body { background: var(--sable); }
.player-top {
  display: flex; align-items: center; gap: 1.2rem;
  background: var(--navy); color: var(--white);
  padding: 0.75rem 1.4rem; position: sticky; top: 0; z-index: 50;
}
.player-back {
  display: inline-flex; align-items: center; gap: 0.3rem;
  color: rgba(244,241,234,0.78); font-size: 0.86rem; white-space: nowrap;
}
.player-back svg { width: 17px; height: 17px; fill: currentColor; }
.player-back:hover { color: var(--turquoise-light); }
.player-title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.player-title strong { font-weight: 600; font-size: 0.95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-title .progress { background: rgba(244,241,234,0.16); max-width: 160px; }
.player-title .muted { color: rgba(244,241,234,0.62); font-size: 0.78rem; }

.player { display: grid; grid-template-columns: 300px 1fr; min-height: calc(100vh - 55px); }
.player-outline {
  background: var(--white); border-right: 1px solid var(--border);
  padding: 1rem 0.7rem 2rem; overflow-y: auto;
  position: sticky; top: 55px; height: calc(100vh - 55px);
}
.outline-chapter {
  font-family: var(--font-mono); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-subtle); padding: 1rem 0.8rem 0.4rem;
}
.outline-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.62rem 0.8rem; border-radius: var(--r-md); margin-bottom: 2px;
  transition: background 180ms var(--ease);
}
.outline-item:hover { background: var(--sable); color: inherit; }
.outline-item.current { background: var(--turquoise-soft); }
.outline-item.current .outline-label { color: var(--navy); font-weight: 600; }
.outline-item.locked { opacity: 0.45; cursor: default; }
.outline-label {
  flex: 1; min-width: 0; font-size: 0.87rem; color: var(--fg-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.outline-meta { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.03em; color: var(--fg-subtle); white-space: nowrap; }
.outline-check {
  width: 19px; height: 19px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid var(--border-strong); display: grid; place-items: center;
  background: var(--white);
}
.outline-check svg { width: 11px; height: 11px; fill: var(--white); }
.outline-check.done { background: var(--turquoise); border-color: var(--turquoise); }

.player-main { min-width: 0; }
.player-content { max-width: 720px; margin: 0 auto; padding: 2.3rem 2rem 4rem; }
.player-h1 { font-size: 1.6rem; margin-bottom: 1.4rem; }
.player-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 2rem 0 0; padding-top: 1.4rem; border-top: 1px solid var(--border);
}
.player-actions .btn { margin: 0; }
.discussion { margin-top: 2.6rem; padding-top: 1.6rem; border-top: 1px solid var(--border); }
.discussion h2 { margin-bottom: 0.8rem; }

/* ============ CONTENU (markdown, vidéo, pdf) ============ */
.prose { line-height: 1.7; color: var(--encre); font-size: 1.05rem; }
.prose h2 { font-size: 1.3rem; margin: 1.9rem 0 0.6rem; color: var(--navy); font-weight: 700; }
.prose h3 { font-size: 1.1rem; margin: 1.35rem 0 0.4rem; color: var(--navy); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0.5rem 0 1rem; }
.prose li { margin-bottom: 0.4rem; }
.prose strong { font-weight: 700; color: var(--navy); }
.prose table { margin: 0.9rem 0 1.3rem; font-size: 0.92rem; }
.prose blockquote { border-left: 3px solid var(--turquoise); margin: 1rem 0; padding: 0.3rem 1rem; font-style: italic; color: var(--navy); }
.prose code { background: var(--os); padding: 0.1em 0.35em; border-radius: 4px; font-family: var(--font-mono); font-size: 0.85em; }

.video-frame {
  position: relative; padding-top: 56.25%; border-radius: var(--r-lg); overflow: hidden;
  background: var(--encre); box-shadow: var(--sh-md);
}
.video-frame iframe, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.doc-frame { width: 100%; height: 74vh; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--white); box-shadow: var(--sh-sm); }

/* ============ QUIZ ============ */
.question { margin-bottom: 1.5rem; }
.question .q-text { font-weight: 600; color: var(--fg); margin-bottom: 0.55rem; font-size: 0.98rem; }
.option {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.65rem 0.9rem;
  border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 0.45rem;
  cursor: pointer; font-size: 0.92rem; color: var(--fg-muted); background: var(--white);
  transition: border-color 200ms var(--ease), background 200ms var(--ease), box-shadow 200ms var(--ease);
}
.option:hover { border-color: var(--turquoise); box-shadow: var(--sh-sm); }
.option input { accent-color: var(--turquoise-deep); }
.option.correct { background: var(--turquoise-soft); border-color: var(--turquoise); color: var(--navy); }
.option.wrong { background: #FBEAEA; border-color: #D68A8A; }
.explain {
  background: var(--sable); border-left: 3px solid var(--or); border-radius: 0 var(--r-md) var(--r-md) 0;
  padding: 0.55rem 0.95rem; font-size: 0.85rem; color: var(--navy-mid); margin-top: 0.35rem;
}
.score-banner {
  border-radius: var(--r-lg); padding: 1.5rem 1.9rem; margin-bottom: 1.5rem;
  display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap;
  background: var(--navy); color: rgba(244,241,234,0.85);
}
.score-banner .big { font-family: var(--font-mono); font-size: 2.3rem; font-weight: 700; color: var(--or); line-height: 1; }
.score-banner.fail { background: var(--white); border: 1px solid var(--border); color: var(--fg-muted); }
.score-banner.fail .big { color: var(--navy); }

/* ============ BADGES / CLASSEMENT ============ */
.badge-tile {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.5rem;
  padding: 1.4rem 1rem; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
}
.badge-tile.off { opacity: 0.42; filter: grayscale(1); }
.badge-medal {
  width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad-3); box-shadow: 0 6px 16px rgba(14,132,126,0.32);
}
.badge-medal svg { width: 26px; height: 26px; fill: var(--white); }
.badge-tile b { font-weight: 600; color: var(--navy); font-size: 0.92rem; }
.rank-pos { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 700; color: var(--fg-subtle); width: 2rem; text-align: center; }
.rank-1 .rank-pos { color: var(--or-deep); font-size: 1.3rem; }
tr.me td { background: var(--or-soft); }

/* ============ DIVERS ============ */
.comment { display: flex; gap: 0.7rem; padding: 0.85rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: none; }
.comment .who { font-weight: 600; font-size: 0.88rem; color: var(--navy); }
.comment .when { font-family: var(--font-mono); font-size: 0.68rem; color: var(--fg-subtle); }
.comment p { margin: 0.2rem 0 0; font-size: 0.9rem; }

.sig-pad {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  background: var(--white); width: 100%; height: 140px; touch-action: none; cursor: crosshair;
}
.sig-img { height: 44px; max-width: 150px; object-fit: contain; }

.notif { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.85rem 0.3rem; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: none; }
.notif.unread { background: var(--turquoise-soft); border-radius: var(--r-md); padding: 0.85rem; }
.notif .t { font-family: var(--font-mono); font-size: 0.7rem; color: var(--fg-subtle); }

.bar-row { display: grid; grid-template-columns: 150px 1fr 46px; align-items: center; gap: 0.85rem; margin-bottom: 0.7rem; font-size: 0.88rem; }
.bar-row .lbl { color: var(--fg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .val { font-family: var(--font-mono); text-align: right; color: var(--navy); font-weight: 700; }

.empty { text-align: center; padding: 2.6rem 1rem; color: var(--fg-subtle); }
.empty svg { width: 42px; height: 42px; fill: var(--border-strong); margin-bottom: 0.6rem; }

/* ============ CERTIFICAT ============ */
.cert-sheet {
  background: var(--white); max-width: 860px; margin: 0 auto;
  border: 1px solid var(--border); box-shadow: var(--sh-lg); border-radius: var(--r-md);
  padding: 3.2rem 3.6rem; position: relative; overflow: hidden;
}
.cert-sheet::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 8px;
  background: linear-gradient(90deg, var(--turquoise) 0%, var(--navy) 100%);
}
.cert-sheet::after {
  content: ''; position: absolute; right: -110px; bottom: -140px; width: 420px; height: 420px;
  background:
    radial-gradient(circle, transparent 58%, rgba(20,184,176,0.14) 60%, transparent 62%),
    radial-gradient(circle, transparent 70%, rgba(20,184,176,0.10) 72%, transparent 74%);
  pointer-events: none;
}
.cert-name { font-size: 2.2rem; font-weight: 700; color: var(--navy); margin: 0.6rem 0; }
.cert-course { font-size: 1.25rem; color: var(--turquoise-deep); font-weight: 700; }
.cert-meta { display: flex; gap: 2.5rem; margin-top: 2rem; flex-wrap: wrap; }
.cert-meta div b { display: block; font-family: var(--font-mono); color: var(--or-deep); font-weight: 700; font-size: 1.2rem; }
.cert-meta div span {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.1em;
}
.cert-foot {
  margin-top: 2.4rem; padding-top: 1.2rem; border-top: 1px solid var(--border);
  font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em;
  color: var(--fg-subtle); text-align: center; text-transform: uppercase;
}

@media print {
  .sidebar, .topbar, .no-print, .player-top, .player-outline { display: none !important; }
  body { background: var(--white); }
  .main { padding: 0; max-width: none; }
  .cert-sheet { border: none; box-shadow: none; }
  .section, .card { box-shadow: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 980px) {
  .editor-grid { grid-template-columns: 1fr; }
  .player { grid-template-columns: 1fr; }
  .player-outline {
    position: static; height: auto; max-height: 260px;
    border-right: none; border-bottom: 1px solid var(--border);
  }
}
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static; flex-direction: row; align-items: center;
    padding: 0.6rem 1rem; gap: 0.6rem; overflow-x: auto; background-image: none;
  }
  .sidebar .logo { width: 100px; margin: 0 0.6rem 0 0; }
  .sidebar nav { flex-direction: row; }
  .sidebar nav a span { display: none; }
  .sidebar nav a { padding: 0.5rem; }
  .sidebar .whoami { border: none; padding: 0; }
  .sidebar .whoami div, .sidebar form { display: none; }
  .topbar { padding: 0.6rem 1rem; }
  .main { padding: 1.4rem 1rem 2.5rem; }
  .bar-row { grid-template-columns: 100px 1fr 42px; }
  .hide-sm { display: none; }
  .player-content { padding: 1.4rem 1rem 3rem; }
  .new-course-form { width: 100%; }
  .new-course-form input { flex: 1; width: auto; }
}

/* Sélecteur de formation (espace formateur) */
.formation-switch { display: flex; gap: 0.35rem; margin-right: 0.9rem; }
.fs-tab {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; letter-spacing: 0.08em;
  padding: 0.38rem 0.75rem; border-radius: 999px; cursor: pointer;
  border: 1.5px solid var(--border, #d8d2c4); background: transparent; color: var(--fg-subtle, #6b6b6b);
}
.fs-tab:hover { border-color: var(--turquoise-deep, #0E847E); color: var(--turquoise-deep, #0E847E); }
.fs-tab.active { font-weight: 700; background: var(--white, #fff); }

/* Groupes AT dans le catalogue de cours */
.at-group { margin-top: 1.6rem; }
.at-group > h2 { display: flex; align-items: baseline; gap: 0.6rem; margin-bottom: 0.3rem; }
.at-group .at-code { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; letter-spacing: 0.1em; color: var(--turquoise-deep, #0E847E); }
.at-group .at-count { font-size: 0.8rem; color: var(--fg-subtle, #6b6b6b); font-weight: 400; }
.chip.cp { background: var(--turquoise-soft, #E2F3F2); color: var(--turquoise-deep, #0E847E); font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.05em; }

/* ---------- Module Exercices ---------- */
.exo-intro {
  background: var(--turquoise-soft); border-left: 3px solid var(--turquoise-deep);
  border-radius: var(--r-md); padding: 1rem 1.25rem; margin-bottom: 1.4rem;
}
.exo-intro p { margin: 0; color: var(--navy-mid); line-height: 1.55; white-space: pre-wrap; }
.exo-lastscore {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--os); border-radius: var(--r-md); padding: 0.75rem 1.1rem; margin-bottom: 1.2rem;
  font-size: 0.88rem; color: var(--navy-mid);
}
.exo-lastscore b { color: var(--navy); font-family: var(--font-mono); }
.exo-help { color: var(--fg-subtle); font-size: 0.85rem; margin: 0 0 1rem; }

/* Texte à trous */
.exo-fillblanks { font-size: 1rem; line-height: 2.2; background: var(--white); border: 1px solid var(--border); border-radius: var(--r-md); padding: 1.2rem 1.4rem; }
.exo-blank {
  display: inline-block; width: 9.5rem; text-align: center; margin: 0 0.25rem;
  border: none; border-bottom: 2px solid var(--turquoise); border-radius: 0;
  padding: 0.2rem 0.4rem; font-size: 1rem; font-family: var(--font); background: var(--turquoise-soft);
}
.exo-blank:focus { outline: none; border-bottom-color: var(--turquoise-deep); background: var(--white); box-shadow: 0 0 0 3px rgba(14,132,126,0.12); }

/* Appariement */
.exo-matching { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.6rem; }
.exo-match-item {
  padding: 0.75rem 1rem; margin: 0 0 0.6rem; background: var(--sable); border: 1px solid var(--border);
  border-radius: var(--r-sm); font-weight: 500; color: var(--navy); display: flex; align-items: center;
}
.exo-match-slot { padding: 0.4rem 0; margin: 0 0 0.6rem; }
.exo-match-slot select { width: 100%; }

/* Ordonnancement */
.exo-order-list { list-style: none; padding: 0; margin: 0 0 1rem; counter-reset: exo-order; }
.exo-order-item {
  counter-increment: exo-order; display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem; margin: 0 0 0.5rem; background: var(--sable); border: 1px solid var(--border);
  border-radius: var(--r-sm); cursor: grab;
}
.exo-order-item::before {
  content: counter(exo-order); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 700;
  color: var(--white); background: var(--turquoise-deep); border-radius: 999px;
  width: 1.5rem; height: 1.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.exo-order-item.selected { border-color: var(--turquoise-deep); box-shadow: 0 0 0 2px rgba(14,132,126,0.18); }
.exo-order-item svg { width: 16px; height: 16px; fill: var(--fg-subtle); flex-shrink: 0; }
.exo-order-actions { display: flex; gap: 0.5rem; }

/* Tableau à compléter */
.exo-table { width: 100%; border-collapse: collapse; }
.exo-table th { background: var(--navy); color: var(--white); padding: 0.65rem 0.85rem; text-align: left; font-size: 0.85rem; font-weight: 600; }
.exo-table td { padding: 0.35rem; border: 1px solid var(--border); }
.exo-table td span { display: block; padding: 0.5rem 0.7rem; color: var(--navy-mid); }
.exo-table input { width: 100%; padding: 0.5rem 0.7rem; border: 1.5px solid var(--turquoise); border-radius: var(--r-sm); background: var(--turquoise-soft); }

/* Réponse courte */
.exo-textarea { width: 100%; padding: 0.9rem 1rem; border-radius: var(--r-md); font-size: 0.95rem; line-height: 1.6; font-family: var(--font); resize: vertical; }

/* Résultat */
.exo-result { text-align: center; padding: 2rem 1.5rem; border-radius: var(--r-lg); }
.exo-result.pass { background: var(--turquoise-soft); border: 1px solid var(--turquoise-light); }
.exo-result.fail { background: var(--or-soft); border: 1px solid var(--or); }
.exo-result .score { font-family: var(--font-mono); font-size: 2.4rem; font-weight: 700; color: var(--navy); margin: 0.2rem 0; }
.exo-result p.msg { margin: 0.3rem 0 0; color: var(--fg-muted); }
.exo-corr-item { padding: 0.9rem 1.1rem; margin: 0.6rem 0; border-radius: var(--r-md); border: 1px solid var(--border); }
.exo-corr-item.ok { border-left: 3px solid var(--turquoise-deep); }
.exo-corr-item.ko { border-left: 3px solid var(--or-deep); }
.exo-corr-item .your-answer { color: var(--fg-muted); font-size: 0.88rem; }
.exo-corr-item .right-answer { color: var(--turquoise-deep); font-size: 0.88rem; font-weight: 500; }

/* Carte de téléchargement (documents non-PDF : Excel, Word, PowerPoint) */
.doc-card {
  display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg);
  text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s;
}
.doc-card:hover { border-color: var(--turquoise); box-shadow: var(--sh-sm); }
.doc-card-ico { flex-shrink: 0; width: 2.6rem; height: 2.6rem; border-radius: var(--r-md); background: var(--turquoise-soft); display: flex; align-items: center; justify-content: center; }
.doc-card-ico svg { width: 22px; height: 22px; fill: var(--turquoise-deep); }
.doc-card-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.doc-card-info strong { color: var(--navy); }
.doc-card-dl { flex-shrink: 0; width: 18px; height: 18px; fill: var(--fg-subtle); }

/* Bloc de rendu (dépôt apprenant) */
.rendu-block { margin-top: 1.6rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.rendu-status { display: flex; align-items: center; gap: 0.7rem; flex-wrap: wrap; }
.rendu-status-badge { font-size: 0.78rem; font-weight: 600; padding: 0.3rem 0.7rem; border-radius: 999px; }
.rendu-status.a_corriger .rendu-status-badge { background: var(--or-soft); color: var(--or-deep); }
.rendu-status.corrige .rendu-status-badge { background: var(--turquoise-soft); color: var(--turquoise-deep); }
.rendu-drop {
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center;
  padding: 1.6rem; border: 2px dashed var(--border-strong); border-radius: var(--r-lg);
  cursor: pointer; color: var(--fg-muted); transition: border-color 0.15s, background 0.15s;
}
.rendu-drop:hover { border-color: var(--turquoise); background: var(--turquoise-soft); }
.rendu-drop svg { width: 28px; height: 28px; fill: var(--turquoise-deep); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

.rendu-row { margin-bottom: 0.9rem; }
.rendu-row-main { display: flex; align-items: center; gap: 0.8rem; }

/* Badge de compteur dans la sidebar (ex. rendus à corriger) */
.nav-badge {
  margin-left: auto; background: var(--or); color: var(--navy); font-family: var(--font-mono);
  font-size: 0.68rem; font-weight: 700; border-radius: 999px; padding: 0.08rem 0.45rem; line-height: 1.4;
}

/* ============ CRM — SPÉCIFIQUE ============ */
.main--full { max-width: none; }
.sidebar-profil {
  display: block; font-size: 0.78rem; color: rgba(244,241,234,0.6);
  padding: 0.4rem 0.6rem 0; transition: color 200ms var(--ease);
}
.sidebar-profil:hover { color: var(--turquoise-light); }

/* ============ KANBAN ============ */
.kanban { display: flex; gap: 0.85rem; overflow-x: auto; align-items: flex-start; padding-bottom: 1.2rem; }
.kcol {
  min-width: 248px; width: 248px; flex-shrink: 0;
  background: var(--os); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 0.65rem;
  transition: outline-color 150ms var(--ease);
}
.kcol.over { outline: 2px dashed var(--turquoise); outline-offset: -2px; background: var(--turquoise-soft); }
.kcol-head { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; padding: 0.25rem 0.4rem 0.6rem; }
.kcol-head h3 {
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--navy-mid);
}
.kcol.won .kcol-head h3 { color: var(--turquoise-deep); }
.kcol.lost .kcol-head h3 { color: #A8453F; }
.kcol-meta { font-family: var(--font-mono); font-size: 0.68rem; color: var(--fg-subtle); white-space: nowrap; }
.kcol-body { display: flex; flex-direction: column; gap: 0.55rem; min-height: 60px; }
.kcol-empty {
  border: 1.5px dashed var(--border-strong); border-radius: var(--r-md);
  padding: 1rem; text-align: center; font-size: 0.78rem; color: var(--fg-subtle);
}
.kcard {
  display: block; background: var(--white); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 0.75rem 0.85rem;
  box-shadow: var(--sh-sm); cursor: grab; color: inherit;
  transition: box-shadow 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease);
}
.kcard:hover { box-shadow: var(--sh-md); border-color: var(--turquoise-light); transform: translateY(-2px); color: inherit; }
.kcard.dragging { opacity: 0.45; cursor: grabbing; }
.kcard-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.4rem; }
.kcard-top strong { font-size: 0.88rem; font-weight: 600; color: var(--navy); line-height: 1.3; }
.kcard-sub { display: block; font-size: 0.76rem; color: var(--fg-muted); margin-top: 0.15rem; }
.kcard-next {
  display: block; font-size: 0.73rem; color: var(--turquoise-deep);
  margin-top: 0.35rem; padding-left: 0.55rem; border-left: 2px solid var(--turquoise-light);
}
.kcard-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 0.55rem; }
.kcard-amount { font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; color: var(--or-deep); }
.prio { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.prio-haute { background: var(--or); box-shadow: 0 0 0 3px var(--or-soft); }
.prio-basse { background: var(--border-strong); }
.kcard, .kcol-head { user-select: none; -webkit-user-select: none; }

/* ============ TÂCHES / HISTORIQUE / NAV ============ */
.nav-badge {
  margin-left: auto; background: var(--or); color: var(--navy);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: var(--r-pill);
  display: inline-grid; place-items: center; padding: 0 5px;
}
.sidebar-note {
  font-size: 0.7rem; line-height: 1.45; color: rgba(244,241,234,0.45);
  padding: 0 0.6rem 0.6rem; margin: 0;
}
.task-line {
  display: flex; align-items: flex-start; gap: 0.7rem;
  padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--border);
}
.task-line:last-of-type { border-bottom: none; }
.task-check {
  width: 20px; height: 20px; border-radius: 6px; flex-shrink: 0; margin-top: 2px;
  border: 1.5px solid var(--border-strong); background: var(--white);
  cursor: pointer; display: grid; place-items: center; color: var(--white); padding: 0;
  transition: border-color 180ms var(--ease), background 180ms var(--ease);
}
.task-check:hover { border-color: var(--turquoise-deep); }
.is-done .task-check { background: var(--turquoise); border-color: var(--turquoise); }
.task-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.task-body strong { font-size: 0.9rem; font-weight: 600; color: var(--navy); }
.is-done .task-body strong { text-decoration: line-through; color: var(--fg-subtle); font-weight: 500; }
.task-meta { font-size: 0.75rem; color: var(--fg-subtle); }
.task-deal { font-size: 0.78rem; color: var(--turquoise-deep); }
.activity-add { padding-bottom: 1.1rem; border-bottom: 1px solid var(--border); margin-bottom: 1.1rem; }
.timeline { display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 0.75rem; position: relative; padding-bottom: 1.1rem; }
.tl-item::before {
  content: ''; position: absolute; left: 5px; top: 16px; bottom: 0;
  width: 1.5px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; margin-top: 5px;
  background: var(--ardoise); border: 2px solid var(--white); box-shadow: 0 0 0 1.5px var(--border-strong);
  position: relative; z-index: 1;
}
.tl-system .tl-dot { background: var(--border-strong); }
.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.tl-meta { font-size: 0.74rem; color: var(--fg-subtle); }
.tl-content { margin: 0.3rem 0 0; font-size: 0.88rem; color: var(--fg-muted); white-space: pre-wrap; }
.tl-system .tl-content { font-size: 0.8rem; color: var(--fg-subtle); font-style: italic; }

/* ============ TUNNEL V2 — PHASES / STAGNATION ============ */
.kanban .kcol { min-width: 218px; width: 218px; }
.phase-legend { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; font-size: 0.78rem; color: var(--fg-muted); }
.phase-dot-wrap { display: inline-flex; align-items: center; gap: 0.35rem; }
.phase-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.kcard-stall {
  font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700;
  background: #FBEAEA; color: #A8453F; padding: 0.16rem 0.45rem; border-radius: var(--r-pill);
  white-space: nowrap;
}
.kcol.dormant { background: #EFEAE0; }
.kcol.dormant .kcol-head h3 { color: var(--or-deep); }

/* ============ MON BUREAU ============ */
.kpi.alerte { border-color: #E5B8B4; background: #FBEAEA; }
.kpi.alerte b { color: #A8453F; }
.section-alerte { border-color: #E5B8B4; }
.section-alerte > h2 { color: #A8453F; }
.stall-row {
  display: flex; align-items: center; justify-content: space-between; gap: 0.7rem;
  padding: 0.6rem 0.2rem; border-bottom: 1px solid var(--border); color: inherit;
}
.stall-row:last-child { border-bottom: none; }
.stall-row strong { display: block; font-size: 0.9rem; color: var(--navy); }
.stall-row:hover strong { color: var(--turquoise-deep); }

/* ============ CALENDRIER ============ */
.cal { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-sm); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--os); border-bottom: 1px solid var(--border-strong); }
.cal-head div {
  padding: 0.55rem 0.6rem; font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-subtle);
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--border); }
.cal-week:last-child { border-bottom: none; }
.cal-day { min-height: 96px; padding: 0.35rem 0.4rem; border-right: 1px solid var(--border); overflow: hidden; }
.cal-day:last-child { border-right: none; }
.cal-empty { background: var(--sable); }
.cal-today { background: var(--turquoise-soft); }
.cal-num {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  font-family: var(--font-mono); font-size: 0.74rem; font-weight: 600; color: var(--fg-muted); margin-bottom: 0.25rem;
}
.cal-num:hover { background: var(--turquoise); color: var(--navy); }
.cal-today .cal-num { background: var(--turquoise-deep); color: var(--white); }
.cal-item {
  display: block; font-size: 0.7rem; line-height: 1.3; padding: 0.16rem 0.4rem; border-radius: 6px;
  margin-bottom: 0.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cal-rdv { background: var(--navy); color: var(--sable); font-weight: 600; }
.cal-rdv:hover { background: var(--navy-mid); color: var(--white); }
.cal-tache { background: var(--os); color: var(--fg-muted); }
.cal-tache:hover { background: var(--border); color: var(--navy); }
.cal-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.3rem; }
@media (max-width: 900px) { .cal-day { min-height: 64px; } .cal-item { font-size: 0.62rem; } }
