/* Police Ubuntu hébergée avec l'app (même police que le site) */
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 300; font-display: swap; src: url("fonts/ubuntu-300.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ubuntu-400.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ubuntu-500.woff2") format("woff2"); }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/ubuntu-700.woff2") format("woff2"); }

:root {
  --creme: #FBF6EF;
  --creme-2: #F5ECE0;
  --carte: #FFFFFF;
  --prune: #4A3B4F;
  --prune-doux: #7A6A80;
  --lavande: #B9A7D6;
  --lavande-pale: #EEE7F7;
  --or-1: #B98A5E;
  --or-2: #C9A227;
  --or-texte: #9A6F3F;
  --ombre: 0 8px 28px rgba(74, 59, 79, .10);
  --rayon: 22px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Ubuntu", system-ui, sans-serif;
  background: var(--creme);
  background-image: radial-gradient(circle at 50% -10%, #FFF3DD 0, rgba(255,243,221,0) 55%),
                    radial-gradient(circle at 100% 100%, var(--lavande-pale) 0, rgba(238,231,247,0) 45%);
  background-attachment: fixed;
  color: var(--prune);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 520px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
h1, h2, h3 { font-family: "Ubuntu", sans-serif; font-weight: 500; margin: 0; }
h1 { font-size: 30px; letter-spacing: .2px; }
h2 { font-size: 22px; }
p { margin: 0; }
.lignes { line-height: 1.75; font-weight: 300; font-size: 17px; }
.lignes span { display: block; }
.lignes span:empty { height: 14px; }
.centre { text-align: center; }
.doux { color: var(--prune-doux); }
.petit { font-size: 14px; }
.espace { height: 18px; }
.espace-l { height: 30px; }

/* Boutons dorés */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 17px 22px; border: 0; border-radius: 999px;
  font: 500 17px "Ubuntu", sans-serif; color: #fff; cursor: pointer; text-decoration: none;
  background: linear-gradient(135deg, var(--or-1), var(--or-2));
  box-shadow: 0 8px 22px rgba(185, 138, 94, .35);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-ligne {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  padding: 15px 22px; border-radius: 999px; border: 1.5px solid var(--or-1);
  background: transparent; color: var(--or-texte); font: 500 16px "Ubuntu", sans-serif;
  cursor: pointer; text-decoration: none;
}
.lien { color: var(--or-texte); font-weight: 500; text-decoration: none; border-bottom: 1px solid rgba(185,138,94,.4); }

/* Accueil */
.hero { border-radius: 28px; overflow: hidden; box-shadow: var(--ombre); aspect-ratio: 1 / 1; }
.hero img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Cartes */
.carte { background: var(--carte); border-radius: var(--rayon); box-shadow: var(--ombre); padding: 20px; }
.grille { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.intention {
  position: relative; text-align: left; border: 0; cursor: pointer; padding: 18px 16px 16px;
  border-radius: var(--rayon); background: var(--carte); box-shadow: var(--ombre); color: var(--prune);
  font-family: "Ubuntu", sans-serif; min-height: 118px; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.intention::before {
  content: ""; position: absolute; inset: 0; opacity: .55;
  background: radial-gradient(circle at 100% 0, var(--teinte, #F6E6C8) 0, rgba(255,255,255,0) 70%);
}
.intention > * { position: relative; }
.intention .nom { font-size: 18px; font-weight: 500; }
.intention .sous { font-size: 13px; color: var(--prune-doux); font-weight: 300; line-height: 1.4; margin-top: 6px; }
.intention .cadenas { position: absolute; top: 12px; right: 14px; font-size: 13px; color: var(--or-texte); }
.intention.repos { grid-column: span 2; min-height: 90px; }

/* Mots */
.mots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.mot { border: 0; font-family: "Ubuntu", sans-serif; cursor: default; padding: 9px 16px; border-radius: 999px; background: var(--lavande-pale); color: var(--prune); font-size: 15px; }
.mot.choisi { background: linear-gradient(135deg, var(--or-1), var(--or-2)); color: #fff; }

/* Conseils */
.conseils { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.conseils li { display: flex; gap: 12px; align-items: center; font-weight: 300; font-size: 16px; }
.conseils .pastille { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--creme-2); color: var(--or-texte); font-size: 17px; }

/* Lecteur */
.lecteur { text-align: center; padding-top: 10px; }
.halo { position: relative; width: 250px; height: 250px; margin: 18px auto 26px; display: grid; place-items: center; }
.halo::before, .halo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,.30) 0, rgba(185,167,214,.18) 45%, rgba(255,255,255,0) 70%);
  animation: respire 9s ease-in-out infinite;
}
.halo::after { inset: 30px; animation-delay: -4.5s; border: 1px solid rgba(185,138,94,.35); background: none; }
.halo img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 40px rgba(201,162,39,.35); }
.pause .halo::before, .pause .halo::after { animation-play-state: paused; }
@keyframes respire { 0%,100% { transform: scale(.88); opacity: .7 } 50% { transform: scale(1.06); opacity: 1 } }
.barre { height: 6px; background: var(--creme-2); border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.barre > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--or-1), var(--or-2)); transition: width .5s linear; }
.temps { display: flex; justify-content: space-between; font-size: 13px; color: var(--prune-doux); }
.commandes { display: flex; justify-content: center; align-items: center; gap: 26px; margin: 20px 0 6px; }
.rond { width: 78px; height: 78px; border-radius: 50%; border: 0; cursor: pointer; color: #fff; font-size: 26px;
  background: linear-gradient(135deg, var(--or-1), var(--or-2)); box-shadow: 0 10px 26px rgba(185,138,94,.4); }
.rond-petit { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--or-1); background: transparent;
  color: var(--or-texte); font: 500 13px "Ubuntu", sans-serif; cursor: pointer; }

