:root {
  --bg: #0f172a;
  --card: #111827;
  --surface: #1e293b;
  --text: #e5e7eb;
  --muted: #9ca3af;
  --accent: #22d3ee;
  --safe-top: env(safe-area-inset-top, 0);
  --safe-bottom: env(safe-area-inset-bottom, 0);
}

* { box-sizing: border-box; }

/* L'attribut [hidden] doit toujours l'emporter sur display:flex/grid/etc. */
[hidden] { display: none !important; }

/* Mode "app" : on est dans le flux défis, plus sur la page marketing du quiz */
body.is-app-view > main > header,
body.is-app-view > main > #restart-wrapper {
  display: none !important;
}
body.is-app-view {
  background-image: none;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  /* force un layer GPU : fixe le bug iOS PWA où fixed bouge au scroll */
  transform: translateZ(0);
  -webkit-transform: translate3d(0, 0, 0);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: rgba(17, 24, 39, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 50;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  min-height: 52px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 10px;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}

.bottom-nav-item.is-active {
  color: var(--accent);
  background: rgba(34, 211, 238, 0.08);
}

.bottom-nav-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.bottom-nav-label {
  font-size: 0.7rem;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background-color: var(--bg);
  background-image: radial-gradient(1000px 600px at 10% 0%, #0b1220, var(--bg));
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
/* Quand la bottom nav est visible, on réserve la place en bas pour qu'elle
   ne recouvre pas le contenu. */
body.has-nav {
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}

.container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: calc(1rem + var(--safe-top)) 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

body.has-nav main.container {
  min-height: calc(100vh - 72px - env(safe-area-inset-bottom, 0px));
  min-height: calc(100dvh - 72px - env(safe-area-inset-bottom, 0px));
}

/* Sur un écran "app", la vue active remplit la place entre le haut et la bottom nav. */
body.is-app-view main.container > .card.view:not([hidden]) {
  flex: 1;
}
header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
h1 { margin: 0; font-weight: 700; }
.subtitle { margin: 0; color: var(--muted); }

.logo {
  width: 80px;
  height: 80px;
  border-radius: 18px;
  box-shadow: 0 12px 30px rgba(9, 9, 11, 0.35);
  border: 2px solid rgba(255,255,255,0.15);
  object-fit: cover;
  background: rgba(15, 23, 42, 0.6);
}

@media (min-width: 480px) {
  .logo {
    width: 96px;
    height: 96px;
    border-radius: 20px;
  }
}

.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 1.25rem 1rem;
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: 0 24px 60px rgba(8, 15, 31, 0.35);
}

@media (min-width: 480px) {
  .card {
    padding: 28px;
    border-radius: 20px;
    gap: 24px;
  }
}

.card.is-final {
  text-align: center;
}


.card.is-final .question-fieldset,
.card.is-final #answer-form button[type="submit"] {
  display: none !important;
}

.final-message {
  margin: 16px 0 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #22d3ee;
}

/* Résultat : camembert + légende (couleurs du logo) */
.result-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  margin-top: 0.5rem;
  text-align: center;
}

.result-chart {
  width: 200px;
  height: 200px;
  position: relative;
  flex-shrink: 0;
  touch-action: none;
}

.result-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.result-chart path.segment {
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.result-chart path.segment:hover {
  opacity: 0.9;
}

.result-chart path.segment:active {
  opacity: 1;
}

.result-chart-tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, -8px);
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
  z-index: 10;
}


.result-legend {
  list-style: none;
  padding: 0;
  margin: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.result-legend li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  text-align: left;
}

.result-legend li.dominant {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  font-weight: 600;
}

.result-legend .legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}

.result-legend .legend-content {
  flex: 1;
  min-width: 0;
}

.result-legend .legend-label {
  font-weight: 500;
  color: var(--text);
}

.result-legend .legend-pct {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--muted);
  font-size: 0.95rem;
}

.result-legend .legend-desc {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  margin-top: 0.2rem;
}

.result-dominant {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.4;
  max-width: 100%;
}

#question-label {
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--muted);
}

.question-index {
  display: inline-flex;
  align-items: center;
  font-size: 1.05rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(148, 163, 184, 0.95);
}

.question-text {
  font-size: 1.2rem;
  color: var(--text);
}

.question-fieldset {
  border: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#answer-form button[type="submit"] {
  display: none;
}

.options-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.option-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 1rem 1rem;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.option-card:hover {
  border-color: rgba(34, 211, 238, 0.35);
}

