@import url("/frontend/css/theme-b-tokens.css");
@import url("/frontend/tools/controlbar/controlbar.css");

/* Tableau de bord — flux linéaire, thème Craie & grain */

/*
 * Ambiance « espace de travail calme » : neutres chauds, papier, bois, lumière douce.
 * Aligné sur un moodboard type cosy minimal desk (tons crème, bois, clarté).
 */

html {
  scroll-behavior: smooth;
}

body.dashboard-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  /* Tokens légèrement réchauffés pour le shell dashboard (hérités par la controlbar) */
  --theme-b-page-shell: #e8e2da;
  --theme-b-bg: #faf7f1;
  --theme-b-text: #292521;
  --theme-b-text-muted: #6b645d;
  --theme-b-border: #dfd6ca;
  --theme-b-subtle: #f1ebe4;
  --theme-b-action: #6e5d49;
  --theme-b-action-hover: #5c4d3c;
  --theme-b-on-action: #fffdf9;
  --theme-b-primary: #3d3328;
  --theme-b-tag-bg: #d9cfc3;
  --theme-b-tag-text: #3a3026;
  font-family: "DM Sans", "Nunito", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 120% 80% at 8% -10%, rgba(255, 252, 247, 0.95) 0%, transparent 52%),
    linear-gradient(168deg, #fdfcfa 0%, #f2ebe4 48%, #e5dcd4 100%);
  color: var(--theme-b-text);
  line-height: 1.55;
  overflow-x: hidden;
}

/* DA background: toujours derrière le contenu (jamais mis en avant) */
body.dashboard-page.da-bg-lab {
  --mp-bg:
    radial-gradient(980px 520px at -8% 12%, rgba(111, 110, 160, 0.2), rgba(111, 110, 160, 0) 62%),
    radial-gradient(860px 460px at 108% -6%, rgba(255, 201, 174, 0.2), rgba(255, 201, 174, 0) 58%),
    linear-gradient(180deg, #fff7f3 0%, #fff3ec 42%, #fff8f3 100%);
  position: relative;
  isolation: isolate;
  background: var(--mp-bg) !important;
  background-attachment: fixed;
}

body.dashboard-page.da-bg-lab .bg-layer,
body.dashboard-page.da-bg-lab .bg-cursor-halo {
  z-index: 0 !important;
  pointer-events: none;
}

body.dashboard-page.da-bg-lab .dashboard-shell {
  position: relative;
  z-index: 2;
}

.dashboard-shell {
  margin-left: var(--shell-content-offset, 88px);
  margin-right: auto;
  max-width: 80%;
  width: 80%;
  min-width: 0;
  padding-top: max(2rem, env(safe-area-inset-top));
  padding-right: max(1.5rem, env(safe-area-inset-right));
  padding-bottom: max(
    3.5rem,
    calc(env(safe-area-inset-bottom) + var(--shell-bottom-nav-h, 0px))
  );
  padding-left: max(1.5rem, env(safe-area-inset-left));
  box-sizing: border-box;
}

/* --- Hero --- */
.dashboard-hero {
  padding: 0.25rem 0 2rem;
  margin-bottom: 0.5rem;
}

.dashboard-hero__greeting {
  margin: 0 0 0.4rem;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--theme-b-action);
}

.dashboard-hero__title {
  margin: 0 0 0.75rem;
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  width: fit-content;
  max-width: min(100%, 820px);
  padding: 0.42rem 0.82rem 0.52rem;
  border-radius: 16px;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: clamp(1.85rem, 3.8vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.16;
  color: color-mix(in srgb, var(--theme-b-text) 92%, #2b211a);
}

.dashboard-hero__title--admin {
  margin: 0;
}

.dashboard-hero__accent {
  font-family: inherit;
  /* Clair sur fonds foncés, lisible aussi sur fonds clairs (halo + ombre portée). */
  color: #fffefa;
  font-style: normal;
  font-weight: 800;
  /* Mettre en avant « tableau de bord » par rapport à « Ton » */
  font-size: 1.28em;
  line-height: 1.12;
  vertical-align: baseline;
  paint-order: stroke fill;
  -webkit-text-stroke: 0.018em rgba(42, 32, 26, 0.14);
  text-shadow:
    0 1px 2px rgba(24, 19, 15, 0.34),
    0 0 10px rgba(255, 255, 250, 0.18);
}

.dashboard-hero__lede {
  margin: 0;
  max-width: 42rem;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--theme-b-text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dashboard-hero__ledeLead {
  display: block;
}

.dashboard-hero__ledeSub {
  display: block;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--theme-b-text-muted);
}

.dashboard-hero__ledeSub--desktop {
  display: none;
}

.dashboard-hero__ledeSub--mobile {
  display: block;
}

@media (min-width: 769px) {
  .dashboard-hero__ledeSub--desktop {
    display: block;
  }

  .dashboard-hero__ledeSub--mobile {
    display: none;
  }
}

.dashboard-hero__ledeStrong {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 800;
  color: var(--theme-b-text);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* --- Sections --- */
.dashboard-section {
  scroll-margin-top: 1.25rem;
  margin-bottom: 3.25rem;
}

.dashboard-section__head {
  margin-bottom: 1.35rem;
}

.dashboard-section__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--theme-b-text-muted);
}

.dashboard-section__title {
  margin: 0 0 0.4rem;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--theme-b-text);
}

.dashboard-section__subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: var(--theme-b-text-muted);
  max-width: 40rem;
}

/* Spotlight programme — expansion au survol (souris / grand écran) */
.dashboard-section--programme {
  overflow: visible;
}

