:root {
  /* Couleurs relevées sur le logo et la maquette approuvés. */
  --violet: #4a0f8f; --violet-2: #6a2fc0; --violet-3: #a57be6; --lilas: #e8d9fb; --lilas-2: #d9c2f5;
  --lime: #d2f53c; --lime-2: #bfe52e; --menthe: #a8f0cc; --menthe-2: #dcf9ea; --peche: #fde0d6;
  --fond: #fef6ef; --carte: #ffffff; --encre: #2a0f4d; --doux: #6f5a8c; --trait: #eadcf7;
  --alerte: #d92b57; --alerte-fond: #ffe9ee; --ambre: #8a5a00; --ambre-fond: #fff3d1;
  --rayon: 24px;
  --police: ui-rounded, "SF Pro Rounded", "Nunito", "Baloo 2", "Fredoka", "Varela Round", "Quicksand", "Arial Rounded MT Bold", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fond); color: var(--encre); font-family: var(--police); font-size: 16px; line-height: 1.45; }
#app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); min-height: 100vh; }
h1, h2, h3 { margin: 0; line-height: 1.2; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 1.25rem; } h3 { font-size: 1.02rem; }
p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
.num { font-variant-numeric: tabular-nums; }

.top { display: flex; align-items: center; gap: 8px; padding: calc(12px + env(safe-area-inset-top)) 0 8px; }
.top .logo { width: 40px; height: 40px; flex: none; }
.top .logo img, .top .logo svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.top .mot { height: 30px; width: auto; display: block; }
.top h1 { font-size: 1.6rem; color: var(--violet); font-weight: 900; }
.top .outils { margin-left: auto; display: flex; gap: 8px; }
.rond { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--trait); background: #fff; color: var(--violet); display: grid; place-items: center; position: relative; box-shadow: 0 2px 0 var(--trait); }
.rond svg { width: 22px; height: 22px; }
.rond.on { background: var(--lilas); }
.rond .point { position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%; background: #ff3d7f; border: 2px solid #fff; }
.demo-bar { background: repeating-linear-gradient(-45deg, var(--lime), var(--lime) 12px, var(--lime-2) 12px, var(--lime-2) 24px); color: var(--violet); font-weight: 800; text-align: center; padding: 8px 12px; border-radius: 14px; margin-bottom: 12px; font-size: .86rem; }
.demo-bar button { background: var(--violet); color: #fff; border: 0; border-radius: 99px; padding: 4px 12px; margin-left: 6px; font-size: .8rem; font-weight: 700; }

.card { background: var(--carte); border-radius: var(--rayon); padding: 16px; margin-bottom: 14px; box-shadow: 0 2px 0 var(--trait); border: 1px solid var(--trait); }
.card > h2, .card > h3 { margin-bottom: 8px; }
.stack > * + * { margin-top: 10px; }
.hint { color: var(--doux); font-size: .86rem; }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--lilas); color: var(--violet); vertical-align: middle; white-space: nowrap; }
.tag.lime { background: var(--lime); } .tag.menthe { background: var(--menthe); }
.tag.rouge { background: var(--alerte-fond); color: var(--alerte); } .tag.ambre { background: var(--ambre-fond); color: var(--ambre); }

