:root {
  --papier: #F7F3EA;
  --carte: #FFFDF8;
  --encre: #1C2333;
  --doux: #5D6472;
  --trait: #E4DCCB;
  --marine: #1E2A44;
  --marine-fonce: #152036;
  --or: #B08D3C;
  --bordeaux: #7A1F2B;
  --rayon: 14px;
  --titre: "Fraunces", Georgia, serif;
  --texte: "Instrument Sans", -apple-system, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--encre);
  font: 16px/1.45 var(--texte);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
#app { max-width: 520px; margin: 0 auto; padding: 0 18px 80px; }
h1, h2, h3 { font-family: var(--titre); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: 20px; margin: 26px 0 10px; }
p { margin: 0 0 10px; }
a { color: var(--marine); }
.doux { color: var(--doux); }
.petit { font-size: 14px; }
.centre { text-align: center; margin-top: 12px; }
.note { font-size: 14px; color: var(--doux); text-align: center; margin-top: 18px; }

.marque { display: flex; align-items: center; gap: 10px; padding: 20px 0 0; font-family: var(--titre); font-weight: 700; font-size: 19px; color: var(--marine); }
.sceau { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--marine); color: var(--or); font-size: 18px; border: 2px solid var(--or); }

.carte { background: var(--carte); border: 1px solid var(--trait); border-radius: var(--rayon); padding: 16px; }
.champ { display: block; margin: 0 0 14px; }
.champ > span { display: block; font-weight: 600; font-size: 14.5px; margin-bottom: 6px; }
.champ input { width: 100%; font: 17px var(--texte); padding: 12px 14px; border: 1.5px solid var(--trait); border-radius: 12px; background: #fff; color: var(--encre); }
.champ input:focus { outline: none; border-color: var(--marine); box-shadow: 0 0 0 3px rgba(30, 42, 68, .12); }
.champ input.code { font-size: 26px; letter-spacing: .3em; text-align: center; }
.valeur { font-size: 17px; padding: 4px 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; padding: 13px 18px; min-height: 48px;
  font: 600 16px var(--texte); cursor: pointer; text-decoration: none;
  background: var(--encre); color: #fff;
}
.btn:disabled { opacity: .6; cursor: default; }
.btn.principal { background: var(--marine); }
.btn.principal:active { background: var(--marine-fonce); }
.btn.second { background: var(--carte); color: var(--encre); border: 1px solid var(--trait); }
.btn.lien { background: none; color: var(--marine); padding: 8px 4px; min-height: 0; text-decoration: underline; }
.btn.plein { width: 100%; }
.petit-btn { min-height: 38px; padding: 8px 14px; font-size: 14.5px; }
.rangee { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.liste-apps { list-style: none; margin: 0; padding: 0; }
.liste-apps li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--trait); }
.liste-apps li:last-child { border-bottom: 0; }

#avis { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--encre); color: #fff; padding: 12px 16px; border-radius: 12px; max-width: calc(100vw - 32px); font-size: 15px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; }
.chargement { display: grid; place-items: center; min-height: 60vh; }
.roue { width: 34px; height: 34px; border: 3px solid var(--trait); border-top-color: var(--marine); border-radius: 50%; animation: tourne .8s linear infinite; }
@keyframes tourne { to { transform: rotate(360deg); } }
