:root {
  --creme: #f6efe6;
  --creme-2: #efe4d6;
  --papier: #fffaf4;
  --terre: #b5573a;
  --terre-fonce: #8f3f27;
  --nuit: #1f2a44;
  --nuit-2: #34405e;
  --or: #c9a45c;
  --sauge: #7f9a83;
  --texte: #2b2b33;
  --texte-doux: #5d5b63;
  --bord: #e2d5c4;
  --ombre: 0 6px 24px rgba(31, 42, 68, 0.08);
  --rayon: 18px;
  --titre: "Cormorant Garamond", Georgia, serif;
  --corps: "Nunito Sans", "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--texte);
  font-family: var(--corps);
  font-size: 18px;
  line-height: 1.55;
}
img { max-width: 100%; display: block; }
a { color: var(--terre-fonce); }
h1, h2, h3 { font-family: var(--titre); color: var(--nuit); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.7rem; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
small, .petit { font-size: .85rem; color: var(--texte-doux); }

.conteneur { max-width: 560px; margin: 0 auto; padding: 0 16px; }
.entete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; max-width: 560px; margin: 0 auto;
}
.marque { font-family: var(--titre); font-size: 1.35rem; color: var(--nuit); text-decoration: none; letter-spacing: .02em; }
.marque span { color: var(--or); }

