:root {
  --nuit: #55387B;
  --nuit-clair: #182841;
  --brume: #c9d6e8;
  --brume-douce: #8fa3bf;
  --eau: #DFDCE7;
  --lavande: #a99bd8;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Jost", system-ui, sans-serif;
  --souffle: 0;
  /* 0 = poumons vides, 1 = poumons pleins (mis à jour en JS) */
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--nuit);
  color: var(--brume);
  font-family: var(--sans);
  font-weight: 300;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.25rem 3rem;
}

main {
  width: 100%;
  max-width: 760px;
  text-align: center;
}

.logo {
  display: block;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  width: clamp(88px, 18vw, 140px);
  height: auto;
  margin: 0;
  opacity: 0.82;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 6vw, 2.8rem);
  letter-spacing: 0.01em;
  color: #f2f5fa;
}

.intro {
  margin: 0.5rem auto 2rem;
  max-width: 34ch;
  color: var(--brume-douce);
  line-height: 1.6;
}

.techniques {
  display: flex;
  justify-content: center;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.techniques button {
  font: inherit;
  font-size: 0.95rem;
  color: var(--brume-douce);
  background: none;
  border: 0;
  border-bottom: 1px solid transparent;
  padding: 0.3rem 0;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

.techniques button:hover {
  color: var(--brume);
}

.techniques button[aria-pressed="true"] {
  color: var(--eau);
  border-bottom-color: var(--eau);
}

button:focus-visible {
  outline: 2px solid var(--lavande);
  outline-offset: 4px;
  border-radius: 4px;
}

.sphere {
  position: relative;
  width: min(72vw, 320px);
  aspect-ratio: 1;
  margin: 0 auto 2.5rem;
  display: grid;
  place-items: center;
}

.anneau {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  transform: scale(calc(var(--min) + var(--souffle) * (1 - var(--min))));
}

.a1 {
  --min: 0.5;
  background: rgba(127, 209, 192, 0.12);
}

.a2 {
  --min: 0.62;
  border: 1px solid rgba(127, 209, 192, 0.35);
}

.a3 {
  --min: 0.74;
  background: rgba(169, 155, 216, 0.16);
}

.a4 {
  --min: 0.86;
  border: 1px solid rgba(169, 155, 216, 0.3);
}

.coeur {
  position: relative;
  z-index: 1;
  transform: scale(calc(0.9 + var(--souffle) * 0.1));
}

#phase {
  display: block;
  font-family: var(--serif);
  font-size: clamp(1.8rem, 6vw, 2.4rem);
  color: #f2f5fa;
  line-height: 1.1;
}

#compte {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.1rem;
  color: var(--eau);
  min-height: 1.6rem;
}

/* La courbe */
svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.barre {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
}

#go {
  font: inherit;
  font-size: 1rem;
  letter-spacing: 0.04em;
  color: var(--nuit);
  background: var(--eau);
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 2.6rem;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

#go:hover {
  background: #9be3d4;
}

#go:active {
  transform: scale(0.97);
}

#musique {
  font: inherit;
  font-size: 0.85rem;
  color: var(--brume-douce);
  background: none;
  border: 1px solid rgba(201, 214, 232, 0.35);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: color 0.3s, border-color 0.3s;
}

#musique:hover,
#musique[aria-pressed="true"] {
  color: var(--eau);
  border-color: var(--eau);
}

#cycles {
  font-size: 0.85rem;
  color: var(--brume-douce);
}

@media (prefers-reduced-motion: reduce) {

  .techniques button,
  #go,
  #musique {
    transition: none;
  }
}