.accueil { text-align: center; margin-bottom: 14px; }
.salut { font-size: 2.3rem; font-weight: 900; color: var(--encre); letter-spacing: -0.02em; }
.sous { font-weight: 700; color: var(--encre); margin-top: 2px; }
.scene { position: relative; margin: 6px auto 0; height: 230px; display: grid; place-items: end center; }
.scene::before, .scene::after { content: ""; position: absolute; border-radius: 48% 52% 55% 45% / 55% 45% 55% 45%; z-index: 0; }
.scene::before { width: 150px; height: 120px; background: var(--lime); right: 12%; top: 26%; opacity: .9; }
.scene::after { width: 120px; height: 84px; background: var(--menthe); left: 12%; bottom: 8%; }
.scene.jardin::before { background: #7fe0ae; } .scene.jardin::after { background: var(--lime); }
.scene.dakar::before { background: #ffb347; } .scene.dakar::after { background: #f7a3b5; }
.scene.montreal::before { background: #bfe0f7; } .scene.montreal::after { background: var(--lilas-2); }
.scene .mascotte { position: relative; z-index: 1; width: 200px; }
.scene .mascotte svg, .fete .mascotte svg, .rebond .mascotte svg { width: 100%; height: auto; display: block; }
.pilule { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 6px 16px; font-weight: 900; font-size: .82rem; letter-spacing: .02em; text-transform: uppercase; background: var(--lilas-2); color: var(--violet); }
.pilule.menthe { background: var(--menthe); } .pilule.violet { background: var(--violet-2); color: #fff; } .pilule.blanc { background: #fff; }
.pilule.large { display: flex; justify-content: center; margin: 4px 0 8px; }
.petit { font-size: .88rem; margin: 0 2px 5px; }
.mission-jour { background: linear-gradient(160deg, var(--lilas-2), var(--lilas)); border-radius: 26px; padding: 16px; margin-bottom: 14px; text-align: center; }
.mission-jour h3 { font-size: 1.18rem; font-weight: 900; margin: 10px 0 4px; }
.mission-jour .btn { width: 100%; margin-top: 12px; font-size: 1.05rem; }
.mission-jour details { text-align: left; margin-top: 10px; font-size: .9rem; }
details > summary { cursor: pointer; font-weight: 800; color: var(--violet-2); list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::after { content: " ›"; }
details[open] > summary::after { content: " ⌄"; }
.dispo-compact { display: flex; align-items: center; gap: 12px; }
.dispo-compact .ico { width: 46px; height: 46px; border-radius: 14px; background: var(--menthe); color: #14553a; display: grid; place-items: center; flex: none; }
.dispo-compact .ico svg { width: 26px; height: 26px; }
.comprendre { background: var(--fond); border-radius: 16px; padding: 10px 12px; margin-top: 10px; font-size: .9rem; }
.comprendre p { margin-top: 6px; }
.pas { display: flex; align-items: center; justify-content: center; margin: 10px 0; }
.pas i { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--violet-3); background: #fff; display: grid; place-items: center; color: #fff; flex: none; }
.pas i.fait { background: #1f9d63; border-color: #1f9d63; } .pas i.suivant { background: var(--violet-3); border-color: var(--violet-2); }
.pas i svg { width: 16px; height: 16px; stroke-width: 3.5; }
.pas b { flex: 1; max-width: 44px; height: 5px; background: var(--lilas-2); }
.pied { text-align: center; color: var(--doux); font-weight: 700; font-size: .84rem; margin: 18px 0 6px; }
.barre { height: 10px; background: rgba(255, 255, 255, .25); border-radius: 99px; overflow: hidden; }
.barre > i { display: block; height: 100%; background: var(--lime); border-radius: 99px; }
.barre.claire { background: var(--lilas); } .barre.claire > i { background: var(--violet-2); }
.barre.claire.ok > i { background: #2fae77; }

.dispo .gros { font-size: 2.3rem; font-weight: 800; letter-spacing: -0.02em; color: var(--violet); }
.dispo .gros.neg { color: var(--alerte); }
.lignes { width: 100%; border-collapse: collapse; margin-top: 8px; }
.lignes td { padding: 6px 0; border-top: 1px dashed var(--trait); font-size: .92rem; vertical-align: top; }
.lignes td:last-child { text-align: right; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; padding-left: 10px; }
.lignes tr.total td { border-top: 2px solid var(--violet); font-weight: 800; }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.trio > div { background: var(--fond); border-radius: 14px; padding: 8px; font-size: .74rem; color: var(--doux); font-weight: 600; }
.trio b { display: block; color: var(--encre); font-size: .9rem; font-variant-numeric: tabular-nums; }

.alerte { background: var(--alerte-fond); border: 1px solid #f7bccb; color: #7d1030; border-radius: 16px; padding: 12px; margin-bottom: 14px; font-weight: 600; font-size: .92rem; }
.alerte.ambre { background: var(--ambre-fond); border-color: #f0d68a; color: var(--ambre); }
.alerte.menthe { background: var(--menthe-2); border-color: var(--menthe); color: #14553a; }
.alerte button { margin-top: 6px; }

.mission { display: flex; gap: 12px; align-items: center; background: var(--menthe-2); border: 1px solid var(--menthe); border-radius: 18px; padding: 12px; }
.mission.retard { background: var(--ambre-fond); border-color: #f0d68a; }
.mission.reprise { background: var(--lilas); border-color: var(--violet-3); }
.mission .txt { flex: 1; min-width: 0; }
.mission .txt b { display: block; }
.mission .txt span { font-size: .84rem; color: var(--doux); }

.btn { border: 0; border-radius: 99px; padding: 10px 16px; font-weight: 800; background: var(--lilas); color: var(--violet); min-height: 42px; }
.btn.primary { background: var(--violet); color: #fff; box-shadow: 0 3px 0 #2e0760; }
.btn.lime { background: var(--lime); color: var(--violet); }
.btn.ghost { background: transparent; border: 2px solid var(--trait); }
.btn.danger { background: var(--alerte-fond); color: var(--alerte); }
.btn.small { padding: 6px 12px; min-height: 34px; font-size: .84rem; }
.btn:active { transform: scale(.97); }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

.nav { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--trait); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
.nav > div { max-width: 520px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.nav button { background: none; border: 0; border-radius: 16px; padding: 6px 2px; font-size: .72rem; font-weight: 800; color: var(--doux); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.nav button svg { width: 24px; height: 24px; }
.nav button { color: var(--encre); font-size: .8rem; }
.nav button.on { background: var(--lilas-2); color: var(--violet); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 2px solid var(--trait); background: #fff; border-radius: 99px; padding: 7px 14px; font-weight: 800; font-size: .86rem; color: var(--doux); }
.chips button.on { background: var(--violet); border-color: var(--violet); color: #fff; }

.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--trait); }
.liste li:first-child { border-top: 0; }
.liste .g { min-width: 0; flex: 1; }
.liste .g b { display: block; overflow-wrap: anywhere; }
.liste .g span { font-size: .82rem; color: var(--doux); }
.liste .d { text-align: right; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.liste .d small { display: block; font-weight: 600; color: var(--doux); font-size: .74rem; }
.liste li.clic { cursor: pointer; }
.pos { color: #14774c; } .neg { color: var(--alerte); } .gris { color: var(--doux); }
.jour { font-size: .78rem; font-weight: 800; color: var(--violet-2); text-transform: uppercase; letter-spacing: .04em; margin: 12px 0 2px; }

.sheet { position: fixed; inset: 0; background: rgba(34, 18, 63, .55); z-index: 20; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden], .toast[hidden] { display: none; }
.sheet .in { background: #fff; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 28px 28px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
.sheet h2 { margin-bottom: 10px; }
label.champ { display: block; margin-top: 12px; font-weight: 700; font-size: .9rem; }
label.champ small { display: block; font-weight: 500; color: var(--doux); }
label.champ input, label.champ select, label.champ textarea, .saisie { width: 100%; margin-top: 4px; font: inherit; padding: 11px 12px; border: 2px solid var(--trait); border-radius: 14px; background: #fff; color: var(--encre); }
label.champ input:focus, label.champ select:focus, label.champ textarea:focus, .saisie:focus { outline: 3px solid var(--lime); border-color: var(--violet-2); }
label.coche { display: flex; gap: 10px; align-items: center; margin-top: 12px; font-weight: 700; font-size: .92rem; }
label.coche input { width: 22px; height: 22px; accent-color: var(--violet-2); flex: none; }
.err { color: var(--alerte); font-weight: 700; margin-top: 10px; min-height: 1.2em; }
.sheet form .row { margin-top: 8px; }

.plan-ligne { display: grid; grid-template-columns: 1fr 108px; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--trait); }
.plan-ligne small { display: block; color: var(--doux); font-size: .78rem; }
.plan-ligne input { text-align: right; padding: 8px 10px; }
.badges { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.badge { border-radius: 18px; padding: 10px 6px; text-align: center; font-size: .74rem; font-weight: 700; background: var(--fond); color: var(--doux); border: 2px dashed var(--trait); }
.badge.eu { background: var(--lime); color: var(--violet); border: 2px solid var(--lime-2); }
.badge i { display: block; font-style: normal; font-size: 1.5rem; }
.choix { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.choix button { border: 2px solid var(--trait); border-radius: 16px; background: #fff; padding: 10px; font-weight: 700; font-size: .84rem; text-align: left; }
.choix button.on { border-color: var(--violet-2); background: var(--lilas); }
.choix button:disabled { opacity: .55; cursor: default; }
table.comp { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.comp th, table.comp td { padding: 7px 4px; border-top: 1px dashed var(--trait); text-align: right; }
table.comp th:first-child, table.comp td:first-child { text-align: left; }
table.comp thead th { border-top: 0; color: var(--doux); font-size: .78rem; }
.spark { width: 100%; height: 90px; display: block; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); background: var(--encre); color: #fff; padding: 10px 18px; border-radius: 99px; font-weight: 700; z-index: 40; max-width: 90vw; text-align: center; font-size: .9rem; }
.sheet .in.menthe { background: linear-gradient(180deg, var(--menthe), var(--menthe-2)); }
.sheet .in.peche { background: linear-gradient(180deg, var(--peche), #fff 70%); }
.fete, .rebond { text-align: center; }
.fete .mascotte { width: 190px; margin: 0 auto -8px; }
.rebond .mascotte { width: 150px; margin: 0 auto -8px; }
.cri { font-size: 2.2rem; font-weight: 900; text-transform: uppercase; transform: rotate(-3deg); margin: 10px 0 0; }
.rebond .cri { text-transform: none; transform: none; font-size: 1.9rem; }
.carte-ok { background: #fff; border-radius: 22px; padding: 14px; display: flex; gap: 12px; align-items: center; text-align: left; box-shadow: 0 3px 0 rgba(42, 15, 77, .1); margin-bottom: 12px; }
.carte-ok .rondok { width: 50px; height: 50px; border-radius: 50%; background: #1f9d63; color: #fff; display: grid; place-items: center; flex: none; }
.carte-ok .rondok svg { width: 28px; height: 28px; stroke-width: 3.5; }
.carte-ok b { display: block; font-size: 1.15rem; font-weight: 900; }
.carte-ok small { display: block; color: var(--doux); margin-top: 3px; }
.surligne { display: inline-block; background: var(--lime); border-radius: 99px; padding: 2px 12px; font-weight: 900; margin-top: 4px; }
.option { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; background: #fff; border: 1px solid var(--trait); border-radius: 18px; padding: 14px; font-weight: 800; text-align: left; margin-top: 8px; box-shadow: 0 2px 0 var(--trait); }
.fete .btn.primary, .rebond .btn.primary { width: 100%; font-size: 1.05rem; margin-top: 12px; }
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 30; overflow: hidden; }
#fx i { position: absolute; top: -20px; width: 10px; height: 14px; border-radius: 3px; animation: chute 1.9s ease-in forwards; }
@keyframes chute { to { transform: translateY(110vh) rotate(540deg); opacity: .9; } }
@keyframes saut { 0% { transform: translateY(0); } 30% { transform: translateY(-22px) scale(1.03, .98); } 55% { transform: translateY(0) scale(.98, 1.03); } 75% { transform: translateY(-8px); } 100% { transform: translateY(0); } }
.saut { animation: saut .9s ease-out 1; }
.verrou { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; padding: 24px; }
.verrou input { max-width: 240px; text-align: center; }
body.calme *, body.calme *::before, body.calme *::after { animation: none !important; transition: none !important; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Accueil allégé : Bissap accompagne les chiffres. */
.bonjour { display: flex; gap: 12px; align-items: center; background: linear-gradient(135deg, var(--lilas), var(--menthe-2)); border-radius: 26px; padding: 12px 14px; margin: 4px 0 12px; }
.bonjour h2 { font-size: 1.35rem; }
.bonjour .bissap { width: 92px; flex: none; }
.bonjour .bissap svg { width: 100%; height: auto; display: block; }
.bonjour > div:last-child { min-width: 0; flex: 1; }
.bonjour.jardin { background: linear-gradient(135deg, #c9f5dd, var(--lime)); }
.bonjour.dakar { background: linear-gradient(135deg, #ffd6a0, #f7c3cf); }
.bonjour.montreal { background: linear-gradient(135deg, #d8ecfa, var(--lilas-2)); }
.croissance .stades { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin: 10px 0; text-align: center; font-size: .72rem; font-weight: 800; color: var(--doux); }
.croissance .stades > div { border-radius: 14px; padding: 4px 2px 6px; background: var(--fond); opacity: .55; }
.croissance .stades > div.eu { opacity: 1; background: var(--menthe-2); color: var(--violet); }
.croissance .stades svg { width: 100%; height: auto; display: block; }
.croissance .stades small { display: block; font-weight: 600; color: var(--doux); }
.si[hidden] { display: none; }
.clic { cursor: pointer; }
.espace-titre { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 2px 0 10px; }
.liste .g span .tag { margin-top: 2px; }
.liste .g > span { display: block; }

/* Catalogue de charges */
h3.groupe { margin: 14px 0 6px; font-size: .9rem; color: var(--violet-2); text-transform: uppercase; letter-spacing: .03em; }
.tuiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tuile { border: 2px solid var(--trait); background: #fff; border-radius: 16px; padding: 10px 4px; font-weight: 800; font-size: .78rem; line-height: 1.2; text-align: center; overflow-wrap: anywhere; }
.tuile i { display: block; font-style: normal; font-size: 1.6rem; margin-bottom: 4px; }
.tuile small { display: block; font-weight: 600; color: #1f9d63; margin-top: 2px; }
.tuile.deja { background: var(--menthe-2); border-color: var(--menthe); }
.tuile:active { transform: scale(.96); }