.carte {
  background: var(--papier); border: 1px solid var(--bord); border-radius: var(--rayon);
  box-shadow: var(--ombre); padding: 20px; margin: 0 0 16px;
}
.bouton {
  display: block; width: 100%; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--terre); color: #fff; font: 700 1.05rem var(--corps);
  padding: 16px 20px; text-align: center; text-decoration: none;
  transition: background .2s, transform .1s;
}
.bouton:hover { background: var(--terre-fonce); }
.bouton:active { transform: scale(.98); }
.bouton.secondaire { background: transparent; color: var(--nuit); border: 1.5px solid var(--nuit); }
.bouton.secondaire:hover { background: var(--creme-2); }
.bouton[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Quiz ---------- */
.progression { height: 6px; background: var(--creme-2); border-radius: 99px; overflow: hidden; margin: 4px 0 22px; }
.progression > div { height: 100%; background: var(--terre); width: 0; transition: width .35s ease; }
.question h2 { margin-bottom: .35em; }
.question .aide { color: var(--texte-doux); margin-bottom: 18px; }
.options { display: grid; gap: 10px; }
.option {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: var(--papier); border: 1.5px solid var(--bord); border-radius: 14px;
  padding: 15px 16px; font: 600 1rem var(--corps); color: var(--texte); cursor: pointer;
}
.option:hover { border-color: var(--or); }
.option.choisie { border-color: var(--terre); background: #fbefe8; }
.option .ico { font-size: 1.35rem; width: 28px; text-align: center; }
.champ {
  width: 100%; padding: 15px 16px; border-radius: 14px; border: 1.5px solid var(--bord);
  font: 1.05rem var(--corps); background: var(--papier); color: var(--texte);
}
.champ:focus, .option:focus-visible, .bouton:focus-visible { outline: 3px solid var(--or); outline-offset: 2px; }
.ligne-date { display: grid; grid-template-columns: 1fr 1.4fr 1.2fr; gap: 8px; }

.chargement { text-align: center; padding: 48px 8px; }
.lune-anim {
  width: 96px; height: 96px; margin: 0 auto 24px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff7e6, var(--or));
  box-shadow: inset -22px -6px 0 0 rgba(31,42,68,.85);
  animation: phase 2.4s ease-in-out infinite alternate;
}
@keyframes phase { from { box-shadow: inset -40px -4px 0 0 rgba(31,42,68,.9); } to { box-shadow: inset 10px -4px 0 0 rgba(31,42,68,.9); } }
.etapes-analyse li { list-style: none; margin: 8px 0; color: var(--texte-doux); opacity: .35; transition: opacity .4s; }
.etapes-analyse li.ok { opacity: 1; color: var(--texte); }
.etapes-analyse li.ok::before { content: "✓ "; color: var(--sauge); font-weight: 700; }
.etapes-analyse { padding: 0; }

.profil-tete { display: flex; gap: 14px; align-items: center; }
.profil-tete img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--or); }
.puce { display: inline-block; background: var(--creme-2); border-radius: 99px; padding: 4px 12px; margin: 0 6px 6px 0; font-size: .9rem; }
.puce.or { background: #f3e6c8; }
.liste-plan { padding-left: 0; }
.liste-plan li { list-style: none; padding: 10px 0 10px 34px; position: relative; border-bottom: 1px dashed var(--bord); }
.liste-plan li:last-child { border-bottom: 0; }
.liste-plan li::before { content: "☾"; position: absolute; left: 4px; top: 8px; color: var(--or); font-size: 1.2rem; }

.offre { border: 2px solid var(--terre); position: relative; cursor: pointer; }
.offre.choisie { background: #fbefe8; }
.offre .etiquette { position: absolute; top: -12px; right: 16px; background: var(--terre); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; }
.prix { font-family: var(--titre); font-size: 2rem; color: var(--nuit); }
.mentions-prix { font-size: .85rem; color: var(--texte-doux); }
.reassurance { display: grid; gap: 6px; margin: 14px 0; font-size: .95rem; }
.pied { text-align: center; padding: 28px 16px 40px; font-size: .85rem; color: var(--texte-doux); }
.pied a { color: var(--texte-doux); margin: 0 6px; }

/* ---------- App ---------- */
.app-bar {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--papier);
  border-top: 1px solid var(--bord); display: flex; justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom)); z-index: 10;
}
.app-bar button {
  background: none; border: 0; font: 600 .78rem var(--corps); color: var(--texte-doux);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 8px; cursor: pointer;
}
.app-bar button .ico { font-size: 1.35rem; }
.app-bar button.actif { color: var(--terre); }
.ecran { padding-bottom: 96px; }
.bandeau-lune {
  background: linear-gradient(135deg, var(--nuit), var(--nuit-2)); color: #f4ead8;
  border-radius: var(--rayon); padding: 18px 20px; margin-bottom: 16px;
}
.bandeau-lune h2 { color: #fff7e6; margin: 0 0 4px; }
.bandeau-lune .phase { color: var(--or); font-weight: 700; letter-spacing: .03em; }
.bloc-jour { display: flex; gap: 14px; align-items: center; cursor: pointer; }
.bloc-jour .ico-rond { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; background: var(--creme-2); display: grid; place-items: center; font-size: 1.5rem; }
.bloc-jour.fait .ico-rond { background: var(--sauge); color: #fff; }
.bloc-jour h3 { margin: 0; }
.bloc-jour p { margin: 0; color: var(--texte-doux); font-size: .95rem; }
.retour { background: none; border: 0; color: var(--nuit); font: 700 1rem var(--corps); padding: 8px 0; cursor: pointer; }

.exo img { border-radius: 14px; margin-bottom: 12px; }
.exo ol { padding-left: 22px; }
.exo ol li { margin-bottom: 6px; }
.compteur { text-align: center; font-family: var(--titre); font-size: 3.2rem; color: var(--terre); margin: 8px 0; }
.note-securite { background: #eef3ee; border-left: 4px solid var(--sauge); padding: 10px 14px; border-radius: 8px; font-size: .92rem; margin: 12px 0; }

.echelle { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 8px 0 18px; }
.echelle button {
  border: 1.5px solid var(--bord); background: var(--papier); border-radius: 12px; padding: 10px 0;
  font-size: 1.4rem; cursor: pointer;
}
.echelle button.choisie { border-color: var(--terre); background: #fbefe8; }
.echelle-legende { display: flex; justify-content: space-between; font-size: .8rem; color: var(--texte-doux); margin-top: -12px; margin-bottom: 14px; }

.graphe { width: 100%; height: auto; }
.legende-graphe { display: flex; flex-wrap: wrap; gap: 10px; font-size: .85rem; }
.legende-graphe span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: var(--c); }

.respiration-cercle {
  width: 180px; height: 180px; margin: 20px auto; border-radius: 50%;
  background: radial-gradient(circle, #fff7e6 0%, #f0dcc0 60%, var(--or) 100%);
  transform: scale(.6); transition: transform 4s ease-in-out;
}
.respiration-cercle.inspire { transform: scale(1); }

.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.bulle { max-width: 86%; padding: 12px 14px; border-radius: 16px; white-space: pre-wrap; }
.bulle.luna { background: var(--papier); border: 1px solid var(--bord); align-self: flex-start; border-bottom-left-radius: 4px; }
.bulle.moi { background: var(--nuit); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.saisie-chat { display: flex; gap: 8px; position: sticky; bottom: 84px; background: var(--creme); padding: 8px 0; }
.saisie-chat .champ { flex: 1; }
.saisie-chat .bouton { width: auto; padding: 0 20px; }
.cache { display: none !important; }

@media (min-width: 700px) {
  h1 { font-size: 2.5rem; }
}