.dashboard-spotlight {
  /* ease-in-out symétrique : la fermeture est le même chemin que l’ouverture, inversé */
  --dash-spot-dur: 0.62s;
  --dash-spot-ease: cubic-bezier(0.45, 0, 0.55, 1);
  /* Pas d’overflow dans la transition : ouverture = fermeture (snap instantané du clip, pas de délai seulement au repli) */
  --dash-spot-t: margin var(--dash-spot-dur) var(--dash-spot-ease),
    padding var(--dash-spot-dur) var(--dash-spot-ease),
    width var(--dash-spot-dur) var(--dash-spot-ease),
    max-width var(--dash-spot-dur) var(--dash-spot-ease),
    box-shadow var(--dash-spot-dur) var(--dash-spot-ease),
    border-radius var(--dash-spot-dur) var(--dash-spot-ease),
    transform var(--dash-spot-dur) var(--dash-spot-ease);
  --dash-spot-t-open: margin var(--dash-spot-dur) var(--dash-spot-ease),
    padding var(--dash-spot-dur) var(--dash-spot-ease),
    width var(--dash-spot-dur) var(--dash-spot-ease),
    max-width var(--dash-spot-dur) var(--dash-spot-ease),
    box-shadow var(--dash-spot-dur) var(--dash-spot-ease),
    border-radius var(--dash-spot-dur) var(--dash-spot-ease),
    transform var(--dash-spot-dur) var(--dash-spot-ease);
  /* H : vw ; V : même logique en vw (avec plafond rem) pour que les deux axes évoluent au même rythme visuel que la fenêtre */
  --dash-spot-stretch-x: min(36rem, 58vw);
  /* Moins d’espace sous le bloc quand l’aperçu est ouvert (était très généreux en padding-bas) */
  --dash-spot-stretch-y: clamp(2.5rem, 7vw, 4.25rem);
  display: block;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  /* Même haut / gauche qu’à l’ouverture : seuls droit et bas s’animent → pas de décalage du texte dans __content */
  padding: 1.75rem 1.5rem 1.65rem 1.65rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  transform: translate3d(0, 0, 0);
  transform-origin: top left;
  background: linear-gradient(
    145deg,
    #ffffff 0%,
    #fffdfb 44%,
    rgba(250, 245, 239, 0.8) 78%,
    rgba(255, 251, 246, 0.95) 100%
  );
  border-radius: 24px;
  border: 1px solid rgba(226, 218, 208, 0.98);
  box-shadow:
    0 8px 30px rgba(58, 48, 38, 0.055),
    0 1px 0 rgba(255, 255, 255, 0.88) inset;
  overflow: hidden;
  transition: var(--dash-spot-t);
}

/* Pas d’élargissement horizontal hors du shell : fenêtres étroites + tout appareil tactile */
@media (max-width: 959px), (hover: none) {
  .dashboard-section--programme {
    overflow-x: clip;
  }

  .dashboard-spotlight {
    --dash-spot-stretch-x: 0px;
  }
}

.dashboard-spotlight__kicker {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--da-text-muted, #806b74);
}

.dashboard-spotlight__title {
  margin: 0 0 0.55rem;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--theme-b-text);
}

.dashboard-spotlight__text {
  margin: 0 0 0.65rem;
  font-size: 0.98rem;
  color: var(--theme-b-text-muted);
  max-width: 32rem;
}

.dashboard-spotlight-wrap {
  --dash-spot-dur: 0.62s;
  --dash-spot-ease: cubic-bezier(0.45, 0, 0.55, 1);
  position: relative;
  z-index: 1;
  cursor: pointer;
  max-width: 100%;
  overflow-x: clip;
  transition: z-index 0s linear var(--dash-spot-dur);
}

/*
 * Cible demandée: #dashboardSpotlight.
 * On borne l'ouverture horizontale pour qu'elle n'aille jamais au-delà du viewport.
 */
#dashboardSpotlightWrap {
  --dash-spot-stretch-x-safe: max(
    0px,
    calc(100vw - var(--shell-content-offset, 88px) - 3rem - 100%)
  );
}

#dashboardSpotlight {
  --dash-spot-stretch-x: min(36rem, var(--dash-spot-stretch-x-safe));
  max-width: 100%;
}

/* Même logique partout : 0fr → 1fr (pas de display:none sur tactile, sinon pas d’anim) */
.dashboard-spotlight__expandSlot {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dash-spot-dur) var(--dash-spot-ease);
}

@media (hover: hover) and (min-width: 960px) {
  /* is-hover-open = JS : retrait dès mouseleave (pas de délai), transition = inverse de l’ouverture */
  .dashboard-spotlight-wrap.is-hover-open,
  .dashboard-spotlight-wrap.is-expanded {
    z-index: 24;
    transition-delay: 0s;
  }

  .dashboard-spotlight-wrap.is-hover-open .dashboard-spotlight,
  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight {
    /* Gauche fixe : tiroir vers la droite ; bas : padding uniquement (pas de margin-bottom négatif) */
    margin-left: 0;
    margin-right: calc(-1 * var(--dash-spot-stretch-x));
    margin-bottom: 0;
    width: calc(100% + var(--dash-spot-stretch-x));
    /* Jamais "none" : none ↔ 100% ne s’interpole pas → le largeur sautait au repli alors que le vertical suivait la durée */
    max-width: calc(100% + var(--dash-spot-stretch-x));
    padding: 1.75rem 1.5rem calc(1.25rem + var(--dash-spot-stretch-y)) 1.65rem;
    border-radius: 22px 24px 28px 22px;
    box-shadow:
      0 12px 32px rgba(58, 48, 38, 0.07),
      0 28px 56px rgba(37, 35, 32, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.9) inset;
    overflow: visible;
    transition: var(--dash-spot-t-open);
  }

  .dashboard-spotlight-wrap.is-hover-open .dashboard-spotlight__expandSlot,
  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight__expandSlot {
    grid-template-rows: 1fr;
  }
}

/* Tactile / fenêtre étroite : ouverture seulement au clic (.is-expanded) */
@media (max-width: 959px), (hover: none) {
  .dashboard-spotlight-wrap.is-expanded {
    z-index: 24;
    transition-delay: 0s;
  }

  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight {
    margin-left: 0;
    margin-right: calc(-1 * var(--dash-spot-stretch-x));
    margin-bottom: 0;
    width: calc(100% + var(--dash-spot-stretch-x));
    max-width: calc(100% + var(--dash-spot-stretch-x));
    padding: 1.75rem 1.5rem calc(1.25rem + var(--dash-spot-stretch-y)) 1.65rem;
    border-radius: 22px 24px 28px 22px;
    box-shadow:
      0 12px 32px rgba(58, 48, 38, 0.07),
      0 28px 56px rgba(37, 35, 32, 0.1),
      0 1px 0 rgba(255, 255, 255, 0.9) inset;
    overflow: visible;
    transition: var(--dash-spot-t-open);
  }

  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight__expandSlot {
    grid-template-rows: 1fr;
  }
}

/* Aperçu sans zone scroll : le bloc peut s’allonger plutôt que barres de défilement */
@media (max-width: 959px), (hover: none) {
  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight,
  .dashboard-spotlight-wrap.is-hover-open .dashboard-spotlight {
    overflow: visible;
  }
}

.dashboard-spotlight__expand {
  overflow: visible;
  min-height: 0;
  padding-top: 0;
  margin-top: 0;
  border-top: 1px solid transparent;
  opacity: 0;
  transition:
    opacity var(--dash-spot-dur, 0.62s) var(--dash-spot-ease, cubic-bezier(0.45, 0, 0.55, 1)),
    padding-top var(--dash-spot-dur, 0.62s) var(--dash-spot-ease, cubic-bezier(0.45, 0, 0.55, 1)),
    margin-top var(--dash-spot-dur, 0.62s) var(--dash-spot-ease, cubic-bezier(0.45, 0, 0.55, 1)),
    border-color var(--dash-spot-dur, 0.62s) var(--dash-spot-ease, cubic-bezier(0.45, 0, 0.55, 1));
}

