/* Mizanga grand public (PWA) : complete assets/mizanga.css */

html, body { height: 100%; }
body { background: var(--mz-fond); }

/* CONNEXION */
.cz-connexion { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px 16px; background: var(--mz-surface); }
.cz-connexion-boite { width: 100%; max-width: 380px; text-align: center; }
.cz-connexion-boite form { text-align: left; }
.cz-connexion-logo { width: 150px; margin-bottom: 18px; }
.cz-connexion-titre { font-size: 1.7rem; margin-bottom: 28px; }
.cz-connexion-titre em { font-style: normal; color: var(--mz-jaune); }
.cz-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; max-width: 300px; margin-left: auto; margin-right: auto; }
.cz-otp input { width: 100%; min-width: 0; height: 52px; text-align: center; font-size: 1.4rem; font-weight: 700; border: 1px solid var(--bs-border-color); border-radius: 10px; background: var(--bs-body-bg); color: var(--bs-body-color); }
.cz-otp input:focus { outline: 2px solid var(--bs-primary); border-color: transparent; }
/* BIENVENUE (premiere connexion) */
.cz-bienvenue { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .45); display: flex; align-items: center; justify-content: center; padding: 16px; }
.cz-bienvenue-boite { background: var(--mz-surface); border-radius: 18px; padding: 28px 22px 22px; max-width: 360px; width: 100%; text-align: center; }
.cz-bienvenue-boite img { width: 84px; margin-bottom: 14px; }
.cz-bienvenue-boite p { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; }
.cz-cadeau { display: inline-block; margin-top: 28px; padding: 6px 14px; border-radius: 999px; background: rgba(var(--mz-jaune-rgb), .2); color: #6b4c00; font-weight: 700; font-size: .9rem; }
[data-bs-theme="dark"] .cz-cadeau { color: #ffd466; }
.cz-pied { margin-top: 32px; font-size: .8rem; color: var(--bs-secondary-color); }

/* APPLICATION */
.cz-app { display: flex; height: 100vh; height: 100dvh; }
.cz-cote { width: 290px; flex: 0 0 290px; background: var(--mz-surface); border-right: 1px solid var(--mz-ligne); display: flex; flex-direction: column; }
.cz-cote-marque { display: flex; align-items: center; gap: 10px; padding: 16px 18px; }
.cz-cote-marque img { width: 36px; }
.cz-cote-marque span { font-size: 1.35rem; }
.cz-historique { flex: 1; overflow-y: auto; padding: 4px 10px; }
.cz-historique a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--bs-body-color); text-decoration: none; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cz-historique a:hover { background: var(--mz-bleu-doux); }
.cz-historique a.active { background: var(--mz-bleu-doux); color: var(--bs-primary); font-weight: 700; }
.cz-historique .cz-jour { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--bs-secondary-color); font-weight: 700; padding: 12px 12px 4px; }
.cz-cote-bas { border-top: 1px solid var(--mz-ligne); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.cz-cote-bas a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--bs-body-color); text-decoration: none; font-weight: 600; }
.cz-cote-bas a:hover, .cz-cote-bas a.active { background: var(--mz-bleu-doux); }
.cz-cote-bas a .ms-auto { font-weight: 800; color: var(--bs-primary); }

