:root {
  --indigo: #1e3a5f;
  --lent: #1e3a5f;
  --rapide: #c2410c;
  --papier: #f4efe6;
  --surface: #fffdf8;
  --texte: #1c1917;
  --muet: #57534e;
  --bord: #e7e0d4;
  --or: #b45309;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(1200px 400px at 50% -80px, #dbe4f0 0%, transparent 70%),
    var(--papier);
  color: var(--texte);
  line-height: 1.45;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

#app {
  max-width: 40rem;
  margin: 0 auto;
  min-height: 100dvh;
}

.entete {
  text-align: center;
  padding: calc(1.25rem + var(--safe-top)) 1.15rem 1rem;
}

.entete h1 {
  margin: 0;
  font-size: 1.7rem;
  color: var(--indigo);
}

.kicker {
  margin: 0 0 0.25rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--or);
}

.sous-titre {
  margin: 0.45rem auto 1.1rem;
  max-width: 28rem;
  color: var(--muet);
  font-size: 0.95rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.nav-btn {
  border: 1px solid var(--bord);
  background: var(--surface);
  color: var(--muet);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  font: inherit;
}

.nav-btn.active {
  background: var(--indigo);
  border-color: var(--indigo);
  color: #fff;
}

main {
  padding: 0 1.15rem calc(1.5rem + var(--safe-bottom));
}

.vue h2 {
  margin: 0 0 0.75rem;
  color: var(--indigo);
}

.intro {
  color: var(--muet);
  margin-top: 0;
}

.timer-card {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(28, 25, 23, 0.08);
  padding: 1.4rem 1.1rem 1.5rem;
  text-align: center;
  transition: background 0.35s ease, border-color 0.35s ease, color 0.35s ease;
}

.timer-card[data-phase="lent"],
.timer-card[data-phase="rapide"],
.timer-card[data-phase="pause"],
.timer-card[data-phase="fin"] {
  color: #fff;
  border-color: transparent;
}

.timer-card[data-phase="lent"] {
  background: linear-gradient(180deg, #1e3a5f, #16324f);
}

.timer-card[data-phase="rapide"] {
  background: linear-gradient(180deg, #c2410c, #9a3412);
}

.timer-card[data-phase="pause"] {
  background: linear-gradient(180deg, #44403c, #292524);
}

.timer-card[data-phase="fin"] {
  background: linear-gradient(180deg, #1e3a5f, #0f2744);
}

.phase-kicker {
  margin: 0;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--or);
}

.timer-card[data-phase="lent"] .phase-kicker,
.timer-card[data-phase="rapide"] .phase-kicker,
.timer-card[data-phase="pause"] .phase-kicker,
.timer-card[data-phase="fin"] .phase-kicker {
  color: rgba(255, 255, 255, 0.8);
}

.phase-titre {
  margin: 0.3rem 0 0;
  font-size: 2.4rem;
  font-weight: 750;
  line-height: 1;
}

.phase-consigne {
  margin: 0.4rem 0 0.9rem;
  color: var(--muet);
}

.timer-card[data-phase="lent"] .phase-consigne,
.timer-card[data-phase="rapide"] .phase-consigne,
.timer-card[data-phase="pause"] .phase-consigne,
.timer-card[data-phase="fin"] .phase-consigne,
.timer-card[data-phase="lent"] .chrono-sous,
.timer-card[data-phase="rapide"] .chrono-sous,
.timer-card[data-phase="pause"] .chrono-sous,
.timer-card[data-phase="fin"] .chrono-sous,
.timer-card[data-phase="lent"] .reste,
.timer-card[data-phase="rapide"] .reste,
.timer-card[data-phase="pause"] .reste,
.timer-card[data-phase="fin"] .reste {
  color: rgba(255, 255, 255, 0.85);
}

.chrono {
  margin: 0;
  font-size: 3.6rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1;
}

.chrono-sous,
.reste {
  margin: 0.3rem 0 0;
  color: var(--muet);
}

.reste {
  margin-bottom: 1.1rem;
}

.actions-seance {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-test,
.btn-pause,
.btn-stop,
.btn-go,
.btn-secondaire,
.nav-btn {
  -webkit-tap-highlight-color: transparent;
}

.btn-go,
.btn-pause,
.btn-stop,
.btn-test,
.btn-secondaire {
  font: inherit;
  border: 0;
  cursor: pointer;
}

.btn-go {
  background: var(--indigo);
  color: #fff;
  border-radius: 14px;
  padding: 0.9rem 1.3rem;
  font-size: 1.08rem;
  font-weight: 700;
  min-height: 3.1rem;
  min-width: 10rem;
}

.timer-card[data-phase="lent"] .btn-go,
.timer-card[data-phase="rapide"] .btn-go,
.timer-card[data-phase="pause"] .btn-go,
.timer-card[data-phase="fin"] .btn-go {
  background: #fff;
  color: var(--indigo);
}

.btn-pause,
.btn-stop {
  flex: 1;
  min-height: 3.1rem;
  min-width: 7rem;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 650;
}

.btn-pause {
  background: #fff;
  color: #1c1917;
}

.btn-stop {
  background: transparent;
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, 0.55);
}

.btn-secondaire {
  background: var(--surface);
  border: 1px solid var(--bord);
  color: var(--texte);
  border-radius: 12px;
  padding: 0.7rem 1rem;
}

.stats-ligne {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.stat {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 0.85rem 0.5rem;
  text-align: center;
}

.stat-valeur {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  color: var(--indigo);
}

.stat-libelle {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--muet);
}

.etapes {
  margin: 0 0 1.25rem;
  padding: 0;
  list-style: none;
  counter-reset: etape;
}

.etapes li {
  counter-increment: etape;
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.9rem 3rem;
  margin-bottom: 0.65rem;
  position: relative;
}

.etapes li::before {
  content: counter(etape);
  position: absolute;
  left: 0.85rem;
  top: 0.95rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: var(--indigo);
  color: #fff;
  font-size: 0.8rem;
  display: grid;
  place-items: center;
}

.etapes strong {
  display: block;
  margin-bottom: 0.2rem;
}

.encart {
  background: #e8eef5;
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.encart h3 {
  margin: 0 0 0.4rem;
  color: var(--indigo);
}

.encart ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muet);
}

.liste-seances {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

.liste-seances li {
  background: var(--surface);
  border: 1px solid var(--bord);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.55rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.seance-date {
  font-weight: 600;
}

.seance-meta {
  color: var(--muet);
  font-size: 0.9rem;
}

.bloc {
  border: 1px solid var(--bord);
  background: var(--surface);
  border-radius: 14px;
  margin: 0 0 0.85rem;
  padding: 0.85rem 0.95rem 1rem;
}

.bloc legend {
  font-weight: 700;
  padding: 0 0.35rem;
  color: var(--indigo);
}

.aide-bloc {
  margin: 0 0 0.75rem;
  color: var(--muet);
  font-size: 0.85rem;
}

.choix {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.15rem;
  font-size: 1.02rem;
}

.choix input {
  width: 1.15rem;
  height: 1.15rem;
  accent-color: var(--indigo);
}

.ligne-choix {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.75rem;
}

.ligne-choix:last-child {
  margin-bottom: 0;
}

.ligne-choix label {
  display: grid;
  gap: 0.3rem;
  font-weight: 650;
  font-size: 0.88rem;
}

select {
  font: inherit;
  font-weight: 500;
  padding: 0.65rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--bord);
  background: #fff;
  width: 100%;
}

.btn-test {
  background: var(--indigo);
  color: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  min-height: 2.7rem;
  white-space: nowrap;
}

.conseil {
  font-size: 0.82rem;
  color: var(--muet);
  margin: 0.4rem 0 1rem;
}

.toast {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: calc(1rem + var(--safe-bottom));
  background: #1c1917;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-align: center;
  z-index: 20;
}

.bloc[hidden] {
  display: none;
}

@media (max-width: 520px) {
  .stats-ligne {
    grid-template-columns: 1fr;
  }

  .entete h1 {
    font-size: 1.5rem;
  }
}