@media (hover: hover) and (min-width: 960px) {
  .dashboard-spotlight-wrap.is-hover-open .dashboard-spotlight__expand,
  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight__expand {
    padding-top: 0.95rem;
    padding-bottom: 0.2rem;
    margin-top: 0.75rem;
    border-top-color: rgba(218, 210, 200, 0.95);
    opacity: 1;
  }
}

@media (max-width: 959px), (hover: none) {
  .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight__expand {
    padding-top: 0.95rem;
    padding-bottom: 0.2rem;
    margin-top: 0.75rem;
    border-top-color: rgba(218, 210, 200, 0.95);
    opacity: 1;
  }
}

.dashboard-spotlight-expand__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem 1rem;
  align-items: start;
}

@media (hover: hover) and (min-width: 960px) and (max-width: 1140px) {
  .dashboard-spotlight-expand__grid {
    grid-template-columns: 1fr;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--pending {
    order: 1;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--created {
    order: 2;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--recent {
    order: 3;
  }
}

/* Tablettes / mobile : une colonne pour l’aperçu d’activité */
@media (max-width: 959px) {
  .dashboard-spotlight-expand__grid {
    grid-template-columns: 1fr;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--pending {
    order: 1;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--created {
    order: 2;
  }

  .dashboard-spotlight-expand__grid .dashboard-activity-col--recent {
    order: 3;
  }
}

.dashboard-spotlight .dashboard-mini-card {
  padding: 0.85rem 0.95rem;
}

.dashboard-spotlight .dashboard-mini-card__title {
  font-size: 0.98rem;
}

/* Cartes mini — même gabarit métadonnées que la page Programmes (pas de médias) */
.dashboard-spotlight .dashboard-mini-card__categories {
  margin: 0 0 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dashboard-spotlight .dashboard-mini-card__audience {
  margin: 0 0 0.45rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.dashboard-spotlight .dashboard-mini-card__metaRow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.45rem;
}

.dashboard-spotlight .dashboard-mini-card__difficulty {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  background: rgba(109, 93, 75, 0.08);
  border: 1px solid rgba(109, 93, 75, 0.18);
  max-width: 100%;
}

.dashboard-spotlight .dashboard-mini-card__difficultyLabel {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--theme-b-text-muted);
}

.dashboard-spotlight .dashboard-mini-card__difficultyWord {
  font-size: 0.72rem;
  font-weight: 750;
  color: var(--theme-b-text);
  max-width: 8rem;
  line-height: 1.2;
}

.dashboard-spotlight .dashboard-mini-card__difficultyMeter {
  display: inline-flex;
  align-items: stretch;
  gap: 3px;
  min-width: 4rem;
  flex: 1 1 4rem;
}

.dashboard-spotlight .dashboard-mini-card__difficultySeg {
  flex: 1 1 0;
  min-width: 0;
  height: 6px;
  border-radius: 2px;
  background: rgba(109, 93, 75, 0.18);
}

.dashboard-spotlight .dashboard-mini-card__difficultySeg--on {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--theme-b-action) 88%, #fff) 0%,
    var(--theme-b-action) 100%
  );
}

.dashboard-spotlight .dashboard-mini-card__difficultyNum {
  font-size: 0.66rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--theme-b-text-muted);
}

.dashboard-spotlight .dashboard-mini-card__pill--audience {
  font-size: 0.72rem;
  padding: 0.06rem 0.4rem;
}

.dashboard-spotlight .dashboard-mini-card__pill--soundFlag,
.dashboard-spotlight .dashboard-mini-card__pill--pieceFlag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.dashboard-spotlight .dashboard-mini-card__pillAuxText {
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-spotlight .dashboard-mini-card__pill--soundFlag .training-card-ico--sound {
  color: #16a34a;
  flex-shrink: 0;
}

.dashboard-spotlight .dashboard-mini-card__pill--pieceFlag .training-card-ico--piece {
  color: #ca8a04;
  flex-shrink: 0;
}

.dashboard-spotlight .dashboard-mini-card__pill--duration {
  font-size: 0.72rem;
}

.dashboard-spotlight-preview__title {
  margin: 0 0 0.75rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-b-text-muted);
}

.dashboard-spotlight-preview__body {
  font-size: 0.86rem;
  color: var(--theme-b-text);
  min-height: 0;
  max-height: none;
  overflow: visible;
}

.dashboard-spotlight-preview__empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--theme-b-text-muted);
  line-height: 1.4;
}

.dashboard-spotlight-preview__jump {
  display: block;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--theme-b-border);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--theme-b-action);
  text-decoration: none;
}

/* Vue admin : masquer contenu élève */
body.dashboard-admin-view .dashboard-hero__lede--student {
  display: none;
}

body.dashboard-admin-view #comment,
body.dashboard-admin-view .dashboard-foot {
  display: none !important;
}

.dashboard-admin-layout {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1.15rem;
  align-items: start;
}

@media (min-width: 720px) {
  .dashboard-admin-layout {
    flex-wrap: nowrap;
  }
}

@media (max-width: 719px) {
  .dashboard-admin-layout {
    flex-direction: column;
  }
}

.dashboard-admin-widget-wrap {
  margin-top: 0.75rem;
}

.dashboard-admin-promise-wrap {
  margin-top: 0.75rem;
}

body.dashboard-admin-view #programme {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.65rem;
  align-items: start;
}

body.dashboard-admin-view #dashboardAdminSpotlightWrap,
body.dashboard-admin-view #dashboardAdminWidgetWrap,
body.dashboard-admin-view #dashboardAdminPromiseWrap {
  margin-top: 0.2rem;
  width: 100%;
  min-width: 0;
}

body.dashboard-admin-view #dashboardAdminWidgetWrap {
  margin-top: 0.08rem;
  min-width: 380px;
  flex: 1.08 1 380px;
}

body.dashboard-admin-view #dashboardAdminSpotlightWrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-spotlight {
  height: 100%;
  width: 100%;
  max-width: 100%;
}

body.dashboard-admin-view #dashboardAdminSpotlight .dashboard-spotlight__content--admin {
  display: block;
  margin-right: 0;
}

body.dashboard-admin-view #dashboardAdminSpotlight .dashboard-admin-layout {
  display: block;
  width: 100%;
}

body.dashboard-admin-view #dashboardAdminSpotlight .dashboard-admin-layout > * {
  width: 100%;
  margin-right: 0;
}

body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: 100%;
}

