/* ============================================================
   Nexalys — Mon objectif (mode Apprentissage)
   Scoped sous .nxob-root. Typo Geist, esprit shadcn / Fluent.
   ============================================================ */

#tab-objectif { background: transparent; }

.nxob-root {
  --o-navy: var(--nx-green-700);
  --o-navy-ink: var(--nx-green-900);
  --o-navy-soft: var(--nx-green-50);
  --o-navy-soft-2: var(--nx-green-200);

  --o-ink: var(--nx-ink);
  --o-text: var(--nx-text);
  --o-muted: var(--nx-muted);
  --o-subtle: var(--nx-faint);
  --o-card: var(--nx-surface);
  --o-bg: var(--nx-bg);
  --o-soft: var(--nx-surface-2);
  --o-border: var(--nx-border);
  --o-border-strong: var(--nx-border-strong);
  --o-track: var(--nx-surface-3);

  --o-ok: var(--nx-green-700);
  --o-ok-ink: var(--nx-green-800);
  --o-warn: var(--nx-warn);
  --o-warn-ink: var(--nx-warn-ink);

  --o-sh-1: var(--nx-shadow-1);
  --o-sh-2: var(--nx-shadow-2);
  --o-sh-3: var(--nx-shadow-3);

  font-family: "Geist", "Geist Variable", "InterVariable", "Inter", system-ui,
               -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -.008em;
  color: var(--o-text);

  min-height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 13px 28px;
  background: var(--o-bg);
}

/* ── Header ── */
.nxob-head { display: flex; flex-direction: column; gap: 2px; }

.nxob-eyebrow {
  font-size: 10px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--o-navy);
}

.nxob-title {
  margin: 3px 0 0;
  font-size: 21px; font-weight: 650; line-height: 1.2;
  letter-spacing: -.035em; color: var(--o-ink);
}

.nxob-sub { margin: 4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--o-muted); }

/* ── Cartes ── */
.nxob-card {
  border-radius: 15px;
  padding: 16px;
  background: var(--o-card);
  border: 1px solid var(--o-border);
  box-shadow: var(--o-sh-2);
  transition: border-color .18s, box-shadow .18s;
}

.nxob-card-title {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase;
  color: var(--o-subtle);
  margin-bottom: 14px;
}

/* Préparation à l'objectif : une jauge unique, sans code couleur rouge → vert. */
.nxob-lvl--none { --lvl: var(--nx-surface-3); --lvl-ink: var(--o-muted); }

/* ── Carte objectif ── */
.nxob-goal-card {
  background: var(--nx-green-25);
  border-color: var(--nx-green-200);
  box-shadow: var(--nx-shadow-1);
}

.nxob-goal { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 11px; }

.nxob-goal-ico {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  border-radius: 12px;
  display: grid; place-items: center;
  font-size: 17px;
  background: #fff;
  border: 1px solid var(--o-navy-soft-2);
  box-shadow: var(--o-sh-1);
}

.nxob-goal-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 3px;
  padding-top: 1px;
}

.nxob-goal-label {
  font-size: 13.5px; font-weight: 650; color: var(--o-ink);
  line-height: 1.38; letter-spacing: -.015em;
  white-space: normal; overflow-wrap: anywhere; hyphens: auto;
}

.nxob-goal-cap { font-size: 10.5px; color: var(--o-subtle); }

.nxob-goal-pct {
  flex: 0 0 auto;
  font-size: 24px; font-weight: 700; line-height: 1;
  letter-spacing: -.045em;
  color: var(--o-ink);
  font-variant-numeric: tabular-nums;
  padding-top: 3px;
}
.nxob-goal-pct small { font-size: 12px; font-weight: 600; margin-left: 1px; color: var(--o-subtle); }

.nxob-goal-none { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--o-muted); }

.nxob-track { height: 6px; border-radius: 999px; background: var(--o-track); overflow: hidden; }
.nxob-track > i {
  display: block; height: 100%; width: var(--v, 0%);
  border-radius: 999px; background: var(--nx-green-500);
  transition: width .55s cubic-bezier(.4, 0, .2, 1);
}

.nxob-sep { height: 1px; margin: 16px 0 14px; background: rgba(15, 23, 42, .08); }

/* ── Objectif de la semaine ── */
.nxob-week-title {
  font-size: 10.5px; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--o-muted); margin-bottom: 10px;
}

.nxob-week-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 9px;
}
.nxob-week-row strong {
  font-size: 14px; font-weight: 700; color: var(--o-ink);
  font-variant-numeric: tabular-nums; letter-spacing: -.02em;
}
.nxob-week-row span { font-size: 11.5px; color: var(--o-muted); }