.option-card input[type="radio"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.option-card .option-label {
  flex: 1;
  color: var(--text);
}

.option-card input[type="radio"]:checked + .option-label {
  color: var(--accent);
  font-weight: 600;
}





input[type="text"],
input[type="number"],
input[type="search"],
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
  background: #0b1020;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
  -webkit-tap-highlight-color: transparent;
}
textarea {
  min-height: 88px;
}
button {
  margin-top: 12px;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  color: #06101a;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.status { margin-top: 12px; color: var(--accent); min-height: 20px; }
.status[data-type="error"] { color: #fca5a5; }
.status[data-type="info"] { color: var(--accent); }


.admin-link {
  text-align: center;
  margin-top: 16px;
}
.admin-link a {
  color: var(--accent);
  padding: 0.5rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.admin-link a:hover {
  text-decoration: underline;
}
.admin-link .link-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.5rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.admin-link .link-button:hover {
  text-decoration: underline;
}

.stack { display: flex; flex-direction: column; gap: 8px; }
.inline { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); }
.muted { color: var(--muted); }
.small-note { margin: 0 0 12px; font-size: 0.85rem; }

.admin-section h2 { margin-top: 0; margin-bottom: 12px; }

.question-list { display: flex; flex-direction: column; gap: 20px; }
.question-item { border: 1px solid rgba(255,255,255,0.08); padding: 16px; border-radius: 12px; background: rgba(15, 23, 42, 0.6); }
.question-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.question-actions button {
  margin-top: 0;
  min-height: 44px;
  padding: 0.5rem 1rem;
}
.question-actions .secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.24);
  color: var(--text);
}
.question-header { display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.question-meta { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.25);
  color: var(--muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.badge-active { background: rgba(34, 211, 238, 0.16); color: var(--accent); }

.options-builder {
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(11, 18, 32, 0.35);
}

.options-builder legend {
  font-weight: 600;
  color: var(--text);
}

.options-builder-list {
  display: grid;
  gap: 12px;
}

.option-row {
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 12px;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-row-main {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .option-row-main {
    grid-template-columns: 1.4fr 1fr auto;
    align-items: end;
  }
}

.option-row input[type="text"],
.option-row input[type="number"] {
  margin: 0;
}

.weights-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 520px) {
  .weights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.weights-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.option-remove {
  border: 1px solid rgba(255,255,255,0.24);
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.option-remove:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.builder-actions {
  display: flex;
  justify-content: flex-end;
}

.options-builder {
  border: 1px dashed rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.options-builder legend {
  font-weight: 600;
  color: var(--text);
}

.options-builder-list {
  display: grid;
  gap: 12px;
}

.option-row {
  display: grid;
  gap: 8px;
}

@media (min-width: 640px) {
  .option-row {
    grid-template-columns: 1.2fr 1fr auto;
    align-items: center;
  }
}

.option-row input[type="text"],
.option-row input[type="search"] {
  margin: 0;
}

.option-remove {
  border: 1px solid rgba(255,255,255,0.24);
  background: transparent;
  color: var(--muted);
  padding: 0.5rem 1rem;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.builder-actions {
  display: flex;
  justify-content: flex-end;
}

/* ---------- Défis hebdomadaires ---------- */

.reminder-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fde68a;
}
.reminder-banner > span {
  flex: 1;
  font-size: 0.9rem;
  font-weight: 600;
}
.reminder-banner .reminder-banner-cta {
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  background: rgba(250, 204, 21, 0.3);
  color: #78350f;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.85rem;
  -webkit-tap-highlight-color: transparent;
}
.reminder-banner .reminder-banner-cta:hover { background: rgba(250, 204, 21, 0.5); }
.reminder-banner #reminder-banner-close {
  margin: 0;
  padding: 0;
  width: 28px;
  height: 28px;
  min-height: 0;
  border-radius: 50%;
  background: transparent;
  border: none;
  color: #fde68a;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.reminder-banner #reminder-banner-close:hover { background: rgba(255,255,255,0.08); }


.cta-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  min-height: 48px;
  border-radius: 12px;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  color: #06101a;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.cta-link:hover { opacity: 0.92; }
.cta-link:active { transform: scale(0.98); }
.cta-link.is-disabled {
  opacity: 0.55;
  pointer-events: none;
  background: rgba(255,255,255,0.08);
  color: var(--muted);
}
.cta-link-ghost {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
}

.result-cta {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.view .view-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
}

/* Vue « Mon tempérament » : doit tenir sur une hauteur d'écran mobile sans scroll. */
#view-temperament {
  align-items: center;
  gap: 0.9rem;
}
#view-temperament .view-title {
  font-size: 1.15rem;
}
#view-temperament #temperament-chart {
  width: min(150px, 26vh);
  height: min(150px, 26vh);
  align-self: center;
  margin: 0 auto;
}
#view-temperament .result-legend {
  width: 100%;
  gap: 0.4rem;
}
#view-temperament .result-legend li {
  padding: 0.5rem 0.75rem;
  gap: 0.6rem;
}
#view-temperament .result-legend .legend-desc {
  font-size: 0.75rem;
  line-height: 1.35;
}
#view-temperament .hub-actions {
  width: 100%;
  margin-top: auto;
}

