/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --bg:          #0d1117;
  --bg-2:        #161b22;
  --bg-3:        #1c2128;
  --text:        #f0efe9;
  --text-muted:  #8b949e;
  --accent:      #f97316;
  --accent-dim:  rgba(249, 115, 22, 0.15);
  --accent-glow: rgba(249, 115, 22, 0.35);
  --green:       #3fb950;
  --red:         #f85149;
  --radius:      14px;
  --radius-sm:   8px;
  --transition:  280ms cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Syne', sans-serif;
  --font-body:    'Space Grotesk', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  min-height: 100dvh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; }
ul { list-style: none; }

/* ── Auth pages ─────────────────────────────────────────────────────────── */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100dvh; }
/* Variante post-login : contenu centré sous le site nav dans un quiz-shell */
.auth-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem 1.5rem; }

.auth-shell {
  width: 100%;
  max-width: 440px;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.auth-brand {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: baseline;
  flex-wrap: nowrap;
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4.8vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.auth-brand .brand-mark,
.auth-brand .brand-accent {
  white-space: nowrap;
}
.brand-mark  { color: var(--text); }
.brand-accent { color: var(--accent); }

.auth-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.auth-sub { color: var(--text-muted); font-size: .95rem; }

.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.field { display: flex; flex-direction: column; gap: .4rem; }
.field label { font-size: .875rem; font-weight: 500; color: var(--text-muted); }

.field input, .field select, .open-input {
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: .75rem 1rem;
  transition: border-color var(--transition);
  width: 100%;
}
.field input:focus, .field select:focus, .open-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.field--error input, .field--error select { border-color: var(--red); }
.field-error { color: var(--red); font-size: .8rem; }

.flash {
  border-radius: var(--radius-sm);
  padding: .65rem 1rem;
  font-size: .9rem;
}
.flash--error   { background: rgba(248, 81, 73, .15); border: 1px solid var(--red); color: var(--red); }
.flash--success { background: rgba(63, 185, 80, .15); border: 1px solid var(--green); color: var(--green); }

.btn-primary {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding: .85rem 1.5rem;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  display: inline-block;
}
.btn-primary:hover {
  background: #ea6a0a;
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
  text-decoration: none;
  color: #fff;
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .9rem;
  padding: .6rem 1.2rem;
  transition: border-color var(--transition), color var(--transition);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

.auth-switch { text-align: center; color: var(--text-muted); font-size: .9rem; }

.confirm-banner {
  background: var(--accent-dim);
  border: 1px solid rgba(249, 115, 22, .35);
  border-radius: var(--radius-sm);
  padding: .7rem 1rem;
  margin: .85rem 1.1rem 0;
  color: var(--text);
  font-size: .9rem;
  text-align: center;
}
.confirm-banner a { font-weight: 700; }
@media (min-width: 900px) {
  .confirm-banner {
    position: fixed;
    top: 1rem;
    left: 18.5rem;
    right: 1.5rem;
    margin: 0;
    z-index: 50;
  }
}

.auth-shell--login {
  max-width: 920px;
}
.auth-login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr);
  align-items: stretch;
  gap: 1.25rem;
}
.auth-card--guest {
  justify-content: center;
}
.auth-card--guest .auth-title {
  font-size: 1.25rem;
}
.auth-guest-form { margin-top: .35rem; }
.auth-guest-form .btn-guest-try,
.auth-form .btn-primary {
  width: 100%;
}
.btn-guest-try {
  display: block;
  width: 100%;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  padding: .8rem 1.5rem;
}
@media (max-width: 720px) {
  .auth-login-row { grid-template-columns: 1fr; }
}

.guest-convert-actions {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  margin-top: .35rem;
}
.guest-convert-actions .btn-primary,
.guest-convert-actions .btn-ghost {
  text-align: center;
}

/* Telegram link page */
.link-card { align-items: center; text-align: center; }
.link-icon { font-size: 3rem; }
.link-steps {
  list-style: decimal;
  text-align: left;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.8;
  padding-left: 1.2rem;
  width: 100%;
}
.link-steps code {
  background: var(--bg-3);
  border-radius: 4px;
  padding: 1px 6px;
  color: var(--accent);
  font-size: .9em;
}
.skip-link {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .5rem;
}
.skip-link:hover { color: var(--text); }

/* ── Home page ──────────────────────────────────────────────────────────── */
.home-page { min-height: 100dvh; display: flex; flex-direction: column; }

.home-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 60% 0%, rgba(249,115,22,.12) 0%, transparent 60%),
              var(--bg);
}

/* ── Sidebar (desktop / tablette) ───────────────────────────────────────── */
.site-sidebar {
  display: none;
}
.site-userbar { display: none; }
.nav-inbox-ico {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-inbox-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 1rem;
  height: 1rem;
  padding: 0 .25rem;
  border-radius: 999px;
  background: #f97316;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  line-height: 1rem;
  text-align: center;
}
.mobile-topbar { display: none; }
.mobile-bottom-nav { display: none; }
.mbnav-sheet,
.mbnav-backdrop { display: none; }

.sidebar-pill {
  display: inline-flex;
  align-items: center;
  padding: .12rem .4rem;
  border-radius: 4px;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.2;
  flex-shrink: 0;
}
.sidebar-pill--on {
  color: #86efac;
  background: rgba(34, 197, 94, .16);
  border: 1px solid rgba(34, 197, 94, .28);
}