.nxob-bar { height: 8px; border-radius: 999px; background: var(--o-track); overflow: hidden; }
.nxob-bar > i {
  display: block; height: 100%; width: var(--v, 0%);
  border-radius: 999px;
  background: var(--nx-green-500);
  transition: width .5s cubic-bezier(.4, 0, .2, 1);
}
.nxob-bar.is-done > i { background: var(--nx-green-600); }

.nxob-week-edit { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.nxob-week-edit span { flex: 1 1 auto; font-size: 11px; color: var(--o-muted); }

.nxob-step {
  width: 27px; height: 27px; border-radius: 8px;
  cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 700;
  color: var(--nx-green-900);
  background: var(--nx-green-50);
  border: 1px solid var(--nx-green-200);
  display: grid; place-items: center;
  transition: background-color .14s, transform .06s;
}
.nxob-step:hover { background: var(--nx-green-100); }
.nxob-step:active { transform: translateY(1px); }
.nxob-step:focus-visible { outline: none; box-shadow: var(--nx-focus); }

/* ── Changer d'objectif ── */
.nxob-change {
  margin-top: 16px;
  width: 100%; height: 40px;
  border-radius: 11px;
  cursor: pointer; font-family: inherit;
  font-size: 12.5px; font-weight: 650; letter-spacing: -.012em;
  color: var(--nx-text);
  background: #fff;
  border: 1px solid var(--nx-border);
  box-shadow: var(--o-sh-1);
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.nxob-change:hover { color:var(--nx-ink); background:var(--nx-surface-2); border-color:var(--nx-border-strong); box-shadow:var(--nx-shadow-1); }
.nxob-change:active { transform: translateY(1px); }
.nxob-change:focus-visible { outline:none; box-shadow:var(--nx-focus); }

/* ── Forces / à travailler ── */
.nxob-split { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }


.nxob-mini-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: 10px;
}
.nxob-mini-title::before { content: ""; width: 6px; height: 6px; border-radius: 50%; }
.nxob-mini-title--ok { color: var(--o-ok-ink); }
.nxob-mini-title--ok::before { background: var(--o-ok); }
.nxob-mini-title--warn { color: var(--o-warn-ink); }
.nxob-mini-title--warn::before { background: var(--o-warn); }

.nxob-mini-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.nxob-mini-list li { font-size: 11.5px; line-height: 1.45; color: var(--o-text); }
.nxob-mini-list b {
  display: block; font-size: 12px; font-weight: 650;
  color: var(--o-ink); letter-spacing: -.012em; margin-bottom: 1px;
}

/* ── États vides / erreur ── */
.nxob-empty {
  margin: 6px 0;
  padding: 34px 18px;
  text-align: center;
  border-radius: 16px;
  background: var(--o-card);
  border: 1px dashed var(--o-border-strong);
}
.nxob-empty-ico { font-size: 30px; }
.nxob-empty h2 {
  margin: 12px 0 6px; font-size: 16px; font-weight: 650;
  letter-spacing: -.03em; color: var(--o-ink);
}
.nxob-empty p { margin: 0 0 18px; font-size: 12.5px; line-height: 1.55; color: var(--o-muted); }

.nxob-cta {
  height: 42px; padding: 0 22px; border-radius: 11px;
  cursor: pointer; font-family: inherit;
  font-size: 13.5px; font-weight: 600; letter-spacing: -.012em;
  color: var(--nx-btn-primary-fg); background: var(--nx-btn-primary-bg);
  border: 1px solid var(--nx-btn-primary-bd);
  box-shadow: var(--nx-shadow-green);
  transition: background-color .15s, border-color .15s, box-shadow .15s, transform .06s;
}
.nxob-cta:hover { background: var(--nx-btn-primary-bg-hover); border-color:var(--nx-btn-primary-bd-hover); box-shadow:var(--nx-shadow-green); }
.nxob-cta:active { transform: translateY(1px); }

/* ── Skeleton ── */
.nxob-skel {
  border-radius: 15px; padding: 16px;
  background: var(--o-card); border: 1px solid var(--o-border);
  display: flex; flex-direction: column; gap: 10px;
}
.nxob-skel-line, .nxob-skel-block {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--nx-surface-3) 25%, var(--nx-border) 37%, var(--nx-surface-3) 63%);
  background-size: 400% 100%;
  animation: nxob-shimmer 1.35s ease-in-out infinite;
}
.nxob-skel-line { height: 11px; }
.nxob-skel-line--sm { width: 45%; }
.nxob-skel-line--md { width: 72%; }
.nxob-skel-block { height: 62px; border-radius: 12px; }

@keyframes nxob-shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

@media (max-width: 340px) {
  .nxob-split { grid-template-columns: 1fr; }
  .nxob-title { font-size: 19px; }
  .nxob-goal-pct { font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  .nxob-skel-line, .nxob-skel-block { animation: none; }
  .nxob-track > i, .nxob-bar > i, .nxob-cta, .nxob-step, .nxob-change { transition: none; }
}