body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcut {
  flex: 1 1 140px;
  min-height: 3.4rem;
  padding: 0.5rem 0.55rem;
}

@media (max-width: 1380px) {
  body.dashboard-admin-view #programme {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  body.dashboard-admin-view #programme {
    width: 100%;
    padding-inline: 0.45rem;
    box-sizing: border-box;
    gap: 0.45rem;
  }

  body.dashboard-admin-view #dashboardAdminSpotlightWrap,
  body.dashboard-admin-view #dashboardAdminWidgetWrap,
  body.dashboard-admin-view #dashboardAdminPromiseWrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0;
    padding: 0.3rem 0.35rem;
    box-sizing: border-box;
  }

  body.dashboard-admin-view #dashboardAdminWidgetWrap {
    flex: 1 1 auto;
  }

  body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcuts {
    gap: 0.32rem;
  }

  body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcut {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 2.7rem;
    padding: 0.36rem 0.32rem;
    gap: 0.2rem;
    border-radius: 10px;
  }

  body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcut__glyph {
    font-size: 0.85rem;
  }

  body.dashboard-admin-view #dashboardAdminSpotlightWrap .dashboard-admin-shortcut__label {
    font-size: 0.58rem;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.dashboard-admin-view #billingIterationWidgetHost,
  body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesCarnetBlock--entry {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0.6rem;
    box-sizing: border-box;
  }

  body.dashboard-admin-view #billingIterationWidgetHost .billing-iter-widget {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }
}

body.dashboard-admin-view #billingIterationWidgetHost {
  width: 100%;
  padding: 0.45rem;
  border-radius: 18px;
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 28%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-b-border) 42%, transparent);
  backdrop-filter: blur(16px) saturate(118%);
  -webkit-backdrop-filter: blur(16px) saturate(118%);
  box-shadow:
    0 12px 28px rgba(58, 48, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.36);
}