@media (min-width: 900px) {
  .home-shell {
    flex-direction: row;
    align-items: stretch;
  }
  .site-sidebar {
    display: flex;
    flex-direction: column;
    width: 17.25rem;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100dvh;
    overflow-y: auto;
    padding: 1.25rem 0.85rem 1.5rem;
    border-right: 1px solid rgba(255,255,255,.07);
    background: rgba(0,0,0,.18);
    z-index: 40;
  }
  .site-sidebar-brand {
    display: block;
    padding: .35rem .4rem 1.25rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 0.98rem;
    letter-spacing: -0.05em;
    white-space: nowrap;
    line-height: 1.15;
    overflow: visible;
  }
  .sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .15rem;
  }
  .sidebar-section-label {
    margin: .95rem .65rem .25rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--text-muted);
    opacity: .8;
  }
  .sidebar-link {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .65rem;
    border-radius: 8px;
    font-size: .9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
  }
  .sidebar-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.05);
    text-decoration: none;
  }
  .sidebar-link.is-active {
    color: var(--text);
    background: rgba(249,115,22,.12);
  }
  .sidebar-link--sub {
    padding-left: 1.15rem;
    font-size: .875rem;
  }
  .sidebar-link--cta {
    margin-top: .35rem;
    border: 1px solid var(--accent);
    color: var(--accent);
    background: var(--accent-dim);
    font-weight: 600;
    justify-content: center;
  }
  .sidebar-link--cta:hover {
    background: var(--accent);
    color: #fff;
  }
  .sidebar-link--premium-up {
    margin-top: .2rem;
    border: 1px solid rgba(249, 115, 22, .55);
    background: linear-gradient(135deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .08));
    color: #fdba74;
    font-weight: 700;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, .12), 0 4px 14px rgba(249, 115, 22, .12);
  }
  .sidebar-link--premium-up:hover,
  .sidebar-link--premium-up.is-active {
    background: linear-gradient(135deg, rgba(249, 115, 22, .38), rgba(249, 115, 22, .16));
    color: #fff;
    border-color: var(--accent);
    text-decoration: none;
  }
  .sidebar-link--premium-up .sidebar-ico {
    color: var(--accent);
    opacity: 1;
  }
  .sidebar-link--premium-on {
    color: #86efac;
  }
  .sidebar-link--premium-on .sidebar-ico {
    color: #4ade80;
    opacity: 1;
  }
  /* Tribu / Parrainage : même orange que Premium, texte + icône seulement */
  .sidebar-link--hl-account {
    color: #fdba74;
    font-weight: 700;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .sidebar-link--hl-account:hover,
  .sidebar-link--hl-account.is-active {
    color: #fed7aa;
    background: transparent;
    border: none;
    box-shadow: none;
    text-decoration: none;
  }
  .sidebar-link--hl-account .sidebar-ico {
    color: #f97316;
    opacity: 1;
  }
  /* Quiz / Listening / Reading / Duels : même bleu, texte + icône seulement */
  .sidebar-link--hl-quiz,
  .sidebar-link--hl-listening,
  .sidebar-link--hl-reading,
  .sidebar-link--hl-duels,
  .sidebar-link--hl-inbox {
    color: #38bdf8;
    font-weight: 700;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .sidebar-link--hl-quiz:hover,
  .sidebar-link--hl-quiz.is-active,
  .sidebar-link--hl-listening:hover,
  .sidebar-link--hl-listening.is-active,
  .sidebar-link--hl-reading:hover,
  .sidebar-link--hl-reading.is-active,
  .sidebar-link--hl-duels:hover,
  .sidebar-link--hl-duels.is-active,
  .sidebar-link--hl-inbox:hover,
  .sidebar-link--hl-inbox.is-active {
    color: #7dd3fc;
    background: transparent;
    border: none;
    box-shadow: none;
    text-decoration: none;
  }
  .sidebar-link--hl-quiz .sidebar-ico,
  .sidebar-link--hl-listening .sidebar-ico,
  .sidebar-link--hl-reading .sidebar-ico,
  .sidebar-link--hl-duels .sidebar-ico,
  .sidebar-link--hl-inbox .sidebar-ico {
    color: #38bdf8;
    opacity: 1;
  }
  .sidebar-link--hl-lessons {
    color: #a78bfa;
    font-weight: 700;
    background: transparent;
    border: none;
    box-shadow: none;
  }
  .sidebar-link--hl-lessons:hover,
  .sidebar-link--hl-lessons.is-active {
    color: #c4b5fd;
    background: transparent;
    border: none;
    box-shadow: none;
    text-decoration: none;
  }
  .sidebar-link--hl-lessons .sidebar-ico {
    color: #a78bfa;
    opacity: 1;
  }
  .sidebar-link--muted { opacity: .75; }
  .sidebar-ico {
    width: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: .9;
  }
  .site-userbar {
    display: flex;
    align-items: center;
    gap: .35rem;
    position: fixed;
    top: .85rem;
    right: 1.1rem;
    z-index: 50;
    padding: .3rem;
    border-radius: 10px;
    background: rgba(22, 27, 34, .88);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
  }
  .site-userbar-link {
    padding: .4rem .7rem;
    border-radius: 7px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    transition: background .15s, color .15s;
  }
  .site-userbar-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.06);
    text-decoration: none;
  }
  .site-userbar-link.is-active {
    color: var(--text);
    background: rgba(249,115,22,.12);
  }
  .site-userbar-inbox,
  .site-userbar-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .5rem;
  }
  .site-userbar-link--muted { opacity: .8; font-weight: 500; }
  .home-main {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 899px) {
  .home-shell {
    padding-bottom: calc(4.25rem + env(safe-area-inset-bottom, 0px));
  }
  .mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.06);
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(13,17,23,.92);
    backdrop-filter: blur(8px);
  }
  .mobile-topbar .brand {
    font-size: clamp(0.82rem, 3.2vw, 1rem);
    letter-spacing: -0.05em;
    white-space: nowrap;
    min-width: 0;
    line-height: 1.1;
  }
  .mobile-topbar-actions {
    display: flex;
    align-items: center;
    gap: .2rem;
    flex-shrink: 0;
  }
  .mobile-topbar-link {
    padding: .35rem .5rem;
    border-radius: 7px;
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    white-space: nowrap;
  }
  .mobile-topbar-link:hover,
  .mobile-topbar-link.is-active {
    color: var(--text);
    background: rgba(255,255,255,.06);
    text-decoration: none;
  }
  .mobile-topbar-link--muted { opacity: .8; font-weight: 500; }
  .mobile-topbar-profile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .45rem;
  }
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    gap: .15rem;
    padding: .35rem .4rem calc(.35rem + env(safe-area-inset-bottom, 0px));
    background: rgba(22,27,34,.96);
    border-top: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
  }
  .mbnav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-width: 0;
    padding: .4rem .2rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: .68rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border-radius: 8px;
  }
  .mbnav-item:hover,
  .mbnav-item.is-active,
  .mbnav-item[aria-expanded="true"] {
    color: var(--accent);
    text-decoration: none;
  }
  .mbnav-item--hl-lessons {
    color: #a78bfa;
  }
  .mbnav-item--hl-lessons:hover,
  .mbnav-item--hl-lessons.is-active {
    color: #c4b5fd;
  }
  .mbnav-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.35rem;
    font-size: 1.05rem;
    line-height: 1;
  }
  .mbnav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .mbnav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 70;
    background: rgba(0,0,0,.45);
  }
  .mbnav-backdrop[hidden] { display: none !important; }
  .mbnav-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    left: .6rem;
    right: .6rem;
    bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    padding: .75rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.1);
    background: var(--bg-2);
    box-shadow: 0 16px 40px rgba(0,0,0,.45);
    gap: .2rem;
  }
  .mbnav-sheet[hidden] { display: none !important; }
  .mbnav-sheet-title {
    margin: 0 .35rem .45rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
  }
  .mbnav-sheet-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .85rem .75rem;
    border-radius: 8px;
    color: var(--text);
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
  }
  .mbnav-sheet-ico {
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    opacity: .95;
  }
  .mbnav-sheet-link:hover {
    background: rgba(255,255,255,.06);
    text-decoration: none;
  }
  .mbnav-sheet-link--premium-up {
    border: 1px solid rgba(249, 115, 22, .5);
    background: linear-gradient(135deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .08));
    color: #fdba74;
    font-weight: 700;
  }
  .mbnav-sheet-link--premium-up:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, .38), rgba(249, 115, 22, .16));
    color: #fff;
  }
  .mbnav-sheet-link--hl-account {
    color: #fdba74;
    font-weight: 700;
    background: transparent;
    border: none;
  }
  .mbnav-sheet-link--hl-account:hover {
    color: #fed7aa;
    background: rgba(255,255,255,.04);
  }
  .mbnav-sheet-link--hl {
    font-weight: 700;
  }
  .mbnav-sheet-link--hl-quiz,
  .mbnav-sheet-link--hl-listening,
  .mbnav-sheet-link--hl-reading,
  .mbnav-sheet-link--hl-duels {
    color: #38bdf8;
    background: transparent;
    border: none;
  }
  .mbnav-sheet-link--hl-quiz:hover,
  .mbnav-sheet-link--hl-listening:hover,
  .mbnav-sheet-link--hl-reading:hover,
  .mbnav-sheet-link--hl-duels:hover {
    color: #7dd3fc;
    background: rgba(255,255,255,.04);
  }
}

.brand {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.1;
}
.brand-link {
  text-decoration: none;
  color: inherit;
}
.brand-link:hover { text-decoration: none; }

.home-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2rem; }

.link-telegram-main {
  justify-content: flex-start;
  align-items: center;
  padding-top: 2rem;
}
.link-telegram-main .auth-shell {
  margin: 0 auto;
}

