/* TalaiNov — outils gratuits : styles communs aux applications de /outils/.
   Téléphone d'abord. Aucune police ni image venue d'ailleurs : tout doit s'afficher
   hors connexion. Les couleurs sont celles de la boutique (public/css/app.css). */
:root {
  --bg: #F4F9FB; --bg-2: #E4EEF4; --ink: #10293F; --muted: #5E7285;
  --accent: #2BAAB5; --jaune: #FFD60A; --mint: #00D4A0; --rouge-pale: #FFE3E0;
  --card: #fff; --r: 16px; --ombre: 3px 3px 0 var(--ink);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans Arabic", sans-serif; background: var(--bg); color: var(--ink); line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.page { max-width: 560px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }

/* En-tête */
.tete { display: flex; align-items: center; gap: 8px; padding: 14px 0 12px; }
.tete h1 { flex: 1; min-width: 0; font-size: 20px; font-weight: 900; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tete select { height: 40px; padding: 0 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; font-size: 13px; }
.rond { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--card); font-size: 18px; font-weight: 800; text-decoration: none; line-height: 1; }
.rond[disabled] { opacity: .35; }

/* Cartes et chiffres */
.carte { background: var(--card); border: 2px solid var(--ink); border-radius: var(--r); box-shadow: var(--ombre); padding: 16px; margin-bottom: 14px; }
.carte.lien { display: block; text-decoration: none; }
.carte.sombre { background: var(--ink); color: #fff; }
.carte.sombre .petit, .carte.sombre .etiquette { color: #B9CBD8; }
.etiquette { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chiffre { font-size: 34px; font-weight: 900; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.petit { font-size: 13px; color: var(--muted); }
.signe { font-size: 30px; line-height: 1; }
.rang { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.rang > .pousse { flex: 1; min-width: 0; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Boutons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-weight: 800; font-size: 15px; text-align: center; text-decoration: none; box-shadow: var(--ombre); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn.plein { background: var(--ink); color: #fff; }
.btn.jaune { background: var(--jaune); }
.btn.vert { background: var(--mint); }
.btn.rouge { background: var(--rouge-pale); }
.btn.large { width: 100%; }
.btn.mini { min-height: 36px; padding: 6px 12px; font-size: 13px; box-shadow: none; }
.btn[disabled] { opacity: .45; }

/* Listes */
.titre { font-size: 15px; font-weight: 900; margin: 20px 0 8px; display: flex; align-items: center; gap: 8px; }
.liste { list-style: none; }
.ligne { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--card); border: 2px solid var(--ink); border-radius: 14px; margin-bottom: 8px; }
.ligne .corps { flex: 1; min-width: 0; }
.ligne .corps[role="button"] { cursor: pointer; }
.ligne .nom { font-weight: 800; overflow-wrap: anywhere; }
.ligne .val { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.plus { color: #0B7A5E; }
.moins { color: #B4232A; }
.pastille { display: inline-block; padding: 2px 9px; border: 2px solid var(--ink); border-radius: 999px; font-size: 11.5px; font-weight: 800; background: var(--bg-2); color: var(--ink); white-space: nowrap; }
.pastille.ok { background: var(--mint); }
.pastille.alerte { background: var(--rouge-pale); }
.pastille.attente { background: var(--jaune); }
.vide { text-align: center; color: var(--muted); padding: 26px 14px; border: 2px dashed var(--muted); border-radius: var(--r); font-size: 14.5px; }
.vide b { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* Feuille de saisie (monte du bas de l'écran) */
.voile { position: fixed; inset: 0; background: rgba(16, 41, 63, .55); display: flex; align-items: flex-end; justify-content: center; z-index: 20; }
.feuille { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--bg); border: 2px solid var(--ink); border-bottom: 0; border-radius: 22px 22px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.feuille h2 { font-size: 18px; font-weight: 900; margin-bottom: 12px; overflow-wrap: anywhere; }
.champ { display: block; margin-bottom: 12px; }
.champ span { display: block; font-size: 13px; font-weight: 800; margin-bottom: 4px; }
.champ input, .champ select, .champ textarea { width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 12px; background: var(--card); font-size: 16px; }
.champ textarea { min-height: 130px; resize: vertical; line-height: 1.5; }
.champ small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.puces { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.puce { padding: 7px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--card); font-size: 13px; font-weight: 700; }
.puce.choisie { background: var(--ink); color: #fff; }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 90vw; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; font-weight: 700; text-align: center; z-index: 30; }
.pied { margin-top: 26px; text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.pied a { font-weight: 800; color: var(--ink); }