body.dashboard-admin-view #billingIterationWidgetHost .billing-iter-widget {
  
  overflow: hidden;
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesCarnetBlock--entry {
  width: 100%;
  border-radius: 18px;
  padding: 0.9rem;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(252, 248, 242, 0.28) 52%,
    rgba(245, 238, 230, 0.22) 100%
  );
  border: 1px solid rgba(222, 210, 196, 0.45);
  backdrop-filter: blur(16px) saturate(122%);
  -webkit-backdrop-filter: blur(16px) saturate(122%);
  box-shadow:
    0 12px 30px rgba(58, 48, 38, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesCarnetBlockHead {
  margin-bottom: 0.6rem;
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesCarnetBlock__title {
  color: color-mix(in srgb, var(--theme-b-text, #3a322b) 90%, #fff);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesKindSwitchBtn {
  border-color: color-mix(in srgb, var(--theme-b-border) 45%, transparent);
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 72%, transparent);
  color: var(--theme-b-text, #3a322b);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminPromisesKindSwitchBtn--active {
  background: color-mix(in srgb, var(--theme-b-action, #6e5d49) 18%, var(--theme-b-surface, #fff));
  border-color: color-mix(in srgb, var(--theme-b-action, #6e5d49) 28%, var(--theme-b-border));
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .adminFieldInput {
  border: 1px solid color-mix(in srgb, var(--theme-b-border) 50%, transparent);
  background: color-mix(in srgb, #fff 82%, transparent);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .ghostBtn {
  border: 1px solid color-mix(in srgb, var(--theme-b-border) 42%, transparent);
  background: color-mix(in srgb, #fff 74%, transparent);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap .ghostBtn:hover {
  background: color-mix(in srgb, #fff 86%, transparent);
}

body.dashboard-admin-view .dashboard-admin-promise-wrap #promiseComposerSubmit {
  display: block;
  margin-inline: auto;
}

.dashboard-admin-block__title {
  margin: 0 0 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--theme-b-text-muted, #74675b);
}

.dashboard-admin-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
  gap: 0.5rem;
}

.dashboard-admin-shortcut {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 4.5rem;
  padding: 0.65rem 0.4rem;
  border-radius: 14px;
  text-decoration: none;
  text-align: center;
  color: var(--theme-b-text, #3a322b);
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-b-border) 32%, transparent);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.dashboard-admin-shortcut:hover {
  border-color: color-mix(in srgb, var(--theme-b-action, #6e5d49) 28%, var(--theme-b-border));
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 28%, transparent);
  transform: translateY(-1px);
}

.dashboard-admin-shortcut__glyph {
  font-size: 1.15rem;
  line-height: 1;
  opacity: 0.88;
}

.dashboard-admin-shortcut__label {
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
  color: color-mix(in srgb, var(--theme-b-text) 88%, var(--theme-b-text-muted));
}

.dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts {
  margin-top: 0;
}

.dashboard-spotlight-wrap--admin .dashboard-btn {
  font-size: 14px;
}

.dashboard-spotlight--admin .dashboard-spotlight__text {
  margin-bottom: 0;
}

/* Espace formateur — carte légèrement « grain de verre », bordure douce */
.dashboard-spotlight--admin {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.34) 0%,
    rgba(252, 248, 242, 0.28) 50%,
    rgba(242, 234, 224, 0.24) 100%
  );
  backdrop-filter: blur(26px) saturate(132%);
  -webkit-backdrop-filter: blur(26px) saturate(132%);
  border: 1px solid rgba(200, 190, 178, 0.26);
  box-shadow:
    0 8px 32px rgba(58, 48, 38, 0.028),
    inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts .dashboard-btn--ghost {
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--theme-b-border) 28%, transparent);
  color: color-mix(in srgb, rgb(118, 108, 98) 55%, rgb(82, 76, 70));
  backdrop-filter: blur(14px) saturate(122%);
  -webkit-backdrop-filter: blur(14px) saturate(122%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts .dashboard-btn--ghost:hover {
  background: color-mix(in srgb, var(--theme-b-surface, #fff) 24%, transparent);
  border-color: color-mix(in srgb, var(--theme-b-action, #6e5d49) 26%, var(--theme-b-border));
  color: color-mix(in srgb, rgb(96, 90, 84) 45%, var(--theme-b-text));
}

.dashboard-spotlight-preview__jump:hover {
  text-decoration: underline;
}

.dashboard-activity-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.dashboard-activity-col .moduleCard {
  width: 100%;
  border-radius: var(--pt-radius-sm, 18px);
  border: 1px solid var(--pt-border, rgba(255, 255, 255, 0.28));
  background: var(--pt-glass-strong, rgba(255, 255, 255, 0.22));
  box-shadow: var(--pt-card-shadow, 0 8px 32px rgba(0, 0, 0, 0.18));
  overflow: hidden;
}

.dashboard-activity-col .moduleCard .moduleCard__bg {
  border-radius: inherit;
}

.dashboard-activity-col .moduleCard .moduleCard__body {
  min-height: 108px;
}

.dashboard-activity-col .moduleCard:hover {
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: var(--pt-card-shadow-hover, 0 14px 40px rgba(0, 0, 0, 0.22));
}

.dashboard-spotlight-card__date {
  margin: 0.52rem 0 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
}

.dashboard-activity-col__label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--theme-b-action);
}

.dashboard-activity-col__label--pending {
  color: #8a5c38;
}

.dashboard-activity-col__label--created {
  color: var(--theme-b-primary);
}

.dashboard-mini-card {
  display: block;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  /* Aligné sur `moduleCard__body` (programmsTrainning.css). */
  padding: 0.82rem 0.95rem 0.88rem 1.05rem;
  padding-left: 1.1rem;
  min-height: 102px;
  box-sizing: border-box;
  border-radius: 16px;
  border: 1px solid var(--theme-b-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    transform 0.15s ease;
}

.dashboard-mini-card--withVisual::before,
.dashboard-mini-card--withVisual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.dashboard-mini-card--withVisual::before {
  z-index: 0;
  background-image: var(--dashboard-mini-bg-image, none);
  background-size: cover;
  background-position: center;
  filter: saturate(1.06) brightness(0.88);
  transform: scale(1.02);
}

.dashboard-mini-card--withVisual::after {
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(10, 12, 18, 0.5) 0%, rgba(10, 12, 18, 0.2) 56%, rgba(10, 12, 18, 0.56) 100%),
    radial-gradient(100% 75% at 10% 8%, rgba(255, 255, 255, 0.14), transparent 58%);
}

.dashboard-mini-card--withVisual > * {
  position: relative;
  z-index: 1;
}

.dashboard-mini-card:not(.dashboard-mini-card--withVisual) {
  /* Même rendu "glass body" que les cards Programmes quand il n'y a pas de miniature. */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02));
}

.dashboard-mini-card--withVisual .dashboard-mini-card__title,
.dashboard-mini-card--withVisual .dashboard-mini-card__meta,
.dashboard-mini-card--withVisual .dashboard-mini-card__eyebrow,
.dashboard-mini-card--withVisual .dashboard-mini-card__difficultyLabel,
.dashboard-mini-card--withVisual .dashboard-mini-card__difficultyNum,
.dashboard-mini-card--withVisual .dashboard-mini-card__pill,
.dashboard-mini-card--withVisual .dashboard-mini-card__pillAuxText {
  color: #fff;
}

.dashboard-mini-card--withVisual .dashboard-mini-card__pill {
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.14);
}

.dashboard-mini-card:hover {
  border-color: rgba(109, 93, 75, 0.28);
  box-shadow: 0 4px 18px rgba(109, 93, 75, 0.08);
  transform: translateY(-1px);
}

.dashboard-mini-card:focus-visible {
  outline: 2px solid var(--theme-b-action);
  outline-offset: 2px;
}

.dashboard-mini-card--empty {
  cursor: default;
  opacity: 0.92;
}

.dashboard-mini-card--empty:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--theme-b-border);
}

@keyframes dashboardNewBadgePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow:
      0 0 0 0 rgba(255, 120, 40, 0.55),
      0 2px 10px rgba(200, 85, 20, 0.35);
  }
  50% {
    transform: scale(1.06);
    box-shadow:
      0 0 0 5px rgba(255, 140, 60, 0.2),
      0 4px 16px rgba(220, 100, 30, 0.45);
  }
}

.dashboard-mini-card--pending {
  position: relative;
  padding-right: 3.15rem;
  border-color: rgba(138, 92, 56, 0.32);
  background: linear-gradient(
    135deg,
    rgba(250, 232, 210, 0.72) 0%,
    rgba(255, 255, 255, 0.94) 100%
  );
}

.dashboard-mini-card--pending:hover {
  border-color: rgba(109, 93, 75, 0.4);
}

.dashboard-mini-card__new {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  min-height: 1.42rem;
  padding: 0.22rem 0.55rem;
  box-sizing: border-box;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  color: #fff;
  text-align: center;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
  background: linear-gradient(
    145deg,
    #ffb347 0%,
    #ff7a2e 45%,
    #e85a18 100%
  );
  border: 1px solid rgba(255, 220, 180, 0.65);
  border-radius: 999px;
  pointer-events: none;
  animation: dashboardNewBadgePulse 2.2s ease-in-out infinite;
}

.dashboard-mini-card--pending:hover .dashboard-mini-card__new {
  animation-play-state: paused;
}

.dashboard-mini-card__eyebrow {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--theme-b-text-muted);
  margin-bottom: 0.35rem;
}

.dashboard-mini-card__eyebrow--alert {
  color: #8a5c38;
}

.dashboard-mini-card__title {
  display: block;
  margin: 0 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--theme-b-text);
}

.dashboard-mini-card__meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--theme-b-text-muted);
  line-height: 1.4;
}

.dashboard-mini-card__meta strong {
  font-weight: 700;
  color: var(--theme-b-text);
}

.dashboard-mini-card__meta + .dashboard-mini-card__meta {
  margin-top: 0.35rem;
}

.dashboard-mini-card__pill {
  display: inline-block;
  padding: 0.08rem 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 6px;
  background: var(--theme-b-tag-bg);
  color: var(--theme-b-tag-text);
}

.dashboard-mini-card__badge {
  display: inline-block;
  margin-top: 0.55rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
  background: rgba(232, 205, 178, 0.65);
  color: #4a3428;
  border: 1px solid rgba(138, 92, 56, 0.2);
}

/* Étapes */
.dashboard-section--method {
  padding: 1.5rem 0;
}

.dashboard-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.dashboard-steps::before {
  content: "";
  position: absolute;
  left: 1.15rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(
    180deg,
    var(--theme-b-border),
    rgba(110, 93, 74, 0.28),
    var(--theme-b-border)
  );
  border-radius: 1px;
}

.dashboard-steps__item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.85rem 0;
  position: relative;
}

.dashboard-steps__num {
  flex-shrink: 0;
  width: 2.45rem;
  height: 2.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "DM Sans", "Instrument Sans", "Outfit", sans-serif;
  font-size: 0.9rem;
  font-weight: 850;
  letter-spacing: 0.02em;
  color: color-mix(in srgb, var(--da-text, #3a322b) 88%, #ffffff 12%);
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.52);
  box-shadow:
    0 14px 26px rgba(67, 42, 58, 0.16),
    0 4px 10px rgba(67, 42, 58, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
}

.dashboard-steps__item:nth-child(1) .dashboard-steps__num {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.52) 0%,
    rgba(255, 255, 255, 0.24) 100%
  );
}