/* Formulaires */
label { display: block; font-size: 15px; margin: 0 0 8px; }
input, textarea {
  width: 100%; font: 400 16px "Ubuntu", sans-serif; color: var(--prune); padding: 14px 16px;
  border: 1.5px solid #E6DACB; border-radius: 16px; background: #fff; outline: none;
}
input:focus, textarea:focus { border-color: var(--or-1); }
textarea { min-height: 96px; resize: vertical; }

/* Journal */
.entree { border-left: 3px solid var(--or-1); padding: 4px 0 4px 14px; }
.entree + .entree { margin-top: 18px; }
.entree .date { font-size: 13px; color: var(--prune-doux); }
.entree .titre { font-weight: 500; margin: 2px 0 4px; }
.entree .texte { font-weight: 300; line-height: 1.6; white-space: pre-wrap; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { text-align: center; padding: 16px 10px; }
.stat .chiffre { font-size: 30px; font-weight: 500; color: var(--or-texte); }
.stat .legende { font-size: 13px; color: var(--prune-doux); }

/* Divers */
.retour { background: none; border: 0; color: var(--prune-doux); font: 400 15px "Ubuntu", sans-serif; padding: 6px 0; cursor: pointer; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--lavande-pale); font-size: 13px; }
.badge.or { background: #F6E6C8; color: var(--or-texte); }
.message { padding: 12px 14px; border-radius: 14px; background: #F6E6C8; color: var(--prune); font-size: 15px; }
.message.erreur { background: #F6DEDE; }
.signature { display: flex; align-items: center; gap: 12px; }
.signature img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; }

/* Barre d'onglets */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  background: rgba(251, 246, 239, .94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid #EFE4D6; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); z-index: 10;
}
.tabs a { flex: 1; text-align: center; text-decoration: none; color: var(--prune-doux); font-size: 12px; padding: 4px 0; }
.tabs a .ico { display: block; font-size: 19px; line-height: 1.3; }
.tabs a.actif { color: var(--or-texte); font-weight: 500; }
.tabs.cache { display: none; }

.fondu { animation: fondu .35s ease both; }
@keyframes fondu { from { opacity: 0; transform: translateY(6px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .halo::before, .halo::after, .fondu { animation: none; } }

button.mot { cursor: pointer; }