.temperament-headline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}
.temperament-headline .tmp-headline-label {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.temperament-headline .tmp-headline-name {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}
.temperament-headline .tmp-headline-desc {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.9;
  line-height: 1.4;
}

.view .view-sub {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Question du lundi */
.weekly-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.weekly-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  min-height: 64px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.weekly-option:hover { border-color: rgba(34, 211, 238, 0.35); }
.weekly-option:active { transform: scale(0.99); }

.weekly-option-emoji { font-size: 1.6rem; }
.weekly-option-label { font-weight: 600; }
.weekly-option-hint {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Hub */
.hub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.hub-temperament {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}

.hub-level-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hub-title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hub-description {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

.hub-why-block {
  position: relative;
  margin: 0;
  padding: 0.9rem 1rem 0.95rem;
  border-left: 3px solid rgba(34, 211, 238, 0.5);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 0 10px 10px 0;
}
.hub-why-label {
  display: block;
  margin-bottom: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hub-why-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.hub-description {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.4;
}

.hub-why {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.03);
}
.hub-why summary {
  cursor: pointer;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}
.hub-why p {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hub-progress {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.progress-day {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.progress-day.is-yes {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.55);
  color: #bbf7d0;
}
.progress-day.is-partial {
  background: rgba(249, 115, 22, 0.2);
  border-color: rgba(249, 115, 22, 0.55);
  color: #fed7aa;
}
.progress-day.is-no {
  background: rgba(239, 68, 68, 0.18);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fecaca;
}
.progress-day.is-missed {
  background: rgba(255,255,255,0.02);
  color: rgba(148, 163, 184, 0.4);
}
.progress-day.is-today {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

@keyframes pulse-day {
  0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45); }
  45%  { transform: scale(1.15); box-shadow: 0 0 0 10px rgba(34, 197, 94, 0.18); }
  100% { transform: scale(1);    box-shadow: 0 0 0 14px rgba(34, 197, 94, 0); }
}
.progress-day.pulse-in {
  animation: pulse-day 0.55s ease-out;
}

.hub-progress-hint {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}
.hub-progress-hint strong { color: var(--text); font-weight: 700; }
.hub-progress-hint .hub-progress-legend {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.75rem;
  opacity: 0.75;
}

.hub-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Check-in inline : un geste, un bouton principal, deux alternatives sobres */
.hub-checkin {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(34, 211, 238, 0.06);
  border: 1px solid rgba(34, 211, 238, 0.14);
}
.hub-checkin.is-done {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.22);
}
.hub-checkin-question {
  margin: 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.checkin-primary {
  margin: 0;
  padding: 0.95rem 1rem;
  min-height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(90deg, #06b6d4, #22d3ee);
  color: #06101a;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.1s ease, opacity 0.2s ease;
}
.checkin-primary:hover { opacity: 0.94; }
.checkin-primary:active { transform: scale(0.985); }
.checkin-primary:disabled {
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  opacity: 1;
  cursor: default;
}
.hub-checkin-alt {
  display: flex;
  gap: 8px;
}
.checkin-alt {
  flex: 1;
  margin: 0;
  padding: 0.55rem 0.5rem;
  min-height: 38px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checkin-alt:hover { border-color: rgba(34, 211, 238, 0.35); color: var(--text); }
.checkin-alt:disabled {
  opacity: 0.4;
  cursor: default;
}
.hub-checkin.is-done .checkin-primary,
.hub-checkin.is-done .hub-checkin-alt {
  display: none;
}
.hub-checkin-feedback {
  margin: 0;
  text-align: center;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}
.hub-checkin.is-done .hub-checkin-feedback {
  color: #bbf7d0;
}

.hub-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: auto;
}

.hub-streak {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.hub-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}
.hub-link:hover { text-decoration: underline; }

/* Check-in */
.checkin-description {
  margin: 0;
  color: var(--text);
  text-align: center;
  font-size: 1rem;
  line-height: 1.4;
}
.checkin-question {
  margin: 0.5rem 0 0;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.checkin-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkin-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 1rem 1.1rem;
  min-height: 60px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15, 23, 42, 0.55);
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
  -webkit-tap-highlight-color: transparent;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.checkin-option:hover { border-color: rgba(34, 211, 238, 0.35); }
.checkin-option:active { transform: scale(0.98); }
.checkin-option:disabled { opacity: 0.5; cursor: not-allowed; }

.checkin-option.checkin-yes { border-left: 4px solid rgba(34, 197, 94, 0.8); }
.checkin-option.checkin-partial { border-left: 4px solid rgba(249, 115, 22, 0.8); }
.checkin-option.checkin-no { border-left: 4px solid rgba(239, 68, 68, 0.7); }

.checkin-emoji { font-size: 1.6rem; }

.checkin-feedback {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(34, 211, 238, 0.14);
  color: var(--accent);
  text-align: center;
  font-weight: 600;
}

/* Historique */
.history-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.history-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.15);
  border: 1px solid rgba(250, 204, 21, 0.4);
  color: #fde68a;
  font-size: 0.85rem;
  font-weight: 600;
}
.history-badge-emoji { font-size: 1rem; }

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

.history-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left-width: 3px;
}
.history-item.is-passed { border-left-color: rgba(34, 197, 94, 0.6); }
.history-item.is-failed { border-left-color: rgba(239, 68, 68, 0.5); }

.history-item-title {
  font-weight: 600;
  color: var(--text);
}
.history-item-meta {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