.dashboard-steps__item:nth-child(2) .dashboard-steps__num {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.22) 100%
  );
}

.dashboard-steps__item:nth-child(3) .dashboard-steps__num {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.48) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
}

.dashboard-steps__title {
  margin: 0 0 0.25rem;
  font-family: "DM Sans", "Instrument Sans", "Outfit", sans-serif;
  font-size: clamp(1.01rem, 1.4vw, 1.1rem);
  font-weight: 760;
  letter-spacing: -0.015em;
  color: var(--theme-b-text);
}

.dashboard-steps__text {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.62;
  color: var(--theme-b-text-muted);
}

.dashboard-steps__text strong {
  color: var(--theme-b-text);
  font-weight: 700;
}

/* Étape 2 — accès navigation (breakpoint = controlbar : ≤768px = mobile) */
.dashboard-steps__titleEm {
  font-weight: 800;
  font-size: 1.18em;
  letter-spacing: -0.02em;
  color: rgb(116, 103, 91);
}

.dashboard-steps__accessLine {
  margin: 0.65rem 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--theme-b-text-muted);
}

.dashboard-steps__accessLine strong {
  color: var(--theme-b-text);
  font-weight: 700;
}

.dashboard-steps__accessLine--desktop {
  display: none;
  margin-top: 0;
}

.dashboard-steps__accessLine--mobile {
  display: block;
}

@media (min-width: 769px) {
  .dashboard-steps__accessLine--desktop {
    display: block;
  }

  .dashboard-steps__accessLine--mobile {
    display: none;
  }
}

.dashboard-steps__inlinePair {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  vertical-align: middle;
}

.dashboard-steps__railCue,
.dashboard-steps__menuCue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Pastille type controlbar, un peu plus compacte — pas d’effet « bouclier » au survol */
.dashboard-steps__programsCue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  min-width: 2.5rem;
  min-height: 2.5rem;
  box-sizing: border-box;
  border-radius: 12px;
  background: var(--theme-b-surface);
  border: 1px solid var(--theme-b-border);
  vertical-align: middle;
}

.dashboard-steps__railCue {
  margin: 0 0.15rem;
  vertical-align: middle;
}

.dashboard-steps__cueSvg {
  display: block;
}

/* Icône menu (lignes) — taille proche du corps du texte */
.dashboard-steps__cueSvg--menu {
  width: 0.95em;
  height: 0.95em;
  color: var(--theme-b-text-muted);
  opacity: 0.92;
}

/* Icône disque — même trait que la barre ; survol = noir comme le lien */
.dashboard-steps__programsCue .dashboard-steps__cueSvg--programs {
  width: 1.35rem;
  height: 1.35rem;
  color: var(--theme-b-primary);
  transition: color 0.15s ease;
}

.dashboard-steps__inlinePair:has(.dashboard-steps__accessProgramsLink:hover)
  .dashboard-steps__programsCue
  .dashboard-steps__cueSvg--programs {
  color: var(--theme-b-text);
}

.dashboard-steps__cueSvg--rail {
  width: auto;
  height: 1.28em;
  min-height: 1.15rem;
  color: var(--theme-b-text-muted);
  opacity: 0.92;
}