.home-invite {
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin: 1.25rem 0 .35rem;
}
.home-invite-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text);
  margin: 0;
}
.home-invite-sub {
  margin: .55rem 0 0;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.hero { text-align: center; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 1.25rem; }

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.hero-sub { color: var(--text-muted); font-size: 1.1rem; }

.session-status { color: var(--text-muted); font-size: .95rem; }
.session-status--done { color: var(--green); }
.session-choice {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: .55rem;
  width: 100%;
}
.session-choice .btn-start--card {
  text-align: center;
  text-decoration: none;
}
.session-choice-or {
  display: block;
  text-align: center;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  opacity: .8;
}
.session-choice .inline-form {
  display: flex;
  justify-content: center;
}
.session-choice .btn-ghost {
  width: 100%;
}

/* Quota épuisé */
.quota-exhausted {
  width: 100%;
  max-width: 420px;
  margin-top: .5rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid rgba(248, 81, 73, .45);
  background: rgba(248, 81, 73, .1);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  text-align: center;
  animation: fadeUp 320ms ease both;
}
.quota-exhausted-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: -0.02em;
}
.quota-exhausted-count {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.45;
}
.quota-exhausted-hint {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.btn-premium {
  margin-top: .35rem;
  text-decoration: none;
}
.btn-premium:hover { text-decoration: none; color: #fff; }

.btn-start {
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 1rem 2.5rem;
  display: inline-block;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  animation: pulse-btn 2.5s ease-in-out infinite;
}
.btn-start:hover {
  background: #ea6a0a;
  box-shadow: 0 6px 28px var(--accent-glow);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
  animation: none;
}
.btn-start--disabled,
.btn-start:disabled {
  background: #6b7280;
  color: rgba(255, 255, 255, .75);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  animation: none;
  opacity: .7;
}
.btn-start--disabled:hover,
.btn-start:disabled:hover {
  background: #6b7280;
  box-shadow: none;
  transform: none;
  color: rgba(255, 255, 255, .75);
}

@keyframes pulse-btn {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%  { box-shadow: 0 0 0 10px transparent; }
}

.inline-form { display: inline; }

.tg-banner {
  margin-top: 3rem;
  background: var(--accent-dim);
  border: 1px solid rgba(249,115,22,.25);
  border-radius: var(--radius-sm);
  padding: .8rem 1.2rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  font-size: .9rem;
  color: var(--text-muted);
  max-width: 520px;
  width: 100%;
}
.tg-banner a { color: var(--accent); font-weight: 600; }

.channels-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2.5rem;
  width: 100%;
  max-width: 520px;
}
.channels-stack .channels-banner {
  margin-top: 0;
  max-width: none;
}
.channels-banner {
  margin-top: 2.5rem;
  width: 100%;
  max-width: 520px;
  padding: 1.2rem 1.35rem 1.45rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  background: var(--bg-2);
  display: flex;
  flex-direction: column;
  gap: .9rem;
  overflow: visible;
}
.channels-banner-text {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.45;
  text-align: center;
}
.channels-banner-text strong { color: var(--text); }
.channels-links {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  padding: .35rem 0 0;
  overflow: visible;
}
.channel-icon {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .55rem .95rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color: var(--text-muted);
  font-size: .88rem;
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.channel-icon:hover {
  text-decoration: none;
  color: var(--text);
  border-color: rgba(255,255,255,.22);
  background: rgba(255,255,255,.06);
}
.channel-icon-svg {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}
.channel-icon--telegram:hover { color: #6cb7de; border-color: rgba(34, 158, 217, .35); }
.channel-icon--affiliate:hover { color: #fbbf24; border-color: rgba(251, 191, 36, .4); }

/* ── Quiz (Typeform) ────────────────────────────────────────────────────── */
.quiz-page { min-height: 100dvh; }

.quiz-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* Colonne contenu (à droite de la sidebar sur desktop) */
.shell-panel {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Desktop : sidebar à gauche (comme home-shell), contenu à droite —
   sans ça la sidebar (height: 100dvh) s'empile au-dessus et force à défiler. */
@media (min-width: 900px) {
  .quiz-shell,
  .result-shell {
    flex-direction: row;
    align-items: stretch;
  }
  .shell-panel {
    min-height: 100dvh;
  }
}

/* Progress — sous le header site, pas fixed en haut d'écran */
.progress-rail {
  height: 3px;
  background: rgba(255,255,255,.08);
  width: 100%;
  flex-shrink: 0;
}
.progress-bar {
  height: 100%;
  background: var(--accent);
  transition: width 500ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px var(--accent-glow);
}

/* Compteur sous la barre de progression */
.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: .85rem 1.5rem .35rem;
  flex-shrink: 0;
}
.quiz-counter {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.quiz-counter-total { color: var(--text-muted); font-weight: 400; }
.quiz-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
}

/* Header quiz legacy (si encore référencé) */
.quiz-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 2rem;
  padding-top: 1.5rem;
}

/* Question stage — ancré en haut pour que les changements de hauteur
   (feedback, longueur du texte) n'affectent que le bas de la carte */
.question-stage {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 2rem 3rem;
}

.question-card {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  /* entry animation */
  animation: slideIn 320ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-28px); }
}

.question-card.leaving {
  animation: slideOut 240ms cubic-bezier(0.4, 0, 0.2, 1) both;
}

.question-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.behaviour-context {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: .25rem 0 .15rem;
}

.behaviour-situation {
  color: var(--text-2, rgba(255,255,255,.78));
  font-size: 1rem;
  line-height: 1.45;
  margin: 0;
}

.behaviour-guest {
  background: var(--bg-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0;
  padding: .85rem 1rem;
}

.behaviour-guest-label {
  color: var(--accent);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.behaviour-guest-line {
  font-size: 1.05rem;
  font-style: italic;
  line-height: 1.4;
}

/* Options */
.options-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}

.option-btn {
  align-items: center;
  background: var(--bg-2);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
  width: 100%;
}

.option-btn:hover:not(:disabled) {
  background: var(--bg-3);
  border-color: var(--accent);
  transform: translateX(4px);
}

.option-btn:disabled { cursor: default; }

.option-btn.correct {
  background: rgba(63, 185, 80, .12);
  border-color: var(--green);
  animation: pop 300ms ease;
}
.option-btn.wrong {
  background: rgba(248, 81, 73, .12);
  border-color: var(--red);
}

@keyframes pop {
  0%, 100% { transform: scale(1); }
  40%  { transform: scale(1.025); }
}

.option-key {
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  line-height: 1;
  min-width: 28px;
  padding: .35rem .5rem;
  text-align: center;
}

.option-btn.correct .option-key { background: var(--green); color: #fff; }
.option-btn.wrong   .option-key { background: var(--red);   color: #fff; }

.option-text { font-size: .95rem; line-height: 1.4; }

/* Open input */
.open-hint {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.open-pattern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  margin: .25rem 0 .5rem;
}
.open-pattern-label {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.open-pattern-slots {
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 700;
  letter-spacing: .28em;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1.5px dashed rgba(249, 115, 22, .45);
  border-radius: var(--radius-sm);
  padding: .7rem 1.1rem .75rem;
  line-height: 1.2;
  user-select: none;
}
.open-form { display: flex; gap: .75rem; align-items: stretch; }
.open-input { flex: 1; }
.btn-open-submit {
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  padding: .75rem 1.2rem;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.btn-open-submit:hover { background: #ea6a0a; transform: translateY(-1px); }

/* Feedback — toujours dans le flux pour éviter le layout shift ;
   invisible via opacity quand [hidden], visible via fadeUp à l'affichage */
.feedback {
  background: var(--bg-2);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.25rem;
  border: 1px solid rgba(255,255,255,.07);
  animation: fadeUp 240ms ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
/* Garde le bloc dans le flux (réserve la hauteur) → pas de saut de layout.
   opacity:0 + pointer-events:none → invisible et non-interactif. */
.feedback[hidden] {
  display: flex !important;
  opacity: 0;
  pointer-events: none;
  animation: none !important;
}

.feedback-icon { font-size: 1.5rem; }
.feedback-text { font-size: .95rem; color: var(--text-muted); line-height: 1.5; }

.btn-next {
  align-self: flex-end;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  padding: .65rem 1.25rem;
  transition: background var(--transition), transform var(--transition);
}
.btn-next:hover { background: #ea6a0a; transform: translateY(-1px); }

/* ── No-select (anti-copie) ──────────────────────────────────────────────── */
.no-select,
.no-select * {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
/* L'input mot_trous doit rester sélectionnable */
.no-select input,
.no-select textarea {
  -webkit-user-select: text;
  user-select: text;
}

/* ── Bouton retour au niveau du bloc question ───────────────────────────── */
.btn-back-question {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin: 0 0 .35rem;
  padding: .35rem .7rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: .875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}
.btn-back-question:hover {
  color: var(--accent);
  border-color: rgba(249, 115, 22, .4);
  background: var(--accent-dim);
  text-decoration: none;
}

/* ── Bouton Précédent (legacy header) ───────────────────────────────────── */
.btn-prev {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  padding: .25rem .5rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  text-decoration: none;
  line-height: 1;
}
.btn-prev:hover { color: var(--accent); background: var(--accent-dim); text-decoration: none; }
.btn-prev--hidden { visibility: hidden; pointer-events: none; }

/* ── Mode révision ───────────────────────────────────────────────────────── */
.review-badge {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.review-card { opacity: .97; }

.review-static {
  align-items: center;
  background: var(--bg-2);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius);
  color: var(--text);
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  text-align: left;
  width: 100%;
  cursor: default;
}
.review-static.correct {
  background: rgba(63, 185, 80, .12);
  border-color: var(--green);
}
.review-static.wrong {
  background: rgba(248, 81, 73, .12);
  border-color: var(--red);
}
.review-static.correct .option-key { background: var(--green); color: #fff; }
.review-static.wrong   .option-key { background: var(--red);   color: #fff; }

.review-explanation {
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
  border-left: 3px solid var(--accent);
  padding-left: .85rem;
}

.review-open-result {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  font-size: .95rem;
}
.review-correct { color: var(--green); }
.review-wrong { color: var(--red); }
.review-correct-answer { color: var(--text-muted); }

.review-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: .5rem;
  gap: 1rem;
}
.btn-review-nav {
  background: var(--bg-2);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-display);
  font-size: .9rem;
  font-weight: 700;
  padding: .6rem 1.1rem;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}
.btn-review-nav:hover { border-color: var(--accent); background: var(--accent-dim); color: var(--text); text-decoration: none; }
.btn-review-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-review-next:hover { background: #ea6a0a; border-color: #ea6a0a; color: #fff; }

/* ── Result page ────────────────────────────────────────────────────────── */
.result-page { min-height: 100dvh; }

.result-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% -10%, rgba(249,115,22,.15) 0%, transparent 55%),
              var(--bg);
}

.result-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem 1.5rem 4rem;
  gap: 2rem;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

.score-ring {
  position: relative;
  width: 140px;
  height: 140px;
  animation: scaleIn 500ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 100ms;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

.score-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.ring-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 8; }
.ring-fill  {
  fill: none;
  stroke: var(--accent);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 327;
  transition: stroke-dashoffset 900ms cubic-bezier(0.4, 0, 0.2, 1);
}

.score-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}
.score-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.score-den { font-size: .85rem; color: var(--text-muted); }

.result-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  text-align: center;
  animation: fadeUp 400ms ease both;
  animation-delay: 300ms;
}
.result-sub { color: var(--text-muted); text-align: center; }

/* Lesson review */
.lesson {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  animation: fadeUp 400ms ease both;
  animation-delay: 500ms;
}
.lesson-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}
.lesson-intro {
  margin: 0;
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.55;
}
.lesson-cards {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.lesson-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.lesson-card-prompt {
  margin: 0;
  font-weight: 600;
  color: var(--text);
  font-size: .98rem;
  line-height: 1.4;
}
.lesson-card-answers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .55rem;
}
@media (max-width: 560px) {
  .lesson-card-answers { grid-template-columns: 1fr; }
}
.lesson-pill {
  border-radius: 10px;
  padding: .55rem .7rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.lesson-pill-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .85;
}
.lesson-pill-value {
  font-size: .9rem;
  line-height: 1.35;
  word-break: break-word;
}
.lesson-pill--wrong {
  background: rgba(248, 81, 73, .12);
  border: 1px solid rgba(248, 81, 73, .35);
  color: #f85149;
}
.lesson-pill--right {
  background: rgba(63, 185, 80, .12);
  border: 1px solid rgba(63, 185, 80, .35);
  color: #3fb950;
}
.lesson-card-explain {
  margin: 0;
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.55;
}
.lesson-tip {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  background: var(--accent-dim);
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
}
.lesson-body {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1.5rem;
  font-size: .95rem;
  line-height: 1.7;
  color: var(--text-muted);
}
.lesson-body p { margin-bottom: .75rem; }
.lesson-body p:last-child { margin-bottom: 0; }
.lesson-body strong, .lesson-body b { color: var(--text); }

.result-actions { width: 100%; display: flex; justify-content: center; }

/* ── Exercise cards (home) ──────────────────────────────────────────────── */
.quota-bar {
  text-align: center;
  margin-bottom: .5rem;
}
.session-status-hint {
  font-size: .85rem;
  color: var(--text-muted);
  margin-left: .25rem;
}
.home-messages {
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .5rem;
}

.exercise-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 900px;
  margin: 1rem 0 1.5rem;
}

.exercise-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  transition: border-color var(--transition);
}
.exercise-card:hover {
  border-color: rgba(249,115,22,.35);
}

.exercise-card-header {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.exercise-card-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1px solid rgba(249,115,22,.45);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 800;
  flex-shrink: 0;
}
.exercise-card-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.cycle-hint {
  max-width: 900px;
  width: 100%;
  text-align: center;
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: .25rem;
}

/* Suite de parcours (résultats) */
.next-exercise {
  width: 100%;
  max-width: 480px;
  margin-top: 1rem;
  padding: 1.35rem 1.4rem;
  border-radius: var(--radius);
  border: 1.5px solid rgba(249,115,22,.4);
  background: rgba(249,115,22,.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  text-align: center;
}
.next-exercise--done {
  border-color: rgba(63,185,80,.35);
  background: rgba(63,185,80,.08);
}
.next-exercise-kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.next-exercise-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.next-exercise-desc {
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.45;
}
.next-exercise-skip { margin-top: .15rem; }
.next-exercise-quota {
  font-size: .9rem;
  color: var(--text-muted);
}
.next-exercise .btn-primary,
.next-exercise form { width: 100%; max-width: 280px; }
.next-exercise form .btn-primary { width: 100%; }

/* Leçons */
.lessons-main {
  align-items: stretch;
  justify-content: flex-start;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
  gap: 1.25rem;
}
.lessons-hero { text-align: center; margin-bottom: .5rem; }
.lessons-filters {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: center;
}
.lessons-filter {
  font-size: .85rem;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .4rem .9rem;
  text-decoration: none;
}
.lessons-filter:hover { color: var(--text); text-decoration: none; }
.lessons-filter--active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.lessons-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  width: 100%;
}
.lesson-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition);
}
.lesson-row:hover {
  border-color: rgba(249,115,22,.4);
  text-decoration: none;
}
.lesson-row-day {
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.lesson-row-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.lesson-row-theme {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
}
.lesson-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.lesson-row-status {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .35rem;
}
.lesson-mark {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 4px;
  padding: .15rem .45rem;
  line-height: 1.3;
}
.lesson-mark--done {
  color: #4ade80;
  border-color: rgba(74, 222, 128, .35);
  background: rgba(74, 222, 128, .08);
}
.lesson-detail-status { margin-top: .75rem; }

.lesson-practice-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .65rem;
  margin-top: 1.1rem;
}

.lesson-practice-cta--footer {
  margin-top: 1.5rem;
  width: 100%;
}

.lesson-practice-cta--footer .lesson-practice-cta {
  justify-content: center;
  width: 100%;
}

.lesson-practice-cta .btn-primary,
.lesson-practice-cta .btn-ghost {
  width: auto;
}

.lesson-practice-cta .inline-form {
  display: inline;
  margin: 0;
}
.lesson-row-audio { color: var(--green); }
.lesson-row-chevron { color: var(--text-muted); }
.lessons-detail { align-items: flex-start; }
.lesson-detail-header { width: 100%; margin-bottom: .5rem; }
.lesson-detail-day {
  font-size: .85rem;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: .35rem;
}
.lesson-block {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.lesson-block-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.lesson-block p { color: var(--text-muted); line-height: 1.6; font-size: .95rem; }
.lesson-block--hint { border-color: rgba(249,115,22,.3); }
.lesson-examples { list-style: none; display: flex; flex-direction: column; gap: .75rem; }
.lesson-ex-en { display: block; font-weight: 600; color: var(--text); }
.lesson-ex-fr { display: block; font-size: .9rem; color: var(--text-muted); }
.lesson-phrases { display: flex; flex-wrap: wrap; gap: .45rem; }
.lesson-phrase {
  background: var(--accent-dim);
  color: var(--accent);
  border-radius: 6px;
  padding: .3rem .65rem;
  font-size: .85rem;
  font-weight: 600;
}
.lesson-mistakes {
  list-style: disc;
  padding-left: 1.2rem;
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.55;
}
.lesson-audio { width: 100%; }
.exercise-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.exercise-card-desc {
  font-size: .875rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.btn-start--card {
  width: 100%;
  text-align: center;
  padding: .8rem 1rem;
  font-size: 1rem;
}

/* ── Reading passage ────────────────────────────────────────────────────── */
.reading-passage {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: .5rem;
  white-space: pre-wrap;
}
.blank {
  display: inline-block;
  font-weight: 700;
  border-bottom: 2px solid var(--text-muted);
  padding: 0 .15em;
  margin: 0 .1em;
  color: var(--text-muted);
}
.blank--active {
  border-color: var(--accent);
  color: var(--accent);
  animation: pulse-blank 1.4s ease-in-out infinite;
}
.blank--pending,
.blank--done {
  border-color: rgba(255,255,255,.2);
  color: rgba(255,255,255,.4);
}
.blank--correct {
  border-color: #4ade80;
  color: #4ade80;
  font-weight: 700;
}
.blank--wrong {
  border-color: #f87171;
  color: #f87171;
  font-weight: 700;
  text-decoration: line-through;
}
@keyframes pulse-blank {
  0%, 100% { opacity: 1; }
  50%       { opacity: .55; }
}
.reading-question-area { display: flex; flex-direction: column; gap: .75rem; }
.reading-blank-label {
  font-size: .9rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* ── Listening audio player ─────────────────────────────────────────────── */
.listening-audio-block {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-bottom: .75rem;
}
.listening-audio {
  width: 100%;
  border-radius: var(--radius-sm);
  accent-color: var(--accent);
}
.listening-audio-hint {
  font-size: .85rem;
  color: var(--text-muted);
  text-align: center;
}
.listening-q-enter {
  animation: listening-q-in .28s ease-out;
}
@keyframes listening-q-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Result type label ──────────────────────────────────────────────────── */
.result-type-label {
  font-size: .85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  .exercise-cards { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .auth-shell { padding: 1.5rem 1rem; }
  .quiz-header { padding: 1rem; padding-top: 1.4rem; }
  .question-stage { padding: 1.5rem 1rem 2rem; }
  .open-form { flex-direction: column; }
}

/* ── Liens mis en valeur (puce + couleur, comme Parrainage) ─────────────── */
.nav-link--featured {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-weight: 700;
}
.nav-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
}
.nav-chip svg {
  display: block;
}

.nav-link--lessons { color: #f97316 !important; }
.nav-link--lessons:hover { color: #fb923c !important; }
.nav-link--lessons .nav-chip {
  background: rgba(249,115,22,.18);
  border: 1px solid rgba(249,115,22,.45);
  color: #f97316;
}

.nav-link--training { color: #38bdf8 !important; }
.nav-link--training:hover,
.nav-dropdown--open .nav-link--training { color: #7dd3fc !important; }
.nav-link--training .nav-chip {
  background: rgba(56,189,248,.16);
  border: 1px solid rgba(56,189,248,.4);
  color: #38bdf8;
}

.nav-link--tribe { color: #fbbf24 !important; }
.nav-link--tribe:hover { color: #fcd34d !important; }
.nav-link--tribe .nav-chip {
  background: rgba(251,191,36,.16);
  border: 1px solid rgba(251,191,36,.4);
  color: #fbbf24;
}

.nav-link--affiliate { color: #22c55e !important; }
.nav-link--affiliate:hover { color: #4ade80 !important; }
.nav-link--affiliate .nav-chip {
  background: rgba(34,197,94,.18);
  border: 1px solid rgba(34,197,94,.4);
  color: #22c55e;
}

.nav-link--profile {
  color: #6e7681 !important;
  font-weight: 600;
}
.nav-link--profile:hover { color: #9da3ab !important; }

/* ── Dashboard / Profil ──────────────────────────────────────────────────── */

.profile-main {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* En-tête */
.profile-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.profile-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .4rem;
}

.profile-telegram-actions {
  margin-top: .75rem;
}

.profile-unlink-btn {
  display: inline-flex;
  padding: .4rem .85rem;
  font-size: .8rem;
}

.profile-pseudo-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-top: .5rem;
}

.profile-pseudo-form .open-input {
  max-width: 12rem;
}

.profile-topbar {
  flex: 1 0 100%;
  display: flex;
  justify-content: flex-end;
}

.profile-logout-btn {
  display: inline-flex;
  width: auto;
  align-items: center;
  padding: .4rem .85rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.profile-logout-btn:hover {
  color: #fca5a5;
  border-color: rgba(248, 113, 113, .35);
}

.profile-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 999px;
  border: 1px solid;
}

.profile-badge--premium  { color: #fbbf24; border-color: rgba(251,191,36,.4); background: rgba(251,191,36,.08); }
.profile-badge--basic    { color: var(--text-muted); border-color: rgba(255,255,255,.12); }
.profile-badge--telegram { color: #38bdf8; border-color: rgba(56,189,248,.4); background: rgba(56,189,248,.08); }
.profile-badge--date     { color: var(--text-muted); border-color: rgba(255,255,255,.1); }

/* Chiffres clés */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}

.stat-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1.2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.stat-value--streak { color: #fb923c; }
.stat-value-total { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }

.stat-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Sections */
.profile-section { display: flex; flex-direction: column; gap: .9rem; }
#badges { scroll-margin-top: 5.5rem; }

.profile-section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.profile-section-sub {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* Grille d'activité */
.activity-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.activity-day {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
  transition: background var(--transition);
}

.activity-day--active {
  background: var(--accent);
  border-color: transparent;
  opacity: .75;
}

.activity-day--hot {
  opacity: 1;
  box-shadow: 0 0 6px var(--accent-glow);
}

.activity-legend {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .25rem;
}

/* Stats par exercice */
.exstat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: .75rem;
}

.exstat-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.exstat-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
}

.exstat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}

.exstat-label {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: -.2rem;
}

.exstat-detail {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.exstat-accent { color: var(--text); font-weight: 700; }
.exstat-empty  { font-size: .82rem; color: var(--text-muted); font-style: italic; }

/* Barre de score */
.score-bar {
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 99px;
  overflow: hidden;
}
.score-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 600ms ease;
  min-width: 2px;
}

/* Badges */
.badge-counter {
  font-family: var(--font-body);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .15rem .55rem;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: .75rem;
}

.badge-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1.1rem .9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.badge-card--unlocked {
  border-color: rgba(249,115,22,.3);
  background: rgba(249,115,22,.04);
}

.badge-card--unlocked:hover {
  border-color: rgba(249,115,22,.55);
  box-shadow: 0 0 14px rgba(249,115,22,.12);
}

.badge-card--locked {
  opacity: .38;
  filter: grayscale(.5);
}

.badge-img  { width: 60px; height: 60px; flex-shrink: 0; }
.badge-card--locked .badge-img { filter: grayscale(1) brightness(.55); }

.badge-name {
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}

.badge-desc {
  font-size: .71rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.badge-check {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: .15rem;
}

/* Responsive profil */
@media (max-width: 700px) {
  .stat-cards    { grid-template-columns: repeat(2, 1fr); }
  .badges-grid   { grid-template-columns: repeat(2, 1fr); }
  .exstat-grid   { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
  .activity-day  { width: 15px; height: 15px; }
  .badges-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ── Toasts badges débloqués ─────────────────────────────────────────────── */
.badge-toasts {
  position: fixed;
  top: 1.1rem;
  right: 1.1rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: .65rem;
  max-width: min(360px, calc(100vw - 2rem));
  pointer-events: none;
}
.badge-toast {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  background: var(--bg-2);
  border: 1px solid rgba(249, 115, 22, .4);
  border-radius: var(--radius);
  box-shadow: 0 10px 32px rgba(0, 0, 0, .45), 0 0 18px rgba(249, 115, 22, .12);
  pointer-events: auto;
  animation: badge-toast-in .35s ease-out;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
a.badge-toast:hover {
  color: inherit;
  text-decoration: none;
  border-color: rgba(249, 115, 22, .7);
}
.badge-toast--out {
  animation: badge-toast-out .28s ease-in forwards;
}
.badge-toast-img { width: 48px; height: 48px; flex-shrink: 0; }
.badge-toast-kicker {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
}
.badge-toast-name {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  margin-top: .1rem;
}
.badge-toast-desc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
  line-height: 1.35;
}
@keyframes badge-toast-in {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes badge-toast-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}
@media (max-width: 480px) {
  .badge-toasts { left: 1rem; right: 1rem; max-width: none; }
}

.field-check {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .9rem;
  color: var(--text-muted);
  cursor: pointer;
}
.field-check-input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--accent);
}

.field-check-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: .25rem;
  flex-wrap: wrap;
}
.field-check-row .field-check {
  flex: 0 1 auto;
  min-width: 0;
  gap: .55rem;
}
.tribe-help-btn {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, .45);
  background: transparent;
  color: #fdba74;
  font-size: .75rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: help;
}
.tribe-help-btn:hover,
.tribe-help-btn[aria-expanded="true"] {
  background: rgba(249, 115, 22, .15);
  color: #fed7aa;
  border-color: var(--accent);
}
.tribe-help-ico { pointer-events: none; }
.tribe-help-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + .45rem);
  z-index: 30;
  padding: .9rem 1rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(22, 27, 34, .98);
  box-shadow: 0 12px 32px rgba(0,0,0,.45);
  text-align: left;
}
.tribe-help-pop[hidden] { display: none !important; }
.tribe-help-title {
  margin: 0 0 .4rem;
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
}
.tribe-help-pop p {
  margin: 0 0 .55rem;
  font-size: .82rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.tribe-help-pop p:last-of-type { margin-bottom: .75rem; }
.tribe-help-close {
  display: inline-flex;
  padding: .35rem .7rem;
  border-radius: 7px;
  border: 1px solid rgba(249, 115, 22, .4);
  background: rgba(249, 115, 22, .12);
  color: #fdba74;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
}
.tribe-help-close:hover {
  background: rgba(249, 115, 22, .22);
  color: #fff;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tribe-header { margin-bottom: 1.5rem; }
.tribe-main {
  justify-content: flex-start;
  align-items: stretch;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
.tribe-audience {
  margin-top: .75rem;
  font-size: .95rem;
  color: var(--text-muted);
  line-height: 1.7;
}
.tribe-audience-chip {
  display: inline-block;
  margin: 0 .1rem;
  padding: .12rem .5rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  vertical-align: middle;
}
.tribe-audience-chip--family {
  color: #fbbf24;
  background: rgba(251, 191, 36, .12);
  border: 1px solid rgba(251, 191, 36, .35);
}
.tribe-audience-chip--school {
  color: #38bdf8;
  background: rgba(56, 189, 248, .12);
  border: 1px solid rgba(56, 189, 248, .35);
}
.tribe-audience-chip--work {
  color: #a78bfa;
  background: rgba(167, 139, 250, .12);
  border: 1px solid rgba(167, 139, 250, .35);
}
.feature-illustrate,
.tribe-illustrate {
  margin: 1.15rem 0 0;
  max-width: 28rem;
}
.feature-illustrate svg,
.feature-illustrate img,
.tribe-illustrate img,
.tribe-illustrate svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1117;
}
.feature-illustrate-caption,
.tribe-illustrate-caption {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.tribe-count {
  margin-top: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.tribe-add-toggle {
  align-self: flex-start;
  margin-bottom: 1.25rem;
}
.tribe-add-panel {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tribe-add-panel[hidden] {
  display: none;
}
.tribe-add {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.tribe-add-form { max-width: 28rem; }
.tribe-filter {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: 0 0 1rem;
  max-width: 22rem;
}
.tribe-filter-label {
  font-size: .8rem;
  color: var(--text-muted);
}
.tribe-filter-input {
  width: 100%;
}
.tribe-card[hidden] { display: none; }
.tribe-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.tribe-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.tribe-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
}
.tribe-card-name { font-weight: 700; }
.tribe-card-email { font-size: .85rem; color: var(--text-muted); }
/* Identifiant Tribu (nouveau système) */
.tribe-username-wrap {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.tribe-username-value {
  font-size: .95rem;
  letter-spacing: .04em;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tribe-username-copy {
  padding: .2rem .5rem;
  font-size: .75rem;
}
.tribe-add-hint {
  font-size: .8rem;
  color: var(--text-muted);
  margin: -.25rem 0 .75rem;
}
/* Ancien système (code rotatif) – gardé pour rétro-compat affichage */
.tribe-code {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  color: var(--text-muted);
}
.tribe-code-wrap {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}
.tribe-code code,
.tribe-code-value {
  font-size: 1rem;
  letter-spacing: .08em;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.tribe-code-toggle {
  padding: .25rem .55rem;
  font-size: .75rem;
}
.profile-sub {
  margin: .15rem 0 .35rem;
  color: var(--text-muted);
  font-size: .9rem;
}
.tribe-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.tribe-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

/* ID membre tribu */
.tribe-member-id {
  font-size: .75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-left: .35rem;
  font-weight: 400;
}
.tribe-group-chip {
  display: inline-block;
  margin-left: .4rem;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 500;
  background: rgba(255, 255, 255, .08);
  color: var(--text-muted);
}

/* Activité 14 jours */
.tribe-activity {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 20px;
}
.tribe-day {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: rgba(255,255,255,.1);
  flex-shrink: 0;
}
.tribe-day--active {
  background: var(--accent);
  opacity: .85;
}

/* Grille stats encadré */
.tribe-stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .75rem;
}
.tribe-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 44px;
  background: rgba(255,255,255,.05);
  border-radius: 6px;
  padding: .3rem .5rem;
}
.tribe-stat-val {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}
.tribe-stat-lbl {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Bouton danger ghost */
.btn-ghost--danger {
  color: #e57373;
}
.btn-ghost--danger:hover {
  color: #ef5350;
  background: rgba(229,115,115,.08);
}

/* Page confirmation suppression */
.tribe-delete-card {
  background: var(--bg-2);
  border: 1px solid rgba(229,115,115,.3);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.tribe-delete-warning {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.tribe-delete-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  margin-top: .1rem;
}
.tribe-delete-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: .5rem;
}
.tribe-delete-body {
  font-size: .9rem;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.tribe-delete-list {
  font-size: .85rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  margin: 0 0 .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.tribe-delete-note {
  font-size: .8rem;
  color: #e57373;
  margin: 0;
}
.tribe-delete-actions {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ── Rapport mensuel Tribu ─────────────────────────────────────────────── */
.trep {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* En-tête rapport */
.trep-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #1a1f2e 60%, #1e2a1a);
  border: 1px solid rgba(249, 115, 22, .25);
  border-radius: .875rem;
}
.trep-kicker {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #f97316;
  margin: 0 0 .3rem;
}
.trep-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #f1f5f9;
  margin: 0 0 .2rem;
}
.trep-period {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}
.trep-header-right {
  display: flex;
  gap: .6rem;
}
.trep-summary-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3.2rem;
  padding: .45rem .7rem;
  background: rgba(249,115,22,.12);
  border: 1px solid rgba(249,115,22,.3);
  border-radius: .6rem;
  text-align: center;
}
.trep-summary-pill--muted {
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.08);
}
.trep-summary-num {
  font-size: 1.2rem;
  font-weight: 700;
  color: #f97316;
  line-height: 1;
}
.trep-summary-pill--muted .trep-summary-num { color: var(--text-muted); }
.trep-summary-lbl {
  font-size: .65rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

/* Alerte inactifs */
.trep-alert {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  padding: .8rem 1rem;
  background: rgba(251,191,36,.07);
  border: 1px solid rgba(251,191,36,.25);
  border-radius: .7rem;
  font-size: .9rem;
  color: #fbbf24;
}
.trep-alert-icon { flex-shrink: 0; font-size: 1rem; }
.trep-alert span strong { color: #f1f5f9; }

/* Fiche membre */
.trep-card {
  background: var(--card-bg, #161b27);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .875rem;
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
}
.trep-card--inactive {
  opacity: .6;
  border-color: rgba(255,255,255,.04);
}
.trep-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}
.trep-member-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f1f5f9;
  margin: 0 0 .25rem;
}
.trep-card-kpis {
  display: flex;
  gap: .6rem;
}
.trep-kpi {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 3rem;
  padding: .3rem .55rem;
  background: rgba(255,255,255,.04);
  border-radius: .5rem;
  text-align: center;
}
.trep-kpi-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #f97316;
  line-height: 1.1;
}
.trep-kpi-lbl {
  font-size: .62rem;
  color: var(--text-muted);
  margin-top: .1rem;
}

/* Calendrier */
.trep-calendar {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}
.trep-cal-day {
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 3px;
  background: rgba(255,255,255,.06);
  flex-shrink: 0;
}
.trep-cal-day--on {
  background: #f97316;
}

/* Exercices */
.trep-exercises {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}
.trep-ex {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .4rem .75rem;
  background: rgba(255,255,255,.04);
  border-radius: .55rem;
  font-size: .85rem;
}
.trep-ex-icon { font-size: .95rem; flex-shrink: 0; }
.trep-ex-body { display: flex; flex-direction: column; }
.trep-ex-label { font-size: .7rem; color: var(--text-muted); }
.trep-ex-val   { font-weight: 600; color: #f1f5f9; }
.trep-ex-score {
  font-size: .7rem;
  color: #f97316;
  font-weight: 600;
}

/* Régularité */
.trep-mom {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.trep-mom-title,
.trep-errors-title {
  margin: 0;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.trep-mom-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
}
@media (max-width: 560px) {
  .trep-mom-row { grid-template-columns: 1fr 1fr; }
}
.trep-mom-item {
  padding: .55rem .65rem;
  border-radius: .55rem;
  background: rgba(255,255,255,.04);
}
.trep-mom-item--up { border: 1px solid rgba(52, 211, 153, .35); }
.trep-mom-item--down { border: 1px solid rgba(251, 113, 133, .35); }
.trep-mom-item--flat,
.trep-mom-item--new { border: 1px solid rgba(255,255,255,.06); }
.trep-mom-lbl { display: block; font-size: .68rem; color: var(--text-muted); }
.trep-mom-val { display: block; margin-top: .2rem; font-weight: 650; color: #f1f5f9; font-size: .92rem; }
.trep-mom-delta { margin-left: .35rem; font-size: .78rem; font-weight: 600; color: #f97316; }
.trep-mom-item--up .trep-mom-delta { color: #34d399; }
.trep-mom-item--down .trep-mom-delta { color: #fb7185; }
.trep-errors {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.trep-errors-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.trep-errors-list li {
  display: flex;
  justify-content: space-between;
  padding: .4rem .65rem;
  background: rgba(255,255,255,.04);
  border-radius: .45rem;
  font-size: .86rem;
  color: #e2e8f0;
}
.trep-errors-meta {
  margin: 0;
  font-size: .75rem;
  color: var(--text-muted);
}
.trep-insight {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1rem 1.1rem;
  background: rgba(249, 115, 22, .06);
  border: 1px solid rgba(249, 115, 22, .22);
  border-radius: .875rem;
}
.trep-insight-headline {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  color: #f1f5f9;
  line-height: 1.35;
}
.trep-insight-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .7rem;
}
@media (max-width: 560px) {
  .trep-insight-grid { grid-template-columns: 1fr; }
}
.trep-insight-item {
  padding: .65rem .75rem;
  background: rgba(255,255,255,.04);
  border-radius: .55rem;
}
.trep-insight-item--action {
  border: 1px solid rgba(249, 115, 22, .28);
  background: rgba(249, 115, 22, .08);
}
.trep-insight-lbl {
  display: block;
  font-size: .68rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #f97316;
  margin-bottom: .25rem;
}
.trep-insight-item p {
  margin: 0;
  font-size: .86rem;
  line-height: 1.4;
  color: #e2e8f0;
}
.trep-regularity {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
.trep-inactive-msg {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}

/* Footer */
.trep-footer {
  font-size: .75rem;
  color: var(--text-muted);
  text-align: center;
  padding-top: .5rem;
  border-top: 1px solid rgba(255,255,255,.06);
  margin: 0;
}

/* Quota + page rapport */
.tribe-report-quota {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .65rem 1rem;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: .65rem;
  font-size: .875rem;
}
.tribe-report-quota-label { color: var(--text-muted); }
.tribe-report-quota-val {
  font-weight: 700;
  color: #f97316;
}
.tribe-report-quota-val--empty { color: #fb7185; }

.tribe-report-meta {
  margin-bottom: .75rem;
}
.tribe-report-body {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: .875rem;
  padding: 1.25rem;
  background: rgba(255,255,255,.02);
}
.btn-danger {
  background: #c62828;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .6rem 1.2rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn-danger:hover {
  background: #b71c1c;
}

/* ── Parrainage Premium ─────────────────────────────────────────────────── */
.affiliate-main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  align-items: stretch;
  justify-content: flex-start;
}
.affiliate-hero {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.affiliate-kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #22c55e;
}
.affiliate-hero .hero-title {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
  line-height: 1.15;
  max-width: 18ch;
}
.affiliate-cta-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .55rem;
  margin-top: .35rem;
}
.affiliate-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #16a34a;
  border: none;
  box-shadow: 0 4px 20px rgba(34, 197, 94, .35);
}
.affiliate-cta:hover {
  background: #22c55e;
  text-decoration: none;
  transform: translateY(-1px);
}
.affiliate-cta-note {
  font-size: .8rem;
  color: var(--text-muted);
}
.affiliate-highlight {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .85rem;
}
.affiliate-highlight-card {
  background: linear-gradient(160deg, rgba(34,197,94,.12), rgba(34,197,94,.03));
  border: 1px solid rgba(34,197,94,.28);
  border-radius: var(--radius);
  padding: 1.1rem 1rem;
}
.affiliate-highlight-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: #4ade80;
  margin-bottom: .25rem;
}
.affiliate-highlight-label {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.affiliate-illu {
  margin: 0.5rem 0 1.5rem;
  text-align: center;
}
.affiliate-illu-img {
  display: block;
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.affiliate-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.affiliate-link-hint {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.45;
}
.affiliate-link-card {
  background: var(--bg-2);
  border: 1px solid rgba(34, 197, 94, .28);
  border-radius: var(--radius);
  padding: 1rem 1.1rem 1.05rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.affiliate-link-box {
  display: flex;
  align-items: stretch;
  gap: .6rem;
  min-width: 0;
}
.affiliate-link-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  background: var(--bg-3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-body);
  font-size: .88rem;
  padding: .7rem .85rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.affiliate-link-input:focus {
  outline: none;
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
}
.affiliate-link-copy {
  flex-shrink: 0;
  padding: .7rem 1.15rem;
  font-size: .9rem;
  background: #16a34a;
  align-self: stretch;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.affiliate-link-copy:hover {
  background: #22c55e;
}
.affiliate-link-code {
  font-size: .82rem;
  color: var(--text-muted);
}
.affiliate-link-code strong {
  color: #4ade80;
  font-weight: 700;
  letter-spacing: .04em;
}
.affiliate-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .75rem;
}
.affiliate-stat-card {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: .9rem .85rem;
  text-align: center;
}
.affiliate-stat-card--validated {
  border-color: rgba(34, 197, 94, .28);
}
.affiliate-stat-value {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--text);
}
.affiliate-stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .2rem;
}
.affiliate-pending {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.affiliate-pending-title {
  font-size: .92rem;
  font-weight: 700;
}
.affiliate-pending-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.affiliate-pending-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  padding: .65rem .85rem;
}
.affiliate-pending-email {
  font-size: .9rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.affiliate-pending-days {
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 600;
  color: #4ade80;
}
.affiliate-pending-days--paused {
  color: var(--text-muted);
}
.affiliate-pending-note {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.affiliate-pitch,
.affiliate-rules {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  color: var(--text-muted);
  font-size: .98rem;
  line-height: 1.5;
}
.affiliate-pitch li,
.affiliate-rules li {
  padding-left: 0;
}
.affiliate-pitch strong,
.affiliate-rules strong {
  color: var(--text);
}
.affiliate-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  counter-reset: none;
}
.affiliate-steps li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
}
.affiliate-step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34,197,94,.18);
  border: 1px solid rgba(34,197,94,.4);
  color: #4ade80;
  font-weight: 800;
  font-size: .9rem;
}
.affiliate-step-title {
  font-weight: 700;
  margin-bottom: .2rem;
}
.affiliate-step-text {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.4;
}
.affiliate-closing {
  background: linear-gradient(160deg, rgba(34,197,94,.14), rgba(22,27,34,.9));
  border: 1px solid rgba(34,197,94,.3);
  border-radius: var(--radius);
  padding: 1.75rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  align-items: flex-start;
}
.affiliate-closing-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
}
.affiliate-closing-text {
  color: var(--text-muted);
  font-size: .95rem;
  line-height: 1.45;
}
.affiliate-interest-form {
  width: 100%;
}
.affiliate-interest-form .affiliate-cta {
  width: 100%;
  max-width: 22rem;
}
@media (max-width: 640px) {
  .affiliate-highlight { grid-template-columns: 1fr; }
  .affiliate-hero .hero-title { max-width: none; }
  .affiliate-stats-row { grid-template-columns: 1fr; }
  .affiliate-link-box {
    flex-direction: column;
  }
  .affiliate-link-copy {
    width: 100%;
  }
}

/* ── Onboarding / personnalisation ───────────────────────────────────────── */
.onboarding-shell { max-width: 32rem; }
.onboarding-card { max-width: 100%; }
.onboarding-kicker {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.onboarding-form fieldset {
  border: none;
  margin: 0;
  padding: 0;
}
.onboarding-form legend {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.field input,
.field select,
.open-input {
  width: 100%;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b949e' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2rem;
}
.field--choice ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.field--choice li label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .75rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-size: .9rem;
  line-height: 1.35;
}
.field--choice li label:hover {
  border-color: rgba(249,115,22,.45);
  background: rgba(249,115,22,.06);
}
.field--choice input[type="radio"] {
  width: auto;
  margin-top: .15rem;
  accent-color: var(--accent);
}
.personalize-skip {
  width: 100%;
  text-align: center;
  margin-top: .25rem;
}

/* ── Page Premium ───────────────────────────────────────────────────────── */
.premium-kicker { color: #fbbf24; }
.premium-main {
  max-width: 980px;
}
.premium-hero .hero-title { max-width: 16ch; }
.nav-link--premium .nav-chip {
  background: rgba(251,191,36,.15);
  color: #fbbf24;
}
@media (max-width: 640px) {
  .premium-hero .hero-title { max-width: none; }
}

/* ── Comparaison Basic / Premium ────────────────────────────────────────── */
.pricing-compare {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1.4rem;
  align-items: start;
}
.pricing-tier {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.65rem;
}
.pricing-tier--premium {
  border-color: rgba(251,191,36,.35);
  background: linear-gradient(180deg, rgba(251,191,36,.07), var(--bg-2) 40%);
}
.pricing-tier-header { margin-bottom: 1.1rem; }
.pricing-tier-eyebrow {
  margin: 0 0 .35rem;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fbbf24;
}
.pricing-tier-name {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}
.pricing-tier-price {
  margin: .35rem 0 0;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}
.pricing-tier-tagline {
  margin: .35rem 0 0;
  font-size: .875rem;
  color: var(--text-muted);
}
.pricing-tier-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.pricing-tier-features li {
  position: relative;
  padding-left: 1.35rem;
  font-size: .9rem;
  line-height: 1.4;
  color: var(--text);
}
.pricing-tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: 700;
}
.pricing-tier-features li.pricing-tier-missing {
  color: var(--text-muted);
}
.pricing-tier-features li.pricing-tier-missing::before {
  content: "–";
  color: var(--text-muted);
}
.pricing-tier-muted {
  color: var(--text-muted);
  font-weight: 400;
}
.pricing-tier-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pricing-tier-link:hover { opacity: .9; }
.pricing-tier-checkout {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.08);
}
.pricing-tier-checkout-title {
  margin: 0 0 .35rem;
  font-size: 1rem;
  font-weight: 700;
}
.pricing-tier-checkout-hint {
  margin: 0 0 1rem;
  font-size: .825rem;
  color: var(--text-muted);
}
@media (max-width: 860px) {
  .pricing-compare { grid-template-columns: 1fr; }
}

/* Bloc durée sous Basic + Premium */
.premium-duration-section {
  margin-top: 0.25rem;
}
.premium-duration-cta {
  width: 100%;
  padding: 1.5rem 1.35rem 1.35rem;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(249, 115, 22, 0.14), transparent 70%),
    var(--bg-2, #161b22);
  text-align: center;
}
.premium-duration-title {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 2.5vw, 1.7rem);
  font-weight: 750;
  color: var(--text);
  letter-spacing: -0.02em;
}
.premium-duration-hint {
  margin: 0 auto 1.25rem;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.45;
}
.premium-duration-cta .premium-plans-grid--row {
  margin-top: 0.25rem;
}
.premium-duration-foot {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 0.88rem;
}
@media (max-width: 720px) {
  .premium-duration-cta {
    padding: 1.25rem 1rem 1.1rem;
  }
}

/* ── Statut premium / tribu ─────────────────────────────────────────────── */
.premium-status {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding: .9rem 1.1rem;
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
}
.premium-status--active {
  background: rgba(74,222,128,.08);
  border: 1px solid rgba(74,222,128,.25);
}
.premium-status--basic {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
}
.premium-status-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(74,222,128,.2);
  color: #4ade80;
  width: fit-content;
}
.premium-status-badge--basic {
  background: rgba(255,255,255,.1);
  color: var(--text-muted);
}
.premium-status-text {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 0;
}
.premium-status-text strong { color: var(--text); }

/* ── Grille plans premium / tribu ───────────────────────────────────────── */
.premium-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.premium-plans-grid--row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .65rem;
}
.premium-plans-grid--row .premium-plan-card {
  padding: .85rem .45rem;
  gap: .25rem;
  text-align: center;
  min-width: 0;
}
.premium-plans-grid--row .premium-plan-duration {
  font-size: .78rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.premium-plans-grid--row .premium-plan-price {
  font-size: .92rem;
  margin: 0;
  line-height: 1.2;
  word-break: break-word;
}
.premium-plans-grid--row .premium-plan-badge {
  font-size: .62rem;
  padding: .1rem .35rem;
}
@media (max-width: 720px) {
  .premium-plans-grid--row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.premium-plan-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: 1.1rem .8rem;
  border-radius: var(--radius);
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.1);
  text-decoration: none;
  color: var(--text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.premium-plan-card:hover {
  border-color: rgba(249,115,22,.5);
  background: rgba(249,115,22,.07);
}
.premium-plan-card--highlight {
  border-color: rgba(249,115,22,.4);
  background: rgba(249,115,22,.08);
}
.premium-plan-card--coming-soon {
  opacity: .5;
  cursor: default;
}
.premium-plan-card--btn {
  width: 100%;
  font-family: inherit;
  font-size: inherit;
}
.premium-plan-price {
  font-size: 1.05rem;
  font-weight: 800;
  margin: .15rem 0 0;
  color: var(--text);
}
.premium-plan-per {
  font-size: .78rem;
  color: var(--text-muted);
  margin: .1rem 0 0;
}
.premium-plan-badge {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .15rem .45rem;
  border-radius: 999px;
  background: rgba(249,115,22,.2);
  color: var(--accent);
  margin: 0;
}
.premium-plan-cta {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0;
}
.premium-plans-hint {
  font-size: .875rem;
  color: var(--text-muted);
  margin-bottom: .25rem;
}

/* ── Section souscription tribu ─────────────────────────────────────────── */
.tribe-subscription-section {
  background: var(--bg-2);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.75rem;
}
.tribe-plan-form { display: contents; }
.tribe-plans-note {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: .6rem;
}