.cz-principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cz-haut { display: none; align-items: center; gap: 10px; padding: 10px 14px; background: var(--mz-bleu); color: #fff; }
.cz-haut img { width: 32px; background: #fff; border-radius: 10px; padding: 3px; }
.cz-haut .mz-marque { color: #fff; font-size: 1.25rem; }
.cz-solde { margin-left: auto; background: var(--mz-jaune); color: #1f2328; font-weight: 800; border-radius: 999px; padding: 3px 12px; font-size: .9rem; text-decoration: none; }
.cz-vue { display: none; flex: 1; min-height: 0; flex-direction: column; }
.cz-vue.active { display: flex; }

/* DISCUSSION */
.cz-fil { flex: 1; overflow-y: auto; padding: 24px 16px; }
.cz-fil-interieur { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.cz-q { align-self: flex-end; max-width: 85%; background: var(--mz-bleu); color: #fff; padding: 10px 14px; border-radius: 16px 16px 4px 16px; }
.cz-r { align-self: flex-start; max-width: 92%; display: flex; gap: 10px; }
.cz-r .cz-avatar { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; background: #fff; border: 1px solid var(--mz-ligne); padding: 2px; }
.cz-r .cz-bulle { background: var(--mz-surface); border: 1px solid var(--mz-ligne); padding: 12px 14px; border-radius: 4px 16px 16px 16px; }
.cz-r .cz-bulle p:last-child, .cz-r .cz-bulle ul:last-child { margin-bottom: 0; }
.cz-source { font-size: .7rem; line-height: 1.35; color: var(--bs-secondary-color); margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--mz-ligne); }
.cz-bulle p.cz-source { margin-bottom: 0; }
.cz-cout { font-size: .75rem; color: var(--bs-secondary-color); margin-top: 6px; font-variant-numeric: tabular-nums; }
.cz-saisie { padding: 10px 16px 14px; background: var(--mz-fond); }
.cz-saisie-interieur { max-width: 760px; margin: 0 auto; display: flex; align-items: flex-end; gap: 8px; background: var(--mz-surface); border: 1px solid var(--mz-ligne); border-radius: 18px; padding: 6px 6px 6px 14px; }
.cz-saisie textarea { flex: 1; border: 0; resize: none; background: transparent; color: var(--bs-body-color); padding: 8px 0; max-height: 140px; outline: none; }
.cz-envoyer { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--mz-bleu); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.cz-accueil { margin: auto; text-align: center; max-width: 560px; padding: 24px 16px; }
.cz-accueil img { width: 84px; margin-bottom: 12px; }
.cz-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.cz-suggestions button { border: 1px solid var(--mz-ligne); background: var(--mz-surface); color: var(--bs-body-color); border-radius: 999px; padding: 7px 14px; font-size: .9rem; }

/* PAGES (solde, compte, historique mobile) */
.cz-page { flex: 1; overflow-y: auto; padding: 20px 16px 24px; }
.cz-page-interieur { max-width: 640px; margin: 0 auto; }
.cz-grand-solde { background: var(--mz-bleu); color: #fff; border-radius: 16px; padding: 20px; }
.cz-grand-solde .valeur { font-family: "Fredoka", sans-serif; font-size: 2.4rem; font-weight: 600; line-height: 1.1; }
.cz-forfaits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cz-forfaits label { border: 2px solid var(--mz-ligne); border-radius: 12px; padding: 12px 6px; text-align: center; font-weight: 800; font-size: 1.1rem; cursor: pointer; background: var(--mz-surface); }
.cz-forfaits input:checked + label { border-color: var(--mz-bleu); background: var(--mz-bleu-doux); color: var(--bs-primary); }
.cz-mouvement { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--mz-ligne); font-size: .92rem; }
.cz-mouvement .plus { color: #198754; font-weight: 800; }
[data-bs-theme="dark"] .cz-mouvement .plus { color: #75d6a5; }

/* NAVIGATION DU BAS (telephone) */
.cz-nav { display: none; border-top: 1px solid var(--mz-ligne); background: var(--mz-surface); padding-bottom: env(safe-area-inset-bottom); }
.cz-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 6px; font-size: .72rem; font-weight: 700; color: var(--bs-secondary-color); text-decoration: none; }
.cz-nav a i { font-size: 1.3rem; }
.cz-nav a.active { color: var(--bs-primary); }

@media (max-width: 991.98px) {
  .cz-cote { display: none; }
  .cz-haut { display: flex; }
  .cz-nav { display: flex; }
}
@media (min-width: 992px) {
  .cz-vue[data-vue="historique"] { display: none !important; }
}

/* AJOUTS DE L'APPLICATION */
.cz-bulle table { font-size: .9rem; margin-bottom: .5rem; }
.cz-bulle td, .cz-bulle th { padding: 2px 8px; border: 1px solid var(--mz-ligne); }
.cz-bulle pre { white-space: pre-wrap; margin-bottom: .5rem; }
.cz-bulle h3, .cz-bulle h4 { font-size: 1rem; margin: .6rem 0 .3rem; }
.cz-bulle.attente::after { content: "…"; animation: cz-points 1s steps(3, end) infinite; }
@keyframes cz-points { 0% { opacity: .2; } 50% { opacity: 1; } 100% { opacity: .2; } }
.cz-alerte { max-width: 760px; margin: 0 auto 8px; font-size: .9rem; }
.cz-envoyer:disabled { opacity: .5; }
.cz-hors-ligne { background: var(--mz-rouge); color: #fff; text-align: center; font-size: .85rem; padding: 4px 8px; }
.cz-mouvement span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cz-source a { color: inherit; text-decoration: underline; }
.cz-fil { display: flex; flex-direction: column; }
.cz-fil-interieur { width: 100%; }

/* Mention sous la saisie */
.cz-avis { font-size: .7rem; line-height: 1.3; text-align: center; color: var(--bs-secondary-color); margin-top: 4px; }