.dashboard-steps__accessProgramsLink {
  font-weight: 700;
  color: var(--theme-b-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.dashboard-steps__accessProgramsLink:hover {
  color: var(--theme-b-text);
}

.dashboard-steps__accessProgramsLink:focus,
.dashboard-steps__accessProgramsLink:focus-visible {
  outline: none;
}

/* Boutons */
.dashboard-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0.5rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  cursor: pointer;
  border: none;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.dashboard-btn--primary {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  color: var(--da-text, #3a322b);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 16px 34px rgba(67, 42, 58, 0.16),
    0 4px 12px rgba(67, 42, 58, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.dashboard-btn--primary:hover {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.56) 0%,
    rgba(255, 255, 255, 0.26) 100%
  );
  box-shadow:
    0 20px 40px rgba(67, 42, 58, 0.2),
    0 8px 18px rgba(67, 42, 58, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
  transform: translateY(-1px);
}

.dashboard-btn--ghost {
  background: transparent;
  color: var(--theme-b-action);
  border: 1px solid var(--theme-b-border-strong);
}

.dashboard-btn--ghost:hover {
  background: rgba(109, 93, 75, 0.08);
  border-color: var(--theme-b-action);
}

/* Pied */
.dashboard-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--theme-b-border);
  font-size: 0.88rem;
  color: var(--theme-b-text-muted);
}

.dashboard-foot__blurb {
  margin: 0;
  max-width: 40rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--theme-b-text);
}

.dashboard-foot__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.dashboard-foot .dashboard-foot__link {
  color: rgb(116, 103, 91);
  font-weight: 600;
  text-decoration: none;
}

.dashboard-foot .dashboard-foot__link:hover {
  text-decoration: underline;
}

.dashboard-foot .dashboard-foot__dot {
  color: rgb(116, 103, 91);
  opacity: 0.45;
}

@media (max-width: 768px) {
  .dashboard-shell {
    /* Même retrait gauche / droite (voir --shell-page-inline-pad dans controlbar.css) */
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
    padding-top: max(0.75rem, env(safe-area-inset-top));
    padding-left: max(0.6rem, env(safe-area-inset-left));
    padding-right: max(0.6rem, env(safe-area-inset-right));
  }
}

/* Mobile : hauteur d’aperçu spotlight un peu réduite */
@media (max-width: 640px) {
  .dashboard-spotlight {
    --dash-spot-stretch-y: clamp(2rem, 7vw, 3.75rem);
  }

  .dashboard-hero {
    padding-bottom: 0;
  }

  .dashboard-section {
    margin-bottom: 2.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .dashboard-btn--primary:hover {
    transform: none;
  }

  .shellRailDesktop,
  .shellMobileNavBackdrop {
    transition: none !important;
  }

  .dashboard-mini-card__new {
    animation: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* DA « Carnet lumineux » — alignement avec da-carnet-lumineux-tokens.css     */
/* body.dashboard-page surcharge encore .theme-carnet-lumineux : on rétablit */
/* les --theme-b-* et le fond à partir des --da-* (feuille DA chargée après).  */
/* -------------------------------------------------------------------------- */
body.theme-carnet-lumineux.dashboard-page {
  --theme-b-bg: var(--da-bg-page);
  --theme-b-surface: var(--da-surface-elevated);
  --theme-b-subtle: var(--da-bg-page-mid);
  --theme-b-page-shell: var(--da-bg-page-end);
  --theme-b-text: var(--da-text);
  --theme-b-text-muted: var(--da-text-muted);
  --theme-b-border: var(--da-border);
  --theme-b-border-strong: rgba(90, 75, 58, 0.2);
  --theme-b-tag-border: rgba(58, 48, 38, 0.08);
  --theme-b-primary: #453a30;
  --theme-b-primary-hover: #342a22;
  --theme-b-on-primary: #fffdfb;
  --theme-b-action: var(--da-cta-from);
  --theme-b-action-hover: var(--da-cta-to);
  --theme-b-on-action: var(--da-on-cta);
  --theme-b-tag-bg: #ebe4da;
  --theme-b-tag-text: #4a3d32;
  --theme-b-btn-shadow: var(--da-shadow-btn);
  --theme-b-btn-shadow-hover: 0 6px 22px rgba(160, 115, 75, 0.2);
  --theme-b-progress-track: rgba(58, 54, 48, 0.08);

  background:
    radial-gradient(ellipse 72% 52% at 6% -14%, var(--da-halo-sun) 0%, transparent 58%),
    linear-gradient(180deg, var(--da-bg-page) 0%, var(--da-bg-page-mid) 44%, var(--da-bg-page-end) 100%);
  color: var(--da-text);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-hero__accent {
  font-family: inherit;
  color: #fffefa;
  paint-order: stroke fill;
  -webkit-text-stroke: 0.018em rgba(42, 32, 26, 0.14);
  text-shadow:
    0 1px 2px rgba(24, 19, 15, 0.34),
    0 0 10px rgba(255, 255, 250, 0.18);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--da-surface-elevated) 72%, white) 0%,
    color-mix(in srgb, var(--da-surface) 66%, white) 38%,
    color-mix(in srgb, var(--da-bg-page-mid) 22%, white) 100%
  );
  border: 1px solid color-mix(in srgb, var(--da-border) 58%, white);
  box-shadow:
    var(--da-shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight--admin {
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--da-surface-elevated) 34%, transparent) 0%,
    color-mix(in srgb, var(--da-surface) 28%, transparent) 52%,
    color-mix(in srgb, var(--da-bg-page-mid) 20%, transparent) 100%
  );
  border: 1px solid color-mix(in srgb, var(--da-border) 34%, transparent);
  backdrop-filter: blur(28px) saturate(128%);
  -webkit-backdrop-filter: blur(28px) saturate(128%);
  box-shadow:
    0 10px 36px rgba(90, 72, 54, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-admin-shortcut {
  background: color-mix(in srgb, var(--da-surface-elevated) 14%, transparent);
  border-color: color-mix(in srgb, var(--da-border) 28%, transparent);
  color: var(--da-text, #3a322b);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-admin-shortcut:hover {
  background: color-mix(in srgb, var(--da-surface-elevated) 24%, transparent);
  border-color: color-mix(in srgb, var(--da-accent-warm, #c49a6c) 22%, var(--da-border));
}

body.theme-carnet-lumineux.dashboard-page
  .dashboard-spotlight-wrap--admin
  .dashboard-admin-shortcuts
  .dashboard-btn--ghost {
  background: color-mix(in srgb, var(--da-surface-elevated) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--da-border) 24%, transparent);
  color: color-mix(in srgb, var(--da-text-muted) 58%, var(--da-text));
  backdrop-filter: blur(16px) saturate(122%);
  -webkit-backdrop-filter: blur(16px) saturate(122%);
}

body.theme-carnet-lumineux.dashboard-page
  .dashboard-spotlight-wrap--admin
  .dashboard-admin-shortcuts
  .dashboard-btn--ghost:hover {
  background: color-mix(in srgb, var(--da-surface-elevated) 22%, transparent);
  border-color: color-mix(in srgb, var(--da-accent-warm, #c49a6c) 22%, var(--da-border));
  color: color-mix(in srgb, var(--da-text-muted) 35%, var(--da-text));
}

body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-preview__body {
  padding: 0.15rem;
  border-radius: 14px;
  background: color-mix(in srgb, var(--da-surface-elevated) 82%, var(--da-bg-page-mid));
  border: 1px solid color-mix(in srgb, var(--da-border) 82%, transparent);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-mini-card {
  border-color: color-mix(in srgb, var(--da-border) 74%, #fff);
  background: color-mix(in srgb, var(--da-surface) 90%, #fff);
  box-shadow: 0 2px 12px rgba(90, 72, 54, 0.06);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-mini-card:hover {
  border-color: color-mix(in srgb, var(--da-accent-sage) 38%, var(--da-border));
  box-shadow: 0 8px 22px rgba(90, 72, 54, 0.1);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-btn {
  border-radius: 999px;
}

body.theme-carnet-lumineux.dashboard-page .dashboard-btn--primary {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.46) 0%,
    rgba(255, 255, 255, 0.2) 100%
  );
  color: var(--da-text, #3a322b);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow:
    0 16px 34px rgba(67, 42, 58, 0.16),
    0 4px 12px rgba(67, 42, 58, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.66);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-btn--primary:hover {
  background: linear-gradient(
    155deg,
    rgba(255, 255, 255, 0.56) 0%,
    rgba(255, 255, 255, 0.26) 100%
  );
  box-shadow:
    0 20px 40px rgba(67, 42, 58, 0.2),
    0 8px 18px rgba(67, 42, 58, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts .dashboard-btn--primary,
body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts .dashboard-btn--primary:hover,
body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap--admin .dashboard-admin-shortcuts .dashboard-btn--primary:focus-visible {
  color: var(--da-text, #3a322b);
}

@media (hover: hover) and (min-width: 960px) {
  body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap.is-hover-open .dashboard-spotlight,
  body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight {
    box-shadow:
      0 12px 32px rgba(90, 72, 54, 0.06),
      0 28px 56px rgba(75, 58, 45, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.92);
  }
}

/* Sage : touche minuscule (séparateur), pas sur les titres ni les cartes */
body.theme-carnet-lumineux.dashboard-page .dashboard-foot__dot {
  color: color-mix(in srgb, var(--da-accent-sage) 55%, var(--da-text-muted));
  opacity: 0.85;
}

body.theme-carnet-lumineux.dashboard-page .dashboard-foot .dashboard-foot__dot {
  color: rgb(116, 103, 91);
  opacity: 0.45;
}

@media (max-width: 959px), (hover: none) {
  body.theme-carnet-lumineux.dashboard-page .dashboard-spotlight-wrap.is-expanded .dashboard-spotlight {
    box-shadow:
      0 12px 32px rgba(90, 72, 54, 0.06),
      0 28px 56px rgba(75, 58, 45, 0.07),
      inset 0 1px 0 rgba(255, 255, 255, 0.92);
  }
}

/* -------------------------------------------------------------------------- */
/* DA « Lin & Ardoise » — DA RÉFÉRENTE (source : da-color-tokens.css)          */
/* Intégration dashboard via da-lin-ardoise-tokens.css (--da-* / --theme-b-*). */
/* -------------------------------------------------------------------------- */
body.theme-lin-ardoise.dashboard-page {
  --theme-b-bg: var(--da-bg-page);
  --theme-b-surface: var(--da-surface-elevated);
  --theme-b-subtle: var(--da-bg-page-mid);
  --theme-b-page-shell: var(--da-bg-page-end);
  --theme-b-text: var(--da-text);
  --theme-b-text-muted: var(--da-text-muted);
  --theme-b-border: var(--da-border);
  --theme-b-border-strong: rgba(38, 42, 48, 0.2);
  --theme-b-tag-border: rgba(38, 42, 48, 0.08);
  --theme-b-primary: var(--da-ink);
  --theme-b-primary-hover: #1b1e22;
  --theme-b-on-primary: #f6f7f8;
  --theme-b-action: var(--da-cta-from);
  --theme-b-action-hover: var(--da-cta-to);
  --theme-b-on-action: var(--da-on-cta);
  --theme-b-tag-bg: #e6e3db;
  --theme-b-tag-text: var(--da-ink);
  --theme-b-btn-shadow: var(--da-shadow-btn);
  --theme-b-btn-shadow-hover: 0 6px 22px rgba(92, 125, 151, 0.24);
  --theme-b-progress-track: rgba(38, 42, 48, 0.1);

  font-family: var(--typo-body, "Manrope", system-ui, sans-serif);
  background:
    radial-gradient(ellipse 72% 52% at 6% -14%, var(--da-halo-sun) 0%, transparent 58%),
    linear-gradient(180deg, var(--da-bg-page) 0%, var(--da-bg-page-mid) 44%, var(--da-bg-page-end) 100%);
  color: var(--da-text);
}

/* Fond DA (da-bg-lab) — dégradé clair froid, sans les calques lava/grain */
body.theme-lin-ardoise.dashboard-page.da-bg-lab {
  --mp-bg:
    radial-gradient(980px 520px at -8% 12%, rgba(92, 125, 151, 0.16), rgba(92, 125, 151, 0) 62%),
    radial-gradient(860px 460px at 108% -6%, rgba(156, 139, 118, 0.14), rgba(156, 139, 118, 0) 58%),
    linear-gradient(180deg, #f4f2ec 0%, #f1efe9 42%, #eae7df 100%);
}

/* Titres en display (League Spartan) */
body.theme-lin-ardoise.dashboard-page .dashboard-hero__title,
body.theme-lin-ardoise.dashboard-page .dashboard-section__title,
body.theme-lin-ardoise.dashboard-page .dashboard-spotlight__title,
body.theme-lin-ardoise.dashboard-page .dashboard-steps__title,
body.theme-lin-ardoise.dashboard-page .dashboard-steps__num {
  font-family: var(--typo-display, "League Spartan", sans-serif);
}

/* Mot accentué du hero : accent bleu lisible sur fond clair */
body.theme-lin-ardoise.dashboard-page .dashboard-hero__accent {
  color: var(--da-accent);
  -webkit-text-stroke: 0;
  text-shadow: none;
}

/* Spotlight programme */
body.theme-lin-ardoise.dashboard-page .dashboard-spotlight {
  background: linear-gradient(
    145deg,
    var(--da-surface-elevated) 0%,
    color-mix(in srgb, var(--da-surface) 70%, #fff) 48%,
    color-mix(in srgb, var(--da-bg-page-mid) 40%, #fff) 100%
  );
  border: 1px solid color-mix(in srgb, var(--da-border) 70%, #fff);
  box-shadow: var(--da-shadow-card), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.theme-lin-ardoise.dashboard-page .dashboard-spotlight--admin {
  background: linear-gradient(
    155deg,
    color-mix(in srgb, var(--da-surface-elevated) 40%, transparent) 0%,
    color-mix(in srgb, var(--da-surface) 30%, transparent) 52%,
    color-mix(in srgb, var(--da-bg-page-mid) 22%, transparent) 100%
  );
  border: 1px solid color-mix(in srgb, var(--da-border) 40%, transparent);
  box-shadow: 0 10px 36px rgba(38, 42, 48, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Cartes mini */
body.theme-lin-ardoise.dashboard-page .dashboard-mini-card {
  border-color: color-mix(in srgb, var(--da-border) 74%, #fff);
  background: color-mix(in srgb, var(--da-surface) 92%, #fff);
  box-shadow: 0 2px 12px rgba(38, 42, 48, 0.05);
}

body.theme-lin-ardoise.dashboard-page .dashboard-mini-card:hover {
  border-color: color-mix(in srgb, var(--da-accent) 40%, var(--da-border));
  box-shadow: 0 8px 22px rgba(38, 42, 48, 0.09);
}

/* Raccourcis admin */
body.theme-lin-ardoise.dashboard-page .dashboard-admin-shortcut {
  background: color-mix(in srgb, var(--da-surface-elevated) 16%, transparent);
  border-color: color-mix(in srgb, var(--da-border) 30%, transparent);
  color: var(--da-text);
}

body.theme-lin-ardoise.dashboard-page .dashboard-admin-shortcut:hover {
  background: color-mix(in srgb, var(--da-surface-elevated) 26%, transparent);
  border-color: color-mix(in srgb, var(--da-accent) 26%, var(--da-border));
}

/* Boutons — primaire = accent bleu plein */
body.theme-lin-ardoise.dashboard-page .dashboard-btn {
  border-radius: 999px;
}

body.theme-lin-ardoise.dashboard-page .dashboard-btn--primary {
  background: var(--da-accent);
  color: var(--da-accent-ink);
  border: 1px solid transparent;
  box-shadow: 0 12px 26px rgba(92, 125, 151, 0.28);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.theme-lin-ardoise.dashboard-page .dashboard-btn--primary:hover {
  background: var(--da-accent-hover);
  box-shadow: 0 16px 32px rgba(92, 125, 151, 0.34);
}

body.theme-lin-ardoise.dashboard-page .dashboard-btn--ghost {
  color: var(--da-accent);
  border: 1px solid var(--theme-b-border-strong);
}

body.theme-lin-ardoise.dashboard-page .dashboard-btn--ghost:hover {
  background: var(--da-accent-soft);
  border-color: var(--da-accent);
}

/* Pied */
body.theme-lin-ardoise.dashboard-page .dashboard-foot__dot {
  color: color-mix(in srgb, var(--da-accent-2) 55%, var(--da-text-muted));
  opacity: 0.85;
}
