:root {
  --fond: #f5ede2;
  --carte: #fffaf3;
  --texte: #2b1f19;
  --doux: #73635a;
  --trait: #ecdfcf;
  --accent: #a6452a;
  --accent-voile: #f8e3d6;
  --vert: #3f7d4e;
  --titres: ui-serif, "New York", Georgia, serif;
  --texte-courant: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  background: var(--fond);
  color: var(--texte);
  font-family: var(--texte-courant);
  font-size: 16px;
  line-height: 1.35;
  -webkit-text-size-adjust: 100%;
}

button {
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

main {
  margin: 0 auto;
  max-width: 480px;
  padding: calc(env(safe-area-inset-top) + 20px) 18px calc(env(safe-area-inset-bottom) + 24px);
}

h1 {
  font-family: var(--titres);
  font-weight: 600;
}

.doux {
  color: var(--doux);
}

/* Premier lancement : quel jour de la transition */
.choix h1 {
  font-size: 30px;
  line-height: 1.15;
  margin-top: 24px;
}

.choix .doux {
  margin-top: 10px;
}

.grille-jours {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: 26px;
}

.jour {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 14px;
  font-size: 18px;
  font-weight: 600;
  min-height: 64px;
}

.jour-complet {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Le jour */
.entete {
  align-items: baseline;
  display: flex;
  justify-content: space-between;
}

.entete h1 {
  font-size: 26px;
}

.entete .doux {
  font-size: 14px;
}

.bandeau {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  margin-top: 6px;
}

.rappel {
  color: var(--texte);
  display: block;
  font-weight: 400;
  margin-top: 2px;
}

.maintenant {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 20px;
  margin-top: 16px;
  padding: 20px;
  text-align: center;
}

.etiquette {
  color: var(--accent);
  font-size: 15px;
  font-weight: 700;
}

.dose {
  font-family: var(--titres);
  font-size: 60px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: 8px;
}

.dose-en-toutes-lettres {
  font-size: 40px;
}

.detail {
  color: var(--doux);
  font-size: 17px;
  margin-top: 4px;
}

.donne {
  background: var(--accent);
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  margin-top: 18px;
  min-height: 56px;
  width: 100%;
}

.fini .etiquette {
  color: var(--vert);
}

.fini .dose {
  color: var(--vert);
  font-size: 44px;
}

.reste {
  margin-top: 16px;
  padding: 0 4px;
}

.reste .doux {
  display: block;
  font-size: 14px;
}

.reste strong {
  font-size: 17px;
  font-weight: 600;
}

.liste {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 16px;
  margin-top: 16px;
  overflow: hidden;
}

.ligne {
  align-items: center;
  background: none;
  display: flex;
  gap: 12px;
  min-height: 62px;
  padding: 10px 14px;
  text-align: left;
  width: 100%;
}

.ligne + .ligne {
  border-top: 1px solid var(--trait);
}

.coche {
  align-items: center;
  border: 2px solid var(--trait);
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex: none;
  font-size: 15px;
  font-weight: 700;
  height: 26px;
  justify-content: center;
  width: 26px;
}

.nom {
  flex: none;
  font-weight: 600;
  width: 58px;
}

.quoi {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.quoi strong {
  font-weight: 600;
}

.quoi span {
  color: var(--doux);
  font-size: 13px;
}

.faite .coche {
  background: var(--vert);
  border-color: var(--vert);
}

.faite .nom,
.faite .quoi {
  opacity: 0.5;
}

.horaires {
  margin-top: 24px;
}

.horaires h2 {
  font-family: var(--titres);
  font-size: 20px;
  font-weight: 600;
  padding: 0 4px;
}

.liste-horaires {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 16px;
  margin-top: 10px;
  overflow: hidden;
}

.ligne-horaire {
  align-items: center;
  display: flex;
  font-weight: 600;
  justify-content: space-between;
  min-height: 54px;
  padding: 6px 14px;
}

.ligne-horaire + .ligne-horaire {
  border-top: 1px solid var(--trait);
}

.ligne-horaire input {
  background: var(--fond);
  border: 0;
  border-radius: 10px;
  color: inherit;
  font: inherit;
  /* En dessous de 16 px, Safari zoome la page au toucher du champ. */
  font-size: 17px;
  min-height: 40px;
  padding: 4px 10px;
}

.choix-jours {
  margin-top: 14px;
}

.titre-jours {
  font-weight: 600;
  padding: 0 4px;
}

.rangee-jours {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(7, 1fr);
  margin-top: 8px;
}

.pastille {
  background: var(--carte);
  border: 1px solid var(--trait);
  border-radius: 12px;
  color: var(--doux);
  font-weight: 600;
  min-height: 44px;
}

.pastille.allumee {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.poisson {
  margin-top: 24px;
}

.note {
  font-size: 14px;
  margin-top: 8px;
  padding: 0 4px;
}

.enregistrer {
  background: var(--texte);
  border-radius: 14px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  margin-top: 12px;
  min-height: 52px;
  width: 100%;
}

.message {
  color: var(--vert);
  font-size: 14px;
  margin-top: 10px;
  padding: 0 4px;
}

.message.erreur {
  color: var(--accent);
}

.changer {
  background: none;
  color: var(--doux);
  display: block;
  font-size: 14px;
  margin: 12px auto 0;
  min-height: 44px;
  text-decoration: underline;
}
