/* ==========================================================================
   Amjak — Base CSS (v1.0.0)
   Reset + composants communs à tous les modules (accueil, budget, meals...).
   Dépend de tokens.css (chargé avant celui-ci).
   ========================================================================== */

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;}
html{-webkit-tap-highlight-color:transparent;font-size:14px;background:var(--cr);color:var(--tx);}
body{
  font-family:var(--font-body);
  background:var(--cr);
  color:var(--tx);
  min-height:100vh;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-size:15px;
  line-height:1.5;
}
button,input,select,textarea{font:inherit;color:inherit;}
button{cursor:pointer;}
a{color:inherit;text-decoration:none;}

h1,h2,h3{font-family:var(--font-title);}

/* ── Cartes / conteneurs ── */
.am-card{background:var(--wh);border:1px solid var(--bd);border-radius:16px;box-shadow:var(--sh);}

/* ── Boutons ── */
.am-btn{border:1px solid var(--bd);background:var(--wh);border-radius:11px;padding:9px 12px;font-weight:800;font-family:var(--font-body);}
.am-btn.primary{background:var(--go);border-color:var(--go);color:#fff;}
.am-btn.danger{background:var(--rdp);border-color:var(--rdp);color:var(--rd);}
.am-icon-btn{width:38px;height:38px;padding:0;display:grid;place-items:center;border:1px solid var(--bd);border-radius:11px;background:var(--wh);}

/* ── Textes / badges ── */
.am-muted{color:var(--mu);}
.am-pill{display:inline-flex;align-items:center;gap:5px;padding:6px 9px;border-radius:999px;background:var(--gp);color:var(--br);font-size:10px;font-weight:850;}

/* ── Champs de formulaire ── */
.am-field{margin-bottom:12px;}
.am-field label{display:block;font-size:12px;font-weight:700;color:var(--br);margin-bottom:5px;}
.am-field input,.am-field select,.am-field textarea{
  width:100%;padding:11px 12px;border:1px solid var(--bd);border-radius:10px;
  background:var(--wh);font-size:14px;
}
.am-field input:focus,.am-field select:focus,.am-field textarea:focus{outline:none;border-color:var(--go);}

/* ── Thèmes sombres : overrides génériques ── */
body.theme-dark input,body.theme-dark select,body.theme-dark textarea{color-scheme:dark;}
body.theme-dark .am-field input,body.theme-dark .am-field select,body.theme-dark .am-field textarea{
  background:var(--be);color:var(--tx);border-color:var(--bd);
}
body.theme-dark .am-field input:focus{border-color:var(--go);}
body.theme-dark .am-btn{background:var(--wh);border-color:var(--bd);}
